re PR java/9157 (SEGV on bad java source)
[gcc.git] / gcc / java / ChangeLog
1 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
2
3 PR java/9157
4 * parse.y (build_string_concatenation): Remove redundant if.
5 (patch_conditional_expr): Attempt to patch_string() the condition
6 of a ?: as well, in addition to its other operands.
7
8 2005-01-25 Tom Tromey <tromey@redhat.com>
9
10 * Make-lang.in (java/java-tree-inline.o): Removed.
11
12 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
13
14 PR java/19070
15 * parse.y (patch_binop): Allow comparisons against NULL only
16 if the other operand is of a reference type.
17
18 2005-01-24 Tom Tromey <tromey@redhat.com>
19
20 * java-tree.h (gcj_abi_version): Declare.
21 * class.c (make_class_data): Push gcj_abi_version into "next"
22 field. Renamed field.
23 * decl.c (gcj_abi_version): New global.
24 (parse_version): New function.
25 (java_init_decl_processing): Call it. Renamed 'next' field.
26 Include version.h.
27 (GCJ_BINARYCOMPAT_ADDITION): New define.
28
29 2005-01-24 Roger Sayle <roger@eyesopen.com>
30
31 PR java/19295
32 * jcf-write.c (generate_bytecode_insns): Conversions between
33 integer types of the same precision shouldn't generate widening
34 or narrowing conversion bytecodes.
35
36 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
37
38 * java-except.h, java-tree.h: Remove unused prototypes.
39
40 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
41
42 PR java/18091:
43 * jcf-write.c (perform_relocations): Don't call memcpy if source
44 and destination are the same.
45
46 2005-01-17 Tom Tromey <tromey@redhat.com>
47
48 * verify-impl.c (get_short): Sign extend.
49 (get_int): Likewise.
50
51 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
52
53 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
54 with TYPE_SIZE.
55
56 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
57
58 * verify.c: Revert to the version before the BC-ABI merge.
59
60 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
61
62 PR java/19277
63 * check-init.c (check_init): Take care of references that do not
64 have an explicit final variable declaration (e.g. array length
65 access) for pre/post in/de-crement operators.
66
67 2005-01-08 Mark Wielaard <mark@klomp.org>
68
69 * parse.y (process_imports): Allocate (and free) original_name only
70 when not already defined.
71 * jcf-parse.c (read_class): Free results of find_class() and
72 lrealpath().
73 (java_parse_file): Keep pointer to head of file_list and free when
74 done. Free result of lrealpath().
75
76 2005-01-05 Tom Tromey <tromey@redhat.com>
77
78 * gcj.texi (Standard Properties): java.ext.dirs is now used.
79
80 2004-12-20 Andrew Haley <aph@redhat.com>
81
82 * typeck.c: Use fold_convert for ints and booleans.
83
84 2004-12-17 Andrew Haley <aph@redhat.com>
85
86 PR java/18931
87 * typeck.c (convert): Use a CONVERT_EXPR when converting to
88 BOOLEAN_TYPE or CHAR_TYPE.
89 (convert_to_boolean, convert_to_char) : Remove.
90 * convert.h (convert_to_boolean, convert_to_char) : Remove.
91 * expr.c (expand_load_internal): Do type conversion if type is not
92 as required.
93
94 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
95
96 PR target/18459
97 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
98 Update comment.
99
100 2004-12-07 Andrew Haley <aph@redhat.com>
101
102 PR java/18811:
103 * jcf-parse.c (load_class): Remove sanity test for missing inner
104 class file.
105
106 2004-12-06 Tom Tromey <tromey@redhat.com>
107
108 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
109 (java.uninstall): Likewise.
110 (java.maintainer-clean): Likewise.
111 (.INTERMEDIATE): Likewise.
112 (java.install-man): Likewise.
113 (gcj-dbtool.pod): New target.
114 * gcj.texi (Code Generation): Document -findirect-dispatch.
115 (libgcj Runtime Properties): Document
116 gnu.gcj.precompiled.db.path.
117 (Top): Link to "Invoking gcj-dbtool".
118
119 2004-12-06 Tom Tromey <tromey@redhat.com>
120
121 PR java/14853:
122 * java-tree.h (extract_field_decl): Declare.
123 * parse.y (extract_field_decl): Renamed from
124 strip_out_static_field_access_decl. No longer static.
125 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
126
127 2004-12-03 Tom Tromey <tromey@redhat.com>
128
129 * lang.c (flag_new_verifier): Define.
130 (java_post_options): Set flag_new_verifier if indirect dispatch
131 is being used.
132 * lang.opt (fnew-verifier): Removed.
133
134 2004-12-03 Tom Tromey <tromey@redhat.com>
135
136 PR bootstrap/14614:
137 * Make-lang.in (java.install-common): Only install transformed
138 gcjh if gcj-cross exists.
139
140 2004-12-03 Andrew Haley <aph@redhat.com>
141
142 PR java/18812
143 * except.c (link_handler): Patch 'outer' field of siblings of the
144 range we're demoting.
145
146 2004-12-03 Andrew Haley <aph@redhat.com>
147
148 PR java/18697
149 * class.c (layout_class_method): Don't fail to override a method
150 simply because it has DECL_ARTIFICIAL set.
151
152 2004-12-02 Tom Tromey <tromey@redhat.com>
153
154 PR java/16675:
155 * parse.y (craft_constructor): Special case null_pointer_node.
156
157 2004-12-02 Tom Tromey <tromey@redhat.com>
158
159 PR java/18741:
160 * java-gimplify.c (java_gimplify_expr): Don't call
161 SET_EXPR_LOCATION unless wrapped tree is an expression.
162
163 2004-11-27 Per Bothner <per@bothner.com>
164
165 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
166 Fix fencepost error in 'i', which got executed one too many times.
167 Also, fold memcpy into explicit loop, as originally intended.
168 Also, free temporary 'buf' which otherwise leaks.
169
170 2004-11-27 Per Bothner <per@bothner.com>
171
172 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
173 local static variables if not USE_MAPPED_LOCATION.
174
175 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
176
177 * class.c, decl.c, expr.c: Fix comment typos.
178
179 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
180
181 PR java/18305
182 * decl.c (end_java_method): Call
183 attach_init_test_initialization_flags on all the init_decls.
184 * parse.y (attach_init_test_initialization_flags): Move to ...
185 * expr.c (attach_init_test_initialization_flags): here and
186 support BIND_EXPR also.
187 * java-tree.h (attach_init_test_initialization_flags): Prototype.
188 * jcf-parse.c (parse_class_file): Don't disable class init
189 optimization.
190
191 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
192
193 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
194 in diagnostics.
195
196 2004-11-24 Richard Henderson <rth@redhat.com>
197
198 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
199 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
200
201 2004-11-24 Tom Tromey <tromey@redhat.com>
202
203 * verify.c (defer_merging): Don't use C++-style comment.
204 * verify.h (java_opcode): Added java_opcode_end.
205 * class.c (build_class_ref): Remove C++ comment and old FIXME.
206
207 * verify-impl.c (vfy_push_type): Removed bogus "return".
208 (initialize_stack): Use vfy_alloc and vfy_free.
209 (verify_instructions_0): Likewise.
210
211 * Merged gcj-abi-2-dev-branch to trunk.
212
213 2004-11-24 Andrew Haley <aph@redhat.com>
214
215 * jcf-parse.c (parse_class_file): Set file_start_location.
216
217 2004-11-10 Tom Tromey <tromey@redhat.com>
218
219 * class.c (make_field_value): Don't call build_static_field_ref.
220 (build_static_field_ref): Don't emit direct references when using
221 indirect dispatch.
222
223 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
224 -verbose:class into man page synopsis.
225
226 2004-11-09 Tom Tromey <tromey@redhat.com>
227
228 * expr.c (build_java_arraystore_check): Still generate check if
229 element type is itself an array.
230
231 2004-11-08 Tom Tromey <tromey@redhat.com>
232
233 * java-tree.h (soft_check_assignment_node): Removed.
234 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
235 * decl.c (java_init_decl_processing): Don't initialize
236 soft_check_assignment_node.
237
238 2004-11-05 Tom Tromey <tromey@redhat.com>
239
240 * class.c (layout_class_methods): Don't add Miranda methods when
241 using indirect dispatch.
242
243 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
244
245 * class.c (make_class_data): Call emit_assertion_table to set the
246 'assertion_table' field.
247 (build_signature_for_libgcj): Move here from expr.c.
248 (add_assertion_table_entry): New function. Callback for assertion
249 hashtable traversal.
250 (emit_assertion_table): New. Take class argument, and generate
251 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
252 * decl.c (init_decl_processing): Define assertion_entry_type record.
253 Push 'assertion_table' class field instead of 'verify'.
254 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
255 (type_assertion_hash): Include 'assertion_code' in hash.
256 (add_type_assertion): Rewritten. Take class and assertion_code
257 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
258 (can_widen_reference_to): Use new add_type_assertion() arguments.
259 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
260 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
261 (verify_identifier_node): Removed.
262 (assertion_entry_type, assertion_table_type): New.
263 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
264 assertion code definitions.
265 (struct type_assertion): Add assertion_code. Rename 'source_type' and
266 'target_type' to 'op1' and 'op2'.
267 (add_type_assertion): Declare.
268 (lang_printable_name_wls): Remove unused definition.
269 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
270 to emit runtime assertion.
271 (vfy_note_stack_type): Clean up non-C90 declarations.
272 (vfy_note_local_type): Likewise.
273 * verify.h (vfy_is_assignable_from): Declare.
274 * verify-impl.c (is_assignable_from_slow): Remove unused function.
275 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
276 instead of is_assignable_from_slow().
277 (types_compatible): Reinstate ref_compatible() call.
278
279 2004-11-04 Tom Tromey <tromey@redhat.com>
280
281 * class.c (build_static_field_ref): Reverted previous patch.
282
283 * class.c (build_static_field_ref): Don't emit direct references
284 when using indirect dispatch.
285
286 2004-11-03 Tom Tromey <tromey@redhat.com>
287
288 * expr.c (expand_java_arrayload): Set lhs_type_node.
289 (expand_java_arraystore): Set rhs_type_node.
290
291 2004-11-02 Tom Tromey <tromey@redhat.com>
292
293 * jcf-parse.c (compute_class_name): Use filename length from zip
294 directory, not strlen.
295
296 * expr.c (expand_invoke): Mark new interface methods as abstract.
297
298 2004-11-01 Tom Tromey <tromey@redhat.com>
299
300 * verify-impl.c (push_jump): Removed check for uninitialized
301 objects.
302 (push_exception_jump): Likewise.
303 (handle_ret_insn): Likewise.
304 (handle_jsr_insn): Likewise.
305 (state_check_no_uninitialized_objects): Removed.
306
307 * decl.c (check_local_unnamed_variable): Recognize
308 promoted-to-int parameters when using the new verifier.
309 * expr.c (expand_java_arraystore): Explicitly request array type
310 when using new verifier.
311 (expand_java_arrayload): Likewise.
312 (invoke_build_dtable): Don't pass object_type_node as
313 expression argument to build_java_indirect_ref.
314 (build_java_check_indexed_type): Do nothing.
315 (build_java_arraystore_check): Handle case where array doesn't
316 have array type.
317 (build_java_array_length_access): Likewise.
318 (expand_invoke): Handle case where interface overrides a method
319 from Object.
320 (pop_type_0): Always succeed for reference types.
321 (process_jvm_instruction): Don't pop a value in a dead
322 exception handler.
323 (pop_arguments): Convert arguments to correct types.
324
325 2004-10-29 Andrew Haley <aph@redhat.com>
326
327 * jcf-parse.c (give_name_to_class): Remove line that was
328 incorrectly merged.
329
330 2004-10-29 Andrew Haley <aph@redhat.com>
331
332 * jcf-parse.c (set_source_filename): Add code to build new sfname.
333
334 2004-10-20 Andrew Haley <aph@redhat.com>
335
336 * decl.c (end_java_method): Don't expand if flag_syntax_only.
337
338 2004-10-26 Tom Tromey <tromey@redhat.com>
339
340 * verify.h (vfy_notify_verified): Removed.
341 * verify-glue.c (vfy_notify_verified): Removed.
342
343 2004-10-26 Tom Tromey <tromey@redhat.com>
344
345 * verify-impl.c (debug_print_state): Declare `i' before code.
346 (merge_types): Modify `t' when it is null_type.
347
348 2004-10-26 Tom Tromey <tromey@redhat.com>
349
350 * verify-impl.c (type_print): Renamed from print. Now static and
351 takes an argument.
352 (debug_print_state): Use type_print.
353
354 2004-10-25 Tom Tromey <tromey@redhat.com>
355
356 * expr.c (build_invokeinterface): Compute correct offset for
357 index into interface methods.
358
359 2004-10-20 Tom Tromey <tromey@redhat.com>
360
361 * java-tree.h (verify_jvm_instructions_new): Declare.
362
363 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
364 command line.
365
366 * verify-impl.c (verify_instructions): Correctly handle wide
367 types on the stack.
368 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
369 (vfy_get_component_type): Strip pointer types.
370 (vfy_find_class): Use get_type_from_signature. Strip pointer
371 types.
372 Include java-except.h.
373
374 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
375
376 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
377 vfy_push_type_t, set_variable, add_new_state, merge_into,
378 handle_jsr_insn, branch_prepass, check_class_constant,
379 check_wide_constant, get_one_type, compute_static_types,
380 verify_instructions_0): Clean up C99 declarations after statements.
381
382 2004-10-20 Tom Tromey <tromey@redhat.com>
383
384 * verify-impl.c (merge_refs): Compare reference against iterator,
385 not ref2.
386
387 * verify-glue.c (vfy_tag): Mask off resolved flag.
388
389 2004-10-19 Tom Tromey <tromey@redhat.com>
390
391 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
392 (init_state_with_stack): Initialize `this_type' in state.
393 (verify_method): Use debug_print.
394 * verify-glue.c (vfy_is_primitive): Removed debugging print.
395 (vfy_note_stack_depth): Reverted last patch.
396 (vfy_note_stack_type): Note pointer to Object, not Object.
397 (vfy_note_local_type): Likewise.
398
399 * verify.h (vfy_note_instruction_seen): Declare.
400 * verify-glue.c (verify_jvm_instructions_new): Set
401 BCODE_EXCEPTION_TARGET on target instruction.
402 (vfy_note_instruction_seen): New function.
403 * verify-impl.c (FLAG_INSN_SEEN): New define.
404 (verify_instructions_0): Set flag on instruction. Save state for
405 PC=0 later.
406 (verify_instructions): Call vfy_note_instruction_seen.
407
408 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
409 (verify_jvm_instructions_new): Call method_init_exceptions,
410 add_handler, and handle_nested_ranges.
411 * verify-impl.c (verify_method): Return 1 on success.
412 (verify_instructions_0): Save the state at PC=0.
413
414 * verify-impl.c (init_type_from_class): Set is_resolved and
415 ref_next on new ref_intersection.
416 (init_type_from_string): Likewise.
417
418 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
419
420 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
421 if flag_new_verifier is set.
422 * java-tree.h (flag_new_verifier): Declare.
423 * lang.opt (fnew-verifier): New option.
424 * verify-impl.c: Work around namespace pollution by undef'ing
425 'current_class'.
426 (struct verifier_context): Make 'bytecode' const.
427 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
428 (types_compatible): For the BC-ABI, always consider reference types
429 compatible.
430 (check_class_constant): Use vfr->current_class.
431 (check_constant): Likewise.
432 (check_wide_constant): Likewise.
433 (check_field_constant): Check for 'L' at start of type name.
434 (get_one_type): Return pointer instead of type. Set type result in
435 caller via passed type pointer.
436 (compute_argument_types): Update to use new get_one_type arguments.
437 (compute_return_type): Likewise.
438 (make_verifier_context): New. Allocate and initialize 'vfr'.
439 (free_verifier_context): New. Free 'vfr' and its contents.
440 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
441 and free_verifier_context.
442
443 2004-10-15 Tom Tromey <tromey@redhat.com>
444
445 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
446 * verify.h (vfy_fail): Fixed formatting.
447
448 * verify-impl.c (vfr): Fixed comment formatting.
449 (collapse_type): New function.
450 (verify_instructions): Notify compiler about type map.
451 * verify.h (vfy_note_stack_depth): Updated.
452 (vfy_note_stack_type): Likewise.
453 (vfy_note_local_type): Likewise.
454 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
455 Declare.
456 * verify-glue.c (vfy_note_stack_depth): Correctly size type
457 state. Added `method' argument.
458 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
459 argument.
460 (vfy_note_local_type): New function.
461 (vfy_unsuitable_type): Likewise.
462 (vfy_return_address_type): Likewise.
463 (vfy_null_type): Likewise.
464
465 * verify.h (VFY_IN_GCC): Removed.
466 (VFY_WANT_TYPEMAP): Removed.
467 * verify-impl.c (verify_instructions_0): Removed useless "\".
468 (struct state) <next>: Uncomment.
469
470 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
471
472 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
473 C-style.
474
475 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
476
477 * Make-lang.in (verify.o): Re-enabled this target.
478 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
479 (vfy_get_interface): Likewise.
480 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
481 * verify.h (verify_jvm_instructions_new): Declare.
482 * verify-impl.c (free_state): Temporarily comment out unused
483 function.
484
485 2004-10-06 Tom Tromey <tromey@redhat.com>
486
487 * java-tree.h (JV_STATE_READ): New enum value.
488
489 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
490
491 * verify.h: New file.
492
493 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
494
495 * verify-impl.c, verify-glue.c, verify.h: New files.
496 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
497
498 2004-09-24 Andrew Haley <aph@redhat.com>
499
500 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
501 for a slot if it's of pointer type.
502
503 2004-09-14 Tom Tromey <tromey@redhat.com>
504
505 * class.c (make_class_data): Correctly initialize "state" field.
506 Initialize "engine" field.
507 * decl.c (java_init_decl_processing): Add "engine" field.
508
509 2004-09-10 Andrew Haley <aph@redhat.com>
510
511 PR java/12760
512 * expr.c (build_invokeinterface): Use fast method for interface
513 dispatch.
514 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
515 JTI_ITABLE_PTR_TYPE.
516 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
517 (emit_symbol_table): Add new arg, element_size.
518 * decl.c (java_init_decl_processing): Initialize Class.itable.
519 * class.c (GEN_TABLE): New macro.
520 (gen_indirect_dispatch_tables): Use it. Add itable.
521 (make_class_data): Add new arg for emit_symbol_table().
522 Emit itable.
523 (add_miranda_methods): Make sure search_class has been parsed.
524 (emit_symbol_table): Add new arg, element_size.
525
526 2004-09-06 Andrew Haley <aph@redhat.com>
527
528 * verify.c (merge_types): Return Object for all merges of
529 interfaces.
530 * expr.c (add_type_assertion): Don't generate assertions when
531 source type is array of Object.
532
533 2004-09-03 Andrew Haley <aph@redhat.com>
534
535 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
536
537 * lang.c (java_post_options): Force flag_verify_invocations if
538 we're not using indirect dispatch.
539
540 * expr.c (pop_type_0): Move test for interfaces before call to
541 can_widen_reference_to().
542 (build_signature_for_libgcj): Remove generation of canonical array
543 type.
544 (add_type_assertion): Canonicalize both arrays.
545 Don't assert that type X can be assigned to Object.
546 Don't assert that type X an be assigned to type X.
547 Don't assert that Object can be assigned to type X.
548 (can_widen_reference_to): Warn whenever we generate an assertion.
549 (process_jvm_instruction): Use throwable_type_node for the type of
550 an exception class.
551
552 2004-09-01 Andrew Haley <aph@redhat.com>
553
554 * decl.c (java_init_decl_processing): Change
555 verify_identifier_node to "__verify".
556 * expr.c (add_type_assertion): Use verify_identifier_node for name.
557 * java-tree.h (verify_identifier_node): Change to "__verify".
558
559 * expr.c (build_signature_for_libgcj): New function.
560 (add_type_assertion): Use it to construct signatures for
561 source_type and target_type.
562
563 2004-08-27 Andrew Haley <aph@redhat.com>
564
565 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
566 (verify_identifier_node): New.
567 (TYPE_VERIFY_METHOD): New.
568 (struct type_assertion): New type.
569 * expr.c (type_assertion_eq): New function.
570 (type_assertion_hash): New function.
571 (add_type_assertion): New function.
572 (can_widen_reference_to): Call add_type_assertion().
573 * decl.c (java_init_decl_processing): Add verify_identifier_node.
574 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
575 (finish_class): Output TYPE_VERIFY_METHOD (type).
576
577 * decl.c (end_java_method): Nullify unused fields.
578
579 2004-08-17 Andrew Haley <aph@redhat.com>
580
581 * verify.c (defer_merging): Quieten.
582 * jcf-parse.c (load_class): Only try to open a class file if it's
583 java.lang.Object or if it's part of the current compilation.
584 Check that the class we just tried to load is the class we just
585 loaded. Quieten.
586 (java_parse_file): Set flag_verify_invocations off if we're
587 compiling from .class.
588 (parse_zip_file_entries): Abort if we try to read a dummy class.
589 * expr.c (can_widen_reference_to): Quieten.
590 (build_invokevirtual): Abort if we try to invokevirtual an
591 interface.
592 (expand_invoke): Don't build a non-interface call to an interface.
593 (build_instanceof): Don't do premature optimization if
594 flag_verify_invocations is not set.
595 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
596 from superclass.
597 (build_static_field_ref): Add correct type conversion for
598 field_address.
599 (add_miranda_methods): Disable generation of Miranda methods for
600 dummy classes.
601 (layout_class_method): Don't complain about non-static method
602 overrides static method with dummy classes.
603
604 2004-08-13 Tom Tromey <tromey@redhat.com>
605
606 * class.c (build_static_field_ref): Re-enable atable lookups for
607 static fields.
608
609 * parse.y (strip_out_static_field_access_decl): Indentation fix.
610
611 2004-08-11 Tom Tromey <tromey@redhat.com>
612
613 * gcj.texi (libgcj Runtime Properties): Document new properties.
614
615 2004-08-06 Andrew Haley <aph@redhat.com>
616
617 * jcf-parse.c (load_class): Check that we really have loaded the
618 class we're looking for.
619
620 2004-07-19 Andrew Haley <aph@redhat.com>
621
622 * verify.c (verify_jvm_instructions): Comment change only.
623
624 * typeck.c (build_java_array_type): Add size field to array name.
625
626 * java-tree.h (LOCAL_SLOT_P): New.
627 (update_aliases): Add PC argument.
628 (pushdecl_function_level): New function.
629
630 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
631 MODIFY_EXPR, and SAVE_EXPR.
632 (java_gimplify_modify_expr): New function.
633
634 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
635 (expand_iinc): Pass PC to update_aliases().
636 (STORE_INTERNAL): Likewise.
637 (process_jvm_instruction): Likewise.
638
639 * decl.c (base_decl_map): New variable.
640 (uniq): New variable.
641 (update_aliases): Rewrite with more thorough checking.
642 (debug_variable_p): New function.
643 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
644 (check_local_named_variable): Delete whole function.
645 (initialize_local_variable): New function.
646 (check_local_unnamed_variable): Add checks and comments.
647 (find_local_variable): Rewrite.
648 (java_replace_reference): New function.
649 (function_binding_level): New variable.
650 (pushdecl_function_level): New function.
651 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
652 (maybe_pushlevels): Call pushdecl() on each of the new decls.
653 (start_java_method): Reset uniq. Create base_decl_map. Set
654 function_binding_level.
655 (end_java_method): Null unused fields to save memory.
656
657 2004-06-29 Andrew Haley <aph@redhat.com>
658
659 * except.c (expand_start_java_handler): Push a new binding level.
660 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
661 register_exception_range() to register where we'll do it.
662 (expand_end_java_handler): Remove old bogus code. Replace with
663 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
664 the top of the expression we're curently building.
665 (maybe_end_try): Delete.
666 * decl.c (binding_level.exception_range): New field.
667 (clear_binding_level): Add field exception_range. Reformat.
668 (poplevel): Call expand_end_java_handler().
669 (poplevel): Call java_add_stmt only if functionbody is false.
670 (maybe_poplevels): Don't call maybe_end_try() from here.
671 (end_java_method): Clear no longer used trees in function decl.
672 (register_exception_range): New function.
673 * java-tree.h (register_exception_range, struct eh_range): Declare.
674
675 2004-06-22 Andrew Haley <aph@redhat.com>
676
677 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
678 the otable.
679 * check-init.c (get_variable_decl): Teach check-init about
680 FIELD_DECLs addressed via the otable.
681 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
682 CLASS_PARSED_P.
683
684 2004-05-28 Andrew Haley <aph@redhat.com>
685
686 * jcf-parse.c (load_class): Don't try to read a class that we've
687 already read.
688
689 * expr.c (build_invokeinterface): Use the old-fashioned way of
690 doing indirect dispatch: look up interfaces by name.
691 * java-tree.h (enum java_tree_index): Add
692 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
693 * decl.c (java_init_decl_processing): Add
694 soft_lookupinterfacemethodbyname_node.
695
696 * gjavah.c (print_method_info): Final methods have vtable entries,
697 so gjavah needs to output them.
698 * class.c (layout_class_method): Generate vtable entries for final
699 methods.
700 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
701 dispatch, even if a method is final.
702
703 2004-05-25 Andrew Haley <aph@redhat.com>
704
705 * class.c (build_symbol_entry): Convert the names of constructors
706 to init_identifier_node when generating an entry for the indirect
707 dispatch table.
708
709 * expr.c (build_known_method_ref): Generate indirect calls for
710 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
711
712 2004-05-24 Andrew Haley <aph@redhat.com>
713
714 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
715 atable element is of the right type.
716
717 * class.c (build_static_field_ref): Cast pointer to correct type
718 for field.
719
720 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
721
722 * Merged with HEAD as of 20040514. Diff against
723 gcj-abi-2-merge-20040514.
724
725 2004-04-16 Andrew Haley <aph@redhat.com>
726
727 * verify.c (check_pending_block): Disable subroutine checks.
728 (defer_merging): New function.
729 (merge_types): If types are dummy, use defer_merging to combine them.
730 (verify_jvm_instructions): If invocation is invokeinterface and
731 target is dummy, assume target really is an interface.
732
733 * parse.y (patch_invoke): Break out call to java_create_object.
734
735 * lang.c (flag_verify_invocations): New.
736
737 * jcf-parse.c (load_class): If we've already failed to load a
738 class, don't try again.
739 (load_class): If we can't find a .class file, don't fail, but emit
740 a warning.
741 (parse_class_file): Don't act on dummy methods.
742
743 * java-tree.h (flag_verify_invocations): New.
744 (TYPE_DUMMY): New.
745 (lang_type.dummy_class): New field.
746 (java_create_object): New function.
747 (METHOD_DUMMY): New.
748
749 * expr.c (build_field_ref): Widen field offset.
750 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
751 that each of its elements is compatible with the one we're
752 popping.
753 (pop_type_0): Issue a warning to say that we need to generate a
754 runtime check.
755 (java_create_object): New function.
756 (build_field_ref): Only generate hard refs if we're not using
757 indirect dispatch.
758 (expand_java_field_op): If we're using !verify_invocations and we
759 see a missing field, generate a decl for it.
760
761 (expand_invoke): If a class doesn't have the method we seek and
762 we're using !flag_verify_invocations, generate a decl for the
763 method now.
764
765 (build_known_method_ref): Always use indirect dispatch via the
766 atable for static methods.
767
768 (expand_java_NEW): Break out object creation into new function,
769 java_create_object.
770
771 (can_widen_reference_to): Issue a warning to say that we need to
772 generate a runtime check.
773
774 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
775 (make_method_value): Also use index for interfaces.
776 (make_class_data): Skip dummy field for inherited data.
777 Don't build method array for dummy methods.
778 Set size_in_byte to -1 when using inirect dispatch
779 Don't build a hard class ref if we don't have a hard ref to our
780 superclass, or if we're using inirect dispatch.
781 Null out dispatch tables.
782
783 (layout_class_method): Don't complain about non-static method
784 overrides static method is method is artificial.
785
786 (build_static_field_ref): Disable atable references to static
787 fields for the time being.
788
789 (layout_class_methods): Check for CLASS_INTERFACE as
790 well as CLASS_ABSTRACT.
791
792 2004-11-24 Steven Bosscher <stevenb@suse.de>
793
794 * class.c (make_class_data): Don't check flag_inline_functions.
795 * lang.c (flag_really_inline): Remove unused flag.
796 (java_handle_option): Don't set it here. Remove special handling
797 of flag_inline_functions for Java.
798 (java_init): Don't set flag_inline_trees here. Already done...
799 (java_post_options): ...here. Don't clear flag_inline_functions.
800
801 2004-11-24 Steven Bosscher <stevenb@suse.de>
802
803 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
804 (java_gimplify_exit_block_expr): New function.
805 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
806 LABELED_BLOCK_EXPR.
807 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
808 (EXIT_BLOCK_EXPR): Likewise.
809 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
810 (LABELED_BLOCK_BODY): Likewise.
811 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
812 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
813 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
814 TREE_OPERAND.
815 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
816 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
817 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
818 second operand of EXIT_BLOCK_EXPR.
819 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
820 TREE_OPERAND.
821 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
822
823 2004-11-23 Ben Elliston <bje@au.ibm.com>
824
825 * xref.h (xref_flag_value): Remove.
826 (xref_set_data, xref_get_data): Likewise.
827 (xref_set_current_fp): Likewise.
828 (XREF_NONE): Likewise.
829 (XREF_GET_DATA): Likewise.
830 * xref.c (xref_flag_value): Remove.
831 (xref_set_data, xref_get_data): Likewise.
832 (xref_set_current_fp): Likewise.
833
834 2004-11-23 Ben Elliston <bje@au.ibm.com>
835
836 * gjavah.c (output_directory): Make static.
837 (temp_directory): Likewise.
838
839 2004-11-15 Tom Tromey <tromey@redhat.com>
840
841 * decl.c (instn_ptr_type_node): Removed.
842 (lineNumbers_ptr_type_node): Removed.
843 (jint_type): Removed.
844 (jint_ptr_type): Removed.
845
846 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
847
848 PR java/15576
849 * check-init.c (check_init): Ignore DECL_EXPR.
850 * expr.c (always_initialize_class_p): Reenable.
851 (build_class_init): Use a variable to store the decl. Also use
852 boolean_false_node instead of integer_zero_node.
853 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
854 to the block.
855
856 2004-11-08 Tom Tromey <tromey@redhat.com>
857
858 PR java/16843:
859 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
860 generating a JNI header.
861 (print_field_info): Handle JNI headers.
862 (jni_print_float): Likewise.
863 (jni_print_double): Likewise.
864
865 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
866
867 * decl.c (end_java_method): Remove duplicated code.
868
869 2004-11-06 Zack Weinberg <zack@codesourcery.com>
870 Gerald Pfeifer <gerald@pfeifer.com>
871
872 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
873 as well.
874
875 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
876
877 PR java/17265
878 * class.c: Reinstate 2004-08-18 patch.
879 (make_local_function_alias): Don't create an alias for extern (native)
880 functions.
881
882 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
883
884 PR java/17265
885 * class.c (make_local_function_alias): Revert 2004-08-18 change.
886 (make_method_value): Likewise.
887
888 2004-10-21 Andrew Haley <aph@redhat.com>
889
890 PR java/18091:
891 * jcf-parse.c (set_source_filename): Add code to build new sfname.
892
893 2004-10-20 Andrew Haley <aph@redhat.com>
894
895 * decl.c (end_java_method): Don't expand if flag_syntax_only.
896 Remove duplicated code block.
897
898 2004-10-18 Steven Bosscher <stevenb@suse.de>
899
900 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
901 New rules to work around old Bison warnings.
902
903 2004-10-17 Steven Bosscher <stevenb@suse.de>
904
905 * class.c (ident_subst): Always alloca buffer.
906 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
907 opcode after including javaop.def.
908 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
909 conditional expression that exits, to avoid warnings.
910 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
911 a user of an extension.
912 * win32-host.c: Move check down to have non-empty file when
913 WIN32 is not defined.
914
915 * Make-lang.in (java-warn): Add STRICT_WARN.
916 (java/jcf-io.o-warn): Don't have Werror for this file.
917 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
918
919 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
920
921 * expr.c (expr_add_location): Move declaration to before all
922 statements.
923 * parse.y (java_expand_classes): Ditto.
924 * lex.c (java_peek_unicode): Ditto.
925
926 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
927
928 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
929 if possible, else convert `foo' to 'foo'.
930 * class.c: Likewise.
931 * decl.c: Likewise.
932 * expr.c: Likewise.
933 * jcf-io.c: Likewise.
934 * jcf-parse.c: Likewise.
935 * lang.c: Likewise.
936 * lex.c: Likewise.
937 * parse.h: Likewise.
938
939 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
940
941 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
942 rename parameter 'msg' to 'msgid' in function declaration.
943 (issue_warning_error_from_context): Likewise.
944 (yyerror): Rename parameter 'msg' to 'msgid'.
945 (all over): Use new quoting style for diagnostics.
946
947 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
948
949 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
950 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
951 Update copyright.
952
953 2004-10-14 Matt Austern <austern@apple.com>
954
955 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
956 pointer_set_t* now.
957
958 2004-10-13 Tom Tromey <tromey@redhat.com>
959
960 PR java/15578:
961 * lang.opt (--extdirs): Document.
962 * jvspec.c (lang_specific_driver): Recognize -encoding and
963 -extdirs.
964
965 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
966
967 * parse.y (issue_warning_error_from_context): Use va_list *
968 instead of va_list parameter.
969 (parse_error_context): Update call.
970 (parse_warning_context): Likewise.
971
972 2004-10-05 Zack Weinberg <zack@codesourcery.com>
973
974 * parse.y, parse-scan.y: Add list of diagnostic messages to
975 insulate translation template from version of yacc/bison used
976 to compile the grammar.
977
978 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
979
980 Prepare for %q, %< and %> in diagnostic message strings.
981 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
982 Name second parameter 'msgid'.
983 * parse.y: Additionally include pretty-print.h and diagnostic.h.
984 (issue_warning_error_from_context): Use pretty-printer functions
985 instead of vsprintf for constructing formatted messages. Rename
986 parameter 'msg' to 'msgid'.
987 (parse_error_context): Rename parameter 'msg' to 'msgid'.
988 (parse_warning_context): Likewise.
989
990 2004-10-05 Andrew Haley <aph@redhat.com>
991
992 PR java/17779
993 * jcf-parse.c (parse_zip_file_entries): If a class has a
994 superclass and a TYPE_SIZE of zero, lay it out.
995
996 2004-09-30 Andrew Haley <aph@redhat.com>
997
998 PR java/17733
999 * jcf-parse.c (compute_class_name): Rewrite.
1000
1001 2004-10-01 Jan Hubicka <jh@suse.cz>
1002
1003 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1004
1005 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1006
1007 * lex.c: Fix a comment typo.
1008
1009 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1010
1011 * java-tree.h: Fix a comment typo.
1012
1013 2004-09-30 Per Bothner <per@bothner.com>
1014
1015 Simplify lexer. Implement --enable-mapped-location support.
1016 * jcf-parse.c (parse_class_file): Use linemap_line_start.
1017 (parse_source_file_1): Pass filename as extra parameter, so we can call
1018 linemap_add and set input_location here, rather than in both callers.
1019 (read_class): Pass copied filename to parse_source_file_1.
1020 Don't initialize wfl_operator - only needed for source compilation.
1021 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
1022 * lex.h: Remove a bunch of debugging macros.
1023 * lex.h (struct_java_line, struct java_error): Remove types.
1024 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
1025 (struct java_lc_s): Remove prev_col field.
1026 (struct java_lexer): New fields next_unicode, next_columns, and
1027 avail_unicode. New position field, and maybe token_start field.
1028 Don't need hit_eof field - use next_unicode == -1 instead.
1029 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
1030 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
1031 * parse.h: Various changes for USE_MAPPED_LOCATION.
1032 (EXPR_WFL_EMIT_LINE_NOTE): XXX
1033 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1034 (struct parser_ctxt): New file_start_location field.
1035 Remove p_line, c_line fields since we no longer save lines.
1036 Remove elc, lineno, and current_jcf fields - no longer used.
1037 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
1038 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1039 source_location and is probably not needed anymore anyway.
1040 Use new expr_add_Location function.
1041 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
1042 (java_pop_parser_context): Minor cleanup.
1043 (java_parser_context_save_global, java_parser_context_restore_global,
1044 java_pop_parser_context): Save/restore input_location as a unit.
1045 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
1046 a source_location instead of a wfl context node.
1047 (check_class_interface_creation): input_filename is not addressable.
1048 (create_artificial_method): Calling java_parser_context_save_global
1049 and java_parser_context_restore_global is overkill. Instead,
1050 temporarily set input_location from class decl.
1051 (java_layout_seen_class_methods): Set input_location from method decl.
1052 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1053 (finish_loop_body): Likewise.
1054 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
1055 (java_sprint_unicode): Take a character, not index in line.
1056 (java_sneak_uncode): Replaced by java_peek_unicode.
1057 (java_unget_unicode): No longer used.
1058 (java_allocate_new_line. java_store_unicode): Removed, since we
1059 no longer remember "lines".
1060 (java_new_lexer): Update for new data structures.
1061 (java_read_char): Move unget_value checking to java_read_unicode.
1062 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1063 efficient functions that are used directly when lexing.
1064 (java_read_unicode_collapsing_terminators): No longer needed.
1065 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1066 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1067 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
1068 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
1069 combine switch branches, and test for common token kinds earlier.
1070 (java_lex_error): Rewrite.
1071 * jv-scan.c (expand_location): New function, copied from tree.c.
1072 (main): Set ctxp->filename instead of setting input_filename directly.
1073
1074 2004-09-30 Per Bothner <per@bothner.com>
1075
1076 More cleanup for --enable-mapped-location.
1077 * class.c (push_class): If USE_MAPPED_LOCATION don't set
1078 input_location here. Instead do it in give_name_to_class.
1079 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1080 * expr.c (expand_byte_code): Call linemap_line_start.
1081 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
1082 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
1083 (expr_add_location): New function, if USE_MAPPED_LOCATION.
1084 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
1085 to USE_MAPPED_LOCATION case.
1086
1087 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
1088 * jcf-parse.c (java_parse_file): Don't set input_filename.
1089 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1090 Create a list of TRANSLATION_UNIT_DECL.
1091 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
1092 reason is so we can set a DECL_SOURCE_LOCATION for each file.
1093 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1094 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1095 (file_start_location): New static.
1096 (set_source_filename): Avoid extra access to input_filename macro.
1097 Concatenate new name with class's package prefix.
1098 (set_source_filename, give_name_to_class): Update.
1099 (give_name_to_class): Set class's "line 0" input_location here.
1100 (parse_class_file): Set input_location as a unit.
1101
1102 * jcf-parse.c (load_class): Sanity test if missing inner class file.
1103
1104 2004-09-29 Per Bothner <per@bothner.com>
1105
1106 * java-tree.h: Redefine some macros and add some declaration
1107 to handle the USE_MAPPED_LOCATION case.
1108 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
1109 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
1110 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1111 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1112
1113 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1114 * decl.c (finish_method, java_add_stmt): Likewise.
1115 * java-gimplify.c (java-gimplify.c): Likewise.
1116 * jcf-write.c (generate_bytecode_insns): Likewise.
1117 * lang.c (java_post_options): Likewise - call linemap_add.
1118
1119 2004-09-29 Andrew Haley <aph@redhat.com>
1120
1121 PR java/17007
1122 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1123 result of TRUNC_MOD_EXPR.
1124 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1125 * decl.c (java_init_decl_processing): Mark
1126 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1127
1128 2004-09-28 Tom Tromey <tromey@redhat.com>
1129
1130 PR java/15710:
1131 * class.c (add_miranda_methods): Load superinterface if not
1132 already loaded.
1133
1134 2004-09-28 Andrew Haley <aph@redhat.com>
1135
1136 PR java/17586
1137 * jcf-parse.c (load_class): Don't try to read a class that we've
1138 already read.
1139
1140 2004-09-28 Andrew Haley <aph@redhat.com>
1141
1142 * jcf-parse.c (load_class): Back out previous broken patch.
1143
1144 2004-09-28 Andrew Haley <aph@redhat.com>
1145
1146 PR java/17586
1147 * jcf-parse.c (load_class): Don't try to read a class that we've
1148 already read.
1149 Check that we really did read the right class.
1150
1151 2004-09-25 Tom Tromey <tromey@redhat.com>
1152
1153 PR java/17500:
1154 * parse.y (create_artificial_method): Use add_method_1.
1155
1156 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
1157
1158 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1159 comment typos.
1160 * gcj.texi: Fix typos.
1161
1162 2004-09-24 Tom Tromey <tromey@redhat.com>
1163
1164 PR java/15656:
1165 * parse.y (class_instance_creation_expression): Set `$$' to NULL
1166 in error parts of rule.
1167 (unary_expression): Don't call error_if_numeric_overflow when $1
1168 is NULL.
1169
1170 2004-09-24 Tom Tromey <tromey@redhat.com>
1171
1172 PR java/16789:
1173 * parse.y (resolve_qualified_expression_name): Set
1174 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1175 * expr.c (force_evaluation_order): Check for empty argument list
1176 after stripping COMPOUND_EXPR.
1177
1178 2004-09-23 Andrew Haley <aph@redhat.com>
1179
1180 PR java/16927:
1181 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1182 COND_EXPRs.
1183
1184 2004-09-23 Tom Tromey <tromey@redhat.com>
1185
1186 PR java/17329:
1187 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1188 where operand is null.
1189
1190 2004-09-23 Tom Tromey <tromey@redhat.com>
1191
1192 PR java/17380:
1193 * parse.y (not_accessible_p): Allow access to protected members
1194 even when class is not static.
1195
1196 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1197
1198 * Make-lang.in: Revert the gcc-none.o change.
1199
1200 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1201
1202 * parse.y (patch_anonymous_class): VEC_space returns true if there
1203 is space.
1204
1205 2004-09-21 Matt Austern <austern@apple.com>
1206
1207 Fix bootstrap.
1208 * gjavah.c (free_method_name_list): Fix function definition so
1209 it's a proper C prototype.
1210
1211 2004-09-21 Tom Tromey <tromey@redhat.com>
1212
1213 PR java/17575:
1214 * gjavah.c (free_method_name_list): New method.
1215 (main): Call it.
1216
1217 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1218 Zack Weinberg <zack@codesourcery.com>
1219
1220 * java-tree.def: Use tree_code_class enumeration constants
1221 instead of code letters.
1222 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1223 new tree-class enumeration constants.
1224
1225 2004-09-13 Tom Tromey <tromey@redhat.com>
1226
1227 PR java/17216:
1228 * class.c (layout_class_method): Put synthetic methods into the
1229 vtable.
1230
1231 2004-09-11 Andrew Pinski <apinski@apple.com>
1232
1233 * Make-lang.in (java/ggc-none.c): Change dependency
1234 for ggc.h into $(GGC_H).
1235
1236 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1237
1238 * Make-lang.in (java/win32-host.o): Add dependency on
1239 coretypes.h.
1240 * win32-host.c: Add includes for coretypes.h, jcf.h
1241
1242 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1243
1244 * Make-lang.in (GCJH_OBJS): Change dependency from
1245 ggc-none.o to java/ggc-none.o
1246 (JCFDUMP_OBJS): Likewise.
1247 (java/ggc-none.o): New target.
1248
1249 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1250
1251 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
1252 * class.c (build_utf8_ref, build_static_field_ref,
1253 make_field_value, make_method_value, get_dispatch_table,
1254 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1255 * constants.c (get_tag_node, build_ref_from_constant_pool,
1256 build_constants_constructor): Likewise.
1257 * decl.c (java_init_decl_processing): Likewise.
1258 * expr.c (build_java_array_length_access, build_newarray,
1259 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1260 build_java_binop, build_field_ref, expand_java_add_case,
1261 expand_java_call, build_known_method_ref, build_invokevirtual,
1262 build_invokeinterface, build_jni_stub): Likewise.
1263 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1264 * jcf-parse.c (get_constant): Likewise.
1265 * lex.c (do_java_lex): Likewise.
1266 * parse.y (patch_binop, patch_unaryop, patch_cast,
1267 build_newarray_node, patch_newarray): Likewise.
1268 * resource.c (compile_resource_data): Likewise.
1269 * typeck.c (build_prim_array_type): Likewise.
1270
1271 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1272
1273 * decl.c (java_init_decl_processing): Adjust
1274 initialize_sizetypes call.
1275
1276 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1277
1278 * jv-scan.c (fancy_abort): Add.
1279
1280 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1281
1282 * expr.c (build_java_arrayaccess): Use convert to change
1283 len's type.
1284
1285 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
1286
1287 * class.c (make_local_function_alias): Allocate extra space for 'L'
1288 in name buffer. Reported by Thomas Neumann.
1289
1290 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1291
1292 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1293 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
1294 * lex.c (do_java_lex): Adjust.
1295 (error_if_numeric_overflow): Likewise.
1296
1297 2004-08-18 Andrew Pinski <apinski@apple.com>
1298
1299 * class.c (make_local_function_alias): Only make a new decl if we
1300 support alias attribute on all decls.
1301
1302 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
1303
1304 * class.c (make_local_function_alias): New function. Create local
1305 alias for public method DECL.
1306 (make_method_value): Use make_local_function_alias.
1307 * parse.y (craft_constructor): Don't special-case anonymous classes.
1308 Always set ctor_name to init_identifier_node.
1309 (lookup_method_invoke): Call layout_class_method when creating
1310 anonymous class constructor.
1311
1312 2004-08-18 Richard Henderson <rth@redhat.com>
1313
1314 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1315 default case. Treat '<' similarly. Update for
1316 is_gimple_formal_tmp_var name change.
1317
1318 2004-08-17 Andrew Haley <aph@redhat.com>
1319
1320 * lang.c (lang_printable_name): Obey verbose flag.
1321 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1322 lang_printable_name().
1323 (verify_constructor_circularity, get_printable_method_name,
1324 check_abstract_method_definitions, java_check_regular_methods,
1325 java_check_abstract_methods, check_inner_class_access,
1326 fix_constructors, patch_method_invocation, patch_return):
1327 Likewise.
1328 * expr.c (pop_type_0): Likewise.
1329
1330 * java-tree.h (lang_printable_name_wls): Delete.
1331
1332 2004-08-16 Tom Tromey <tromey@redhat.com>
1333
1334 PR java/8473:
1335 * parse.y (primary): Changed for initialized and uninitialized
1336 array creations.
1337 (array_access): Handle array_creation_initialized.
1338 (array_creation_expression): Split into
1339 array_creation_initialized and array_creation_uninitialized.
1340
1341 2004-08-16 Andrew Haley <aph@redhat.com>
1342
1343 * jcf-write.c (find_constant_index): Canonicalize NaNs when
1344 generating bytecode.
1345
1346 2004-08-16 Elliot Lee <sopwith@redhat.com>
1347
1348 PR java/9677
1349 * jcf-parse.c (java_parse_file): Handle filenames with embedded
1350 spaces, and quoted filelists.
1351
1352 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1353
1354 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1355 * class.c (build_utf8_ref, build_static_field_ref,
1356 make_field_value, make_method_value, get_dispatch_table,
1357 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1358 * constants.c (get_tag_node, build_ref_from_constant_pool,
1359 build_constants_constructor): Likewise.
1360 * decl.c (java_init_decl_processing): Likewise.
1361 * expr.c (build_java_array_length_access, build_newarray,
1362 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1363 build_java_binop, build_field_ref, expand_java_add_case,
1364 expand_java_call, build_known_method_ref, build_invokevirtual,
1365 build_invokeinterface, build_jni_stub): Likewise.
1366 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1367 * jcf-parse.c (get_constant): Likewise.
1368 * lex.c (do_java_lex): Likewise.
1369 * parse.y (patch_binop, patch_unaryop, patch_cast,
1370 build_null_of_type, patch_newarray): Likewise.
1371 * resource.c (compile_resource_data): Likewise.
1372 * typeck.c (build_prim_array_type): Likewise.
1373
1374 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
1375
1376 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1377 Don't create BLOCK here or call java_gimplify_block.
1378
1379 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
1380
1381 * java-tree.h (flag_deprecated): Removed.
1382 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1383 * parse.y (check_deprecation): Check warn_deprecated instead of
1384 flag_deprecated.
1385
1386 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
1387
1388 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1389 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1390 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1391 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1392 flag_force_classes_archive_check, flag_optimize_sci,
1393 flag_indirect_dispatch): Remove explicit declarations.
1394 * lang.opt: Add implicit declare/define/assign. Remove obsolete
1395 final comment.
1396
1397 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
1398
1399 PR bootstrap/14893
1400 * Make-lang.in (java.install-man): Install from either build
1401 tree or source tree, whichever has the file first.
1402
1403 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1404
1405 * jcf-parse.c (get_constant): Adjust force_fit_type call.
1406 * lex.h (SET_LVAL_NODE_TYPE): Remove.
1407 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1408 (do_java_lex): Likewise. Adjust force_fit_type call.
1409
1410 2004-08-04 Roger Sayle <roger@eyesopen.com>
1411 Andrew Haley <aph@redhat.com>
1412
1413 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1414 checking trees as they're being built.
1415 (convert): Call convert_ieee_real_to_integer if we're
1416 converting a constant, even if we're writing a class file.
1417
1418 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
1419
1420 PR java/16701
1421 * parse.y (fold_constant_for_init): Call resolve_field_access with
1422 correct current_class context.
1423
1424 2004-08-01 Roger Sayle <roger@eyesopen.com>
1425
1426 * decl.c (update_aliases, initialize_local_variable): Replace calls
1427 to build with calls to buildN.
1428 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1429 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1430 * parse.h (BUILD_THROW): Likewise.
1431 * parse.y (switch_expression, synchronized_statement,
1432 catch_clause_parameter, array_creation_expression,
1433 conditional_expression, make_qualified_name,
1434 resolve_qualified_expression_name, patch_method_invocation,
1435 patch_invoke, build_method_invocation, build_new_invocation,
1436 build_assignment, patch_assignment, build_binop, patch_binop,
1437 build_string_concatenation, build_incdec, patch_unaryop,
1438 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1439 patch_return, build_if_else_statement, build_labeled_block,
1440 build_new_loop, build_loop_body, build_bc_statement,
1441 build_assertion, encapsulate_with_try_catch, build_try_statement,
1442 build_try_finally_statement, patch_synchronized_statement,
1443 emit_test_initialization): Likewise, replace build with buildN.
1444
1445 2004-07-28 Eric Christopher <echristo@redhat.com>
1446
1447 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1448 (java_unsafe_for_reeval): Ditto.
1449
1450 2004-07-26 <hp@bitrange.com>
1451
1452 * parse.y (build_super_invocation): Adjust declaration order to
1453 avoid declaration after statement.
1454
1455 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1456
1457 * decl.c: Rename all identifiers named `class' to `cl'.
1458
1459 2004-07-25 Richard Henderson <rth@redhat.com>
1460
1461 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1462
1463 2004-07-23 Mike Stump <mrs@apple.com>
1464
1465 * boehm.c (set_bit): Improve type safety wrt unsignedness.
1466 * gjavah.c (throwable_p, decode_signature_piece,
1467 print_full_cxx_name, print_include, add_namelet, add_class_decl,
1468 process_file): Likewise.
1469 * jcf-dump.c (main): Likewise.
1470 * jcf-io.c (read_zip_member): Likewise.
1471 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1472 give_name_to_class, get_class_constant): Likewise.
1473 * jcf-write.c (find_constant_wide, push_long_const,
1474 generate_classfile): Likewise.
1475 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1476 * parse.y (read_import_dir): Likewise.
1477 * typeck.c (parse_signature_type): Likewise.
1478 * verify.c (verify_jvm_instructions): Likewise.
1479 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1480
1481 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1482
1483 * Make-lang.in: Replace rmic and rmiregistry references with
1484 grmic and grmiregistry.
1485 * gcj.texi: Likewise.
1486
1487 2004-07-20 Andrew Haley <aph@redhat.com>
1488
1489 PR java/16431.
1490 * verify.c (verify_jvm_instructions): Comment change only.
1491
1492 * typeck.c (build_java_array_type): Add size field to array name.
1493
1494 * java-tree.h (LOCAL_SLOT_P): New.
1495 (update_aliases): Add PC argument.
1496 (pushdecl_function_level): New function.
1497
1498 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1499 MODIFY_EXPR, and SAVE_EXPR.
1500 (java_gimplify_modify_expr): New function.
1501
1502 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1503 (expand_iinc): Pass PC to update_aliases().
1504 (STORE_INTERNAL): Likewise.
1505 (process_jvm_instruction): Likewise.
1506
1507 * decl.c (base_decl_map): New variable.
1508 (uniq): New variable.
1509 (update_aliases): Rewrite with more thorough checking.
1510 (debug_variable_p): New function.
1511 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1512 (check_local_named_variable): Delete whole function.
1513 (initialize_local_variable): New function.
1514 (check_local_unnamed_variable): Add checks and comments.
1515 (find_local_variable): Rewrite.
1516 (java_replace_reference): New function.
1517 (function_binding_level): New variable.
1518 (pushdecl_function_level): New function.
1519 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1520 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1521 (start_java_method): Reset uniq. Create base_decl_map. Set
1522 function_binding_level.
1523 (end_java_method): Null unused fields to save memory.
1524
1525 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1526
1527 * class.c (add_interface_do): Remove.
1528 (set_super_info, interface_of_p, maybe_add_interface,
1529 add_interface, make_class_data, layout_class,
1530 add_miranda_methods): Adjust BINFO accessors and addition.
1531 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1532 accessors.
1533 * jcf-write.c (generate_classfile): Likewise.
1534 * parse.y (patch_anonymous_class, check_inner_circular_reference,
1535 check_circular_reference, java_complete_class,
1536 check_abstract_method_definitions,
1537 java_check_abstract_method_definitions,
1538 check_interface_throws_clauses, java_check_abstract_methods,
1539 lookup_java_interface_method2,
1540 find_applicable_accessible_methods_list): Adjust BINFO accessors
1541 and addition.
1542 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1543
1544 2004-07-18 Roger Sayle <roger@eyesopen.com>
1545
1546 * builtins.c (max_builtin, min_builtin,
1547 java_build_function_call_expr): Replace calls to build with buildN.
1548 * class.c (build_class_ref, build_static_field_ref,
1549 get_dispatch_table, make_class_data, layout_class_method): Likewise.
1550 * constants.c (build_ref_from_constant_pool): Likewise.
1551 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1552 add_stmt_to_compound): Likewise.
1553 * except.c (build_exception_object_ref, expand_end_java_handler):
1554 Likewise.
1555 * java-gimplify.c (java_gimplify_case_expr,
1556 java_gimplify_default_expr, java_gimplify_block,
1557 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1558 * jcf-write.c (generate_bytecode_insns): Likewise.
1559 * typeck.c (convert_ieee_real_to_integer): Likewise.
1560
1561 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1562
1563 * java-tree.h (builtin_function): Declare.
1564
1565 2004-07-16 Steven Bosscher <stevenb@suse.de>
1566
1567 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1568 abuse restore_line_number_status.
1569
1570 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
1571
1572 g++/15861
1573 * jcf-parse.c (java_emit_static_constructor): Specify default
1574 priority.
1575
1576 2004-07-13 Per Bothner <per@bothner.com>
1577
1578 * java-tree.h (all_class_filename): Remove useless macro.
1579 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
1580 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
1581 * parse.y (java_parser_context_restore_global): Replace
1582 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1583 * jcf-parse.c (read_class, java_parse_file): Likewise.
1584
1585 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
1586
1587 PR java/16474
1588 gjavah.c (print_field_info): Emit constant only if field is static.
1589
1590 2004-07-11 Roger Sayle <roger@eyesopen.com>
1591
1592 * expr.c (java_truthvalue_conversion, flush_quick_stack,
1593 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1594 build_java_ret, build_java_throw_out_of_bounds_exception,
1595 build_java_array_length_access, java_check_reference,
1596 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1597 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1598 expand_java_arrayload, build_java_monitor, expand_java_return,
1599 expand_load_internal, expand_java_NEW, build_get_class,
1600 build_instanceof, expand_java_CHECKCAST, expand_iinc,
1601 build_java_soft_divmod, build_java_binop, build_field_ref,
1602 expand_compare, expand_java_goto, expand_java_switch,
1603 expand_java_add_case, build_class_init, build_known_method_ref,
1604 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1605 expand_invoke, build_jni_stub, expand_java_field_op,
1606 java_expand_expr, expand_byte_code, STORE_INTERNAL,
1607 force_evaluation_order, emit_init_test_initialization): Convert
1608 calls to "build" into calls to the prefered "buildN" functions.
1609
1610 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1611
1612 * java-tree.h (set_block): Remove.
1613 * lang.c (java_clear_binding_stack): New.
1614 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1615 * decl.c (struct binding_level): Remove this_block.
1616 (clear_binding_level): Likewise.
1617 (poplevel): Don't handle this_block.
1618 (set_block): Remove.
1619
1620 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
1621
1622 * class.c (common_enclosing_context_p): Remove statement with no
1623 side-effects.
1624
1625 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1626
1627 PR java/8618
1628 * parse.y (create_anonymous_class): Remove 'location' argument. Use
1629 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
1630 (craft_constructor): Inherit access flags for implicit constructor
1631 from the enclosing class.
1632 (create_class): Fix comment typo.
1633 (resolve_qualified_expression_name): Pass type of qualifier to
1634 not_accessible_p, not the type in which target field was found.
1635 (not_accessible_p): Handle inner classes. Expand protected
1636 qualifier-subtype check to enclosing instances, but don't apply this
1637 check to static members. Allow protected access to inner classes
1638 of a subtype. Allow private access within common enclosing context.
1639 (build_super_invocation): Get WFL line number info from current
1640 class decl.
1641 (build_incomplete_class_ref): Update for new create_anonymous_class
1642 signature.
1643 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
1644 common_enclosing_instance_p.
1645 * class.c (common_enclosing_context_p): New. Determine if types
1646 share a common enclosing context, even across static contexts.
1647 (common_enclosing_instance_p): Renamed from
1648 common_enclosing_context_p. Determines if types share a common
1649 non-static enclosing instance.
1650 * java-tree.h (common_enclosing_instance_p): Declare.
1651 * jcf-write.c (get_method_access_flags): New. Surpress private flag
1652 for inner class constructors.
1653 (generate_classfile): Use get_method_access_flags.
1654
1655 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1656
1657 * class.c (interface_of_p): Check for null TYPE_BINFO.
1658
1659 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
1660
1661 * class.c (make_class): Do not create binfo here.
1662 (set_super_info): Create it here.
1663 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
1664
1665 2004-07-08 Richard Henderson <rth@redhat.com>
1666
1667 * expr.c (case_identity, get_primitive_array_vtable,
1668 java_expand_expr, emit_init_test_initialization): Remove.
1669 * java-tree.h (java_expand_expr): Remove.
1670 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
1671
1672 2004-07-07 Per Bothner <per@bothner.com>
1673
1674 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
1675 get internal error due to mismatched types.
1676
1677 * gcj.texi (Invoking gij): Document new -verbose:class flag.
1678
1679 * gcj.texi (Linking): New node. Document -lgij usage.
1680
1681 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
1682
1683 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
1684 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
1685 * java/class.c (set_super_info, class_depth, interface_of_p,
1686 maybe_add_interface, add_interface, make_class_data,
1687 layout_class, add_miranda_methods): Adjust BINFO macros.
1688 * expr.c (can_widen_reference_to, lookup_field): Likewise.
1689 * jcf-write.c (generate_classfile): Likewise.
1690 * parse.y (patch_anonymous_class,
1691 check_inner_circular_reference, check_circular_reference,
1692 java_complete_class, check_abstract_method_definitions,
1693 java_check_abstract_method_definitions,
1694 check_interface_throws_clauses, java_check_abstract_methods,
1695 lookup_java_interface_method2,
1696 find_applicable_accessible_methods_list): Likewise.
1697 * typeck.c (find_method_in_interface): Likewise.
1698 * verify.c (merge_types): Likewise.
1699
1700 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
1701
1702 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
1703 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
1704
1705 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
1706
1707 * class.c (make_class): Use make_tree_binfo.
1708 (set_super_info, add_interface_do): Likewise.
1709 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
1710
1711 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
1712
1713 * verify.c: Correct array element access formatting thinko.
1714
1715 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
1716
1717 * verify.c: Insert a short blurb at the start referring to the JVMS.
1718 (merge_type_state): Remove redundant nested if statement.
1719 (verify_jvm_instructions): Ensure current_subr is initialised to
1720 NULL_TREE.
1721 Minor formatting fixes all over the place.
1722
1723 2004-07-02 Richard Henderson <rth@redhat.com>
1724
1725 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
1726
1727 2004-07-01 Richard Henderson <rth@redhat.com>
1728
1729 * class.c (registerClass_libfunc): Remove.
1730 (init_class_processing): Don't set it.
1731 (emit_register_classes): Take list_p parameter. Fill it in
1732 with _Jv_RegisterClass calls.
1733 * decl.c (java_init_decl_processing): Don't call
1734 init_resource_processing.
1735 * jcf-parse.c (java_emit_static_constructor): New.
1736 (java_parse_file): Call it.
1737 * resource.c (registerResource_libfunc): Remove.
1738 (init_resource_processing): Remove.
1739 (write_resource_constructor): Take list_p parameter. Fill it in
1740 with _Jv_RegisterResource calls.
1741 * java-tree.h: Update prototypes.
1742
1743 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
1744
1745 PR java/1262
1746 * class.c (layout_class_method): Do not override package-private
1747 method if its in a different package.
1748 (split_qualified_name): Move here from parse.y. Rename from
1749 breakdown_qualified. Add comment.
1750 (in_same_package): Move here from parse.y. Add comment.
1751 * java-tree.h (break_down_qualified, in_same_package): Declare.
1752 (in_same_package): Likewise.
1753 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
1754 Callers updated.
1755
1756 2004-06-29 Andrew Haley <aph@redhat.com>
1757
1758 * except.c (expand_start_java_handler): Push a new binding level.
1759 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
1760 register_exception_range() to register where we'll do it.
1761 (expand_end_java_handler): Remove old bogus code. Replace with
1762 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1763 the top of the expression we're curently building.
1764 (maybe_end_try): Delete.
1765 * decl.c (binding_level.exception_range): New field.
1766 (clear_binding_level): Add field exception_range. Reformat.
1767 (poplevel): Call expand_end_java_handler().
1768 (poplevel): Call java_add_stmt only if functionbody is false.
1769 (maybe_poplevels): Don't call maybe_end_try() from here.
1770 (end_java_method): Clear no longer used trees in function decl.
1771 (register_exception_range): New function.
1772 * java-tree.h (register_exception_range, struct eh_range): Declare.
1773
1774 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
1775
1776 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
1777
1778 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
1779
1780 Formatting fixes.
1781 * expr.c (class_has_finalize_method): Fix method name indentation.
1782 (expand_java_call): Remove K&R style parameter declaration.
1783 (expand_invoke): Fix statement indentation.
1784 (expand_java_field_op): Likewise.
1785 * parse-scan.y: Fix typo.
1786 (reset_report): Fix method name indentation.
1787 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
1788 line. Fix typos.
1789 * verify.c (verify_jvm_instructions): Document parameters, insert
1790 page break.
1791 * lang.c (lang_init_source): Fix method name indentation.
1792 * class.c (common_enclosing_context_p): Likewise.
1793 (emit_symbol_table): Fix parameter list indentation.
1794 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
1795 parameter declaration.
1796 * constants.c: Fix copyright notice indentation.
1797 * typeck.c (find_method_in_superclasses): Fix parameter list
1798 indentation.
1799 (find_method_in_interfaces): Likewise.
1800 * zextract.c (makelong): Fix method name indentation.
1801
1802 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1803
1804 PR java/15715.
1805 * parse.y (create_interface): Set correct access modifiers for
1806 interfaces.
1807 * jcf-write.c (get_classfile_modifiers): New function.
1808 (generate_classfile): Use get_classfile_modifiers, not
1809 get_access_flags.
1810
1811 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1812
1813 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
1814 dependency to current parser context, not NULL_TREE, for top-level
1815 classes.
1816 (jdep_resolve_class): Enable member access check for all inner
1817 class dependencies.
1818
1819 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1820
1821 * parse.y (qualify_and_find): Pass type decl, not identifier, to
1822 load_class.
1823
1824 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1825
1826 PR java/15734
1827 * expr.c (expand_java_field_op): Ensure that target class for static
1828 field access has been loaded.
1829
1830 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
1831 Ranjit Mathew <rmathew@hotmail.com>
1832
1833 PR java/1207, java/16178
1834 * jcf-parse.c (load_class): Return immediately if passed a type decl
1835 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
1836 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
1837 before calling load_class.
1838 (qualify_and_find): Likewise.
1839 (find_in_imports_on_demand): Likewise.
1840 (find_applicable_accessible_methods_list): Likewise.
1841
1842 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
1843
1844 * parse.y (java_layout_seen_class_methods): Don't call load_class
1845 on class defined by source parser.
1846
1847 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
1848
1849 * parse.y (set_nested_class_simple_name_value): Removed.
1850 (java_complete_expand_class): Remove calls to
1851 set_nested_class_simple_name_value.
1852
1853 2004-06-22 Andrew Haley <aph@redhat.com>
1854 Ranjit Mathew <rmathew@hotmail.com>
1855
1856 Fixes PR java/16113.
1857 * decl.c (force_poplevels): Remove call to expand_end_bindings.
1858
1859 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
1860
1861 * parse.y (create_class): Correct diagnostic message about
1862 java.lang.Object extending anything else.
1863
1864 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1865
1866 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
1867 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
1868 * constants.c (build_ref_from_constant_pool): Likewise.
1869 * expr.c (build_java_array_length_access): Likewise.
1870 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
1871 (invoke_build_dtable, build_invokevirtual): Likewise.
1872 (build_invokeinterface, java_expand_expr): Likewise.
1873 (emit_init_test_initialization): Likewise.
1874 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1875 * parse.y (make_qualifed_name, build_array_ref): Likewise.
1876
1877 2004-06-21 Andrew Haley <aph@redhat.com>
1878
1879 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
1880 block.
1881
1882 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
1883
1884 * jcf.h (struct JCF): Change java_source, right_zip and finished
1885 to unsigned int.
1886 * lex.h (struct java_lexer): Change hit_eof, read_anything,
1887 byte_swap and use_fallback to unsigned int.
1888 * parse.h (struct _jdep): Change flag0 to unsigned int.
1889
1890 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
1891
1892 Fixes PR java/13948
1893 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
1894 before trying to lay out its methods.
1895 * jcf-parse.c (read_class): Track parsed files using canonical paths
1896 obtained via lrealpath from libiberty.
1897 (java_parse_file): Likewise.
1898 (parse_source_file_1): Rename formal parameter to reflect its
1899 modified purpose. Minor formatting fix.
1900
1901 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1902
1903 * class.c (emit_register_classes): Make the function uninlinable,
1904 do not set current_function_cannot_inline.
1905 * resource.c (write_resource_constructor): Do not reset
1906 flag_inline_functions around rest_of_compilation.
1907
1908 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
1909
1910 PR java/15769
1911 * expr.c (java_truthvalue_conversion): Handle
1912 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
1913 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
1914 i.e. return the expression.
1915
1916 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
1917
1918 * gjavah.c: Include version.h
1919
1920 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
1921
1922 * jcf-write.c (generate_bytecode_conditional): Correct handling
1923 of unordered conditionals. Add comment.
1924
1925 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
1926 Per Bothner <per@bothner.com>
1927
1928 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
1929 local variable was initialised upon declaration.
1930 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
1931 variable was final and initialised upon declaration.
1932 * check-init.c (check_final_reassigned): Give error only if a blank
1933 final is not definitely unassigned or if an initialised final is
1934 reassigned.
1935 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
1936 assignment expressions. Remove case MODIFY_EXPR, label do_default.
1937 (check_init): Perform initialised-variable-removing-optimisation
1938 only on non-final local variables.
1939
1940 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
1941
1942 * jcf-write.c (generate_bytecode_conditional): Handle binops
1943 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
1944 and LTGT_EXPR.
1945 (generate_bytecode_insns): Likewise.
1946
1947 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
1948
1949 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
1950 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
1951
1952 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
1953
1954 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
1955 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
1956
1957 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
1958
1959 * decl.c (struct binding_level): Add GTY marker. Compile
1960 binding_depth unconditionally.
1961 (current_binding_level, free_binding_level, global_binding_level):
1962 Likewise.
1963 (clear_binding_level): Unconditionally set binding_depth.
1964 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
1965
1966 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
1967
1968 * lex.c (java_new_lexer): Set 'encoding'.
1969 (java_read_char): Improve error message for unrecognized characters.
1970 * lex.h (struct java_lexer): New field 'encoding'.
1971
1972 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1973
1974 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
1975
1976 2004-05-21 Mark Wielaard <mark@klomp.org>
1977
1978 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
1979 extern.
1980
1981 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
1982
1983 * typeck.c: Remove non-printable character 160.
1984
1985 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
1986
1987 * check-init.c: Correct minor typos.
1988
1989 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1990
1991 * Make-lang.in, expr.c, java-gimplify.c: Rename
1992 tree-simple.[ch] to tree-gimple.[ch].
1993
1994 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
1995
1996 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
1997
1998 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1999
2000 Merge from tree-ssa-20020619-branch. See
2001 ChangeLog.tree-ssa for details.
2002
2003 * Make-lang.in, builtins.c, check-init.c, class.c,
2004 constants.c, decl.c, except.c, expr.c, java-except.h,
2005 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2006 lang.c, lang.opt, parse.y, resource.c: Merged.
2007 * java-gimplify.c: New file.
2008
2009 2004-05-10 Andrew Haley <aph@redhat.com>
2010
2011 * parse.y (create_class): Set TYPE_VFIELD.
2012 * decl.c (java_init_decl_processing): Likewise.
2013
2014 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2015 * class.c (make_method_value): Replace DECL_VINDEX with call to
2016 get_method_index().
2017 (get_dispatch_vector): Likewise.
2018 (layout_class_method): Likewise.
2019 Replace set of DECL_VINDEX with call to set_method_index().
2020 (set_method_index): New function.
2021 (get_method_index): New function.
2022 * java-tree.h (set_method_index): New function decl.
2023 (get_method_index): New function decl.
2024
2025 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
2026
2027 * parse.y (check_pkg_class_access): Add new argument
2028 and use it when cl is NULL to call lookup_cl on it.
2029 (parser_check_super_interface): Do not call lookup_cl.
2030 Pass this_decl to check_pkg_class_access and NULL
2031 instead of lookup_cl.
2032 (parser_check_super): Update for change in
2033 check_pkg_class_access.
2034 (do_resolve_class): Likewise.
2035 (process_imports): Likewise.
2036 (find_in_imports_on_demand): Likewise.
2037 (resolve_qualified_expression_name): Likewise.
2038
2039 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
2040
2041 Fixes PR java/9685, PR java/15073
2042 * parse.y (accessibility_string): New method.
2043 (not_accessible_field_error): Use accessibility_string()
2044 instead of java_accstring_lookup().
2045 (resolve_qualified_expression_name): Check with
2046 check_pkg_class_access() before allowing access using
2047 qualified names.
2048 Fix comment typo.
2049 Use check_pkg_class_access() instead of not_accessible_p()
2050 for unqualified types.
2051 (not_accessible_p): Use DECL_CONTEXT (member) instead of
2052 REFERENCE for package-private access checking.
2053 (patch_method_invocation): Use accessibility_string() instead
2054 of java_accstring_lookup().
2055
2056 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
2057
2058 Fixes PR java/15133
2059 * gjavah.c (struct method_name): Add member is_native.
2060 (overloaded_jni_method_exists_p): Match candidate method only if
2061 it is native.
2062 (print_method_info): Initialise is_native flag from the method's
2063 access flags.
2064
2065 2004-04-30 Roger Sayle <roger@eyesopen.com>
2066
2067 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2068 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2069
2070 2004-04-22 Roger Sayle <roger@eyesopen.com>
2071
2072 * resource.c (write_resource_constructor): Guard call to possibly
2073 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2074
2075 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
2076
2077 * class.c (make_class_data): Add new field aux_info.
2078 * decl.c (java_init_decl_processing): Push type and decl for
2079 `aux_info'.
2080
2081 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2082
2083 * expr.c (expand_java_NEW): Don't use size argument for
2084 _Jv_AllocObject calls.
2085 * parse.y (patch_invoke): Likewise.
2086
2087 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2088
2089 * expr.c (build_invokeinterface): Remove unused variables to
2090 fix warnings.
2091
2092 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2093
2094 * class.c (get_interface_method_index): New function. Return dispatch
2095 index for interface method.
2096 (make_method_value): For interface methods, set index field to
2097 iface dispatch index, not DECL_VINDEX.
2098 * expr.c (build_invokeinterface): Use get_interface_method_index.
2099
2100 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2101
2102 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2103
2104 2004-03-31 Andrew Haley <aph@redhat.com>
2105
2106 PR java/14104
2107 * jcf-io.c (opendir_in_zip): Tidy up error handling.
2108
2109 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2110
2111 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2112 form of GTY markers.
2113
2114 2004-03-25 Marcus Meissner <meissner@suse.de>
2115
2116 PR java/14689:
2117 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2118
2119 2004-03-23 Tom Tromey <tromey@redhat.com>
2120
2121 PR java/14315:
2122 * jcf-write.c (make_class_file_name): Don't report if mkdir
2123 failed with EEXIST.
2124
2125 2004-03-23 Tom Tromey <tromey@redhat.com>
2126
2127 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2128
2129 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
2130
2131 * class.c, gjavah.c, lang.c: Fix comment typos.
2132 * gcj.texi: Fix typos.
2133
2134 2004-03-19 Per Bothner <per@bothner.com>
2135
2136 * gcj.texi (Code Generation): Document new flags and assert defaults.
2137
2138 * class.c (assume_compiled_node_struct): Rename type to
2139 class_flag_node_struct, as it is now also used for enable_assertions.
2140 Rename assume_compiled_node typedef. Rename excludep field to value.
2141 (find_assume_compiled_node): Rename function to find_class_flag_node.
2142 Minor optimization - avoid needless strlen.
2143 (add_assume_compiled): Some tweaking and optimization.
2144 Rename and generalize to add_class_flag takem an extra parameter.
2145 (add_assume_compled): New just calls add_class_flag.
2146 (add_enable_assert, enable_assertions): New functions.
2147 (enable_assert_tree): New static.
2148 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2149 * lang.opt (fenable-assertions, fenable-assertions=,
2150 fdisable-assertions, fdisable-assertions=): New options.
2151 * lang.c (java_handle_option): Handle new options.
2152 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
2153 class in an interface - create helper class nested in outer interface.
2154 (build_assertion): Short-circuit if enable_assertions is false.
2155
2156 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2157
2158 * java-tree.h: Changes throughout to add checking to macros
2159 and numerous whitespace changes.
2160 (VAR_OR_FIELD_CHECK): New macro.
2161 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2162 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2163
2164 2004-03-16 Per Bothner <per@bothner.com>
2165
2166 * jcf-jump.c (options): New --print-constants option.
2167 * gcj.texi (Invoking jcf-dump): Document --print-constants.
2168
2169 * jcf-dump.c (flag_print_constant_pool): Default to off.
2170 (print_constant_terse_with_index): New helper function.
2171 (various places): Check flag_print_constant_pool where missing.
2172 (main): If verbose set flag_print_constant_pool.
2173 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2174
2175 2004-03-15 Andrew Haley <aph@redhat.com>
2176
2177 PR java/14581
2178 * parse.y (java_complete_lhs): Check that final variable has an
2179 initializer.
2180
2181 2004-03-12 Andrew Haley <aph@redhat.com>
2182
2183 PR java/14551
2184 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2185 conversion.
2186
2187 2004-02-29 Roger Sayle <roger@eyesopen.com>
2188
2189 * jcf-parse.c (java_parse_file): Handle the case that input_filename
2190 is NULL.
2191
2192 2004-02-27 Per Bothner <per@bothner.com>
2193
2194 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
2195 suggestion: Use build_incomplete_class_ref.
2196 This fixes PR java/13508, java/11714.
2197
2198 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
2199
2200 * java/parse.h: Update copyright.
2201
2202 2004-02-26 Andrew Haley <aph@redhat.com>
2203
2204 PR java/14231:
2205 * parse.y (check_interface_throws_clauses): Check for
2206 !METHOD_INVISIBLE (iface_method).
2207 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2208 well as CLASS_ABSTRACT.
2209
2210 2004-02-25 Per Bothner <per@bothner.com>
2211
2212 * parse.y (build_assertion): If we're in an inner class, create the
2213 class$ helper routine in the outer class.
2214
2215 2004-02-19 Richard Henderson <rth@redhat.com>
2216
2217 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2218
2219 2004-02-16 Geoffrey Keating <geoffk@apple.com>
2220
2221 * Make-lang.in (java.install-man): Add extra dependencies.
2222
2223 2004-02-13 Geoffrey Keating <geoffk@apple.com>
2224
2225 * Make-lang.in: Install man pages under the same names
2226 (possibly transformed) as the program they document.
2227
2228 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
2229
2230 * gjavah.c: Include "intl.h".
2231 (error): New function.
2232 (main): Call gcc_init_libintl.
2233 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2234 print_stub_or_jni, process_file, main): Use error rather than
2235 fprintf.
2236 (print_method_info, usage, help, version, main): Mark strings for
2237 translation with _. Avoid splitting up sentences. Send
2238 information messages to stdout.
2239 * jcf-dump.c: Include "intl.h".
2240 (main): Call gcc_init_libintl.
2241 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2242 Mark error, usage and version messages for translation with _.
2243 Avoid splitting up sentences.
2244 * jv-scan.c: Include "intl.h".
2245 (fatal_error, warning): Change parameter s to msgid. Translate
2246 messages.
2247 (main): Call gcc_init_libintl.
2248 (usage, help, version): Mark error, usage and version messages for
2249 translation with _. Avoid splitting up sentences.
2250 * jvgenmain.c: Include "intl.h".
2251 (main): Call gcc_init_libintl.
2252 (usage, main): Mark error messages for translation with _.
2253 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2254 JVGENMAIN_OBJS): Add intl.o.
2255 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2256 java/jvgenmain.o): Update dependencies.
2257
2258 2004-02-08 Per Bothner <per@bothner.com>
2259
2260 * parse.y (resolve_qualified_expression_name): In case of inaccessible
2261 class don't use not_accessible_field_error, which can get confused.
2262
2263 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2264
2265 Make-lang.in (po-generated): Delete.
2266
2267 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2268
2269 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2270 Depend on target.h.
2271 * decl.c: Include target.h.
2272 (start_java_method): Replace PROMOTE_PROTOTYPES with
2273 targetm.calls.promote_prototypes.
2274 * expr.c: Include target.h.
2275 (pop_arguments): Replace PROMOTE_PROTOTYPES with
2276 targetm.calls.promote_prototypes.
2277 * parse.y: Include target.h.
2278 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2279 with targetm.calls.promote_prototypes.
2280
2281 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2282
2283 * typeck.c: Update copyright.
2284
2285 2004-02-02 Tom Tromey <tromey@redhat.com>
2286
2287 * decl.c (java_init_decl_processing): Remove duplicate
2288 gnu/gcj/RawData.
2289
2290 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
2291
2292 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2293
2294 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
2295
2296 * expr.c (build_field_ref): Move variable
2297 definition up.
2298
2299 2004-01-28 Andrew Haley <aph@redhat.com>
2300
2301 * expr.c (build_field_ref): Widen field offset.
2302
2303 2004-01-27 Andrew Haley <aph@redhat.com>
2304
2305 java/13273
2306 * parse.y (check_interface_throws_clauses): Make sure class_decl
2307 has been loaded.
2308
2309 2004-01-22 Jeff Sturm <jsturm@one-point.com>
2310
2311 PR java/13733
2312 * parse.y (patch_assignment): Don't modify lhs_type for
2313 reference assignments.
2314
2315 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2316
2317 * Make-lang.in: Replace $(docdir) with doc.
2318 (java.info, java.srcinfo, java.man, java.srcman): New rules.
2319 (java.install-man): Revamp rule.
2320
2321 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2322
2323 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2324 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2325 instead of deferred backquote.
2326
2327 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
2328
2329 * typeck.c (find_method_in_interfaces): Move variable
2330 definition up.
2331
2332 2004-01-16 Andrew Haley <aph@redhat.com>
2333
2334 PR java/13273:
2335 * typeck.c (shallow_find_method): New.
2336 (find_method_in_superclasses): New.
2337 (find_method_in_interfaces): New.
2338 (lookup_do): Rewrite.
2339 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2340
2341 * jcf-parse.c (read_class): Save and restore output_class.
2342 * decl.c (java_expand_body): Set output_class from fndecl.
2343
2344 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
2345
2346 * class.c (gen_indirect_dispatch_tables): Fix string length
2347 calculations.
2348
2349 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2350
2351 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2352 (java.srcextra): Copy above back to source directory if requested.
2353 (po-generated): Delete reference to $(parsedir).
2354 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2355 Use implicit rule.
2356
2357 2004-01-14 Jan Hubicka <jh@suse.cz>
2358
2359 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2360 estimation.
2361
2362 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2363
2364 * java-tree.h (java_expand_expr): Change prototype.
2365 * expr.c (java_expand_expr): Add alt_rtl parameter.
2366
2367 2004-01-09 Andrew Haley <aph@redhat.com>
2368
2369 PR java/12755:
2370 * parse.y (java_fix_constructors): Set output_class.
2371 (java_reorder_fields): Likewise.
2372 (java_layout_classes): Likewise.
2373 (java_expand_classes): Generate indirect dispatch tables.
2374 (java_expand_classes): Set output_class.
2375 (java_finish_classes): Likewise.
2376 * lang.c (java_init): Turn on always_initialize_class_p if we're
2377 using indirect dis[atch.
2378 (java_decl_ok_for_sibcall): Use output_class, not current_class.
2379 (java_get_callee_fndecl): Use class local atable.
2380 * jcf-parse.c
2381 (always_initialize_class_p): Decl moved to java-tree.h.
2382 (HANDLE_CLASS_INFO): Set output_class.
2383 (read_class): Likewise.
2384 (parse_class_file): Call gen_indirect_dispatch_tables.
2385 (parse_zip_file_entries): Set output_class.
2386 (java_parse_file): Set output_class. Don't emit symbol tables.
2387 * java-tree.h (output_class): New.
2388 Remove global declarations for otable, atable, and ctable.
2389 (always_initialize_class_p): moved here from decl.c.
2390 (DECL_OWNER): New.
2391 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2392 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2393 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2394 (struct lang_type): Add otable_methods, otable_decl,
2395 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2396 ctable_decl, catch_classes, type_to_runtime_map.
2397 * expr.c (build_field_ref): Make otable, atable, and ctable class
2398 local rather than global.
2399 (build_known_method_ref): Likewise.
2400 (build_invokeinterface): Likewise.
2401 (java_expand_expr): Pass runtime type (rather than actual type) to
2402 expand_start_catch.
2403 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2404 this class. Look up each class in that map to delete duplicates.
2405 (expand_end_java_handler): Pass runtime type (rather than actual
2406 type) to expand_start_catch.
2407 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2408 (do_nothing): New.
2409 (java_init_decl_processing): Rearrange things. Remove global
2410 declarations of otable, atable, and ctable.
2411 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2412 (java_expand_body): Set output_class.
2413 * constants.c (build_constant_data_ref): Use output_class, not
2414 current_class.
2415 (alloc_name_constant): Likewise.
2416 * class.c (gen_indirect_dispatch_tables): New.
2417 (build_class_ref): Generate hard reference to superclass, even if
2418 using indirect dispatch.
2419 (build_static_field_ref): Use class local atable.
2420 (make_class_data): Generate hard reference to superclass, even if
2421 using indirect dispatch.
2422 Generate symbolic references to interfaces when using indirect
2423 dispatch.
2424 (make_class_data): Emit otable, atable, and ctable.
2425 Make otable, atable, and ctable class local rather than global.
2426 (emit_catch_table): Make otable, atable, and ctable class local
2427 rather than global.
2428
2429 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
2430
2431 * parse.y (catch_clause_parameter): Fix typo.
2432
2433 PR java/13404
2434 * parse.y: (catch_clause_parameter): Return early if $3, aka
2435 formal_parameter, is null.
2436
2437 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
2438
2439 * class.c: Remove uses of "register" specifier in
2440 declarations of arguments and local variables.
2441 * decl.c: Likewise.
2442 * expr.c: Likewise.
2443 * gjavah.c: Likewise.
2444 * jcf-dump.c: Likewise.
2445 * jcf-io.c: Likewise.
2446 * jcf-parse.c: Likewise.
2447 * jcf-write.c: Likewise.
2448 * keyword.h: Likewise.
2449 * parse.y: Likewise.
2450 * typeck.c: Likewise.
2451 * verify.c: Likewise.
2452
2453 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
2454
2455 * Make-lang.in (GCJ_CROSS_NAME): Delete.
2456 (java.install_common, java.install-man): Adjust for above.
2457 (java.uninstall): Likewise.
2458
2459 2003-12-03 Michael Koch <konqueror@gmx.de>
2460
2461 * class.c (make_class_data):
2462 Push field value to 'hack_signers' instead of 'signers'.
2463 * decl.c (java_init_decl_processing):
2464 Push field 'hack_signers' instead of 'signers'.
2465
2466 2003-12-03 Zack Weinberg <zack@codesourcery.com>
2467
2468 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2469 including iconv.h.
2470
2471 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
2472
2473 PR java/12374:
2474 * parse.y (qualify_ambiguous_name): Remove lots of broken
2475 field access processing - there's no need to do that here,
2476 because we have resolve_field_access. Remove
2477 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2478 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2479 used.
2480
2481 2003-12-01 Jeff Sturm <jsturm@one-point.com>
2482
2483 Fix PR java/13237
2484 * parse.y (java_complete_lhs): Save location prior to patching
2485 CALL_EXPR.
2486
2487 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
2488
2489 PR java/12548
2490 * resource.c (write_resource_constructor): Append
2491 "_resource" to constructor identifier name.
2492
2493 2003-11-25 Jeff Sturm <jsturm@one-point.com>
2494
2495 Fix PR java/13183.
2496 * constants.c (cpool_for_class): New function.
2497 (outgoing_cpool): Remove global variable.
2498 (alloc_name_constant): Use cpool_for_class.
2499 (build_constants_constructor): Likewise.
2500 * decl.c (java_expand_body): Set current_class.
2501 * java-tree.h (outgoing_cpool) Remove declaration.
2502 (init_outgoing_cpool): Likewise.
2503 * jcf-parse.c (init_outgoing_cpool): Remove function.
2504 (parse_class_file): Don't call init_outgoing_cpool.
2505 * parse.y (java_complete_expand_methods): Don't call
2506 init_outgoing_cpool. Don't save outgoing_cpool.
2507 (java_expand_classes): Don't restore outgoing_cpool.
2508 (java_finish_classes): Likewise.
2509
2510 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
2511
2512 * Make-lang.in: (java.install-common) Add
2513 symlink for $(target_noncanonical)-gcjh for
2514 native builds.
2515
2516 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2517
2518 * Make-lang.in (java.extraclean): Delete.
2519
2520 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2521
2522 * Make-lang.in (check-java): Add.
2523
2524 2003-11-19 Jeff Sturm <jsturm@one-point.com>
2525
2526 Fix PR java/13024.
2527 * except.c (prepare_eh_table_type): Allocate variable-sized
2528 buffer `buf' with alloca.
2529
2530 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2531
2532 Fix PR java/12857.
2533
2534 decl.c (java_init_decl_processing): Don't initialize
2535 class_not_found_type_node, no_class_def_found_type_node.
2536
2537 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2538 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2539 (class_not_found_type_node, no_class_def_found_type_node):
2540 Don't define.
2541
2542 parse.y (build_dot_class_method_invocation): Add this_class
2543 argument. Qualify method invocations to a different class.
2544 (create_new_parser_context): Initialize saved_data_ctx to 0.
2545 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2546 (build_dot_class_method): Don't load classes. Register
2547 incomplete types.
2548 (build_incomplete_class_ref): Special cases for interfaces
2549 and inner classes. Move build_dot_class_method call to here...
2550 (patch_incomplete_class_ref): ...from here. Pass current_class
2551 to build_dot_class_method_invocation.
2552 (build_assertion): Pass class_type to
2553 build_dot_class_method_invocation.
2554 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2555
2556 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2557
2558 Fix PR java/12739.
2559 * java-tree.h (BLOCK_EMPTY_P): Define.
2560 * parse.y (java_complete_lhs): Check for empty blocks
2561 in TRY_FINALLY_EXPR case.
2562
2563 2003-11-17 Andrew Haley <aph@redhat.com>
2564
2565 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2566 (struct lang_decl_var:freed): New variable.
2567 * decl.c (poplevel): Mark local vars that have gone out of scope.
2568 (push_jvm_slot): Don't use the RTL of a var that has gone out of
2569 scope.
2570
2571 2003-11-16 Jason Merrill <jason@redhat.com>
2572
2573 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2574 and TAGS files that include them for each front end.
2575
2576 2003-11-15 Tom Tromey <tromey@redhat.com>
2577
2578 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2579
2580 2003-11-12 Jason Merrill <jason@redhat.com>
2581
2582 PR optimization/12547
2583 * lang.c (java_tree_inlining_walk_subtrees): Just walk
2584 BLOCK_EXPR_BODY directly.
2585
2586 2003-11-12 Andrew Haley <aph@redhat.com>
2587
2588 PR java/11045
2589 * parse.y (fold_constant_for_init): Check that we really do have a
2590 constant.
2591
2592 PR java/11533
2593 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2594 init_test_decls being inlined.
2595
2596 PR java/12890:
2597 * parse.y (do_resolve_class): Check return value from
2598 breakdown_qualified().
2599
2600 2003-11-11 Tom Tromey <tromey@redhat.com>
2601
2602 PR java/12915:
2603 * parse.y (merge_string_cste): Handle case where we have a
2604 pointer that happens to be zero, not null_pointer_node.
2605
2606 2003-11-10 Tom Tromey <tromey@redhat.com>
2607
2608 * jcf-parse.c (classify_zip_file): Correctly compare
2609 filename_length against length of manifest file's name.
2610
2611 2003-11-08 Tom Tromey <tromey@redhat.com>
2612
2613 PR java/12894:
2614 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2615
2616 2003-11-06 Andrew Haley <aph@redhat.com>
2617
2618 * expr.c (java_stack_swap): Make sure destination stack slots are
2619 of the correct type.
2620
2621 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
2622
2623 * Make-lang.in (dvi): Move targets to $(docobjdir).
2624 (gcj.dvi): Simplify rule and adjust target.
2625 (gcj.info): Simplify rule.
2626 (gcj.pod): New intermediate rule.
2627 (gcjh.pod): Likewise.
2628 (jv-scan.pod): Likewise.
2629 (jcf-dump.pod): Likewise.
2630 (gij.pod): Likewise.
2631 (jv-convert.pod): Likewise.
2632 (rmic.pod): Likewise.
2633 (rmiregistry.pod): Likewise.
2634 (gcj.1): Delete.
2635 (gcjh.1): Delete.
2636 (jv-scan.1): Delete.
2637 (jcf-dump.1): Delete.
2638 (gij.1): Delete.
2639 (jv-convert.1): Delete.
2640 (rmic.1): Delete.
2641 (rmiregistry.1): Delete.
2642
2643 2003-11-02 Jeff Sturm <jsturm@one-point.com>
2644
2645 Fixes PR java/12866.
2646 * parse.y (resolve_qualified_expression_name): Move test
2647 for outer field access methods from here...
2648 (check_thrown_exceptions) ...to here.
2649
2650 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
2651
2652 * .cvsignore: Delete.
2653
2654 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
2655
2656 * verify.c (verify_jvm_instructions): Don't warn about legal
2657 eh binding regions generated for example by jdk 1.4.1.
2658
2659 2003-10-24 David S. Miller <davem@redhat.com>
2660
2661 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
2662
2663 2003-10-22 Andrew Haley <aph@redhat.com>
2664
2665 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
2666 (java_get_callee_fndecl): New.
2667
2668 * jcf-parse.c (java_parse_file): Call emit_catch_table().
2669
2670 * java-tree.h (ctable_decl): New.
2671 (catch_classes): New.
2672 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
2673
2674 * decl.c (java_init_decl_processing): Add catch_class_type.
2675 Add ctable_decl.
2676 Add catch_classes field.
2677
2678 * class.c (build_indirect_class_ref): Break out from
2679 build_class_ref.
2680 (make_field_value): Check flag_indirect_dispatch.
2681 (make_class_data): Ditto.
2682 Tidy uses of PUSH_FIELD_VALUE.
2683 Add field catch_classes.
2684 (make_catch_class_record): New.
2685
2686 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
2687
2688 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
2689
2690 * jcf-write.c: Follow spelling conventions.
2691 * parse.y: Likewise.
2692
2693 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
2694
2695 * ChangeLog: Fix typos.
2696 * expr.c: Fix comment typos.
2697 * jcf-write.c: Likewise.
2698 * lang.c: Likewise.
2699 * lex.c: Likewise.
2700 * mangle.c: Likewise.
2701 * parse-scan.y: Likewise.
2702 * parse.y: Likewise.
2703
2704 2003-10-22 Tom Tromey <tromey@redhat.com>
2705
2706 * expr.c (expand_byte_code): Only warn about dead bytecode when
2707 extra_warnings is set.
2708
2709 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
2710
2711 Fix for PR java/12586.
2712 * mangle.c (find_compression_record_match): Don't iterate through
2713 package namespace elements unless they all match compression_table
2714 entries.
2715
2716 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
2717
2718 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
2719 (generate-manpages): Likewise.
2720 (java.maintainer-clean): Likewise.
2721 (gcj.info): Likewise.
2722 (gcj.1): Likewise.
2723 (gcjh.1): Likewise.
2724 (jv-scan.1): Likewise.
2725 (jcf-dump.1): Likewise.
2726 (gij.1): Likewise.
2727 (jv-convert.1): Likewise.
2728 (rmic.1): Likewise.
2729 (rmiregistry.1): Likewise.
2730 (java.install-man): Likewise.
2731 (parse-scan.o): Move and define complete compile line.
2732 (parse.o): Likewise.
2733 (jcf-tree-inline.o): Move.
2734
2735 2003-10-20 Mark Mitchell <mark@codesourcery.com>
2736
2737 * Make-lang.in (info): Update dependencies.
2738 (java.install-info): Remove.
2739 ($(srcdir)/java/gcj.info): Replace with ...
2740 ($(docobjdir)/gcj.info): ... this.
2741
2742 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
2743
2744 * Make-lang.in: Replace uses of $(target_alias) with
2745 $(target_noncanonical).
2746
2747 2003-10-09 Tom Tromey <tromey@redhat.com>
2748
2749 * decl.c (java_init_decl_processing): Declare signers field.
2750 * class.c (make_class_data): Set signers field.
2751
2752 2003-10-09 Jason Merrill <jason@redhat.com>
2753
2754 * parse.y (patch_assignment): Use make_node to create a BLOCK.
2755 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
2756 POINTER_TYPE.
2757
2758 2003-10-06 Mark Mitchell <mark@codesourcery.com>
2759
2760 * Make-lang.in (java.info): Replace with ...
2761 (info): ... this.
2762 (java.dvi): Replace with ...
2763 (dvi): ... this.
2764 (java.generated-manpages): Replace with ...
2765
2766 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
2767
2768 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
2769
2770 2003-10-01 Andrew Haley <aph@redhat.com>
2771
2772 * jcf-parse.c (java_parse_file): Write otable and atable.
2773 * java-tree.h (atable_methods): New.
2774 (atable_decl): New.
2775 (atable_syms_decl): New.
2776 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
2777 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
2778 (symbol_*type): Rename method_symbol* to symbol*type.
2779 (emit_offset_symbol_table): Delete.
2780 (emit_symbol_table): New.
2781 (get_symbol_table_index): New.
2782 (atable_type): New.
2783 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
2784 (build_known_method_ref): Likewise.
2785 (get_symbol_table_index): Rename from get_offset_table_index.
2786 Parameterize to allow re-use by differing types of symbol table.
2787 (build_invokevirtual): Pass table to get_offset_table_index.
2788 * decl.c (java_init_decl_processing): Push types and decls for
2789 atable and atable_syyms.
2790 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
2791 (make_class_data): Add new fields atable and atable_syms.
2792 (emit_symbol_table): Rename from emit_offset_symbol_table.
2793 Parameterize to allow re-use by different types of symbol table.
2794 (build_symbol_entry): Renamed from build_method_symbols_entry.
2795
2796 2003-09-30 Roger Sayle <roger@eyesopen.com>
2797
2798 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
2799 semantics for SAVE_EXPR, by caching the result in a temporary.
2800
2801 2003-09-28 Richard Henderson <rth@redhat.com>
2802
2803 * check-init.c (check_init): Save and restore input_location
2804 instead of file and line separately.
2805 * decl.c (java_expand_body): Likewise.
2806 * jcf-write.c (generate_bytecode_insns): Likewise.
2807 * parse.y (safe_layout_class): Likewise.
2808 * jcf-parse.c (read_class, parse_class_file): Likewise.
2809 (java_parse_file): Use %H for warning locator.
2810
2811 2003-09-28 Roger Sayle <roger@eyesopen.com>
2812
2813 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
2814 with void-type branches instead of using a COMPOUND_EXPR.
2815
2816 2003-09-28 Jeff Sturm <jsturm@one-point.com>
2817
2818 * decl.c (java_optimize_inline, dump_function): Remove.
2819 * java-tree.h (java_optimize_inline): Remove declaration.
2820 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
2821 * parse.y (source_end_java_method, java_expand_classes):
2822 Likewise. Remove dead code.
2823
2824 2003-09-27 Roger Sayle <roger@eyesopen.com>
2825
2826 * lang.c (java_init_options): Set flag_evaluation_order.
2827 * expr.c (force_evaluation_order): Don't attempt to force
2828 evaluation order of binary operations using save_expr.
2829 * parse.y (java_complete_lhs): No longer need to call
2830 force_evaluation_order when constructing binary operators.
2831
2832 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
2833 Bryce McKinlay <bryce@mckinlay.net.nz>
2834
2835 PR java/1333:
2836 * parse.y (not_accessible_field_error): New function.
2837 (resolve_expression_name): Check field access permissions.
2838 (resolve_qualified_expression_name): Use
2839 not_accessible_field_error.
2840 (resolve_qualified_expression_name): Likewise.
2841
2842 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2843
2844 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
2845
2846 2003-09-23 Roger Sayle <roger@eyesopen.com>
2847
2848 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
2849 with equal operands without side-effects.
2850
2851 2003-09-22 Jeff Sturm <jsturm@one-point.com>
2852
2853 * decl.c (java_init_decl_processing): Don't emit otable decls
2854 if flag_indirect_dispatch is not set.
2855
2856 2003-09-21 Richard Henderson <rth@redhat.com>
2857
2858 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
2859 resource.c: Revert.
2860
2861 2003-09-21 Richard Henderson <rth@redhat.com>
2862
2863 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
2864 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
2865
2866 2003-09-20 Richard Henderson <rth@redhat.com>
2867
2868 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
2869
2870 2003-09-18 Roger Sayle <roger@eyesopen.com>
2871
2872 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
2873 * check-init.c (check_init): Likewise.
2874
2875 2003-09-18 Roger Sayle <roger@eyesopen.com>
2876
2877 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
2878
2879 2003-09-16 Andrew Haley <aph@redhat.com>
2880
2881 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
2882
2883 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
2884
2885 Fixes PR java/9577
2886 * mangle.c (find_compression_record_match): Skip
2887 over a "6JArray" (the array template mangled string)
2888 IDENTIFIER_NODE.
2889 (mangle_array_type): Correct minor typo.
2890 (atms): Move definition to the beginning.
2891
2892 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
2893
2894 * class.c (add_miranda_methods): Ensure super-interfaces are laid
2895 out. Fix for PR java/12254.
2896
2897 2003-09-11 Richard Henderson <rth@redhat.com>
2898
2899 * parse.y (source_end_java_method): Update for new
2900 cgraph_finalize_function argument.
2901
2902 2003-09-09 Richard Henderson <rth@redhat.com>
2903
2904 * parse.y (source_end_java_method): Update call to
2905 cgraph_finalize_function.
2906
2907 2003-09-03 Jeff Sturm <jsturm@one-point.com>
2908
2909 * decl.c (java_expand_body): New function.
2910 * expr.c (build_class_init): Set DECL_IGNORED_P.
2911 * java-tree.h (start_complete_expand_method,
2912 java_expand_body): Declare.
2913 * jcf-parse.c (cgraph.h): Include.
2914 (java_parse_file): Handle flag_unit_at_a_time.
2915 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
2916 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
2917 (java_estimate_num_insns): Use walk_tree_without_duplicates.
2918 (java_start_inlining): New function.
2919 * parse.h (java_finish_classes): Declare.
2920 * parse.y: Include cgraph.h.
2921 (block): Don't special-case empty block production.
2922 (craft_constructor): Set DECL_INLINE.
2923 (source_end_java_method): Handle flag_unit_at_a_time.
2924 Replace inline code with call to java_expand_body.
2925 (start_complete_expand_method): Remove static modifier.
2926 (java_expand_method_bodies): Patch function tree for
2927 class initialization and/or synchronization as needed.
2928 Don't begin RTL expansion yet.
2929 (java_expand_classes): Check flag_unit_at_a_time before
2930 calling finish_class.
2931 (java_finish_classes): New function.
2932 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
2933 (patch_assignment): Set DECL_CONTEXT on temporary variable.
2934 (emit_test_initialization): Set DECL_IGNORED_P.
2935
2936 2003-09-03 Roger Sayle <roger@eyesopen.com>
2937
2938 * builtins.c (enum builtin_type): Delete unused enumeration.
2939 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
2940
2941 2003-08-28 Tom Tromey <tromey@redhat.com>
2942
2943 * gcj.texi (Extensions): Document gcjlib URLs.
2944
2945 2003-08-20 Tom Tromey <tromey@redhat.com>
2946
2947 * gcj.texi (Extensions): Added xref.
2948 (libgcj Runtime Properties): Document
2949 gnu.gcj.runtime.VMClassLoader.library_control.
2950
2951 2003-08-20 Andrew Haley <aph@redhat.com>
2952
2953 * except.c (prepare_eh_table_type): Use new encoding for exception
2954 handlers when using -fno-assume-compiled.
2955
2956 2003-08-13 Tom Tromey <tromey@redhat.com>
2957
2958 * gcj.texi (Invoking gij): Document -X and -?.
2959
2960 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
2961
2962 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
2963 GCJH_OBJS, JCFDUMP_OBJS
2964 * win32-host.c: Removed the unnecessary and broken dependency
2965 on jcf.h
2966
2967 2003-08-11 Tom Tromey <tromey@redhat.com>
2968
2969 * parse.y (java_check_regular_methods): Typo fixes. Call
2970 check_interface_throws_clauses. Use
2971 check_concrete_throws_clauses.
2972 (check_interface_throws_clauses): New function.
2973 (check_concrete_throws_clauses): New function.
2974 (hack_is_accessible_p): New function.
2975 (find_most_specific_methods_list): Added FIXME.
2976 * typeck.c (lookup_do): Use `flags' argument to decide what to
2977 do. Reimplemented.
2978 (lookup_argument_method_generic): New function.
2979 (lookup_argument_method2): Removed.
2980 * jcf.h (ACC_INVISIBLE): New define.
2981 * jcf-write.c (generate_classfile): Skip invisible methods.
2982 * class.c (add_miranda_methods): New function.
2983 (layout_class_methods): Use it.
2984 (get_access_flags_from_decl): Use ACC_INVISIBLE.
2985 * java-tree.h (METHOD_INVISIBLE): New define.
2986 (lang_decl_func) [invisible]: New field.
2987 (lookup_argument_method_generic): Declare.
2988 (SEARCH_INTERFACE): New define.
2989 (SEARCH_SUPER): Likewise.
2990 (SEARCH_ONLY_INTERFACE): Likewise.
2991 (SEARCH_VISIBLE): Likewise.
2992 (lookup_argument_method2): Removed declaration.
2993
2994 2003-08-05 Tom Tromey <tromey@redhat.com>
2995
2996 Fix for PR java/11600:
2997 * parse.y (java_complete_lhs): See whether we're calling a method
2998 on an array.
2999 (check_thrown_exceptions): Added `is_array_call' argument;
3000 fixed `clone' checking; updated all callers.
3001
3002 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
3003
3004 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3005
3006 2003-08-03 Tom Tromey <tromey@redhat.com>
3007
3008 * java-tree.h (METHOD_TRANSIENT): Removed.
3009 * decl.c (pushdecl): Removed some dead code.
3010 * class.c (get_access_flags_from_decl): Can't have transient
3011 method.
3012 (add_method_1): Can't have a transient method.
3013
3014 2003-07-28 Andreas Jaeger <aj@suse.de>
3015
3016 * jvspec.c: Convert to ISO C90 prototypes.
3017
3018 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
3019
3020 * decl.c (force_poplevels): Fix warning call.
3021
3022 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3023
3024 * expr.c (expand_java_field_op): Don't use xxx_with_decl
3025 (expand_java_field_op): Likewise.
3026 * class.c (layout_class_method): Likewise
3027 (emit_register_classes): Likewise.
3028 * decl.c (pushdecl): Likewise.
3029 (poplevel): Likewise.
3030 (force_poplevels): Likewise.
3031 (give_name_to_locals): Likewise.
3032 * check-init.c (check_for_initialization): Likewise.
3033
3034 2003-07-24 Jason Merrill <jason@redhat.com>
3035
3036 * java-tree.h: Move boolean_type_node et al to the back end.
3037
3038 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3039
3040 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3041 casts.
3042
3043 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
3044
3045 * lang.opt: Don't show -MD_ and -MDD_.
3046
3047 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
3048
3049 * lang-options.h: Remove.
3050 * lang.opt: Add help text.
3051
3052 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
3053
3054 * expr.c: Remove the last argument to expand_assignment().
3055
3056 2003-07-09 Jan Hubicka <jh@suse.cz>
3057
3058 * java-tree.h (DECL_NUM_STMTS): Rename to...
3059 (DECL_ESTIMATED_INSNS): ... this.
3060 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3061 New static functions.
3062 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3063 * parser.y (add_stmt_to_compound): Do not account statements.
3064
3065 2003-07-08 Mark Wielaard <mark@klomp.org>
3066
3067 * gcj.texi: CNI now expands to Compiled Native Interface.
3068
3069 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3070
3071 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3072
3073 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3074
3075 * expr.c (expand_byte_code): Adjist emit_line_note call.
3076
3077 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3078
3079 * lang.c (java_handle_option): Don't handle filenames.
3080
3081 2003-07-02 Zack Weinberg <zack@codesourcery.com>
3082
3083 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3084 DIR_SEPARATOR.
3085 Use FILENAME_CMP.
3086 * jcf-write.c: Don't default-define DIR_SEPARATOR.
3087 * jcf.h: Delete COMPARE_FILENAMES definition.
3088
3089 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
3090
3091 * lang.c (java_init_options): Update prototype.
3092
3093 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3094
3095 * decl.c (poplevel): Adjust define_label call.
3096
3097 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3098
3099 * gjavah.c (flag_jni): Make non-static.
3100 * parse-scan.y (ctxp): Make non-static.
3101
3102 * class.c (build_method_symbols_entry)
3103 * expr.c (get_offset_table_index)
3104 * jcf-parse.c (jcf_parse):
3105 Mark the definition static, matching the forward declaration.
3106
3107 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
3108
3109 * lang.c (java_handle_option): Don't check for missing arguments.
3110
3111 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3112
3113 * class.c (push_class): Use a location_t to save place.
3114 (emit_register_classes): Set input_location. Adjust
3115 expand_function_end call.
3116 * resource.c (write_resource_constructor): Likewise.
3117 * decl.c (end_java_method): Adjust expand_function_end call.
3118 * parse.y (source_end_java_method): Likewise.
3119
3120 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3121
3122 * lang.c (java_handle_option): Likewise.
3123
3124 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
3125
3126 * lang.c (java_handle_option): Special-casing of optional
3127 joined arguments no longer needed.
3128 * lang.opt: Update switches that take optional argument.
3129
3130 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3131
3132 * lang.opt: Declare Java.
3133 * lang.c (java_init_options): Update.
3134
3135 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3136
3137 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3138
3139 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3140
3141 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3142 * lang.c (java_handle_option): -MD and -MMD have an underscore.
3143 * lang.opt: -MD and -MMD have an underscore.
3144
3145 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3146
3147 * class.c (emit_register_classes): Adjust init_function_start
3148 call.
3149 * decl.c (complete_start_java_method): Likewise.
3150 * resource.c (write_resource_constructor): Likewise.
3151
3152 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3153
3154 * Make-lang.in: Update to use options.c and options.h.
3155 * lang.c: Include options.h not j-options.h.
3156 (java_handle_option): Abort on unrecognized option.
3157 (java_init_options): Request Java switches.
3158
3159 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
3160
3161 * Make-lang.in: Handle mostlyclean.
3162
3163 2003-06-11 Tom Tromey <tromey@redhat.com>
3164
3165 * lang.c (java_handle_option): Update dependency_tracking for
3166 OPT_MF case.
3167
3168 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3169 empty argument.
3170
3171 2003-06-10 Andrew Haley <aph@redhat.com>
3172
3173 * resource.c (write_resource_constructor): Use expand_expr to
3174 generate the address of the label attached to a resource.
3175 * Make-lang.in (java/resource.o): Add expr.h
3176
3177 2003-06-10 Andrew Haley <aph@redhat.com>
3178
3179 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3180 (java_decl_ok_for_sibcall): New.
3181
3182 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
3183
3184 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3185 (java/j-options.c, java/j-options.h): New.
3186 * java-tree.h (resource_name, compile_resource_file,
3187 compile_resource_data): Constify.
3188 * jcf-write.c (jcf_write_base_directory): Similarly.
3189 * jcf.h (jcf_write_base_directory): Similarly.
3190 * lang.c: Include j-options.h.
3191 (cl_options_count, cl_options, string_option, java_decode_option,
3192 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3193 process_option_with_no): Remove.
3194 (resource_name): Constify.
3195 (LANG_HOOKS_HANDLE_OPTION): Override.
3196 (java_handle_option): New.
3197 (java_init): Don't call jcf_path_init.
3198 (java_init_options): Call jcf_path_init.
3199 * lang.opt: New.
3200 * resource.c (compile_resource_data, compile_resource_file): Constify.
3201
3202 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
3203
3204 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3205 (struct lang_decl_func): Add last_line field.
3206 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3207 DECL_SOURCE_LINE_LAST): Remove.
3208 * parse.y (missing_return_error, finish_method_declaration,
3209 lookup_cl, start_artificial_method_body, source_end_java_method,
3210 start_complete_expand_method): Adjust.
3211
3212 2003-06-08 Tom Tromey <tromey@redhat.com>
3213
3214 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3215 fno-assume-compiled.
3216
3217 2003-06-08 Roger Sayle <roger@eyesopen.com>
3218
3219 * builtins.c (define_builtin_type, builtin_types): Delete.
3220 (define_builtin): Rewritten to take just the built-in code,
3221 the function's name, type and fallback library function name.
3222 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3223 (initialize_builtins): Overhaul to define the GCC builtins
3224 used by gcj manually, providing the Java run-time's
3225 implementations as the fallback library function.
3226
3227 2003-06-08 Anthony Green <green@redhat.com>
3228
3229 * parse.y (patch_cast): Fix conversions from floating-point to
3230 integral types.
3231
3232 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
3233
3234 * Make-lang.in: Update.
3235 * lang.c: Include opts.h. Define cl_options_count and cl_options.
3236
3237 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3238
3239 * lang.c (java_init_options): Update.
3240
3241 2003-06-05 Jan Hubicka <jh@suse.cz>
3242
3243 * Make-lang.in: Add support for stageprofile and stagefeedback
3244
3245 2003-05-31 Roger Sayle <roger@eyesopen.com>
3246
3247 * lang.c (java_init_options): Prescribe wrap-around two's
3248 complement arithmetic overflow by setting flag_wrapv.
3249
3250 2003-05-29 Roger Sayle <roger@eyesopen.com>
3251
3252 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3253 (builtin_record): Add an additional builtin_code field to
3254 record which GCC built-in corresponds to the Java function.
3255 (java_builtins): Add new entries for atan, atan2, exp, log,
3256 pow and tan.
3257 (max_builtin, min_builtin, abs_builtin): Perform constant
3258 folding on the resulting tree.
3259 (java_build_function_call_expr): Likewise, perform constant
3260 folding on the resulting tree.
3261 (initialize_builtins): The NULL creators are now allowed in
3262 the java_builtins table, which is now terminated by an entry
3263 with builtin_code == END_BUILTINS.
3264 (check_for_builtin): Likewise. If the matching creator is
3265 NULL, construct the call using java_build_function_call_expr
3266 directly with the decl for the corresponding builtin_code.
3267
3268 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
3269
3270 * win32-host.c: Normalize copyright boilerplate.
3271
3272 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3273
3274 * parse.y (print_int_node): Use string concatentation on
3275 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3276 function calls into one.
3277
3278 2003-05-13 Zack Weinberg <zack@codesourcery.com>
3279
3280 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3281 fatal_io_error with calls to fatal_error; add ": %m" to the end of
3282 all the affected error messages.
3283
3284 2003-05-13 Richard Henderson <rth@redhat.com>
3285
3286 * class.c (layout_class_method): Set DECL_EXTERNAL.
3287 * decl.c (java_mark_decl_local, java_mark_class_local): New.
3288 * java-tree.h (java_mark_class_local): Declare.
3289 * jcf-parse.c (parse_class_file): Use it.
3290 * parse.y (java_expand_classes): Likewise.
3291
3292 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
3293
3294 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3295 * lex.h: #include input.h.
3296 * jv-scan.c (input_filename): Remove.
3297
3298 2003-05-02 Tom Tromey <tromey@redhat.com>
3299
3300 PR java/10491:
3301 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3302 (handle_inner_classes): New function.
3303
3304 2003-05-01 Tom Tromey <tromey@redhat.com>
3305
3306 PR java/10459:
3307 * parse.y (finish_for_loop): Do nothing if update expression is a
3308 EXPR_WFL_NODE wrapping nothing.
3309 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3310
3311 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
3312
3313 * lex.h (input_lineno): Remove declaration.
3314 * parse-scan.y: #include input.h.
3315 (input_filename): Remove declaration.
3316 (input_location): Add definition.
3317 (input_line): Remove definition.
3318
3319 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3320
3321 * lex.h (lineno): Rename to ...
3322 (input_line): ... here
3323 * parse-scan.y (lineno): Rename to ...
3324 (input_line): ... here.
3325 (reset_report): Rename lineno to input_line.
3326 * check-init.c (check_init): Likewise.
3327 * class.c (push_class): Likewise.
3328 * decl.c (complete_start_java_method, end_java_method): Likewise.
3329 * expr.c (expand_byte_code): Likewise.
3330 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3331 * jcf-write.c (generate_bytecode_insns): Likewise.
3332 * lex.c (java_init_lex, java_allocate_new_line,
3333 do_java_lex): Likewise.
3334 * parse.h (YYNOT_TWICE): Likewise.
3335 * parse.y (empty_statement, expression_statement,
3336 java_pop_parser_context, java_parser_context_save_global,
3337 yyerror, register_fields, method_header, safe_layout_class,
3338 find_in_imports_on_demand, create_artificial_method,
3339 source_end_java_method, start_complete_expand_method,
3340 build_thisn_assign, java_complete_lhs,
3341 maybe_absorb_scoping_block): Likewise.
3342
3343 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
3344
3345 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3346 '/' when computing java source filename
3347
3348 2003-04-13 Tom Tromey <tromey@redhat.com>
3349
3350 * gjavah.c (print_c_decl): Indentation fix.
3351
3352 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3353
3354 * class.c (make_field_value, make_method_value, get_dispatch_table)
3355 (make_class_data, emit_offset_symbol_table)
3356 * constants.c (build_constants_constructor)
3357 * java-tree.h (START_RECORD_CONSTRUCTOR)
3358 * parse.y (maybe_build_array_element_wfl):
3359 Use build_constructor.
3360
3361 2003-04-10 Eric Blake <ebb9@email.byu.edu>
3362
3363 PR java/10253:
3364 * parse.y (string_convert_int_cst): Always use at least one digit
3365 in string conversion. Remove ASCII dependence.
3366 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3367
3368 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
3369
3370 * Make-lang.in: added win32-host.c
3371 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3372 resolves to open() on non-Win32 platforms and
3373 Win32-specific jcf_open_exact_case() on Win32
3374 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3375 when trying .java and .class files
3376 * win32-host.c: added to repository. Defines
3377 Win32-specific jcf_open_exact_case()
3378
3379 2003-04-10 Andrew Haley <aph@redhat.com>
3380
3381 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3382 (maybe_free_localvar): Renamed from localvar_free.
3383 Add new arg, really.
3384 (generate_bytecode_insns): Set new variable, jsrs.
3385 Only free local vars if no jsr insns have been emittted.
3386 Call maybe_free_localvar, not localvar_free.
3387
3388 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
3389
3390 * gcj.texi: Remove @ at start of file.
3391
3392 2003-03-25 Tom Tromey <tromey@redhat.com>
3393
3394 * parse.y (create_interface): Call CHECK_DEPRECATED.
3395
3396 2003-03-23 Zack Weinberg <zack@codesourcery.com>
3397
3398 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3399
3400 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3401
3402 * javaop.h (jfloat, jdouble): Make them structures mirroring
3403 the bit fields of IEEE float and double respectively.
3404 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3405 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3406 (union Word, union DWord): Delete.
3407 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3408
3409 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3410 D_NAN_MASK): Delete.
3411 (jni_print_float, jni_print_double): New. Generate
3412 hexadecimal floating constants.
3413 (print_field_info): Use jni_print_float/double.
3414
3415 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
3416 finite floating point numbers for output; special case
3417 non-finite floats.
3418
3419 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3420
3421 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3422 Replace 0 and 1 with true and false in return statements.
3423
3424 2003-03-19 Tom Tromey <tromey@redhat.com>
3425
3426 * lex.c (do_java_lex): Renamed from java_lex.
3427 (java_lex): New function.
3428 Include timevar.h.
3429
3430 2003-03-13 Tom Tromey <tromey@redhat.com>
3431
3432 * parse.y (resolve_inner_class): Error if qualifier is a primitive
3433 type.
3434
3435 2003-03-04 Andrew Haley <aph@redhat.com>
3436
3437 * gjavah.c (is_first_data_member): New global variable.
3438 (print_c_decl): If it's the first data member, align it as the
3439 superclass.
3440 (process_file): Set is_first_data_member.
3441
3442 2003-03-11 Tom Tromey <tromey@redhat.com>
3443
3444 * parse.y (resolve_field_access): Initialize class if field is
3445 found in another static field.
3446 * expr.c (build_class_init): Don't optimize out initialization of
3447 implemented interface.
3448
3449 2003-03-11 Andrew Haley <aph@redhat.com>
3450
3451 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3452 warning.
3453
3454 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
3455
3456 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3457 and DIR_SEPARATOR_2 for a target.
3458 Correct minor typos.
3459
3460 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3461 and DIR_SEPARATOR_2 for a target into account.
3462
3463 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3464
3465 * lang.c (java_init): Update prototype, move code to java_post_options.
3466 (java_post_options): Similarly.
3467
3468 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
3469
3470 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3471 compare file name components depending on the case-sensitivity
3472 or otherwise of the host file system.
3473
3474 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3475 "strcmp" to compare file name components.
3476 Use IS_DIR_SEPARATOR instead of comparing directly against
3477 DIR_SEPARATOR.
3478 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3479 comparing directly against DIR_SEPARATOR.
3480
3481 2003-03-04 Tom Tromey <tromey@redhat.com>
3482
3483 * Make-lang.in (java.tags): New target.
3484
3485 2003-03-01 Roger Sayle <roger@eyesopen.com>
3486
3487 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3488 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3489
3490 2003-03-01 Tom Tromey <tromey@redhat.com>
3491
3492 * parse.y (jdep_resolve_class): Only check deprecation if we found
3493 a decl.
3494
3495 2003-02-28 Tom Tromey <tromey@redhat.com>
3496
3497 PR java/9695:
3498 * class.c (maybe_layout_super_class): Always pass a WFL to
3499 do_resolve_class.
3500 * parse.y (do_resolve_class): Updated comment to explain
3501 parameters.
3502
3503 2003-02-26 Tom Tromey <tromey@redhat.com>
3504
3505 * jcf-write.c (generate_classfile): Check whether class is
3506 deprecated before writing attribute count.
3507
3508 2003-02-25 Roger Sayle <roger@eyesopen.com>
3509
3510 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3511 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3512
3513 2003-02-23 Tom Tromey <tromey@redhat.com>
3514
3515 * lang-options.h: Added -Wdeprecated.
3516 * gcj.texi (Warnings): Document -Wdeprecated.
3517 * java-tree.h (flag_deprecated): Declare.
3518 * lang.c (lang_W_options): Added deprecated.
3519 (flag_deprecated): New global.
3520 * chartables.h: Rebuilt.
3521 * gen-table.pl (process_one): Look at whitespace.
3522 (print_tables): Define LETTER_SPACE, LETTER_MASK.
3523 * parse.h (CLEAR_DEPRECATED): New macro.
3524 (CHECK_DEPRECATED_NO_RESET): New macro.
3525 * jcf-parse.c (handle_deprecated): New function.
3526 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3527 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3528 * parse.y (resolve_type_during_patch): Check deprecation.
3529 (jdep_resolve_class): Likewise.
3530 (process_imports): Likewise.
3531 (resolve_expression_name): Likewise.
3532 (check_deprecation): Strip arrays from decl. Check
3533 flag_deprecated.
3534 (patch_method_invocation): Also check the particular constructor
3535 for deprecation.
3536 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3537 * jcf-write.c (append_deprecated_attribute): New function.
3538 (generate_classfile): Generate deprecated attribute when
3539 appropriate.
3540 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
3541 (java_lex) [case '*']: Simplify logic.
3542 (java_start_char_p): Use LETTER_MASK.
3543 (java_part_char_p): Likewise.
3544 (java_space_char_p): New function.
3545
3546 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3547
3548 Change base class access representation.
3549 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3550 (add_interface_do): Likewise.
3551
3552 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
3553
3554 * decl.c (java_init_decl_processing): Change
3555 soft_lookupjnimethod_node to reflect the change in
3556 signature of _Jv_LookupJNIMethod in libjava/jni.cc
3557 * expr.c (build_jni_stub): Calculate and pass the size
3558 on the stack of the arguments to a JNI function. Use
3559 new target macro MODIFY_JNI_METHOD_CALL to allow a
3560 target to modify the call to a JNI method.
3561
3562 2003-02-08 Roger Sayle <roger@eyesopen.com>
3563
3564 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3565 instead of basename to avoid compiler warnings on Tru64.
3566
3567 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
3568
3569 * gcj.texi: Update to GFDL 1.2.
3570
3571 2003-01-31 Andrew Haley <aph@redhat.com>
3572
3573 * parse.y (java_expand_classes): Scan the whole class list looking
3574 for access methods that haven't yet been expanded.
3575
3576 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3577
3578 Fix for java/4269:
3579
3580 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3581 to fix bootstrap on sparc-unknown-netbsdelf1.5.
3582 * jcf-parse.c: Likewise.
3583
3584 2003-01-31 Mark Wielaard <mark@klomp.org>
3585
3586 * gjavah.c (throwable_p): Allocate 1 more byte for string.
3587
3588 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3589
3590 * class.c (make_class): Use BINFO_ELTS.
3591 (set_super_info): Likewse.
3592 (add_interface_do): Likewise.
3593
3594 2003-01-30 Tom Tromey <tromey@redhat.com>
3595
3596 * jcf-parse.c (read_class): Update identifier's class value if it
3597 changed during parsing.
3598
3599 2003-01-30 Loren James Rittle <ljrittle@acm.org>
3600
3601 * Make-lang.in (po-generated): Find the targets in $(parsedir).
3602 Propagate change to all other rules as required.
3603 (java/parse-scan.o): Add explicit dependency on
3604 $(parsedir)/java/parse-scan.c .
3605
3606 2003-01-29 Tom Tromey <tromey@redhat.com>
3607
3608 * parse.y (patch_assignment): Only transform the rhs of an
3609 assignment when compiling to native.
3610
3611 2003-01-28 Tom Tromey <tromey@redhat.com>
3612
3613 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
3614
3615 2003-01-28 Tom Tromey <tromey@redhat.com>
3616
3617 * lex.c (java_lex): Don't include UEOF as part of token.
3618 (java_read_unicode): Error if \u sequence prematurely terminated.
3619
3620 2003-01-27 Tom Tromey <tromey@redhat.com>
3621
3622 * parse.y (java_check_regular_methods): Check for construct after
3623 checking types in throws clause.
3624
3625 2003-01-24 Tom Tromey <tromey@redhat.com>
3626
3627 * class.c (build_static_field_ref): Only a String or numeric field
3628 can fold to a constant.
3629
3630 2003-01-23 Tom Tromey <tromey@redhat.com>
3631
3632 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
3633 file name in resource buffer.
3634
3635 2003-01-23 Tom Tromey <tromey@redhat.com>
3636
3637 * expr.c (build_known_method_ref): Use method's context to find
3638 method table index.
3639
3640 2003-01-23 Tom Tromey <tromey@redhat.com>
3641
3642 * constants.c (set_constant_entry): Allocated cleared memory.
3643
3644 2003-01-22 Tom Tromey <tromey@redhat.com>
3645
3646 * java-tree.h: Don't use PARAMS.
3647 * resource.c: Add prototypes for all functions.
3648 (write_resource_constructor): Use `const char *' to avoid
3649 warning.
3650
3651 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3652
3653 * jcf-parse.c (process_zip_dir): Remove unused variable.
3654
3655 2003-01-22 Tom Tromey <tromey@redhat.com>
3656
3657 * expr.c (build_invokeinterface): Abort if method's context is not
3658 an interface.
3659
3660 2003-01-22 Tom Tromey <tromey@redhat.com>
3661
3662 * gcj.texi (Input and output files): Mention non-class entries.
3663 * decl.c (java_init_decl_processing): Call
3664 init_resource_processing.
3665 * java-tree.h (compile_resource_data, write_resource_constructor,
3666 compile_resource_file, init_resource_processing): Declare.
3667 * config-lang.in (gtfiles): Added resource.c.
3668 * Make-lang.in (gt-java-resource.h): New target.
3669 (JAVA_OBJS): Added resource.o.
3670 (java/resource.o): New target.
3671 * resource.c: New file.
3672 * class.c (compile_resource_file): Moved to resource.c.
3673 (registerResource_libfunc): Likewise.
3674 (utf8_decl_list): Mark with GTY; now static.
3675 * jcf-parse.c (classify_zip_file): New function.
3676 (parse_zip_file_entries): Use it; compile .properties files.
3677 (process_zip_dir): Use classify_zip_file and compute_class_name.
3678 Don't write class name into zip directory.
3679 (java_parse_file): Call write_resource_constructor.
3680 (compute_class_name): New function.
3681 * jcf-io.c (read_zip_member): Reindented.
3682
3683 2003-01-21 Tom Tromey <tromey@redhat.com>
3684
3685 * class.c (supers_all_compiled): New function.
3686 (make_class_data): Use it.
3687
3688 2003-01-21 Tom Tromey <tromey@redhat.com>
3689
3690 * parse.y (method_header): Native method can't be strictfp.
3691 No method can be transient or volatile.
3692
3693 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3694
3695 Make-lang.in (jvspec.o-warn): Add -Wno-error.
3696
3697 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
3698
3699 * check-init.c: Fix comment typos.
3700 * class.c: Likewise.
3701 * constants.c: Likewise.
3702 * decl.c: Likewise.
3703 * except.c: Likewise.
3704 * expr.c: Likewise.
3705 * java-except.h: Likewise.
3706 * java-tree.h: Likewise.
3707 * javaop.h: Likewise.
3708 * jcf-dump.c: Likewise.
3709 * jcf-io.c: Likewise.
3710 * jcf-parse.c: Likewise.
3711 * jcf-write.c: Likewise.
3712 * lang.c: Likewise.
3713 * mangle.c: Likewise.
3714 * typeck.c: Likewise.
3715 * verify.c: Likewise.
3716
3717 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3718
3719 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
3720 * jcf-write.c: Include "tm_p.h".
3721
3722 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3723
3724 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
3725
3726 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3727
3728 * builtins.c (java_build_function_call_expr): Renamed from
3729 build_function_call_expr. All callers changed.
3730
3731 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
3732 * jcf-parse.c: Include tm_p.h.
3733
3734 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
3735 warning.
3736
3737 2003-01-14 Tom Tromey <tromey@redhat.com>
3738
3739 * class.c (make_class_data): Check that super is compiled before
3740 building class reference to it.
3741
3742 2003-01-14 Andrew Haley <aph@redhat.com>
3743
3744 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
3745 varargs function -- correct.
3746
3747 2003-01-14 Andrew Haley <aph@redhat.com>
3748
3749 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
3750
3751 2003-01-14 Andrew Haley <aph@redhat.com>
3752
3753 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
3754 varargs function -- correct.
3755
3756 * parse.y (patch_assignment): Copy the rhs of an assignment into a
3757 temporary if the RHS is a reference.
3758
3759 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3760
3761 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
3762 * keyword.h: Regenerated.
3763
3764 * All Files: Convert to ISO C style function definitions.
3765
3766 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3767
3768 * parse.y (check_pkg_class_access): ANSIfy definition.
3769
3770 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3771
3772 * decl.c, parse-scan.y, parse.y: Don't cast return value of
3773 xmalloc et al.
3774
3775 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
3776
3777 2003-01-09 Geoffrey Keating <geoffk@apple.com>
3778
3779 Merge from pch-branch:
3780
3781 2002-12-02 Geoffrey Keating <geoffk@apple.com>
3782
3783 * Make-lang.in (java/gjavah.o): Update dependencies.
3784 * gjavah.c: Include ggc.h.
3785
3786 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
3787
3788 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
3789 (JCFDUMP_OBJS): Add ggc-none.o.
3790 (java/jcf-dump.o): Depend on GGC_H.
3791 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
3792 CPool substructures.
3793 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
3794 * jcf-dump.c: Include ggc.h.
3795
3796 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
3797
3798 * jcf.h (union cpool_entry): New.
3799 (struct CPool): Use gengtype to mark. Change field 'data' to be
3800 an array of unions.
3801 (struct JCF): Use gengtype to mark.
3802 (CPOOL_UINT): Update for new cpool_entry type.
3803 (CPOOL_USHORT1): Likewise.
3804 (CPOOL_USHORT2): Likewise.
3805 (CPOOL_FINISH): Use GC to free cpool subfields.
3806 * parse.h (struct parser_ctxt): Mark field current_jcf.
3807 * lex.c (java_init_lex): Use GC to allocate struct JCF.
3808 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
3809 (main_jcf): Use gengtype to mark.
3810 (ggc_mark_jcf): Delete.
3811 (get_constant): Update for new cpool_entry type.
3812 (give_name_to_class): Likewise.
3813 (get_class_constant): Likewise.
3814 (init_outgoing_cpool): Use GGC to allocate struct CPool.
3815 (java_parse_file): Use GGC to allocate struct JCF.
3816 (init_jcf_parse): Don't call ggc_add_root.
3817 * jcf-reader.c (jcf_parse_constant_pool): Update for new
3818 cpool_entry type.
3819 * java-tree.h (current_jcf): Use gengtype to mark.
3820 (CPOOL_UTF): Update for new cpool_entry type.
3821 (outgoing_cpool): Use gengtype to mark.
3822 (struct lang_type): GC struct JCF and struct CPool.
3823 * config-lang.in (gtfiles): Add jcf.h.
3824 * constants.c (find_tree_constant): New.
3825 (set_constant_entry): Allocate cpool subfields using GGC. Update
3826 for new cpool_entry type.
3827 (find_constant1): Update for new cpool_entry type.
3828 (find_constant2): Likewise.
3829 (find_utf8_constant): Use find_tree_constant.
3830 (find_class_or_string_constant): Remove unnecessary cast to jword.
3831 Update for new cpool_entry type.
3832 (count_constant_pool_bytes): Update for new cpool_entry type.
3833 (write_constant_pool): Likewise.
3834 (alloc_name_constant): Use find_tree_constant.
3835 (build_constants_constructor): Update for new cpool_entry type.
3836
3837 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
3838
3839 * parse.y (mark_parser_ctxt): Delete.
3840 (goal): Don't use ggc_add_root.
3841 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
3842 (java_pop_parser_context): Let GC free parser_ctxt.
3843 (java_parser_context_resume): Likewise.
3844 * parse.h (struct parser_ctxt): Use gengtype to mark.
3845 (ctxp): Likewise.
3846 (ctxp_for_generation): Likewise.
3847 * lex.h (struct java_lc_s): Mark for gengtype.
3848 (java_lexer): Rearrange for gengtype.
3849 * config-lang.in (gtfiles): Add lex.h, parse.h.
3850
3851 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3852
3853 * All Files: Remove PARAMS macro.
3854
3855 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
3856 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
3857 `__STDC__' macros.
3858
3859 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
3860 VA_CLOSE.
3861
3862 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
3863
3864 * Make-lang.in (java.install-common, java.uninstall,
3865 java.install-info, java.install-man): Prepend $(DESTDIR)
3866 to destination paths in all (un)installation commands.
3867 (java.install-common): Rewrite $(LN) command to support
3868 DESTDIR with "ln" as well as with "ln -s".
3869
3870 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
3871
3872 * java-tree.h: Protect against multiple inclusion.
3873
3874 2003-01-07 Tom Tromey <tromey@redhat.com>
3875
3876 * class.c (add_assume_compiled): Don't adjust parent if we're
3877 already at the root of tree.
3878
3879 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3880
3881 * lang.c (dump_compound_expr): Prototype.
3882
3883 2003-01-03 Tom Tromey <tromey@redhat.com>
3884
3885 Fix for PR java/8712:
3886 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
3887 when simply checking against `null'.
3888
3889 2003-01-03 Tom Tromey <tromey@redhat.com>
3890
3891 * gcj.texi (Standard Properties): Document http.proxyHost and
3892 http.proxyPort.
3893
3894 * gcj.texi (GNU Classpath Properties): Document new properties.
3895
3896 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3897
3898 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
3899 java/lang-options.h, java/mangle.c, java/mangle_name.c,
3900 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
3901
3902 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3903
3904 * Make-lang.in, boehm.c, buffer.c,
3905 buffer.h, builtins.c, class.c,
3906 config-lang.in, constants.c,
3907 convert.h, decl.c, except.c,
3908 expr.c, java-except.h,
3909 java-tree.h, javaop.def,
3910 jcf-parse.c, jcf-write.c,
3911 jv-scan.c, jvgenmain.c,
3912 jvspec.c, keyword.gperf,
3913 keyword.h, lang-options.h,
3914 lang-specs.h, lang.c, lex.c,
3915 lex.h, mangle.c, mangle_name.c,
3916 parse-scan.y, parse.h, parse.y,
3917 typeck.c, verify.c, xref.c,
3918 xref.h: Replace "GNU CC" with
3919 "GCC" in the copyright header.
3920
3921 * check-init.c, gjavah.c, javaop.h,
3922 jcf-depend.c, jcf-dump.c, jcf-io.c,
3923 jcf-path.c, jcf-reader.c, jcf.h,
3924 zextract.c, zipfile.h: These files are
3925 "part of GCC". Also say "GCC" not "GNU CC".
3926
3927 2002-12-30 DJ Delorie <dj@redhat.com>
3928
3929 * Make-lang.in: Protect against texi2pod/pod2man failing.
3930
3931 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
3932
3933 * gcj.texi: Use @copying.
3934
3935 2002-12-27 Mark Mitchell <mark@codesourcery.com>
3936
3937 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
3938 print_cxx_classname.
3939 (print_cxx_classname): Add add_scope parameter.
3940 (print_class_decls): Do not emit a semicolon after the extern
3941 "Java" block.
3942 (process_file): Adjust calls to print_cxx_classname.
3943
3944 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
3945
3946 * gcj.texi: Include Cover Texts in man page.
3947
3948 2002-12-23 Jeff Sturm <jsturm@one-point.com>
3949
3950 * class.c (build_static_field_ref): Check FIELD_FINAL.
3951
3952 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
3953 instead of current_constant_pool_data_ref.
3954 * java-tree.h (current_constant_pool_data_ref): Undefine.
3955 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
3956 * jcf-parse.c (init_outgoing_cpool): Don't initialize
3957 current_constant_pool_data_ref.
3958
3959 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
3960 not build_internal_class_name.
3961
3962 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
3963 Use it when class ref isn't certain to be compiled.
3964
3965 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
3966
3967 * gcj.texi: Include gcc-common.texi.
3968 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
3969 $(srcdir)/doc/include/gcc-common.texi.
3970
3971 2002-12-22 Anthony Green <green@redhat.com>
3972
3973 * gcj.texi (Limitations): Add note about org.xml.sax and
3974 org.w3c.dom.
3975
3976 2002-12-20 Tom Tromey <tromey@redhat.com>
3977
3978 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
3979 where minimum case value is Integer.MIN_VALUE.
3980 Fixes PR java/8955.
3981
3982 2002-12-18 Andrew Haley <aph@redhat.com>
3983
3984 * parse.y (patch_invoke): Force evaluation order when `check' is
3985 set. For PR libgcj/8945.
3986
3987 2002-12-16 Mark Mitchell <mark@codesourcery.com>
3988
3989 * gcj.texi: Change version number to 3.4.
3990
3991 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
3992 Andrew Haley <aph@redhat.com>
3993
3994 * parse.y (source_end_java_method): Remove custom encoding of line
3995 numbers for a function decl before passing it to the back end.
3996
3997 2002-12-03 Andrew Haley <aph@redhat.com>
3998
3999 * class.c (make_class_data): New field, "chain".
4000 * decl.c (java_init_decl_processing): Likewise.
4001
4002 2002-12-02 Tom Tromey <tromey@redhat.com>
4003
4004 For PR java/8740:
4005 * parse.y (do_resolve_class): Handle qualified name via
4006 recursion.
4007
4008 2002-11-30 Zack Weinberg <zack@codesourcery.com>
4009
4010 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
4011 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
4012 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
4013 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
4014 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
4015 Include coretypes.h and tm.h.
4016 * Make-lang.in: Update dependencies.
4017
4018 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4019
4020 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
4021
4022 2002-11-25 Diego Novillo <dnovillo@redhat.com>
4023
4024 * jcf-reader.c: Don't expand JCF_readu4 inside the
4025 expansion of JCF_SKIP.
4026
4027 2002-11-25 Diego Novillo <dnovillo@redhat.com>
4028
4029 * jcf-reader.c: Don't expand JCF_readu4 inside the
4030 expansion of JCF_SKIP.
4031
4032 2002-11-22 Tom Tromey <tromey@redhat.com>
4033
4034 * parse.y (patch_binop): Cast right hand side of shift expression
4035 to `int'. Fixes PR java/8676.
4036
4037 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
4038 Andrew Haley <aph@redhat.com>
4039
4040 * gcc/java/jcf-write.c (write_classfile): Remove target
4041 class file, if it exists, before renaming the temporary
4042 class file to it.
4043
4044 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
4045
4046 * jvspec.c (lang_specific_spec_functions): New.
4047
4048 2002-11-18 Tom Tromey <tromey@redhat.com>
4049
4050 Fix for PR java/7912:
4051 * expr.c (can_widen_reference_to): Allow cast of array to
4052 Cloneable or Serializable.
4053 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
4054 (java_io_serializable_identifier_node): Likewise.
4055 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
4056 (valid_ref_assignconv_cast_p): Use new identifier nodes.
4057 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
4058 java_io_serializable.
4059 * decl.c (java_init_decl_processing): Initialize
4060 java_lang_cloneable_identifier_node and
4061 java_io_serializable_identifier_node.
4062 (java_lang_cloneable_identifier_node): New global.
4063 (java_io_serializable_identifier_node): Likewise.
4064
4065 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
4066
4067 * buffer.c: Remove unnecessary casts.
4068 * check-init.c: Likewise.
4069 * class.c: Likewise.
4070 * constants.c: Likewise.
4071 * decl.c: Likewise.
4072 * except.c: Likewise.
4073 * gjavah.c: Likewise.
4074 * jcf-io.c: Likewise.
4075 * jcf-parse.c: Likewise.
4076 * jcf-path.c: Likewise.
4077 * jvspec.c: Likewise.
4078 * lang.c: Likewise.
4079 * lex.c: Likewise.
4080 * verify.c: Likewise.
4081
4082 2002-11-06 Tom Tromey <tromey@redhat.com>
4083
4084 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
4085 a JNI header.
4086
4087 2002-11-05 Tom Tromey <tromey@redhat.com>
4088
4089 Fix for PR java/6388.
4090 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
4091 * java-tree.h (enum java_tree_index): New values
4092 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
4093 (decimal_int_max, decimal_long_max): New defines.
4094 * lex.c (yylex): Rewrote range checking. Sign extend literals.
4095 (error_if_numeric_overflow): Rewrote range checking.
4096 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
4097 decimal_long_max.
4098
4099 2002-11-02 Tom Tromey <tromey@redhat.com>
4100
4101 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
4102
4103 * class.c (make_method_value): Put class name, not signature, into
4104 `throws' field. For PR java/8415.
4105
4106 2002-10-24 Tom Tromey <tromey@redhat.com>
4107
4108 * gcj.texi (Invoking gij): Document --showversion.
4109 (Standard Properties): java.library.path now set.
4110
4111 2002-10-23 Tom Tromey <tromey@redhat.com>
4112
4113 * gjavah.c (decode_signature_piece): In JNI mode, print
4114 `jobjectArray' when array depth is nonzero.
4115 Fixes PR java/8296.
4116
4117 2002-10-15 Andrew Haley <aph@redhat.com>
4118
4119 * parse.y (patch_invoke): Call force_evaluation_order on a static
4120 arg list.
4121 (resolve_qualified_expression_name): Call force_evaluation_order
4122 on a arg list that is part of a Qualified Expression Name.
4123
4124 * lang.c (dump_compound_expr): New.
4125 (java_dump_tree): New.
4126
4127 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
4128
4129 * gcj.texi: Added item describing the GCJ runtime property
4130 "gnu.gcj.progname".
4131
4132 2002-10-15 Richard Henderson <rth@redhat.com>
4133
4134 * jcf-parse.c (get_constant): Fix type warning.
4135
4136 2002-10-15 Andrew Haley <aph@redhat.com>
4137
4138 * java-tree.h (java_inlining_merge_static_initializers): Declare.
4139 (java_inlining_map_static_initializers): Declare.
4140
4141 2002-10-14 Andrew Haley <aph@redhat.com>
4142
4143 * tree-inline.c (remap_block): All local class initialization
4144 flags go in the outermost scope.
4145 (expand_call_inline): Call java_inlining_map_static_initializers.
4146 (expand_call_inline): Call java_inlining_merge_static_initializers.
4147 * java/lang.c (merge_init_test_initialization): New.
4148 (java_inlining_merge_static_initializers): New.
4149 (inline_init_test_initialization): New.
4150 (java_inlining_map_static_initializers): New.
4151
4152 2002-10-11 Mark Wielaard <mark@klomp.org>
4153
4154 * gcj.texi (Compatibility): Add Limitations and Extensions section.
4155
4156 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4157
4158 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
4159
4160 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4161
4162 * parse.y (merge_string_cste): Add parentheses around & within |.
4163
4164 2002-10-08 Tom Tromey <tromey@redhat.com>
4165
4166 * parse.y (variable_declarator_id): Simplify error path for
4167 array declarator error. For PR java/8003.
4168
4169 2002-10-08 Zack Weinberg <zack@codesourcery.com>
4170
4171 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
4172 bug_report_url.
4173
4174 2002-10-08 Andrew Haley <aph@redhat.com>
4175
4176 * parse.y (attach_init_test_initialization_flags): Check for
4177 error_mark_node.
4178
4179 2002-10-07 Anthony Green <green@redhat.com>
4180
4181 * parse.y (merge_string_cste): Fix bug in string concatenation.
4182
4183 2002-10-03 Michael Koch <konqueror@gmx.de>
4184
4185 * gcj.texi (Standard properties):
4186 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
4187
4188 2002-10-02 Roger Sayle <roger@eyesopen.com>
4189
4190 PR optimization/6627
4191 * lang.c (java_init): If storing the vbit in function
4192 pointers, ensure that force_align_functions_log is atleast
4193 one to aid compatability with g++ vtables.
4194
4195 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
4196
4197 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
4198 foul of type-based aliasing.
4199
4200 2002-09-30 Anthony Green <green@redhat.com>
4201
4202 * gcj.texi (Invoking jv-scan): Fix texinfo.
4203
4204 2002-09-28 Anthony Green <green@redhat.com>
4205
4206 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
4207 (Code Generation): Add -fno-assert documentation.
4208 * jv-scan.c (flag_assert): New global.
4209 (options): Add assert option.
4210 (help): Add --no-assert documentation.
4211 * parse-scan.y (flag_assert): New global.
4212 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
4213 (flag_assert): New global.
4214 * java-tree.h (flag_assert): New global.
4215 * lex.c (java_lex): Obey flag_assert.
4216 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
4217 calling cc1.
4218
4219 2002-09-26 Andrew Haley <aph@redhat.com>
4220
4221 * expr.c (build_java_array_length_access): Check for null pointer.
4222 * expr.c (expand_java_arrayload): Likewise.
4223
4224 2002-09-21 Richard Henderson <rth@redhat.com>
4225
4226 * jcf-parse.c (get_constant): Decode from IEEE no matter
4227 what the target format.
4228
4229 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
4230
4231 * ChangeLog: Follow spelling conventions.
4232 * class.c: Likewise.
4233 * decl.c: Likewise.
4234 * expr.c: Likewise.
4235 * gjavah.c: Likewise.
4236 * java-tree.h: Likewise.
4237 * jcf-dump.c: Likewise.
4238 * jcf-parse.c: Likewise.
4239 * jvspec.c: Likewise.
4240 * lang.c: Likewise.
4241 * mangle.c: Likewise.
4242 * parse.y: Likewise.
4243
4244 2002-09-17 Tom Tromey <tromey@redhat.com>
4245
4246 * lex.c (java_read_unicode_collapsing_terminators): Handle case
4247 where \r appears at EOF. Fixes PR java/7950.
4248
4249 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4250
4251 * jvspec.c (lang_specific_driver): Remove unused variable.
4252
4253 2002-09-16 Geoffrey Keating <geoffk@apple.com>
4254
4255 * java-tree.h (union lang_tree_node): Add chain_next option.
4256
4257 2002-09-16 Richard Henderson <rth@redhat.com>
4258
4259 * jcf-parse.c (get_constant): Runtime check for IEEE format;
4260 use new real.h interface.
4261 * jcf-write.c (find_constant_index): Use new real.h interface.
4262 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
4263
4264 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
4265
4266 * lang.c: Follow spelling conventions.
4267
4268 2002-09-11 Per Bothner <per@bothner.com>
4269
4270 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
4271 constant to the type of the field.
4272 (java_complete_tree): Remove now-redundant code.
4273
4274 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
4275
4276 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
4277
4278 For PR java/5794:
4279 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
4280 return label if a ret instruction for the jsr has been reached.
4281
4282 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
4283
4284 * parse.y (DIR_SEPARATOR): Don't define.
4285 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
4286
4287 2002-08-28 Andrew Haley <aph@redhat.com>
4288
4289 * verify.c (verify_jvm_instructions): Allow exception handler
4290 inside code that is being protected, but generate a warning.
4291 * except.c (link_handler): Initialize `expanded' in new eh_range.
4292 (binding_depth, is_class_level, current_pc): Declare extern.
4293
4294 2002-09-01 Mark Wielaard <mark@klomp.org>
4295
4296 * gcj.texi: Add chapter about system properties.
4297 Fixed some typos.
4298
4299 2002-08-26 Tom Tromey <tromey@redhat.com>
4300
4301 * parse.y (try_builtin_assignconv): Allow narrowing primitive
4302 conversion if RHS_TYPE is byte, short, or char.
4303
4304 2002-08-22 Tom Tromey <tromey@redhat.com>
4305
4306 * gcj.texi (Invoking gij): Document -cp and -classpath.
4307
4308 2002-08-21 Tom Tromey <tromey@redhat.com>
4309
4310 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
4311 $(prefix)/share. For PR libgcj/7633.
4312
4313 For PR java/6005 and PR java/7611:
4314 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
4315 (java_can_use_bit_fields_p): New function.
4316
4317 2002-08-16 Tom Tromey <tromey@redhat.com>
4318
4319 * gcj.texi (Class Initialization): Mention class initialization of
4320 arrays.
4321
4322 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
4323
4324 * Make-lang.in (java-tree-inline.o): New.
4325 (JAVA_OBJS): Add java-tree-inline.o.
4326 * parse.y (source_end_java_method): Call java_optimize_inline.
4327 (java_expand_method_bodies): Save method's tree in
4328 DECL_SAVED_TREE.
4329 (add_stmt_to_compound): Keep track of the number of statments.
4330 * lang.c (java_init): Enable flag_inline_trees.
4331 (java_post_options): If flag_inline_functions is on, enable
4332 flag_inline_trees instread.
4333 (decl_constant_value): New.
4334 (java_tree_inlining_walk_subtrees): New.
4335 * java-tree.h (DECL_NUM_STMTS): New macro.
4336 (java_optimize_inline): Declare.
4337 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
4338 Handle a LABEL_EXPR.
4339 * decl.c (build_result_decl): If we already have a DECL_RESULT
4340 don't make another.
4341 (dump_function): New.
4342 (java_optimize_inline): New.
4343 (dump_function): New.
4344
4345 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
4346
4347 For PR java/7483:
4348 * parse.y (build_assertion): Invert return from
4349 desiredAssertionStatus.
4350
4351 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4352
4353 * jcf-write.c (get_access_flags): Return correct access flags for
4354 private and protected inner classes.
4355
4356 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4357
4358 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
4359
4360 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
4361
4362 * mangle_name.c: Don't include obstack.h twice.
4363 * xref.c: Don't include obstack.h.
4364
4365 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
4366
4367 * class.c: (permanent_obstack): Delete declaration.
4368 * constants.c: (permanent_obstack): Delete declaration.
4369 * except.c: (permanent_obstack): Delete declaration.
4370 * expr.c: (permanent_obstack): Delete declaration.
4371 * jcf-parse.c: (permanent_obstack): Delete declaration.
4372 (saveable_obstack): Delete declaration.
4373 * parse.h: (permanent_obstack): Delete declaration.
4374 * typeck.c: (permanent_obstack): Delete declaration.
4375
4376 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
4377
4378 * gcj.texi (version-gcc): Increase to 3.3.
4379
4380 2002-07-22 Tom Tromey <tromey@redhat.com>
4381
4382 * lex.c (java_lex): Check for `e' or `E' after 0.
4383
4384 2002-07-21 Richard Henderson <rth@redhat.com>
4385
4386 * lang.c (java_unsafe_for_reeval): New.
4387 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
4388
4389 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
4390
4391 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
4392 (jcf_path_init): Use GET_ENVIRONMENT.
4393
4394 2002-07-10 Roger Sayle <roger@eyesopen.com>
4395 Zack Weinberg <zack@codesourcery.com>
4396
4397 * builtins.c (initialize_builtins): Remove defines that
4398 handled C/C++ specific junk hereby removed from builtins.def.
4399
4400 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
4401
4402 * lang.c (java_post_options): Update prototype.
4403
4404 2002-07-05 Roger Sayle <roger@eyesopen.com>
4405
4406 * builtins.c (initialize_builtins): Ignore the additional
4407 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
4408 the builtins.def file.
4409
4410 2002-07-01 Tom Tromey <tromey@redhat.com>
4411
4412 For PR libgcj/7073:
4413 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
4414 specially.
4415
4416 2002-07-01 Roger Sayle <roger@eyesopen.com>
4417
4418 * java/decl.c (builtin_function): Accept additional parameter.
4419 (java_init_decl_processing): Pass an additional NULL_TREE
4420 argument to builtin_function.
4421
4422 2002-06-29 T.J. Mather <tjmather@maxmind.com>
4423
4424 * gcj.texi: Fixed gcj invocation example so that it compiles.
4425
4426 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4427
4428 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
4429 * parse.y (mark_parser_ctxt): Likewise.
4430 (check_modifiers, declare_local_variables): Avoid incorrect
4431 hardcoded constant 10.
4432
4433 * lex.c (java_read_char): Avoid "comparison is always true"
4434 warning.
4435
4436 2002-06-25 Andreas Schwab <schwab@suse.de>
4437
4438 * expr.c (JSR): Avoid undefined operation on PC.
4439
4440 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4441
4442 * decl.c (clear_binding_level): Const-ify.
4443
4444 2002-06-13 Akim Demaille <akim@epita.fr>
4445
4446 * parse.y (class_declaration, interface_declaration): Make sure
4447 all their rules have an action, in order to avoid meaningless `$$
4448 = $1' and their type clashes.
4449
4450 2002-06-11 Tom Tromey <tromey@redhat.com>
4451
4452 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
4453 * parse-scan.y (statement_without_trailing_substatement): Added
4454 assert_statement.
4455 (assert_statement): New rule.
4456 * java-tree.h (struct lang_type) [assertions]: New field.
4457 (TYPE_USES_ASSERTIONS): New macro.
4458 (CLASS_USES_ASSERTIONS): Likewise.
4459 (FIELD_SYNTHETIC): New define.
4460 * lex.c (java_lval;): Added ASSERT_TK.
4461 * parse.y (ASSERT_TK): Added.
4462 (statement_without_trailing_substatement): Added assert_statement.
4463 (assert_statement): New rule.
4464 (build_assertion): New function.
4465 (maybe_generate_pre_expand_clinit): Create and initialize
4466 $assertionsDisabled.
4467 (lookup_package_type): Removed decl.
4468 * keyword.h: Rebuilt.
4469 * keyword.gperf (assert): New token.
4470
4471 2002-06-10 Akim Demaille <akim@epita.fr>
4472
4473 * parse.y (interface_type_list, class_member_declaration)
4474 (unary_expression_not_plus_minus): Remove duplicate %type.
4475 Whitespace changes.
4476
4477 2002-06-09 Tom Tromey <tromey@redhat.com>
4478
4479 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
4480
4481 * parse.y (method_header): Give error message in all cases.
4482 Fixes PR java/6865.
4483
4484 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4485
4486 Don't use RTL inlining. Fix for PR java/6820.
4487 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
4488 (flag_really_inline): New.
4489 (java_decode_option): Set flag_really_inline if -finline-functions
4490 is seen.
4491 (java_post_options): New function. Turn off inlining unless
4492 flag_really_inline is set.
4493
4494 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4495
4496 * gjavah.c (throwable_p): Accept argument as either a classname or
4497 signature fragment. Create null-terminated classname string for super
4498 when calling itself recursively.
4499 (decode_signature_piece): Skip first character from class name
4500 signature when calling throwable_p.
4501
4502 2002-06-08 H.J. Lu (hjl@gnu.org)
4503
4504 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
4505
4506 2002-06-04 Tom Tromey <tromey@redhat.com>
4507
4508 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
4509
4510 2002-06-04 Michael Koch <konqueror@gmx.de>
4511
4512 * gcj.texi (Input Options): Fixed typo.
4513
4514 2002-06-04 Zack Weinberg <zack@codesourcery.com>
4515
4516 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
4517 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
4518 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
4519 and all now-pointless local variables. Rename other local
4520 variables to reflect their not being handles.
4521
4522 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
4523 #if JCF_USE_STDIO blocks.
4524
4525 * parse.y: Add missing semicolon at end of rule.
4526
4527 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
4528
4529 * check-init.c (attach_initialized_static_class): Delete, unused.
4530 * parse.y: Use htab_t instead of struct hashtable, update
4531 all uses.
4532 * java-tree.h: Include hashtab.h instead of hash.h.
4533 (struct lang_decl_func): Use htab_t, set up for gengtype.
4534 (struct init_test_hash_entry): Delete.
4535 (struct treetreehash_entry): New.
4536 (java_treetreehash_find): New
4537 (java_treetreehash_new): New prototype.
4538 (java_treetreehash_create): New prototype.
4539 (java_mark_tree): Delete prototype.
4540 (java_hash_hash_tree_node): Delete prototype.
4541 (java_hash_compare_tree_node): Delete prototype.
4542 (attach_initialized_static_class): Delete prototype.
4543 * expr.c (build_class_init): Update to use java_treetreehash
4544 functions.
4545 (java_expand_expr): Update to use htab_t.
4546 (emit_init_test_initialization): Likewise.
4547 * decl.c (java_mark_tree): Delete.
4548 * class.c (init_test_hash_newfunc): Delete.
4549 (java_hash_hash_tree_node): Delete.
4550 (java_hash_compare_tree_node): Delete.
4551 (add_method_1): Update to use java_treetreehash functions.
4552 (JAVA_TREEHASHHASH_H): New macro.
4553 (java_treetreehash_hash): New function.
4554 (java_treetreehash_compare): New function.
4555 (java_treetreehash_find): New function.
4556 (java_treetreehash_new): New function.
4557 (java_treetreehash_create): New function.
4558 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
4559
4560 * Make-lang.in (java/parse.o): Depend on debug.h.
4561 * java-tree.h (struct lang_identifier): Use gengtype.
4562 (union lang_tree_node): New.
4563 (struct lang_decl_func): Use gengtype.
4564 (struct lang_decl_var): Likewise.
4565 (struct lang_decl): Likewise.
4566 * parse.y: Include debug.h.
4567 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
4568
4569 * lang.c (struct language_function): New dummy structure.
4570
4571 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
4572 descriminator for DECL_LANG_SPECIFIC.
4573 (struct lang_decl_func): Rename from struct lang_decl.
4574 (enum lang_decl_desc): New.
4575 (struct lang_decl): Make it a union. Update all the accessor macros.
4576 (struct lang_type): Use gengtype.
4577 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
4578 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
4579 are now the same size.
4580 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
4581 use discriminator to mark DECL_LANG_SPECIFIC.
4582
4583 * Make-lang.in (gt-java-builtins.h): New rule.
4584 (java/builtins.o): Add dependency on gt-<filename>.h.
4585 * builtins.c: Use gengtype for roots.
4586 (union string_or_tree): Use gengtype.
4587 (struct builtin_record): Use gengtype.
4588 * config-lang.in (gtfiles): Add builtins.c.
4589
4590 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
4591 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
4592 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
4593 gt-java-parse.h, gtype-java.h): Add rules to generate.
4594 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
4595 (class.o): Add dependency on gt-*.h.
4596 (constants.o): Likewise.
4597 (decl.o): Likewise.
4598 (expr.o): Likewise.
4599 (jcf-parse.o): Likewise.
4600 (jcf-write.o): Likewise.
4601 (lang.o): Likewise.
4602 * config-lang.in (gtfiles): New.
4603 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4604 * constants.c: Replace uses of ggc_add_* with GTY markers.
4605 Include gt-*.h.
4606 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4607 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4608 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
4609 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
4610 Include gt-*.h.
4611 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
4612 Include gt-*.h.
4613 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4614 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
4615 gt-*.h.
4616 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4617 Include gtype-java.h.
4618
4619 2002-06-02 Tom Tromey <tromey@redhat.com>
4620
4621 Fix for PR java/5913:
4622 * parse.y (patch_binop): Call patch_string on op1.
4623
4624 2002-06-02 Tom Tromey <tromey@redhat.com>
4625
4626 Fix for PR java/1343, PR java/6336:
4627 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
4628 formatting. Changed return type.
4629 (anonymous_class_counter): Moved to top of file.
4630 (maybe_make_nested_class_name): Append number to class name for
4631 function-local classes.
4632
4633 2002-05-28 Zack Weinberg <zack@codesourcery.com>
4634
4635 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
4636 * Make-lang.in: Update dependency lists.
4637
4638 2002-05-18 Mark Mitchell <mark@codesourcery.com>
4639
4640 * gjavah.c (throwable_p): Do not free the name of the class after
4641 passing it to find_class.
4642 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
4643 * jcf-io.c (dirent.h): Include it.
4644 (fnmatch.h): Likewise.
4645 (compare_path): New function.
4646 (java_or_class_file): Likewise.
4647 (memoized_dirlist_entry): New type.
4648 (memoized_dirlist_lookup_eq): New function.
4649 (memoized_dirlists): New variable.
4650 (caching_stat): New function.
4651 (memoized_class_lookup_eq): New function.
4652 (memoized_class_lookups): Likewise.
4653 (find_class): Use memoized_class_lookups and caching_stat.
4654 * jcf.h (JCF_USE_SCANDIR): Define.
4655 * parse.y (java_expand_classes): Write the class files in reverse
4656 order.
4657
4658 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4659
4660 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
4661
4662 2002-05-13 Mark Mitchell <mark@codesourcery.com>
4663
4664 * jcf-write.c (write_classfile): Unlink the temporary file if it
4665 cannot be renamed. Use concat to build up the name of the
4666 temporary file.
4667
4668 2002-05-08 Mark Mitchell <mark@codesourcery.com>
4669
4670 * jcf-write.c (write_classfile): Write the file to a
4671 temporary file and then rename it.
4672
4673 2002-05-07 Tom Tromey <tromey@redhat.com>
4674
4675 * gjavah.c (throwable_p): Use xstrdup, not strdup.
4676
4677 Fix for PR java/1200:
4678 * gjavah.c (throwable_p): New function.
4679 (decode_signature_piece): Use it. A `WeakReference' isn't the
4680 same as a `jweak'.
4681 Include hashtab.h.
4682 (gcjh_streq): New function.
4683
4684 2002-05-07 Andreas Jaeger <aj@suse.de>
4685
4686 * parse.y (finish_for_loop): Fix if statement.
4687
4688 2002-05-06 Tom Tromey <tromey@redhat.com>
4689
4690 Fix for PR java/5941:
4691 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
4692 loop update expression.
4693 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
4694 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
4695
4696 2002-05-04 Mark Wielaard <mark@klomp.org>
4697
4698 For PR java/6519:
4699 * parse.y (build_string_concatenation): Return just op1 only when op2
4700 is null and op1 is a STRING_CST, otherwise always construct a
4701 StringBuffer.
4702
4703 2002-04-27 Tom Tromey <tromey@redhat.com>
4704
4705 For PR java/6382:
4706 * parse.y (string_convert_int_cst): New function.
4707 (merge_string_cste): Use it.
4708
4709 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
4710
4711 * java-tree.h (java_parse_file): Update.
4712 (java_set_yydebug): Remove.
4713 * jcf-parse.c (yydebug): Remove.
4714 (java_set_yydebug): Die.
4715 (java_parse_file): Update.
4716 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4717
4718 2002-04-24 Tom Tromey <tromey@redhat.com>
4719
4720 For PR java/6425:
4721 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
4722 EXPR_WFL_QUALIFICATION of qual_wfl.
4723
4724 2002-04-23 Per Bothner <per@bothner.com>
4725
4726 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
4727 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
4728 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
4729
4730 2002-04-23 Tom Tromey <tromey@redhat.com>
4731
4732 For PR java/6314:
4733 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
4734 recognize `-fcompile-resource='.
4735 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
4736 a bit.
4737
4738 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
4739
4740 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
4741 paths. Fixes PR java/2791.
4742
4743 2002-04-19 Andrew Haley <aph@redhat.com>
4744
4745 * jcf-write.c (push_long_const): lo, hi: New variables.
4746 Use rshift_double to extract the high part of a 64-bit long.
4747 Use WORD_TO_INT to extract the low part.
4748
4749 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
4750 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
4751 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
4752
4753 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
4754
4755 * typeck.c (incomplete_type_error): Remove.
4756
4757 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4758
4759 * class.c (make_class_data): Set DECL_ALIGN on static class data,
4760 for hash synchronization.
4761 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
4762 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
4763 class_type_node.
4764
4765 2002-04-16 Mark Wielaard <mark@klomp.org>
4766
4767 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
4768 negative zero.
4769
4770 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4771
4772 Fix for PR java/6294:
4773 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
4774 interfaces.
4775
4776 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4777
4778 Fix for PR java/6085:
4779 * parse.y (patch_method_invocation): Always use build_access_to_thisn
4780 to get enclosing "this" argument for inner-class constructor
4781 invocation. Pass correct arguments to build_access_to_thisn.
4782
4783 2002-04-10 Andreas Jaeger <aj@suse.de>
4784
4785 * gcj.texi (Input Options): Fix extdirs patch.
4786
4787 2002-04-10 Anthony Green <green@redhat.com>
4788
4789 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
4790
4791 2002-04-09 Anthony Green <green@redhat.com>
4792
4793 * gcj.texi (Input Options): Add --extdirs documentation.
4794 * jcf-dump.c (OPT_extdirs): New macro.
4795 (options): Add extdirs option.
4796 (help): Describe --extdirs.
4797 (main): Handle OPT_extdirs.
4798 * gjavah.c (OPT_extdirs): New macro.
4799 (options): Add extdirs option.
4800 (help): Describe --extdirs.
4801 (main): Handle OPT_extdirs.
4802 * jcf-path.c (jcf_path_init): Add extdirs support.
4803 (jcf_path_extdirs_arg): New function.
4804 (extensions): New variable to hold extensions path entries.
4805 * jvspec.c: Remove -fextdirs= when compiling main().
4806 * lang.c (java_decode_option): Handle -fextdirs=.
4807 * jcf.h (jcf_path_extdirs_arg): Declare new function.
4808 * Make-lang.in: Compile jcf-path with version info for use in
4809 identifying the appropriate libgcj.jar.
4810
4811 2002-04-08 Tom Tromey <tromey@redhat.com>
4812
4813 For PR libgcj/5303:
4814 * .cvsignore: Added rmic.1 and rmiregistry.1.
4815 * gcj.texi (Top): Link to new nodes.
4816 (Invoking rmic): New node.
4817 (Invoking rmiregistry): Likewise.
4818 * Make-lang.in (java.generated-manpages): Added rmic.1 and
4819 rmiregistry.1.
4820 (java.maintainer-clean): Likewise.
4821 ($(srcdir)/java/rmic.1): New target.
4822 ($(srcdir)/java/rmiregistry.1): Likewise.
4823 (java.install-man): Handle rmic.1 and rmiregistry.1.
4824
4825 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4826
4827 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
4828 Add note about handling uncaught exceptions. Add an exception handler
4829 to example.
4830
4831 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4832
4833 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
4834 after using it to patch CALL_EXPR.
4835
4836 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4837
4838 * gcj.texi (Invocation): Document CNI invocation API.
4839
4840 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
4841
4842 * expr.c (truthvalue_conversion): Rename. Update.
4843 (expand_compare): Update.
4844 * java-tree.h (java_truthvalue_conversion): New.
4845 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4846
4847 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4848
4849 * java-tree.h (java_mark_addressable): New.
4850 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4851 * typeck.c (mark_addressable): Rename, update.
4852
4853 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
4854
4855 * expr.c (build_java_binop): Update.
4856 * java-tree.h (java_signed_type, java_unsigned_type,
4857 java_signed_or_unsigned_type): Update.
4858 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4859 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4860 * parse.y (patch_binop): Update.
4861 * typeck.c (signed_or_unsigned_type, unsigned_type,
4862 signed_type): Update.
4863
4864 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
4865
4866 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4867 (java_dummy_print): Remove.
4868 (lang_print_error): Rename. Exit early if inhibiting output.
4869 (inhibit_error_printing_function): New.
4870 (java_init): Don't set hook.
4871 (lang_init_source): Use new boolean.
4872
4873 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
4874
4875 * parse.y (do_resolve_class): Fix infinite recursion.
4876
4877 2002-03-29 Tom Tromey <tromey@redhat.com>
4878
4879 * parse.y (check_inner_circular_reference): Ignore incomplete
4880 types.
4881
4882 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
4883
4884 * Make-lang.in (builtins.o): Update.
4885 * boehm.c (get_boehm_type_descriptor): Update.
4886 * builtins.c: Include langhooks.h.
4887 * decl.c (java_init_decl_processing): Update.
4888 * java-tree.h (java_type_for_mode, java_type_for_size): New.
4889 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
4890 Redefine.
4891 * typeck.c (type_for_mode, type_for_size): Update.
4892
4893 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
4894
4895 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
4896
4897 2002-03-28 Tom Tromey <tromey@redhat.com>
4898
4899 * except.c (expand_end_java_handler): If the handler type is NULL,
4900 use java.lang.Throwable. Fixes PR java/5986.
4901
4902 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
4903
4904 Fix for PR java/4715:
4905 * jcf-parse.c (parse_source_file_3): New function.
4906 (read_class): Call it.
4907 (java_parse_file): Likewise.
4908
4909 2002-03-28 Jan Hubicka <jh@suse.cz>
4910
4911 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
4912
4913 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4914
4915 * parse.y (resolve_package): Initialize "decl".
4916 (lookup_package_type): Remove unused function.
4917
4918 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4919
4920 Fix for PR java/5993:
4921 * parse.y (resolve_package): Return the decl if resolution was
4922 successful. Don't special case "java.lang" and "java.lang.reflect"
4923 packages. Set type_name to the merged identifier.
4924 (resolved_qualified_expression_name): Print error using "name" if
4925 resolve_package returns NULL_TREE.
4926
4927 2002-03-27 Tom Tromey <tromey@redhat.com>
4928
4929 * expr.c (expand_invoke): Don't generate null pointer check if
4930 we're calling <init>.
4931
4932 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
4933
4934 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
4935 fix prototype.
4936 * java-tree.h (java_lang_expand_expr): Similarly.
4937 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4938 (java_init): Don't set hook.
4939
4940 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4941
4942 Fix for PR java/5850:
4943 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
4944 context if field was not found in the current scope.
4945 * expr.c (lookup_field): Don't look in enclosing contexts.
4946
4947 2002-03-26 Tom Tromey <tromey@redhat.com>
4948
4949 Fix for PR java/5942:
4950 * parse.y (init_src_parse): Added sanity check.
4951 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
4952 elements, not 11.
4953
4954 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
4955
4956 * decl.c (lang_mark_tree): Rename java_mark_tree.
4957 * java-tree.h (java_mark_tree): New.
4958 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4959
4960 2002-03-25 Zack Weinberg <zack@codesourcery.com>
4961
4962 * lex.c: Change java_perform_atof to take normal parameters
4963 instead of a pointer to a parameter block. Call it directly
4964 from java_lex.
4965
4966 2002-03-22 Mark Wielaard <mark@klomp.org>
4967
4968 Fix for PR java/5368:
4969 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
4970 when printing error message.
4971
4972 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
4973
4974 * decl.c (maybe_build_cleanup): Remove.
4975
4976 2002-03-22 Tom Tromey <tromey@redhat.com>
4977
4978 Andrew Haley <aph@cambridge.redhat.com>
4979
4980 * expr.c (build_field_ref): Don't build a check if the field is a
4981 member of `this'.
4982
4983 2002-03-21 Eric Blake <ebb9@email.byu.edu>
4984
4985 Fix for PR java/6026:
4986 * lex.c (java_lex): Fix parsing of consecutive floats.
4987
4988 2002-03-21 Tom Tromey <tromey@redhat.com>
4989
4990 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
4991 class.
4992
4993 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
4994
4995 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4996 insert_block, getdecls, kept_level_p, global_bindings_p): New.
4997
4998 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
4999
5000 * gcj.texi: @code{gcj} becomes @command{gcj}.
5001 @code{gcc} becomes @command{gcc}.
5002 GcjRaw changed to gnu.gcc.RawData.
5003
5004 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
5005
5006 * decl.c (start_java_method): Use new hook.
5007 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5008 (java_init): Remove old hook.
5009
5010 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
5011
5012 * builtins.c (define_builtin): Do nothing if `type' is null.
5013 Fixes PR java/5876.
5014
5015 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5016
5017 * parse.y (parser_check_super_interface): Fix error message
5018 grammar/order.
5019
5020 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5021
5022 * jcf-parse.c (get_constant): Delete unused variables.
5023
5024 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
5025
5026 * java-tree.h (java_parse_file): New.
5027 * jcf-parse.c (yyparse): Rename java_parse_file.
5028 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5029
5030 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5031
5032 * parse.y (craft_constructor): Return the constructor decl.
5033 (java_expand_classes): Update comments.
5034 (lookup_method_invoke): Call fix_constructors immediately for
5035 anonymous class. Fixes PR java/5935.
5036
5037 2002-03-15 Anthony Green <green@redhat.com>
5038
5039 * jcf-parse.c (yyparse): Don't emit class registration
5040 constructor when compiling resource files.
5041
5042 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5043
5044 * lang.c (java_tree_code_type, java_tree_code_length,
5045 tree_code_name): Delete.
5046 (tree_code_type, tree_code_length, tree_code_name): Define.
5047 (java_init): Don't try to copy into the various tree_code
5048 arrays.
5049
5050 2002-03-12 Tom Tromey <tromey@redhat.com>
5051
5052 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
5053 UTF-8, not UCS-2. Fixes PR java/5923.
5054
5055 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
5056 a call_expr wrapped in a convert. Fixes PR java/5848.
5057
5058 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5059
5060 * jcf-write.c (write_classfile): Improve error strings.
5061
5062 2002-03-11 Eric Blake <ebb9@email.byu.edu>
5063
5064 * lex.c: Adjust comments to GNU standards.
5065
5066 2002-03-11 Eric Blake <ebb9@email.byu.edu>
5067
5068 Fix for PR java/5902:
5069 * lex.c (java_lex): Fix parsing of literals.
5070
5071 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5072
5073 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
5074 to prevent it getting evaluated twice in the store checking case.
5075 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
5076 examining OBJECT.
5077
5078 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5079
5080 * decl.c (java_init_decl_processing): Make sure class_type_node
5081 alignment is not less than 64 bits if hash synchronization is enabled.
5082
5083 2002-03-08 Per Bothner <per@bothner.com>
5084
5085 * parse.y (java_complete_lhs): Check if patch_assignment
5086 returned an error-mark.
5087
5088 * parse.y (try_builtin_assignconv): Don't special-case zero.
5089
5090 2002-03-08 Per Bothner <per@bothner.com>
5091
5092 Fix for PR java/5812.
5093 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
5094 here instead of in JSR macro. Likewise with load_type_state call.
5095 Do the latter on if the return_pc has been verified (the jsr returns).
5096 (JSR): Now just call build_java_jsr.
5097
5098 2002-03-07 Jeff Sturm <jsturm@one-point.com>
5099
5100 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
5101 (java.install-common): Link native driver to
5102 JAVA_TARGET_INSTALL_NAME.
5103
5104 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
5105
5106 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
5107 * builtins.c(sin_builtin): Likewise
5108 * builtins.c(sqrt_builtin): Likewise
5109
5110 2002-03-03 Zack Weinberg <zack@codesourcery.com>
5111
5112 * java/expr.c, java/jcf-parse.c, java/lex.c:
5113 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
5114 REAL_ARITHMETIC blocks unconditional. Delete some further
5115 #ifdef blocks predicated on REAL_ARITHMETIC.
5116
5117 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5118
5119 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
5120 explicit sizeof/sizeof.
5121 * decl.c (java_init_decl_processing): Likewise.
5122 * jcf-parse.c (init_jcf_parse): Likewise.
5123 * parse.y (init_src_parse): Likewise.
5124
5125 2002-03-02 Per Bothner <per@bothner.com>
5126
5127 Make --CLASSPATH by a synonym for --classpath and -classpath.
5128 Implement --bootclasspath.
5129 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
5130 (classpath_l): Remove.
5131 (jcf_path_CLASSPATH_arg): Remove.
5132 (jcf_path_bootclasspath_arg): New function.
5133 (jcf_path_seal): Simplify accordingly.
5134
5135 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
5136 (jcf_path_CLASSPATH): Remove declaration.
5137 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
5138 (lang_specific_driver): Translate -bootclasspath.
5139 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
5140 * lang.c (decode_lang_options): Do jcf_path_init first.
5141 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
5142 * gjavah.c: Also handle --bootclasspath.
5143 Handle --CLASSPATH as a synonum for --classpath.
5144 * jcf-dump.c: Likewise.
5145
5146 "." is not part of system path, but is the default for --classpath.
5147 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
5148 (jcf_path_seal): Add "." if no CLASSPATH specified.
5149
5150 * gcj.texi: Document changes.
5151
5152 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5153
5154 * expr.c (build_java_arraystore_check): Fix formatting.
5155
5156 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
5157
5158 Fix for PR java/5758, java/5632:
5159 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
5160 inner-class separator too.
5161 * parse.y (do_resolve_class): New local `decl_result.'
5162 Progressively build a name for what can have been loaded.
5163
5164 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5165
5166 * expr.c (java_array_data_offset): Removed function.
5167 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
5168 (build_java_array_length_access): Obtain "length" value using a
5169 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
5170 (build_java_arrayaccess): Correct comment. Access "data" using a
5171 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
5172 (build_java_arraystore_check): New function.
5173 (expand_java_arraystore): Use build_java_arraystore_check.
5174 * parse.y (patch_assignment): Simplify code to insert a store check
5175 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
5176 * check-init.c (check_init): Update to reflect that an array length
5177 access is now a COMPONENT_REF.
5178 * gcj.texi (Code Generation): Improve documentation of
5179 -fno-bounds-check. Add documentation for -fno-store-check.
5180 * java-tree.h (flag_store_check): Declare.
5181 (build_java_arraystore_check): Declare.
5182 * lang.c (flag_store_check): Initialize to 1.
5183 (lang_f_options): Add store-check option.
5184 * jvspec.c: Don't pass store-check option to jvgenmain.
5185 * lang-options.h: Add help string for -fno-store-check.
5186
5187 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
5188
5189 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
5190 * java-tree.h (java_dup_lang_specific_decl): New.
5191 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5192
5193 2002-02-27 Zack Weinberg <zack@codesourcery.com>
5194
5195 * builtins.c, decl.c: Delete traditional-mode-related code
5196 copied from the C front end but not used, or used only to
5197 permit the compiler to link.
5198
5199 2002-02-22 Tom Tromey <tromey@redhat.com>
5200
5201 Fix for PR java/2369:
5202 * jvspec.c (verify_class_name): New function.
5203 (lang_specific_driver): Call it.
5204 (JAVA_START_CHAR_P): New macro.
5205 (JAVA_PART_CHAR_P): Likewise.
5206
5207 2002-02-22 Per Bothner <per@bothner.com>
5208
5209 * class.c: Change vtable to be more compatible with g++ v3 abi.
5210 (get_dispatch_table): Prepend offset-to-top (always 0) and
5211 type_info pointer (currently unimplemented hence NULL) to vtable.
5212 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
5213 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
5214 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
5215 (build_dtable_decl): Add declarations for new fields.
5216
5217 2002-02-20 Per Bothner <per@bothner.com>
5218
5219 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
5220 to finit$ (otherwise generate_bytecode_insns drops it). However, we
5221 don't need to set it on the COMPOUND_EXPR - the caller does that.
5222
5223 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5224
5225 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
5226 `--CLASSPATH' becomes `--classpath.'
5227 * gjavah.c: Likewise.
5228 * jcf-dump.c: Likewise.
5229 * lang-options.h: Likewise.
5230 * lang.c: Likewise.
5231 * jcf-path.c: Updated comment.
5232 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
5233 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
5234 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
5235 (jcf_path_CLASSPATH_arg): Ditto.
5236 (classpath_u): Updated leading comment.
5237
5238 2002-02-20 Per Bothner <per@bothner.com>
5239
5240 * builtins.c (check_for_builtin): New function.
5241 (build_call_or_builtin): Remove.
5242 * java-tree.h: Update accordingly.
5243 * expr.c (expand_invoke): Use build + check_for_builtin instead
5244 of build_call_or_builtin.
5245 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
5246 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
5247 flag (which had caused jcf-write to incorrectly emit invokevirtual).
5248
5249 2002-02-17 Tom Tromey <tromey@redhat.com>
5250
5251 * java-tree.h (TYPE_STRICTFP): New macro.
5252 (struct lang_type) [strictfp]: New field.
5253 (CLASS_STRICTFP): New macro.
5254 (METHOD_STRICTFP): New macro.
5255 (struct lang_decl) [strictfp]: New field.
5256 * parse.y (method_header): Disallow strictfp constructor or
5257 abstract method.
5258 (STRICT_TK): Move before MODIFIER_TK.
5259 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
5260 (METHOD_MODIFIERS): Likewise.
5261 (INTERFACE_MODIFIERS): Likewise.
5262 * jcf-write.c (get_access_flags): Likewise.
5263 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
5264 (add_method_1): Likewise.
5265 (get_access_flags_from_decl): Likewise.
5266 * jcf-dump.c (print_access_flags): Print in standard order. Also,
5267 recognize strictfp flag.
5268 * jcf.h (ACC_STRICT): New define.
5269
5270 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
5271
5272 * class.c(build_utf8_ref): Move declaration of decl_size
5273
5274 2002-02-07 Tom Tromey <tromey@redhat.com>
5275
5276 * gcj.texi (Input Options): --CLASSPATH does not suppress system
5277 path.
5278
5279 2002-02-04 Anthony Green <green@redhat.com>
5280
5281 * class.c (build_utf8_ref): Put UTF-8 constants into merged
5282 sections if available.
5283
5284 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5285
5286 * parse.y (java_expand_classes): Fix typo in static field loop.
5287
5288 2002-02-02 Richard Henderson <rth@redhat.com>
5289
5290 * class.c (add_field): Mark static fields external.
5291 (build_class_ref): Remove redundant set.
5292 * parse.y (java_expand_classes): Mark static fields of classes
5293 to be compiled as local.
5294 * jcf-parse.c (parse_class_file): Likewise.
5295
5296 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5297
5298 * gcj.texi (About CNI): New node.
5299
5300 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
5301
5302 PR java/5080
5303 * jcf-parse.c : Check for HAVE_LOCALE_H before using
5304 setlocale() with LC_CTYPE as a parameter.
5305 * jv-scan.c: Same.
5306
5307 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
5308
5309 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5310 Follow GNU Coding Standards for --version.
5311
5312 2002-01-28 Tom Tromey <tromey@redhat.com>
5313
5314 * expr.c (build_jni_stub): Ensure storage for `meth' is
5315 generated.
5316 * parse.y (java_complete_expand_methods): Set
5317 current_function_decl before building JNI stub.
5318
5319 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
5320
5321 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
5322 BUILT_IN_SQRTF.
5323
5324 2002-01-22 Tom Tromey <tromey@redhat.com>
5325
5326 * decl.c (java_init_decl_processing): Use add_predefined_file.
5327 Predefine RawData.java.
5328 (predef_filenames): Removed.
5329 (java_init_decl_processing): Don't register predef_filenames.
5330 * jcf-parse.c (add_predefined_file): New function.
5331 (predefined_filename_p): Rewrote.
5332 (predefined_filename_p): No longer static.
5333 * decl.c (java_init_decl_processing): Call initialize_builtins.
5334 * Make-lang.in (JAVA_OBJS): Added builtins.o.
5335 (java/builtins.o): New target.
5336 * builtins.c: New file.
5337 * parse.y (patch_invoke): Use build_call_or_builtin.
5338 * java-tree.h (build_call_or_builtin): Declare.
5339 (initialize_builtins): Declare.
5340 (java_set_exception_lang_code): Removed unused declaration.
5341 (PREDEF_FILENAMES_SIZE): Removed.
5342 (java_tree_index): Added JTI_PREDEF_FILENAMES.
5343 (predef_filenames): New define.
5344 (add_predefined_file): Declare.
5345 (predefined_filename_p): Declare.
5346 * expr.c (expand_invoke): Use build_call_or_builtin.
5347
5348 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5349
5350 * parse.y (patch_switch_statement): Fix format specifier.
5351
5352 2002-01-16 Tom Tromey <tromey@redhat.com>
5353
5354 More for PR java/5365:
5355 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
5356 default.
5357 (process_file): Generate include for
5358 java.lang.UnsupportedOperationExceptions.
5359
5360 2002-01-15 Andreas Jaeger <aj@suse.de>
5361
5362 * .cvsignore: Add man pages.
5363
5364 2002-01-15 Tom Tromey <tromey@redhat.com>
5365
5366 Fix for PR java/5365:
5367 * gjavah.c (process_file): Turn class name into a file name.
5368
5369 2002-01-14 Matthias Klose <doko@debian.org>
5370
5371 * gcj.texi: Fix whitespace and formatting errors in the
5372 synopsis of the man pages. Update copyright.
5373
5374 2002-01-14 Tom Tromey <tromey@redhat.com>
5375
5376 For PR libgcj/5303:
5377 * Make-lang.in (java.install-man): Handle jv-convert man page.
5378 (java.generated-manpages): Added jv-convert.1.
5379 (java.uninstall): Remove jv-convert.1.
5380 (java.maintainer-clean): Likewise.
5381 ($(srcdir)/java/jv-convert.1): New target.
5382 * gcj.texi (Top): Link to jv-convert node.
5383 (Individual utilities): Likewise.
5384 (Invoking jv-convert): New node.
5385
5386 2001-01-10 Jeff Sturm <jsturm@one-point.com>
5387 Martin Kahlert <martin.kahlert@infineon.com>
5388
5389 * jcf-parse.c (get_constant): Don't swap lo/hi for big
5390 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
5391
5392 2002-01-03 Graham Stott <grahams@redhat.com>
5393
5394 * class.c (compile_resource_file): Update copyright date.
5395 Constify filename parameter.
5396 (java-tree.h): Update copyright date.
5397 (compile_resource_file): Constify filename parameter.
5398
5399 2002-01-03 Graham Stott <grahams@redhat.com>
5400
5401 * gcc/jcf-parse.c: Update copyright date.
5402 (yyparse): Constify resource_filename.
5403
5404 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5405
5406 * parse.y (src_parse_roots): Don't needlessly zero init.
5407
5408 2001-12-31 Tom Tromey <tromey@redhat.com>
5409
5410 * parse.y (dump_java_tree): New function.
5411 (source_end_java_method): Call it.
5412 (end_class_declaration): Likewise.
5413 * lang.c (java_decode_option): Call dump_switch_p.
5414
5415 2001-12-28 Tom Tromey <tromey@redhat.com>
5416
5417 * gen-table.pl: Don't process characters after \uffff. Added
5418 comment pointing to input file.
5419
5420 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5421
5422 * gen-table.pl: Const-ify output. Document the location of a
5423 suitable unicode input file.
5424
5425 * chartables.h: Regenerate.
5426
5427 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5428
5429 * chartables.h: Const-ify.
5430 * gjavah.c (options): Likewise.
5431 * jcf-dump.c (options): Likewise.
5432 * jv-scan.c (options): Likewise.
5433 * lex.c (java_start_char_p, java_part_char_p): Likewise.
5434 * parse.y (binop_lookup): Likewise.
5435
5436 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5437
5438 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
5439 the static arrays that are output.
5440 * jvspec.c (jvgenmain_spec): Make static.
5441 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
5442 * keyword.h: Regenerate.
5443 * lang.c (string_option, process_option_with_no, lang_f_options,
5444 lang_W_options): Const-ify.
5445 * lex.c (java_lex): Likewise.
5446
5447 2001-12-21 Richard Henderson <rth@redhat.com>
5448
5449 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
5450 (get_boehm_type_descriptor): ... here. Arrange for the
5451 TREE_TYPE to get set properly.
5452
5453 2001-12-21 Richard Henderson <rth@redhat.com>
5454
5455 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
5456 only if the target requires collect2.
5457
5458 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
5459
5460 2001-12-20 Tom Tromey <tromey@redhat.com>
5461
5462 For PR java/4509:
5463 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
5464 CAN_COMPLETE_NORMALLY for the node.
5465 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
5466 generate code for second branch if first branch can't complete
5467 normally.
5468 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
5469 the loop head if the loop body can't complete normally.
5470
5471 2001-12-20 Tom Tromey <tromey@redhat.com>
5472
5473 For PR java/4766:
5474 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
5475 case where `finally' clause can't complete normally.
5476
5477 2001-12-20 Tom Tromey <tromey@redhat.com>
5478
5479 Fixes PR java/5057:
5480 * parse.y (analyze_clinit_body): Added this_class parameter.
5481 Check for more cases where we must keep <clinit>.
5482 (maybe_yank_clinit): Cleaned up flow control.
5483
5484 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5485
5486 * decl.c (java_init_decl_processing): Don't initialize
5487 finit_leg_identifier_node.
5488 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
5489 (finit_leg_identifier_node): Remove.
5490 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
5491
5492 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5493
5494 * mangle.c (mangle_member_name): Don't special-case for
5495 NO_DOLLAR_IN_LABEL.
5496 * mangle_name.c (unicode_mangling_length): Likewise.
5497 (append_unicode_mangled_name): Likewise.
5498 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
5499 code.
5500
5501 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5502
5503 * expr.c (build_java_array_length_access): Don't force null pointer
5504 check unless flag_check_references is set.
5505
5506 2001-12-20 Tom Tromey <tromey@redhat.com>
5507
5508 Fix for PR java/3417:
5509 * parse.y (patch_assignment): Added special processing for
5510 `return'.
5511 (patch_return): Don't convert booleans to integers, and don't
5512 special-case `null'.
5513
5514 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
5515
5516 * config-lang.in (diff_excludes): Remove.
5517
5518 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
5519
5520 * gcj.texi: Update link to GCC manual.
5521
5522 2001-12-17 Tom Tromey <tromey@redhat.com>
5523
5524 * parse.y (link_nested_class_to_enclosing): Removed useless
5525 statement.
5526
5527 2001-12-16 Tom Tromey <tromey@redhat.com>
5528
5529 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
5530 Fixes PR java/5088.
5531
5532 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
5533
5534 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
5535 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
5536 spelling errors.
5537
5538 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5539
5540 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
5541
5542 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5543
5544 * decl.c (java_init_decl_processing): Build otable_type correctly.
5545 otable_decl is an otable_type.
5546
5547 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5548
5549 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
5550 otable_type, otable_ptr_type, method_symbol_type,
5551 method_symbols_array_type, method_symbols_array_ptr_type): New
5552 field/global tree definitions.
5553 (flag_indirect_dispatch): New flag.
5554 * decl.c (java_init_decl_processing): Initialize new otable and
5555 otable_syms type nodes and decls. Add new field "index" to
5556 method_type_node.
5557 * class.c (build_method_symbols_entry): New function.
5558 (make_method_value): Set "index" to to method's vtable index for
5559 virtual methods when indirect-dispatch is not used.
5560 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
5561 and set vtable_method_count to -1. Set otable and otable_syms field
5562 if indirect-dispatch is used and there was something to put in them.
5563 (build_method_symbols_entry): New function.
5564 (emit_offset_symbol_table): New function.
5565 * expr.c (get_offset_table_index): New function.
5566 (build_invokevirtual): Build array reference to otable at the index
5567 returned by get_offset_table_index, and use the result as the vtable
5568 offset.
5569 (build_invokeinterface): Similar.
5570 * jcf-parse.c (yyparse): If indirect-dispatch, call
5571 emit_offset_symbol_table at the end of compilation, after all classes
5572 have been generated.
5573 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
5574 * lang.c (flag_indirect_dispatch): Define.
5575 (lang_f_options): Add indirect-dispatch flag.
5576
5577 2001-12-14 Matthias Klose <doko@debian.org>
5578
5579 * gcj.texi: Markup for man page generation. Document missing
5580 options printed by <tool> --help.
5581 Terminate description of gij's -ms option with a dot.
5582 * Make-lang.in ($(srcdir)/java/*.1): New targets.
5583 (java.generated-manpages java.install-man, java.uninstall,
5584 java-maintainer-clean) Updated.
5585
5586 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
5587
5588 * class.c (get_dispatch_table): Fix java vtable layout
5589 for TARGET_VTABLE_USES_DESCRIPTORS.
5590 * decl.c (java_init_decl_processing): Initialize
5591 alloc_no_finalizer_node, finalize_identifier_node.
5592 * expr.c (class_has_finalize_method): New function.
5593 (expand_java_NEW): Generate calls for finalizer-free allocation.
5594 (build_invokevirtual): Fix java vtable layout for
5595 TARGET_VTABLE_USES_DESCRIPTORS.
5596 * java-tree.h (enum java_tree_index): New entries:
5597 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
5598 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
5599 (class_has_finalize_method): declare.
5600 (HAS_FINALIZER_P): New macro.
5601 * parse.y (patch_invoke): Generate calls for finalizer-free
5602 allocation.
5603
5604 2001-12-12 Matthias Klose <doko@debian.org>
5605
5606 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
5607 whitespace at end of line.
5608
5609 2001-12-11 Tom Tromey <tromey@redhat.com>
5610
5611 * lex.c (java_init_lex): Define wfl_to_string as
5612 gnu.gcj.runtime.StringBuffer unless generating bytecode.
5613
5614 2001-12-11 Jeff Sturm <jsturm@one-point.com>
5615
5616 * class.c (make_method_value): Use null_pointer_node to
5617 represent empty exception table.
5618
5619 2001-12-10 Tom Tromey <tromey@redhat.com>
5620
5621 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
5622
5623 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
5624
5625 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
5626
5627 2001-12-09 Per Bothner <per@bothner.com>
5628
5629 * check-init.c (current_switch_has_default): New static field.
5630 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
5631 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
5632 DEFAULT_EXPR seen, simulate a default alternative that copies state.
5633
5634 2001-12-09 Tom Tromey <tromey@redhat.com>
5635
5636 * check-init.c (check_init): Don't allow pre- or post- increment
5637 or decrement of final variable.
5638 (final_assign_error): Minor error message rewording.
5639
5640 2001-12-08 Tom Tromey <tromey@redhat.com>
5641
5642 * java-tree.h: Fixed typo.
5643
5644 * gjavah.c (decompile_method): Don't decompile to `return this'
5645 for static methods.
5646
5647 * gjavah.c (cxx_keywords): Re-sorted.
5648 * lex.c (cxx_keywords): Re-sorted.
5649
5650 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
5651 else.
5652
5653 * gjavah.c (print_namelet): Clear subnamelets.
5654 (HANDLE_METHOD): Set `method_printed' earlier.
5655
5656 2001-12-07 Tom Tromey <tromey@redhat.com>
5657
5658 * lang.c (lang_f_options): Added
5659 optimize-static-class-initialization.
5660 (java_decode_option): Removed special case.
5661
5662 2001-12-07 Per Bothner <per@bothner.com>
5663
5664 * check-init.c (check_init): Fix typo freeing memory twice.
5665
5666 2001-12-05 Per Bothner <per@bothner.com>
5667
5668 Restore support for static class initialization optimization.
5669 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
5670 * check-init.c (check_int): At end of BLOCK handle initialization
5671 blocks, which used to be done in java_complete_expand_method but did
5672 not handle the case where check_for_initialization might allocate
5673 more than a word of bits.
5674 * decl.c (lang_make_tree): The smic field is now a tree.
5675 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
5676 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
5677
5678 * parse.y (emit_test_initialization): Combine hash_lookup calls.
5679
5680 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
5681 Change from a hash table to a list.
5682 (struct_lang_decl): Change field 'smic' to match.
5683 * class.c (add_method_1): Initialize
5684 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
5685 * parse.y (adjust_init_test_initialization): Removed - inlined into -
5686 (java_expand_method_bodies): -here, since 'smic' is now a list.
5687 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
5688
5689 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
5690
5691 * class.c (java_hash_compare_tree_node): Fix casts.
5692
5693 2001-12-04 Per Bothner <per@bothner.com>
5694
5695 * check-init.c: Handle definite unassignment to finals in addition
5696 to definite assignment.
5697 (loop_current_locals): New field.
5698 (num_current_locals, int start_current_locals, num_current_words):
5699 Make static.
5700 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
5701 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
5702 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
5703 (get_variable_decl, check_final_reassigned): New functions.
5704 (check_init, check_bool_init): Modify as needed for checking finals.
5705 (check_for_initialization): Take extra parameter and return void.
5706 Do extra start-up logic to check final fields for assignment.
5707 * parse.y (check_static_final_variable_assignment_flag,
5708 reset_static_final_variable_assignment_flag, check_final_assignment,
5709 check_final_variable_local_assignment_flag,
5710 reset_final_variable_indirect_assignment_flag,
5711 reset_final_variable_global_assignment_flag): Remove functions.
5712 (java_complete_expand_methods, outer_field_access_fix,
5713 patch_assignment): Remove no-longer used logic.
5714 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
5715 * parse.y (register_fields, java_complete_tree): Update accordingly.
5716
5717 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
5718 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
5719 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
5720
5721 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
5722
5723 * java-tree.h (DECL FINAL): New bit-field.
5724 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
5725 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
5726 (DECL_INIT_CALLS_THIS): New macro.
5727 (struct lang_decl): New bit-field init_calls_this.
5728 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
5729 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
5730 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
5731 use it for both local variables and final fields.
5732 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
5733 and local_final.
5734 (struct lang_type): Remove hfv bit-field.
5735 (check_for_initialization): Change to return void.
5736
5737 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
5738 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
5739 * check-init.c (final_assign_error): New helper function.
5740 (check_final_reassigned, check_init): Use it.
5741 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
5742
5743 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
5744 bit-fields to unsigned.
5745
5746 2001-12-03 Per Bothner <per@bothner.com>
5747
5748 * parse.y (patch_binop): Minor constant folding.
5749
5750 * parse.y (build_current_thisn): Shorter 'buffer'.
5751
5752 2001-12-03 Per Bothner <per@bothner.com>
5753
5754 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
5755 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
5756 * jcf-write.c (generate_bytecode_insns): Remove support for
5757 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
5758 * check-init.c (check_init): Likewise.
5759
5760 2001-12-03 Per Bothner <per@bothner.com>
5761
5762 * verify.c (subroutine_nesting): New function.
5763 (verify_jvm_instructions): Use it to fix logic for checking that
5764 we're done with the current subroutine.
5765
5766 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
5767 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
5768
5769 2001-12-03 Per Bothner <per@bothner.com>
5770
5771 * jcf.h: Fix obvious typo in comment.
5772 * typeck.c (build_null_signature): Add comment.
5773
5774 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
5775
5776 * expr.c: Remove leading capital from diagnostic messages, as
5777 per GNU coding standards.
5778 * jcf-io.c: Similarly.
5779 * jcf-parse.c: Similarly.
5780 * jv-scan.c: Similarly.
5781 * jvspec.c: Similarly.
5782 * mangle.c: Similarly.
5783
5784 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
5785 Alexandre Petit-Bianco <apbianco@redhat.com>
5786
5787 * expr.c (build_java_arrayaccess): Call save_expr on array for
5788 correct evaluation order, modified comment, fixed indentation.
5789 * parse.y: (patch_assignment): Correctly extract the array base
5790 from the tree generate by build_java_arrayaccess, added comments.
5791 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
5792 Fixes PR java/3096, PR java/3803, PR java/3965.
5793
5794 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
5795
5796 * expr.c (expand_byte_code): Remove trailing periods from messages.
5797 * jcf-parse.c (load_class, jcf_parse): Similarly.
5798 * jcf-write.c (generate_classfile): Similarly.
5799 * lex.c (java_lex): Similarly.
5800
5801 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5802
5803 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
5804
5805 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
5806
5807 * Make-lang.in (java.generated-manpages): New dummy target.
5808
5809 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5810
5811 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
5812 ASM_FINAL_SPEC.
5813 (lang_specific_pre_link): Use set_input to set input_filename.
5814 Append `main' here.
5815 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
5816 (main): Fix definition.
5817 Strip `main' from classname.
5818 Fixes PR java/227.
5819
5820 2001-11-18 Roger Sayle <roger@eyesopen.com>
5821
5822 * parse.h (java_expand_switch): Remove old prototype.
5823
5824 2001-11-18 Tom Tromey <tromey@redhat.com>
5825
5826 Fix for PR java/1401:
5827 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
5828 arg0 is null.
5829 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
5830 correctly.
5831
5832 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
5833
5834 * lang.c (finish_parse): Rename to java_finish.
5835 (LANG_HOOKS_FINISH, java_finish): New.
5836
5837 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
5838
5839 * decl.c (init_decl_processing): Rename java_init_decl_processing.
5840 * java-tree.h: New prototype.
5841 * lang.c (java_init): Update prototype. Combine with old init_parse.
5842
5843 2001-11-13 Tom Tromey <tromey@redhat.com>
5844
5845 * gjavah.c (method_signature): New global.
5846 (HANDLE_METHOD): Set it.
5847 (decompile_return_statement): New function.
5848 (decompile_method): Use it.
5849 (print_method_info): Removed `synth' argument.
5850
5851 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
5852
5853 * java-tree.h (java_set_yydebug): New.
5854 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
5855 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
5856 (print_lang_decl, print_lang_type, print_lang_identifier,
5857 print_lang_statistics, lang_print_xnode): Remove.
5858
5859 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
5860
5861 * jcf-parse.c (init_lex): Remove.
5862 * lang.c (language_string, lang_identify): Remove.
5863 (struct lang_hooks): Constify.
5864 (LANG_HOOKS_NAME): Override.
5865 (init_parse): Update.
5866
5867 2001-11-08 Andreas Franck <afranck@gmx.de>
5868
5869 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
5870 program_transform_name the way suggested by autoconf.
5871 (java.install-common): Also transform auxiliary program names with
5872 program_transform_name.
5873
5874 2001-11-08 Tom Tromey <tromey@cygnus.com>
5875
5876 * parse.y (trap_overflow_corner_case): New rule.
5877 (unary_expression): Use it.
5878 * lex.c (java_init_lex): Don't set minus_seen.
5879 (yylex): Don't use minus_seen. Communicate overflow to parser for
5880 it to handle.
5881 (error_if_numeric_overflow): New function.
5882 * parse.h (minus_seen): Removed field.
5883 (JAVA_RADIX10_FLAG): New define.
5884
5885 2001-11-07 Tom Tromey <tromey@redhat.com>
5886
5887 Patch for PR java/1414:
5888 * parse.y (case_label_list): New global.
5889 (goal): Register case_label_list with GC.
5890 (java_complete_lhs): Save new case on case_label_list.
5891 (patch_switch_statement): Check for duplicate case labels.
5892
5893 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
5894
5895 * parse.y (patch_assignment): Removed unused third argument.
5896 (java_complete_lhs): Removed unused third argument to patch_assignment.
5897
5898 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
5899
5900 * lang.c: Include langhooks-def.h.
5901 * Make-lang.in: Update.
5902
5903 2001-10-31 Zack Weinberg <zack@codesourcery.com>
5904
5905 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
5906
5907 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5908
5909 * mangle.c (find_compression_record_match): Don't match compression
5910 records for package name elements unless they occur at the start of
5911 the name. Fix for PR java/4717.
5912
5913 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5914
5915 * expr.c (expand_java_field_op): Don't special-case references to
5916 java.lang.PRIMTYPE.TYPE.
5917 (build_primtype_type_ref): Removed.
5918 * java-tree.h (build_primtype_type_ref): Remove prototype.
5919 * parse.y (maybe_build_primttype_type_ref): Removed.
5920 (complete_function_arguments): Don't special-case references to
5921 java.lang.PRIMTYPE.TYPE.
5922 (patch_assignment): Likewise.
5923 (array_constructor_check_entry): Likewise.
5924
5925 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
5926
5927 * mangle.c (static tree compression_table): Fixed leading comment.
5928 * parse.h (struct parser_ctxt): Fixed field comment.
5929 * parse.y (check_pkg_class_access): New prototype, fixed leading
5930 comment, new parameter used to emit error only if passed as true.
5931 (parse_check_super): Pass extra argument to check_pkg_class_access.
5932 (do_resolve_class): Likewise.
5933 (process_imports): Likewise.
5934 (read_import_dir): Fixed indentation.
5935 (find_in_imports_on_demand): New local class_type_name. Local
5936 node_to_use deleted. while loop changed into for loop. Report
5937 multiple definition only for accessible classes. Improved error
5938 message.
5939 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
5940 assigned to parameter list, fixed indentation. while loop changed
5941 into for loop, restore TREE_CHAIN on local `tem' before the next
5942 iteration.
5943
5944 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5945
5946 * lang.c (lang_get_alias_set): Deleted.
5947
5948 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5949
5950 * gjavah.c (jni_print_char): Fix thinko in last change.
5951
5952 * gjavah.c (jni_print_char, decode_signature_piece): Use
5953 safe-ctype macros and/or fold extra calls into fewer ones.
5954 * lex.c (java_read_unicode, java_lex): Likewise.
5955 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
5956 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
5957 * mangle_name.c (append_unicode_mangled_name,
5958 unicode_mangling_length): Likewise.
5959
5960 2001-10-17 Richard Henderson <rth@redhat.com>
5961
5962 * Make-lang.in (java/lang.o): Depend on langhooks.h.
5963
5964 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
5965
5966 * lang.c (langhooks.h): Included.
5967 (LANG_HOOKS_INIT): Redefined.
5968 (LANG_HOOKS_INIT_OPTIONS): Likewise.
5969 (LANG_HOOKS_DECODE_OPTION): Likewise.
5970 (struct lang_hooks lang_hooks): New initialization.
5971
5972 2001-10-11 Per Bothner <per@bothner.com>
5973
5974 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
5975 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
5976 The former is simpler, and jcf-write.c handles it better.
5977 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
5978 or WITH_CLEANUP_EXPR.
5979 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
5980 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
5981
5982 * parse.y (patch_if_else_statement): If the condition is constant,
5983 optimize away the test.
5984
5985 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
5986
5987 * parse.y (patch_cast): Call patch_string on the first operand of
5988 the incoming node, update it if necessary. Fixes PR java/4510.
5989
5990 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5991
5992 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
5993 when name qualifier matches a package name.
5994
5995 2001-10-08 Tom Tromey <tromey@redhat.com>
5996
5997 Fix for PR java/4489:
5998 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
5999 force a new label when computing `body_block'.
6000
6001 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6002
6003 * jcf-io.c (format_uint): Const-ify.
6004 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
6005 * lex.c (java_get_line_col): Likewise.
6006 * parse.y (build_incdec): Likewise.
6007
6008 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6009
6010 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
6011 a NULL enclosing context if appropriate. Fixes PR java/4466.
6012
6013 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
6014
6015 * parse.y (patch_assignment): Use lvalue's original TYPE when
6016 building the final COMPOUND_EXPR.
6017 (try_reference_assignconv): Fixed leading comment.
6018
6019 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
6020
6021 * parse.y (check_final_variable_indirect_assignment): For
6022 COMPOUND_EXPR, return only if finals were found initialized
6023 properly, if not, keep on checking.
6024 (check_final_variable_global_assignment_flag): New local
6025 error_found, set when appropriate and used to decide whether to
6026 report uninitialized finals. Fixed typo in comment.
6027
6028 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
6029
6030 * decl.c (init_decl_processing): Fixed typo in predef_filenames
6031 last three initializations. Fixes PR java/4360.
6032
6033 2001-09-21 Richard Henderson <rth@redhat.com>
6034
6035 * class.c (get_dispatch_table): Handle function descriptors.
6036 (build_dtable_decl): Likewise.
6037 * expr.c (build_invokevirtual): Likewise.
6038
6039 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6040
6041 * parse.y (patch_method_invocation): Build class initialization
6042 when static finals are used to qualify method invocation.
6043 Fixes PR java/4366.
6044
6045 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
6046
6047 * parse.h: (WFL_STRIP_BRACKET): Re-written using
6048 build_type_name_from_array_name.
6049 (STRING_STRIP_BRACKETS): New macro.
6050 * parse.y (build_type_name_from_array_name): New function.
6051 (array_creation_expression:): Accumulate []s instead of [s.
6052 (cast_expression:): Accumulate []s instead of [s after cast type
6053 name.
6054 (build_array_from_name): Local string deleted, use
6055 build_type_name_from_array_name.
6056 (build_unresolved_array_type): Accumulate []s instead of [s after
6057 type name.
6058 (register_fields): Fixed comment.
6059 (resolve_class): Local name, base deleted, new locals tname and
6060 array_dims. Use build_type_name_from_array_name. Use array_dims to
6061 build array type.
6062 (purify_type_name): Use STRING_STRIP_BRACKETS.
6063
6064 2001-09-18 Andreas Jaeger <aj@suse.de>
6065
6066 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
6067 * jv-scan.c: Likewise.
6068
6069 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6070
6071 * parse.y (patch_method_invocation): Inner class creation context
6072 check not enforced within constructors. Fixes PR java/1873.
6073
6074 2001-09-16 Tom Tromey <tromey@redhat.com>
6075
6076 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
6077 NOTE_PUSH for single-case push. Fixes PR java/4189.
6078
6079 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6080
6081 * java-tree.h (TYPE_IMPORT_LIST): New macro.
6082 (TYPE_IMPORT_DEMAND_LIST): Likewise.
6083 (struct lang_type): New fields import_list and import_demand_list.
6084 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
6085 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
6086 (do_resolve_class): New local saved_enclosing_type, initialized,
6087 passed as parameter to find_in_imports and find_in_imports_on_demand.
6088 (find_in_imports): Added paramater enclosing_type, use its
6089 TYPE_IMPORT_LIST when applicable.
6090 (find_in_imports_on_demand): Added parameter enclosing_type, use
6091 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
6092 declaration and initialization.
6093 (fold_constant_for_init): Switch/restore current_class to the
6094 appropriate context.
6095
6096 2001-09-13 Mark Mitchell <mark@codesourcery.com>
6097
6098 * verify.c (verify_jvm_instructions): Fix typo.
6099
6100 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6101
6102 * expr.c (expand_invoke): Const-ification.
6103 * parse.y (patch_method_invocation): Likewise.
6104
6105 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6106
6107 * gjavah.c (cxx_keywords): Const-ification.
6108 * keyword.gperf (java_keyword): Likewise.
6109 * lang.c (java_tree_code_name): Likewise.
6110 * lex.c (cxx_keywords): Likewise.
6111 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
6112
6113 2001-09-11 Richard Henderson <rth@redhat.com>
6114
6115 * parse.h (ctxp_for_generation): Mark extern.
6116
6117 2001-09-10 Richard Henderson <rth@redhat.com>
6118
6119 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
6120
6121 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6122
6123 * typeck.c (java_array_type_length, build_prim_array_type):
6124 Represent empty arrays by NULL index.
6125
6126 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
6127
6128 * java-tree.h (compile_resource_file): Grouped with other prototypes.
6129 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
6130
6131 2001-09-06 Anthony Green <green@redhat.com>
6132
6133 * class.c (O_BINARY): Define if necessary.
6134 (registerResource_libfunc): Declare.
6135 (init_class_processing): Initilize registerResource_libfunc.
6136 (compile_resource_file): New function.
6137 * java-tree.h (resource_name): Declare.
6138 (compile_resource_file): Declare.
6139 * jcf-parse.c (yyparse): Handle compiling java resource files.
6140 * lang.c (java_decode_option): Handle -fcompile-resource option.
6141 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
6142 resource files.
6143 * gcj.texi (Code Generation): Add documentation for -R flag.
6144
6145 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6146
6147 * jcf-write.c (generate_classfile): Issue an error in case of
6148 field/initial value mismatch.
6149 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
6150 being initialized and we're generating bytecode.
6151 (java_complete_lhs): In MODIFY_EXPR section: added comments,
6152 set DECL_INITIAL properly when appropriate.
6153 Fixes PR java/4230
6154 Fixes PR java/4204
6155
6156 2001-09-01 Per Bothner <per@bothner.com>
6157
6158 * parse.y (maybe_yank_clinit): A field without an initializer is not
6159 relevant. All initializers except static final and constant require
6160 <clinit>, regardless of flag_emit_class_files.
6161
6162 2001-08-31 Per Bothner <per@bothner.com>
6163
6164 * class.c (set_constant_value): When not emitting class files, then a
6165 String ConstantValue is a utf8const_ptr_type.
6166
6167 2001-08-30 Per Bothner <per@bothner.com>
6168
6169 * jcf-write.c (generate_classfile): Check that field is primitive
6170 or string before emitting ConstantValue attribute.
6171
6172 2001-08-30 Per Bothner <per@bothner.com>
6173
6174 * parse.y (resolve_qualified_expression_name): If creating a
6175 COMPOUND_EXPR, set it's type correctly.
6176
6177 2001-08-30 Per Bothner <per@bothner.com>
6178
6179 * jcf-io.c (open_class): Set filename field.
6180
6181 * jcf-parse,c (parse_class_file): Set current_function_decl
6182 for better error message when Code attribute is missing.
6183
6184 * lang.c (put_decl_node, lang_print_error): Re-arrange for
6185 better diagnostics, especially for constructors.
6186
6187 2001-08-30 Per Bothner <per@bothner.com>
6188
6189 * jcf-write.c (generate_classfile): Don't write ConstantValue
6190 attribute if field is not final, for compatibility with jdk.
6191
6192 * jcf-write.c (generate_classfile): Convert ConstantValue values
6193 to correct type. Work-around for front-end bug.
6194 * class.c (set_constant_value): Error if constant has wrong type.
6195
6196 2001-08-30 Per Bothner <per@bothner.com>
6197
6198 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
6199 "Double" are printed at verbosity 1.
6200
6201 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
6202
6203 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
6204
6205 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
6206
6207 * parse.y (patch_assignment): Don't verify final re-assignment here.
6208 (java_complete_lhs): Verify assignments to finals calling
6209 patch_assignment. Verify re-assignments to finals before calling
6210 patch_assignment.
6211
6212 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
6213
6214 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
6215 Fixes PR java/1413
6216
6217 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
6218
6219 * lex.c (java_lex): new local found_hex_digits. Set and then used
6220 in test to reject invalid hexadecimal numbers.
6221 * parse.y (java_complete_tree): Prevent unwanted cast with
6222 initialized floating point finals.
6223 (patch_binop): Emit a warning when detecting a division by zero,
6224 mark result not constant, don't simplify non integer division.
6225
6226 2001-08-28 Per Bothner <per@bothner.com>
6227
6228 * jcf-write.c (generate_bytecode_insns): For increments and
6229 decrements just recurse to push constant. Improvement on Mark's patch.
6230
6231 2001-08-28 Mark Mitchell <mark@codesourcery.com>
6232
6233 * jcf-write.c (generate_bytecode_insns): Generate an integer to
6234 real conversion for increments and decrements of reals.
6235
6236 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6237
6238 * parse.y (resolve_qualified_expression_name): Handle unresolved
6239 qualified expressions, prevent numerical qualifiers, fixed typo.
6240 Fixes PR java/4141
6241
6242 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
6243
6244 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
6245 don't report anything but deprecated class when marked so. Handle
6246 VAR_DECL.
6247 (patch_method_invocation): Check deprecation on methods and types.
6248 (patch_binop): code becomes an enum tree_code, added default: to
6249 switch to handle that. Detect division by zero, try to fold and
6250 return before using a subroutine.
6251
6252 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
6253
6254 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
6255 file smaller than 4 bytes.
6256 * parse.y (check_inner_circular_reference): New function.
6257 (check_circular_reference): Likewise.
6258 (array_initializer:): Accept {,}.
6259 (java_check_circular_reference): Rewritten using
6260 check_circular_reference and check_inner_circular_reference.
6261 (java_complete_expand_method): Unconditionally save and restore
6262 the unpurged exception list.
6263 (build_dot_class_method_invocation): Unmangle signature parameter.
6264
6265 2001-08-21 Tom Tromey <tromey@redhat.com>
6266
6267 * decl.c (init_decl_processing): Add `throws' field to method
6268 descriptor.
6269 * class.c (make_method_value): Compute `throws' field for method.
6270
6271 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
6272
6273 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
6274 circularity is detected.
6275 (ctors_unchecked_throws_clause_p): Fixed leading comment.
6276
6277 2001-08-17 Richard Henderson <rth@redhat.com>
6278
6279 * class.c (emit_register_classes): Add align parameter to
6280 call to assemble_integer.
6281
6282 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
6283
6284 * jcf-parse.c (load_class): New locals saved and class_loaded. If
6285 loading a class_or_name fails, try considering an innerclass name
6286 and load the enclosing context.
6287 * parse.y (resolve_inner_class): New function.
6288 (find_as_inner_class): Added leading comment.
6289 (register_incomplete_type): Keep the current context as enclosing
6290 context for JDEP_FIELD dependencies.
6291 (do_resolve_class): Locals new_class_decl and super initialized to
6292 NULL. Call resolve_inner_class, explore the enclosing context
6293 superclass if necessary.
6294 Fixes PR java/4007
6295
6296 2001-08-16 Tom Tromey <tromey@redhat.com>
6297
6298 * jcf-dump.c (main): Updated for change to jcf_path_seal.
6299 * gjavah.c (main): Updated for change to jcf_path_seal.
6300 * lang.c (version_flag): New global.
6301 (java_decode_option): Recognize `-version'.
6302 (java_init): Update for change to jcf_path_seal.
6303 * jcf.h (jcf_path_seal): Added `print' argument.
6304 * jcf-path.c (jcf_path_seal): Added `print' argument.
6305
6306 2001-08-13 Zack Weinberg <zackw@panix.com>
6307
6308 * Make-lang.in (java/decl.o): Update dependencies.
6309 * decl.c: Include libfuncs.h, don't include toplev.h.
6310
6311 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6312
6313 * decl.c (init_decl_processing): exception_type_node,
6314 class_not_found_type_node, and no_class_def_found_type_node
6315 initialized. predef_filenames augmented accordingly.
6316 instinit_identifier_node initialized.
6317 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
6318 * java-tree.h (enum java_tree_index): New entries
6319 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
6320 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
6321 (exception_type_node): New macro.
6322 (class_not_found_type_node): Likewise.
6323 (no_class_def_found_type_node): Likewise.
6324 (instinit_identifier_node): Likewise.
6325 (PREDEF_FILENAMES_SIZE): Adjusted.
6326 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
6327 (struct lang_type): Fixed typo in bitfield name.
6328 (DECL_INSTINIT_P): New macro.
6329 (ID_INSTINIT_P): Likewise.
6330 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
6331 attribute.
6332 * parse.y (encapsulate_with_try_catch): New function.
6333 (generate_instinit): Likewise.
6334 (build_instinit_invocation): Likewise.
6335 (ctors_unchecked_throws_clause_p): Likewise.
6336 (add_instance_initializer): Deleted.
6337 (build_instance_initializer): Likewise.
6338 (in_instance_initializer): Likewise.
6339 (check_method_redefinition): instinit$ not to be verified.
6340 (java_complete_expand_methods): Generate instinit$, simplified code.
6341 (build_dot_class_method): Eliminated unnecessary locals. Use
6342 encapsulate_with_try_catch, removed unnecessary code.
6343 (fix_constructors): New local iii. Use build_instinit_invocation.
6344 (patch_method_invocation): Added comment.
6345 (maybe_use_access_method): Don't consider instinit$.
6346 (find_applicable_accessible_methods_list): Shorten the search for
6347 instinit$ too.
6348 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
6349 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
6350 (patch_throw_statement): Likewise. Fixed typo.
6351
6352 2001-08-12 David Edelsohn <edelsohn@gnu.org>
6353
6354 Revert:
6355 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6356 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6357 ASM_FINAL_SPEC.
6358 (lang_specific_pre_link): Use set_input to set input_filename.
6359 Append `main' here.
6360 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6361 (main): Fix definition.
6362 Strip `main' from classname.
6363 Fixes PR java/227.
6364
6365 2001-08-11 Zack Weinberg <zackw@panix.com>
6366
6367 * lex.h: Don't include setjmp.h. Don't define
6368 SET_FLOAT_HANDLER or prototype set_float_handler.
6369
6370 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6371
6372 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
6373 `poplevel' in the right order.
6374
6375 2001-08-09 Richard Henderson <rth@redhat.com>
6376
6377 * Make-lang.in (class.o): Depend on TARGET_H.
6378 * class.c (emit_register_classes): Use target hooks instead of
6379 assemble_constructor and assemble_destructor.
6380
6381 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
6382
6383 * check-init.c (flags.h): Include
6384 (check_init): Don't report uninitialized static class
6385 initialization flags, don't free bit index when doing static class
6386 initialization optimization.
6387 (check_for_initialization): Return type changed to `unsigned int.'
6388 (attach_initialized_static_class): New function.
6389 * class.c (add_method_1): Create the initialized static class
6390 table if necessary.
6391 (finish_class): Always emit deferred inline methods.
6392 * decl.c (emit_init_test_initialization): Moved to expr.c
6393 (complete_start_java_method): Don't traverse
6394 DECL_FUNCTION_INIT_TEST_TABLE.
6395 (lang_mark_tree): Mark hash tables in function decls.
6396 * expr.c (emit_init_test_initialization): Moved from decl.c.
6397 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
6398 initialization flag, set DECL_CONTEXT and
6399 LOCAL_CLASS_INITIALIZATION_FLAG.
6400 (java_lang_expand_expr): Emit initialization code for static class
6401 initialized flags when entering block, if necessary.
6402 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
6403 * java-tree.h (flag_optimize_sci): New global variable declaration.
6404 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
6405 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
6406 (LOCAL_FINAL_P): Fixed typo in comment.
6407 (FINAL_VARIABLE_P): Likewise.
6408 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
6409 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
6410 (struct lang_decl): New fields `ict', `smic' and `cif.'
6411 (check_for_initialization): New returned value for global.
6412 (attach_initialized_static_class): New global function.
6413 (STATIC_CLASS_INIT_OPT_P): New macro.
6414 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
6415 * lang.c (java_decode_option): Handle
6416 `-fno-optimize-static-class-initialization'
6417 * parse.y (start_complete_expand_method): New function.
6418 (java_expand_method_bodies): Likewise.
6419 (attach_init_test_initialization_flags): Likewise.
6420 (adjust_init_test_initialization): Likewise.
6421 (emit_test_initialization): Likewise.
6422 (java_complete_expand_methods): Nullify abstract and native method
6423 bodies.
6424 (java_complete_expand_method): New locals `fbody', `block_body'
6425 and `exception_copy.' Reorganized: directly return on empty method
6426 bodies, call `start_complete_expand_method', remember definitely
6427 initialized static class in function, don't expand method bodies.
6428 (java_expand_classes): Call `java_expand_method_bodies' before
6429 `finish_class' when compiling to native.
6430 (resolve_expression_name): Use `orig' after building outer class
6431 field access.
6432 (patch_invoke): Remember static method invocations.
6433
6434 2001-08-06 Richard Henderson <rth@redhat.com>
6435
6436 * class.c (emit_register_classes): Pass a symbol_ref and priority
6437 to assemble_constructor.
6438
6439 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
6440
6441 * java-tree.h (all_class_filename): New macro.
6442 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
6443 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
6444 newly created IDENTIFIER_NODE to `all_class_filename.'
6445
6446 2001-08-01 Jeff Sturm <jsturm@one-point.com>
6447
6448 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
6449 Use ggc_add_tree_root to register roots.
6450
6451 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6452
6453 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
6454 second operand calling check_init.
6455 * decl.c (complete_start_java_method): Swaped second and third
6456 arguments while creating WITH_CLEANUP_EXPR node.
6457 * jcf-write.c (generate_bytecode_insns): Use second operand
6458 instead of third when handling WITH_CLEANUP_EXPR.
6459 * parse.y (java_complete_lhs): Expand second operand of
6460 WITH_CLEANUP_EXPR nodes.
6461 (patch_synchronized_statement): Swaped second and third arguments
6462 while creating WITH_CLEANUP_EXPR node.
6463
6464 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
6465
6466 * parse.y (create_interface): Avoid cyclic inheritance report when
6467 syntax error encountered during class definition.
6468 Fixes PR java/2956
6469
6470 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6471
6472 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6473 ASM_FINAL_SPEC.
6474 (lang_specific_pre_link): Use set_input to set input_filename.
6475 Append `main' here.
6476 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6477 (main): Fix definition.
6478 Strip `main' from classname.
6479 Fixes PR java/227.
6480
6481 2001-07-18 Tom Tromey <tromey@redhat.com>
6482
6483 For PR java/2812:
6484 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
6485 * lex.c (java_new_lexer): Use ICONV_CONST.
6486 (java_read_char): Likewise.
6487 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
6488 (jv-scan$(exeext)): Likewise.
6489
6490 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6491
6492 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
6493 * parse.y (check_class_interface_creation): Allow `private' if the
6494 enclosing is not an interface.
6495 (create_interface): Interface tagged public if the enclosing
6496 context is an interface.
6497 (create_class): Class tagged public if the enclosing context
6498 is an interface.
6499 Fixes PR java/2959
6500
6501 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6502
6503 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
6504 Fixes PR java/2665
6505
6506 2001-07-14 Tim Josling <tej@melbpc.org.au>
6507
6508 * check-init.c (check_init): Remove references to EXPON_EXPR.
6509
6510 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6511
6512 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
6513 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
6514 Fixes PR java/3602
6515
6516 2001-07-13 Tom Tromey <tromey@redhat.com>
6517
6518 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
6519 invocation.
6520
6521 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6522
6523 * parse.y (patch_method_invocation): Don't override primary if one
6524 is already provided, but let this$<n> be built. Fixed comment.
6525
6526 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6527
6528 * parse.y (empty_statement:): Report empty statement error only
6529 when found at class declaration level.
6530 Fixes PR java/3635
6531
6532 2001-07-12 Tom Tromey <tromey@redhat.com>
6533
6534 * expr.c (expand_load_internal): New function.
6535 (LOAD_INTERNAL): Use it.
6536
6537 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
6538
6539 * parse.y (verify_constructor_super): Compare anonymous class ctor
6540 args with `valid_method_invocation_conversion_p.'
6541 Fixes PR java/3285
6542
6543 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6544
6545 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
6546 `-fsyntax-only.' Fixes PR java/3248
6547
6548 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6549
6550 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
6551
6552 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6553
6554 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
6555 current function is static. Fixes PR java/1970
6556
6557 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6558
6559 * parse.y (patch_method_invocation): Add enclosing context to ctor
6560 calls if necessary. Fixes PR java/2953
6561
6562 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6563
6564 * parse.y (resolve_package): Abort if qualified expression member
6565 isn't right.
6566 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
6567 Fixes PR java/1391
6568
6569 2001-07-07 Zack Weinberg <zackw@stanford.edu>
6570
6571 * verify.c: Don't use // comments.
6572
6573 2001-07-05 Tom Tromey <tromey@redhat.com>
6574
6575 * lang.c (flag_assume_compiled): Removed.
6576 * java-tree.h (flag_assume_compiled): Removed.
6577 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
6578 -fhash-synchronization, -fuse-divide-subroutine,
6579 -fcheck-references, -femit-class-file, -femit-class-files,
6580 -fassume-compiled. Updated --encoding information. Changed
6581 -foutput-class-dir to `-d'.
6582
6583 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
6584
6585 * jcf-parse.c (parse_class_file): Add lineno parameter to
6586 debug_start_source_file call.
6587
6588 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
6589
6590 * gcj.texi: Use gpl.texi.
6591 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
6592 dependencies and use doc/include in search path.
6593
6594 2001-07-03 Jeff Sturm <jsturm@one-point.com>
6595
6596 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
6597 `this'. If so, don't build instance initializers.
6598
6599 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
6600
6601 * parse.y (resolve_expression_name): Improved error message for
6602 inner class cases. Fixes PR java/1958
6603
6604 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
6605
6606 * lang.c: #include diagnostic.h
6607 (lang_print_error): Add a `diagnostic_context *' parameter.
6608 (java_dummy_print): Likewise.
6609 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
6610
6611 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6612
6613 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
6614 * jcf.h (typedef struct JCF): New bitfield `finished.'
6615 (JCF_FINISH): Set `finished.'
6616 (JCF_ZERO): Reset `finished.'
6617 Fixes PR java/2633
6618
6619 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6620
6621 * parse.y (class_body_declaration:): Don't install empty instance
6622 initializers.
6623 Fixes PR java/1314
6624
6625 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6626
6627 * class.c (set_super_info): Call `set_class_decl_access_flags.'
6628 (set_class_decl_access_flags): New function.
6629 * java-tree.h (set_class_decl_access_flags): New prototype.
6630 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
6631 (parse_class_file): New local `decl_max_locals.' Take wide types
6632 into account to compute DECL_MAX_LOCALS.
6633 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
6634 imports on demand.
6635
6636 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
6637
6638 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
6639
6640 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6641
6642 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
6643 * parse.y (do_resolve_class): Moved comments out to leading comment
6644 section. Removed local `start', New local `_ht' and
6645 `circularity_hash.' Record `enclosing' in hash table and search
6646 it to detect circularity. Use `enclosing' as an argument to
6647 `lookup_cl.' Free the hash table when done.
6648
6649 2001-06-19 Tom Tromey <tromey@redhat.com>
6650
6651 * lex.c (java_read_char): Disallow invalid and overlong
6652 sequences. Fixes PR java/2319.
6653
6654 2001-06-05 Jeff Sturm <jsturm@one-point.com>
6655
6656 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
6657
6658 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6659
6660 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
6661 arguments accordingly.
6662
6663 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
6664
6665 * gcj.texi: Move contents to just after title page.
6666
6667 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
6668
6669 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
6670 builtin type.
6671 (patch_incomplete_class_ref): Build the class ref, build the class
6672 init if necessary, complete the tree.
6673 Fixes PR java/2605
6674
6675 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6676
6677 * parse.y (lookup_field_wrapper): Test `name' code.
6678 (resolve_qualified_expression_name): Test `qual_wfl' code.
6679 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
6680 handle `qual_wfl' by code.
6681 (maybe_build_primttype_type_ref): Test `wfl' code.
6682
6683 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6684
6685 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
6686 fdl.texi.
6687 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
6688 the dvi file in the java directory.
6689
6690 2001-05-25 Sam TH <sam@uchicago.edu>
6691
6692 * gen-table.pl javaop.h jcf.h lex.h,
6693 parse.h: Fix header include guards.
6694
6695 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
6696
6697 * jv-scan.c (version): Update copyright year.
6698
6699 2001-05-21 Per Bothner <per@bothner.com>
6700
6701 * jcf-parse.c (read_class): If class is from .class or .zip file
6702 and it's already been read, don't push/pop parser context.
6703
6704 2001-05-18 Per Bothner <per@bothner.com>
6705
6706 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
6707 command line so the jvgenmain-generated main program comes first.
6708
6709 2001-05-15 Tom Tromey <tromey@redhat.com>
6710
6711 * class.c (build_utf8_ref): Don't generate identifier based on
6712 utf8const contents.
6713
6714 2001-05-12 Richard Henderson <rth@redhat.com>
6715
6716 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
6717 * expr.c (java_lang_expand_expr): Expand it.
6718 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
6719 calling build_exception_object_ref.
6720 * parse.y (catch_clause_parameter): Likewise.
6721 (build_dot_class_method): Likewise.
6722 (try_reference_assignconv): Likewise.
6723 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
6724 * jcf-write.c (generate_bytecode_insns): Likewise.
6725
6726 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
6727
6728 * parse.y (build_unresolved_array_type): Set
6729 EXPR_WFL_QUALIFICATION on the newly created wfl.
6730 Fixes PR java/2538. Fixes PR java/2535.
6731
6732 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
6733
6734 * parse.y (fix_constructors): Removed unnecessary assignment to
6735 local. Moved assignment to `this$<n>', fixed comments and
6736 indentation.
6737 (build_wfl_wrap): Fixed indentation.
6738 Fixes PR java/2598, java/2579 and java/2658.
6739
6740 2001-05-03 Mo DeJong <mdejong@redhat.com>
6741
6742 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
6743 check for byte swap.
6744
6745 2000-05-02 Jeff Sturm <jsturm@one-point.com>
6746
6747 * expr.c (build_class_init): Move MODIFY_EXPR
6748 outside of COND_EXPR. Remove variable `call'.
6749
6750 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6751
6752 * decl.c: NULL_PTR -> NULL.
6753 * jcf-write.c: Likewise.
6754
6755 2001-05-01 Tom Tromey <tromey@redhat.com>
6756
6757 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
6758 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
6759 * gcj.texi: Updated copyright text. Include fdl.texi.
6760 (Top): Link to new node.
6761
6762 2001-05-01 Per Bothner <per@bothner.com>
6763
6764 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
6765
6766 2001-05-01 Per Bothner <per@bothner.com>
6767
6768 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
6769 import_list contains the name, not the TREE_PURPOSE.
6770
6771 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6772
6773 * jcf-io.c (read_zip_member): Cast to long in comparison with
6774 signed value.
6775
6776 * jvspec.c (lang_specific_driver): Initialize variables.
6777
6778 * mangle.c (find_compression_record_match): Likewise.
6779
6780 * typeck.c (build_null_signature): Provide static prototype. Mark
6781 parameter with ATTRIBUTE_UNUSED.
6782
6783 * verify.c (verify_jvm_instructions): Initialize variable.
6784
6785 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6786
6787 * parse.y (do_resolve_class): Check for cyclic inheritance during
6788 inner class resolution.
6789
6790 2001-04-27 Per Bothner <per@bothner.com>
6791
6792 * parse.y (java_expand_classes): Don't change ctxp_for_generation
6793 while iterating, since that could cause gc to lose stuff.
6794
6795 2001-04-26 Per Bothner <per@bothner.com>
6796
6797 Fix method search wrt scope of inner classes to match JLS2.
6798 * typeck.c (build_null_signature): New static function.
6799 (has_method): New function. Uses build_null_signature and lookup_do.
6800 * java-tree.h (has_method): New declaration.
6801 * parse.y (find_applicable_accessible_methods_list): Do not search
6802 context of inner classes here.
6803 (patch_method_invocation): Search scope, ie. current and outer clases,
6804 for method matching simple name, to find class.
6805
6806 2001-04-26 Per Bothner <per@bothner.com>
6807
6808 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
6809 Fix thinko: If a single case, use if_icmpeq, not ifeq.
6810
6811 * constants.c (find_methodref_with_class_index): New function.
6812 (find_methodref_index): Use find_methodref_with_class_index.
6813 * java-tree.h (find_methodref_with_class_index): New declaration.
6814 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
6815 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
6816 If context changed from interface to class, don't use invokeinterface.
6817
6818 2001-04-25 Per Bothner <per@bothner.com>
6819
6820 * verify.c (verify_jvm_instructions): For field instructions,
6821 check that field index is valid. For invoke instructions, check that
6822 method index is valid.
6823
6824 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
6825
6826 * config-lang.in (target_libs): Copy from $libgcj_saved.
6827
6828 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6829
6830 * decl.c (init_decl_processing): Add new class "protectionDomain"
6831 field.
6832 * class.c (make_class_data): Set initial value for "protectionDomain".
6833
6834 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6835
6836 * jvspec.c (lang_specific_driver): Fix memory allocation
6837 deficit, by using concat in lieu of xmalloc/sprintf.
6838
6839 2001-04-20 Per Bothner <per@bothner.com>
6840
6841 Fixes to compile multiple .class files at once.
6842 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
6843 * java-tree.h (CLASS_PARSED_P): New macro.
6844 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
6845 * jcf-parse.c (jcf_parse_source): Inline into read_class.
6846 (read_class): Avoid some code duplication.
6847 Don't call JCF_FINISH for a .class file - might be needed later.
6848 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
6849 rather than CLASS_LOADED_P, since latter implies class laid out.
6850 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
6851 * parse.y: Don't need to set CLASS_LOADED_P for array types.
6852
6853 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6854
6855 * Make-lang.in (java/boehm.o): Depend on toplev.h.
6856
6857 * boehm.c: Include toplev.h.
6858
6859 2001-04-06 Tom Tromey <tromey@redhat.com>
6860 Alexandre Petit-Bianco <apbianco@redhat.com>
6861
6862 Fix for PR gcj/1404 and PR gcj/2332:
6863 * parse.y (build_array_from_name): If we use the type_wfl then
6864 accumulate dimensions from the original type as well.
6865 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
6866
6867 2001-04-06 Tom Tromey <tromey@redhat.com>
6868
6869 * parse.y (analyze_clinit_body): Return true if the second operand
6870 of a METHOD_EXPR is nonzero.
6871
6872 2001-04-06 Tom Tromey <tromey@redhat.com>
6873
6874 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
6875 directory.
6876 ($(srcdir)/java/parse.c): Likewise.
6877
6878 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6879
6880 * gcj.texi: Use `which-gcj' instead of `which-g77.'
6881 (version-gcc): Initialized.
6882 (which-gcj): Likewise.
6883
6884 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6885
6886 * java-tree.h (struct lang_decl): New macro
6887 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
6888 * parse.y (build_instance_initializer): New function.
6889 (add_instance_initializer): Use it.
6890 (java_fix_constructors): Set `current_class' before fix pass.
6891 (fix_constructors): Just return if already fixed. Move `super()'
6892 invocation ahead. Use `build_instance_initializer.'
6893 Fixes PR java/1315.
6894
6895 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6896
6897 * parse.y (resolve_qualified_expression_name): Pass field's
6898 DECL_CONTEXT to `not_accessible_p.'
6899 (not_accessible_p): Changed parameters order in `inherits_from_p'
6900 invocation.
6901
6902 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
6903
6904 * lang-options.h: Add flag_check_references.
6905
6906 2001-04-04 Per Bothner <per@bothner.com>
6907
6908 * java-tree.h (CONSTANT_VALUE_P): New macro.
6909 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
6910 * parse.y (maybe_build_class_init_for_field): New static function.
6911 (resolve_expression_name, resolve_field_access): Use
6912 maybe_build_class_init_for_field instead of build_class_init
6913 This does not do the init if the field is compile-time-constant.
6914 (resolve_field_access): Simplify.
6915
6916 * parse.y (fold_constant_for_init): Merge test into switch.
6917
6918 2001-04-03 Zack Weinberg <zackw@stanford.edu>
6919
6920 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
6921 on gansidecl.h.
6922 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
6923
6924 2001-04-02 Zack Weinberg <zackw@stanford.edu>
6925
6926 * expr.c (pop_type_0): Save the result of the first
6927 lang_printable_name call in a scratch buffer, so it
6928 won't be clobbered by the second call.
6929
6930 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
6931
6932 * parse-scan.y (array_type:): Rewritten.
6933 (type_declaration:): `empty_statement' replaces `SC_TK.'
6934 (class_member_declaration:): `empty statement' added.
6935 (method_body:): Simplified.
6936 (static_initializer:): Likewise.
6937 (primary_no_new_array:): Use `type_literals.'
6938 (type_literals:): New rule.
6939 (dims:): Set and update `bracket_count.'
6940 Fixes PR java/1074. Fixes PR java/2412.
6941
6942 2001-03-28 Hans Boehm <boehm@acm.org>
6943
6944 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
6945 (get_boehm_type_descriptor): Set type on returned value to be a
6946 pointer length integer.
6947
6948 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6949
6950 * expr.c (pop_type_0): Call `concat' rather than building the
6951 string manually.
6952 (pop_type): Add format specifier in call to `error'.
6953
6954 * parse.y (patch_method_invocation): Avoid casting away
6955 const-ness.
6956
6957 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
6958
6959 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
6960
6961 2001-03-28 Richard Henderson <rth@redhat.com>
6962
6963 IA-64 ABI Exception Handling:
6964 * Make-lang.in (except.o): Don't depend on eh-common.h.
6965 * check-init.c (check_init): Handle EXC_PTR_EXPR.
6966 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
6967 [soft_exceptioninfo_call_node]: Remove.
6968 [eh_personality_libfunc, lang_eh_runtime_type]: New.
6969 (end_java_method): No emit_handlers.
6970 * except.c (java_set_exception_lang_code): Remove.
6971 (method_init_exceptions): Don't call it.
6972 (prepare_eh_table_type): No CATCH_ALL_TYPE.
6973 (build_exception_object_ref): New.
6974 (expand_end_java_handler): Update for except.h name changes.
6975 (emit_handlers, expand_resume_after_catch): Remove.
6976 * expr.c (java_lang_expand_expr): Update for except.h name changes.
6977 (process_jvm_instruction): Use build_exception_object_ref.
6978 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
6979 (soft_exceptioninfo_call_node): Remove.
6980 (build_exception_object_ref): Declare.
6981 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
6982 soft_exceptioninfo_call_node. Move processing ...
6983 [EXC_PTR_EXPR]: ... here.
6984 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
6985 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
6986 (source_end_java_method): No java_set_exception_lang_code or
6987 emit_handlers.
6988 (build_dot_class_method): Use build_exception_object_ref.
6989 (try_reference_assignconv): Check EXC_PTR_EXPR not
6990 soft_exceptioninfo_call_node.
6991
6992 2001-03-28 Richard Henderson <rth@redhat.com>
6993
6994 * java-tree.h (throw_node): Define as a single member of
6995 java_global_trees instead of a separate array.
6996 (JTI_THROW_NODE): New.
6997 * decl.c (throw_node): Don't declare.
6998 (init_decl_processing): Init a scalar throw_node.
6999 Don't register it for gc.
7000 * check-init.c (check_init): Reference scalar throw_node.
7001 * expr.c (build_java_athrow): Likewise.
7002 * jcf-write.c (generate_bytecode_insns): Likewise.
7003 * parse.h (BUILD_THROW): Likewise.
7004
7005 2001-03-28 Richard Henderson <rth@redhat.com>
7006
7007 * decl.c (end_java_method): Do not save and restore
7008 flag_non_call_exceptions.
7009 * parse.y (source_end_java_method): Likewise.
7010 * lang.c (flag_exceptions): Don't declare.
7011 (java_init_options): Set flag_non_call_exceptions. Set
7012 flag_exceptions here ...
7013 (java_init): ... not here.
7014
7015 2001-03-27 Richard Henderson <rth@redhat.com>
7016
7017 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
7018 exceptions_via_longjmp.
7019
7020 * lang.c (flag_new_exceptions): Don't declare it.
7021 (java_init_options): Or set it.
7022
7023 2001-03-27 Richard Henderson <rth@redhat.com>
7024
7025 * decl.c (end_java_method): Rename asynchronous_exceptions to
7026 flag_non_call_exceptions.
7027 * parse.y (source_end_java_method): Likewise.
7028
7029 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7030
7031 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7032
7033 2001-03-26 Mark Mitchell <mark@codesourcery.com>
7034
7035 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
7036
7037 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
7038
7039 * parse.y (find_as_inner_class): Follow current package
7040 indications not to mistakingly load an unrelated class.
7041
7042 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7043
7044 * constants.c (PUTN): Use memcpy, not bcopy.
7045
7046 * lex.c (java_read_char): Use memmove, not bcopy.
7047
7048 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
7049
7050 2001-03-23 Per Bothner <per@bothner.com>
7051
7052 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
7053 macro for better error pin-pointing.
7054 * java-tree.h: Fix typo in comment.
7055
7056 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
7057 Don't include jsr/goto in exception range.
7058 Check if start and end of exception range are the same (also TRY_EXPR).
7059 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
7060 However, do emit the following goto even if try_block is empty.
7061 Defer freeing exception_decl until after the finalizer, to make
7062 sure the local isn't reused in the finalizer. Fixes PR java/1208.
7063
7064 * parse.y (java_complete_lhs): If the try-clause is empty, just
7065 return the finally-clause and vice versa.
7066
7067 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
7068
7069 * gcj.texi (Input Options): documented the check for attribute
7070 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
7071 * java-tree.h (flag_force_classes_archive_check): Declared extern.
7072 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
7073 (jcf_parse): Check for the right classes archive if necessary.
7074 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
7075 (jcf_parse_fields): Fixed indentation.
7076 * jcf-write.c (append_gcj_attribute): New function.
7077 (generate_classfile): Compute the attribute count, invoke
7078 `append_gcj_attribute'.
7079 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
7080 turned into bit-fields. New bit-field `right_zip.'
7081 (JCF_ZERO): Set `right_zip' to zero.
7082 * lang-options.h (-fforce-classes-archive-check): Added flag.
7083 * lang.c (flag_force_classes_archive_check): New flag.
7084 (lang_f_options): New entry `force-classes-archive-check.'
7085 Fixes PR java/1213.
7086
7087 2001-02-07 Andrew Haley <aph@redhat.com>
7088
7089 * gcj.texi (Configure-time Options): Add -fcheck-references.
7090 * expr.c (build_java_indirect_ref): New function.
7091 (java_check_reference): New function.
7092 (build_java_array_length_access): Use build_java_indirect_ref to
7093 check for null references.
7094 (build_java_arrayaccess): Likewise.
7095 (build_get_class): Likewise.
7096 (build_field_ref): Likewise.
7097 (invoke_build_dtable): Likewise.
7098 (build_invokeinterface): Likewise.
7099 * lang.c (lang_f_options): Add flag_check_references.
7100 * jvspec.c (jvgenmain_spec): Add flag_check_references.
7101 * java-tree.h (flag_check_references): New variable.
7102 * lang.c (flag_check_references): Likewise.
7103 * parse.y (patch_invoke): Use java_check_reference.
7104 (patch_assignment): Allow for extra nesting in
7105 _Jv_CheckArrayStore.
7106
7107 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
7108
7109 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
7110 * lex.c (cxx_keywords): Likewise.
7111
7112 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
7113
7114 * parse.y (qualify_ambiguous_name): Broaden `length'
7115 recognition. Help MODIFY_EXPR be resolved as expression names.
7116 Fixes PR java/2066. Fixes PR java/2400.
7117
7118 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
7119
7120 * gjavah.c (process_file): Mark interface definitions with
7121 "__attribute__ ((java_interface))".
7122
7123 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
7124
7125 * class.c (layout_class): Fixed push_super_field's second
7126 argument. Fixes PR java/2333.
7127 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
7128 too early to lay innerclasses out.
7129
7130 2001-03-20 Tom Tromey <tromey@redhat.com>
7131 Alexandre Petit-Bianco <apbianco@redhat.com>
7132
7133 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
7134 inside an array reference. Insertion of the array store check
7135 rewritten. Fixes PR java/2299.
7136
7137 2001-03-20 Tom Tromey <tromey@redhat.com>
7138
7139 * lex.c (java_read_unicode): Only accept leading `u's.
7140
7141 2001-03-20 Tom Tromey <tromey@redhat.com>
7142
7143 * jcf-parse.c (read_class): Initialize `class'.
7144
7145 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7146
7147 * jcf_parse.c (jcf_parse): Eliminate unused variable.
7148
7149 2001-03-19 Mark Mitchell <mark@codesourcery.com>
7150
7151 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
7152 (layout_class): Likewise.
7153 (layout_class_method): Likewise.
7154 (emit_register_classes): Likewise.
7155 * decl.c (builtin_function): Likewise.
7156 (give_name_to_locals): Likewise.
7157
7158 2001-03-19 Per Bothner <per@bothner.com>
7159
7160 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
7161 before trying to load an inner class.
7162
7163 Fixes to process to command-line .class files in two passes.
7164 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
7165 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
7166 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
7167 * class.c (is_compiled_class): Fix for renamed flag.
7168 * parse.y (maybe_create_class_interface_decl): Likewise.
7169 * jcf-parse.c (yyparse): Also set if compiling .class files.
7170 * jcf-parse.c (read_class); Read current_class.
7171 (jcf_parse): Make static.
7172 (load_inner_classes): New function, with code moved from jcf_parse,
7173 because we need to inner classes after the command-line files are read.
7174 (yyparse): Set finput to NULL when it doesn't need to be closed.
7175 Reduce use of main_jcf (basically only for archive) and
7176 use finput instead of main_jcf->read_state.
7177 Inline jcf_figure_file_type into yyparse.
7178 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
7179 Defer load_inner_classes and parse_class_file to a second pass,
7180 after we've correctly mapped command-line .clas fiels to classes.
7181 (jcf_figure_file_type): Removed.
7182 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
7183 (JCF_ZERO): Also clear zipd field.
7184 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
7185
7186 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7187
7188 * jcf-parse.c (yyparse): Change ch from char * to char.
7189
7190 2001-03-19 Per Bothner <per@bothner.com>
7191
7192 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
7193 Add constructed filelist-file at end, following -xjava. Thus any .o
7194 and library files are not affected by the -xjava. Also wrap
7195 explicit @FILE with -xjava and -xnone.
7196
7197 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
7198
7199 * class.c (build_static_field_ref): Call make_decl_rtl() after
7200 setting the DECL_EXTERNAL flag.
7201
7202 2001-03-17 Per Bothner <per@bothner.com>
7203
7204 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
7205
7206 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
7207 when result is is needed (target is STACK_TARGET).
7208
7209 * parse.h (JDEP_SOLV): Removed.
7210 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
7211
7212 * parse.y (incomplete_class_list): Removed.
7213 (obtain_incomplete_type): Don't use or set incomplete_class_list.
7214 It doesn't work if resolve_class changes the name of an array type
7215 that is on the list and then someone else looks for the modified name.
7216 Also, seems liable to break when compiling multiple source files at
7217 once. So the simplest is to just remove incomplete_class_list -
7218 it is only a minor space win and it is not even clear it saves time.
7219
7220 * parse.y (resolve_class): Remove unneeded promote_type.
7221
7222 2001-03-15 Per Bothner <per@bothner.com>
7223
7224 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
7225 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
7226 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
7227 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
7228
7229 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
7230 * parse.y (java_expand_classes): Likewise.
7231
7232 * parse.y (expand_start_java_method): Was only called once and had a
7233 misleading name, so inline in caller java_complete_expand_method.
7234 (enter_a_block): Likewise inline in enter_block and remove.
7235
7236 Remove junk from when gcc/java was created (by copying from C/C++).
7237 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
7238 (struct binding_level): Remove fields keep, keep_if_subblocks,
7239 more_cleanups_ok, have_cleanups (which have never been used).
7240 (pushlevel, poplevel): Remove related useless code.
7241
7242 * class.c (make_class_data): The class_dtable_decl (i.e. the
7243 vtable for Class) should be external, except when compiling Class.
7244
7245 * jvspec.c (lang_specific_driver): Fix -C handling.
7246 Check -save-temps to see if temp @FILE should be deleted.
7247 Follow-up to/fix for February 16 patch.
7248
7249 * verify.c (verify_jvm_instructions): Better error msgs for dup.
7250 (type_stack_dup): Remove no-longer neded error check.
7251
7252 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
7253
7254 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
7255 to 'for_pointer'. If this type is for a pointer (argument) mangling,
7256 don't surround the element with 'N..E' if the type name is
7257 unqualified.
7258
7259 2001-03-14 Mark Mitchell <mark@codesourcery.com>
7260
7261 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
7262 DECL_RTL_SET_P, etc.
7263 (make_method_value): Likewise.
7264 (get_dispatch_table): Likewise.
7265
7266 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7267
7268 2001-03-07 Tom Tromey <tromey@redhat.com>
7269
7270 * config-lang.in (lang_requires): Define.
7271
7272 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
7273
7274 * typeck.c (convert): Check flag_unsafe_math_optimizations,
7275 not flag_fast_math.
7276
7277 2001-03-05 Per Bothner <per@bothner.com>
7278
7279 Fix a problem where rest_of_decl_compilation applied to
7280 class_dtable_decl causes problems because it was done too early,
7281 before output file was opened.
7282 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
7283 * class.c (class_dtable_decl): Add macro - element of class_roots.
7284 (make_class_data): Define class_dtable_decl.
7285 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
7286
7287 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7288
7289 * java/class.c, java/decl.c, java/java-tree.h: Replace all
7290 uses of 'boolean' with 'bool'.
7291
7292 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7293
7294 * lang-specs.h: Add zero initializer for cpp_spec field to all
7295 array elements.
7296
7297 2001-02-16 Per Bothner <per@bothner.com>
7298
7299 Handle compiling multiple input files at once, and @FILE syntax.
7300 * gcj.texi: Updated documentation to match.
7301 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
7302 * jcf-parse.c (parse_source_file): Split into ...
7303 (parse_source_file_1): New function - and:
7304 (parse_source_file_2): New function.
7305 (yyparse): On -ffilelist-file, open and scan named file.
7306 On first pass over files, only do parse_source_file_1.
7307 A new second pass calls parse_source_file_2 for each file to compile.
7308 (init_jcf_parse): Call init_src_parse.
7309 * jvspec.c (INDIRECT_FILE_ARG): New flag.
7310 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
7311 as multiple input file combined in one compilation.
7312 * lang-options.h: Add -ffilelist-file
7313 * lang.c (flag_filelist_file): New flag variable.
7314 (lang_f_options): Handle -ffilelist-file.
7315 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
7316 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
7317 gclass_list - use global fields of src_parse_roots instead.
7318 * parse.y (src_parse_roots): New array.
7319 (incomplete_class_list, gclass_list): New macros.
7320 (push_parser_context, java_pop_parser_context,
7321 java_parser_context_resume): Don't fiddle with deleted fields.
7322 (various): Use incomplete_class gclass_list and global macros
7323 instead of parse_ctxt fields - the lists are global.
7324 (init_src_parse): New function.
7325
7326 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7327
7328 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
7329
7330 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
7331
7332 * parse.y (check_inner_class_access): Moved declaration of local
7333 `enclosing_decl_type' to the right location.
7334
7335 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
7336
7337 * parse.y (parser_check_super_interface): Don't call
7338 check_pkg_class_access for an inner interface.
7339 (parser_check_super): Don't call check_pkg_class_access for inner
7340 class.
7341 (do_resolve_class): Simplify enclosing type loop. Don't call
7342 check_pkg_class_access if CL and DECL are not set.
7343 (find_in_imports_on_demand): Set DECL if class_type needed to be
7344 loaded. Don't call check_pkg_class_access for an inner class.
7345 (check_inner_class_access): Rewritten to implement member access
7346 rules as per spec 6.6.1.
7347 (check_pkg_class_access): Handle the empty package correctly.
7348 (in_same_package): New function. Determine if two classes are in the
7349 same package.
7350
7351 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
7352
7353 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
7354 method into array types.
7355 * parse.y (patch_method_invocation): Bypass access check on clone call
7356 to array instance.
7357
7358 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
7359
7360 * expr.c (build_instanceof): Check for arrays when trying fold to
7361 false.
7362
7363 2001-02-15 Jim Meyering <meyering@lucent.com>
7364
7365 * Make-lang.in (java.install-common): Depend on `installdirs'.
7366 (java.install-info): Likewise.
7367
7368 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
7369
7370 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
7371
7372 2001-02-14 Tom Tromey <tromey@redhat.com>
7373 Alexandre Petit-Bianco <apbianco@cygnus.com>
7374
7375 Fix for PR java/1261.
7376 * typeck.c (build_java_array_type): Add public `clone' method to
7377 arrays.
7378 * parse.y (resolve_qualified_expression_name): Use current_class
7379 when checking for inaccessibility.
7380 (patch_method_invocation): Fixed error message when accessibility
7381 denied. Added `from_super' argument.
7382
7383 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
7384
7385 * parse.y (resolve_class): Don't build a fake decl. Use the one
7386 already built.
7387 * typeck.c (build_java_array_type): Build and assign decl to array
7388 type.
7389
7390 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
7391
7392 * parse.y (not_accessible_p): Changed leading comment. Added extra
7393 `where' argument. Use it to enforce protected access rules.
7394 (resolve_qualified_expression_name): Added extra argument to
7395 not_accessible_p.
7396 (patch_method_invocation): Use argument `primary' to provide
7397 not_accessible_p with an extra argument.
7398 (lookup_method_invoke): Added extra argument to not_accessible_p.
7399 (search_applicable_method_list): Likewise.
7400
7401 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
7402
7403 * parse.y (resolve_qualified_expression_name): Try to resolve as
7404 an inner class access only if `decl' is a TYPE_DECL.
7405
7406 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7407
7408 * decl.c (classdollar_identifier_node): Initialize.
7409 * java-tree.h (enum java_tree_index): New entry
7410 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
7411 (classdollar_identifier_node): New macro.
7412 (ID_CLASSDOLLAR_P): Likewise.
7413 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
7414 (build_dot_class_method_invocation): Likewise.
7415 (find_applicable_accessible_methods_list): `class$' can't be
7416 inherited.
7417
7418 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
7419
7420 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
7421
7422 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7423
7424 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
7425 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
7426 gone.
7427
7428 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7429
7430 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
7431 outside of the `__U' sequence too.
7432 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
7433 sequence too.
7434
7435 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7436
7437 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
7438
7439 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7440
7441 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
7442 (JVGENMAIN_OBJS): Likewise.
7443 * java-tree.h (append_gpp_mangled_name): New prototype.
7444 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
7445 Removed cast calling `gcc_add_root.'
7446 * jvgenmain.c (mangle_obstack): New global, initialized.
7447 (main): Use it.
7448 (do_mangle_class): Constify local `ptr.'
7449 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
7450 append_gpp_mangle_name and update `count' if necessary.
7451 Use `mangle_obstack.'
7452 * mangle.c (append_unicode_mangled_name): Removed.
7453 (append_gpp_mangled_name): Likewise.
7454 (unicode_mangling_length): Likewise.
7455 (mangle_member_name): Return type set to `void.'
7456 (mangle_field_decl): Don't append `U' in escaped names.
7457 (mangle_method_decl): Likewise.
7458 (mangle_member_name): Just use `append_gpp_mangled_name.'
7459 * mangle_name.c: New file.
7460
7461 2001-02-07 Per Bothner <per@bothner.com>
7462
7463 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
7464
7465 * check-init.c (check_init): Don't call done_alternative after
7466 processing loop code, as a LOOP_EXPR never terminates normally.
7467
7468 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
7469
7470 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
7471
7472 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7473
7474 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
7475 DECLs.
7476
7477 2001-02-06 Tom Tromey <tromey@redhat.com>
7478
7479 * lex.c (java_new_lexer): Longer error message.
7480
7481 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
7482 Alexandre Petit-Bianco <apbianco@cygnus.com>
7483
7484 * typeck.c (build_prim_array_type): Added leading comment.
7485 (build_java_array_type): Moved locals out of
7486 block. Always create the `data' field, fixed alignment to match
7487 C++.
7488
7489 2001-02-04 Tom Tromey <tromey@redhat.com>
7490
7491 * expr.c (java_lang_expand_expr): Don't bother recomputing
7492 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
7493 Fixes PR java/1866.
7494
7495 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7496
7497 * parse.y (process_imports): Save the original name of the import
7498 for better error report.
7499
7500 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
7501
7502 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
7503 of macros used when compiling jvspec.c.
7504 * jvspec.c (lang_specific_driver): Link with the shared
7505 libgcc by default.
7506
7507 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7508
7509 * check-init.c (check_init): Call internal_error instead of fatal.
7510 * expr.c (java_lang_expand_expr): Likewise.
7511 * jcf-parse.c (get_constant): Likewise.
7512 * mangle.c (java_mangle_decl): Likewise.
7513 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
7514 (operator_string): Likewise.
7515 * check-init.c (check_init): Call abort instead of fatal.
7516 * class.c (build_class_ref): Likewise.
7517 * constants.c (write_constant_pool): Likewise.
7518 * decl.c (start_java_method): Likewise.
7519 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
7520 (java_stack_dup, encode_newarray_type): Likewise.
7521 (build_java_array_length_access): Likewise.
7522 (build_java_check_indexed_type, expand_java_pushc): Likewise.
7523 (build_java_soft_divmod, build_invokeinterface): Likewise.
7524 * java-tree.h (INNER_CLASS_P): Likewise.
7525 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
7526 (give_name_to_class, get_class_constant): Likewise.
7527 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
7528 (find_constant_index, generate_bytecode_conditional): Likewise.
7529 (generate_bytecode_insns, perform_relocations): Likewise.
7530 * lex.c (java_unget_unicode, java_lex): Likewise.
7531 * mangle.c (mangle_type, mangle_record_type): Likewise.
7532 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
7533 (finish_mangling): Likewise.
7534 * parse.h (MARK_FINAL_PARMS): Likewise.
7535 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
7536 (obtain_incomplete_type, java_complete_class): Likewise.
7537 (java_check_regular_methods, java_complete_expand_method): Likewise.
7538 (cut_identifier_in_qualified, check_deprecation): Likewise.
7539 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
7540 (java_complete_lhs, lookup_name_in_blocks): Likewise.
7541 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
7542 * typeck.c (set_local_type, parse_signature_type): Likewise.
7543 (parse_signature_string, build_java_signature): Likewise;
7544 (set_java_signature): Likewise.
7545 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
7546 * class.c (add_method): Call fatal_error instead of fatal.
7547 (build_static_field_ref): Likewise.
7548 * expr.c (build_known_method_ref, expand_invoke): Likewise.
7549 * jcf-parse.c (get_constant, jcf_parse): Likewise.
7550 * lex.c (java_new_new_lexer): Likewise.
7551 * jv-scan.c (main): Likewise.
7552 (fatal_error): Renamed from fatal.
7553 * jcf-parse.c (yyparse): Call fatal_io_error instead of
7554 pfatal_with_name.
7555 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
7556 (yyparse): Likewise.
7557 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
7558 * lex.c (java_get_line_col): Likewise.
7559 * jcf-parse.c (load_class): Make errors non-fatal.
7560 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
7561
7562 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
7563
7564 * jvgenmain.c (class_mangling_suffix): Remove unused string.
7565 (error): Remove unused function.
7566 (main): Don't use "__attribute__ alias" on generated class symbol.
7567
7568 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
7569
7570 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
7571 argument.
7572 * parse.y (finish_method_declaration): Code accounting for WFLed
7573 method DECL_NAMEs deleted.
7574 (check_abstract_method_definitions): Likewise.
7575 (resolve_type_during_patch): Layout resolved type.
7576 * typeck.c (lookup_do): Removed unused local.
7577
7578 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
7579
7580 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
7581 * decl.c (init_decl_processing): Use integer_minus_one_node, not
7582 integer_negative_one_node.
7583 * expr.c (build_java_binop): Likewise.
7584
7585 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7586
7587 * zextract.c (read_zip_archive): Read file_offset before writing
7588 zipd and consequently clobbering the header contents.
7589
7590 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7591
7592 * Make-lang.in: Remove all dependencies on defaults.h.
7593 * decl.c: Don't include defaults.h.
7594 * expr.c: Likewise.
7595 * parse.y: Likewise.
7596
7597 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7598
7599 * ChangeLog (2001-01-21): Fixed typo.
7600 * class.c (layout_class_method): Code accounting for WFLed
7601 method DECL_NAMEs deleted.
7602 * constant.c (find_methodref_index): Likewise.
7603 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
7604 * java-tree.h (DECL_FUNCTION_WFL): New macro.
7605 (struct lang_decl): New field `wfl'.
7606 (java_get_real_method_name): Prototype deleted.
7607 * mangle.c (mangle_method_decl): Code accounting for WFLed
7608 method DECL_NAMEs deleted.
7609 * parse.h (GET_METHOD_NAME): Macro deleted.
7610 * parse.y (reset_method_name): Deleted.
7611 (method_header): Set DECL_FUNCTION_WFL.
7612 (check_abstract_method_header): Code accounting for WFLed method
7613 DECL_NAMEs deleted.
7614 (java_get_real_method_name): Deleted.
7615 (check_method_redefinition): Code accounting for WFLed method
7616 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
7617 (java_check_regular_methods): Likewise.
7618 (java_check_abstract_methods): Likewise.
7619 (java_expand_classes): Don't call `reset_method_name.'
7620 (search_applicable_method_list): Use DECL_NAMEs instead of
7621 GET_METHOD_NAME.
7622 * typeck.c (lookup_do): Code accounting for WFLed method
7623 DECL_NAMEs deleted.
7624
7625 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
7626
7627 * lex.c (java_read_char): Check for EOF from getc first.
7628
7629 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7630
7631 * class.c (layout_class): Don't lay the superclass out if it's
7632 already being laid out.
7633 * jcf-parse.c (handle_innerclass_attribute): New function.
7634 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
7635 handle_innerclasses_attribute.
7636 (jcf_parse): Don't load an innerclasses if it's already being
7637 laid out.
7638 * jcf-write.c (append_innerclass_attribute_entry): Static
7639 `anonymous_name' and its initialization deleted. `ocii' and `ini'
7640 to be zero for anonymous classes.
7641
7642 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7643
7644 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
7645 necessary.
7646 * jcf-parse.c (set_source_filename): Use
7647 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
7648
7649 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7650
7651 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
7652 gets a unique asm name.
7653
7654 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7655
7656 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
7657 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7658 if necessary.
7659 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
7660 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
7661 * parse.y (lookup_package_type_and_set_next): Deleted.
7662 (resolve_package): Removed unnecessary code.
7663 (find_applicable_accessible_methods_list): `finit$' can't be
7664 inherited.
7665 * verify.c (pop_argument_types): Added missing prototype.
7666
7667 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
7668
7669 * config-lang.in: Disable java by default.
7670
7671 2001-01-23 Tom Tromey <tromey@redhat.com>
7672
7673 * gcj.texi (Copying): New node.
7674 Added copyright information.
7675
7676 2001-01-21 Per Bothner <per@bothner.com>
7677
7678 Various fixes to allow compiling a compressed .jar/.zip archive.
7679 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
7680 (struct ZipFile): Add fields name and next (from ZipFileCache).
7681 (struct ZipDirectory): New field zipf points to owning ZipFile.
7682 * jcf.h (struct ZipDirectory): Add forward declaration.
7683 (struct JCF): Declare zipd field to have type struct ZipDirectory.
7684 Remove seen_in_zip and zip_offset fields.
7685 (JCF_SEEN_IN_ZIP): New macro.
7686 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
7687 * jcf-io.c: Change all ZipFileCache to ZipFile.
7688 (read_zip_member): New function.
7689 (open_in_zip): Call read_zip_member.
7690 * jcf-parse.c (find_in_current_zip): Remove function.
7691 (read_class): Merge in find_in_current_zip functionality.
7692 Call read_zip_member if needed.
7693 (parse_zip_file_entries): Use read_zip_member.
7694 (process_zip_dir): Update for removed and added JCF fields.
7695 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
7696
7697 2001-01-21 Per Bothner <per@bothner.com>
7698
7699 Minor optimization of static ggc roots.
7700 * jcf-parse.c (parse_roots): New static field.
7701 (current_field, current_method, current_file_list): Replace by macros
7702 naming fields of parse_roots.
7703 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
7704 * class.c (class_roots): New static field.
7705 (registered_class, fields_ident, info_ident, class_list):
7706 New macros naming fields of parse_roots.
7707 (build_static_field_ref): Don't register roots here.
7708 (layout_class): Static field list replaced by macro class_list.
7709 (init_class_processing): Call ggc_add_tree_root for 4 roots.
7710 Initialize fields_ident and info_ident here.
7711
7712 2001-01-21 Per Bothner <per@bothner.com>
7713
7714 * jcf-parse.c (ggc_mark_jcf): New function.
7715 (init_jcf_parse): Register current_jcf as ggc root.
7716
7717 2001-01-21 Per Bothner <per@bothner.com>
7718
7719 * lang.c (put_decl_node): Print method's name.
7720
7721 2001-01-21 Per Bothner <per@bothner.com>
7722
7723 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
7724 (verify_jvm_instructions): Use it, for better error messages on loads.
7725
7726 2001-01-21 Per Bothner <per@bothner.com>
7727
7728 * verify.c (merge_type_state): Still may have to merge even if
7729 LABEL_VERIFIED (label).
7730
7731 2001-01-21 Per Bothner <per@bothner.com>
7732
7733 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
7734 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
7735
7736 2001-01-19 Per Bothner <per@bothner.com>
7737
7738 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
7739 if expeting an interface type. Refines Tom's change of 2000-09-12.
7740
7741 2001-01-18 Per Bothner <per@bothner.com>
7742
7743 * gcj.texi (Input Options): Mention .java files.
7744
7745 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7746
7747 * lang-options.h (-Wunsupported-jdk11): Removed.
7748 * lang.c (flag_not_overriding): Deleted.
7749 (flag_static_local_jdk1_1): Likewise.
7750 (lang_W_options): Removed "unsupported-jdk11" entry.
7751 * parse.y (java_check_methods): Removed dead code.
7752
7753 2001-01-17 Tom Tromey <tromey@redhat.com>
7754
7755 Changes suggested by Per Bothner:
7756 * gcj.texi (Input Options): Don't mention input files.
7757 (Code Generation): Updated --main information.
7758 (Invoking jcf-dump): Mention that --javap is incomplete.
7759 From Alexandre Petit-Bianco:
7760 (Warnings): Don't mention -Wunsupported-jdk11.
7761 My stuff:
7762 (Compatibility): Mention JDK 1.2-ness of libraries.
7763 (Resources): Mention resources used when writing gcj.
7764
7765 2001-01-17 Tom Tromey <tromey@redhat.com>
7766
7767 * gcj.texi: New file.
7768 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
7769 (java.info): Depend on gcj.info.
7770 (java/gcj.dvi): New target.
7771 (java.dvi): Depend on gcj.dvi.
7772 (java.install-info): Wrote.
7773
7774 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
7775
7776 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
7777 having called make_decl_rtl.
7778
7779 2001-01-14 Per Bothner <per@bothner.com>
7780
7781 Various patches to emit better messages on verification errors.
7782 * expr.c (push_type_0): Return error indication on stack overflow,
7783 instead of callinfg fatal.
7784 (push_type): Now just call push_type_0 (nd fatal on overflow).
7785 (pop_type_0): Return detailed error message (in a char** argument).
7786 (pop_type): If pop_type_0 fails, print error message.
7787 (pop_argument_types): Moved to verify.c.
7788 * verify.c (pop_argument_types): Moved from expr.c.
7789 Return a (possible) error message, rather than void.
7790 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
7791 (verify_jvm_instruction): Use new macros, improving error messages.
7792 For case OPCODE_astore use object_ptr_type_node.
7793 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
7794 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
7795
7796 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
7797 constant, return body without wrapper. (Improves constant folding.)
7798 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
7799
7800 2001-01-13 Per Bothner <per@bothner.com>
7801
7802 * expr.c (expand_java_field_op): Assigning to a final field outside
7803 an initializer does not violate JVM spec, so should be warning, not
7804 error. (Sun's verifier does not complain - though MicroSoft's does.)
7805
7806 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
7807
7808 * gjavah.c (version), jcf-dump.c (version): Update copyright year
7809 to 2001.
7810
7811 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
7812
7813 * parse.y (resolve_expression_name): Permit instance variables from
7814 enclosing context in super constructor call.
7815 (resolve_qualified_expression_name): Permit enclosing class's qualified
7816 "this" in super constructor call.
7817
7818 2001-01-10 Mark Mitchell <mark@codesourcery.com>
7819
7820 * class.c (build_utf8_ref): Remove last argument in call to
7821 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
7822 (build_class_ref): Likewise.
7823 (build_static_field_ref): Likewise.
7824 (get_dispatch_table): Likewise.
7825 (layout_class_method): Likewise.
7826 (emit_register_classes): Likewise.
7827 * constants.c (build_constant_data_ref): Likewise.
7828 * decl.c (builtin_function): Likewise.
7829 (create_primitive_vtable): Likewise.
7830 * expr.c (build_known_method_def): Likewise.
7831 (build_jni_stub): Likewise.
7832 (java_lang_expand_expr): Likewise.
7833
7834 2001-01-10 Tom Tromey <tromey@redhat.com>
7835
7836 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
7837
7838 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7839
7840 * java-tree.h (lang_printable_name_wls): New prototype.
7841 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
7842 rather than `current_class' to print type name. Don't prepend type
7843 names when printing constructor names.
7844 (lang_printable_name_wls): New function.
7845 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
7846 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
7847 * parse.y (patch_method_invocation): Message tuned for constructors.
7848 (not_accessible_p): Grant `private' access from within
7849 enclosing contexts.
7850
7851 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7852
7853 All files with updated copyright when applicable.
7854 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
7855 * class.c (mangle_class_field): Function removed.
7856 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
7857 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
7858 (build_class_ref): Call `java_mangle_class_field' instead of
7859 `mangle_class_field.'
7860 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
7861 (layout_class): Call `java_mangle_decl' instead of
7862 `mangle_static_field.'
7863 (cxx_keywords): Initialized static array moved to `lex.c.'
7864 (layout_class_method): Changed leading comment. Simplified to
7865 call `java_mangle_decl.' Local `ptr' moved in for loop body.
7866 * decl.c (lang_mark_tree): Mark field `package_list.'
7867 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
7868 (struct lang_type): New field `package_list.'
7869 (unicode_mangling_length): Prototype removed.
7870 (append_gpp_mangled_name, append_gpp_mangled_classtype,
7871 emit_unicode_mangled_name): Likewise.
7872 (cxx_keyword_p): New prototype.
7873 (java_mangle_decl, java_mangle_class_field,
7874 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
7875 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
7876 `build_expr_wfl.'
7877 * jvgenmain.c (main_method_prefix): Global variable removed.
7878 (main_method_suffix): Likewise.
7879 (do_mangle_classname): New function.
7880 (main): Call it. Format changed to accommodate new mangling scheme.
7881 * lex.c: (utf8_cmp): Conditionally prototyped.
7882 (cxx_keywords): Moved from class.c, conditionally defined.
7883 (utf8_cmp, cxx_keyword_p): Likewise.
7884 * mangle.c (obstack.h, ggc.h): Included.
7885 (mangle_field_decl): New function.
7886 (mangle_method_decl, mangle_type, mangle_pointer_type,
7887 mangle_array_type, mangle_record_type,
7888 find_compression_pointer_match, find_compression_array_match,
7889 find_compression_record_match,
7890 find_compression_array_template_match, set_type_package_list,
7891 entry_match_pointer_p, emit_compression_string, init_mangling,
7892 finish_mangling, compression_table_add, mangle_member_name): Likewise.
7893 (mangle_obstack): New global.
7894 (MANGLE_RAW_STRING): New macro.
7895 (unicode_mangling_length): Turned static.
7896 (append_unicode_mangled_name): Renamed from
7897 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
7898 replaces `obstack', removed from the parameter list.
7899 (append_gpp_mangled_name): Turned static. `mangle_obstack'
7900 replaces parameter `obstack', removed from the parameter list. Call
7901 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
7902 (append_gpp_mangled_classtype): Removed.
7903 (compression_table, compression_next): New static variables.
7904 * parse.y (temporary_obstack): Extern declaration removed.
7905
7906 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7907
7908 * parse.y (patch_binop): Compute missing type in error situations.
7909
7910 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
7911
7912 * class.c (make_class_data): Push initial value for "arrayclass".
7913 * decl.c (init_decl_processing): Add new class field "arrayclass".
7914
7915 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
7916
7917 From patha@softlab.ericsson.se:
7918 * parse.y (switch_label): Use build, not build1, to construct
7919 DEFAULT_EXPR.
7920
7921 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
7922
7923 * lang.c (lang_decode_option): Change -MA to -MP.
7924 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
7925 Update to new prototype; do quote targets.
7926 (jcf_dependency_write): Update.
7927
7928 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
7929
7930 Shorten primitive array allocation path:
7931 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
7932 to create new primitive arrays.
7933 * expr.c (build_newarray): If generating native code, call
7934 soft_newarray_node with a reference to the primitive TYPE identifier
7935 instead of type_value.
7936
7937 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
7938
7939 Fix for PRs gcj/312 and gcj/253:
7940 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
7941 dest if they arn't already.
7942 * class.c (layout_class): Call maybe_layout_super_class on
7943 superinterfaces also, but only if compiling from bytecode.
7944
7945 Fix for PR gcj/373:
7946 * parse.y (create_class): Set ACC_STATIC if class is declared in an
7947 interface.
7948
7949 2000-12-15 Tom Tromey <tromey@redhat.com>
7950
7951 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
7952 set.
7953
7954 2000-12-14 Andrew Haley <aph@redhat.com>
7955
7956 * boehm.c (mark_reference_fields): Change test to correctly detect
7957 bitmap overflow.
7958
7959 2000-12-15 Andreas Jaeger <aj@suse.de>
7960
7961 * config-lang.in (lang_dirs): Added.
7962
7963 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7964
7965 * parse.y (end_artificial_method_body): Fixed undefined behavior.
7966 Credits go to rth for finding it.
7967
7968 2000-12-13 Mike Stump <mrs@wrs.com>
7969
7970 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
7971
7972 2000-11-07 Tom Tromey <tromey@cygnus.com>
7973
7974 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
7975 * lex.c (java_ignorable_control_p): Removed.
7976 (java_letter_or_digit_p): Removed.
7977 (java_start_char_p): New function.
7978 (java_read_char): Return `int', not `unicode_t'. Changed
7979 callers.
7980 (java_read_unicode): Likewise.
7981 (java_read_unicode_collapsing_terminators): Likewise.
7982 (java_get_unicode): Likewise.
7983 (java_new_lexer): Initialize hit_eof.
7984 (java_parse_end_comment): Take `int' argument.
7985 (java_parse_doc_section): Likewise.
7986 (java_parse_escape_sequence): Don't allow backlash-newline.
7987 Return `int'.
7988 * lex.h (JAVA_DIGIT_P): Removed.
7989 (_JAVA_LETTER_OR_DIGIT_P): Removed.
7990 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
7991 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
7992 (JAVA_PART_CHAR_P): New macro.
7993 (UEOF): Now -1.
7994 (JAVA_CHAR_ERROR): Now -2.
7995 (java_lexer): New field `hit_eof'.
7996 * chartables.h: New file.
7997 * gen-table.pl: new file.
7998
7999 2000-11-20 Tom Tromey <tromey@cygnus.com>
8000 Alexandre Petit-Bianco <apbianco@cygnus.com>
8001
8002 * parse.y (java_complete_lhs): Only allow compound assignment of
8003 reference type if type is String.
8004
8005 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8006
8007 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
8008 jcf-path.c: Likewise.
8009
8010 2000-12-09 Anthony Green <green@redhat.com>
8011
8012 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
8013 filestart and filename_length as int values.
8014
8015 2000-12-07 Mo DeJong <mdejong@redhat.com>
8016
8017 * jcf-io.c (find_class): Correct the logic that tests to see if a
8018 .java file is newer than its .class file. The compiler was
8019 incorrectly printing a warning when file mod times were equal.
8020
8021 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
8022
8023 * jvgenmain.c: Use ISPRINT not isascii.
8024
8025 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8026
8027 * parse.y (end_artificial_method_body): Fixed typo.
8028
8029 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
8030
8031 * parse.y (patch_method_invocation): Pick the correct enclosing
8032 context when creating inner class instances.
8033 Fixes gcj/332.
8034
8035 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
8036
8037 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8038 Update copyright year to 2000.
8039
8040 2000-11-23 Anthony Green <green@redhat.com>
8041
8042 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
8043 Move current_file_list out of yyparse and make it static.
8044
8045 * expr.c: Declare quick_stack and tree_list_free_list as static
8046 (init_expr_processing): Register quick_stack and
8047 tree_list_free_list roots.
8048
8049 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8050
8051 * parse.y (build_outer_field_access): New local `decl_ctx', use
8052 it. Check for field's context and current class immediate outer
8053 context inheritance.
8054 (outer_field_access_p): Consider fields inherited from the last
8055 enclosing context.
8056 (build_access_to_thisn): Stop at the last enclosing context if
8057 necessary.
8058 Fixes gcj/367.
8059
8060 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
8061
8062 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
8063
8064 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
8065
8066 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
8067 scratch buffer.
8068
8069 2000-11-20 Tom Tromey <tromey@cygnus.com>
8070
8071 * jv-scan.c (help): Document --complexity.
8072 (options): Added --complexity.
8073 (flag_complexity): New global.
8074 (main): Call `report'.
8075 * parse-scan.y (complexity): New global.
8076 (if_then_statement, if_then_else_statement,
8077 if_then_else_statement_nsi, switch_block_statement_group,
8078 while_expression, do_statement, for_begin, continue_statement,
8079 throw_statement, catch_clause, finally, method_invocation,
8080 conditional_and_expression, conditional_or_expression,
8081 conditional_expression): Update complexity.
8082 (reset_report): Reset complexity.
8083 (report): New function.
8084
8085 2000-11-20 Tom Tromey <tromey@cygnus.com>
8086
8087 * lex.c (yylex): Added STRICT_TK case.
8088 * parse.y (STRICT_TK): Added.
8089 * parse-scan.y (STRICT_TK): Added.
8090 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
8091 `;'. Use 4, not 3, with -k option. Correctly rename resulting
8092 file.
8093 * keyword.h: Rebuilt.
8094 * keyword.gperf (strictfp): Added.
8095
8096 2000-11-20 Tom Tromey <tromey@cygnus.com>
8097
8098 * lex.c (yylex): Recognize floating point constants with leading
8099 0.
8100
8101 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8102
8103 * java-tree.h (cyclic_inheritance_report): Constify.
8104 * parse.y (cyclic_inheritance_report): Likewise.
8105
8106 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
8107
8108 * parse.y (goal): Remove call to ggc_add_string_root.
8109
8110 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8111
8112 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
8113 Create string in scratch buffer, then pass to build_string.
8114
8115 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8116
8117 * parse.y (issue_warning_error_from_context): Add
8118 ATTRIBUTE_PRINTF.
8119
8120 2000-11-11 Anthony Green <green@redhat.com>
8121
8122 * jcf-parse.c (process_zip_dir): Add finput parameter.
8123 (jcf_figure_file_type): Call process_zip_dir with appropriate
8124 argument.
8125
8126 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8127
8128 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
8129 * jcf-parse.c (jcf_figure_file_type): Likewise.
8130
8131 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
8132
8133 * parse.y (create_new_parser_context): Use memset () instead of
8134 bzero ().
8135
8136 2000-11-08 Tom Tromey <tromey@cygnus.com>
8137
8138 * gjavah.c (process_file): Only include gcj/cni.h when generating
8139 CNI stubs.
8140
8141 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
8142
8143 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
8144 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
8145 instead of bzero ().
8146
8147 2000-11-05 Tom Tromey <tromey@cygnus.com>
8148
8149 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
8150 * lex.c (IS_ZERO): New define.
8151 (java_perform_atof): Error on floating point underflow.
8152
8153 2000-11-04 Tom Tromey <tromey@cygnus.com>
8154
8155 * lex.c (java_parse_escape_sequence): Only read two octal
8156 characters if the first one is greater than 3. Don't allow
8157 "octal" numbers to include the digits 8 or 9.
8158
8159 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
8160
8161 * Make-lang.in (java.distdir): Remove.
8162
8163 2000-11-03 Tom Tromey <tromey@cygnus.com>
8164
8165 * Make-lang.in (java.dvi): New target.
8166 Partial fix for PR other/567.
8167
8168 * lang-options.h: Mention -Wout-of-date.
8169 * jcf-dump.c (flag_newer): New global.
8170 * gjavah.c (flag_newer): New global.
8171 * jcf-io.c (find_class): Only warn when flag_newer set.
8172 * lang.c (flag_newer): New global.
8173 (struct string_option): New declaration.
8174 (lang_W_options): New global.
8175 (process_option_with_no): New function.
8176 (lang_decode_option): Use it.
8177
8178 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
8179 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
8180 `$'.
8181
8182 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
8183 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
8184 * lex.c (java_read_unicode): Removed `term_context' argument.
8185 Recognize any number of `u' in `\u'.
8186 (java_read_unicode_collapsing_terminators): New function.
8187 (java_get_unicode): Use it.
8188 (java_lineterminator): Removed.
8189 (yylex): Produce error if character literal is newline or single
8190 quote. Return if eof found in middle of `//' comment. EOF in
8191 `//' comment is only an error if pedantic.
8192 (java_ignorable_control_p): New function.
8193 (java_parse_end_comment): Return if eof found in middle of
8194 comment.
8195 Include flags.h.
8196 * jv-scan.c (pedantic): New global.
8197
8198 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8199
8200 * parse.y (outer_field_access_p): Inherited fields aren't
8201 consider outer fields.
8202 (maybe_build_thisn_access_method): Use
8203 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
8204 (resolve_expression_name): Trigger an error if a static field
8205 is being accessed as an outer field.
8206
8207 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8208
8209 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
8210 Fixes gcj/365.
8211
8212 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
8213
8214 * Make-lang.in: Move all build rules here from Makefile.in,
8215 adapt to new context. Wrap all rules that change the current
8216 directory in parentheses. Expunge all references to $(P).
8217 When one command depends on another and they're run all at
8218 once, use && to separate them, not ;. Add OUTPUT_OPTION to
8219 all object-file generation rules. Delete obsolete variables.
8220
8221 * Makefile.in: Delete.
8222 * config-lang.in: Delete outputs= line.
8223
8224 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8225
8226 * parse.y (patch_method_invocation): NULLify this_arg when already
8227 inserted.
8228 (maybe_use_access_method): Handle call to methods unrelated to the
8229 current class. Fixed comment.
8230 Fixes gcj/361.
8231
8232 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8233
8234 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
8235 scope.
8236
8237 2000-10-24 Tom Tromey <tromey@cygnus.com>
8238
8239 * lex.c (java_new_lexer): Initialize new fields. Work around
8240 broken iconv() implementations.
8241 (java_read_char): Swap bytes if required. Use fallback decoder if
8242 required.
8243 (byteswap_init, need_byteswap): New globals.
8244 (java_destroy_lexer): Only close iconv handle if it is in use.
8245 * lex.h (java_lexer): New fields read_anything, byte_swap,
8246 use_fallback.
8247 Made out_buffer unsigned.
8248
8249 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8250
8251 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
8252 where an enclosing context can be set on the jdep.
8253 (do_resolve_class): Fixed identation.
8254
8255 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8256
8257 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
8258
8259 * jcf-reader.c (peek_attribute, skip_attribute): Only define
8260 when requested.
8261
8262 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
8263
8264 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
8265
8266 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8267
8268 * jcf-write.c (OP1): Update `last_bc'.
8269 (struct jcf_block): Fixed indentation and typo in comments. New
8270 field `last_bc'.
8271 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
8272 follows `monitorenter'.
8273 * parse.y (patch_synchronized_statement): New local `tmp'. Call
8274 `patch_string'.
8275 Fixes gcj/232.
8276
8277 2000-10-16 Tom Tromey <tromey@cygnus.com>
8278
8279 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
8280 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
8281 * lang-options.h: Added -MA, -MT, -MF..
8282 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
8283 (DEPEND_TARGET_SET): New macro.
8284 (DEPEND_FILE_ALREADY_SET): Likewise.
8285 (init_parse): Handle new flags.
8286 * jcf.h (jcf_dependency_print_dummies): Declare.
8287 * Make-lang.in (s-java): Added mkdeps.o.
8288 * Makefile.in (BACKEND): Added mkdeps.o.
8289 (../gcjh$(exeext)): Added mkdeps.o.
8290 (../jcf-dump$(exeext)): Added mkdeps.o.
8291 * jcf-depend.c: Include mkdeps.h.
8292 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
8293 add_entry): Removed.
8294 (jcf_dependency_reset): Rewrote.
8295 (dependencies): New global.
8296 (jcf_dependency_set_target): Rewrote.
8297 (jcf_dependency_add_target): Likewise.
8298 (jcf_dependency_add_file): Likewise.
8299 (munge): Removed.
8300 (print_ents): Removed.
8301 (jcf_dependency_write): Rewrote.
8302 (print_dummies): New global.
8303 (jcf_dependency_print_dummies): New function
8304 (jcf_dependency_write): Call deps_dummy_targets if required.
8305
8306 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8307
8308 * gjavah.c (add_class_decl): Removed unused variables `tname',
8309 `tlen' and `name_index'.
8310 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
8311 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
8312 in `wfl_operator' with value.
8313 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
8314 (jcf_figure_file_type): Fixed identation.
8315 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
8316 * parse.y (analyze_clinit_body): New function.
8317 (static_initializer:): Reset `current_static_block'.
8318 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
8319 `wfl_operator' with new value.
8320 (lookup_cl): Use EXPR_WFL_FILENAME.
8321 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
8322 analyze_clinit_body.
8323 (build_outer_field_access): Access to this$<n> built from
8324 current_class, not its outer context.
8325 (build_access_to_thisn): Fixed leading comment. Tidied things up.
8326 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
8327 (patch_method_invocation): Use `is_static_flag' when already
8328 initialized.
8329 (patch_newarray): Removed assignment in ternary operator.
8330
8331 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8332
8333 * except.c (free_eh_ranges): Don't free `whole_range'.
8334
8335 2000-10-15 Anthony Green <green@redhat.com>
8336
8337 * decl.c (init_decl_processing): Call init_class_processing before
8338 anything else.
8339
8340 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8341
8342 * check-init.c (check_init): Fixed leading comment. Use
8343 LOCAL_FINAL_P.
8344 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8345 (give_name_to_locals): Likewise.
8346 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
8347 fields in lang_decl_var.
8348 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
8349 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
8350 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
8351 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
8352 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
8353 (LOCAL_FINAL): Rewritten.
8354 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
8355 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
8356 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
8357 `init_final' fields.
8358 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
8359 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
8360 (TYPE_HAS_FINAL_VARIABLE): New macro.
8361 (struct lang_type): Added `afv' field.
8362 * parse.y (check_static_final_variable_assignment_flag): New function.
8363 (reset_static_final_variable_assignment_flag): Likewise.
8364 (check_final_variable_local_assignment_flag): Likewise.
8365 (reset_final_variable_local_assignment_flag): Likewise.
8366 (check_final_variable_indirect_assignment): Likewise.
8367 (check_final_variable_global_assignment_flag): Likewise.
8368 (add_inner_class_fields): Use LOCAL_FINAL_P.
8369 (register_fields): Handle local finals and final variables.
8370 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
8371 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8372 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8373 on local finals.
8374 (java_complete_expand_methods): Loop to set
8375 TYPE_HAS_FINAL_VARIABLE. Call
8376 `reset_final_variable_local_assignment_flag' and
8377 `check_final_variable_local_assignment_flag' accordingly before
8378 and after constructor expansion. Call
8379 `reset_static_final_variable_assignment_flag'
8380 before expanding <clinit> and after call
8381 `check_static_final_variable_assignment_flag' if the
8382 current_class isn't an interface. After all methods have been
8383 expanded, call `check_final_variable_global_assignment_flag' and
8384 `check_static_final_variable_assignment_flag' if the current class
8385 is an interface.
8386 (maybe_yank_clinit): Fixed typo in comment.
8387 (build_outer_field_access_methods): Removed old sanity check. Use
8388 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8389 Don't create access methods for finals.
8390 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
8391 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
8392 existing DECL_INIT has been processed.
8393 (java_complete_lhs): Likewise.
8394 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
8395 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
8396 logic.
8397 (patch_assignment): Use LOCAL_FINAL_P.
8398 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
8399 DECL_INITIAL is nullified.
8400 Fixes gcj/163.
8401
8402 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8403
8404 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
8405
8406 * Makefile.in (parse.c, parse-scan.c): Likewise.
8407
8408 2000-10-12 Mark Mitchell <mark@codesourcery.com>
8409
8410 * class.c (temporary_obstack): Remove.
8411 (make_class): Don't mess with obstascks.
8412 (push_class): Likewise.
8413 (set_super_info): Likewise.
8414 (add_method_1): Likewise.
8415 (add_method): Likewise.
8416 (add_field): Likewise.
8417 (build_utf8_ref): Likewise.
8418 (build_class_ref): Likewise.
8419 (build_static_field_ref): Likewise.
8420 (finish_class): Likewise.
8421 (push_super_field): Likewise.
8422 (layout_class): Likewise.
8423 (layout_class_methods): Likewise.
8424 (init_class_processing): Likewise.
8425 * constants.c (get_tag_node): Likewise.
8426 (build_constant_data_ref): Likewise.
8427 * decl.c (ggc_p): Remove.
8428 (copy_lang_decl): Use ggc_alloc.
8429 (complete_start_java_method): Don't mess with obstacks.
8430 (start_java_method): Likewise.
8431 (end_java_method): Likewise.
8432 * except.c (link_handler): Use xmalloc.
8433 (free_eh_ranges): New function.
8434 (method_init_exceptions): Use it.
8435 (add_handler): Use xmalloc.
8436 (expand_start_java_handler): Don't mess with obstacks.
8437 (prepare_eh_table_type): Likewise.
8438 (expand_end_java_handler): Likewise.
8439 * expr.c (push_value): Likewise.
8440 (create_label_decl): Likewise.
8441 (build_jni_stub): Likewise.
8442 (java_lang_expand_expr): Likewise.
8443 (note_instructions): Use xrealloc.
8444 (java_push_constant_from_pool): Don't mess with obstacks.
8445 (process_jvm_instruction): Likewise.
8446 * java-tree.h (cyclic_inheritance_report): Remove duplicate
8447 declaration.
8448 * jcf-parse.c (get_constant): Don't mess with obstacks.
8449 (read_class): Likewise.
8450 (jcf_parse): Likewise.
8451 * lex.c (expression_obstack): Remove.
8452 (java_lex): Don't use obstack_free.
8453 * parse.h (exit_java_complete_class): Don't mess with obstacks.
8454 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
8455 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
8456 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
8457 * parse.y (gaol): Add more GC roots.
8458 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
8459 (lookup_field_wrapper): Likewise.
8460 (obtain_incomplete_type): Don't mess with obstacks.
8461 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
8462 macros.
8463 (craft_constructor): Don't mess with obstacks.
8464 (safe_layout_class): Likewise.
8465 (java_complete_class): Likewise.
8466 (source_end_java_method): Likewise.
8467 (build_outer_field_access_methods): Likewise.
8468 (build_outer_method_access_method): Likewise.
8469 (maybe_build_thisn_access_method): Likewise.
8470 (build_dot_class_method_invocation): Likewise.
8471 (java_complete_tree): Likewise.
8472 (java_complete_lhs): Likewise.
8473 (do_merge_string_cste): Likewise.
8474 (patch_string_cst): Likewise.
8475 (array_constructor_check_entry): Likewise.
8476 * typeck.c (build_java_array_type): Likewise.
8477 (parse_signature_string): Likewise.
8478 (build_java_signature): Likewise.
8479
8480 2000-10-12 Tom Tromey <tromey@cygnus.com>
8481
8482 Fix for PR gcj/356:
8483 * gjavah.c (add_class_decl): Don't special-case inner classes.
8484 (add_namelet): Likewise.
8485
8486 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
8487
8488 * java-tree.h: Constify current_encoding.
8489 * lang.c: Constify current_encoding.
8490
8491 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
8492
8493 * jvgenmain.c (class_mangling_suffix): Omit `.'.
8494 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
8495
8496 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8497
8498 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
8499 patch. Fixes gcj/340.
8500
8501 2000-10-10 Tom Tromey <tromey@cygnus.com>
8502
8503 * lex.c (java_new_lexer): Initialize out_first and out_last
8504 fields.
8505 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
8506
8507 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8508
8509 * parse.y (pop_current_osb): New function.
8510 (array_type:): Use `dims:', changed actions
8511 accordingly. Suggested by Anthony Green.
8512 (array_creation_expression:): Used pop_current_osb.
8513 (cast_expression:): Likewise.
8514 (search_applicable_method_list): Fixed indentation.
8515
8516 2000-10-08 Anthony Green <green@redhat.com>
8517
8518 * parse.y (array_type_literal): Remove production.
8519 (type_literals): Refer to array_type, not array_type_literal.
8520
8521 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8522
8523 Patch contributed by Corey Minyard.
8524 * decl.c (check_local_named_variable): New function.
8525 (tree check_local_unnamed_variable): Likewise.
8526 (find_local_variable): Splitted. Call check_local_{un}named_variable.
8527
8528 2000-10-07 Anthony Green <green@redhat.com>
8529
8530 * class.c (layout_class): Handle case where superclass can't be
8531 layed out yet.
8532
8533 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
8534
8535 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
8536 gperf.
8537
8538 2000-10-05 Tom Tromey <tromey@cygnus.com>
8539
8540 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
8541 * jvgenmain.c (class_mangling_prefix): Removed.
8542 (class_mangling_suffix): New global.
8543 (main): Use it.
8544 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
8545 `$'.
8546 (print_method_info): Handle overrides for static and final
8547 methods.
8548 (process_file): Generate declaration for class object field.
8549 * class.c (cxx_keywords): New array.
8550 (utf8_cmp): New function.
8551 (cxx_keyword_p): New function.
8552 (layout_class_method): Mangle C++ keywords by appending `$'.
8553 (mangle_field): New function.
8554 (mangle_class_field): Use mangle_field. Mangle class name as
8555 `class$'.
8556 (mangle_static_field): Use mangle_field.
8557
8558 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
8559
8560 * decl.c (find_local_variable): Removed uncessary type check and
8561 fixed range check typo. From Corey Minyard.
8562
8563 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8564
8565 * decl.c (give_name_to_locals): New local `code_offset'. Call
8566 `maybe_adjust_start_pc'.
8567 * expr.c (note_instructions): New function.
8568 (expand_byte_code): Don't collect insn starts here.
8569 (peek_opcode_at_pc): New function.
8570 (maybe_adjust_start_pc): Likewise.
8571 * java-tree.h (maybe_adjust_start_pc): Declare.
8572 (note_instructions): Likewise.
8573 * jcf-parse.c (parse_class_file): Call `note_instructions'.
8574
8575 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576
8577 * parse.y (field_access:): Fixed indentation.
8578 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
8579
8580 2000-09-07 Tom Tromey <tromey@cygnus.com>
8581
8582 Fix for PR gcj/307:
8583 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
8584 JPRIMITIVE_TYPE_P, for arithmetic operators.
8585 (patch_method_invocation): Indentation fix.
8586 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
8587 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
8588 (do_unary_numeric_promotion): Cleaned up code.
8589 (valid_cast_to_p): Handle boolean correctly.
8590
8591 2000-09-27 Tom Tromey <tromey@cygnus.com>
8592
8593 * lex.c (java_read_unicode): Reset bs_count when finished with
8594 `\u' sequence.
8595
8596 2000-10-01 Mark Mitchell <mark@codesourcery.com>
8597
8598 Convert to GC.
8599 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
8600 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
8601 (typeck.o): Depend on ggc.h.
8602 * class.c (add_method_1): Use GC functions for allocation.
8603 (init_class_processing): Register roots.
8604 * decl.c (ggc_p): Set to 1.
8605 (pending_local_decls): Make it static.
8606 (push_jvm_slot): Use GC functions for allocation.
8607 (init_decl_processing): Register roots.
8608 (give_name_to_locals): Use GC functions for allocation.
8609 (lang_mark_tree): New function.
8610 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
8611 functions for allocation.
8612 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
8613 * lex.c (java_lex): Use build_string, rather than replicating it
8614 inline.
8615 * parse.y (goal): Add more roots.
8616 (mark_parser_ctxt): New function.
8617 * typeck.c: Include ggc.h.
8618
8619 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8620
8621 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
8622 contains something else than MODIFY_EXPR.
8623
8624 2000-09-23 Mark Mitchell <mark@codesourcery.com>
8625
8626 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
8627 * Makefile.in (parse.o): Depend on ggc.h.
8628 (class.o): Likewise.
8629 (constants.o): Likewise.
8630 (decl.o): Likewise.
8631 (expr.o): Likewise.
8632 (jcf-parse.o): Likewise.
8633 (jcf-write.o): Likewise.
8634 (mangle.o): Likewise.
8635 * class.c: Include ggc.h.
8636 (build_static_field_ref): Register GC roots.
8637 (layout_class): Likewise.
8638 (init_class_processing): Likewise.
8639 * constants.c: Include ggc.h.
8640 (current_constant_pool_data_ref): Remove.
8641 (tag_nodes): Move it to ...
8642 (get_tag_node): ... here. Register GC roots.
8643 * decl.c: Include ggc.h. Remove many global tree definitions.
8644 (throw_node): Define.
8645 (java_global_trees): Likewise.
8646 (predef_filenames): Make the size a constant.
8647 (init_decl_processing): Adjust accordingly.
8648 (init_decl_processing): Call init_jcf_parse. Register GC roots.
8649 * expr.c: Include ggc.h.
8650 (init_expr_processing): Register GC roots.
8651 (build_invokeinterface): Likewise.
8652 * java-tree.h: Replace extern tree declarations with macros.
8653 (java_global_trees): New variable.
8654 (java_tree_index): New enumeration.
8655 (init_jcf_parse): Declare.
8656 * jcf-parse.c: Include ggc.h.
8657 (current_class): Remove declaration.
8658 (main_class): Likewise.
8659 (all_class_list): Likewise.
8660 (predefined_filename_p): Adjust for constant size of
8661 predef_filenames.
8662 (init_jcf_parse): New function.
8663 * jcf-write.c: Include ggc.h.
8664 (generate_classfile): Register GC roots.
8665 (append_synthetic_attribute): Likewise.
8666 (append_innerclass_attribute_entry): Likewise.
8667 * lang.c: Include ggc.h.
8668 (lang_print_error): Register GC roots.
8669 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
8670 with macros.
8671 * parse.y: Include ggc.h.
8672 (wfl_operator): Remove.
8673 (goal): Register GC roots.
8674 (java_pop_parser_context): Adjust for new field names.
8675 (java_parser_context_save_global): Likewse.
8676 (java_parser_context_restore_global): Likewise.
8677 (java_parser_context_suspend): Likewise.
8678 (java_parser_context_resume): Likewise.
8679 (verify_constructor_circularity): Register GC roots.
8680 (lookup_cl): Likewise.
8681 (java_reorder_fields): Likewise.
8682 (build_current_this): Likewise.
8683 (class_in_current_package): Likewise.
8684 (argument_types_convertible): Likewise.
8685 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
8686
8687 2000-09-14 Tom Tromey <tromey@cygnus.com>
8688
8689 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
8690
8691 2000-09-13 Tom Tromey <tromey@cygnus.com>
8692
8693 * jcf-parse.c: Include <locale.h>.
8694 * jv-scan.c: Include <locale.h>.
8695
8696 2000-09-12 Tom Tromey <tromey@cygnus.com>
8697
8698 * expr.c (pop_type_0): Return `Object' if trying to merge two
8699 interface types.
8700 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
8701 interface types; `Object' is always a valid supertype.
8702
8703 2000-09-12 Tom Tromey <tromey@cygnus.com>
8704
8705 Fix for PR gcj/33:
8706 * jv-scan.c (help): Document --encoding.
8707 (options): Added `encoding' entry.
8708 (OPT_ENCODING): New define.
8709 (main): Handle --encoding.
8710 Include <langinfo.h> if nl_langinfo exists.
8711 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
8712 --encoding.
8713 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
8714 (parse_source_file): Correctly call java_init_lex. Added `finput'
8715 argument. Use nl_langinfo to determine default encoding.
8716 * java-tree.h (current_encoding): Declare.
8717 * parse.y (java_parser_context_restore_global): Don't restore
8718 `finput'.
8719 (java_parser_context_save_global): Don't set `finput' field.
8720 (java_pop_parser_context): Don't restore `finput'. Free old lexer
8721 if required.
8722 * lang.c (current_encoding): New global.
8723 (lang_decode_option): Recognize `-fencoding='.
8724 (finish_parse): Don't close finput.
8725 * parse.h (struct parser_ctxt): Removed `finput' and
8726 `unget_utf8_value' fields. Added `lexer' field.
8727 (java_init_lex): Fixed declaration.
8728 * lex.c (java_new_lexer): New function.
8729 (java_destroy_lexer): Likewise.
8730 (java_read_char): Added `lex' argument. Handle iconv case.
8731 (java_read_unicode): Added `lex' argument. Count backslashes in
8732 lexer structure.
8733 (java_init_lex): Added `finput' and `encoding' arguments. Set
8734 `lexer' field in ctxp.
8735 (BAD_UTF8_VALUE): Removed.
8736 (java_lex): Handle seeing UEOF in the middle of a string literal.
8737 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
8738 (java_lexer): New structure.
8739 (UNGETC): Removed.
8740 (GETC): Removed.
8741 (DEFAULT_ENCODING): New define.
8742 (java_destroy_lexer): Declare.
8743
8744 2000-09-12 Tom Tromey <tromey@cygnus.com>
8745
8746 Fix for PR gcj/343:
8747 * lex.c (java_init_lex): Initialize java_io_serializable.
8748 * parse.y (java_io_serializable): New global.
8749 (valid_ref_assignconv_cast_p): An array can be cast to
8750 serializable.
8751
8752 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
8753
8754 * decl.c, expr.c: Include defaults.h if not already included.
8755 Don't define the *_TYPE_SIZE macros.
8756
8757 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
8758
8759 * typeck.c (build_java_array_type): Correct first parameter
8760 in ADJUST_FIELD_ALIGN invocation.
8761
8762 2000-09-06 Tom Tromey <tromey@cygnus.com>
8763
8764 * lang-specs.h: Also recognize `-femit-class-files'.
8765
8766 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8767
8768 * verify.c (merge_types): Load the types to merge if necessary.
8769
8770 2000-09-02 Anthony Green <green@redhat.com>
8771
8772 * jcf-io.c: Include zlib.h.
8773 (open_in_zip): Read compressed class file archives.
8774 * zipfile.h (ZipDirectory): Add uncompressed_size and
8775 compression_method fields.
8776 * zextract.c (read_zip_archive): Collect file compression info.
8777
8778 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
8779
8780 * parse.y (do_resolve_class): Also explore superclasses of
8781 intermediate enclosing contexts when searching for inner classes.
8782
8783 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8784
8785 * parse.y (variable_declarator_id:): Better error message.
8786 (expression_statement:): Use YYNOT_TWICE.
8787 (cast_expression:): Likewise.
8788 (assignment:): Likewise.
8789
8790 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8791
8792 * parse.y (do_merge_string_cste): New locals. Create new
8793 STRING_CSTs each time, use memcpy. Fixes gcj/311.
8794
8795 2000-08-07 Hans Boehm <boehm@acm.org>
8796
8797 * boehm.c (mark_reference_fields): Set marking bits for all words in
8798 a multiple-word record.
8799 (get_boehm_type_descriptor): Use the procedure marking descriptor for
8800 java.lang.Class.
8801
8802 2000-08-31 Mike Stump <mrs@wrs.com>
8803
8804 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
8805 jcf-dump$(exeext)): Make parallel safe.
8806
8807 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
8808
8809 * jcf-parse.c (set_source_filename): Constify a char *.
8810 * jcf-write.c (append_innerclasses_attribute,
8811 make_class_file_name): Constify a char *. Don't recycle a
8812 variable for an unrelated purpose.
8813 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
8814 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
8815
8816 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8817
8818 * expr.c (can_widen_reference_to): Fixed indentation.
8819 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
8820 * parse.y: `finit$' replaces `$finit$' in comments.
8821 (try_builtin_assignconv): Fixed leading comment.
8822
8823 2000-08-25 Greg McGary <greg@mcgary.org>
8824
8825 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
8826
8827 2000-08-24 Greg McGary <greg@mcgary.org>
8828
8829 * lang.c (lang_decode_option): Use ARRAY_SIZE.
8830 * parse.y (BINOP_LOOKUP): Likewise.
8831
8832 2000-08-22 Andrew Haley <aph@cygnus.com>
8833
8834 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
8835 sign extending. Fixes gcj/321.
8836 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
8837 combining to make a jlong. Fixes gcj/321.
8838
8839 2000-08-21 Nix <nix@esperi.demon.co.uk>
8840
8841 * lang-specs.h: Do not process -o or run the assembler if
8842 -fsyntax-only.
8843
8844 2000-08-16 Andrew Haley <aph@cygnus.com>
8845
8846 * typeck.c (build_java_array_type): Rewrite code to do array
8847 alignment. Take into account back-end macros when aligning array
8848 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
8849 user to set alignment. Fixes gcj/252 and 160.
8850
8851 2000-08-09 Tom Tromey <tromey@cygnus.com>
8852
8853 * parse.y (check_abstract_method_definitions): Now return `int'.
8854 Check implemented interfaces. Fixes PR gcj/305.
8855
8856 * parse.y (patch_switch_statement): Disallow `long' in switch
8857 expressions. Fixes PR gcj/310.
8858
8859 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8860
8861 * decl.c (finit_leg_identifier_node): New global.
8862 (init_decl_processing): Use `finit$' to initialize
8863 finit_identifier_node. Use `$finit$' to initialize
8864 finit_leg_identifier_node.
8865 * expr.c (expand_java_field_op): Use ID_FINIT_P.
8866 * java-tree.h (finit_identifier_node): Changed attached comment.
8867 (finit_leg_identifier_node): New declaration.
8868 (ID_FINIT_P): Take finit_identifier_node and
8869 finit_leg_identifier_node into account. This is a backward
8870 compatibility hack.
8871
8872 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8873
8874 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
8875 Jan 6 2000 patch.
8876 (generate_bytecode_insns): Check `nargs' before emitting it.
8877 * verify.c (merge_type_state): Fixed typo.
8878 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
8879 generate_bytecode_{conditional,insns}.
8880
8881 2000-08-13 Anthony Green <green@redhat.com>
8882
8883 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
8884 for -pg builds).
8885
8886 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8887
8888 * class.c (maybe_layout_super_class): Fixed indentation.
8889 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
8890 (java_check_methods): New function declaration.
8891 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
8892 instead of `str_ptr'.
8893 * jcf-write.c (generate_bytecode_insns): Emit number the of args
8894 of a `invokeinterface' at the right time.
8895 * parse.h (WFL_STRIP_BRACKET): New macro.
8896 (SET_TYPE_FOR_RESOLUTION): Use it.
8897 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
8898 (check_class_interface_creation): Don't check for cross package
8899 innerclass name clashes.
8900 (method_header): Behave properly if MDECL is `error_mark_node'.
8901 (method_declarator): Return `error_mark_node' if bogus current
8902 class.
8903 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
8904 (resolve_and_layout): New local `decl_type', set and used. Call
8905 java_check_methods.
8906 (java_check_methods): New method.
8907 (java_layout_classes): Use it.
8908 (resolve_qualified_expression_name): No EH check necessary in
8909 access$<n>.
8910 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
8911 `case' statement.
8912 (patch_assignment): Set DECL_INITIAL on integral final local.
8913
8914 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
8915
8916 * java-tree.h (flag_extraneous_semicolon): New extern.
8917 * lang-options.h: (-Wextraneous-semicolon): New option.
8918 * lang.c (flag_redundant): Fixed typo in leading comment.
8919 (flag_extraneous_semicolon): New global.
8920 (lang_decode_option): Set `flag_extraneous_semicolon' when
8921 -Wall. Decode `-Wextraneous-semicolon'.
8922 * parse.y (type_declaration:): Removed `SC_TK' hack, added
8923 `empty_statement' rule.
8924 (class_body_declaration): Likewise.
8925 (method_body:): Accept `;' as a method body.
8926 (static_initializer:): Removed `SC_TK' hack.
8927 (constructor_block_end:): Likewise.
8928 (empty_statement:): Report deprecated empty declaration. Fixes
8929 gcj/295
8930
8931 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8932
8933 * parse.y (build_dot_class_method_invocation): Changed parameter
8934 name to `type'. Build signature from `type' and convert it to a
8935 STRING_CST if it's an array.
8936 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
8937 to use `ref_type' directly.
8938
8939 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
8940
8941 * lang-options.h: Added a comma after the last element to avoid
8942 syntax errors when other languages define additional options.
8943
8944 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
8945
8946 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
8947 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
8948 (jc1): Link with $(BACKEND).
8949 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
8950
8951 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
8952
8953 * jvspec.c: Adjust type of second argument to
8954 lang_specific_driver, and update code as necessary.
8955
8956 * class.c (build_dtable_decl): Initialize dummy.
8957
8958 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8959
8960 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
8961 method bodies not to rule out discarding `<clinit>'; don't use
8962 <clinit> to initialize static fields with constant initializers.
8963
8964 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8965
8966 * gjavah.c (print_method_info): Added `synth' parameter. Skip
8967 synthetic methods.
8968 (method_synthetic): New global.
8969 (HANDLE_METHOD): Recognize synthetic method and tell
8970 `print_method_info' about it.
8971 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
8972 processing a synthetic method.
8973 * jcf-reader.c (skip_attribute): New function.
8974 ( skip_attribute): Likewise.
8975
8976 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8977
8978 * parse.y (build_outer_field_access): Fixed comments.
8979 (fix_constructors): Emit the initialization of this$<n> before
8980 calling $finit$.
8981 (resolve_qualified_expression_name): Build an access to `decl' if
8982 necessary.
8983
8984 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8985
8986 * parse-scan.y (curent_class): Non longer const.
8987 (inner_qualifier, inner_qualifier_length): Deleted.
8988 (current_class_length): New global.
8989 (bracket_count): Fixed typo in leading comment.
8990 (anonymous_count): New global.
8991 (class_instance_creation_expression:): Handle anonymous classes.
8992 (anonymous_class_creation:): New rule.
8993 (push_class_context): Rewritten.
8994 (pop_class_context): Likewise.
8995 (INNER_QUALIFIER): Macro deleted.
8996 (report_class_declaration): call `push_class_context' when
8997 entering the function. `fprintf' format modified not to use
8998 INNER_QUALIFIER.
8999 (report_class_declaration): Assign `package_name' and
9000 `current_class' to NULL separately.
9001
9002 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
9003
9004 * expr.c (build_invokeinterface): Call layout_class_methods on
9005 target interface.
9006
9007 2000-07-27 Tom Tromey <tromey@cygnus.com>
9008 Anthony Green <green@cygnus.com>
9009 Alexandre Petit-Bianco <apbianco@cygnus.com>
9010
9011 * class.c (make_class_data): Create vtable for abstract classes.
9012 (get_dispatch_table): Changed to cope with abstract classes.
9013
9014 2000-07-27 Tom Tromey <tromey@cygnus.com>
9015
9016 * parse.y (patch_method_invocation): Don't reverse the argument
9017 list when dealing with anonymous class constructors. Fixed typo in
9018 comment.
9019
9020 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9021
9022 * parse.y (build_alias_initializer_parameter_list): Reverse
9023 crafted list when building aliases for anonymous class
9024 constructors.
9025
9026 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9027
9028 * parse.y (jdep_resolve_class): Don't bother checking potential
9029 innerclass access if `decl' is NULL.
9030 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
9031 WFL.
9032
9033 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9034
9035 * parse.c: Remove (again.)
9036
9037 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9038
9039 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
9040 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
9041 outside the `if' statement, alias to innerclass removed, `decl'
9042 used to mark the class complete.
9043
9044 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9045
9046 * parse.y (simple_name:): Fixed typo in error message.
9047
9048 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9049
9050 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
9051 or its first operand can be error marks.
9052
9053 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9054
9055 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
9056 * parse.y (method_header): Likewise.
9057
9058 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9059
9060 * parse.y (process_imports): Consider that one might be trying to
9061 import an innerclass. Fixes gcj/254
9062
9063 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9064
9065 * parse.y (find_as_inner_class): Handle the case where the
9066 enclosing context of an innerclass has been loaded as bytecode.
9067
9068 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9069
9070 * parse.y (simple_name:): Reject `$' in type names.
9071 (resolve_type_during_patch): Use `type' as a second
9072 argument to resolve_no_layout. Fixes gcj/257.
9073
9074 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
9075
9076 * parse.y (find_most_specific_methods_list): Select the only
9077 non-abstract method even if max has been set.
9078 Fixes gcj/285, gcj/298.
9079
9080 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
9081
9082 * lang-specs.h: Added %(jc1) to java compiler options.
9083
9084 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9085
9086 * .cvsignore: New file.
9087
9088 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9089
9090 * parse.y (not_accessible_p): Access granted to innerclasses
9091 (indirectly) extending the reference type. Fixes gcj/249.
9092
9093 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9094
9095 * parse.y (patch_method_invocation): Fixed comment.
9096 (maybe_use_access_method): Build this$<n>s to the context of the
9097 target method, or a type that extends it. Fixes gcj/242.
9098
9099 2000-07-13 Mark Mitchell <mark@codesourcery.com>
9100
9101 * parse.c: Remove.
9102
9103 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9104
9105 * parse.y (fold_constant_for_init): Avoid bullish conversion.
9106
9107 2000-07-13 Tom Tromey <tromey@cygnus.com>
9108
9109 * lang-specs.h: Added %{I*}.
9110
9111 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9112
9113 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9114
9115 2000-07-12 Mark Mitchell <mark@codesourcery.com>
9116
9117 * parse-scan.c: Remove.
9118
9119 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9120
9121 * class.c (set_super_info): Handled protected inner classes.
9122 (common_enclosing_context_p): Bail early if arguments aren't both
9123 inner classes.
9124 (get_access_flags_from_decl): Handle private and protected inner
9125 classes.
9126 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
9127 (CLASS_PROTECTED): Likewise.
9128 (struct lang_type): New bitfield `poic'.
9129 * parse.y (jdep_resolve_class): Call check_inner_class_access on
9130 inner classes only.
9131 (check_inner_class_access): Renamed arguments, added
9132 comments. Handles protected inner classes (fixes gcj/225)
9133 (not_accessible_p): Fixed comments. Avoid handling inner classes.
9134
9135 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9136
9137 * parse.y (resolve_qualified_expression_name): Verify qualified
9138 access to `this'. Fixes gcj/239.
9139
9140 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9141
9142 * jcf-write.c (generate_classfile): Don't install ConstantValue
9143 for null pointers.
9144
9145 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9146
9147 * parse.y (resolve_qualified_expression_name): Handle inner class
9148 access. Fixes gcj/256.
9149
9150 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9151
9152 * jcf-write.c (generate_classfile): Properly install the
9153 ConstantValue attribute and the initial value constant pool index
9154 on string constants.
9155 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
9156 class files.
9157
9158 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9159
9160 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
9161 construct.
9162 * parse.y (find_as_inner_class): Fixed typo.
9163 (do_resolve_class): Explore enclosing contexts when searching for
9164 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
9165 (check_inner_class_access): Check `decl' which can be null in case
9166 of previous errors.
9167
9168 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9169
9170 * java-tree.h (java_debug_context): Declared `extern'.
9171 (safe_layout_class): Likewise.
9172 * parse.y (resolve_field_access): Field must be `static' in order
9173 to be replaced by its initial value. Added comments.
9174 (find_applicable_accessible_methods_list): Fixed typo.
9175 (find_most_specific_methods_list): Methods found in innerclasses
9176 take over methods founds in the enclosing contexts.
9177 (java_complete_tree): Loosen restrictions on the type of DECLs
9178 that can be replaced by their initialization values.
9179 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
9180
9181 2000-07-05 Tom Tromey <tromey@cygnus.com>
9182
9183 * Make-lang.in (PARSE_DIR): New macro.
9184 (PARSE_RELDIR): Likewise.
9185 (PARSE_C): Likewise.
9186 (PARSE_SCAN_C): Likewise.
9187 ($(PARSE_C)): New target.
9188 ($(PARSE_SCAN_C)): Likewise.
9189 (SET_BISON): New macro.
9190 (BISONFLAGS): Likewise.
9191 (JAVABISONFLAGS): Likewise.
9192
9193 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
9194
9195 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
9196 argument on the first pass for CNI as well as JNI.
9197 (print_method_info): Set up method name on the first pass only.
9198
9199 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9200
9201 * parse.y (parser_qualified_classname): Removed parameter
9202 `is_static'.
9203 (create_interface): Removed first passed parameter to
9204 parser_qualified_classname.
9205 (create_class): Likewise. Don't install alias on static
9206 innerclasses. Fixes gcj/275.
9207
9208 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9209
9210 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
9211 debugable statement with empty_stmt_node. Fixes gcj/272
9212
9213 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9214
9215 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
9216 gcj/271.
9217
9218 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9219
9220 * jcf-write.c (push_long_const): Appropriately cast short negative
9221 constant to jword.
9222
9223 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9224
9225 * parse.y (verify_constructor_super): Use loop variable
9226 `m_arg_type' initialized with `mdecl_arg_type'.
9227
9228 2000-06-29 Tom Tromey <tromey@cygnus.com>
9229
9230 * parse.y (resolve_field_access): Handle case where `type_found'
9231 is NULL.
9232
9233 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9234
9235 * expr.c (lookup_field): The same field can be found through two
9236 different interface. Don't declare it ambiguous in that case.
9237
9238 2000-06-27 Tom Tromey <tromey@cygnus.com>
9239
9240 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
9241 follows \r, then unget it at a lower level.
9242
9243 2000-06-26 Tom Tromey <tromey@cygnus.com>
9244
9245 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
9246 java_complete_tree.
9247
9248 2000-06-25 Tom Tromey <tromey@cygnus.com>
9249
9250 * parse.y (for_statement): Wrap expression in a WFL if it is a
9251 constant. For PR gcj/268.
9252
9253 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9254
9255 * parse.y (do_resolve_class): Minor optimiztion in the package
9256 list search. Removed unnecessary test and return statement.
9257 (valid_ref_assignconv_cast_p): Order of arguments to
9258 enclosing_context_p fixed.
9259
9260 2000-06-24 Tom Tromey <tromey@cygnus.com>
9261
9262 * expr.c (lookup_field): Print error and return error_mark_node if
9263 field reference is ambiguous.
9264
9265 * parse.y (check_abstract_method_definitions): Also check if
9266 `other_method' is abstract.
9267
9268 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9269
9270 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
9271 classes.
9272 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
9273 (struct lang_type): New field `pic'.
9274 (CLASS_PRIVATE): New macro.
9275 * parse.y (check_inner_class_access): New function.
9276 (jdep_resolve_class): Call it.
9277
9278 2000-06-23 Tom Tromey <tromey@cygnus.com>
9279
9280 * parse.y (patch_incomplete_class_ref): Initialize the returned
9281 class. For PR gcj/260.
9282
9283 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9284
9285 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
9286
9287 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9288
9289 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9290 Java specific checks.
9291 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
9292 screened by DECL_P.
9293 * java-tree.def (CASE_EXPR): Marked 'e'.
9294 (DEFAULT_EXPR): Likewise.
9295 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
9296 screened by DECL_P.
9297 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9298 Java specific checks.
9299 (generate_bytecode_insns): Test try_block for BLOCK before using
9300 BLOCK_EXPR_BODY.
9301 * parse.y (build_wfl_wrap): Added `location' argument. Set
9302 EXPR_WFL_LINECOL accordingly.
9303 (dim_expr:): Wrap constants with WFLs.
9304 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
9305 (resolve_package): Check for `stmt' not being a BLOCK before
9306 building a debuggable statement with it.
9307 (make_qualified_primary): Added extra parameter to build_wfl_wrap
9308 invocation.
9309 (resolve_field_access): Make sure `decl' is a DECL before treating
9310 it as such.
9311 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
9312 IDENTIFIER_NODE before treating it as such.
9313 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
9314 treating it as such.
9315 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
9316 to be applied only on non array types.
9317
9318 2000-06-16 Per Bothner <per@bothner.com>
9319
9320 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
9321 define in terms of DECL_RESULT, as that fails when --enable-checking.
9322
9323 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9324
9325 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
9326 types the same in comparison.
9327 (CHECK_OP): Add static prototype.
9328
9329 2000-06-13 Jakub Jelinek <jakub@redhat.com>
9330
9331 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
9332 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
9333 * parse.c: Rebuilt.
9334
9335 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9336
9337 * decl.c (create_primitive_vtable): Prototype.
9338
9339 * jcf-write.c (generate_bytecode_insns): Initialize variable
9340 `saved_context'.
9341
9342 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
9343
9344 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
9345
9346 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
9347 to track searched classes, and do not search the same class more than
9348 once. Call find_applicable_accessible_methods_list on immediate
9349 superclass, instead of search_applicable_method_list on all ancestors.
9350 Fix for PR gcj/238.
9351
9352 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
9353
9354 * parse.y (register_fields): Permit static fields in inner classes
9355 if they are final. Fix for PR gcj/255.
9356
9357 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9358
9359 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
9360 * parse.y (find_in_imports): Returned type changed to void,
9361 leading comment fixed.
9362 (register_package): New function.
9363 (qualify_and_find): Likewise.
9364 (package_declaration:): Use `register_package'.
9365 (single_type_import_declaration:): Removed local variable
9366 `node'. Added missing `;' for consistency.
9367 (type_import_on_demand_declaration:): Use `chainon' to link new
9368 entries.
9369 (lookup_field_wrapper): Lookup local variables defined in outer
9370 contexts first.
9371 (java_complete_class): Don't reverse the list of imported on demand.
9372 (do_resolve_class): Reorganized. Removed local variable
9373 `original_name'. Call `qualify_and_find' with the current package
9374 name, invoke `find_in_imports_on_demand' right after. Call
9375 `qualify_and_find' with the packages we've seen so far. Fixed
9376 operations numbering in comments.
9377 (java_expand_class): Don't reverse `package_list'.
9378 (find_most_specific_methods_list): New local variables `abstract'
9379 and `candidates'. Use them to pick the right method.
9380
9381 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
9382
9383 * parse.y (check_modifiers_consistency): Don't subtract out
9384 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
9385
9386 2000-06-04 Philipp Thomas <pthomas@suse.de>
9387
9388 * Makefile.in (INTLLIBS): New.
9389 (LIBS): Add above.
9390 (DEPLIBS): Ditto.
9391
9392 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9393
9394 * class.c (get_dispatch_table): Build the vtable dummy entry list
9395 element with a null purpose. Fixed leading comment.
9396 (build_dtable_decl): Build an accurate dtable type when appropriate
9397 and use it.
9398
9399 2000-06-02 Richard Henderson <rth@cygnus.com>
9400
9401 * lang.c (lang_get_alias_set): New.
9402
9403 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
9404
9405 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
9406 before using it as the accessed field.
9407
9408 2000-05-31 Tom Tromey <tromey@cygnus.com>
9409
9410 * java-tree.h (boolean_array_vtable, byte_array_vtable,
9411 char_array_vtable, short_array_vtable, int_array_vtable,
9412 long_array_vtable, float_array_vtable, double_array_vtable):
9413 Declare.
9414 * expr.c (get_primitive_array_vtable): New function.
9415 (create_primitive_vtable): New function.
9416 (java_lang_expand_expr): Enable code to statically generate
9417 arrays.
9418 * decl.c (init_decl_processing): Create primitive vtables.
9419 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
9420 short_array_vtable, int_array_vtable, long_array_vtable,
9421 float_array_vtable, double_array_vtable): Define.
9422
9423 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
9424
9425 * java/parse.y (find_applicable_accessible_methods_list):
9426 Don't add an uninitialized value to the list.
9427
9428 2000-05-25 Tom Tromey <tromey@cygnus.com>
9429
9430 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
9431 when trying to see if field's class should be initialized. Always
9432 initialize field's declaring class, not qualified class.
9433 For PR gcj/162.
9434
9435 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
9436 `wfl_operator', to maybe_build_primttype_type_ref.
9437 Fixes PR gcj/235.
9438
9439 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
9440
9441 * parse.y (patch_method_invocation): Don't try to lookup methods
9442 in primitive types.
9443
9444 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9445
9446 * parse.y (resolve_field_access): Call the appropriate <clinit>
9447 before accessing the length of a static array. Craft a decl for
9448 the field while its time. Fixes PR gcj/129.
9449
9450 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9451
9452 * parse.y (resolve_package): Correctly set `*next' (was off by
9453 one.)
9454 (resolve_qualified_expression_name): Fixed comment.
9455
9456 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9457
9458 * jcf-parse.c (jcf_parse_source): Reset current_class and
9459 current_function_decl to NULL before parsing a new file.
9460
9461 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9462
9463 * parse.y (block_end:): If the collected block doesn't feature a
9464 statement, insert an empty statement.
9465
9466 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9467
9468 * parse.y (maybe_yank_clinit): New function.
9469 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
9470 end of the list of methods belonging to a class.
9471 (java_complete_expand_method): Check whether <clinit> is really
9472 necessary and expand it accordingly.
9473
9474 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9475
9476 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
9477 processed by the method's switch statement.
9478
9479 2000-05-19 Tom Tromey <tromey@cygnus.com>
9480
9481 * java-tree.h: Added init state enum.
9482 * decl.c (emit_init_test_initialization): Initialize class
9483 initialization check variable by looking at class' state.
9484
9485 2000-05-19 Tom Tromey <tromey@cygnus.com>
9486
9487 * java-tree.h (build_instanceof): Declare.
9488 (build_get_class): Declare.
9489 * parse.y (patch_binop): Use build_instanceof.
9490 * expr.c (build_instanceof): New function. If class is final,
9491 don't make a function call.
9492 (expand_java_INSTANCEOF): Use it.
9493 (build_get_class): New function.
9494
9495 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
9496
9497 * jcf-write.c (generate_classfile): Scan the source_file for
9498 slashes with the right pointer variable.
9499
9500 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
9501
9502 * lang.c (lang_decode_option): Update -Wunused flags by calling
9503 set_Wunused.
9504 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
9505
9506 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
9507
9508 * check_init.c (check_init): Constify local char *.
9509 * class.c (push_class): Constify local char *.
9510 * java_tree.h: Update prototypes.
9511 * jcf-io.c (open_class): Constify filename parameter and
9512 return value.
9513 (find_class): Remove redundant string copy. Cast return from
9514 open_class.
9515 * jcf-parse.c (read_class, parse_class_file, yyparse):
9516 Constify local char *.
9517 * jcf-write.c (generate_bytecode_insns, generate_classfile):
9518 Constify local char *.
9519 * jcf.h (JCF): Constify filename and classname.
9520 (JCF_FINISH): Cast args to FREE to char * when appropriate.
9521 * lang.c (init_parse): Constify parameter and return value.
9522 * lex.c (java_get_line_col): Constify filename parameter.
9523 * parse.h: Constify parser_ctxt.filename. Update prototypes.
9524 * parse.y (java_parser_context_suspend,
9525 issue_warning_error_from_context, safe_layout_class): Constify
9526 local char *.
9527 * parse.c: Regenerate.
9528
9529 2000-05-08 Tom Tromey <tromey@cygnus.com>
9530
9531 * expr.c (build_jni_stub): Cache the result of
9532 _Jv_LookupJNIMethod.
9533
9534 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9535
9536 * decl.c (predef_filenames_size): Now 7.
9537 (predef_filenames): New seventh entry.
9538
9539 2000-05-04 Tom Tromey <tromey@cygnus.com>
9540
9541 * boehm.c (mark_reference_fields): Don't mark RawData fields.
9542 Keep track of when we've seen a reference field after a
9543 non-reference field.
9544 (get_boehm_type_descriptor): Handle case where we see
9545 non-reference fields but no trailing reference field.
9546 * decl.c (rawdata_ptr_type_node): Define.
9547 (init_decl_processing): Initialize rawdata_ptr_type_node.
9548 * java-tree.h (rawdata_ptr_type_node): Declare.
9549
9550 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9551
9552 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
9553 specifiers in calls to fprintf.
9554
9555 2000-05-03 Andrew Haley <aph@cygnus.com>
9556
9557 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
9558
9559 * javaop.h (WORD_TO_INT): New function.
9560 (IMMEDIATE_s4): Use WORD_TO_INT.
9561 * jcf.h (JPOOL_INT): Ditto.
9562
9563 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
9564 separator.
9565
9566 2000-04-19 Tom Tromey <tromey@cygnus.com>
9567
9568 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
9569 on native function.
9570 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
9571 JNI methods.
9572 * expr.c (build_jni_stub): New function.
9573 * lang-specs.h: -fjni and -femit-class-file are incompatible.
9574 * parse.c: Rebuilt.
9575 * parse.y (java_complete_expand_methods): Expand a native method
9576 and call build_jni_stub if -fjni given.
9577 * lang-options.h: Document -fjni.
9578 * lang.c (flag_jni): New global.
9579 (lang_f_options): Added `jni' entry.
9580 * java-tree.h (soft_lookupjnimethod_node,
9581 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
9582 Declare.
9583 (flag_jni): Declare.
9584 (build_jni_stub): Declare.
9585 (struct lang_decl): Added `native' flag.
9586 (METHOD_NATIVE): Redefined to use `native' field of lang specific
9587 structure.
9588 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
9589 soft_jnipopsystemframe_node): New globals.
9590 (init_decl_processing): Set them. _Jv_InitClass only takes one
9591 argument.
9592
9593 * java-tree.def: Put into `C' mode.
9594
9595 2000-04-27 Tom Tromey <tromey@cygnus.com>
9596
9597 Fix for PR gcj/2:
9598 * expr.c (expand_invoke): Generate check to see if object pointer
9599 is null in nonvirtual invocation case.
9600 * java-tree.h (soft_nullpointer_node): Declare.
9601 * decl.c (soft_nullpointer_node): New global.
9602 (init_decl_processing): Initialize soft_nullpointer_node.
9603 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9604 or `private' methods.
9605 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9606
9607 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
9608
9609 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9610 from <clinit>
9611
9612 2000-04-26 Tom Tromey <tromey@cygnus.com>
9613
9614 * zextract.c (find_zip_file_start): New function.
9615 (read_zip_archive): Use it.
9616
9617 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9618
9619 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
9620
9621 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9622
9623 * class.c (common_enclosing_context_p): New function.
9624 * java-tree.h (common_enclosing_context_p): Added prototype.
9625 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
9626 classes sharing an outer context with the current instance.
9627 * parse.y (build_access_to_thisn): Fixed leading comment.
9628 (verify_constructor_super): New local `supper_inner'. Skip
9629 enclosing context argument in the case of inner class constructors.
9630 (patch_method_invocation): Insert proper context as second
9631 parameter to pure inner class constructor super invocations.
9632
9633 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9634
9635 * parse.y (end_class_declaration): Reset the interface number
9636 counter.
9637
9638 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9639
9640 * parse.y (source_start_java_method): Deleted unnecessary code.
9641 (patch_method_invocation): Fixed comment.
9642
9643 2000-04-24 Robert Lipe <robertlipe@usa.net>
9644
9645 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
9646
9647 2000-04-23 Tom Tromey <tromey@cygnus.com>
9648
9649 * boehm.c (mark_reference_fields): Use int_byte_position.
9650
9651 2000-04-22 Tom Tromey <tromey@cygnus.com>
9652
9653 * boehm.c (mark_reference_fields): Only call byte_position on
9654 non-static fields.
9655
9656 2000-04-22 Tom Tromey <tromey@cygnus.com>
9657
9658 * boehm.c (mark_reference_fields): Added `last_view_index'
9659 argument. Use DECL_FIELD_OFFSET to determine field's offset.
9660
9661 2000-04-20 Mo DeJong <mdejong@cygnus.com>
9662
9663 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
9664 * parse.y (check_class_interface_creation): Fixed comments. Select
9665 permitted modifiers for (inner) interfaces. Changed error message
9666 to report rejected modifiers used with local classes.
9667
9668 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9669
9670 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
9671 of directly inherited type considered in scope.
9672 * parse.y (do_resolve_class): Search inherited classes for inner
9673 classes.
9674
9675 2000-04-20 Tom Tromey <tromey@cygnus.com>
9676
9677 * parse.y (not_accessible_p): Use member's class, not current
9678 class, when doing inheritance check for protected reference.
9679 Fixes PR gcj/124.
9680
9681 2000-04-20 Jason Schroeder <shrode@subnature.com>
9682
9683 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
9684
9685 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9686
9687 * parse.y (lookup_field_wrapper): Search for final local aliases.
9688 (resolve_expression_name): Let lookup_field_wrapper search for
9689 final local aliases. Force the value of `name' if one is found.
9690 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
9691 an expression name. Fixed comments.
9692
9693 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9694
9695 * parse.y (yyerror): `msg' can be null, don't use it in that case.
9696
9697 2000-04-19 Tom Tromey <tromey@cygnus.com>
9698
9699 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
9700
9701 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9702
9703 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
9704
9705 2000-04-18 Tom Tromey <tromey@cygnus.com>
9706
9707 PR gcj/211:
9708 * gjavah.c (utf8_cmp): Changed return value.
9709 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
9710 result.
9711 (cxx_keywords): New global.
9712 (get_field_name): Handle new result of cxx_keyword_subst.
9713 (print_method_info): Likewise.
9714
9715 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
9716
9717 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
9718 with a newline, for CNI.
9719 (print_stub_or_jni): Print a space or newline before method name for
9720 CNI as well as JNI.
9721 (print_cxx_classname): Don't write leading "::" in CNI stub method.
9722 (process_file): Include gcj/cni.h if generating CNI stubs.
9723
9724 2000-04-16 Tom Tromey <tromey@cygnus.com>
9725
9726 * gjavah.c (decompile_method): Use print_field_name.
9727 Fixes PR gcj/205.
9728
9729 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9730
9731 * parse.y (java_expand_classes): Reverse the package list once.
9732 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
9733 reduction.
9734 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
9735 the `==' and `!=' operators.
9736
9737 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9738
9739 * jcf-write.c (generate_bytecode_insns): At invocation time,
9740 always relate an interface method to the type of its selector.
9741
9742 2000-04-05 Tom Tromey <tromey@cygnus.com>
9743
9744 Fix for PR gcj/2:
9745 * expr.c (expand_invoke): Generate check to see if object pointer
9746 is null in nonvirtual invocation case.
9747 * java-tree.h (soft_nullpointer_node): Declare.
9748 * decl.c (soft_nullpointer_node): New global.
9749 (init_decl_processing): Initialize soft_nullpointer_node.
9750 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9751 or `private' methods.
9752 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9753
9754 2000-04-05 Tom Tromey <tromey@cygnus.com>
9755
9756 Fix for PR gcj/140:
9757 * parse.y (check_final_assignment): Recognize assignments to the
9758 `length' field of an array when generating class files.
9759
9760 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9761
9762 * class.c (decl_hash): Prototype removed.
9763 (decl_compare): Likewise.
9764
9765 2000-04-05 Tom Tromey <tromey@cygnus.com>
9766
9767 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
9768 * parse.y (check_modifiers_consistency): Check for final/volatile
9769 clash. Fixes PR gcj/164.
9770
9771 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9772
9773 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
9774 made global.
9775 (java_hash_compare_tree_node): Renamed from `decl_compare, made
9776 global.
9777 (add_method_1): Use `java_hash_hash_tree_node' and
9778 `java_hash_compare_tree_node'.
9779 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
9780 (java_hash_compare_tree_node): Likewise.
9781 * parse.y (find_applicable_accessible_methods_list): Create,
9782 delete and use a hash table to remember already searched interfaces.
9783
9784 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
9785
9786 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
9787 with latest entry.
9788
9789 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9790
9791 * boehm.c (mark_reference_fields, set_bit): Prototype.
9792 (set_bit): Un-ANSI-fy definition.
9793
9794 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
9795 Prototype.
9796
9797 * decl.c (emit_init_test_initialization): Likewise.
9798
9799 * gjavah.c (jni_print_char): Likewise.
9800
9801 * parse.y (create_new_parser_context): Likewise.
9802
9803 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
9804
9805 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
9806 patch missing hunk. Fixed indentation.
9807
9808 2000-03-30 Tom Tromey <tromey@cygnus.com>
9809
9810 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
9811 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
9812
9813 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9814
9815 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
9816 when negative *before* using it as an array index.
9817 * ChangeLog: Fixed typo.
9818
9819 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9820
9821 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
9822 to 0 when it reaches -1.
9823
9824 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9825
9826 * jcf-parse.c (get_constant): Properly cast `num' during the
9827 invocation of `add_double'.
9828 * jcf-write.c (push_long_const): Properly cast `lo' before
9829 comparing it to short bounds.
9830 * parse-scan.y (interface_declaration:): Rule re-arrange so that
9831 `interface_body:' is reduced after the current interface is
9832 pushed.
9833
9834 2000-03-26 Tom Tromey <tromey@cygnus.com>
9835
9836 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
9837 Java-specific `-f' option.
9838
9839 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9840
9841 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
9842 Adjust order of making types.
9843 Make bitsize_*_node values.
9844
9845 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9846
9847 * class.c (make_field_value): Use byte_position.
9848 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
9849 (java_array_data_offset): Likewise.
9850 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
9851 bzero call.
9852
9853 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9854
9855 * parse.y (check_abstract_method_definitions): New local
9856 `end_type_reached'. Make sure we also consider `end_type'.
9857 (java_check_abstract_method_definitions): Make sure we eventually
9858 consider `java.lang.Object'.
9859 (maybe_use_access_method): Don't use access method if not in the
9860 context of a pure inner class or if the method's context is right.
9861 (find_applicable_accessible_methods_list): New static flag
9862 `object_done'. Don't search abstract classes as interfaces. Fixed
9863 indentation. Fixed the `java.lang.Object' only search. Search
9864 class interface(s) first, then fully search enclosing contexts.
9865 (find_most_specific_methods_list): Pick the closest candidate when
9866 they're all abstract.
9867
9868 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9869
9870 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
9871 properly initialize `finished_label'. Don't emit gotos for empty
9872 try statements.
9873
9874 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9875
9876 * except.c (emit_handlers): Clear catch_clauses_last.
9877
9878 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9879
9880 * parse.y (check_method_types_complete): New function.
9881 (create_class): Reset anonymous class counter only when seeing an
9882 non inner classe.
9883 (java_complete_class): JDEP_METHOD: Don't recompute signature
9884 if incomplete.
9885
9886 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9887
9888 * class.c (build_static_ref): Fixed indentation in comment.
9889 * java-tree.def (TRY_EXPR): Fixed typo in name.
9890 (CLASS_LITERAL): Likewise.
9891 * java-tree.h: (TYPE_DOT_CLASS): New macro.
9892 (struct lang_type): New field `dot_class'.
9893 * jcf-write.c (generate_bytecode_insns): Fixed error message.
9894 (generate_classfile): Method `class$' is synthetic.
9895 * parse.y (build_do_class_method): New function.
9896 (build_dot_class_method_invocation): Likewise.
9897 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
9898 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
9899 (qualify_ambiguous_name): Likewise.
9900 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
9901 (build_try_statement): Fixed leading comment.
9902
9903 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9904
9905 * class.c (make_field_value): Properly handle sizes.
9906 (get_dispatch_vector): Use tree_low_cst and host_integerp.
9907 (layout_class_method): Count using trees.
9908 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
9909 * expr.c (java_array_data_offset): Use int_bit_position.
9910 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
9911 (build_invokevirtual): Use tree_low_cst and do computations with trees.
9912
9913 2000-03-16 Tom Tromey <tromey@cygnus.com>
9914
9915 * lang.c (flag_hash_synchronization): New global.
9916 (lang_f_options): Added `hash-synchronization'.
9917 * lang-options.h: Mention -fhash-synchronization.
9918 * java-tree.h (flag_hash_synchronization): Declare.
9919 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
9920 hash table synchronization is disabled.
9921 * decl.c (init_decl_processing): Only push `sync_info' value when
9922 hash table synchronization is disabled.
9923 * class.c (make_class_data): Only push `sync_info' field when hash
9924 table synchronization is disabled. Removed dead code.
9925
9926 2000-03-16 Tom Tromey <tromey@cygnus.com>
9927
9928 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
9929
9930 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9931
9932 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
9933 classes.
9934 * parse.y (patch_method_invocation): Handle anonymous classes
9935 creation in static context.
9936
9937 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9938
9939 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
9940 * parse.y (resolve_qualified_expression_name): Use it.
9941 (patch_method_invocation): Likewise.
9942
9943 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9944
9945 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
9946 depending on the type of dependency which dictates what the
9947 current class is.
9948 (unresolved_type_p): Resolved types limited to the current class.
9949
9950 2000-03-15 Tom Tromey <tromey@cygnus.com>
9951
9952 * decl.c (init_decl_processing): Set type of `sync_info' to be
9953 pointer to Object.
9954
9955 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
9956 Correctly compute bit number for current slot. Zero `high' and
9957 `low' in DS_LENGTH case. Don't skip inherited fields. Use
9958 mark_reference_fields.
9959 (mark_reference_fields): New function.
9960
9961 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9962
9963 * parse.y (register_incomplete_type): Fixed initialization of
9964 JDEP_ENCLOSING.
9965
9966 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9967
9968 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
9969 static globals.
9970 (push_class_context, pop_class_context): New function.
9971 (class_body:): Call pop_class_context.
9972 (interface_body:): Likewise.
9973 (INNER_QUALIFIER): New macro.
9974 (report_class_declaration): Changed output format and use
9975 INNER_QUALIFIER. Call push_class_context.
9976
9977 2000-02-14 Andrew Haley <aph@cygnus.com>
9978
9979 * check-init.c (check_init): Add new cases for unary and binary
9980 tree nodes.
9981
9982 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9983
9984 * parse.y (resolve_package): Set `next' once a type name has been
9985 progressively discovered.
9986 (resolve_qualified_expression_name): Propagate resolution only if
9987 there are remaining qualifiers. Take into account `q' might have
9988 been cleared after re-qualification.
9989 * parse.y (patch_method_invocation): New local `resolved'.
9990 Section dealing with qualified expression rewritten to use
9991 resolve_field_access.
9992
9993 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9994
9995 * parse.h (PUSH_CPC): Fixed indentation.
9996 (DEBUG_CPC): New macro.
9997 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
9998 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
9999 * parse.y (class_body_declaration:): Use
10000 SET_CPC_INSTANCE_INITIALIZER_STMT.
10001 (method_declaration:): Check for null current_function_decl.
10002 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
10003 (java_parser_context_pop_initialized_field): Better handling of
10004 empty lists.
10005 (maybe_make_nested_class_name): Mark nested class name as
10006 qualified when necessary.
10007 (end_class_declaration): Don't call java_parse_context_resume when
10008 one or more error occurred.
10009 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
10010 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
10011 SET_CPC_INITIALIZER_STMT.
10012 (method_header): Check for inner classes declaring static methods.
10013 (resolve_qualified_expression_name): Handle situation where `this'
10014 is implied.
10015
10016 2000-03-13 Hans Boehm <boehm@acm.org>
10017
10018 * typeck.c (build_prim_array_type): Correctly set the high word too.
10019
10020 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10021
10022 * parse.y (java_complete_expand_methods): Leave <clinit> out of
10023 ordinary methods.
10024 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
10025 list of methods for interfaces.
10026
10027 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10028
10029 * parse.y (qualify_ambiguous_name): Properly handle expressions
10030 using `null'.
10031
10032 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10033
10034 * parse.y (check_final_assignment): Extended to process
10035 COMPOUND_EXPR.
10036 (patch_assignment): Have check_final_assignment called only once.
10037
10038 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10039
10040 * java-tree.h (IS_INIT_CHECKED): New flag.
10041 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
10042 * parse.y (patch_string): Call force_evaluation_order on the
10043 completed string concatenation tree.
10044 * expr.c (force_evaluation_order): Call force_evaluation_order on
10045 function's arguments too.
10046
10047 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10048
10049 * decl.c (emit_init_test_initialization): Mark KEY as unused.
10050 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10051 (build_anewarray): Likewise.
10052 * parse.y (patch_newarray): Likewise.
10053 * parse.c: Regenerated.
10054
10055 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
10056
10057 * decl.c (init_decl_processing): Added new class fields `depth',
10058 `ancestors', and `idt' to class_type_node. Use
10059 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
10060 * class.c (make_class_data): Push initial values for new fields.
10061 * java-tree.h: Updated prototype for `build_invokeinterface'.
10062 * expr.c (build_invokeinterface): Changed parameters to accept
10063 `method' tree. Calculate index of `method' in its declaring
10064 interface. Build call to _Jv_LookupInterfaceMethodIdx.
10065 (expand_invoke): Call `build_invokeinterface' with new parameters.
10066 * parse.y (patch_invoke): Call `build_invokeinterface' with new
10067 parameters.
10068
10069 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
10070
10071 * typeck.c (lookup_do): Search superinterfaces first
10072 when looking up an interface method. From Godmar Back
10073 <gback@cs.utah.edu>
10074
10075 2000-03-06 Tom Tromey <tromey@cygnus.com>
10076
10077 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
10078
10079 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10080
10081 * java-tree.h (lookup_argument_method2): Declared.
10082 (safe_layout_class): Prototype moved from parse.h.
10083 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
10084 * parse.y (java_check_regular_methods): Local `super_class' gone.
10085 Call lookup_argument_method2 instead of lookup_argument_method.
10086 Perform modifier match for methods found declared in implemented
10087 interfaces. Fixed indentation problem. Overriding/hiding error
10088 report to take place only for methods found in classes.
10089 * typeck.c (lookup_argument_method): Changed leading
10090 comment. Re-written by calling lookup_do.
10091 (lookup_argument_method2): New function.
10092 (lookup_java_method): Re-written by calling lookup_do.
10093 (lookup_do): New function.
10094
10095 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10096
10097 * check-init.c (check_init): Removed dead code. Handle (blank)
10098 final variables.
10099 * parse.y (declare_local_variables): New local `final_p', set it
10100 and use it to initialize LOCAL_FINAL.
10101 (check_final_assignment): Only check FIELD_DECLs.
10102
10103 2000-02-17 Tom Tromey <tromey@cygnus.com>
10104
10105 * Makefile.in (JAVA_OBJS): Added boehm.o.
10106 (boehm.o): New target.
10107 * Make-lang.in (JAVA_SRCS): Added boehm.c.
10108 * java-tree.h (flag_use_boehm_gc): Declare.
10109 (get_boehm_type_descriptor): Declare.
10110 * lang.c (lang_f_options): Added `use-boehm-gc'.
10111 (flag_use_boehm_gc): New global.
10112 * lang-options.h: Added -fuse-boehm-gc.
10113 * boehm.c: New file.
10114 * class.c (get_dispatch_table): If class uses a Boehm type
10115 descriptor, put it in the vtable.
10116 (make_class_data): Removed dead code.
10117
10118 2000-03-03 Per Bothner <per@bothner.com>
10119
10120 * decl.c (init_decl_processing): Initialize sizetype properly.
10121
10122 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10123
10124 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
10125 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
10126 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10127 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
10128 (jcf_parse): New local `current'. Load innerclasses seen in outer
10129 context being processed.
10130 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10131 * jcf-write.c (append_innerclasses_attribute): New function.
10132 (append_innerclasses_attribute_entry): Likewise.
10133 (get_access_flags): Handle static classes. Set anonymous and local
10134 classes to be private.
10135 (generate_classfile): Attribute count adjusted. Call
10136 append_innerclasses_attribute.
10137 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
10138 PURE_INNER_CLASS_TYPE_P.
10139 * parse.y (parser_qualified_classname): New parameter `is_static',
10140 produce non qualified name accordingly.
10141 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
10142 (create_interface): Added argument to parser_qualified_classname.
10143 (create_class): Added argument to parser_qualified_classname. Setup
10144 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
10145 (add_inner_class_fields): Fixed indentation.
10146 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
10147 (method_declarator): Fixed typo in comment.
10148 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
10149 (build_current_thisn): Likewise.
10150 (patch_method_invocation): Likewise.
10151
10152 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
10153
10154 * decl.c (current_function_decl): Move to toplev.c.
10155
10156 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10157
10158 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
10159 (DECL_BIT_INDEX): Use underlying representation.
10160 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
10161
10162 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10163
10164 * expr.c (build_java_ret): Pass proper type to size_binop.
10165
10166 2000-02-25 Anthony Green <green@cygnus.com>
10167
10168 * expr.c (build_class_init): Mark the decl to be ignored by
10169 check_init.
10170 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
10171 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
10172 * class.c (init_test_hash_newfunc): New function.
10173 (decl_hash): New function.
10174 (decl_compare): New function.
10175 * decl.c (emit_init_test_initialization): New function.
10176 (complete_start_java_method): Traverse the init test hashtable,
10177 calling emit_init_test_initialization.
10178 (always_initialize_class_p): Define.
10179 * expr.c (build_class_init): Use initialization tests when
10180 emitting class initialization code.
10181 (always_initialize_class_p): Declare.
10182 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
10183 1.
10184 * java-tree.h: Include hash.h.
10185 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
10186 (struct lang_decl): Add init_test_table field.
10187 (init_test_hash_entry): Define.
10188
10189 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10190
10191 * gjavah.c (main): Avoid using `argi' to report unimplemented
10192 options.
10193
10194 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10195
10196 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10197 initialize locals to avoid warnings. Local `exception_type' moved
10198 into if statement.
10199
10200 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10201
10202 * parse.y (resolve_expression_name): Use `orig' as a second
10203 argument to resolve_field_access.
10204 (resolve_field_access): Removed unnecessary code when dealing with
10205 static fields.
10206
10207 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10208
10209 * class.c (push_super_field): Don't push the field twice.
10210 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
10211 * parse.h (java_reorder_fields): Prototyped.
10212 * parse.y (java_reorder_fields): New function.
10213 (java_layout_class): Simplified not to worry about re-ordering.
10214
10215 2000-02-23 Tom Tromey <tromey@cygnus.com>
10216
10217 * gjavah.c (print_name): In JNI case, correctly quote string.
10218 (print_method_info): Don't handle overrides in JNI mode.
10219
10220 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10221
10222 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
10223 value type set to `boolean_type_node'.
10224
10225 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10226
10227 * jcf-dump.c (main): Test for correct condition after
10228 output file creation.
10229
10230 2000-02-19 Anthony Green <green@cygnus.com>
10231
10232 * jcf-depend.c (add_entry): Fix test for first list entry.
10233
10234 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10235
10236 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
10237 * constants.c (build_constants_constructor): Likewise.
10238
10239 2000-02-19 Anthony Green <green@cygnus.com>
10240
10241 * jcf-depend.c (add_entry): Add entries to the end of the list.
10242
10243 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
10244
10245 * decl.c (INT_TYPE_SIZE): Define if necessary.
10246 (expand_java_return): Handle the case of a native integer smaller
10247 than a JVM integer.
10248
10249 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
10250
10251 * gjavah.c (help): Use GCCBUGURL.
10252 * jv-scan.c (help): Likewise.
10253 * jcf-dump.c (help): Likewise.
10254
10255 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10256
10257 * jcf-write.c (generate_bytecode_insns): Don't generate empty
10258 `finally' clauses.
10259
10260 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10261
10262 * jcf-parse.c (load_class): Call `fatal' if no file containing
10263 the target class are found.
10264
10265 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
10266
10267 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
10268 lex.c, lex.h, and PARSE_H to...
10269 (parse.o, parse-scan.o): ...here, respectively.
10270
10271 * lex.c: Split out code that may trigger SIGFPE from yylex()
10272 to its own function.
10273 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
10274
10275 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10276
10277 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
10278
10279 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10280
10281 * parse.y (outer_field_access_p): Stop in time when outer contexts
10282 are exhausted.
10283 (resolve_qualified_expression_name): Properly qualify *everything*
10284 after a package.type to be resoled as expression names.
10285 (find_applicable_accessible_methods_list): Save/restore `class' to
10286 isolate it from a possible outer context search.
10287
10288 2000-02-15 Tom Tromey <tromey@cygnus.com>
10289
10290 * gjavah.c (jni_print_char): New function.
10291 (print_full_cxx_name): Use it.
10292 (decode_signature_piece): Likewise.
10293 (print_cxx_classname): Likewise.
10294
10295 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10296
10297 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
10298 version.o.
10299 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
10300
10301 * gjavah.c: Include version.h.
10302
10303 * jcf-dump.c: Likewise.
10304
10305 * jv-scan.c: Likewise.
10306
10307 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10308
10309 * parse.y (outer_field_access_fix): First parameter now a tree
10310 node. Check for assignment to final. First argument to
10311 build_outer_field_access_fix modified to accommodate prototype.
10312 (build_outer_field_access): Don't check for assignment to final
10313 here.
10314 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
10315 possibly returned by outer_field_access_fix. Changed
10316 outer_field_access_fix's first argument.
10317 (check_final_assignment): $finit$'s context is OK.
10318 (patch_unaryop): Use node instead of its line/column value when
10319 calling outer_field_access_fix.
10320
10321 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10322
10323 * parse.y (interface_declaration:): No longer tagged
10324 <node>. Re-installed default action.
10325 (class_member_declaration:): Handle inner interfaces.
10326 (interface_member_declaration): Handle inner interfaces and
10327 classes.
10328 (create_interface): Push error if one seen. Suspend parsing
10329 context when processing an inner interface.
10330 (register_fields): Inner class static field limitations not to
10331 apply to inner interfaces.
10332
10333 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10334
10335 * jcf-parse.c (load_class): Update `java_error_count' when a
10336 class' file can't be found.
10337 (parse.y): Avoid (byte)code generation when errors seen.
10338
10339 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10340
10341 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
10342 decodes a valid node.
10343 (patch_binop): Handle TRUNC_DIV_EXPR.
10344
10345 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10346
10347 * parse.y (resolve_package): New local `acc'. Try to progressively
10348 build and guess a package and type name.
10349
10350 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10351
10352 * parse.y (find_applicable_accessible_methods_list): Load and
10353 layout the search class if necessary.
10354 (java_complete_tree): Keep to original type of the folded initial
10355 value.
10356
10357 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10358
10359 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
10360 Generate error message if circularity is detected. New static
10361 local `list'.
10362 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
10363 * jcf-write.c (generate_bytecode_insns): Very simply handle
10364 SAVE_EXPR.
10365 * parse.y (java_check_circular_reference): Use
10366 `cyclic_inheritance_report' during report, if necessary.
10367 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
10368 walking NEW_ARRAY_INIT twice.
10369
10370 2000-02-09 Tom Tromey <tromey@cygnus.com>
10371
10372 * parse.y (check_class_interface_creation): Allow inner classes to
10373 be `private' or `protected', check modifiers' consistency. Prevent
10374 block local classes from bearing any modifiers.
10375
10376 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10377
10378 * except.c (check_start_handlers): Re-add prototype lost in last
10379 patch.
10380 (maybe_start_try): Remove excess argument to `check_start_handlers'.
10381
10382 2000-02-09 Andrew Haley <aph@cygnus.com>
10383
10384 * decl.c (clear_binding_level): Remove excess initializer.
10385 (maybe_poplevels): Remove unused variable.
10386 (force_poplevels): Ditto.
10387 (struct binding_level): Add comment.
10388
10389 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10390
10391 * jcf-write.c (generate_classfile): Don't consider
10392 pre-initialization with reference value (use <clinit> instead.)
10393 * parse.y (java_fix_constructors): No generated constructor for
10394 interfaces.
10395 (build_outer_field_access): Removed debug message.
10396 (outer_field_expanded_access_p): Adapted to bytecode generation.
10397 (build_outer_field_access_method): Use fix_method_argument_names.
10398 (build_outer_method_access_method): Fixed indentation. Added
10399 comment. Handle access method generation for static and also void
10400 methods.
10401 (build_access_to_thisn): Inserted debug message.
10402 (maybe_build_thisn_access_method): Use fix_method_argument_names.
10403 (resolve_qualified_expression_name): Fixed comment.
10404 (not_accessible_p): Adapted to bytecode generation. Added comment.
10405 (patch_method_invocation): Added comment.
10406 (maybe_use_access_method): Fixed leading comment. Handle static
10407 methods.
10408 (java_complete_lhs): Don't shortcut handling of initialized upon
10409 declaration String type static fields when generating bytecode.
10410 (patch_unaryop): Handle outer field access when generating
10411 bytecode.
10412
10413 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
10414
10415 * java-tree.h (FIELD_THISN): New macro.
10416 * jcf-write.c (append_synthetic_attribute): New function.
10417 (generate_classfile): Set "Synthetic" attribute on this$<n>,
10418 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
10419 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
10420 this$<n> fields.
10421 (build_outer_field_access): Turned on access functions usage and
10422 generation when compiling to bytecode.
10423 (maybe_use_access_method): Likewise.
10424
10425 2000-01-25 Andrew Haley <aph@cygnus.com>
10426
10427 * java-except.h (struct eh_range): Add `expanded' field.
10428 (maybe_start_try): Add end_pc arg.
10429 (maybe_end_try): Ditto.
10430 * java-tree.h (force_poplevels): new function.
10431 * expr.c (expand_byte_code): Don't call maybe_start_try or
10432 maybe_end_try.
10433 * except.c (add_handler): Reset expanded.
10434 (expand_start_java_handler): Set expanded.
10435 (check_start_handlers): Don't expand a start handler that's
10436 already been expanded.
10437 (maybe_start_try): Add end_pc arg. Only expand a handler which
10438 ends after end_pc.
10439 (expand_end_java_handler): call force_poplevels.
10440 (force_poplevels): new function.
10441 * decl.c (binding_level): Add start_pc of binding level.
10442 (maybe_pushlevels): Call maybe_start_try when pushing binding
10443 levels.
10444 (maybe_poplevels): Call maybe_end_try when popping binding levels.
10445 (LARGEST_PC): Define.
10446 (clear_binding_level): Use LARGEST_PC.
10447
10448 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
10449 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
10450 (binding_depth, is_class_level, current_pc): new variables.
10451 (struct binding_level): ditto.
10452 (indent): new function.
10453 (push_jvm_slot): add debugging info.
10454 (maybe_pushlevels): ditto.
10455 (maybe_poplevels): ditto.
10456 (pushlevel): ditto.
10457 (poplevel): ditto.
10458 (start_java_method): ditto.
10459 (give_name_to_locals): comment only.
10460 * except.c (binding_depth, is_class_level, current_pc):
10461 new variables.
10462 (expand_start_java_handler): add debugging info.
10463 (expand_end_java_handler): ditto.
10464
10465 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10466
10467 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
10468 (print_name_for_stub_or_jni, process_file): Constify a char*.
10469
10470 2000-02-03 Tom Tromey <tromey@cygnus.com>
10471
10472 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
10473
10474 2000-01-31 Scott Bambrough <scottb@netwinder.org>
10475
10476 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
10477 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
10478 defined to be 1.
10479
10480 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10481
10482 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
10483 * java-tree.h (TYPE_II_STMT_LIST): New macro.
10484 (struct lang_type): New field `ii_block'.
10485 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
10486 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
10487 * parse.h (struct parser_ctxt): New field `instance_initializers'.
10488 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
10489 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
10490 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
10491 macros.
10492 * parse.y (add_instance_initializer): New function.
10493 (in_instance_initializer): New static global.
10494 (class_body_declaration:): Link instance initializer block.
10495 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
10496 (array_creation_expression:): Remove unused local.
10497 (java_parser_context_push_initialized_field): Fixed leading
10498 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
10499 CPC_INSTANCE_INITIALIZER_LIST.
10500 (java_parser_context_pop_initialized_field): Likewise.
10501 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
10502 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
10503 CPC_INITIALIZER_STMT.
10504 (fix_constructors): New local `class_type'. Use it. Call
10505 add_instance_initializer.
10506 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
10507 (patch_return): Forbid return in instance initializers.
10508 (patch_throw_statement): Enforce exception handling in the context
10509 of instance initializers.
10510
10511 2000-02-03 Tom Tromey <tromey@cygnus.com>
10512
10513 * Make-lang.in (java.mostlyclean): Remove executables in
10514 `mostlyclean'.
10515
10516 2000-01-31 Scott Bambrough <scottb@netwinder.org>
10517
10518 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
10519 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
10520 (java_float_finite): Convert to use union Word from javaop.h.
10521 (java_double_finite): Convert to use union DWord from javaop.h.
10522
10523 2000-02-02 Tom Tromey <tromey@cygnus.com>
10524
10525 * gjavah.c (options): Added `jni' entry.
10526 (help): Document -jni.
10527 (flag_jni): New global.
10528 (process_file): Handle JNI output. Don't print text from
10529 -prepend, -add, etc, when generating stubs. Only remove `.class'
10530 suffix if it actually exists.
10531 (main): Create a `.c' file when run with `--jni --stubs'. Create
10532 correct output file name with `--jni'.
10533 (print_include): Mangle header name differently in JNI case.
10534 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
10535 method list.
10536 (print_method_info): Handle JNI case. Put signature info into
10537 method name. Handle case when STREAM is NULL.
10538 (print_name_for_stub_or_jni): New function.
10539 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
10540 (print_cxx_classname): Handle JNI.
10541 (print_full_cxx_name): Likewise.
10542 (decode_signature_piece): Likewise.
10543 (overloaded_jni_method_exists_p): New function.
10544 (struct method_name): Added `signature' and `sig_length' fields.
10545 (HANDLE_END_FIELD): Do nothing in JNI mode.
10546
10547 2000-02-02 Tom Tromey <tromey@cygnus.com>
10548
10549 * jv-scan.c: Include version.c, <getopt.h>.
10550 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
10551 (options): New array.
10552 (usage): New function.
10553 (version): New function.
10554 (main): Use getopt_long to parse command line.
10555 * jcf-dump.c: Include version.c, <getopt.h>.
10556 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
10557 OPT_JAVAP): New macros.
10558 (options): New array.
10559 (usage): Return `void'. Changed message.
10560 (help): New function.
10561 (version): New function.
10562 (main): Use getopt_long_only to parse command line.
10563 * gjavah.c: Include <getopt.h>.
10564 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
10565 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
10566 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
10567 (options): New array.
10568 (java_no_argument): Removed.
10569 (help): Updated with missing options.
10570 (main): Use getopt_long_only to parse command line.
10571 (usage): Changed message.
10572
10573 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10574
10575 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
10576 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
10577 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
10578 * parse.y (array_creation_expression:): Handle anonymous arrays.
10579 (build_array_from_name): Don't set `ret_name' if null.
10580 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
10581 (qualify_ambiguous_name): Likewise.
10582 (java_complete_expand_class): Likewise.
10583
10584 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10585
10586 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
10587 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
10588 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
10589 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
10590 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
10591 AIPL_FUNCTION_COMPLETED_INVOCATION.
10592 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
10593 AIPL_FUNCTION_INVOCATION_READY.
10594 (AIPL_FUNCTION_DECLARATION): New enum entry.
10595 * parse.y (reorder_static_initialized): New function.
10596 (java_parser_context_pop_initialized_field): Use it.
10597 (add_inner_class_fields): Use
10598 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
10599 augmented. Install marker after last alias initializer, if any.
10600 (generate_finit): Fixed typo. Don't try to retain only the used
10601 fields.
10602 (method_header): Compute and set DECL_FUNCTION_NAP.
10603 (method_declarator): Fixed comment. Insert alias initializer in
10604 parameter list.
10605 (build_alias_initializer_parameter_list): Fixed leading
10606 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
10607 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
10608 (java_complete_expand_class): Code to retain only used aliases
10609 removed.
10610 (java_complete_expand_methods): New local `first_decl'. Generate
10611 $finit$ first, then expand the constructors, regular methods and
10612 <clinit>.
10613 (java_complete_expand_method): Don't report error on missing
10614 return statement if previously detected bogus.
10615 (fix_constructors): Don't patch constructor parameters list.
10616 (patch_method_invocation): Use new AIPL enum values. Reverse
10617 alias initializer list for anonymous classes.
10618
10619 2000-01-30 Anthony Green <green@redhat.com>
10620
10621 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
10622 determine how many stack slots to pop.
10623
10624 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10625
10626 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
10627 error handling/recovery.
10628 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
10629
10630 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10631
10632 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
10633 FIELD_LOCAL_ALIAS_USED): New macros.
10634 (DECL_FUNCTION_NAP): New macro.
10635 (struct lang_decl): New field `nap'.
10636 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
10637 (struct lang_type): New fields `finit_stmt_list' and
10638 `clinit_stmt_list'.
10639 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
10640 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
10641 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
10642 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
10643 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
10644 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
10645 (BUILD_THROW): Macro line separator re-indented.
10646 * parse.y (end_class_declaration): New function.
10647 (maybe_generate_pre_expand_clinit): New name for
10648 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
10649 pre-expand static fields.
10650 (maybe_generate_clinit): Function deleted.
10651 (check_for_static_method_reference): Prototype's parameter list
10652 indented.
10653 (generate_finit): New name for maybe_generate_finit. Changed
10654 leading comment. Function rewritten to use
10655 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
10656 (build_alias_initializer_parameter_list): New function.
10657 (java_parser_context_pop_initialized_field): Likewise.
10658 (add_inner_class_fields): Likewise.
10659 (type_declaration:): Call end_class_declaration.
10660 (class_member_declaration:): Likewise.
10661 (formal_parameter_list:): Fixed typos.
10662 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
10663 element. Improved error handling.
10664 (block_statement:): Call end_class_declaration.
10665 (anonymous_class_creation:): Likewise.
10666 (create_anonymous_class): Fixed comments.
10667 (create_class): Call add_inner_class_fields.
10668 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
10669 (method_header): Use MARK_FINAL_PARMS.
10670 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
10671 (method_declarator): Propagate final argument flag.
10672 (craft_constructor): New local `artificial'. Call
10673 build_alias_initializer_parameter_list. Use
10674 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
10675 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
10676 necessary.
10677 (complete_expand_class): Get rid of unused outer context local
10678 alias fields.
10679 (java_complete_expand_methods): Fixed leading
10680 comment. Generate/pre-expand <clinit> first. Changed method
10681 expansion order to regular, $finit$, constructors, <clinit>.
10682 (java_complete_expand_method): Set current_function_decl.
10683 (fix_constructors): Fix constructor parameter list to account for
10684 outer context local alias initializers.
10685 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
10686 (resolve_expression_name): Lookup outer context local aliases. New
10687 local `access', use it.
10688 (patch_method_invocation): Patch inner class ctor invocation with
10689 outer context local aliases initialization values. $finit$
10690 invocation patching now includes things generated with
10691 build_alias_initializer_parameter_list.
10692 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
10693 (build_super_invocation): Likewise.
10694 (patch_assignment): Changed comment.
10695
10696 2000-01-27 Andrew Haley <aph@cygnus.com>
10697
10698 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
10699 (emit_if): Ditto.
10700 (emit_jsr): Ditto.
10701
10702 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10703
10704 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
10705 concatenation.
10706 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
10707
10708 * parse.y (register_fields): Don't pass a format specifier to
10709 OBSOLETE_MODIFIER_WARNING.
10710 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
10711 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
10712 specifier.
10713 (check_modifiers): Change function into a macro.
10714 (check_class_interface_creation): Pass a literal format string.
10715
10716 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10717
10718 * buffer.h: PROTO -> PARAMS.
10719 * check-init.c: Likewise.
10720 * class.c: Likewise.
10721 * constants.c: Likewise.
10722 * convert.h: Likewise.
10723 * decl.c: Likewise.
10724 * except.c: Likewise.
10725 * expr.c: Likewise.
10726 * gjavah.c: Likewise.
10727 * java-except.h: Likewise.
10728 * java-tree.h: Likewise.
10729 * jcf-depend.c: Likewise.
10730 * jcf-dump.c: Likewise.
10731 * jcf-parse.c: Likewise.
10732 * jcf-path.c: Likewise.
10733 * jcf-reader.c: Likewise.
10734 * jcf-write.c: Likewise.
10735 * jcf.h: Likewise.
10736 * jv-scan.c: Likewise.
10737 * jvgenmain.c: Likewise.
10738 * jvspec.c: Likewise.
10739 * lang.c: Likewise.
10740 * lex.c: Likewise.
10741 * lex.h: Likewise.
10742 * parse-scan.y: Likewise.
10743 * parse.h: Likewise.
10744 * parse.y: Likewise.
10745 * typeck.c: Likewise.
10746 * verify.c: Likewise.
10747 * xref.c: Likewise.
10748 * xref.h: Likewise.
10749 * zextract.c: Likewise.
10750 * zipfile.h: Likewise.
10751
10752 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10753
10754 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
10755 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
10756 * constants.c (build_constant_data_ref): Check for cached
10757 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
10758 in TYPE_CPOOL_DATE_REF.
10759 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
10760 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
10761 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
10762 (LOCAL_FINAL): New macro.
10763 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
10764 constant pool -- don't try to reuse.
10765 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
10766 TYPE_LANG_SPECIFIC.
10767 (find_in_current_zip): Use TYPE_JCF.
10768 * parse.h (java_check_final): Prototype removed.
10769 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
10770 (maybe_create_class_interface_decl,
10771 check_class_interface_creation): Likewise.
10772 (java_expand_finals): Function removed.
10773 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
10774 (block_statement:): Fixed comment.
10775 (anonymous_class_creation:): Likewise.
10776 (check_class_interface_creation): Reversed Jan 12, 2000 extra
10777 argument patch.
10778 (check_class_interface_creation): Loosened error report on (inner)
10779 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
10780 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
10781 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
10782 argument patch.
10783 (create_interface): Likewise.
10784 (anonymous_class_counter): New static global.
10785 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
10786 patch. Fixed comments.
10787 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
10788 anonymous_class_counter when declaring a toplevel class.
10789 (craft_constructor): Fixed constructor name when handling
10790 anonymous classes. Anonymous class constructors to feature hidden
10791 this$<n> parameter.
10792 (java_fix_constructors): Added comment.
10793 (java_check_final): Function removed.
10794 (java_complete_expand_methods): Fixed comment. Don't generate
10795 class data, save its outgoing constant pool instead.
10796 (verify_constructor_super): Skip anonymous class constructor
10797 hidden this$<n> parameter.
10798 (java_expand_classes): New local `saved_ctxp'. Removed call to
10799 java_expand_finals and java_check_final. Expand anonymous class
10800 constructors. Generate class data.
10801 (build_super_invocation): Skip anonymous class hidden this$<n>
10802 parameter.
10803 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
10804 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
10805 (set_java_signature): Likewise.
10806
10807 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10808
10809 * gjavah.c: Delete ACC_VISIBILITY define.
10810 * jcf.h: Add ACC_VISIBILITY define.
10811 * parse.y: final: rule tagged <value>.
10812 (java_check_regular_methods): Use ACC_VISIBILITY define for
10813 default package access check.
10814 (local_variable_declaration_statement): Use final: rule.
10815
10816 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10817
10818 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
10819 (final:): New rule.
10820
10821 2000-01-17 Tom Tromey <tromey@cygnus.com>
10822
10823 * gjavah.c (print_field_info): Allow non-static final fields.
10824
10825 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10826
10827 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
10828 * parse.y (patch_anonymous_class): New function.
10829 (create_anonymous_class): Register incomplete type when the
10830 class/interface to extends/implement isn't known yet.
10831 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
10832 (verify_constructor_super): Tuned error message.
10833
10834 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10835
10836 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
10837 (ANONYMOUS_CLASS_P): New macro.
10838 (TYPE_SIGNATURE, TYPE_JCF): New macros.
10839 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
10840 * parse.y (create_class): Added leading argument.
10841 (maybe_create_class_interface_decl,
10842 check_class_interface_creation): Likewise.
10843 (craft_constructor): New function.
10844 (verify_constructor_super): Added argument in prototype.
10845 (class_declaration:): Inserted leading argument.
10846 (for_begin:): Use FOR_LOOP_P.
10847 (anonymous_class_creation): Create WFL of the anonymous class to
10848 instantiate. Call build_new_invocation. Added comments.
10849 (check_class_interface_creation): Handle parameter `anonymous' in
10850 verbose mode class creation announce.
10851 (link_nested_class_to_enclosing): Exclude anonymous classes.
10852 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
10853 anonymous class, even though they appear to have an enclosing
10854 context.
10855 (create_interface): Pass extra argument to
10856 check_class_interface_creation.
10857 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
10858 (create_class): Call check_class_interface_creation and
10859 maybe_create_class_interface_decl with extra new argument. Don't
10860 add private this$<n> to anonymous classes.
10861 (method_declarator): Insert hidden this$<n> to anonymous class
10862 constructors.
10863 (java_fix_constructors): Deleted code creating default
10864 constructor. Call craft_constructor instead.
10865 (java_check_regular_methods): Set `saw_constructor' to 1 for
10866 anonymous classes.
10867 (fix_constructors): Pass extra argument to verify_constructor_super.
10868 (verify_constructor_super): New local `sdecl', use it. Search for
10869 matching constructor (possibly featuring arguments) in super
10870 class.
10871 (lookup_method_invoke): Craft constructor according to arguments
10872 list when dealing with anonymous class constructors.
10873 (build_super_invocation): Pass arguments to anonymous class super
10874 constructors.
10875 (search_loop): Use FOR_LOOP_P.
10876 (labeled_block_contains_loop_p): Likewise.
10877
10878 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10879
10880 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
10881 (enclosing_context_p): New function.
10882 (get_access_flags_from_decl): Handle CLASS_STATIC.
10883 (maybe_layout_super_class): Extra first argument passed to
10884 do_resolve_class.
10885 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
10886 ID_INIT_P.
10887 * decl.c (access0_identifier_node): New global.
10888 (init_decl_processing): access0_identifier_node initialized.
10889 (pushdecl): Set DECL_CONTEXT only on non type decls.
10890 * expr.c (lookup_field): Lookup inner class fields in enclosing
10891 contexts.
10892 (expand_invoke): Use ID_INIT_P.
10893 (expand_java_field_op): Use DECL_CLINIT_P.
10894 * java-tree.def (CLASS_LITERAL): New tree code.
10895 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
10896 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
10897 (struct lang_decl): New field `inner_access'.
10898 (enclosing_context_p): Prototyped.
10899 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
10900 ID_CLINIT_P): New macros.
10901 (CLASS_STATIC): New macro.
10902 (CLASS_ACCESS0_GENERATED_P): New macro.
10903 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
10904 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
10905 INNER_CLASS_P): New macros.
10906 (DECL_INNER_CLASS_LIST): New macro.
10907 * jcf-parse.c (yyparse): Avoid the use of ANSI string
10908 concatenation.
10909 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
10910 the shift value to int. Fixed typo in comment.
10911 * lex.c (inst_id, wpv_id): Initialize.
10912 * mangle.c (unicode_mangling_length): Take `$' into account.
10913 * parse.h (DRECOVER, RECOVER): Terminate properly.
10914 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
10915 (typedef struct _jdep): New field `enclosing'.
10916 (JDEP_ENCLOSING): New macro.
10917 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
10918 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
10919 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
10920 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
10921 GET_ENCLOSING_CPC_CONTEXT): New macros.
10922 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
10923 (do_resolve_class): Added extra argument in prototype.
10924 * parse.y (resolve_class): Added extra argument in prototype.
10925 (maybe_create_class_interface_decl): Likewise.
10926 (maybe_use_access_method, build_wfl_wrap): New functions.
10927 (java_complete_expand_classes, java_complete_expand_class):
10928 Likewise.
10929 (java_parser_context_push_initialized_field,
10930 java_parser_context_suspend, java_parser_context_resume):
10931 Likewise.
10932 (maybe_make_nested_class_name, make_nested_class_name,
10933 set_nested_class_simple_name_value,
10934 link_nested_class_to_enclosing, find_as_inner_class,
10935 find_as_inner_class_do, check_inner_class_redefinition,
10936 build_thisn_assign, build_current_thisn, build_access_to_thisn,
10937 maybe_build_thisn_access_method, build_outer_field_access,
10938 build_outer_field_access_methods, build_outer_field_access_expr,
10939 build_outer_method_access_method, build_new_access_id,
10940 build_outer_field_access_method, outer_field_access_p,
10941 outer_field_expanded_access_p, outer_field_access_fix,
10942 build_incomplete_class_ref, patch_incomplete_class_ref,
10943 create_anonymous_class): Likewise.
10944 (inst_id, wpv_id): New static global variables.
10945 (synchronized:): New rule, tagged <node>.
10946 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
10947 rules.
10948 (anonymous_class_creation:): New rule, tagged <node>.
10949 (NEW_TK): Tagged <node>.
10950 (type_literals, array_type_literal): New rules, tagged <node>.
10951 (class_declaration:): Removed action when reducing by class_body:
10952 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
10953 using GET_CPC in sub-rules.
10954 (class_member_declaration): Handle inner classes.
10955 (method_declaration): When reducing method_header:, reset
10956 current_function_decl when appropriate.
10957 (method_declarator:): Set the number of formal parameter to 0 for
10958 method declared without arguments.
10959 (constructor_declarator:): Likewise.
10960 (static_initializer:): List of elements kept in a list.
10961 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
10962 use of the keyword `static' for type declarations.
10963 (block_statement:): Handle inner class declarations.
10964 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
10965 type qualified `this'.
10966 (class_instance_creation_expression): Use anonymous_class_creation:
10967 to handle inner class instances creation. Handle qualified `new'.
10968 (something_dot_new): Added appropriate actions.
10969 (create_new_parser_context): New function.
10970 (java_push_parser_context, java_parser_context_save_global,
10971 java_parser_context_suspend): Use create_new_parser_context.
10972 (check_modifiers): Changed leading comment.
10973 (check_class_interface_creation): Handle interclasses.
10974 (add_superinterfaces): Fixed comment.
10975 (create_interface): Build qualified name from the raw_name instead
10976 of its matching WFL. Push the initialized fields list. raw_name added
10977 as an extra argument to maybe_create_class_interface_decl.
10978 (create_class): Build qualified name from the raw_name instead of
10979 its matching WFL. Removed assignment to current_parsed_class_un.
10980 Call PUSH_ERROR before returning an error. Suspend the current
10981 parser context when processing an inner class. Push the
10982 initialized fields list. raw_name added as an extra argument to
10983 maybe_create_class_interface_decl. Add the private this$<n>
10984 field.
10985 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
10986 (register_fields): Get the class type from GET_CPC and handle
10987 previous errors. Added code to handle the creation of static
10988 fields in inner classes. Initialized fields initialization
10989 statements kept in a list of lists.
10990 (maybe_generate_finit): Initialized fields initialization
10991 statements kept in a list of lists. Use GET_CPC.
10992 (maybe_generate_clinit): Likewise.
10993 (method_header): Use GET_CPC and GET_CPC_UN.
10994 (parser_qualified_classname): Handle inner classes.
10995 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
10996 (java_fix_constructors): Hide pointer to enclosing context
10997 instance in constructor list when dealing with inner classes.
10998 (jdep_resolve_class): Call resolve_class with extra first argument
10999 JDEP_ENCLOSING.
11000 (resolve_class): Add enclosing context as a first extra argument
11001 to do_resolve_class.
11002 (do_resolve_class): Call find_as_inner_class. Handle WFLs
11003 properly.
11004 (resolve_no_layout): Extra argument added to resolve_class
11005 invocation.
11006 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
11007 (java_get_real_method_name): Use GET_CPC_UN.
11008 (check_abstract_method_definitions): Use DECL_CLINIT_P.
11009 (java_check_abstract_methods): Handle static method declared in
11010 inner classes by an error.
11011 (java_check_regular_methods): Use DECL_CLINIT_P.
11012 (source_start_java_method): Also set DECL_MAX_LOCALS.
11013 (create_artificial_method): Call java_parser_context_save_global
11014 and java_parser_context_restore_global instead of saving/restoring
11015 the context by hand.
11016 (expand_start_java_method): Improved verbose mode message.
11017 (java_complete_expand_methods): Fixed leading comment. Use
11018 DECL_CLINIT_P.
11019 (fix_constructors): Added assignment to this$<n> if necessary.
11020 (java_expand_classes): Call java_complete_expand_classes instead
11021 of java_complete_expand_methods.
11022 (make_qualified_primary): Simplified.
11023 (merge_qualified_name): Optimized for missing left or right parts.
11024 (resolve_expression_name): Handle access to outer class fields from
11025 interclasses.
11026 (resolve_qualified_expression_name): New macro
11027 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
11028 classes. Report error on non appropriate qualification of
11029 `new'. Handle qualified `this'.
11030 (not_accessible_p): Allow access to outer class private fields from
11031 inner classes.
11032 (patch_method_invocation): Handle method invocations through
11033 access methods and inner class constructor invocations.
11034 (find_applicable_accessible_methods_list): Search enclosing
11035 contexts of an inner class.
11036 (search_applicable_methods_list): Fixed typo.
11037 (argument_types_convertible): Handle inner class constructors'
11038 hidden outer context reference argument.
11039 (qualify_ambiguous_name): Handle qualified `this'.
11040 (java_complete_lhs): Handle use of field accessed through
11041 artificial access methods in various cases of assignments. Handle
11042 CLASS_LITERAL node.
11043 (check_final_assignment): Use DECL_CLINIT_P.
11044 (valid_ref_assignconv_cast_p): Handle the destination being an
11045 enclosing context of the source.
11046 (patch_unaryop): Handle use of field accessed through artificial
11047 access methods.
11048 (patch_return): Use DECL_CLINIT_P.
11049 (patch_throw_statement): Use DECL_CLINIT_P.
11050 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
11051 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
11052 ID_INIT_P.
11053
11054 2000-01-16 Anthony Green <green@cygnus.com>
11055
11056 * parse.y (build_string_concatenation): Only use
11057 StringBuffer(String) shortcut if String arg is constant.
11058
11059 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11060
11061 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11062 the shift value to int. Fixed typo in comment.
11063
11064 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11065
11066 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
11067 * jcf-write.c: Likewise.
11068 * parse.y: Likewise.
11069 * parse.c: Regenerate.
11070
11071 2000-01-09 Anthony Green <green@cygnus.com>
11072
11073 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
11074 bytecodes in the correct order.
11075
11076 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11077
11078 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
11079
11080 2000-01-06 Anthony Green <green@cygnus.com>
11081
11082 * expr.c (java_lang_expand_expr): Switch to permanent obstack
11083 before building constant array decl.
11084
11085 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11086
11087 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
11088 method invocation and typo in conditional expression.
11089 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
11090 the appropriate NOTE_POP.
11091 * parse.y (patch_binop): Shift value mask to feature the right
11092 type.
11093
11094 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11095
11096 * class.c (assume_compiled, assume_compiled_node): Add static
11097 prototype.
11098 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
11099
11100 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
11101
11102 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
11103
11104 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
11105 to `__modifier' to avoid stringifying it.
11106
11107 * parse.y (verify_constructor_circularity): Don't call a variadic
11108 function with a non-literal format string.
11109 (java_check_abstract_methods): Move unreachable code inside
11110 `continue' statement.
11111 (lookup_method_invoke): Call xstrdup, not strdup.
11112
11113 * expr.c (expand_java_field_op): Avoid the use of ANSI string
11114 concatenation.
11115
11116 * jcf-parse.c (yyparse): Likewise.
11117
11118 * jv-scan.c (main): Likewise.
11119
11120 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11121
11122 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
11123 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11124 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
11125 concatenation.
11126
11127 * parse.y (synchronized, variable_redefinition_error,
11128 check_class_interface_creation, create_interface, create_class,
11129 method_header, finish_method_declaration,
11130 check_modifiers_consistency, method_declarator,
11131 complete_class_report_errors, check_abstract_method_definitions,
11132 java_check_regular_methods, check_throws_clauses,
11133 java_check_abstract_methods, read_import_dir,
11134 check_pkg_class_access, declare_local_variables, fix_constructors,
11135 cut_identifier_in_qualified, resolve_expression_name,
11136 resolve_qualified_expression_name, patch_method_invocation,
11137 java_complete_lhs, patch_assignment, try_builtin_assignconv,
11138 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
11139 patch_exit_expr, patch_exit_expr, patch_switch_statement,
11140 patch_try_statement, patch_synchronized_statement,
11141 patch_throw_statement, check_thrown_exceptions,
11142 patch_conditional_expr): Likewise.
11143
11144 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11145
11146 * Makefile.in (LIBDEPS): Added gcc's errors.o
11147 (../jcf-dump$(exeext):): Link with gcc's errors.o
11148 (../gcjh$(exeext):): Likewise.
11149 * expr.c (expand_java_NEW): Layout the entire target type instead of
11150 laying out its methods only.
11151 (lookup_field): Layout the class after having loaded it.
11152 * java-tree.h (java_debug_context): Declared.
11153 * jcf-io.c (toplev.h): Included.
11154 (find_class): Removed assignment to jcf's outofsynch
11155 field. Force source file to be read if newer than its matching
11156 class file. Tweaked debug messages.
11157 * jcf-parse.c (jcf_out_of_synch): Deleted.
11158 (read_class): Call to jcf_out_of_synch removed.
11159 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
11160 (jcf_out_of_synch): Prototype deleted.
11161 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
11162 `deprecated' and `class_err': integer turned into bit-fields.
11163 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
11164 * parse.y (package_list): New global.
11165 (package_declaration:): Record newly parsed package name.
11166 (extra_ctxp_pushed_p): Static global deleted.
11167 (java_parser_context_save_global): Create buffer context for the
11168 purpose of saving globals, if necessary.
11169 (java_parser_context_restore_global): Pop context pushed for the
11170 purpose of saving globals, if necessary.
11171 (java_debug_context_do): New prototype and function.
11172 (java_debug_context): Likewise.
11173 (do_resolve_class): Use already parsed package names to qualify
11174 and lookup class candidate.
11175 (java_pre_expand_clinit): Removed unnecessary local variable.
11176
11177 1999-12-17 Tom Tromey <tromey@cygnus.com>
11178
11179 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
11180 fixes PR gcj/119.
11181 (process_file): Use `\n\' at end of each line in string.
11182
11183 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11184
11185 * expr.c (expand_invoke): Layout the loaded class before
11186 attempting to use it.
11187 (expand_java_field_op): Allow final field assignments to take
11188 place in $finit$.
11189 * typeck.c (convert): Return error_mark_node if expr is null.
11190
11191 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11192
11193 * class.c (class_depth): Return -1 if the class doesn't load
11194 properly.
11195 * expr.c (can_widen_reference_to): Check for errors during depth
11196 computation and return 0 accordingly.
11197 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
11198 create default constructors and add an other error check.
11199 * parse.h (java_fix_constructors): Prototyped.
11200 * parse.y (java_pre_expand_clinit): Likewise.
11201 (build_super_invocation): Re-prototyped to feature one argument.
11202 (java_check_circular_reference): Directly use `current'.
11203 (java_fix_constructors): New function.
11204 (java_check_regular_methods): Don't create default constructors
11205 here, but abort if none were found.
11206 (java_complete_expand_methods): Pre-process <clinit> calling
11207 java_pre_expand_clinit.
11208 (java_pre_expand_clinit): New function.
11209 (fix_constructors): build_super_invocation invoked with the
11210 current method declaration as an argument.
11211 (build_super_invocation): Use the context of the processed method
11212 decl argument instead of current_class.
11213 * typeck.c (lookup_java_method): Take WFLs in method names into
11214 account.
11215
11216 1999-12-14 Per Bothner <per@bothner.com>
11217
11218 * class.c (make_class_data): flag_keep_inline_functions to keep
11219 private methods in the method array.
11220
11221 1999-12-15 Anthony Green <green@cygnus.com>
11222
11223 * check-init.c (check_init): Take into account both types of
11224 `throw's when checking for uninitialized variables.
11225
11226 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11227
11228 * parse.y (java_complete_lhs): Force conversion of array
11229 dimensions to int_type_node, that's what runtime's ABI expects.
11230
11231 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11232
11233 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
11234 operand of a WFL, until the Java front-end gets fixed with regard
11235 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
11236
11237 1999-12-10 Andrew Haley <aph@cygnus.com>
11238
11239 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
11240 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
11241 expr.c (build_java_athrow): Add support for sjlj-exceptions.
11242 java-tree.h: Ditto.
11243 jcf-write.c: Ditto.
11244
11245 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11246
11247 * expr.c (java_lang_expand_expr): Switch to permanent obstack
11248 before calling expand_eh_region_start and expand_start_all_catch.
11249 * except.c (expand_start_java_handler): Switch to permanent
11250 obstack before calling expand_eh_region_start.
11251 (expand_end_java_handler): Switch to permanent obstack before
11252 calling expand_start_all_catch.
11253
11254 1999-12-5 Anthony Green <green@cygnus.com>
11255
11256 * decl.c (init_decl_processing): Mark throw_node as a noreturn
11257 function with side effects.
11258 (init_decl_processing): Mark all memory allocating DECLs with
11259 DECL_IS_MALLOC.
11260
11261 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11262
11263 * except.c (expand_end_java_handler): Call
11264 expand_resume_after_catch and end_catch_handler.
11265
11266 1999-11-30 Anthony Green <green@cygnus.com>
11267
11268 * verify.c (verify_jvm_instructions): Create new return label
11269 chain if non existent (don't rely on the verified state of the jsr
11270 target.)
11271
11272 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11273
11274 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
11275 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
11276
11277 * parse.y (patch_assignment): Removed bogus final class test on
11278 lhs when checking on whether to emit an ArrayStoreException runtime
11279 check.
11280 * expr.c (expand_java_arraystore): Likewise.
11281
11282 1999-11-28 Anthony Green <green@cygnus.com>
11283
11284 * decl.c (find_local_variable): Reuse single slot decls when
11285 appropriate.
11286
11287 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11288
11289 * jcf-parse.c (saw_java_source): Global variable removed.
11290 (read_class): Don't use `saw_java_source'. Added extra braces.
11291 (yyparse): Code setting `saw_java_source' removed.
11292
11293 1999-11-24 Mark Mitchell <mark@codesourcery.com>
11294
11295 * except.c (emit_handlers): Zero catch_clauses after emitting them.
11296
11297 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11298
11299 * verify.c (merge_type_state): Non verified subroutines being
11300 considered more than once to trigger passive type merge.
11301
11302 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11303
11304 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
11305 in case of error. Error message tuned.
11306
11307 1999-11-21 Anthony Green <green@cygnus.com>
11308
11309 * constants.c (find_methodref_index): Unwrap method names before
11310 inserting them in the constant pool.
11311
11312 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
11313
11314 * class.c (assume_compiled_node): New typedef.
11315 (assume_compiled_tree): New static data.
11316 (find_assume_compiled_node): New function.
11317 (add_assume_compiled): New function.
11318 (assume_compiled): New function.
11319 * class.c (make_class_data): Use assume_compiled.
11320 (is_compiled_class): Use assume_compiled.
11321
11322 * java-tree.h (add_assume_compiled): Declare.
11323
11324 * lang.c (lang_decode_option): Parse new options.
11325
11326 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11327
11328 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
11329 int_type_node: that's what `_Jv_AllocObject' expects.
11330
11331 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11332
11333 * parse.y (lookup_method_invoke): Use lang_printable_name to
11334 reliably build the type name during error report. Fixes PR gcj/97.
11335
11336 1999-11-09 Tom Tromey <tromey@cygnus.com>
11337
11338 * jcf-path.c: Include <sys/stat.h>.
11339 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
11340 (DIR_UP): New macro.
11341
11342 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11343
11344 * parse.y (source_end_java_method): Resume permanent allocation,
11345 reversing Apr 27 1998 patch.
11346 (patch_string_cst): Pop obstacks after having pushed the permanent
11347 ones.
11348
11349 1999-11-05 Tom Tromey <tromey@cygnus.com>
11350
11351 * class.c (finish_class): Emit inlined methods if any native
11352 methods exist in the class. Fixes PR gcj/85.
11353
11354 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11355
11356 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
11357 (qualify_ambiguous_name): Likewise.
11358
11359 1999-11-03 Godmar Back <gback@cs.utah.edu>
11360
11361 * typeck.c: (lookup_java_method): search all inherited
11362 interfaces when looking up interface method.
11363
11364 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11365
11366 * parse.y (method_header:): Issue error message for rule `type
11367 error'.
11368 (synchronized:): Error report when not using synchronized.
11369
11370 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11371
11372 * parse.y (resolve_qualified_expression_name): Prevent `this' from
11373 being used before the superclass constructor has been called.
11374 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
11375 instead of `CALL_THIS_CONSTRUCTOR_P'.
11376
11377 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
11378
11379 * check-init.c: Fix typo in comment.
11380
11381 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11382
11383 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
11384 and final method.
11385
11386 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11387
11388 * parse.y (expression_statement:): Call function to report
11389 improper invocation of a constructor.
11390 (parse_ctor_invocation_error): New function.
11391
11392 1999-10-26 Mark Mitchell <mark@codesourcery.com>
11393
11394 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
11395 remember_end_note.
11396
11397 1999-10-21 Tom Tromey <tromey@cygnus.com>
11398
11399 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
11400 in generated `main'.
11401
11402 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11403
11404 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
11405 (qualify_ambiguous_name): Likewise.
11406
11407 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11408
11409 * parse.y (java_complete_tree): fold_constant_for_init to work on
11410 permanent_obstack.
11411 (java_complete_lhs): Likewise.
11412 (array_constructor_check_entry): Complete an initializer element
11413 on permanent_obstack.
11414
11415 1999-10-19 Tom Tromey <tromey@cygnus.com>
11416
11417 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
11418 From Mike Moreton <mike@pillim.demon.co.uk>.
11419
11420 1999-10-15 Greg McGary <gkm@gnu.org>
11421
11422 * java-tree.h (flag_bounds_check): Remove extern decl.
11423 * lang.c (flag_bounds_check): Remove global variable.
11424 (lang_f_options): Remove "bounds-check" entry.
11425 (lang_init_options): Default flag_bounds_check to "on".
11426
11427 1999-10-14 Tom Tromey <tromey@cygnus.com>
11428
11429 * jvgenmain.c (usage): New function.
11430 (main): Use it. Also, handle `-D' options.
11431 * jvspec.c (lang_specific_driver): Recognize -D.
11432 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
11433
11434 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
11435
11436 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11437
11438 * jcf-dump.c (print_constant, disassemble_method): Don't call a
11439 variadic function with a non-literal format string.
11440
11441 * parse-scan.y (report_main_declaration): Likewise.
11442
11443 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
11444
11445 * parse.y (read_import_dir, patch_assignment, patch_binop,
11446 patch_array_ref): Likewise.
11447
11448 * typeck.c (build_java_array_type): Likewise.
11449
11450 * verify.c (verify_jvm_instructions): Likewise.
11451
11452 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11453
11454 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
11455
11456 1999-10-07 Anthony Green <green@cygnus.com>
11457
11458 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
11459 where CHECK_PUT may fail for valid reasons.
11460
11461 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
11462 UNSAFE_PUTN): New macros.
11463
11464 1999-10-04 Tom Tromey <tromey@cygnus.com>
11465
11466 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
11467 well. Fixes Java PR gcj/59.
11468 * parse-scan.y (yyerror): Report errors.
11469
11470 1999-09-24 Glenn Chambers <GChambers@provsol.com>
11471
11472 * decl.c (insert_block): Remove unconditional `abort'.
11473
11474 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
11475
11476 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
11477 FUNCTION_CODE now of type int. All callers changed.
11478 Set the builtin's DECL_BUILT_IN_CLASS.
11479
11480 1999-09-23 Tom Tromey <tromey@cygnus.com>
11481
11482 * jvspec.c (lang_specific_driver): Don't read spec file if
11483 -fsyntax-only given.
11484
11485 1999-09-22 Tom Tromey <tromey@cygnus.com>
11486
11487 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
11488
11489 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
11490 (WORDS_TO_LONG): Likewise.
11491 (WORDS_TO_DOUBLE): Likewise.
11492
11493 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11494
11495 * jcf-write.c (RELOCATION_VALUE_0): New macro.
11496 (RELOCATION_VALUE_1): Likewise.
11497 (emit_iinc, emit_reloc, push_constant1, push_constant2,
11498 push_in_const, push_long_const): Prototyped.
11499 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
11500 (push_constant2): Likewise.
11501 (push_int_const): Cast find_constant1's integer arguments to `jword'.
11502 (find_constant_wide): Cast find_constant2's integer arguments to
11503 `jword'.
11504 (find_constant_index): Cast find_constant2's and find_constant2's
11505 integer arguments to `jword'.
11506 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
11507 (emit_switch_reloc): Use RELOCATION_VALUE_0.
11508 (emit_if): Use RELOCATION_VALUE_1.
11509 (emit_goto): Likewise.
11510 (emit_jsr): Likewise.
11511 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
11512 argument to push_long_const to HOST_WIDE_INT.
11513
11514 1999-09-15 Andreas Schwab <schwab@suse.de>
11515
11516 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
11517
11518 1999-09-20 Nick Clifton <nickc@cygnus.com>
11519
11520 * lang.c (lang_decode_option): Extend comment.
11521
11522 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11523
11524 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
11525 instead of fndecl.
11526
11527 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11528
11529 * gjavah.c (get_field_name, print_method_info, print_include,
11530 add_namelet): Use xmalloc, not malloc.
11531
11532 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
11533 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
11534 NULL pointer.
11535
11536 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
11537
11538 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
11539
11540 * jcf-path.c (add_entry): Likewise.
11541
11542 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
11543
11544 * jv-scan.c (xmalloc): Remove definition.
11545
11546 * jvgenmain.c (xmalloc): Likewise.
11547
11548 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
11549
11550 * lex.c (java_store_unicode): Use xrealloc, not realloc.
11551
11552 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
11553 concat, not xmalloc/sprintf.
11554 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
11555 (xstrdup): Remove definition.
11556
11557 * parse.y (duplicate_declaration_error_p,
11558 constructor_circularity_msg, verify_constructor_circularity,
11559 check_abstract_method_definitions, java_check_regular_methods,
11560 java_check_abstract_methods, patch_method_invocation,
11561 check_for_static_method_reference, patch_assignment, patch_binop,
11562 patch_cast, array_constructor_check_entry, patch_return,
11563 patch_conditional_expr): Use xstrdup, not strdup.
11564
11565 * zextract.c (ALLOC): Use xmalloc, not malloc.
11566
11567 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11568
11569 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
11570
11571 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
11572 (do_spec, lang_specific_pre_link, lang_specific_driver,
11573 input_filename, input_filename_length): Don't declare.
11574 (main_class_name, jvgenmain_spec, lang_specific_driver):
11575 Constify a char*.
11576 (lang_specific_driver): All calls to the function pointer
11577 parameter now explicitly call `fatal'.
11578
11579 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11580
11581 * parse.y (find_applicable_accessible_methods_list): Search
11582 abstract classes as interfaces.
11583
11584 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11585
11586 * class.c (finish_class): We're now outside a valid method
11587 declaration. Tell the rest of gcc so.
11588
11589 1999-09-08 Bruce Korb autogen@linuxbox.com
11590
11591 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
11592
11593 1999-09-07 Tom Tromey <tromey@cygnus.com>
11594
11595 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
11596 java-array.h.
11597 (decode_signature_piece): Don't emit "::" in JArray<>.
11598 (print_namelet): Only print trailing `;' when printing a class.
11599
11600 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
11601
11602 * java-tree.h: Delete declarations for all tree nodes now moved to
11603 global_trees.
11604 * decl.c: Delete their definitions.
11605
11606 1999-09-04 Mark Mitchell <mark@codesourcery.com>
11607
11608 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
11609 * Makefile.in (OBJS): Add ggc-callbacks.o.
11610 (OBJDEPS): Likewise.
11611
11612 1999-09-03 Tom Tromey <tromey@cygnus.com>
11613
11614 * parse.y (strip_out_static_field_access_decl): Return operand if
11615 it satisfies JDECL_P.
11616
11617 1999-09-02 Tom Tromey <tromey@cygnus.com>
11618
11619 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
11620 Handle nested arrays, like `[[I'.
11621
11622 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11623
11624 * class.c (finish_class): Remove unused parameter, all callers
11625 changed.
11626
11627 * expr.c (build_java_athrow): Change return type to void.
11628 (java_lang_expand_expr): Make sure each case in switch returns a
11629 value.
11630
11631 * java-tree.h (finish_class): Fix prototype to take void args.
11632
11633 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
11634 (main): Issue return from main, not exit.
11635
11636 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
11637
11638 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
11639
11640 * jv-scan.c (main): Issue return from main, not exit.
11641
11642 * parse.y (check_abstract_method_definitions,
11643 java_check_abstract_method_definitions): Add static prototypes.
11644 (java_complete_expand_methods): Fix call to `finish_class'.
11645
11646 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
11647 and `prevpc'.
11648
11649 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11650
11651 * lang.c (language_string): Constify.
11652
11653 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11654
11655 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
11656 Remove hacks for stuff which comes from libiberty.
11657
11658 * Make-lang.in: Likewise.
11659
11660 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
11661
11662 * Makefile.in (xref.o): Depend on xref.c explicitly.
11663
11664 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11665
11666 * java-tree.h (lang_printable_name): Constify a char*.
11667
11668 * lang.c (lang_printable_name): Likewise.
11669
11670 1999-08-27 Jeffrey A Law (law@cygnus.com)
11671
11672 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
11673 comments in C code.
11674
11675 1999-08-26 Tom Tromey <tromey@cygnus.com>
11676
11677 * gjavah.c (print_cxx_classname): Print "::" before qualified
11678 name.
11679
11680 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
11681
11682 * parse.y (lookup_cl): Changed leading comment. Now does its best
11683 to set the column number.
11684 (qualify_ambiguous_name): Take WFL wrappers into account.
11685
11686 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
11687
11688 * verify.c (verify_jvm_instructions): Don't check instruction
11689 validity beyond end of method.
11690
11691 1999-08-25 Tom Tromey <tromey@cygnus.com>
11692
11693 * jvspec.c (lang_specific_driver): Correctly handle --help again.
11694
11695 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11696
11697 * gjavah.c (print_name, print_base_classname, utf8_cmp,
11698 cxx_keyword_subst, generate_access, name_is_method_p,
11699 get_field_name, print_field_name, super_class_name, print_include,
11700 decode_signature_piece, print_class_decls, usage, help,
11701 java_no_argument, version, add_namelet, print_namelet): Add static
11702 prototype.
11703 (print_base_classname, utf8_cmp, cxx_keyword_subst,
11704 name_is_method_p): Constify a char*.
11705 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
11706 Provide a final else clause in an if-else-if.
11707 (print_field_info): Add missing final arg in function call to
11708 `print_field_name'.
11709 (print_method_info, decompile_method, decode_signature_piece,
11710 print_c_decl, print_full_cxx_name, print_stub,
11711 print_mangled_classname, super_class_name, print_include,
11712 add_namelet, add_class_decl, print_class_decls, process_file,
11713 help): Constify a char*.
11714
11715 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
11716 push_int_const, find_constant_wide, find_constant_index,
11717 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
11718 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
11719 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
11720 emit_if, emit_goto, emit_jsr, call_cleanups,
11721 make_class_file_name): Add static prototypes.
11722 (generate_bytecode_return, generate_bytecode_insns): Pass a
11723 NULL_PTR, not a NULL_TREE.
11724
11725 * jv-scan.c: Include "jcf.h".
11726 (main): Declare using DEFUN macro.
11727
11728 * jvspec.c (find_spec_file, lang_specific_pre_link,
11729 lang_specific_driver): Add prototypes.
11730 (find_spec_file): Constify a char*.
11731
11732 * keyword.gperf (hash, java_keyword): Add prototypes.
11733
11734 * lang.c (lang_print_error): Add static prototype.
11735 (lang_init): Prefer memcpy over bcopy to avoid casts.
11736
11737 * lex.c (yylex): Add static prototype.
11738
11739 * parse-scan.y: Include "lex.c" earlier.
11740
11741 * parse.h: Remove redundant declaration for `yylex'.
11742
11743 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
11744 labeled_block_contains_loop_p): Add static prototypes.
11745 (not_accessible_p): Make static to match prototype.
11746
11747 * verify.c (start_pc_cmp): Don't needlessly cast away const.
11748
11749 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11750
11751 * parse.y (check_method_redefinition): Changed leading comment.
11752 (check_abstract_method_definitions): New function.
11753 (java_check_abstract_method_definitions): New function.
11754 (java_check_regular_methods): Call it.
11755 (verify_constructor_super): Fixed indentation.
11756 (lookup_method_invoke): Likewise.
11757
11758 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11759
11760 * parse.y (method_header): Return a null pointer if the current
11761 class node is null.
11762 (finish_method_declaration): Return if the current function decl
11763 is null.
11764 (source_start_java_method): Likewise.
11765 (java_method_add_stmt): Likewise.
11766
11767 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11768
11769 * class.c (emit_register_class): Removed unnecessary call to
11770 start_sequence.
11771 * parse.y (labeled_block_contains_loop_p): Removed unused local
11772 variable.
11773
11774 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11775
11776 * parse.y (java_refold): Added prototype.
11777
11778 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11779
11780 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
11781 (java_stabilize_reference): Removed unnecessary `else'.
11782 (java_complete_lhs): Set flag to remember boolean. Call
11783 java_refold. Added comments.
11784 (java_decl_equiv): New function.
11785 (binop_compound_p): Likewise.
11786 (java_refold): Likewise.
11787 (patch_unaryop): Striped static field access assigned to decl and
11788 op. Changed promotion scheme for ++/-- operators.
11789 (search_loop): New function.
11790 (labeled_block_contains_loop_p): Likewise.
11791 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
11792 comment.
11793 (patch_bc_statement): Call search_loop. Fixed comment.
11794
11795 1999-08-14 Anthony Green <green@cygnus.com>
11796
11797 * expr.c (java_lang_expand_expr): Mark static array data as
11798 referenced.
11799
11800 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
11801
11802 * jvgenmain.c (main): NUL-terminate name_obstack.
11803
11804 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11805
11806 * check-init.c (check_bool2_init, done_alternative): Add static
11807 prototypes.
11808
11809 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
11810 (add_method, build_utf8_ref, build_class_ref,
11811 append_gpp_mangled_type, layout_class_method): Constify a char*.
11812
11813 * decl.c (push_promoted_type, make_binding_level): Add static
11814 prototypes.
11815 (push_promoted_type, pushdecl): Constify a char*.
11816
11817 * except.c (find_handler_in_range, link_handler,
11818 check_start_handlers): Add static prototypes.
11819
11820 * expr.c (process_jvm_instruction): Constify a char*.
11821
11822 * gjavah.c (main): Constify a char*.
11823
11824 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
11825 Constify a char*.
11826
11827 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
11828 static prototypes.
11829 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
11830 munge, print_ents): Constify a char*.
11831
11832 * jcf-dump.c (disassemble_method): Constify a char*.
11833 (print_constant_pool, print_exception_table): Add static prototypes.
11834 (print_constant, print_exception_table, main, disassemble_method):
11835 Constify a char*.
11836
11837 * jcf-io.c (find_classfile, find_class): Likewise.
11838
11839 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
11840 (set_source_filename, predefined_filename_p): Add static prototypes.
11841 (set_source_filename, get_constant, get_class_constant,
11842 find_in_current_zip): Constify a char*.
11843
11844 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
11845 static prototypes.
11846 (add_entry, add_path, jcf_path_classpath_arg,
11847 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
11848
11849 * jcf-reader.c (get_attribute, jcf_parse_preamble,
11850 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
11851 jcf_parse_one_method, jcf_parse_methods,
11852 jcf_parse_final_attributes): Add static prototypes.
11853 (get_attribute): Constify a char*.
11854
11855 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
11856 jcf_dependency_add_target, jcf_path_classpath_arg,
11857 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
11858
11859 * jv-scan.c (main): Constify a char*.
11860 (gcc_obstack_init): Add prototype arguments.
11861
11862 * jvgenmain.c (gcc_obstack_init): Likewise.
11863 (main): Constify a char*.
11864
11865 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
11866 static prototypes.
11867 (put_decl_string, lang_print_error): Constify a char*.
11868 (lang_init): Remove redundant extern prototype.
11869
11870 * mangle.c (emit_unicode_mangled_name): Constify a char*.
11871
11872 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
11873 Add static prototypes.
11874 (get_type_from_signature): Constify a char*.
11875
11876 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
11877 Add static prototypes.
11878 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
11879 (verify_jvm_instructions): Constify a char*.
11880
11881 * xref.c (xref_flag_value): Likewise.
11882
11883 * xref.h (xref_flag_value): Likewise.
11884
11885 * zextract.c (makeword, makelong): Add static prototypes.
11886 (makeword, makelong): Constify a uch*.
11887
11888 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11889
11890 * lang.c (java_dummy_print): Constify a char*.
11891 (lang_print_error): Likewise.
11892 (lang_init): Remove redundant prototype for `print_error_function'.
11893 (lang_init_source): Likewise.
11894 (lang_identify): Constify a char*.
11895
11896 1999-08-09 Tom Tromey <tromey@cygnus.com>
11897
11898 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
11899 (WORDS_TO_LONG): Likewise.
11900 (WORDS_TO_DOUBLE): Likewise.
11901
11902 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11903
11904 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
11905
11906 * expr.c (java_stack_pop, java_array_data_offset,
11907 build_java_throw_out_of_bounds_exception, case_identity,
11908 build_java_check_indexed_type): Add static prototypes.
11909 (linenumber_table, expand_invoke, expand_java_field_op,
11910 build_primtype_type_ref, expand_byte_code): Constify a char*.
11911
11912 * java-tree.h (build_primtype_type_ref, linenumber_table):
11913 Constify a char*.
11914 (java_lang_expand_expr): Add prototype.
11915
11916 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
11917 `java_lang_expand_expr'.
11918
11919 * lex.c (java_lex_error): Constify a char*.
11920 (java_get_unicode, java_read_char, java_allocate_new_line,
11921 java_unget_unicode, java_sneak_unicode): Prototype.
11922
11923 * parse-scan.y (current_class, package_name, method_declarator,
11924 report_class_declaration, yyerror): Constify a char*.
11925
11926 * parse.h (java_report_errors): Prototype.
11927 (yyerror): Constify a char*.
11928
11929 * parse.y (classitf_redefinition_error, check_modifiers,
11930 parse_jdk1_1_error, lookup_package_type,
11931 lookup_package_type_and_set_next, get_printable_method_name,
11932 purify_type_name): Constify a char*.
11933 (build_super_invocation, maybe_generate_finit,
11934 verify_constructor_super, parser_add_interface,
11935 add_superinterfaces, jdep_resolve_class, note_possible_classname,
11936 java_complete_expand_methods, java_expand_finals,
11937 cut_identifier_in_qualified, java_stabilize_reference,
11938 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
11939 merge_string_cste): Prototype.
11940 (single_type_import_declaration, yyerror,
11941 variable_redefinition_error, build_array_from_name,
11942 build_unresolved_array_type, check_class_interface_creation,
11943 resolve_class, complete_class_report_errors,
11944 note_possible_classname, read_import_dir,
11945 find_in_imports_on_demand, resolve_package, fix_constructors,
11946 check_deprecation, lookup_method_invoke,
11947 maybe_build_primttype_type_ref, array_constructor_check_entry):
11948 Constify a char*.
11949 (java_complete_expand_methods, java_expand_finals): Make static.
11950 (convert_narrow): Remove static prototype.
11951
11952 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
11953
11954 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
11955
11956 1999-08-02 Richard Henderson <rth@cygnus.com>
11957
11958 * decl.c: Include defaults.h instead of expr.h.
11959 * parse.y: Likewise.
11960
11961 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
11962
11963 * java/decl.c (start_java_method): Change all uses of
11964 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
11965 Ensure expr.h is included.
11966 * java/expr.c (pop_arguments): Ditto.
11967 * java/parse.y (expand_start_java_method): Ditto.
11968
11969 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11970
11971 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
11972
11973 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
11974
11975 * decl.c: Include "function.h".
11976 * except.c: Likewise.
11977 * parse.y: Likewise.
11978 * Makefile.in: Update dependencies.
11979
11980 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11981
11982 * expr.c (build_java_soft_divmod): Provide a default case in switch.
11983 (java_lang_expand_expr): Mark parameters `target', `tmode' and
11984 `modifier' with ATTRIBUTE_UNUSED.
11985
11986 * gjavah.c (process_file): Add braces around ambiguous `else'.
11987
11988 * jcf-dump.c (print_access_flags, localvar_free): Change return
11989 type to void.
11990
11991 * parse.y (java_complete_expand_method): Initialize variable
11992 `exception_copy'.
11993 (resolve_qualified_expression_name): Likewise for `field_decl'.
11994 (patch_method_invocation): Likewise for `class_to_search'.
11995 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
11996 (patch_assignment): Likewise for `lhs_type'.
11997
11998 * verify.c (verify_jvm_instructions): Remove unused variable
11999 `caller'.
12000
12001 1999-07-25 Richard Henderson <rth@cygnus.com>
12002
12003 * decl.c (va_list_type_node): New.
12004
12005 1999-07-25 Anthony Green <green@cygnus.com>
12006
12007 * gjavah.c (print_stub): New function.
12008 (METHOD_IS_NATIVE): New macro.
12009 (print_mangled_classname): Make static.
12010 (HANDLE_END_FIELD): Don't emit fields during stub generation.
12011 (process_file): Perform stub generation.
12012 (HANDLE_METHOD): Don't emit class decls during stub
12013 generation.
12014 (HANDLE_END_METHOD): Take into account stub generation.
12015 (print_method_info): Handle stub generation.
12016 (print_stub): New function.
12017 (print_cxx_classname): Make signature consistant with others.
12018 (help): Describe -stubs option.
12019 (main): Create stub file.
12020 (version): Use version.c.
12021 (print_full_cxx_name): New function.
12022 (print_c_decl): Use print_full_cxx_name.
12023
12024 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12025
12026 * check-init.c (check_init): Handle MAX_EXPR.
12027
12028 1999-07-15 Andrew Haley <aph@cygnus.com>
12029
12030 * lang.c (flag_use_divide_subroutine): New variable.
12031 * typeck.c: (convert_ieee_real_to_integer): Bounds check
12032 fp-to-integer conversion.
12033 (convert): Call convert_ieee_real_to_integer when flag_fast_math
12034 is not set.
12035
12036 * expr.c (build_java_soft_divmod): New function.
12037 (build_java_binop): Call build_java_soft_divmod if
12038 flag_use_divide_subroutine is set.
12039 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12040 soft_lrem_node: new builtin functions.
12041 (init_decl_processing) Initialize the new builtins.
12042 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12043 soft_lrem_node: new builtin functions.
12044 (build_java_soft_divmod): New function.
12045 * parse.y: Call build_java_soft_divmod if
12046 flag_use_divide_subroutine is set.
12047 * parse.c: Rebuilt.
12048
12049 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
12050 a --specs= arg) even if not linking.
12051 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
12052 -fuse-divide-subroutine
12053
12054 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12055
12056 * parse.y (resolve_and_layout): Check methods only once.
12057 (resolve_qualified_expression_name): Verify thrown exceptions
12058 compatibility.
12059 (check_thrown_exceptions): Reject exceptions thrown in
12060 initializer. Error message tuned.
12061
12062 1999-07-14 Andrew Haley <aph@cygnus.com>
12063
12064 * expr.c (expand_expr): Do not return the last statement in a
12065 block as the block's value.
12066
12067 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12068
12069 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
12070 CALL_EXPR, to avoid order of evaluation changes.
12071
12072 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12073
12074 * parse.y (qualify_ambiguous_name): Do not use
12075 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
12076
12077 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12078
12079 * check-init.c (check_init): Handle MAX_EXPR.
12080 * expr.c (force_evaluation_order): Force method call arguments to
12081 be evaluated in left-to-right order.
12082 * parse.y (qualify_ambiguous_name): Loop again to qualify
12083 NEW_ARRAY_EXPR properly.
12084
12085 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12086
12087 * parse.y (patch_invoke): Resolve unresolved invoked method
12088 returned type.
12089 (qualify_ambiguous_name): STRING_CST to qualify expression for
12090 type name resolution.
12091
12092 1999-06-24 Andrew Haley <aph@cygnus.com>
12093
12094 * class.c (finish_class): Whenever a deferred method is
12095 output, rescan the list of methods to see if a new candidate for
12096 output can be found.
12097
12098 1999-06-28 Tom Tromey <tromey@cygnus.com>
12099
12100 * jvspec.c (lang_specific_driver): Recognize --help.
12101
12102 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12103
12104 * parse.y (resolve_package): Fixed bogus return statement.
12105 (patch_method_invocation): Resolve method invocation beginning with
12106 a package name qualifier.
12107
12108 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12109
12110 * Make-lang.in (java.stage1): Depend on stage1-start.
12111 (java.stage2): Likewise for stage2-start.
12112 (java.stage3): Likewise for stage3-start.
12113 (java.stage4): Likewise for stage4-start.
12114
12115 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12116
12117 * parse.y (java_complete_lhs): When doing cross referencing, don't
12118 try to keep file location on a WFL expanded as a CALL_EXPR.
12119
12120 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12121
12122 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
12123 compiling to class file a void method with an empty method body.
12124 As a side effect, the bytecode backend will generate the
12125 appropriate `return' instruction.
12126
12127 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12128
12129 * parse.y (lookup_package_type_and_set_next): New function prototype.
12130 (resolve_package): Search current and imported packages.
12131 (lookup_package_type_and_set_next): New function.
12132
12133 1999-06-22 Andrew Haley <aph@cygnus.com>
12134
12135 * verify.c (verify_jvm_instructions): Check for pending blocks
12136 before invalid PC test and opcode switch, not after.
12137
12138 1999-06-21 Andrew Haley <aph@cygnus.com>
12139
12140 * except.c (find_handler_in_range): The upper limit for exception
12141 ranges is exclusive, not inclusive: (start <= pc < end).
12142 (link_handler): find child pointer which points to outer by
12143 searching sibling list: previous code incorrectly assumed that
12144 outer->outer->first_child must point to outer.
12145 * verify.c (verify_jvm_instructions): FIXME added to code for
12146 `athrow'.
12147 (verify_jvm_instructions): Do not assume that the last block
12148 processed in a subroutine is a block which ends with a `ret'
12149 instruction. With some control flows it is possible that the last
12150 block ends with an `athrow'.
12151
12152 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12153
12154 * parse.y (qualify_ambiguous_name): Reorganized the post
12155 evaluation of non WFL leading expression nodes.
12156
12157 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12158
12159 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
12160 CONVERT_EXPR.
12161
12162 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12163
12164 * parse.y (qualify_ambiguous_name): Handle qualified expression
12165 beginning with a STRING_CST.
12166
12167 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12168
12169 * parse.y (register_fields): Set DECL_INITIAL on both
12170 pre-initialized static and public fields.
12171 (resolve_field_access): Static field access expressions to always
12172 use pointer types.
12173 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
12174 qualification. CONVERT_EXPR to be resolved as an expression name.
12175 (java_complete_lhs): Identify and access qualified final
12176 initialized field in switch statement case expression.
12177 (fold_constant_for_init): Pre-initialized field decl constant to
12178 be folded.
12179
12180 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12181
12182 * parse.y (note_possible_classname): Mark returned node with
12183 QUALIFIED_P only if the original class name contained a '/'.
12184
12185 1999-06-05 Anthony Green <green@cygnus.com>
12186
12187 * Make-lang.in (gcjh): More parallel build fixes.
12188
12189 1999-06-03 Mike Stump <mrs@wrs.com>
12190
12191 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
12192
12193 1999-06-02 Anthony Green <green@cygnus.com>
12194
12195 * except.c (link_handler): Chain exception handlers in order.
12196
12197 1999-06-02 Anthony Green <green@cygnus.com>
12198
12199 * expr.c (expand_byte_code): Fill unreachable bytecode regions
12200 with nops and process as usual in order to always set correct EH
12201 ranges. Emit detailed warnings about unreachable bytecodes.
12202
12203 1999-06-02 Anthony Green <green@cygnus.com>
12204
12205 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
12206 constant.
12207
12208 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12209
12210 * parse.y (lookup_field_wrapper): Unified returned value to NULL
12211 or the searched field decl.
12212
12213 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12214
12215 * parse.y (fold_constant_for_init): Convert numerical constant
12216 values to the type of the assigned field.
12217
12218 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12219
12220 * expr.c (lookup_field): Relaxed the test on class loading error
12221 detection.
12222 * parse.y (fold_constant_for_init): Enabeled old code.
12223
12224 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12225
12226 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
12227 decide the validity of the cast of a java.lang.Cloneable reference
12228 to an array.
12229 (patch_conditional_expr): Fixed first argument passed to
12230 binary_numeric_promotion.
12231
12232 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12233
12234 * parse.y (qualify_ambiguous_name): Take into account that a
12235 CONVERT_EXPR might specify a type as a WFL.
12236
12237 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12238
12239 * parse.y (patch_assignment): Save the rhs before using it as an
12240 argument to _Jv_CheckArrayStore.
12241
12242 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12243
12244 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
12245
12246 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12247
12248 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
12249 floating point literal only when the exponent indicator has been
12250 parsed.
12251
12252 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12253
12254 * parse.y (formal_parameter:): Construct argument tree list
12255 element even if a yet unsupported final parameter was encountered.
12256
12257 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12258
12259 * parse.y (finish_method_declaration): Issue errors for native or
12260 abstract methods declared with a method body, as well as for non
12261 native or non abstract methods with no method body.
12262
12263 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12264
12265 * class.c (build_utf8_ref): Initialize variable `field'.
12266
12267 * decl.c (init_decl_processing): Initialize variable `field'.
12268
12269 * expr.c (build_known_method_ref): Mark parameters `method_type',
12270 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
12271 (process_jvm_instruction): Likewise for parameter `length'.
12272
12273 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
12274 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
12275 ATTRIBUTE_UNUSED.
12276
12277 * parse.y (maybe_generate_clinit): Remove unused variable
12278 `has_non_primitive_fields'.
12279 (find_in_imports_on_demand): Initialize variables `node_to_use'
12280 and `cl'.
12281 (patch_binop): Likewise for variable `prom_type'.
12282 (patch_unaryop): Likewise for variable `prom_type'.
12283
12284 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
12285
12286 * xref.c (xref_table): Add missing initializer.
12287
12288 1999-05-14 Tom Tromey <tromey@cygnus.com>
12289
12290 * java-except.h (struct eh_range): Removed unused `next' member.
12291 * verify.c (verify_jvm_instructions): Call check_nested_ranges
12292 after adding all exception handlers. Sort exception ranges in
12293 order of start PC.
12294 (struct pc_index): New structure.
12295 (start_pc_cmp): New function.
12296 * except.c (add_handler): Return `void'. Don't call link_handler;
12297 instead construct an ordinary linked list and do range
12298 coalescing.
12299 (check_nested_ranges): New function.
12300 (link_handler): Changed interface to allow merging of eh_ranges.
12301 Split overlapping ranges. Return `void'.
12302
12303 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12304
12305 * parse.y (constructor_block_end:): New rule, tagged <node>.
12306 (constructor_body:): Use `constructor_block_end' instead of
12307 `block_end'.
12308
12309 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12310
12311 * parse.y (statement_nsi:): Pop `for' statement block.
12312 (java_complete_lhs): Labeled blocks containing no statement are
12313 marked as completing normally.
12314
12315 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12316
12317 * xref.c (xref_set_current_fp): New function, defined.
12318 * xref.h (xref_set_current_fp): New function, prototyped.
12319
12320 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12321
12322 * check-init.c (check_init): Take into account that
12323 LABELED_BLOCK_STMT can be empty.
12324
12325 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12326
12327 * parse.y (java_check_regular_methods): Warning check on not
12328 overriding methods with default access in other packages does not
12329 apply to `<clinit>'.
12330 (java_complete_lhs): If block body is an empty_stmt_node, replace
12331 it by NULL_TREE. This prevents gcc from generating an irrelevant
12332 warning.
12333
12334 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12335
12336 * check-init.c (check_init): Removed code accepting to see things
12337 falling through default:, when doing xrefs.
12338 * java-tree.h (do_not_fold): New global variable, declared.
12339 * parse.y (do_not_fold): New global variable, defined.
12340 (java_complete_expand_method): Set `do_not_fold' to the value of
12341 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
12342 and reinstall them after them have been purged; do not check for
12343 initializations; do not issue missing return errors.
12344 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
12345 when doing xrefs.
12346 (patch_binop): Skip the fold part when doing xrefs.
12347 (build_string_concatenation): Skip the concatenation part when
12348 doing xrefs.
12349 (patch_synchronized_statement): Do not generate a try-finally when
12350 doing xrefs.
12351 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
12352 and keep the location where the throw was seen.
12353 * typeck.c (convert): When `do_not_fold' is set, do not attempt
12354 any treatment on the converted node an simply return a NOP_EXPR of
12355 the targeted type.
12356 * xref.c (xref_get_data): New function, defined.
12357 * xref.h (xref_get_data): New function, declared.
12358 (XREF_GET_DATA): Use xref_get_data.
12359
12360 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12361
12362 * gjavah.c (print_include): Cast the result of `strlen' to int
12363 when comparing against a signed value.
12364 (add_namelet): Likewise.
12365
12366 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12367
12368 * expr.c (expand_invoke): Mark parameter `nargs' with
12369 ATTRIBUTE_UNUSED.
12370 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
12371
12372 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
12373 ATTRIBUTE_UNUSED.
12374
12375 * jcf-reader.c (get_attribute): Cast a value to long
12376 when comparing against a signed expression. Likewise.
12377
12378 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
12379 HOST_BITS_PER_CHAR.
12380
12381 1999-05-11 Andrew Haley <aph@cygnus.com>
12382
12383 * parse.y (source_end_java_method): If the current method contains
12384 any exception handlers, force asynchronous_exceptions: this is
12385 necessary because signal handlers in libjava may throw exceptions.
12386 * decl.c (end_java_method): Ditto.
12387
12388 1999-05-11 Tom Tromey <tromey@cygnus.com>
12389
12390 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
12391 flags.
12392 * jvspec.c (THREAD_NAME): Removed.
12393 (GC_NAME): Likewise.
12394 (MATHLIB): Likewise.
12395 (WITHLIBC): Likewise.
12396 (GCLIB): Likewise.
12397 (THREADLIB): Likewise.
12398 (MATH_LIBRARY): Likewise.
12399 (lang_specific_driver): Don't add `-l' options to command line.
12400 Instead, add a single --specs option. Recognize `-L' options and
12401 use them to search for spec file.
12402 (find_spec_file): New function.
12403 (SPEC_FILE): New define.
12404
12405 1999-05-11 Dave Brolley <brolley@cygnus.com>
12406
12407 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
12408 cpplib-enabled build.
12409
12410 1999-05-05 Per Bothner <bothner@cygnus.com>
12411
12412 * class.c (make_field_value): DECL_INITIAL may be a string literal;
12413 temporarily zero it while calling rest_of_decl_compilation.
12414
12415 * java-tree.h (string_ptr_type_node): Add declaration.
12416 * decl.c: Define and initialize string_ptr_type_node.
12417 * parse.y (patch_string_cst): Use string_ptr_type_node.
12418
12419 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
12420 * parse.y (for_statement): Now unconditionally exit_block.
12421 (finish_labeled_statement): No longer exit_block if for-loop.
12422 (patch_loop_statement): Check harder if the loop is already labeled.
12423
12424 * parse.y (patch_initialized_static_field): Removed function.
12425 (maybe_generate_clinit): Removed special handling for interfaces.
12426 (java_complete_expand_methods): Do a preliminary java_complete_tree
12427 on <clinit> to determine if it can be removed.
12428 (java_complete_expand_method): Remove special handling for <clinit>.
12429 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
12430 optimize if we get back empty_stmt_node.
12431 For MODIFY_EXPR, re-do checking of static initializers.
12432 (fold_constant_for_init): Don't return immediate if VAR_DECL.
12433 For VAR_DECL, pass correct context.
12434
12435 * verify.c (verify_jvm_instructions): Better error messages.
12436
12437 1999-05-03 Tom Tromey <tromey@cygnus.com>
12438
12439 * parse-scan.y (interface_declaration): Call
12440 report_class_declaration for interfaces.
12441
12442 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
12443
12444 * Makefile.in: Remove -v from bison command lines.
12445
12446 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12447
12448 * check-init.c (check_init): Exclude a case of error when doing
12449 xrefs.
12450 * class.c (layout_class_method): Don't generate the error message
12451 twice when compiling from source.
12452 * lang-options.h: Added `-Wredundant-modifers' and
12453 `-Wunusupported-jdk11' flags and help text.
12454 * lang.c (lang_decode_option): Added support for
12455 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
12456 flag_static_local_jdk11 and flag_redundant set accordingly.
12457 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
12458 * parse.h (EXPR_WFL_ADD_COL): New macro.
12459 (DECL_END_SOURCE_LINE): Likewise.
12460 (DECL_INHERITED_SOURCE_LINE): Likewise.
12461 * parse.y (static_ref_err): New function, prototyped.
12462 (CCB_TK): Now tagged <operator>.
12463 (class_body:): Remember the location of the closing '}' of a class
12464 definition when doing xrefs.
12465 (block:): Likewise.
12466 (block_end:): Likewise.
12467 (create_class): Remember the location of the inherited class
12468 identifier when doing xrefs.
12469 (register_fields): Added test on first operand of `init' before
12470 testing it TREE_CODE.
12471 (method_header): Store the location of the class identifier in the
12472 class decl when doing xrefs.
12473 (finish_method_declaration): Don't combine first/last method line
12474 when doing xref.
12475 (java_check_regular_methods): Warning check on not overriding
12476 methods with default access on other packages move before check on
12477 static methods. Initialization of `aflags' also moved up.
12478 (resolve_expression_name): Call static_ref_err to report the error.
12479 (static_ref_err): New function, implemented.
12480 (resolve_field_access): Returned simplified static field access
12481 when doing xrefs.
12482 (resolve_qualified_expression_name): Check for illegal use of
12483 static fields in a non static context. Call static_ref_err to
12484 report error in various places.
12485 (java_complete_tree): Do not fold initialized static fields when
12486 doing xrefs.
12487 (java_complete_lhs): Likewise.
12488
12489 1999-04-29 Anthony Green <green@cygnus.com>
12490
12491 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
12492 create internal labels.
12493 (lookup_label): Ditto.
12494
12495 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12496
12497 * class.c (layout_class_method): Generate <clinit>'s rtl for
12498 interfaces.
12499 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12500 for interfaces' <clinit>.
12501 * expr.c (lookup_field): Search for fields in interfaces.
12502 (expand_invoke): Fixed indentation.
12503 (expand_java_field_op): Likewise. Use IS_CLINIT.
12504 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
12505 (IS_CLINIT): New macro.
12506 * parse.y (type_declaration:): Call maybe_generate_clinit after an
12507 interface was parsed.
12508 (maybe_generate_clinit): Don't generate if the current class is an
12509 interface with only fields of primitive types.
12510 (reset_method_name): Use IS_CLINIT.
12511 (java_complete_expand_method): Expand <clinit> when it exists for
12512 interfaces. Use IS_CLINIT.
12513 (resolve_expression_name): Use DECL_CONTEXT instead of
12514 current_class to build static field references.
12515 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
12516 ARRAY_REF when doing xreferencing.
12517 (check_final_assignment): Fixed typo in leading comment. Use
12518 IS_CLINIT.
12519 (patch_array_ref): Don't fully expand array references when
12520 xreferencing.
12521 (patch_return): Use IS_CLINIT.
12522 (patch_throw_statement): Likewise.
12523
12524 1999-04-22 Tom Tromey <tromey@cygnus.com>
12525
12526 * Make-lang.in (JAVA_SRCS): Added check-init.c.
12527
12528 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12529
12530 * decl.c (predef_filenames, predef_filenames_size): New globals
12531 (init_decl_processing): predef_filenames and predef_filenames_size
12532 initialized.
12533 * java-tree.h (predef_filenames, predef_filenames_size): Declared
12534 extern.
12535 * jcf-parse.c (predefined_filename_p): New function.
12536 (yyparse): Check that files on the command line are specified only
12537 once and issue a warning otherwise.
12538 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
12539 * parse.y (source_end_java_method): Nullify NOP method bodies, to
12540 avoid a gcc warning with -W -Wall turned on.
12541 (java_expand_classes): Abort if errors were encountered.
12542 (java_complete_lhs): If the cross reference flag is set, wrap
12543 field DECL node around a WFL when resolving expression name.
12544
12545 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12546
12547 * lang.c (lang_decode_option): Fixed returned value when parsing
12548 `-fxref=...' and `-Wall'.
12549 * parse.y (source_end_java_method): Do not generate code when
12550 flag_emit_xref is set.
12551 (resolve_expression_name): Do not build static field access when
12552 flag_emit_xref is set.
12553 (resolve_field_access): No special treatment on `length' when
12554 flag_emit_xref is set. Do not build qualified static field access
12555 when flag_emit_xref is set.
12556 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
12557 when flag_emit_xref is set.
12558 (patch_assignment): Do not generate array store runtime check when
12559 flag_emit_xref is set.
12560 * xref.c (xref_flag_value): Fixed function declaration
12561 indentation.
12562 (xset_set_data): New function.
12563 * xref.h (xref_set_data): Added prototype for new function.
12564 (typedef struct xref_flag_table): New field data.
12565 (XREF_GET_DATA): New macro.
12566
12567 1999-04-19 Tom Tromey <tromey@cygnus.com>
12568
12569 * xref.h (enum): Removed trailing comma.
12570
12571 * parse.y (resolve_qualified_expression_name): Added missing
12572 `break'.
12573
12574 1999-04-15 Anthony Green <green@cygnus.com>
12575
12576 * gjavah.c: New prototypes for java_float_finite and
12577 java_double_finite.
12578
12579 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12580
12581 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
12582 references.
12583
12584 1999-04-06 Jeffrey A Law (law@cygnus.com)
12585
12586 * Makefile.in (TREE_H): Add tree-check.h.
12587 (RTL_H): Add genrtl.h.
12588
12589 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12590
12591 * parse.y (patch_assignment): Added ArrayStoreException runtime
12592 check.
12593
12594 1999-04-06 Per Bothner <bothner@cygnus.com>
12595
12596 * expr.c (pop_type_0): New function.
12597 (pop_type): Use pop_type_0.
12598 * java-tree.h (pop_type_0): New declaration.
12599 * verify.c (verify_jvm_instructions): Check return instructions.
12600
12601 * parse.y (patch_binop): Don't fold if non-constant and emiting
12602 class files.
12603
12604 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12605
12606 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
12607
12608 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
12609 (main_jcf): Don't define.
12610 (process_file): Don't set `main_jcf'.
12611
12612 * java-tree.h (main_jcf): Don't declare.
12613
12614 * jcf-parse.c (main_jcf): Add static definition.
12615
12616 * lang.c (main_jcf): Don't define.
12617
12618 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12619
12620 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
12621
12622 * decl.c (copy_lang_decl): Likewise for `bcopy'.
12623
12624 * jcf-depend.c: Include "config.h", not <config.h>.
12625
12626 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
12627 `bcopy' to PTR.
12628
12629 * jcf-path.c: Include "config.h", not <config.h>.
12630
12631 * lex.c: Don't include various system header files.
12632 (java_init_lex): Cast the argument of `bzero' to PTR
12633
12634 * parse-scan.y (java_push_parser_context): Likewise.
12635
12636 * parse.y (java_push_parser_context): Likewise.
12637 (patch_bc_statement): Match format specifier to variable argument.
12638
12639 * xref.c: Don't include <stdio.h>.
12640
12641 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12642
12643 * parse.y (struct parser_ctxt *ctxp): Now global.
12644 (declare_local_variables): Use WFL compound value for the
12645 declaration source line value, when doing cross-referencing.
12646
12647 1999-03-31 Tom Tromey <tromey@cygnus.com>
12648
12649 * gjavah.c (print_field_info): Allow constants of other types.
12650 (print_include): Generate include when new name is proper prefix
12651 of already printed name.
12652 (add_namelet): Likewise.
12653 (cxx_keyword_subst): New function.
12654 (print_method_info): Use it.
12655 (print_field_name): New function.
12656 (get_field_name): New function.
12657 (print_field_info): Use get_field_name and print_field_name.
12658
12659 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12660
12661 * Makefile.in (keyword.h): Generate using gperf language 'C', not
12662 'KR-C', so gperf uses the `const' keyword on strings.
12663
12664 * keyword.gperf (java_keyword): Const-ify a char*.
12665
12666 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12667
12668 * parse.y (patch_bc_statement): Fixed identation and a bogus
12669 `printf' format.
12670
12671 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12672
12673 * parse.y (patch_assignment): Allow static variables in other
12674 classes to be assigned.
12675
12676 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12677
12678 * class.c (maybe_add_interface): Remove unused variable
12679 `interface_binfo'.
12680 (make_class_data): Use = for assignment, not ==. Likewise.
12681 (emit_register_classes): Remove unused variable `decl'.
12682
12683 * lex.c: Fix comment so as not to contain an embedded `/*'.
12684
12685 * verify.c (verify_jvm_instructions): Remove unused variable
12686 `self_type'.
12687
12688 1999-03-27 Per Bothner <bothner@cygnus.com>
12689
12690 * parse.y (complete_loop_body): Rename to finish_loop_body.
12691 (complete_labeled_statement): Rename to finish_labeled_statement.
12692 (complete_for_loop): Rename to finish_for_loop.
12693 (complete_method_declaration): Rename to finish_method_declaration.
12694
12695 * java-tree.h (continue_identifier_node): New global node.
12696 * decl.c: Define and initialize continue_identifier_node.
12697 * parse.y (generate_labeled_block): Remove - no longer needed.
12698 (build_loop_body): Use continue_identifier_node for continue block.
12699 (finish_labeled_statement): Also do pop_labeled_block actions.
12700 (java_complete_lhs): POP_LOOP even if error.
12701 (build_labeled_block): Special handling for continue_identifier_node.
12702 (patch_loop_statement): Re-organize.
12703 (patch_bc_statement): Re-write.
12704
12705 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12706
12707 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
12708 using a WFL compound value.
12709 * parse.y (xref.h): Include.
12710 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
12711 WFL compound value.
12712 (register_fields): Set WFL compound value to lineno if doing
12713 xrefs.
12714 (java_complete_expand_method): Call expand_xref if flag_emit_xref
12715 is set.
12716 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
12717 * xref.h (expand_xref): Prototype renamed from xref_generate.
12718
12719 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12720
12721 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
12722 (GET_CURRENT_BLOCK): New macro.
12723 * parse.y (current_static_block): New global variable.
12724 (method_body:): Define action.
12725 (complete_method_declaration): Set current_function_decl to NULL
12726 when work on the current method is done.
12727 (declare_local_variables): Use GET_CURRENT_BLOCK.
12728 (java_method_add_stmt): Likewise.
12729 (java_complete_expand_method): Disable the use of `this' when
12730 expanding <clinit>.
12731 (enter_a_block): If no current method exist, use
12732 current_static_block to link static initializer blocks.
12733 (exit_block): Rewritten to use current_static_block when no current
12734 method decl exists.
12735 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
12736 (patch_return): Forbid the use of `return' in static initializers.
12737 (patch_throw_statement): Fixed indentation. Issue specific error
12738 for uncaught thrown checked exception in static initializer
12739 blocks. Removed FIXME.
12740
12741 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
12742
12743 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
12744 Link gcj from gcc.o.
12745
12746 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12747
12748 * parse.y (find_applicable_accessible_methods_list): When dealing
12749 with interface: ensure that a given interface or java.lang.Object
12750 are searched only once.
12751
12752 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12753
12754 * gjavah.c (print_c_decl): Remove unused argument `flags'.
12755
12756 * jcf-dump.c (print_access_flags): Add braces around if-else.
12757
12758 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
12759 COMBINE_INPUTS.
12760
12761 * lex.c (build_wfl_node): Add static prototype.
12762
12763 * lex.h (build_wfl_node): Remove static prototype.
12764
12765 * parse.y: Include lex.c early enough to declare everything needed.
12766 Ensure calls to `build_wfl_node' pass the proper arguments.
12767 (create_class): Remove unused variable `super_decl'.
12768 (get_printable_method_name): Initialize variable `name'.
12769
12770 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12771
12772 * Changelog: Fixed 1999-03-22 typos.
12773 * lang.c (lang_decode_option): Fixed typo in error string in the
12774 XARG section.
12775
12776 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12777
12778 * Makefile.in (JAVA_OBJS): Added entry xref.o.
12779 (xref.o): New rule.
12780 * java-tree.h (flag_emit_xref): Declared extern.
12781 * lang.c (xref.h): Included.
12782 (flag_emit_xref): New global variable.
12783 (lang_decode_option): Added support for -fxref.
12784 * xref.c: Created.
12785 * xref.h: Likewise.
12786
12787 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
12788
12789 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
12790 linked with.
12791
12792 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12793
12794 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
12795 $(srcdir)/../system.h and $(JAVA_TREE_H).
12796 (jcf-io.o): Depend on $(JAVA_TREE_H).
12797 (mangle.o): Likewise.
12798
12799 * check-init.c (check_cond_init): Add static prototype.
12800
12801 * class.c (build_java_method_type, hashUtf8String,
12802 make_field_value, get_dispatch_vector, get_dispatch_table,
12803 append_gpp_mangled_type, mangle_static_field): Likewise.
12804 (strLengthUtf8): Hide unused definition.
12805 (hashUtf8String): Const-ify.
12806 (make_field_value): Un-ANSI-fy.
12807
12808 * constants.c: Move inclusion of jcf.h above java-tree.h.
12809 (set_constant_entry, find_class_or_string_constant,
12810 find_name_and_type_constant, get_tag_node,
12811 build_constant_data_ref): Add static prototype.
12812
12813 * decl.c (push_jvm_slot, builtin_function,
12814 lookup_name_current_level): Likewise.
12815 (builtin_function): Const-ify.
12816
12817 * except.c (expand_start_java_handler, expand_end_java_handler):
12818 Add static prototype.
12819
12820 * expr.c (flush_quick_stack, push_value, pop_value,
12821 java_stack_swap, java_stack_dup, build_java_athrow,
12822 build_java_jsr, build_java_ret, expand_java_multianewarray,
12823 expand_java_arraystore, expand_java_arrayload,
12824 expand_java_array_length, build_java_monitor, expand_java_pushc,
12825 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
12826 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
12827 expand_compare, expand_test, expand_cond, expand_java_goto,
12828 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
12829 expand_java_field_op, java_push_constant_from_pool): Likewise.
12830
12831 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
12832 (build_java_arraynull_check): Mark parameters `node' and `type'
12833 with ATTRIBUTE_UNUSED.
12834 (note_label): Likewise for parameter `current_pc'.
12835 (expand_java_call, expand_java_ret): Hide unused definition.
12836
12837 * java-tree.h (make_class, build_constants_constructor,
12838 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
12839 init_outgoing_cpool, register_class, emit_register_classes,
12840 java_layout_seen_class_methods): Prototype.
12841 (unicode_mangling_length): Const-ify.
12842 (append_gpp_mangled_name, append_gpp_mangled_classtype,
12843 emit_unicode_mangled_name, format_int, format_uint,
12844 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
12845 jcf_print_utf8_replace, open_class): Prototype.
12846
12847 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
12848 <stdio.h>. Include tree.h/java-tree.h.
12849 (utf8_equal_string usage, process_class): Add static prototype.
12850 (open_class): Don't prototype this here.
12851 (utf8_equal_string): Match arguments to format specifiers.
12852 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
12853 TABLE_SWITCH, disassemble_method): Likewise.
12854
12855 * jcf-io.c: Include tree.h/java-tree.h.
12856 (open_class, find_classfile, jcf_print_utf8,
12857 jcf_print_utf8_replace): Const-ify.
12858
12859 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
12860 parse_class_file): Add static prototype.
12861 (find_in_current_zip): Match definition to existing static
12862 prototype.
12863
12864 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
12865 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
12866 finish_jcf_block, define_jcf_label, get_jcf_label_here,
12867 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
12868 write_chunks, adjust_typed_op, generate_bytecode_conditional,
12869 generate_bytecode_return, perform_relocations, init_jcf_state,
12870 init_jcf_method, release_jcf_state, generate_classfile):
12871 Add static prototype.
12872 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
12873 (make_class_file_name): Const-ify.
12874
12875 * jcf.h (find_classfile): Const-ify.
12876
12877 * jv-scan.c (reset_report): Remove prototype.
12878
12879 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
12880 (error): Rewrite to allow varargs.
12881
12882 * lang.c (lang_f_options): Const-ify.
12883
12884 * lex.c (java_parse_escape_sequence): Add static prototype.
12885 (java_allocate_new_line): Match definition to existing static
12886 prototype.
12887
12888 * mangle.c Include tree.h/java-tree.h.
12889 (unicode_mangling_length, emit_unicode_mangled_name,
12890 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
12891
12892 * parse.h (jdep_code): Remove trailing comma in enumeration.
12893 (java_get_line_col): Move prototype outside of !JC1_LITE test.
12894 (reset_report): Add prototype.
12895
12896 * verify.c (push_pending_label, merge_types): Add static
12897 prototypes.
12898
12899 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
12900
12901 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12902
12903 * parse.y (find_applicable_accessible_methods_list): Extend the
12904 search to superinterfaces when relevant.
12905 (search_applicable_methods_list): New function.
12906
12907 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12908
12909 * class.c (unmangle_classname): Implemented stricter testing
12910 before setting the QUALIFIED_P flag on an identifier.
12911
12912 1999-03-16 Per Bothner <bothner@cygnus.com>
12913
12914 * parse.y (java_complete_lhs): Call force_evaluation_order
12915 after patch_newarray.
12916 (patch_binop): Don't call fold if there are side effects.
12917
12918 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
12919
12920 * parse.y (java_stabilize_reference): Use save_expr instead of
12921 building a SAVE_EXPR node.
12922 (java_complete_lhs): Patch the resulting string of the `+='
12923 operator (if necessary) and complete the RHS after having built
12924 the cast.
12925
12926 1999-03-15 Per Bothner <bothner@cygnus.com>
12927
12928 * class.c (make_class): Don't set CLASS_P here (because
12929 this function is also called by build_java_array_type).
12930 (push_class): Set CLASS_P here instead.
12931 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
12932
12933 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
12934 context. If the context is class, perfer "super" over "synchronized".
12935 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
12936
12937 * parse.y (create_class): Don't call parser_check_super here;
12938 it is not robust. Always wait until later.
12939
12940 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
12941 match what JDK 1.2 does), but don't set ACC_PUBLIC.
12942
12943 1999-03-13 Per Bothner <bothner@cygnus.com>
12944
12945 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
12946 * lex.h (UNGETC): Change misleading macro.
12947
12948 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12949
12950 * parse.y (java_stabilize_reference): Return NODE when patching a
12951 COMPOUND_EXPR.
12952 (java_complete_lhs): Put parenthesis around truth values.
12953
12954 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12955
12956 * class.c (layout_class_method): Don't make rtl for interface
12957 methods.
12958 * parse.h (GET_TYPE_NAME): New macro.
12959 * parse.y (if_then_statement:): Fixed indentation.
12960 (if_then_else_statement:): Likewise.
12961 (for_statement:): Fixed spacing.
12962 (try_statement:): Fixed indentation.
12963 (create_interface): Don't force interfaces to be abstract.
12964 (method_header): Abstract methods are OK in interfaces.
12965 (declare_local_variables): Fixed typo in comment.
12966 (java_complete_expand_method): Fixed indentation.
12967 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
12968 non accessible fields.
12969 (java_stabilize_reference): New function.
12970 (java_complete_lhs): Fixed indentation. Use
12971 java_stabilize_reference in compound assignment. Insert the
12972 cast. If not processing `+' fix string constants before processing
12973 binop.
12974
12975 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12976
12977 * constants.c (find_class_or_string_constant): Cast variable `j'
12978 to a `jword' when comparing against one.
12979
12980 * expr.c (java_lang_expand_expr): Remove unused variables
12981 `has_finally_p' and `op0'.
12982
12983 * gjavah.c (print_field_info): Cast a value to jint when comparing
12984 against one. Likewise for a jlong.
12985 (add_namelet): Likewise cast a `sizeof' to an int when comparing
12986 against a signed quantity.
12987
12988 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
12989 (print_signature): Don't needlessly dereference variable `str'
12990
12991 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
12992 `max_locals' with ATTRIBUTE_UNUSED.
12993 (jcf_parse_class): Likewise for variable `index'.
12994
12995 * parse.h (reverse_jdep_list): Remove static prototype.
12996
12997 * parse.y (build_jump_to_finally): Remove prototype and definition.
12998 (reverse_jdep_list): Add static prototype.
12999
13000 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
13001 `assignment' and `expr_decl'.
13002
13003 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
13004
13005 1999-03-12 Andrew Haley <aph@cygnus.com>
13006
13007 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
13008 we'll need a directory separator and a null character.
13009
13010 1999-03-10 Per Bothner <bothner@cygnus.com>
13011
13012 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
13013
13014 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
13015
13016 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
13017 interfaces.
13018
13019 1999-03-05 Per Bothner <bothner@cygnus.com>
13020
13021 * lex.c (java_parse_end_comment): Take extra parameter (next char).
13022
13023 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
13024
13025 * class.c (layout_class_method): A static method in a base class
13026 is never overridden, so treat it like it doesn't exist.
13027 However, do complain about private non-static method overriding
13028 public static method.
13029
13030 * parse.y: Don't set unused INITIALIZED_P flag.
13031 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
13032
13033 * parse.y (find_expr_with_wfl): Optimize tail-calls.
13034 (build_array_from_name): Re-order &index[string] to &string[index].
13035
13036 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
13037 error_mark (it might catch more errors, but it is more likely to lose).
13038
13039 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13040
13041 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
13042 (parse-scan.o): Depend on toplev.h.
13043
13044 * class.c (make_method_value): Add prototype. Make it static.
13045 Remove unused second argument, caller changed.
13046
13047 * expr.c (java_lang_expand_expr): Remove unused variable
13048 `return_label'.
13049
13050 * java-tree.h: Don't prototype find_in_current_zip.
13051 Add prototypes for verify_constant_pool, start_java_method,
13052 end_java_method, give_name_to_locals, expand_byte_code,
13053 open_in_zip, set_constant_value, find_constant1, find_constant2,
13054 find_utf8_constant, find_string_constant, find_class_constant,
13055 find_fieldref_index, find_methodref_index, write_constant_pool,
13056 count_constant_pool_bytes and encode_newarray_type.
13057
13058 * jcf-dump.c: Remove unused variable `LONG_temp'.
13059
13060 * jcf-parse.c: Include parse.h.
13061 (jcf_parse_source): Remove unused parameter, all callers changed.
13062 (jcf_figure_file_type): Add static prototype.
13063 (find_in_current_zip): Likewise. Also remove unused parameter,
13064 all callers changed.
13065 (read_class): Initialize variable `saved_pos'.
13066
13067 * jcf-reader.c (jcf_parse_preamble): Mark variables
13068 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
13069
13070 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
13071 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
13072 (java_parse_doc_section): Initialize variable `seen_star'.
13073 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
13074 (java_lex_error): Mark parameters `msg' and `forward' with
13075 ATTRIBUTE_UNUSED.
13076 (java_get_line_col): Mark parameters `filename' and `line' with
13077 ATTRIBUTE_UNUSED.
13078
13079 * parse-scan.y: Include toplev.h.
13080 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
13081
13082 * parse.h: use `struct JCF', not plain `JCF'.
13083 (java_parser_context_save_global, java_expand_classes
13084 java_parser_context_restore_global, java_parse): Add prototypes.
13085
13086 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
13087 `node'.
13088
13089 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
13090
13091 * check-init.c (check_init): COPYN takes word count, not bit count.
13092
13093 1999-02-26 Per Bothner <bothner@cygnus.com>
13094
13095 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
13096 explicit build_decl. (Avoids crash in reload when optimizing.)
13097
13098 1999-02-25 Per Bothner <bothner@cygnus.com>
13099
13100 * decl.c (complete_start_java_method): Handle synchronized method
13101 even when compiling from bytecode.
13102
13103 1999-02-26 Tom Tromey <tromey@cygnus.com>
13104
13105 * gjavah.c (add_class_decl): Only generate `#include' if outer
13106 class is not the name of the class we are processing. Correctly
13107 append `.h' in #include.
13108 (process_file): Clean up newlines around generated `#include's.
13109 (decode_signature_piece): Correctly handle inner classes.
13110 (struct include): New structure.
13111 (all_includes): New global.
13112 (print_include): New function.
13113 (add_class_decl): Use it.
13114 (process_file): Likewise.
13115 (add_class_decl): Generate include for java-array.h if array
13116 seen.
13117 (process_file): Don't generate java-array.h include.
13118
13119 * gjavah.c (add_namelet): Check for standard package names here.
13120 (add_class_decl): Don't check for standard package names here.
13121
13122 1999-02-25 Tom Tromey <tromey@cygnus.com>
13123
13124 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
13125 When reading a zip file, only use strncmp if both strings are
13126 bigger than the buffer length. Initialize `k' when looping
13127 through zip file.
13128
13129 1999-02-24 Tom Tromey <tromey@cygnus.com>
13130
13131 * gjavah.c (struct namelet): New structure.
13132 (add_namelet): New function.
13133 (print_namelet): New function.
13134 (print_class_decls): Use add_namelet and print_namelet to generate
13135 namespaces and not classes.
13136 (method_printed): New global.
13137 (HANDLE_END_METHOD): Examine method_printed.
13138 (print_method_info): Set method_printed when required. Print
13139 error if function to be ignored is marked virtual. Handle $finit$
13140 method.
13141 (METHOD_IS_FINAL): New macro.
13142 (print_field_info): Use it.
13143 (HANDLE_METHOD): Clear method_printed.
13144 (method_pass): New global.
13145 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
13146 (process_file): Do two passes over both fields and methods.
13147 (HANDLE_METHOD): Examine method_pass.
13148 (root): New global.
13149 (add_class_decl): New function.
13150 (print_class_decls): Don't scan over entire constant pool.
13151
13152 1999-02-23 Tom Tromey <tromey@cygnus.com>
13153
13154 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
13155 disable linking in that case.
13156
13157 1999-02-20 Tom Tromey <tromey@cygnus.com>
13158
13159 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
13160 not 0x1f.
13161
13162 1999-02-21 Per Bothner <bothner@cygnus.com>
13163
13164 * decl.c (build_result_decl), java-tree.h: New method.
13165 (complete_start_java_method): Handle synchronized methods.
13166 Don't build DECL_RESULT here. (Ordering dependency problem.)
13167 (start_java_method): Call build_result_decl here instead ...
13168 * parse.y (java_complete_expand_method): ... and here.
13169 (expand_start_java_method): Don't call complete_start_java_method here.
13170 (java_complete_expand_method): Call it here instead.
13171 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
13172 * java-tree.h: ... here.
13173
13174 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
13175 * parse.y (java_complete_lhs): Don't call force_evaluation_order
13176 for ARRAY_REF - it doesn't work when array bounds are checked.
13177 (patch_array_ref): Handle it here instead.
13178
13179 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
13180
13181 1999-02-19 Per Bothner <bothner@cygnus.com>
13182
13183 Force left-to-right evaluation of binary operations etc.
13184 * expr.c (force_evaluation_order), java-tree.h: New function.
13185 * parse.y (java_complete_lhs): Pass binary operations, procedure
13186 calls, and ARRAY_REFs to force_evaluation_order.
13187 (various): Set TREE_SIDE_EFFECTS more carefully.
13188
13189 Tolerate random (non-UTF8) encoding in comments without complaining.
13190 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
13191 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
13192
13193 * parse.y (resolve_qualified_expression_name): Handle error_mark.
13194 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
13195
13196 * parse.y (java_complete_lhs): Ignore an empty statement in a
13197 COMPOUND_EXPR. Don't complain about empty statement after return.
13198
13199 1999-02-19 Per Bothner <bothner@cygnus.com>
13200
13201 * parse.y (obtain_incomplete_type): Don't wrap unknown types
13202 in TREE_LIST - just chain the POINTER_TYPEs together.
13203 (resolve_class): If type already resolved, return decl.
13204 After resolving, update TREE_TYPE(class_type), and name (if array).
13205 * parse.h (do_resolve_class), parse.y: Make non-static.
13206 * class.c (maybe_layout_super_class): Take this_class argument.
13207 Do do_resolve_class if necessary.
13208 (layout_class, layout_class_methods): Adjust calls appropriately.
13209 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13210 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
13211 * typeck.c (build_java_array_type): Don't call layout_class.
13212
13213 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13214
13215 * parse.y (check_pkg_class_access): Allow private class access
13216 within the same package.
13217 (strip_out_static_field_access_decl): New function.
13218 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
13219 operator argument before testing its nature.
13220
13221 1999-02-03 Per Bothner <bothner@cygnus.com>
13222
13223 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
13224 (TRY_EXPR): Simplify - it no longer has a finally clause.
13225 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
13226 Simpler handling of TRY_EXPR, which no longer has a finally clause.
13227 * expr.c (java_lang_expand_expr): Likewise.
13228 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
13229 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
13230 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
13231 (build_try_statement): Remove finally parameter and handling.
13232 (build_try_finally_statement): New function.
13233 (patch_try_statement): No longer need to support finally clause.
13234 (try_statement): Update grammar action rules.
13235 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
13236 Simpler handling of TRY_EXPR, which no longer has a finally clause.
13237
13238 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
13239
13240 * jcf-parse.c (get_constant): Add braces around computation of 'd'
13241 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
13242
13243 1999-02-17 Andrew Haley <aph@cygnus.com>
13244
13245 * class.c (build_utf8_ref): Back out broken patch which was
13246 intended to to output signatures using '.' as a separator.
13247
13248 * class.c (make_class_data): Output signatures using '.' as a
13249 separator, rather than '/'.
13250 (mangled_classname): Likewise.
13251 (make_field_value): Likewise.
13252 (make_method_value): Likewise.
13253 * constants.c (alloc_class_constant): Likewise.
13254 * expr.c (build_invokeinterface): Likewise.
13255
13256 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13257
13258 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
13259 of an ancient workaround.
13260
13261 1999-02-10 Jeffrey A Law (law@cygnus.com)
13262
13263 * jvspec.c (xmalloc): Kill the prototype. It does not belong
13264 here anymore.
13265
13266 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13267
13268 * lex.c (yylex): Encode \0 as UTF8.
13269
13270 1999-02-10 Tom Tromey <tromey@cygnus.com>
13271
13272 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
13273 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
13274 (libgcj_zip): Renamed.
13275 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
13276 LIBJAVA_ZIP_FILE.
13277 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
13278
13279 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
13280 (GC_NAME): Renamed -lgc to -lgcjgc.
13281
13282 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13283
13284 * lex.c (java_lang_cloneable): Initialize.
13285 * parse.y (java_lang_cloneable): New static variable.
13286 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
13287 doing one more qualification round.
13288 (valid_ref_assignconv_cast_p): Reject null source or
13289 destination. Allow an array to be cast into java.lang.Cloneable.
13290 (patch_cast): Swapped two first arguments to first call to
13291 valid_ref_assignconv_cast_p.
13292
13293 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13294
13295 * parse.h: DECL_P renamed JDECL_P.
13296 * parse.y: DECL_P replaced by JDECL_P.
13297 (build_array_from_name): Always use pointer's type.
13298 (patch_bc_statement): Extra code to search continue target in a
13299 for loop. Fixed comments. Continue target is current loop when
13300 unlabeled.
13301
13302 1999-02-05 Andrew Haley <aph@cygnus.com>
13303
13304 * class.c (make_class_data): The superclass of an interface should
13305 be null, not class Object.
13306
13307 * lex.c (java_lex): Sign extend hex literals.
13308
13309 1999-02-04 Andrew Haley <aph@cygnus.com>
13310
13311 * class.c (build_utf8_ref): Output signatures using '.' as a
13312 separator, rather than '/'.
13313 (make_class_data): Likewise.
13314
13315 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
13316
13317 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
13318 mkstemp.o. Get them from libiberty now.
13319
13320 1999-02-02 Jeffrey A Law (law@cygnus.com)
13321
13322 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
13323
13324 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13325
13326 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
13327 from libiberty.h
13328
13329 1999-02-02 Per Bothner <bothner@cygnus.com>
13330
13331 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
13332 * jcf-write.c (generate_bytecode_return): New function.
13333 (generate_bytecode_insns): Use it, for RETURN_EXPR.
13334
13335 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
13336 generate special [fd]const_[01] instructions.
13337
13338 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
13339
13340 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
13341 handling OPCODE_lookupswitch or OPCODE_tableswitch.
13342
13343 1999-02-01 Per Bothner <bothner@cygnus.com>
13344
13345 * parse.y (patch_method_invocation): Handle calling static methods,
13346 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
13347
13348 * parse.y (java_complete_lhs): Don't complain about unreachable
13349 exit condition in a do-while statement.
13350
13351 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13352
13353 * lex.c (java_read_char): Fixed utf8 decoding.
13354 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
13355 range.
13356 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
13357 comments. Local variable `all_primitive' is gone. Broadened
13358 acceptance of `0' to floating point targets. `long' can now be
13359 widened to `double' or `float'.
13360 (valid_method_invocation_conversion_p): Added leading
13361 comment. Fixed tabulation.
13362 (build_string_concatenation): Optimize out left or right empty
13363 string constants.
13364
13365 1999-01-28 Per Bothner <bothner@cygnus.com>
13366
13367 * jcf-write.c (localvar_alloc): Only emit entry for
13368 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
13369 (generate_bytecode_insns): Only call put_linenumber if
13370 debug_info_level > DINFO_LEVEL_NONE.
13371 * jvspec.c (lang_specific_driver): If no -O* or -g* option
13372 is specified, add -g1 (for compatibility wih javac).
13373
13374 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
13375
13376 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
13377 gjavah.o, check-init.o, jv-scan.o
13378
13379 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13380
13381 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
13382
13383 * gjavah.c: Include config.h and system.h.
13384
13385 * javaop.h (inline): Don't define, its handled by system.h.
13386 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
13387 from `inline' to `static inline'.
13388
13389 * jcf.h (inline): Don't define, its handled by system.h.
13390
13391 * lex.c (inline): Likewise.
13392
13393 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
13394
13395 * lang-specs.h: Map -Qn to -fno-ident.
13396
13397 1999-01-29 Richard Henderson <rth@cygnus.com>
13398
13399 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
13400
13401 1999-01-29 Tom Tromey <tromey@cygnus.com>
13402
13403 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
13404 then cast it to Object before calling `append' method.
13405
13406 1999-01-28 Per Bothner <bothner@cygnus.com>
13407
13408 * check-init.c (check_bool2_init, check_bool_init, check_init):
13409 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
13410 * jcf-write.c (generate_bytecode_insns): Likewise.
13411
13412 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13413
13414 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
13415 * parse.y (patch_cast): Allow a boolean to be cast into a
13416 boolean.
13417
13418 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13419
13420 * parse.y: (class_declaration:): Fixed indentation.
13421 (class_member_declaration:): Extra `;' after field declaration now
13422 accepted.
13423 (interface_declaration:): Removed debug messages in error reports.
13424 (patch_binop): Nodes created and returned inherit the orignal
13425 node's COMPOUND_ASSIGN_P flag value.
13426 (patch_cast): Fix cast from char to floating point.
13427
13428 1999-01-25 Andrew Haley <aph@cygnus.com>
13429
13430 * except.c, java-except.h (expand_resume_after_catch): new
13431 function.
13432 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
13433 to branch back to main flow of control after a catch block.
13434
13435 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13436
13437 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
13438 $(srcdir)/../system.h.
13439 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
13440 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
13441 (jcf-write.o): Likewise.
13442 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13443 (mangle.o): Depend on $(srcdir)/../toplev.h.
13444 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13445 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13446
13447 * class.c: Include output.h and parse.h.
13448 (mangled_classname): Add the `const' keyword to a char*.
13449 (find_named_method): Hide unused function definition.
13450 (build_utf8_ref): Change type of variable `c' to unsigned char.
13451 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
13452 (build_class_ref): Add the `const' keyword to a char*.
13453 (layout_class_method): Remove unused variable `buf'.
13454
13455 * decl.c (find_local_variable): Remove unused variable `rtl'.
13456 (pushdecl): Likewise for variables `different_binding_level' and
13457 `oldglobal'.
13458 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
13459 (maybe_build_cleanup): Likewise for parameter `decl'.
13460
13461 * except.c (expand_start_java_handler): Mark parameter `range'
13462 with ATTRIBUTE_UNUSED.
13463
13464 * expr.c: Include except.h.
13465 (pop_type): Remove unused variable `i'.
13466 (pop_value): Likewise for variables `n_words' and `i'.
13467 (expand_java_arrayload): Likewise for variable `convert'.
13468 (java_lang_expand_expr): Likewise for variables `op0', `type',
13469 `mode', `unsignedp', `node' and `elements'.
13470 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
13471 `eh_ranges'.
13472 (process_jvm_instruction): Add a `const' qualifier to a char*.
13473
13474 * gjavah.c (output_directory): Add the `const' keyword to a char*.
13475 (temp_directory): Likewise.
13476 (print_c_decl): Likewise.
13477 (print_method_info): Likewise.
13478 (decode_signature_piece): Likewise.
13479 (print_mangled_classname): Likewise.
13480
13481 * java-except.h: Provide prototypes for maybe_start_try,
13482 maybe_end_try and add_handler.
13483
13484 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
13485 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
13486 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
13487 init_expr_processing, push_super_field, init_class_processing,
13488 can_widen_reference_to, class_depth, verify_jvm_instructions,
13489 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
13490 set_local_type, merge_type_state, push_type, load_type_state,
13491 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
13492 emit_unicode_mangled_name): Add prototypes.
13493
13494 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
13495 (print_signature_type): Use ISDIGIT, not isdigit.
13496 (print_signature): Remove unused variable `j'.
13497
13498 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
13499 int when comparing against one.
13500
13501 * jcf-parse.c: Include toplev.h.
13502
13503 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
13504 (localvar_free): Remove unused variable `i'.
13505 (generate_bytecode_conditional): Likewise for variable `kind'.
13506
13507 * jv-scan.c: Include config.h and system.h. Remove redundant
13508 OS header and gansidecl.h includes.
13509 (warning): Add the `const' keyword to a char*. Also add
13510 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
13511 __STDC__, when determining whether to use ANSI-isms.
13512 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
13513 (xmalloc): Don't redundantly prototype here.
13514 (main): Remove unused parameter `envp'. Also fix the arguments
13515 passed to function `fatal' to match the format specifier.
13516
13517 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
13518
13519 * mangle.c: Include toplev.h.
13520 (emit_unicode_mangled_name): Declare parameter `len'.
13521
13522 * parse.y (parse_warning_context): Add the `const' keyword to a
13523 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
13524 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
13525 (issue_warning_error_from_context): Add the `const' keyword to
13526 a char*.
13527 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
13528 not `__STDC__' for whether to use ANSI-isms.
13529
13530 * typeck.c (incomplete_type_error): Mark parameters `value' and
13531 `type' with ATTRIBUTE_UNUSED.
13532 (parse_signature_type): Use ISDIGIT, not isdigit.
13533
13534 * verify.c (check_pending_block): Add the `const' keyword to a char*.
13535 (verify_jvm_instructions): Likewise. Remove unused variables
13536 `field_name' and `default_val'.
13537
13538 * zextract.c: Include config.h and system.h. Remove redundant
13539 OS header includes.
13540
13541 * zipfile.h: Prototype `read_zip_archive'.
13542
13543 1999-01-21 Andrew Haley <aph@cygnus.com>
13544
13545 * typeck.c (convert): Allow conversions to void type: some
13546 optimizations in gcc do this.
13547
13548 1999-01-21 Andrew Haley <aph@cygnus.com>
13549
13550 * typeck.c (convert_ieee_real_to_integer): New function.
13551 (convert): When not using fast-math and using hardware fp, convert
13552 an IEEE NaN to zero.
13553
13554 1999-01-18 Andrew Haley <aph@cygnus.com>
13555
13556 * parse.y (patch_binop): Do a type conversion from signed to
13557 unsigned and then back to signed when a ">>>" is found.
13558
13559 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13560
13561 * java-tree.h: (check_for_initialization): Added prototype.
13562 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
13563 * parse.y (do_resolve_class): Removed unused locals.
13564 (read_import_dir): Likewise.
13565 (resolve_qualified_expression_name): Array creation
13566 expressions are valid primary expressions.
13567 (qualify_ambiguous_name): Likewise.
13568 (patch_synchronized_statement): Removed unused local.
13569
13570 1999-01-17 Jeffrey A Law (law@cygnus.com)
13571
13572 * Makefile.in (zextract.o): Add dependencies.
13573
13574 * Makefile.in: Do not put ^Ls at the start of a line.
13575
13576 1999-01-15 Per Bothner <bothner@cygnus.com>
13577
13578 * expr.c (process_jvm_instruction): Coerce to correct Throwable
13579 sub-type the result of the call that gets the exception value.
13580
13581 * parse.y (java_complete_expand_methods): If flags_syntax_only,
13582 don't call finish_class.
13583
13584 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
13585 clear found before continuing.
13586
13587 * verify.c (verify_jvm_instructions): On an array load, allow
13588 and handle top of stack to be TYPE_NULL.
13589
13590 * gjavah.c (generate_access): Translate Java package private or
13591 protected access to C++ public, but with a comment.
13592
13593 1999-01-13 Andrew Haley <aph@cygnus.com>
13594
13595 * expr.c (generate_name): Name prefix changed to avoid clashes
13596 with assembler temp labels.
13597
13598 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
13599 MODIFY_EXPR. Without this, code for the assignment may not be
13600 generated at all and the synchronized statement will read an
13601 uninitialized variable.
13602
13603 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13604
13605 * class.c (maybe_layout_super_class): Fixed returned value.
13606 * lex.c: Added 1999 to the copyright.
13607 (java_init_lex): Initialize java_lang_imported.
13608 * lex.h: Added 1999 to the copyright.
13609 * parse.h: Added 1999 to the copyright.
13610 (REGISTER_IMPORT): Fixed typo in trailing macro.
13611 (CURRENT_OSB): New macro.
13612 (struct parser_ctxt): New fields osb_depth, osb_limit.
13613 * parse.y (java_lang_id): New global variable.
13614 (type_import_on_demand_declaration): Don't import java.lang.* twice.
13615 (array_creation_expression:): Use CURRENT_OSB.
13616 (dims:): Uses a stack to keep track of array dimensions.
13617 (cast_expression:): Use CURRENT_OSB.
13618 (find_expr_with_wfl): Return NULL if node found doesn't meet the
13619 conditions.
13620 (register_fields): Fixed typos in comment.
13621 (check_method_redefinition): Fixed comment indentation.
13622 (java_check_regular_methods): Set saved found wfl to NULL after
13623 having reinstalled it in the previously found DECL_NAME.
13624
13625 1999-01-10 Richard Henderson <rth@cygnus.com>
13626
13627 * gjavah.c (java_float_finite): Use a union to do type punning.
13628 (java_double_finite): Likewise.
13629
13630 1999-01-09 Per Bothner <bothner@cygnus.com>
13631
13632 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
13633 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
13634 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
13635 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
13636 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
13637 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
13638
13639 1999-01-08 Per Bothner <bothner@cygnus.com>
13640
13641 * check-init.c (check_init): If compiling to native, we don't
13642 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
13643
13644 1999-01-08 Tom Tromey <tromey@cygnus.com>
13645
13646 * parse-scan.y (variable_declarator_id): Set or increment
13647 bracket_count.
13648 (bracket_count): New global.
13649 (formal_parameter): Handle case where bracket pairs trail variable
13650 declarator id.
13651
13652 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
13653
13654 * jcf-parse.c (yyparse): variable len changed from a char to an
13655 int to prevent overflow.
13656
13657 1999-01-06 Per Bothner <bothner@cygnus.com>
13658
13659 * java-tree.h: Declare read_class.
13660 * jcf-parse.c (read_class): New function.
13661 (load_class): Now just call read_class.
13662
13663 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
13664 * jcf-parse.c (parse_source_file): Declare save_error_count,
13665 which is needed by java_parse_abort_on_error macro,
13666 * parse.y (java_layout_classes, java_expand_classes): Likewise.
13667
13668 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
13669 constructor, if initializing a static field.
13670 (patch_new_array_init): Set TREE_CONSTANT if it is.
13671 * expr.c (java_lang_expand_expr): For a static array constructor
13672 of primitive elements, allocate the array itself statically.
13673 Disabled until we can set the vtable field statically.
13674
13675 * check-init.c: New file. Checks for definite assignment.
13676 * Makefile.in (JAVA_OBJS): Add check-init.o.
13677 * parse.y (java_complete_expand_method): Call check_for_initialization.
13678 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
13679
13680 1999-01-06 Graham <grahams@rcp.co.uk>
13681
13682 * parse.y : include system.h instead of including
13683 standard headers directly with the exception of <dirent.h>.
13684
13685 1999-01-06 Per Bothner <bothner@cygnus.com>
13686
13687 * lex.h: Moved static function declarations to lex.c,
13688 to shut up some -Wall warnings.
13689 * lex.c: Static function declarations moved here.
13690 * jcf-dump.c: Small fixes to shut up -Wall warnings.
13691
13692 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13693
13694 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
13695
13696 1998-12-22 Per Bothner <bothner@cygnus.com>
13697
13698 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
13699 * verify.c (verify_jvm_instructions): Fix off-by-one error.
13700
13701 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
13702 (localvar_alloc): Change return type to void,
13703 (emit_unop): Remove unused variable size.
13704
13705 * jcf-write.c (struct jcf_block): Add new union.
13706 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
13707 (call_cleanups): New functions.
13708 (struct jcf_partial): New fields num_finalizers and return_value_decl.
13709 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
13710 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
13711 * lang.c (lang_init): Call using_eh_for_cleanups.
13712 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
13713 completing operands to patch_synchronized_statement.
13714 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
13715 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
13716 WITH_CLEANUP_EXPR instead of TRY_EXPR.
13717
13718 1998-12-20 John F. Carr <jfc@mit.edu>
13719
13720 * Make-lang.in: Comment out control-Ls; they upset some makes.
13721
13722 1998-12-18 Tom Tromey <tromey@cygnus.com>
13723
13724 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
13725 consistently.
13726
13727 1998-12-17 Tom Tromey <tromey@cygnus.com>
13728
13729 * parse.y (DIR_SEPARATOR): New define.
13730 (check_class_interface_creation): Use it.
13731
13732 * parse-scan.y (report_main_declaration): Recognize
13733 `java.lang.String' in argument to main.
13734
13735 1998-12-16 Per Bothner <bothner@cygnus.com>
13736
13737 * parse.y (create_interface): Remove bogus test.
13738
13739 1998-12-16 Per Bothner <bothner@cygnus.com>
13740
13741 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
13742 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
13743
13744 1998-12-16 Tom Tromey <tromey@cygnus.com>
13745
13746 * parse-scan.y (qualified_name): Use correct sprintf format.
13747
13748 1998-12-15 Tom Tromey <tromey@cygnus.com>
13749
13750 * gjavah.c (print_field_info): Changed how most negative number is
13751 printed.
13752
13753 1998-12-14 Per Bothner <bothner@cygnus.com>
13754
13755 * parse.y (fold_constant_for_init): New function.
13756 (resolve_expression_name): Don't replace static final
13757 constant-initialized fields by its value.
13758 (java_complete_lhs): New. Same as java_complete_tree, except does
13759 not replace static final constant-initialized fields by their values.
13760 (register_fields): If there is an initializer, set DECL_INITIAL and
13761 MODIFY_EXPR_FROM_INITIALIZATION_P.
13762 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
13763 Only call patch_initialized_static_field if
13764 MODIFY_EXPR_FROM_INITIALIZATION_P.
13765 (patch_initialized_static_field): If not valid constant, clear
13766 DECL_INITIAL.
13767
13768 * parse.y (lookup_field_wrapper): Fix thinko.
13769
13770 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
13771 set and restore global lineno.
13772
13773 1998-12-14 Tom Tromey <tromey@cygnus.com>
13774
13775 * gjavah.c (print_field_info): If value to print is the smallest
13776 value of its size, then print as hex to avoid later warnings from
13777 C++ compiler.
13778
13779 1998-12-14 Tom Tromey <tromey@cygnus.com>
13780
13781 * gjavah.c (decompile_method): Decompile `return null'.
13782 (process_file): Generate `#pragma interface'.
13783 (method_declared): New global.
13784 (print_method_info): Set it.
13785 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
13786 (print_method_info): Handle abstract methods.
13787
13788 1998-12-13 Per Bothner <bothner@cygnus.com>
13789
13790 * parse.y (patch_method_invocation): If class_decl is null
13791 (e.g. an array type), use original type.
13792
13793 * parse.y (check_thrown_exceptions): Temporary hack to suppress
13794 errors about uncaught exception from clone (of array, specifically).
13795
13796 1998-12-13 Tom Tromey <tromey@cygnus.com>
13797
13798 * gjavah.c (decompile_method): Handle all types of `return'
13799 opcode. Decompile `return this' and `return'.
13800 (method_access): New global.
13801 (print_method_info): Set it.
13802 (decompile_method): Don't decompile a synchronized method.
13803
13804 1998-12-13 Tom Tromey <tromey@cygnus.com>
13805
13806 * jcf-reader.c (jcf_parse_one_method): Recognize
13807 HANDLE_END_METHOD.
13808 * gjavah.c (HANDLE_END_METHOD): New macro.
13809 (HANDLE_CODE_ATTRIBUTE): New macro.
13810 (decompile_method): New function.
13811 (print_method_info): Don't print `;\n' at end of function decl.
13812 Include java-opcodes.h.
13813 (decompiled): New global.
13814
13815 1998-12-12 Per Bothner <bothner@cygnus.com>
13816
13817 * class.c (build_class_ref): Handle PRIMTYPE.class if
13818 flag_emit_class_files.
13819 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
13820 if flag_emit_class_files.
13821 * parse.y (java_complete_tree): Pre-liminary support for
13822 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
13823
13824 * parse.y (patch_synchronized_statement): Don't call monitorexit
13825 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
13826
13827 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
13828
13829 * zipfile.h (opendir_in_zip): New declaration.
13830 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
13831 (opendir_in_zip): New function, using code from open_in_zip.
13832 (open_in_zip): Call opendir_in_zip.
13833 (find_class): Remove no-longer-used do_class_file parameter,
13834 but add source_ok parameter. Change logic so if we find a .java file,
13835 we don't look for .class in later classpath emtries.
13836 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
13837 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
13838 * gjavah.c: Update call to find_class.
13839 * jcf-dump.c: Likewise.
13840
13841 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
13842 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
13843 nothing if body is empty_stmt_node.
13844 Various little fixes so SP gets correctly adjusted.
13845 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
13846 For CALL_EXPR, test if static first.
13847 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
13848 such as the ones we create for Object and Class.
13849 Set and restore current_function_decl.
13850 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
13851 (note_possible_classname): New function.
13852 (read_import_entry): Removed. Merged with read_import_dir.
13853 (read_import_dir): Don't call find_class - that only gives us
13854 the first classpath entry having the needed package.
13855 Use the struct buffer data structure from buffer.h.
13856 (read_import_dir, find_in_imports_on_demand): The remembered
13857 class names now use '.' (not '/') as package separator.
13858
13859 * parse.y (java_complete_expand_methods): Call write_classfile
13860 here, and not in java_expand_classes (which only gets first class).
13861
13862 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13863
13864 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
13865 (register_fields): If a static fields has an initializer, just
13866 chain it on ctxp->static_initialized, and handle later.
13867 (java_complete_expand_methods): Force <clinit> first.
13868 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
13869 - it's already been completed.
13870 (patch_initialized_static_field): New function.
13871 (java_complete_field): Call it.
13872
13873 1998-12-12 Per Bothner <bothner@cygnus.com>
13874
13875 * expr.c (encode_newarray_type, build_new_array): New functions.
13876 * java-tree.h: Declare build_new_array.
13877 * jcf-write.c (patch_newarray): Use build_new_array.
13878
13879 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
13880 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
13881
13882 * parse.y (patch_new_array_init): Re-organize.
13883 Now is passed the actual array (pointer) type of the value.
13884 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
13885 (patch_array_constructor): Removed - merged into patch_new_array_init.
13886 (java_complete_tree): Update patch_new_array_init.
13887
13888 * jcf-write.c (find_constant_index): New function.
13889 (generate_bytecode_insns): Use find_constant_index.
13890 (generate_classfile): Use find_constant_index for ConstantValue.
13891
13892 1998-12-11 Tom Tromey <tromey@cygnus.com>
13893
13894 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
13895 * decl.c (init_decl_processing): Renamed dtable -> vtable.
13896 * class.c (make_class_data): Renamed dtable -> vtable, and
13897 dtable_method_count -> vtable_method_count.
13898
13899 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13900
13901 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
13902 global variables, initialized.
13903 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
13904 Declared new global variables.
13905 * lex.c (java_lex): Return long_zero_node, float_zero_node,
13906 double_zero_node, integer_zero_node upon direct matching.
13907 * parse.y (purify_type_name): Added function prototype.
13908 (duplicate_declaration_error_p): Consider new_type as potentially
13909 being a incomplete type. Use purify_type_name on type string.
13910 (method_header): saved_type: unused variable removed. Don't figure
13911 return type if method name is invalid.
13912 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
13913 processed by patch_unaryop.
13914 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
13915 increment/decrement node into its original type after binary
13916 numeric promotion on its operands.
13917
13918 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13919
13920 * parse.y (array_initializer:): Array init operand is NULL_TREE
13921 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
13922 now an error. Fixed indentation problems.
13923 (patch_string): Handle error_mark_node as an argument.
13924 (patch_new_array_init): Fixed indentation problems.
13925 (array_constructor_check_entry): Removed check on null wfl_value.
13926 Return an error if wfl_value's walk returns an error.
13927
13928 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13929
13930 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
13931 * lex.c (java_lex): Remember column position before advancing one
13932 token. Retain location information on OCB_TK.
13933 * lex.h (typedef struct java_lc): Added new field.
13934 * parse.h (GET_SKIP_TYPE): New macro.
13935 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
13936 * parse.y (build_new_array_init, patch_new_array_init,
13937 patch_array_constructor, maybe_build_array_element_wfl,
13938 array_constructor_check_entry): New function prototypes.
13939 (switch_block:): Tagged <node>.
13940 (OCB_TK): Tagged <operator>.
13941 (array_initializer:): Installed actions.
13942 (variable_initializer): Build location information on element if
13943 necessary.
13944 (switch_statement:): Fixed indentation typo.
13945 (switch_block:): Redefined default action.
13946 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
13947 (patch_assignment): Removed duplicate code.
13948 (maybe_build_array_element_wfl, build_new_array_init,
13949 patch_new_array_init, patch_array_constructor,
13950 array_constructor_check_entry): New functions.
13951
13952 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13953
13954 * parse.y (array_initializer): Tagged <node>.
13955 (variable_initializer:): Use default rule.
13956 (array_initializer:): Defined actions.
13957 (variable_initializers:): Likewise.
13958 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
13959 non-static field accesses.
13960 (patch_invoke): Fixed indentation typo.
13961 (java_complete_tree): Likewise.
13962 (build_labeled_block): Changed leading comment. Generate an error
13963 in case of duplicate loop labels.
13964 (patch_conditional_expr): Patch results of string concatenation
13965 operations.
13966
13967 1998-12-06 Per Bothner <bothner@cygnus.com>
13968
13969 * constants.c (find_methodref_index): When the class is an interface,
13970 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
13971
13972 * decl.c (finit_identifier_node): Use "$finit$", rather than
13973 "<finit>" (which Sun's verifier rejects).
13974 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
13975 (generate_field_initialization_code): Removed.
13976 (fix_constructors) Don't add call to $finit$ here (wrong order).
13977 (patch_method_invocation): Add $finit$ call here.
13978
13979 * java-tree.h (CALL_USING_SUPER): New macro.
13980 * parse.y (patch_invoke): Remove im local variable.
13981 (patch_method_invocation, patch_invoke): Don't pass super parameter.
13982 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
13983 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
13984
13985 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
13986
13987 * parse.y (java_complete_tree): Don't complain about unreachable
13988 statement if it is empty_stmt_node.
13989
13990 * jcf-write.c (find_constant_wide): New function.
13991 (push_long_const): Use find_constant_wide.
13992
13993 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
13994 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
13995 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
13996 Emit invokeinterface when calling an interface method.
13997 Emit invokespecial also when calling super or private methods.
13998
13999 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
14000
14001 1998-12-06 Per Bothner <bothner@cygnus.com>
14002
14003 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
14004
14005 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14006
14007 * java-tree.h (java_layout_seen_class_methods): New function
14008 prototype.
14009 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
14010 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
14011 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
14012 * parse.y (method_declarator:): Defined action.
14013 (issue_warning_error_from_context): input_filename saved, set to
14014 the appropriate value and restored after java_error is called.
14015 (build_unresolved_array_type): Fixed comment.
14016 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
14017 (method_header): Deal with return type the same way type are
14018 handled for fields and method's parameters and local variables
14019 types are handled.
14020 (check_method_redefinition): Removed extra CR.
14021 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
14022 (java_layout_seen_class_methods): New function.
14023 (java_layout_classes): Call java_layout_seen_class_methods.
14024
14025 1998-12-03 Per Bothner <bothner@cygnus.com>
14026
14027 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
14028
14029 1998-12-03 Per Bothner <bothner@cygnus.com>
14030
14031 * jcf-dump.c (main): Fix error message.
14032 * jcf-path.c (add_entry): Style fix.
14033
14034 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14035
14036 * class.c (layout_class_method): Call build_java_argument_signature
14037 on constructors too.
14038 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
14039 (patch_method_invocation): Define a primary when resolving an
14040 expression name. Augmented comment on code checking illegal `this'
14041 usage. Loosened it test by accepting NEW_CLASS_EXPR.
14042
14043 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14044
14045 * class.c (layout_class_method): Don't report error on non-static
14046 overriding static if the method is private.
14047 * java-tree.h (finish_class): Prototype added.
14048 * lex.c (java_get_line_col): Handle col argument -2 value.
14049 * parse.h: All static method declarations moved to parse.y.
14050 * parse.y: Now contains all static method declarations previously
14051 found in parse.h.
14052 (find_expr_with_wfl, missing_return_error,
14053 unreachable_stmt_error): New functions.
14054 (java_get_real_method_name): Identify constructors bearing class
14055 names in source code compiled classes only.
14056 (java_complete_expand_methods): Call missing_return_error.
14057 (invocation_mode): Private methods invoked as static methods.
14058 (java_complete_tree): Call unreachable_stmt_error.
14059
14060 1998-12-01 Tom Tromey <tromey@cygnus.com>
14061
14062 * Makefile.in (+target): Removed.
14063 (+xmake_file): Likewise.
14064 (+tmake_file): Likewise.
14065 (.NOEXPORT): Removed duplicate.
14066
14067 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14068
14069 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
14070
14071 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
14072
14073 * jvgenmain.c: Remove the xmalloc prototype, we get it from
14074 libiberty.h. Provide an xmalloc definition.
14075
14076 * jvspec.c: Remove the xmalloc prototype.
14077
14078 * parse-scan.y: Include config.h and system.h. Don't include
14079 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
14080 Provide an xstrdup definition.
14081
14082 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
14083
14084 * jcf-path.c (add_entry): Recognize ".jar" too.
14085 * lang-specs.h: Likewise.
14086
14087 1998-11-26 Per Bothner <bothner@cygnus.com>
14088
14089 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
14090 soft_monitorenter_node, soft_monitorexit_node, throw_node.
14091
14092 * jcf-write.c (generate_bytecode_insns):
14093 Handle pre/post-increment/decrement of long.
14094
14095 * jcf-write.c (generate_bytecode_insns):
14096 Handle missing exception handler (finally for synchronized).
14097
14098 1998-11-25 Per Bothner <bothner@cygnus.com>
14099
14100 * java-tree.h (end_params_node): Declare global.
14101 * decl.c (end_params_node): New global.
14102 (init_decl_processing, start_java_method): Use end_params_node for
14103 end of list of parameter types. Follows correct gcc conventions.
14104 * expr.c (pop_argument_types, pop_arguments): Likewise.
14105 * lang.c (put_decl_node): Likewise.
14106 * typeck.c (various places): Likewise.
14107 * class.y (various places): Likewise.
14108 * parse.y (various places): Likewise.
14109
14110 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
14111 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
14112
14113 * class.c: Add #include flags.h, remove no-longer needed declaration.
14114
14115 * class.c (layout_class_method): Remove commented-out code, re-format.
14116 Don't add vtable entry (or index) for private methods.
14117 * expr.c (expand_invoke): A private method is implicitly final.
14118 * class.c (make_class_data): If inlining or optimizing,
14119 skip private methods.
14120
14121 * class.c (finish_class): New function. Calls existing methods,
14122 but alls emits deferred inline functions.
14123 * jcf-parse.c (parse_class_file): Call finish_class.
14124 * parse.y (java_complete_expand_methods): Likewise.
14125
14126 * expr.c (build_java_binop): Explicit default, to silence -Wall.
14127
14128 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
14129
14130 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
14131
14132 * jcf-write.c (generate_bytecode_conditional): Fix typo.
14133
14134 1998-11-24 Per Bothner <bothner@cygnus.com>
14135
14136 * (generate_classfile): Always write class access flag with
14137 ACC_SUPER set.
14138
14139 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14140
14141 * class.c (maybe_layout_super_class): New function.
14142 (layout_class): Reorganized. Loop on class methods dispatched into
14143 a new function. Call maybe_layout_super_class.
14144 (layout_class_methods, layout_class_method): New functions.
14145 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
14146 class.
14147 (expand_invoke): Likewise.
14148 * java-tree.h (all_class_list): New global variable declared.
14149 (layout_class_methods, layout_class_method): New function
14150 prototypes.
14151 (LAYOUT_SEEN_CLASS_METHODS): New macro.
14152 * jcf-parse.c (all_class_list): New global variable.
14153 (load_class): Extended what class_or_name can be. Use parser
14154 context mechanism to save globals before calling jcf_parse.
14155 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
14156 is set on the file name.
14157 (jcf_parse): Layout class methods when Object is loaded, otherwise
14158 record class in all_class_list for delayed method layout.
14159 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
14160 * lang.c (put_decl_node): Decode <init> into the decl context
14161 class name.
14162 * lex.c (java_allocate_new_line): Use xmalloc.
14163 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
14164 pointers, not TREE_LIST elements.
14165 (struct parser_ctxt): Fixed comment indentations, added comments
14166 and reordered some fields.
14167 (java_check_methods): Function prototype removed.
14168 * parse.y (java_push_parser_context): Use xmalloc.
14169 (java_parser_context_restore_global): Pop extra pushed ctxp only
14170 when there's nothing next.
14171 (maybe_create_class_interface_decl): Fixed comment, add new
14172 created class decl to all_class_list.
14173 (method_header): Use GET_REAL_TYPE on argument's types.
14174 (method_declarator): Use GET_REAL_TYPE, change type to the real
14175 type in TREE_LIST dependency node. Build argument list with the
14176 real type.
14177 (create_jdep_list): Use xmalloc. Removed allocation error message.
14178 (obtain_incomplete_type): Fixed leading comment. Broadened
14179 incoming argument meaning.
14180 (register_incomplete_type): Use xmalloc. Removed allocation error
14181 message.
14182 (safe_layout_class): Fixed leading comment.
14183 (jdep_resolve_class): Reversed if statement condition and switch
14184 if and else bodies.
14185 (resolve_and_layout): Fixed leading comment. Broadened incoming
14186 argument meaning.
14187 (complete_class_report_errors): New local variable name, for
14188 clarity. purify_type_name used for all error cases.
14189 (java_get_real_method_name): Stricter check on constructors.
14190 (java_check_regular_methods): Reverse methods list only if not
14191 already laid out. Layout artificial constructor.
14192 (java_check_methods): Deleted.
14193 (source_start_java_method): Obtain incomplete type for patchable
14194 method arguments.
14195 (java_layout_classes): Fixed leading comment. Use
14196 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
14197 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
14198 before returning. Fixed comments.
14199 (java_expand_classes): Check for errors up front.
14200 (patch_method_invocation): Class to search is resolved and laid
14201 out.
14202
14203 1998-11-24 Per Bothner <bothner@cygnus.com>
14204
14205 * expr.c (java_lang_expand_expr): Add missing emit_queue.
14206
14207 * javaop.h (int8): Removed - not used.
14208 (jbyte): Redefine portably with correct signedness.
14209
14210 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
14211
14212 * jcf-write.c (generate_bytecode_insns): Fix typo
14213 OPCODE_getstatic to OPCODE_getfield.
14214
14215 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
14216 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
14217 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
14218
14219 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14220
14221 * jcf-parse.c (jcf_parse_source): Function returned type is
14222 void. Added prototype.
14223 (jcf_parse): Function returned type is void.
14224 (yyparse): Remove call to fclose on the last parsed file.
14225
14226 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
14227
14228 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14229
14230 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
14231 (layout_class): Cope with methods featuring WFL in decl names.
14232 * decl.c (unqualified_object_id_node): New global variable,
14233 initialized.
14234 (build_decl_no_layout): Removed.
14235 * expr.c (build_primtype_type_ref): Handle Double.
14236 (java_lang_expand_expr): Fixed indentations.
14237 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
14238 (flag_wall, flag_redundant, flag_not_overriding,
14239 flag_static_local_jdk1_1, unqualified_object_id_node): Global
14240 variable declarations.
14241 (build_decl_no_layout): Removed prototype.
14242 (java_get_real_method_name): Added prototype.
14243 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
14244 (java_parse_abort_on_error): Macro now just returns.
14245 * jcf-parse.c (jcf_parse_source): Check fclose returned
14246 value. Call emit_register_classes if java_report_errors returns
14247 zero.
14248 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
14249 flag_static_local_jdk1_1): New integer flags.
14250 (lang_decode_option): New flags set here.
14251 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
14252 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
14253 the flag_redundant variable.
14254 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
14255 when parsing java.lang.Object class.
14256 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
14257 NULL_TREE to build.
14258 (resolve_qualified_expression_name): Fixed indentation.
14259 (patch_array_ref): Changed prototype.
14260 (not_initialized_as_it_should_p): Prototype removed.
14261 (java_report_errors): Added function prototype.
14262 * parse.y (formal_parameter:): Changed error message for not yet
14263 supported final parameters.
14264 (class_type_list:): Set both PURPOSE and VALUE of created
14265 TREE_LIST to be class_type.
14266 (primary_no_new_array:): Handle class literals on primitive types.
14267 (parse_warning_context): Reinstalled correct force_error and
14268 do_warning flags setups.
14269 (java_report_errors): Changed prototype. Return java_error_count
14270 value.
14271 (variable_redefinition_error): Consider treating variable type as
14272 a fake pointer.
14273 (create_interface): Warn about redundant abstract modifier if
14274 flag_redundant is set. Changed error message.
14275 (lookup_field_wrapper): Save/restore globals before/after looking
14276 up field.
14277 (duplicate_declaration_error_p): Consider treating declaration
14278 type as a fake pointer.
14279 (register_fields): Extract real type from dependency node. Check
14280 for duplicate field declaration after type adjustment. Use
14281 DECL_INITIAL to store static final initialized values.
14282 (method_header): Extract real function type from dependency node.
14283 (check_abstract_method_header): Use GET_METHOD_NAME.
14284 (obtain_incomplete_type): Layout fake pointer type.
14285 (safe_layout_class): Don't try to check for methods before layout.
14286 (java_complete_class): Don't check for correct throws clause
14287 elements inheritance here.
14288 (resolve_and_layout): Broadened name parameter meaning.
14289 (reset_method_name): Use GET_METHOD_NAME.
14290 (java_get_real_method_name): New function.
14291 (java_check_regular_methods): Don't check methods in
14292 java.lang.Object. Verify lineage of throws clause elements. Use
14293 flag_no_overriding in warning report.
14294 (check_throws_clauses): Don't check if class was from
14295 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
14296 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
14297 (declare_local_variables): Use flag_static_local_jdk1_1 to report
14298 warning on unsupported final local variables. Use build_decl
14299 instead of build_decl_no_layout. Get real local variable type from
14300 dependency node.
14301 (source_start_java_method): Get real parameter type from
14302 dependency node. Call build_decl instead of build_decl_no_layout.
14303 (java_layout_classes): Reverse tree and layout type and class as
14304 required. Mark class as loaded when done.
14305 (resolve_field_access): Fixed indentation. Restricted condition
14306 leading to static field access code generation. Set field_type
14307 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
14308 (resolve_qualified_expression_name): Initialize type_found to
14309 null. Handle static field resolved during qualification. Fixed
14310 layout on non primitive field decl types.
14311 (not_accessible_p): Fixed typo in comment.
14312 (patch_method_invocation): Resolve and layout class to search from
14313 type.
14314 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
14315 layout non primitive type, if necessary. Make method node only to
14316 report errors.
14317 (find_applicable_accessible_methods_list): Consider WFL'ed method
14318 decl names. Fixed indentation.
14319 (argument_types_convertible): Resolve and layout target type if
14320 necessary.
14321 (java_complete_tree): Fixed indentation problems. Rewrote
14322 CALL_EXPR thrown exceptions check. Re-installed further processing
14323 of the assignment in certain cases.
14324 (patch_assignment): Call maybe_build_primttype_type_ref to perform
14325 inlining on class literals.
14326 (valid_builtin_assignconv_identity_widening_p): Cope with constant
14327 0 literal.
14328 (valid_method_invocation_conversion_p): Likewise.
14329 (patch_string): Temporary disable forbidden use of `this' in
14330 explicit constructor invocations when doing string concatenation
14331 within their scope.
14332 (patch_unaryop): Added comment. Reinstalled code to disable
14333 further check on assignment operation with cast expression RHS.
14334 (patch_switch_statement): Fixed indentation.
14335 (build_try_statement): Call build_decl instead of
14336 build_decl_no_layout.
14337 (patch_synchronized_statement): Likewise.
14338 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
14339 IS_UNCHECKED_EXPRESSION_P.
14340 (check_thrown_exceptions_do): Changed leading comment. Resolve and
14341 layout argument exception type.
14342 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
14343 of IS_UNCHECKED_EXPRESSION_P.
14344
14345 1998-11-18 Anthony Green <green@cygnus.com>
14346
14347 * jcf-parse.c (yyparse): Open class file in binary mode.
14348
14349 1998-11-15 Per Bothner <bothner@cygnus.com>
14350
14351 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
14352
14353 * jcf-write.c (perform_relocations): Move check out one loop.
14354
14355 1998-11-15 Anthony Green <green@hoser.cygnus.com>
14356
14357 * Make-lang.in: Fix reference to srcdir.
14358 * jv-scan.c: Add missing xmalloc prototype.
14359 * jvgenmain.c: Ditto.
14360
14361 1998-11-15 Per Bothner <bothner@cygnus.com>
14362
14363 * decl.c (error_mark_node), java-tree.h: New global.
14364 * parse.y: Use empty_stmt_node instead of size_zero_node.
14365 (build_if_else_statement): If missing else, use empty_stmt_node.
14366
14367 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
14368 (java_complete_expand_method): Complain if return is missing.
14369 (java_check_regular_methods): Comment out incorrect error check.
14370 (not_accessible_p): Fix incorrect handling of protected methods.
14371 (patch_method_invocation): Pass correct context to not_accessible_p.
14372 (find_applicable_accessible_methods_list): Likewise.
14373 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
14374 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
14375 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
14376 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
14377
14378 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
14379 (push_int_const): Remove reundant NOTE_PUSH.
14380 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
14381 (- case SWITCH_EXPR): Fix code generation bug.
14382 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
14383 (generate_classfile): More robust for abstract methods.
14384
14385 1998-11-15 Anthony Green <green@cygnus.com>
14386
14387 * Makefile.in: jv-scan and jvgenmain all require libiberty.
14388 * Make-lang.in: Ditto.
14389
14390 * jv-scan.c: Remove xmalloc and xstrdup definitions.
14391 * jvgenmain: Ditto.
14392
14393 1998-11-15 Per Bothner <bothner@cygnus.com>
14394
14395 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
14396
14397 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
14398
14399 1998-11-14 Per Bothner <bothner@cygnus.com>
14400
14401 Allow uses of interface types to verify. This is not really
14402 type-safe, but it matches what Sun does, and is OK as long as
14403 there are appropriate run-time checks.
14404 * verify.c (merge_types): If merging two interface types,
14405 just set the result to java.lang.Object.
14406 * expr.c (pop_type): Any interface is matches by java.lang.Object.
14407
14408 1998-11-13 Tom Tromey <tromey@cygnus.com>
14409
14410 * gjavah.c (main): Handle --output-class-directory argument.
14411 * jvspec.c (lang_specific_driver): Translate `-d' into
14412 -foutput-class-dir.
14413 * jcf.h (jcf_write_base_directory): Declare.
14414 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
14415 * lang-options.h: Mention -foutput-class-dir.
14416 * jcf-write.c (jcf_write_base_directory): New global.
14417 (make_class_file_name): Put generated .class file into `-d'
14418 directory, or into source directory if -d not given. Function now
14419 static.
14420 (write_classfile): Free class file name. Handle case where class
14421 file name is NULL.
14422 (DIR_SEPARATOR): New macro.
14423 Include <sys/stat.h>
14424
14425 * Makefile.in (prefix): New macro.
14426
14427 1998-11-12 Per Bothner <bothner@cygnus.com>
14428
14429 * parse.y (patch_invoke): Do less if flag_emit_class_files.
14430 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
14431 here (done in patch_invoke instead).
14432 (case_identity): Moved here from parse.y.
14433
14434 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
14435 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
14436 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
14437 so they can be efficiently scanned without recursion.
14438 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
14439 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
14440 in BLOCK iteratively, rather than recursively.
14441
14442 * parse.y (do_unary_numeric_promotion): New function.
14443 (patch_unaryop, patch_binop, patch_array_ref): Use it.
14444
14445 * parse.y (patch_newarray): Various fixes.
14446
14447 Re-do handling of switch statements (for proper block scoping).
14448 * parse.y: Add just a single block for the enture switch block,
14449 but don't create any "case blocks".
14450 (group_of_labels): Rmeoved unneeded non-terminal.
14451 CASE_EXPR and DEFAULT_EXPR are added to current block.
14452 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
14453 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
14454 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
14455 * parse.y (wfl_operator, print_int_node): Make non-static.
14456 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
14457 as part of recursive scan of block.
14458 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
14459 (patch_switch_statement): Most tests move dinto java_complete_tree.
14460
14461 * parse.y: Make various production be non-typed (void).
14462 * parse.y (parse_error): Merged into issue_warning_error_from_context.
14463 * parse.y (add_stmt_to_compound): Don't create/change extra node.
14464 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
14465
14466 * jcf-write.c (struct jcf_handler): New type.
14467 (struct jcf_switch_state): New type.
14468 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
14469 (alloc_handler, emit_unop, emit_reloc): New functions.
14470 (adjust_typed_op): Add extra parameter ("max type" offset).
14471 (emit_switch_reloc, emit_case-reloc): New function.
14472 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
14473 (generate_bytecode_insns): Support REAL_CST, switch statements,
14474 exception handling, method calls, object/array creation, and more.
14475
14476 * class.c: Remove some unused variables.
14477 * constants.c (find_string_constant): New function.
14478 (count_constant_pool_bytes): Fix to correctly handle wide constants.
14479 * decl.c (complete_start_java_method): Don't _Jv_InitClass
14480 if flag_emit_class_files.
14481
14482 1998-11-12 Tom Tromey <tromey@cygnus.com>
14483
14484 * jcf-io.c (find_class): Added explanatory comment.
14485
14486 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
14487 trailing slash to `.zip' entries.
14488
14489 * jvspec.c (lang_specific_driver): Correctly handle case where
14490 GC_NAME not defined.
14491
14492 1998-11-11 Tom Tromey <tromey@cygnus.com>
14493
14494 * jvspec.c (GC_NAME): New define.
14495 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
14496 if required.
14497 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
14498
14499 1998-11-11 Per Bothner <bothner@cygnus.com>
14500
14501 * jcf-dump.c (TABLE_SWITCH): Fix typos.
14502
14503 1998-11-11 Tom Tromey <tromey@cygnus.com>
14504
14505 * jcf-dump.c (main): Correctly recognize `--'-style long options.
14506
14507 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14508
14509 * class.c (is_compiled_class): Call safe_layout_class for class
14510 compiled from source.
14511 * conver.h (convert_to_integer, convert_to_real,
14512 convert_to_pointer): Added prototypes.
14513 * decl.c (init_decl_processing): Non longer push the decls of
14514 `methodtable', `constants', `Class', `Field', `dispatchTable'
14515 `jexception' and `Method'.
14516 * expr.c (build_invokeinterface): New function.
14517 (expand_invoke): static variable CLASS_IDENT now in
14518 build_invokeinterface. Use build_invokeinterface.
14519 (expand_java_field_op): Moved code to inline
14520 java.lang.PRIMTYPE.TYPE into a function.
14521 (build_primtype_type_ref): New function.
14522 * java-tree.def (INSTANCEOF_EXPR): New tree code.
14523 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
14524 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
14525 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
14526 (DECL_LOCAL_STATIC_VALUE): New macro.
14527 (build_invokeinterface, build_primtype_type_ref): New function
14528 prototypes.
14529 (java_parse_abort_on_error): Macro rewritten.
14530 * jcf-parse.c (current_method): Add comment to declaration.
14531 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
14532 Function prototypes fixed.
14533 (jcf_parse_source): push/pop parser context. save/restore global.
14534 (parse_source_file): Fixed leading comment. Now take a
14535 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
14536 classes and pop the parser context anymore.
14537 (yyparse): Push parser context, save globals, parse the source
14538 file, restore globals and pop the parser context when processing a
14539 source file.
14540 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
14541 * lex.c (java_parse_doc_section): New function.
14542 (java_lex): Call java_parse_doc_section when appropriate. Build an
14543 operator around INSTANCEOF_TK.
14544 * lex.h (java_lineterminator, java_sprint_unicode,
14545 java_unicode_2_utf8, java_lex_error, java_store_unicode):
14546 Prototypes rewritten.
14547 (java_parse_escape_sequence, java_letter_or_digit_p,
14548 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
14549 java_read_unicode, java_store_unicode, java_read_char,
14550 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
14551 Added function prototypes.
14552 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
14553 define.
14554 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
14555 New macros
14556 (struct parser_ctxt): New fields: deprecated,
14557 current_parsed_class_un, gclass_list.
14558 (fix_method_argument_names, issue_warning_error_from_context,
14559 resolve_package, lookup_package_type): New function prototypes.
14560 (resolve_expression_name): Fixed function prototype.
14561 (find_applicable_accessible_methods_list): Fixed indentation, added
14562 extra argument in prototype.
14563 (check_final_assignment, build_null_of_type, check_deprecation,
14564 check_method_redefinition, reset_method_name,
14565 java_check_regular_methods, java_check_abstract_methods,
14566 maybe_build_primttype_type_ref): New function prototype.
14567 * parse.y (conver.h): Include.
14568 (INSTANCEOF_TK): Tagged <operator>.
14569 (single_type_import_declaration): Use REGISTER_IMPORT macro.
14570 (relational_expression:): Build binop for instanceof.
14571 (java_push_parser_context): Remember ctxp->gclass_list across
14572 contexts.
14573 (java_pop_parser_context): Simply return if no context
14574 exists. Remember gclass_list across contexts.
14575 (issue_warning_error_from_context): New function.
14576 (parse_error_context): Don't setup ctxp->elc here. Call
14577 issue_warning_error_from_context instead.
14578 (parse_warning_context): Likewise.
14579 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
14580 setup. Link new class/interface to ctxp->gclass_list.
14581 (add_superinterfaces): Register interface as incomplete if not
14582 loaded.
14583 (create_class): Remember class unqualified name in
14584 ctxp->current_parsed_class_un. Check class deprecation.
14585 (register_fields): Check field deprecation. Remember static final
14586 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
14587 processing INIT.
14588 (method_header): New local variable ORIG_ARG. Use unqualified
14589 current class name for check on constructor errors. Promote return
14590 type if of record type. Argument list fix moved in
14591 fix_method_argument_names, called here. Check method deprecation.
14592 (fix_method_argument_names): New function.
14593 (method_declarator): Promote record typed arguments.
14594 (safe_layout_class): Check class methods before layout.
14595 (java_complete_class): Compute field layout when patched.
14596 (do_resolve_class): Try to load class after having it renamed
14597 after the package name.
14598 (get_printable_method_name): Use DECL_CONTEXT.
14599 (reset_method_name): New function.
14600 (check_method_redefinition): Use reset_method_name.
14601 (java_check_regular_methods): New local variable
14602 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
14603 names for error report. Check for compile-time error when method
14604 found has default (package) access.
14605 (java_check_abstract_methods): Now takes an interface DECL node as
14606 an argument. Also reinstall real name on unchecked
14607 overriding/hiding methods for error report.
14608 (java_check_methods): Fixed leading comment. Get classes to verify
14609 from ctxp->gclass_list. Use CHECK_METHODS macro and set
14610 CLASS_METHOD_CHECKED_P on class verification.
14611 (lookup_java_method2): Get real method name if necessary.
14612 (find_in_imports): Don't check package class access here.
14613 (resolve_package, lookup_package_type): New functions.
14614 (java_layout_classes): Fixed leading comment. Take classes to be
14615 laid out from ctxp->gclass_list.
14616 (java_complete_expand_methods): Don't expand native and abstract
14617 methods.
14618 (java_expand_classes): New function.
14619 (resolve_expression_name): Use additional argument ORIG. Retrieve
14620 values of static final field of primitive types.
14621 (resolve_field_access): Handles static final field of promotive
14622 type.
14623 (resolve_qualified_expression_name): Handle STRING_CST as
14624 primaries and package name resolution. Check deprecation on found
14625 decls. Set where_found and type_found on non static field resolved
14626 during qualification. Layout non primitive field decl types.
14627 (check_deprecation): New function.
14628 (maybe_access_field): Simplified.
14629 (patch_method_invocation_stmt): Local variable CLASS_TYPE
14630 removed. Reverse method's argument when primary is a type. Don't
14631 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
14632 instead. Include abstract class in the list of class searchable
14633 for constructors. Use DECL_CONTEXT of found method for access
14634 checks. Check method deprecation.
14635 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
14636 converting arguments. Handle INVOKE_INTERFACE.
14637 (lookup_method_invoke): Search constructor using existing
14638 infrastructure (don't rely on lookup_java_constructor anymore).
14639 (find_applicable_accessible_methods_list): Extra argument flag
14640 LC. Now include constructor in the search.
14641 (qualify_ambiguous_name): Conditional expression are primaries.
14642 (not_initialized_as_it_should_p): static final are always
14643 initialized.
14644 (java_complete_tree): Pass extra NULL argument to
14645 resolve_expression_name. Stricter test to carry on patching
14646 assignments. New case for INSTANCEOF_EXPR.
14647 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
14648 (check_final_assignment, maybe_build_primttype_type_ref): New
14649 functions.
14650 (patch_assignment): Detect resolved static finals and carry normal
14651 assignment error check on them. Inline PRIMTYPE.TYPE read access.
14652 (try_builtin_assignconv): Access constant 0 on all primitive
14653 types.
14654 (valid_builtin_assignconv_identity_widening_p): Accept identical
14655 types. Accept all promoted type on int type.
14656 (valid_ref_assignconv_cast_p): Accept a null pointer to be
14657 assigned to a reference.
14658 (valid_method_invocation_conversion_p): Accept to check null
14659 pointers.
14660 (build_binop): Merge declaration and initialization of local
14661 variable BINOP.
14662 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
14663 numeric types. Improved validity test for qualify operators on
14664 references.
14665 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
14666 and PREINCREMENT_EXPR. Also detect resolved static finals of a
14667 primitive type and issue the appropriate error message.
14668 (resolve_type_during_patch): Mark class loaded when resolved.
14669 (patch_cast): Allow null to be cased to reference types.
14670 (build_null_of_type): New function.
14671 (patch_array_ref): Handle array on references correctly.
14672 (patch_return): Removed unused local variable MODIFY. Force
14673 boolean to be returned as integers. Allows null to be returned by
14674 a function returning a reference.
14675 * typeck.c (convert_to_integer, convert_to_real,
14676 convert_to_pointer): Prototypes moved to convert.h
14677 (lookup_argument_method): Use method real name, if necessary.
14678
14679 1998-10-30 Tom Tromey <tromey@cygnus.com>
14680
14681 * class.c (build_class_ref): Changed name of primitive classes to
14682 start with `_Jv_'.
14683
14684 * class.c (make_class_data): Renamed fields: nmethods to
14685 method_count, method_count to dtable_method_count. Always set
14686 `state' field to 0.
14687 * decl.c (init_decl_processing): Likewise.
14688
14689 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14690
14691 * class.c (layout_class): Don't mangle <finit>, produce
14692 __finit<class> instead. Don't verify artificial methods.
14693 * decl.c (finit_identifier_node): New declared global.
14694 (init_decl_processing): finit_identifier_node initialized.
14695 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
14696 * java-tree.h (finit_identifier_node): Declared as extern.
14697 (struct lang_decl): New field called_constructor.
14698 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
14699 (CLASS_HAS_FINIT_P): New macro.
14700 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
14701 explicit constructor invocation.
14702 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
14703 CALL_SUPER_CONSTRUCTOR_P): New macros.
14704 (write_classfile): Added prototype.
14705 * jcf-parse.c (jcf_parse_source): Parse and remember for
14706 generation if the file was seen on the command line.
14707 (parse_source_file): Don't write the class file here.
14708 (yyparse): Loop on files rewritten. Set current_jcf.
14709 (parse_zip_file_entries): Parse class file only if it was found.
14710 * lang.c (init_parse): Don't open command line provided filename
14711 here.
14712 (lang_parse): Don't set main_jcf anymore.
14713 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
14714 (JCONSTRUCTOR_CHECK): New macro.
14715 (JBSC_TYPE_P): New macro.
14716 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
14717 (COMPLETE_CHECK_OP_2): New macro.
14718 (struct parse_ctxt): New field explicit_constructor_p.
14719 (check_class_interface_creation): Fixed prototype indentation.
14720 (patch_method_invocation_stmt): Prototype reflects added argument.
14721 (patch_invoke): Likewise.
14722 (complete_method_declaration, build_super_invocation,
14723 verify_constructor_circularity,
14724 build_this_super_qualified_invocation, get_printable_method_name,
14725 patch_conditional_expr, maybe_generate_finit, fix_constructors,
14726 verify_constructor_super, create_artificial_method,
14727 start_artificial_method_body, end_artificial_method_body,
14728 generate_field_initialization_code): New function prototypes.
14729 * parse.y: Fixed leading comment
14730 (constructor_header:, constructor_body:, block_end:): Rules tagged
14731 <node>.
14732 (type_declaration:): Call maybe_generate_finit.
14733 (method_declaration:): Action for method_body: placed in new
14734 function complete_method_declaration, called here.
14735 (constructor_declaration:): Defined actions. Removed leading
14736 FIXME.
14737 (constructor_header:): New rule with action.
14738 (constructor_body:): Rule rewritten using block_begin: and
14739 block_end:. Defined actions.
14740 (constructor_declarator:, explicit_constructor_invocation:):
14741 Defined actions.
14742 (block:): Use new rules block_begin: block_end:.
14743 (block_begin:, block_end:): New rules and actions.
14744 (block_statements:): Fixed error message for explicit
14745 constructors.
14746 (method_invocation:): Call build_this_super_qualified_invocation
14747 if primary is `this' or `super' was seen.
14748 (conditional_expression:): Action defined.
14749 (extra_ctxp_pushed_p): New static global flag.
14750 (java_parser_context_save_global): Create parser context if
14751 necessary. Use extra_ctxp_pushed_p to remember it.
14752 (java_parser_context_restore_global): Pop extra parser context if
14753 one exists.
14754 (build_array_from_name): Array on primitive types are marked
14755 loaded.
14756 (register_fields): Restore new name in field initializer
14757 expression if type was altered. Non static fields initialized upon
14758 declaration marked initialized.
14759 (maybe_generate_finit): New function.
14760 (maybe_generate_clinit): Use create_artificial_method,
14761 start_artificial_method_body, end_artificial_method_body. Generate
14762 debug info for enclosed initialization statements.
14763 (method_header): Fixed leading comment. Check constructor
14764 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
14765 accordingly.
14766 (complete_method_declaration, constructor_circularity_msg,
14767 verify_constructor_circularity): New functions.
14768 (get_printable_method_name): New function.
14769 (check_method_redefinition): Don't rename <finit> methods. Fix
14770 declared constructor names. Error message for
14771 constructors modified.
14772 (java_check_regular_methods): Local variable seen_constructor
14773 renamed saw_constructor. Skip verification on constructors. Create
14774 default constructor with create_artificial_method.
14775 (java_check_methods): Removed unnecessary empty line.
14776 (create_artificial_method, start_artificial_method_body,
14777 end_artificial_method_body): New functions.
14778 (java_layout_classes): Changed leading comment. Reverse fields
14779 list if necessary. Always layout java.lang.Object if being
14780 defined.
14781 (java_complete_expand_methods): Verify constructor circularity.
14782 (java_complete_expand_method): Call fix_constructor on
14783 constructors. Local variable no_ac_found removed. Restore
14784 bindings if method body expansion failed.
14785 (fix_constructors, verify_constructor_super,
14786 generate_field_initialization_code): New function.
14787 (java_expand_classes): Fixed leading comment. Write class file
14788 here.
14789 (resolve_expression_name): Check for illegal instance variable
14790 usage within the argument scope of an explicit constructor
14791 invocation.
14792 (resolve_qualified_expression_name): Pass extra from_super flag
14793 when invoking patch_method_invocation_stmt. New case for
14794 conditional expression when used as a primary. Check for error
14795 when acquiring super.
14796 (patch_method_invocation_stmt): Added extra argument super. New
14797 local variable is_static_flag. Set class_to_search according to
14798 the nature of the constructor invocation. Don't add `this'
14799 argument when expanding NEW_CLASS_EXPR. Check for illegal method
14800 invocation within the argument scope of explicit constructor
14801 invocation. Set is_static according to is_static_flag. Provide
14802 extra `super' argument to patch_invoke invocation.
14803 (patch_invoke): New argument from_super. Loop on arguments
14804 indentation fixed. Pass from_super to invocation_mode. New switch
14805 case INVOKE_SUPER. Fixed error message in switch default case.
14806 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
14807 value.
14808 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
14809 (lookup_method_invoke): Fixed prototypes in candidates list. Error
14810 message takes constructors into account.
14811 (find_applicable_accessible_methods_list): Fixed indentation.
14812 (qualify_ambiguous_name): Take explicit constructor invocation
14813 into account. Deal with a conditional expression as a primary to
14814 a method call.
14815 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
14816 case. Added extra argument to patch_method_invocation_stmt.
14817 Register calls made to explicit constructor `this'. Don't call
14818 save_expr in ARRAY_REF case when emitting class files. Check for
14819 illegal use of this when expanding explicit constructor invocation
14820 arguments.
14821 (complete_function_arguments): Set and reset parser context
14822 explicit_constructor_p field value when appropriate.
14823 (build_super_invocation, build_this_super_qualified_invocation):
14824 New functions.
14825 (patch_assignment): Fixed typo.
14826 (patch_unaryop): Check on final fields occurs only when a decl
14827 exits.
14828 (patch_return): Take constructors into account.
14829 (patch_conditional_expr): New function.
14830 * typeck.c (build_java_signature): Removed unnecessary empty line.
14831
14832 1998-10-28 Jeffrey A Law (law@cygnus.com)
14833
14834 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
14835
14836 1998-10-28 Tom Tromey <tromey@cygnus.com>
14837
14838 * decl.c (init_decl_processing): Renamed fields.
14839 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
14840 interface_len, msize fields.
14841
14842 * class.c (make_class_data): Removed subclass_head and
14843 subclass_next fields.
14844 * decl.c (init_decl_processing): Removed subclass_head and
14845 subclass_next fields.
14846
14847 1998-10-28 Jeffrey A Law (law@cygnus.com)
14848
14849 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
14850 * mangle.c (emit_unicode_mangled_name): Similarly.
14851
14852 1998-10-26 Nick Clifton <nickc@cygnus.com>
14853
14854 * jcf-parse.c (get_constant): Place braces around code to compute
14855 'd' when REAL_ARITHMETIC is not defined.
14856
14857 1998-10-25 H.J. Lu (hjl@gnu.org)
14858
14859 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
14860 dependency.
14861
14862 1998-10-23 Tom Tromey <tromey@cygnus.com>
14863
14864 * lang-specs.h: `.zip' files are input to jc1.
14865
14866 1998-10-22 Per Bothner <bothner@cygnus.com>
14867
14868 * jvspecs.c: Add (but don't enable) support for combining multiple
14869 .class and .java input filenames to a single jc1 invocation.
14870 Add support for -C flag (copile to .class files).
14871 Translate -classpath and -CLASSPATH arguments.
14872 * lang-specs.h: Don't set %2 spec.
14873
14874 1998-10-22 Tom Tromey <tromey@cygnus.com>
14875
14876 * jcf-path.c (add_entry): Don't add trailing separator if entry is
14877 a .zip file.
14878 (add_path): Don't add trailing separator to non-empty path
14879 elements.
14880
14881 * lang.c (lang_decode_option): Check for -fclasspath and
14882 -fCLASSPATH before examining other `-f' options.
14883
14884 * java-tree.h (finalize_identifier_node): Don't declare.
14885 * class.c (make_class_data): Don't push "final" field.
14886 * decl.c (init_decl_processing): Don't push "final" field.
14887 (finalize_identifier_node): Removed.
14888 (init_decl_processing): Don't set finalize_identifier_node.
14889
14890 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
14891
14892 1998-10-11 Anthony Green <green@cygnus.com>
14893
14894 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
14895 (JV_SCAN_SOURCES): New macro.
14896 (JCF_DUMP_SOURCES): Likewise.
14897 (jcf-dump$(exeext)): New target.
14898 (jv-scan$(exeext)): New target.
14899
14900 1998-10-22 Tom Tromey <tromey@cygnus.com>
14901
14902 * Makefile.in (LEX): Removed.
14903 (LEXFLAGS): Likewise.
14904 (SET_BISON): New macro.
14905 (BISON): Removed.
14906 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
14907 spurious diffs in parse.c.
14908 ($(PARSE_SCAN_C)): Likewise.
14909 (PARSE_DIR): New macro.
14910 (PARSE_C): Use it.
14911 (PARSE_SCAN_C): Likewise.
14912 (PARSE_RELDIR): New macro.
14913
14914 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
14915
14916 * jcf-io.c (find_class): Use saw_java_source to determine when to
14917 look for `.java' file.
14918 * jcf-parse.c (saw_java_source): New global.
14919 (yyparse): Set it if `.java' file seen.
14920
14921 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
14922 (GCJH_SOURCES): Likewise.
14923 * Makefile.in (datadir): New macro.
14924 (libjava_zip): Likewise.
14925 (JAVA_OBJS): Added jcf-path.o.
14926 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
14927 (../gcjh$(exeext)): Likewise.
14928 (jcf-path.o): New target.
14929 * java-tree.h (fix_classpath): Removed decl.
14930 * jcf-parse.c (fix_classpath): Removed.
14931 (load_class): Don't call fix_classpath.
14932 * parse.y (read_import_dir): Don't call fix_classpath.
14933 * lex.h: Don't mention classpath.
14934 * lex.c (java_init_lex): Don't initialize classpath.
14935 * jcf-io.c (classpath): Removed global.
14936 (find_class): Use jcf_path iteration functions. Correctly search
14937 class path for .java file.
14938 (open_in_zip): New argument `is_system'.
14939 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
14940 classpath-related options.
14941 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
14942 and -I.
14943 (lang_init): Call jcf_path_init.
14944 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
14945 * lang-specs.h: Handle -I. Minor cleanup to -M options.
14946 Correctly put braces around second string in each entry.
14947 * gjavah.c (main): Call jcf_path_init. Recognize all the new
14948 classpath-related options.
14949 (help): Updated for new options.
14950 * jcf.h: Declare functions from jcf-path.c. Don't mention
14951 `classpath' global.
14952 * jcf-path.c: New file.
14953
14954 * jcf-depend.c: Include jcf.h.
14955
14956 * jcf-write.c (localvar_alloc): Returns `void'.
14957 (localvar_free): Removed unused variable.
14958
14959 * lang.c (OBJECT_SUFFIX): Define if not already defined.
14960 (init_parse): Use OBJECT_SUFFIX, not ".o".
14961
14962 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
14963
14964 * class.c (emit_register_classes): Renamed from
14965 emit_register_class.
14966 * java-tree.h (emit_register_classes): Prototype renamed from
14967 emit_register_class.
14968 * jcf-parse.c (yyparse): Call emit_register_classes once before
14969 returning.
14970 * parse.y (java_expand_classes): No longer register classes.
14971
14972 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14973
14974 * class.c (is_compiled_class): New local variable
14975 seen_in_zip. Identify classes found in currently compiled source
14976 file(s).
14977 * decl.c (complete_start_java_method): Fixed typo.
14978 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
14979 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
14980 (CLASS_P): Moved around.
14981 (java_parse_abort_on_error): Macro moved from jcf-parse.c
14982 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
14983 java-parse.h
14984 (jcf_parse_source): Changed leading comment. Removed unnecessary
14985 fclose and CLASS_FROM_SOURCE_P marking.
14986 (parse_source_file): New local variables remember_for_generation
14987 and filename. Mark parsed file name identifier node. Removed block
14988 executed when parse_only was null. Set remember_for_generation.
14989 Use it as an argument to java_pop_parser_context.
14990 (yyparse): New local variables several_files, list, next node and
14991 current_file_list. Split ampersand separated file names into
14992 current_file_list. Iterate through the list and parse accordingly.
14993 * parse.h (java_pop_parser_context): New function prototype.
14994 * parse.y (ctxp_for_generation): New static global variable.
14995 (java_pop_parser_context): New argument generate. Link popped ctxp
14996 to ctxp_for_generation list accordingly.
14997 (java_complete_expand_methods): Fixed indentation.
14998 (java_expand_classes): New function.
14999
15000 1998-10-17 Per Bothner <bothner@cygnus.com>
15001
15002 * Makefile.in: Link with libiberty.a instead of memmove.o.
15003
15004 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15005
15006 * lex.c (setjmp.h): No longer included.
15007 * lex.h (setjmp.h): Included.
15008 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
15009 (duplicate_declaration_error_p): Renamed from
15010 duplicate_declaration_error.
15011 (build_array_from_name): New function prototype.
15012 * parse.y (setjmp.h): No longer included.
15013 (variable_declarator_id): Define action.
15014 (build_array_from_name): New function.
15015 (duplicate_declaration_error_p): Renamed from
15016 duplicate_declaration_error. Fixed leading comment.
15017 (register_fields): Main `for' loop reorganized. Uses
15018 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
15019 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
15020 build_array_from_name.
15021 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
15022 types.
15023 (read_import_dir): Don't try to skip `.' and `..'.
15024 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
15025 build_array_from_name. Main `for' loop reorganized.
15026 (resolve_qualified_expression_name): When building access to a
15027 field, use the type where the field was found, not its own type.
15028 (maybe_access_field): Use field DECL_CONTEXT if the type where the
15029 field was found is null.
15030 (qualify_ambiguous_name): Sweep through all successive array
15031 dimensions.
15032
15033 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15034
15035 * java-tree.h (pop_labeled_block, lang_printable_name,
15036 maybe_add_interface, set_super_info, get_access_flags_from_decl,
15037 interface_of_p, inherits_from_p, fix_classpath,
15038 complete_start_java_method, emit_handlers, init_outgoing_cpool,
15039 make_class_data, register_class, alloc_name_constant): New
15040 function prototypes.
15041 * lang.c (lang_decode_option): Set argc argument unused. Fixed
15042 indentation. Added cast to remove warning.
15043 (lang_printable_name): Set v argument unused.
15044 (lang_print_error): Added argument to lang_printable_name call.
15045 (java_dummy_print, print_lang_decl, print_lang_type,
15046 print_lang_identifier, lang_print_xnode): All argument marked
15047 unused.
15048 * lex.c (java_unget_unicode): Removed unnecessary argument.
15049 (java_allocate_new_line): Unused local variable is gone.
15050 (java_read_char): Added parenthesis in expressions to remove
15051 warnings. Added final return statement.
15052 (java_read_unicode): Added parenthesis in expression to remove
15053 warning.
15054 (java_parse_end_comment): Fixed java_unget_unicode invocation.
15055 (java_parse_escape_sequence): Likewise.
15056 (java_lex): Unused local variables are gone. Fixed
15057 java_unget_unicode invocation.
15058 * lex.h (set_float_handler): Prototype added when JC1_LITE not
15059 defined.
15060 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
15061 lang_printable_name invocation in macro.
15062 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
15063 Likewise.
15064 (duplicate_declaration_error): Suppressed unused argument in
15065 prototype.
15066 (identical_subpath_p): Function declaration is gone.
15067 (patch_invoke): Suppressed unused argument in prototype.
15068 (patch_cast, build_labeled_block, check_thrown_exceptions):
15069 Likewise.
15070 * parse.y (setjmp.h): Included
15071 (toplev.h): Likewise.
15072 (field_declaration:): Suppressed unused local
15073 (label_decl:): Fixed build_labeled_block invocation.
15074 (java_pop_parser_context): Put extra parenthesis around assignment
15075 in if.
15076 (yyerror): Suppressed unused local variables.
15077 (variable_redefinition_error): Fixed lang_printable_name
15078 invocation.
15079 (create_interface): Suppressed unused local variables.
15080 (create_class): Likewise.
15081 (duplicate_declaration_error): Suppressed unused argument. Fixed
15082 lang_printable_name invocation.
15083 (register_fields): Suppressed unused local variable. Fixed
15084 duplicate_declaration_error invocation.
15085 (method_header): Suppressed unused local variable.
15086 (method_declarator, parser_check_super): Likewise.
15087 (java_complete_class): Suppressed unused local variable. Fixed
15088 fatal error message.
15089 (complete_class_report_errors): Added default: in switch.
15090 (java_check_regular_methods): Fixed lang_printable_name
15091 invocations.
15092 (check_throws_clauses): Likewise.
15093 (java_check_abstract_methods): Suppressed unused local
15094 variable. Fixed lang_printable_name invocation.
15095 (read_import_entry): Added supplemental return statement.
15096 (read_import_dir): Suppressed unused local variables.
15097 (check_pkg_class_access, declare_local_variables): Likewise.
15098 (source_start_java_method): Suppressed unused extern variable
15099 declarations
15100 (expand_start_java_method): Suppressed unused extern and local
15101 variable declarations.
15102 (java_complete_expand_methods): Likewise.
15103 (java_complete_expand_method): Suppressed unused local variables.
15104 (make_qualified_name): Likewise.
15105 (resolve_qualified_expression_name): Added default: in
15106 switch. Fixed lang_printable_name invocation.
15107 (class_instance_creation_expression): Added parenthesis around
15108 expressions.
15109 (patch_method_invocation_stmt): Fixed lang_printable_name and
15110 patch_invoke invocations.
15111 (check_for_static_method_reference): Fixed lang_printable_name
15112 invocation.
15113 (patch_invoke): Suppressed unused arguments and local variables.
15114 (lookup_method_invoke): Suppressed unused local variables.
15115 (qualify_ambiguous_name): Added default: in switch.
15116 (identical_subpath_p): Function removed.
15117 (patch_assignment): Suppressed unused local variables. Suppressed
15118 unnecessary if statement. Fixed lang_printable_name invocations.
15119 (try_builtin_assignconv): Fixed lang_printable_name invocations.
15120 (valid_ref_assignconv_cast_p): Parenthesis around
15121 expression. Suppressed unused local variables.
15122 (build_binop): Suppressed unused local variables. fixed
15123 lang_printable_name invocations.
15124 (string_constant_concatenation): Suppressed unused local
15125 variables.
15126 (patch_unaryop): Fixed lang_printable_name invocation.
15127 (patch_cast): Suppressed unnecessary argument. Fixed
15128 lang_printable_name invocation.
15129 (patch_array_ref): Fixed lang_printable_name invocation.
15130 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
15131 (build_labeled_block): Suppressed unused argument.
15132 (generate_labeled_block): Fixed build_labeled_block invocation.
15133 (build_loop_body): Suppressed unused local variables.
15134 (patch_loop_statement): Likewise.
15135 (patch_exit): Fixed lang_printable_name invocation.
15136 (patch_switch_statement): Likewise.
15137 (case_identity): First argument marked unused.
15138 (patch_try_statement): Fixed lang_printable_name invocations.
15139 (patch_synchronized_statement, patch_throw_statement): Likewise.
15140 (check_thrown_exceptions): Fixed check_thrown_exceptions and
15141 lang_printable_name invocations.
15142 (check_thrown_exceptions_do): Suppressed unused argument.
15143
15144 1998-10-14 Tom Tromey <tromey@cygnus.com>
15145
15146 * jcf-write.c (write_classfile): Add output class file as target.
15147 * lang-options.h: Added -MD, -MMD, -M, and -MM.
15148 * jcf.h: Added declarations for dependency-tracking functions.
15149 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
15150 * lang.c (lang_decode_option): Recognize -MD and -MMD.
15151 (finish_parse): Call jcf_dependency_write.
15152 (dependency_tracking): New global.
15153 (DEPEND_SET_FILE): New define.
15154 (DEPEND_ENABLE): New define.
15155 (init_parse): Enable dependency tracking if required.
15156 Include "flags.h".
15157 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
15158 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15159 (../gcjh$(exeext)): Likewise.
15160 (jcf-depend.o): New target.
15161 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
15162 (GCJH_SOURCES): Likewise.
15163 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
15164 dep_name argument.
15165 (find_classfile): Added dep_name argument.
15166 (find_class): Compute name of dependency.
15167 (open_in_zip): Call jcf_dependency_add_file.
15168 * gjavah.c (output_file): No longer global.
15169 (usage): Don't mention "gjavah".
15170 (help): Likewise.
15171 (java_no_argument): Likewise.
15172 (version): Likewise.
15173 (main): Recognize and handle -M family of options.
15174 (print_mangled_classname): Return is void.
15175 (process_file): Handle case where output is suppressed.
15176 (HANDLE_END_FIELD): Likewise.
15177 (HANDLE_METHOD): Likewise.
15178 * jcf-depend.c: New file.
15179
15180 1998-10-13 Jeffrey A Law (law@cygnus.com)
15181
15182 * java-tree.def: Add missing newline at EOF.
15183
15184 1998-10-13 Tom Tromey <tromey@cygnus.com>
15185
15186 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
15187 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
15188 function.
15189 Include <config.h> and "system.h".
15190 (disassemble_method): Undefine RET to avoid clash with
15191 config/i386/i386.h.
15192
15193 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15194
15195 * decl.c (runtime_exception_type_node, error_exception_type_node):
15196 New global variables.
15197 (init_decl_processing): Initialized.
15198 * expr.c (java_lang_expand_expr): Set caught exception type to
15199 null if catch handler argument doesn't exit.
15200 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
15201 tree codes.
15202 * java-tree.h (runtime_exception_type_node,
15203 error_exception_type_node): Global variables declared.
15204 (DECL_FUNCTION_THROWS): New macro.
15205 (DECL_FUNCTION_BODY): Modified comment.
15206 (DECL_SPECIFIC_COUNT): Likewise.
15207 (struct lang_decl): New field throws_list.
15208 (IS_UNCHECKED_EXPRESSION_P): New macro.
15209 * lex.c (java_lex): Generate location information for THROW_TK.
15210 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
15211 EXCEPTIONS_P): New macros.
15212 (enum jdep_code): New value JDEP_EXCEPTION.
15213 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
15214 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
15215 PATCH_METHOD_RETURN_ERROR): New macros.
15216 (patch_method_invocation_stmt): Added new argument to prototype.
15217 (patch_synchronized_statement, patch_throw_statement,
15218 check_thrown_exceptions, check_thrown_exceptions_do,
15219 purge_unchecked_exceptions, check_throws_clauses): New function
15220 prototypes.
15221 * parse.y Fixed typo in keyword section.
15222 (throw:): Rule tagged <node>.
15223 (THROW_TK): Keyword tagged <operator>.
15224 (method_header:): Last argument to call to method_header passed
15225 from throws: rule.
15226 (throws:, class_type_list:, throw_statement:,
15227 synchronized_statement:, synchronized:): Defined actions.
15228 (method_header): New local variable current. Register exceptions
15229 from throws clause.
15230 (java_complete_tree): Complete and verify exceptions from throws
15231 clause.
15232 (complete_class_report_errors): Error message on exceptions not
15233 found
15234 (java_check_regular_methods): Fixed typo. Shortcut on private
15235 overriding methods. Changed error message on method
15236 redefinition. Check for throws clause compatibility.
15237 (check_throws_clauses): New function.
15238 (java_check_abstract_methods): Use DECL_NAME for wfl or current
15239 method. Changed error message on method redefinition.
15240 (currently_caught_type_list): New static variable.
15241 (java_complete_expand_methods): Purge unchecked exceptions from
15242 throws clause list. Call PUSH_EXCEPTIONS before walk and
15243 POP_EXCEPTIONS after.
15244 (resolve_qualified_expression_name): Pass new argument as NULL to
15245 patch_method_invocation_stmt.
15246 (patch_method_invocation_stmt): New argument ref_decl. Invoke
15247 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
15248 argument list when appropriate. Use new argument if non null to
15249 store selected method decl.
15250 (patch_invoke): Convert if necessary args of builtin types before
15251 forming CALL_EXPR. Argument list no longer reversed here.
15252 (invocation_mode): Treat final methods as static methods.
15253 (java_complete_tree): New cases for THROW_EXPR: and
15254 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
15255 function call.
15256 (complete_function_arguments): No more RECORD_TYPE
15257 conversion. Function parameter nodes no longer saved.
15258 (valid_ref_assignconv_cast_p): Avoid handling null type.
15259 (patch_binop): Fixed null constant reference handling.
15260 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
15261 BUILD_THROW macros.
15262 (patch_try_statement): Fixed comments. Record caught types in
15263 list, push the list, expand try block and pop the list.
15264 (patch_synchronized_statement, patch_throw_statement,
15265 check_thrown_exceptions, check_thrown_exceptions_do,
15266 purge_unchecked_exceptions): New functions.
15267 * typeck.c (lookup_argument_method): Allow WFL in place of method
15268 DECL_NAME during method definition check
15269
15270 1998-10-09 Tom Tromey <tromey@cygnus.com>
15271
15272 * gjavah.c (decode_signature_piece): New function.
15273 (print_c_decl): Use it. Added `name_override' argument.
15274 (print_method_info): Use name_override argument to print_c_decl.
15275 (seen_fields): Removed.
15276 (print_field_info): Don't update seen_fields.
15277 (struct method_name): New structure.
15278 (method_name_list): New global.
15279 (print_method_info): Add new method to list of methods.
15280 (name_is_method_p): New function.
15281 (print_field_info): If field name has same name as method, then
15282 change field name.
15283 (process_file): Parse methods before fields.
15284 (field_pass): New global.
15285 (HANDLE_END_FIELD): Take field_pass into account.
15286
15287 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15288
15289 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
15290 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
15291
15292 1998-10-03 Anthony Green <green@cygnus.com>
15293
15294 * jvspec.c: Fix bug in jvgenmain_spec patch.
15295
15296 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15297
15298 * Makefile.in (lang.o:): Install dependency on java-tree.def.
15299 * decl.c (soft_exceptioninfo_call_node): New global variable.
15300 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
15301 takes extra integer argument. soft_exceptioninfo_call_node
15302 initialized.
15303 * except.c (java_set_exception_lang_code): New function
15304 (method_init_exceptions): Called here.
15305 (prepare_eh_table_type): New function.
15306 (expand_end_java_handler): Called here.
15307 * expr.c (build_java_throw_out_of_bounds_exception): Now features
15308 one argument. Modified generation of call to
15309 soft_badarrayindex_node to use new argument.
15310 (build_java_arrayaccess): Pass faulty index value to
15311 build_java_throw_out_of_bounds_exception.
15312 (generate_name): New function.
15313 (java_lang_expand_expr): New local variables node, current,
15314 has_finally_p. Expand TRY_EXPR node.
15315 (process_jvm_instruction): Replace top of the stack with thrown
15316 object reference when entering exception handler.
15317 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
15318 specific tree codes.
15319 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
15320 global.
15321 (DECL_SPECIFIC_COUNT): New macro.
15322 (prepare_eh_table_type, java_set_exception_lang_code,
15323 generate_name): New function declarations.
15324 (match_java_method): Declaration deleted.
15325 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
15326 macros.
15327 * lex.c (TRY_TK, CATCH_TK): Generate location information.
15328 * parse.h (redefinition_error, refine_accessible_methods_list,
15329 can_cast_to_p): Function declaration removed.
15330 (classitf_redefinition_error, variable_redefinition_error,
15331 parse_jdk1_1_error, find_applicable_accessible_methods_list,
15332 find_most_specific_methods_list, argument_types_convertible,
15333 enter_a_block, valid_builtin_assignconv_identity_widening_p,
15334 valid_cast_to_p, valid_method_invocation_conversion_p,
15335 try_reference_assignconv, add_stmt_to_compound,
15336 build_jump_to_finally, build_tree_list, patch_try_statement,
15337 java_get_catch_block): New function declarations.
15338 * parse.y (string_buffer_type): Global variable deleted.
15339 (group_of_labels, catches, catch_clause, catch_clause_parameter,
15340 finally): Rules tagged <node>.
15341 (TRY_TK, CATCH_TK): Token tagged <operator>.
15342 (class_body_declaration:, class_member_declaration:,
15343 formal_parameter:, explicit_constructor_invocation:,
15344 interface_member_declaration:, constant_declaration:,
15345 primary_no_new_array:, class_instance_creation_expression:,
15346 array_creation_expression:): Issue error on unsuported JDK1.1
15347 features.
15348 (try_statement:, catches:, finally:): Define actions.
15349 (catch_clause_parameter): New rule.
15350 (catch_clause:): Use new rule catch_clause_parameter.
15351 (parse_jdk1_1_error): New function.
15352 (redefinition_error): Renamed classitf_redefinition_error.
15353 (variable_redefinition_error): New function.
15354 (check_class_interface_creation): Call
15355 classitf_redefinition_error.
15356 (java_complete_tree): Added error message on JDEP_TYPE: case.
15357 (complete_class_report_errors): Fixed indentation.
15358 (declare_local_variables): Call variable_redefinition_error.
15359 (source_end_java_method): Call java_set_exception_lang_code and
15360 emit_handlers where appropriate.
15361 (java_method_add_stmt): Call add_stmt_to_block.
15362 (add_stmt_to_block): New function.
15363 (lookup_method_invoke): Fixed outside comment. new local variable
15364 candicates. Call find_applicable_accessible_methods_list and
15365 find_most_specific_methods_list when searching for a
15366 method. Modified error report to list possible candidates when
15367 applicable.
15368 (find_applicable_accessible_methods_list,
15369 find_most_specific_methods_list, argument_types_convertible): New
15370 function.
15371 (refine_accessible_methods_list): Function deleted.
15372 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
15373 expr (if applicable) before calling patch_array_ref.
15374 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
15375 (enter_block): Fixed comment.
15376 (enter_a_block): New function.
15377 (patch_assignment): Reorganized. Call try_reference_assignconv for
15378 references. Call valid_cast_to_p instead of can_cast_to_p.
15379 (try_reference_assignconv,
15380 valid_builtin_assignconv_identity_widening_p): New functions.
15381 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
15382 (valid_cast_to_p, valid_method_invocation_conversion_p): New
15383 functions.
15384 (build_string_concatenation): Don't resolve StringBuffer.
15385 (patch_cast): Fixed inverted arguments.
15386 (patch_array_ref): Code to save array expr deleted. Call
15387 valid_cast_to_p instead of can_cast_to_p.
15388 (generate_labeled_block): Call generate_name.
15389 (build_jump_to_finally, build_try_statement, java_get_catch_block,
15390 patch_try_statement): New functions.
15391 * typeck.c (match_java_method): Function deleted.
15392
15393 1998-10-02 Anthony Green <green@cygnus.com>
15394
15395 * jvspec.c: jvgenmain_spec uses different temporary file names.
15396
15397 1998-10-02 Anthony Green <green@cygnus.com>
15398
15399 * jvspec.c (lang_specific_driver): Fail if user specifies
15400 --main= when not linking.
15401
15402 1998-09-28 Tom Tromey <tromey@cygnus.com>
15403
15404 * class.c (make_class_data): Push value for `thread' field.
15405 * decl.c (init_decl_processing): Added `thread' field to class.
15406
15407 * class.c (add_field): Always make static fields externally
15408 visible.
15409
15410 1998-09-26 Anthony Green <green@cygnus.com>
15411
15412 * expr.c (build_java_athrow,
15413 build_java_throw_out_of_bounds_exception, expand_invoke,
15414 build_newarray, expand_java_multianewarray, build_java_monitor):
15415 Update comments to reflect _Jv_* function names.
15416
15417 1998-09-25 Per Bothner <bothner@cygnus.com>
15418
15419 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
15420 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
15421 * parse.y (expand_start_java_method): Likewise.
15422
15423 1998-09-24 Per Bothner <bothner@cygnus.com>
15424
15425 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
15426
15427 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
15428 (add_field): No longer need to convert from RECORD_TYPE to pointer,
15429 * expr.c: Remove no-longer-needed calls to promote_type.
15430 * decl.c (give_name_to_locals): Liekwise.
15431 * jcf-parse.c (get_class_constant): Compensate for new signatures.
15432 * parse.y: Add/remove promote_type calls as appropriate.
15433 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
15434 (parse_signature_string): Likewise.
15435 (build_java_array_type): Fix for now signature convenions.
15436
15437 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
15438
15439 1998-09-23 Tom Tromey <tromey@cygnus.com>
15440
15441 * class.c (init_class_processing): libjava function renamed to
15442 _Jv_RegisterClass.
15443
15444 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15445
15446 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
15447 * java-tree.def: Fixed DEFTREECODE third argument.
15448 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
15449 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
15450 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
15451 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15452 JAVA_THIS_EXPR): Now replaced by tree code definitions.
15453 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
15454 * lang.c (java_tree_code_type, java_tree_code_length,
15455 java_tree_code_name): New arrays.
15456 (lang_init): Append Java tree node definitions to Gcc ones.
15457 * lex.c (expression_obstack): Declared as extern when JC1_LITE
15458 defined.
15459 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
15460 wfl_to_string.
15461 (java_lex): Allow declaration of empty string constants. Retain
15462 location information on CASE_TK and DEFAULT_TK.
15463 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
15464 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
15465 Modified to be more robust.
15466 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
15467 (build_new_invocation, try_builtin_assignconv,
15468 patch_switch_statement, string_constant_concatenation,
15469 build_string_concatenation, patch_string_cst, patch_string,
15470 java_expand_switch): New function declarations.
15471 * parse.y: Rules related to switch and EH tagged <node>.
15472 (label_id): Set to NULL_TREE
15473 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
15474 tree nodes.
15475 (this_or_super:): Fixed indentation.
15476 (statement:, statement_nsi:, statement_without_trailing_substatement:,
15477 statement_expression:): Removed call to RULE on all sub-rules.
15478 (switch_expression:, switch_labels:): New rules.
15479 (switch_statement:, switch_block:, switch_block_statement_groups:,
15480 switch_block_statement_group:, switch_labels:, switch_label:):
15481 Defined actions.
15482 (throw_statement:, synchronized_statement:, try_statement:):
15483 Defined temporary actions.
15484 (class_instance_creation_expression:): Call
15485 build_new_invocation. Fixed indentation.
15486 (field_access): Fixed indentation.
15487 (method_invocation): Likewise.
15488 (make_qualified_primary): Use THIS_EXPR.
15489 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
15490 resolving from SUPER, set *type_found.
15491 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
15492 (java_complete_tree): Removed unused local variable `location'. Case
15493 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
15494 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
15495 on MODIFY_EXPR: and all binary operator tree code cases. Removed
15496 STRING_CST: case. default: checks for patchable strings.
15497 (complete_function_arguments): Transform string constant or
15498 crafted StringBuffer if necessary.
15499 (build_method_invocation): Fixed comments.
15500 (build_new_invocation): New function.
15501 (patch_assignment): Call try_builtin_assignconv to figure a valid
15502 assignment conversion between builtin types.
15503 (try_builtin_assignconv): New function.
15504 (build_binop): Use URSHIFT_EXPR directly to call build.
15505 (operator_string): Use UNARY_PLUS_EXPR.
15506 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
15507 operator.
15508 (do_merge_string_cste, merge_string_cste,
15509 string_constant_concatenation, build_string_concatenation,
15510 patch_string, patch_string_cst): New function.
15511 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
15512 (patch_unaryop): Likewise. New test of valid ++/-- operands.
15513 (build_newarray_node): Use NEW_ARRAY_EXPR.
15514 (build_this): Use THIS_EXPR.
15515 (build_return): Enable debug information on return statement.
15516 (build_if_else_statement): Likewise.
15517 (complete_labeled_statement): Fixed related comment.
15518 (build_loop_body): Fixed comment.
15519 (build_bc_statement): Enable debug information on break/continue
15520 statements.
15521 (patch_bc_statement): Fixed typos. Handle SWITCH statement
15522 context.
15523 (patch_switch_statement, case_identity, java_expand_switch): New
15524 functions.
15525
15526 1998-09-21 Per Bothner <bothner@cygnus.com>
15527
15528 * buffer.h (BUFFER_INIT): New macro.
15529 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
15530 Pass (struct jcf_partial *state) to most functions.
15531 (jcf_block, jcf_relocation): New types.
15532 Support labels, branches, conditionals, loops.
15533
15534 1998-09-21 Tom Tromey <tromey@cygnus.com>
15535
15536 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
15537
15538 1998-09-21 Per Bothner <bothner@cygnus.com>
15539
15540 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
15541 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
15542 not integer_type_node (INT_TYPE_SIZ bits).
15543
15544 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
15545
15546 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
15547 * jcf-dump.c (print_exception_table): New function.
15548 (disassemble_method): Better handling of wide instructions.
15549 Make more robust for bad input.
15550
15551 1998-09-30 Jeffrey A Law (law@cygnus.com)
15552
15553 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
15554 FreeBSD.
15555
15556 1998-09-17 Jeffrey A Law (law@cygnus.com)
15557
15558 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
15559
15560 1998-09-17 Tom Tromey <tromey@cygnus.com>
15561
15562 * Makefile.in ($(PARSE_H)): Removed target.
15563
15564 1998-09-17 Jeffrey A Law (law@cygnus.com)
15565
15566 * Makefile.in (JAVA_OBJS): Add memmove.o
15567 (memmove.o): New target & rules.
15568
15569 1998-09-15 Tom Tromey <tromey@cygnus.com>
15570
15571 * expr.c (expand_invoke): Don't generate a call to the class init
15572 code.
15573
15574 1998-09-14 Jeffrey A Law (law@cygnus.com)
15575
15576 * Makefile.in: Add many missing dependencies.
15577 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
15578 as appropriate.
15579 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
15580 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
15581
15582 1998-09-11 Per Bothner <bothner@cygnus.com>
15583
15584 * decl.c (complete_start_java_method): If method is static (and
15585 not private) call _Jv_InitClass.
15586 * expr.c (expand_invoke): Don't call build_class_init.
15587
15588 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
15589
15590 1998-09-10 Jeffrey A Law (law@cygnus.com)
15591
15592 * Make-lang.in (GCJ): Define before using.
15593
15594 1998-09-09 Jeffrey A Law (law@cygnus.com)
15595
15596 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
15597 losing due to namespace pollution in GNU getopt.h
15598
15599 1998-09-09 Tom Tromey <tromey@cygnus.com>
15600
15601 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
15602 (java.all.cross): Likewise.
15603 (java.rest.encap): Likewise.
15604
15605 1998-09-08 Jeffrey A Law (law@cygnus.com)
15606
15607 * gjavah.c (print_class_decls): Fix thinko in arglist
15608 * jcv-io.c (find_classfile): Similarly.
15609
15610 1998-09-07 Jeffrey A Law (law@cygnus.com)
15611
15612 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
15613
15614 1998-09-05 Tom Tromey <tromey@cygnus.com>
15615
15616 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
15617 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
15618 * Makefile.in (PARSE_C): New macro.
15619 (PARSE_H): Likewise.
15620 (PARSE_SCAN_C): Likewise.
15621 ($(PARSE_C)): Target renamed from parse.c.
15622 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
15623 (clean): Remove parse-scan.c as well.
15624 (parse.o): Depend on $(PARSE_C).
15625
15626 1998-09-05 Anthony Green <green@cygnus.com>
15627
15628 * README, license.terms: Removed.
15629
15630 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
15631 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
15632 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
15633 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
15634 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
15635 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
15636 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
15637 and Java trademark attribution.
15638
15639 1998-09-04 Tom Tromey <tromey@cygnus.com>
15640
15641 * Makefile.in: Use gcjh, not gjavah.
15642 * config-lang.in (stagestuff): Use gcjh, not gjavah.
15643 * Make-lang.in: Changed gjavah to gcjh everywhere.
15644
15645 1998-09-03 Per Bothner <bothner@cygnus.com>
15646
15647 * gjavah.c: Support new -prepend -add -append flags.
15648 (print_method_info): Method is not virtual if class is final.
15649
15650 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15651
15652 * jv-scan.c: Fixed copyright assignment.
15653 * keyword.gperf: Likewise.
15654 * keyword.h: Likewise.
15655 * lex.c: Fixed copyright assignment.
15656 (java_lex): Push unicode back when parsing '<'.
15657 * lex.h: Fixed copyright assignment.
15658 * parse-scan.y: Likewise.
15659 * parse.h: Fixed copyright assignment.
15660 (build_debugable_stmt, complete_for_loop): New function prototypes.
15661 * parse.y: Fixed copyright assignment.
15662 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
15663 size_zero_node when completing a loop with no exit condition.
15664 (for_statement_nsi:): Define action.
15665 (for_init:, for_update:): Return size_zero_node when empty.
15666 (declare_local_variables): Call build_debugable_stmt.
15667 (build_debugable_stmt): New function.
15668 (build_loop_body): Build debugable statement around loop
15669 condition part.
15670 (complete_loop_body): Take into account the debugable statement
15671 around the EXIT_EXPR.
15672 (complete_loop_body): New function.
15673 (patch_exit_expr): Fixed condition inversion.
15674
15675 1998-09-02 Tom Tromey <tromey@cygnus.com>
15676
15677 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
15678 name of thread define.
15679 * jvspec.c (THREAD_NAME): New macro.
15680 (GCLIB): Likewise.
15681 (THREADLIB): Likewise.
15682 (lang_specific_driver): Recognize attempt to link with thread
15683 library or gc library. Recognize -ljava on command line so it
15684 isn't linked against more than once.
15685
15686 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15687
15688 * parse-scan.y (report_main_declaration): Name of the class
15689 containing `main' can be a qualified name.
15690
15691 1998-08-31 Tom Tromey <tromey@cygnus.com>
15692
15693 * config-lang.in: Changed gjavac to gjc everywhere.
15694 * Make-lang.in: Changed gjavac to gjc everywhere.
15695
15696 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15697
15698 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
15699 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
15700 and install the files.
15701 * Makefile.in (JAVA_OBJS_LITE): New variable.
15702 (compiler:): Now include jv-scan as a dependency.
15703 (../jv-scan$(exeext), parse-scan.c): New targets.
15704 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
15705 * config-lang.in (compilers): Removed gcj, gjavah from the list.
15706 * jcf-parse.c (parse_source_file): Call java_layout_classes and
15707 check for errors even if parse_only.
15708 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
15709 defined.
15710 (yylex): New function. Uses java_lex body.
15711 (java_lex): Removed commented out statement. Remove local variable
15712 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
15713 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
15714 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
15715 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
15716 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
15717 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
15718 where appropriate.
15719 (java_lex_error): Empty if JC1_LITE is defined.
15720 (java_get_line_col): Return 0 if JC1_LITE is defined.
15721 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
15722 SET_MODIFIER_CTX): Moved into the section containing the macros
15723 conditionally defined by JC1_LITE.
15724 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
15725 argument if JC1_LITE is defined.
15726 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
15727 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
15728 is defined.
15729 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
15730 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
15731 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
15732 to different values according to JC1_LITE.
15733 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
15734 declared if JC1_LITE set.
15735 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
15736 defined if JC1_LITE not set.
15737 (struct parser_ctx): Reorganized and skip the jc1 front end part
15738 if JC1_LITE set.
15739 (java_layout_classes): New function definition.
15740 (java_push_parser_context, java_init_lex, yyparse, yylex,
15741 yyerror): Prototype always declared. All other static function
15742 prototypes declared only if JC1_LITE is not set.
15743 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
15744 declared in parse.h.
15745 (java_layout_classes): New function.
15746 (java_complete_expand_methods): No longer layout the class here.
15747 * parse-scan.y: New file.
15748 * jv-scan.c: New file.
15749
15750 1998-08-25 Tom Tromey <tromey@cygnus.com>
15751
15752 * gjavah.c (main): Handle -friend option.
15753 (friend_specs): New global.
15754 (generate_access): Handle friend_specs.
15755 (process_file): Likewise.
15756 (MAX_FRIENDS): New macro.
15757 (friend_count): New global.
15758 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
15759 Changed all callers.
15760
15761 1998-08-24 Per Bothner <bothner@cygnus.com>
15762
15763 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
15764 (main): Handle processing all the entries of a named .zip archive.
15765 * jcf-io.c (jcf_trim_old_input): New function.
15766 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
15767
15768 1998-08-24 Per Bothner <bothner@cygnus.com>
15769
15770 * lang.c (flag_assume_compiled): Make default be on.
15771
15772 1998-08-21 Per Bothner <bothner@cygnus.com>
15773
15774 * jcf-dump.c: Add bunches of flags to control output more.
15775 (process_class): New function; support printing more than one class.
15776 (main): Support new --print-main and --javap flags.
15777 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
15778 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
15779
15780 1998-08-20 Per Bothner <bothner@cygnus.com>
15781
15782 Change mangling of dispatch table to match C++ vtable (w/thunks).
15783 * class.c (build_dtable_decl), java-tree.h: New function.
15784 (make_class_data): Call it.
15785 * decl.c (init_decl_processing): Likewise.
15786
15787 1998-08-19 Warren Levy <warrenl@cygnus.com>
15788
15789 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
15790 soft_anewarray; adjust args passed.
15791 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
15792 match _Jv_NewObjectArray.
15793
15794 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15795
15796 * decl.c (push_labeled_block, pop_labeled_block): New functions.
15797 * expr.c (loopup_label): Call create_label_decl.
15798 (create_label_decl): New function.
15799 (java_lang_expand_expr): Call expand_start_bindings with argument
15800 set to zero.
15801 * java-tree.h Added space after PROTO in function declarations
15802 when necessary.
15803 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
15804 (create_label_decl, push_labeled_block): New function
15805 declarations.
15806 * lex.c (label_id): Initialize.
15807 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
15808 switch.
15809 * parse.h Added space after PROTO in function declarations when
15810 necessary.
15811 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
15812 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
15813 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
15814 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
15815 macros.
15816 (struct parser_ctxt): New fields current_loop,
15817 current_labeled_block.
15818 (build_if_else_statement, patch_if_else_statement,
15819 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
15820 generate_labeled_block, complete_labeled_statement,
15821 build_bc_statement, patch_bc_statement, patch_loop_statement,
15822 build_new_loop, build_loop_body, complete_loop_body): New function
15823 declarations.
15824 * parse.y (java_warning_count): New global variable.
15825 (label_id): New static variable.
15826 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
15827 (block:): Return size_zero_node when block is empty.
15828 (empty_statement:): Return size_zero_node.
15829 (statement:): Implement supplemental action when for_statement: is
15830 reduced.
15831 (label_decl:): New rule.
15832 (labeled_statement:): Rewritten using label_decl. Actions
15833 implemented.
15834 (labeled_statement_nsi:): Likewise.
15835 (if_then_statement): Actions implemented.
15836 (while_expression): New rule.
15837 (while_statement:): Rewritten using while_expression. Actions
15838 implemented.
15839 (while_statement_nsi:): Likewise.
15840 (do_statement_begin:): New rule.
15841 (do_statement:): Rewritten using do_statement_begin. Actions
15842 implemented.
15843 (for_statement:): Rewritten using for_begin. Actions implemented.
15844 (for_statement_nsi:): Likewise.
15845 (for_header:, for_begin:): New rules.
15846 (for_init:): Actions implemented.
15847 (statement_expression_list:, break_statement:,
15848 continue_statement:): Likewise.
15849 (yyerror): Count number of issued warning(s).
15850 (java_report_errors): Report error(s) and/or warning(s).
15851 (java_complete_class): Use build_java_argument_signature to
15852 recompute completed method signature.
15853 (java_check_regular_methods): New locals method_wfl and aflags.
15854 Use method_wfl instead of lookup_cl during error reports. Fixed
15855 indentation and modified some error messages. Use
15856 lang_printable_name in method instead of the DECL_NAME. New code
15857 to issue warnings on methods not overriding corresponding methods
15858 private to a different package.
15859 (java_method_add_stmt): Call add_stmt_to_compound.
15860 (add_stmt_to_compound): New function.
15861 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
15862 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
15863 (build_if_else_statement, patch_if_else_statement,
15864 build_labeled_block, generate_labeled_block,
15865 complete_labeled_statement, build_new_loop, build_loop_body,
15866 complete_loop_body, patch_loop_statement, build_bc_statement,
15867 patch_bc_statement, patch_exit_expr): New functions.
15868 * typeck.c (build_java_signature): Build argument signature before
15869 enclosing it in between parenthesis.
15870
15871 1998-08-17 Warren Levy <warrenl@cygnus.com>
15872
15873 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
15874 (JAVA_OBJS): Added reminder comment
15875
15876 1998-08-13 Nick Clifton <nickc@cygnus.com>
15877
15878 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
15879 be interpreted as a long long.
15880
15881 1998-08-13 Warren Levy <warrenl@cygnus.com>
15882
15883 * decl.c (init_decl_processing): Use _Jv_InitClass, not
15884 soft_initialise_class. Use _Jv_NewMultiArray, not
15885 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
15886 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
15887 _Jv_CheckArrayStore, not soft_checkarraystore. Use
15888 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
15889
15890 1998-08-12 Per Bothner <bothner@cygnus.com>
15891
15892 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
15893 length_identifier_node): New global tree node constants.
15894 * parse.y (kw_super, kw_this, kw_length): Removed globals.
15895 Replace uses by super_identifier_node etc.
15896 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
15897
15898 * parse.y (resolve_field_access): Don't special-case ".length" if
15899 flag_emit_class_files.
15900 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
15901 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
15902 and ARRAY.length.
15903
15904 1998-08-11 Per Bothner <bothner@cygnus.com>
15905
15906 * decl.c (init_decl_processing): Remove unused method_type_node fields.
15907 * class.c (make_method_value): Remove init for removed fields.
15908
15909 * class.c (layout_class): Use build_java_argument_signature.
15910 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
15911
15912 * typeck.c (push_java_argument_signature): Removed. Merged into ...
15913 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
15914 (build_java_signature): Don't use push_java_argument_signature.
15915
15916 * typeck.c (lookup_argument_method): New function.
15917 * parse.y (java_check_regular_methods): Use lookup_argument_method
15918 instead of lookup_java_method2 followed by lookup_java_method.
15919
15920 * parse.y (check_method_redefinition): Minor optimization.
15921
15922 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
15923 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
15924
15925 1998-08-10 Tom Tromey <tromey@cygnus.com>
15926
15927 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
15928 c-pragma.o.
15929
15930 * gjavah.c (java_float_finite): Use K&R-style definition.
15931 (java_double_finite): Likewise.
15932 (generate_access): Now returns void. Changed all callers.
15933 (last_access_generated): Removed.
15934 (process_file): Only make a single pass over the .class file.
15935
15936 1998-07-29 Per Bothner <bothner@cygnus.com>
15937
15938 * class.c (get_dispatch_table): Add extra dummy vtable entry,
15939 for compatibility for G++ (with -fvtable-thunks).
15940 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
15941
15942 * gjavah.c (process_file): Use public inheritance for super-class.
15943
15944 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15945
15946 * lex.c (java_init_lex): Initialize ctxp->package.
15947 * parse.h (struct parser_ctxt): package and package_len replaced
15948 by tree package, an identifier node. Field method_decl_list is
15949 gone. Fixed comments.
15950 (lookup_field_wrapper, merge_qualified_name, not_accessible,
15951 class_in_current_package): New function prototypes.
15952 * parse.y (array_type:): Set class loaded flag on primitive type
15953 arrays.
15954 (package_declaration:): Assign ctxp->package to the
15955 identifier node.
15956 (method_invocation:): Handle invocation of method qualified by
15957 `super'.
15958 (single_type_import_declaration:): Removed ambiguity check.
15959 (java_pop_parser_context): New local variable `next'. Reset and
15960 set IMPORT_CLASSFILE_NAME flags on current and previous import
15961 list.
15962 (java_accstring_lookup): Use new local macro COPY_RETURN.
15963 (lookup_field_wrapper): New function.
15964 (parser_qualified_classname): Use merge_qualified_name.
15965 (parser_check_super_interface): Broaden error message.
15966 (do_resolve_class): Check for qualified class name in the current
15967 compilation unit if appropriate.
15968 (process_imports): Check for already defined classes.
15969 (check_pkg_class_access): Got rid of call to
15970 get_access_flags_from_decl.
15971 (java_complete_expand_methods): Call safe_layout_class based on
15972 the current class size.
15973 (make_qualified_primary): Build a WFL qualification on primary if
15974 none exists.
15975 (merge_qualified_name): New function.
15976 (make_qualified_name): Use merge_qualified_name.
15977 (resolve_expression_name): Use safe_lookup_field.
15978 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
15979 (resolve_qualified_expression_name): Likewise. Check on resolved
15980 element accessibility.
15981 (not_accessible_p, class_in_current_package): New functions.
15982 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
15983 (patch_method_invocation_stmt): Merged common pieces. Check
15984 accessibility of invoked method.
15985 (check_for_static_method_reference): Add returned type in error
15986 message.
15987 (invocation_mode): Get rid of bogus check on PRIVATE methods.
15988 (refine_accessible_methods_list): Merged two conditions in test.
15989 (java_complete_class): Sanity check on stabilize_ref gone.
15990 * zextract.c (read_zip_archive): Cast lseek second argument to long.
15991
15992 1998-07-28 Per Bothner <bothner@cygnus.com>
15993
15994 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
15995
15996 1998-07-24 Tom Tromey <tromey@cygnus.com>
15997
15998 * gjavah.c (F_NAN): Removed.
15999 (F_NAN_MASK): New macro.
16000 (F_POSITIVE_INFINITY): Removed.
16001 (F_NEGATIVE_INFINITY): Likewise.
16002 (java_float_finite): Rewrote.
16003 (D_NAN_MASK): Renamed.
16004 (java_double_finite): Rewrote.
16005 (D_POSITIVE_INFINITY): Removed.
16006 (D_NEGATIVE_INFINITY): Likewise.
16007
16008 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
16009 If verbose, print underlying representation of value in hex.
16010
16011 1998-07-24 Per Bothner <bothner@cygnus.com>
16012
16013 * buffer.h, buffer.c: New files.
16014 * Makefile.in (JAVA_OBJS): Add buffer.o.
16015
16016 Support locals variables and writing their debug entries to .class.
16017 * jcf-write.c: Simplify some by user new buffer type.
16018 (vode_buffer_grow): Removed.
16019 (struct localvar_info): New type.
16020 (localsvars, localvartable): New buffers.
16021 (localvar_alloc, localvar_free): New functions.
16022 (generate_bytecode_insns): Handle local variables.
16023 (generate_classfile): Write LocalVariableTable attribute.
16024
16025 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16026
16027 * jcf-io.c (open_in_zip): Check the zipfile magic number.
16028 * zipfile.h (ZIPMAGIC): New macro.
16029
16030 1998-07-24 Tom Tromey <tromey@cygnus.com>
16031
16032 * Makefile.in (gjavah.o): Updated dependencies.
16033 (jcf-dump.o): Likewise.
16034 (all.indirect): Use ../gjavah.
16035 (../gjavah$(exeext)): Likewise.
16036 (clean): Don't remove gjavah.
16037 (clean): Remove parse.c, not java/parse.c.
16038 * Make-lang.in (java): Added gjavah.
16039 (gjavah$(exeext)): New target.
16040 (GJAVAH_SOURCES): New macro.
16041 (java.all.build): Added gjavah.
16042 (java.all.cross): Likewise.
16043 (java.rest.encap): Likewise.
16044 * config-lang.in (compilers, stagestuff): Added gjavah.
16045
16046 1998-07-23 Tom Tromey <tromey@cygnus.com>
16047
16048 * gjavah.c (java_float_finite): New function.
16049 (java_double_finite): Likewise.
16050 (F_POSITIVE_INFINITY): New macro.
16051 (F_NEGATIVE_INFINITY): Likewise.
16052 (F_NAN): Likewise.
16053 (D_POSITIVE_INFINITY): Likewise.
16054 (D_NEGATIVE_INFINITY): Likewise.
16055 (D_NAN): Likewise.
16056 (print_field_info): Use java_float_finite and java_double_finite.
16057
16058 1998-07-23 Per Bothner <bothner@cygnus.com>
16059
16060 * parse.y (method_header): Name "this" implicit argument.
16061
16062 1998-07-22 Per Bothner <bothner@cygnus.com>
16063
16064 * jcf-write.c: Write out LineNumberTable attribute in .class file.
16065 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
16066 (put_linenumber): New function.
16067 (generate_bytecode_insns, generate_classfile): Write line numbers.
16068
16069 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16070
16071 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
16072 (lookup_name, build_known_method_ref, build_class_init,
16073 build_invokevirtual, invoke_build_dtable, match_java_method,
16074 build_field_ref, pushdecl_force_head, build_java_binop,
16075 binary_numeric_promotion, build_decl_no_layout,
16076 build_java_arrayaccess, build_newarray, build_anewarray,
16077 build_java_array_length_access, build_java_arraynull_check): New
16078 extern function prototypes.
16079 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16080 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
16081 java-tree.h.
16082 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
16083 to NULL
16084 * jcf.h (jcf_out_of_synch): New extern function prototype.
16085 * parse.h: Static/global function implemented in parse.y
16086 prototyped and declarations moved at the end of the file.
16087 (DECL_P): Check that the argument isn't null.
16088 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16089 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
16090 (QUAL_DECL_TYPE): New macro.
16091 (PARAMS): Macro definition removed.
16092 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
16093 (return_statement:): Call build_return.
16094 (field_access:): Call make_qualified_primary in sub rule.
16095 (method_invocation:): Build method invocation and call
16096 make_qualified_primary when processing primaries.
16097 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
16098 get_type_from_signature.
16099 (java_check_regular_method): Extra integer 0 argument when calling
16100 lookup_java_method2.
16101 (lookup_java_interface_method2): Extra method DECL argument when
16102 calling lookup_java_interface_method2.
16103 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
16104 COMPOUND_EXPR node.
16105 (java_complete_expand_method): Layout current class iff not
16106 already done. Don't process interface's methods.
16107 (java_complete_expand_method): Use super class only if it
16108 exists. Use current class otherwise.
16109 (make_qualified_primary): New function.
16110 (resolve_expression_name): Process qualified expression or
16111 expression from primary the same way.
16112 (resolve_expression_name): Two last arguments to
16113 resolve_field_access are now NULL_TREEs.
16114 (resolve_field_access): New variable is_static. Local field must
16115 be DECLs. is_static computed on field DECLs only. Append code in
16116 where_found to the field access if necessary. Use QUAL_DECL_TYPE
16117 to initialize field_type.
16118 (resolve_qualified_expression_name): New local variable,
16119 previous_call_static and is_static. Handle primaries with function
16120 calls, casts, array references and `this'. `super' now handled as
16121 `(super_class)this'. Use is_static to clarify boolean expressions.
16122 Added code to handle case where a proper handle is required to
16123 access a field. Use QUAL_DECL_TYPE where applicable.
16124 (maybe_access_field): New function.
16125 (patch_method_invocation_stmt): New arguments primary, where,
16126 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
16127 deleted. Use `where' as a type to search from if specified. Check
16128 for static method reference where forbidden. Append primary or
16129 current_this to the argument list if not calling constructor nor
16130 static methods.
16131 (check_for_static_method_reference): New function.
16132 (patch_invoke): Layout the class on which new is done if
16133 necessary.
16134 (lookup_method_invoke): Changed format to report errors on
16135 methods.
16136 (qualify_ambiguous_name): New local variable this_found. Now
16137 handle things from primaries. Method call are considered
16138 expression names.
16139 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
16140 changed into NULLs.
16141 (not_initialized_as_it_should_p): Comply with the new DECL_P.
16142 (java_complete_tree): New case fo RETURN_EXPR. Process function
16143 call arguments in separate function.
16144 (complete_function_arguments): New function.
16145 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
16146 anymore.
16147 (patch_assignment): Take the return function slot into account as
16148 a RHS. Distinguish assignment from a return.
16149 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
16150 when checking methods in interfaces.
16151 (resolve_type_during_patch): NULL argument to unresolve_type_p
16152 instead of NULL_TREE.
16153 (patch_newarray): Fixed typo in comment.
16154 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
16155 (build_return, patch_return): New functions.
16156 * typeck.c (lookup_java_constructor): Fixed typo in comment.
16157
16158 1998-07-21 Per Bothner <bothner@cygnus.com>
16159
16160 * constants.c (find_name_and_type_constant, find_fieldref_index,
16161 find_methodref_index): New methods.
16162 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
16163 just return given method. Also, rename to build_known_method_ref.
16164 (expand_invoke): Rename call to build_invoke_non_interface.
16165 * java-tree.h, parse.h: Update prototype.
16166 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
16167 (such as expand_expr_stmt) if flag_emit_class_files.
16168 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
16169 STACK_TARGET, IGNORE_TARGET): New macros.
16170 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
16171 (generate_bytecode_insn): New function to generate method's bytecode.
16172 (generate_classfile): Node generate Code attribute for a method.
16173 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
16174 push_long_const, field_op, adjust_typed_op, maybe_wide):
16175 New functions used by generate_bytecode_insn.
16176
16177 * typeck.c (signature_include_return): Remove variable.
16178 (push_java_argument_signature, build_java_argument_signature): New.
16179 (build_java_signature): Use push_java_argument_signature.
16180 * parse.y: Use build_java_argument_signature instead of fiddling
16181 with signature_include_return.
16182
16183 1998-07-17 Tom Tromey <tromey@cygnus.com>
16184
16185 * gjavah.c (print_c_decl): Always generate JArray<>* for array
16186 types.
16187
16188 * Makefile.in (all.indirect): Added gjavah$(exeext).
16189 (gjavah$(exeext)): Added $(exeext).
16190 (clean): Likewise.
16191
16192 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16193
16194 * class.c (layout_class): Call to java_layout_parsed_class replace
16195 by safe_layout_class.
16196 * expr.c (build_java_array_length_access): Removed static storage
16197 class in the function definition.
16198 (build_java_arraynull_check): Likewise.
16199 Also fixed typos in two comments.
16200 * lex.c (java_init_lex): Initialize static global kw_length.
16201 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
16202 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
16203 java_lex_error.
16204 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
16205 * parse.h (resolve_no_layout): New static function declaration.
16206 (get_identifier_in_static): Declaration removed.
16207 (java_layout_parsed_class): Function name declaration changed to
16208 safe_layout_class.
16209 (build_newarray_node, patch_newarray, resolve_type_during_patch,
16210 not_initialized_as_it_should_p, build_this): New static function
16211 declarations.
16212 (pushdecl_force_head, build_java_binop, int_fits_type_p,
16213 binary_numeric_promotion, stabilize_reference,
16214 build_decl_no_layout, build_java_arrayaccess): Extern function
16215 declarations moved into their own section.
16216 (build_newarray, build_anewarray, build_java_array_length_access,
16217 build_java_arraynull_check): New extern function declarations.
16218 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
16219 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
16220 fake tree codes.
16221 (CALL_CONSTRUCTOR_P): New macro.
16222 * parse.y (kw_length): New static global tree node.
16223 (return_statement): Tagged <node>.
16224 (RETURN_TK): Tagged <operator>.
16225 (variable_declarator_id:): Build variable declaration with an
16226 empty initialization value if a syntax error was found in the
16227 initialization part of the variable declaration.
16228 (statement_without_trailing_substatement:): return_statement: now
16229 uses the default rule.
16230 (return_statement:): Temporarily fixed to return NULL_TREE.
16231 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
16232 (class_instance_creation_expression:): Class creation rules now
16233 call build_method_invocation upon reduction.
16234 (array_creation_expression:): Rules call build_newarray_node upon
16235 reduction.
16236 (dim_exprs:): Build a list of dimension expressions.
16237 (dim_expr:): Store location of the OSB_TK in the dimension
16238 expression node.
16239 (method_invocation:): Added a new error rule.
16240 (build_unresolved_array_type): WFL argument may also be an array
16241 on a primitive type. Name of the argument changed to reflect this.
16242 (method_declarator): Insert argument type at the beginning of the
16243 argument type list and later reverse the list.
16244 (unresolved_type_p): Argument 'returned' may be optionally
16245 NULL_TREE.
16246 (java_layout_class_from_source): Function renamed
16247 safe_layout_class.
16248 (resolve_and_layout): Now call resolve_no_layout and
16249 safe_layout_class.
16250 (resolve_no_layout): New function.
16251 (purify_type_name): New function.
16252 (complete_class_report_errors): Call purify_type_name during error
16253 report on a type not found.
16254 (process_imports): error_found local variable doesn't need to be
16255 initialized to zero.
16256 (declare_local_variables): New local type_wfl. Fixed typo in error
16257 message. type_wfl assigned to unresolved type and used to register
16258 incomplete type. Build a WFL around the variable initialization
16259 statement so that debug info can be generated on it.
16260 (source_start_java_method): Reverse argument list after they've
16261 been processed.
16262 (current_this): New static global variable.
16263 (java_complete_expand_methods): Set current_this when appropriate.
16264 (resolve_expression_name): Build correct static and non static
16265 field access bearing a simple name.
16266 (resolve_field_access): Resolve the length field of arrays. Handle
16267 f.m() cases.
16268 (patch_method_invocation_stmt): Set the type of the method
16269 invocation to error_mark_node. This value is later overridden by a
16270 valid type, if any. Don't handle qualified constructor invocation
16271 as qualified method invocation. Call lookup_method_invoke with its
16272 new flag. It's no longer necessary to access the selected method
16273 as the value of a tree list. Handle constructor invocation.
16274 (patch_invoke): Reverse argument list when invoking non interface
16275 methods. Insert call to new as the first argument of the
16276 constructor.
16277 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
16278 defined within a final class. Return INVOKE_STATIC if the invoked
16279 method is a constructor.
16280 (lookup_method_invoke): New lc argument is a flag to indicate a
16281 constructor lookup. Now handle constructor lookup. Choose the most
16282 specific method in case several were matching the invocation
16283 requirements. Return a method decl instead of a tree list featuring
16284 one single method decl element.
16285 (refine_accessible_methods_list): New lc flag argument to
16286 indicate that a constructor is being looked up.
16287 (not_initialized_as_it_should_p): New function.
16288 (java_complete_tree): Now process fake tree codes
16289 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
16290 save_expr on resolved function call arguments. Case on
16291 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
16292 (patch_assignment): LHS can be a field access expression. When
16293 dealing with reference, lhs_type is the promoted type of the
16294 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
16295 applicable.
16296 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16297 (patch_binop): Use not_initialized_as_it_should_p where
16298 applicable.
16299 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16300 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
16301 where applicable.
16302 (resolve_type_during_patch): New function.
16303 (patch_cast): Call resolve_type_during_patch to resolve type and
16304 report error accordingly.
16305 (patch_array_ref): Use not_initialized_as_it_should_p where
16306 applicable. Array base expression is saved before being
16307 used. Promote the type of an array elements if it contains non
16308 builtin types.
16309 (build_newarray_node, patch_newarray, build_this): New functions.
16310
16311 1998-07-16 Tom Tromey <tromey@cygnus.com>
16312
16313 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
16314 increment it in `for' statement.
16315 (print_field_info): If number is inf or nan, don't print it.
16316 (print_method_info): If method name is `delete', just ignore it.
16317 (print_c_decl): Special-case jstringArray.
16318
16319 * gjavah.c (help): New function.
16320 (no_argument): New function.
16321 (usage): Changed text.
16322 (main): Rewrote argument handling. Now handles -v, --help,
16323 --version.
16324 (version): New function.
16325 (found_error): New global.
16326 (main): Return found_error.
16327 (generate_access): Set found_error.
16328 (print_c_decl): Likewise.
16329
16330 1998-07-15 Tom Tromey <tromey@cygnus.com>
16331
16332 * gjavah.c (print_c_decl): Don't print "," when examining field.
16333 Skip type name when looking at "[L" types.
16334 (process_file): Now static.
16335 (generate_access): Now returns int.
16336 (last_access_generated): New global.
16337 (process_file): Clear last_access_generated; make multiple passes
16338 over the class.
16339 (print_field_info): Just return if generate_access returns true.
16340 (print_method_info): Likewise. Also, allow <init> functions to
16341 pass through.
16342 (print_c_decl): Added is_init argument. Print constructors
16343 properly.
16344 (print_cxx_classname): Use UTF8_GET to extract characters from
16345 string.
16346 (print_base_classname): New function.
16347 (print_class_decls): New function.
16348 (process_file): Use it.
16349 (utf8_cmp): New function.
16350
16351 1998-07-13 Nick Clifton <nickc@cygnus.com>
16352
16353 * lang-options.h: Format changed to match changes in gcc/toplev.c
16354 to implement a --help option.
16355
16356 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
16357
16358 * decl.c (init_decl_processing): Revert change to dtable_type.
16359
16360 1998-07-09 Per Bothner <bothner@cygnus.com>
16361
16362 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
16363
16364 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
16365
16366 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
16367
16368 * lang.c (lang_init): Default flag_exceptions to 1, without
16369 checking to see if it's 2 first.
16370
16371 1998-07-08 Jeffrey A Law (law@cygnus.com)
16372
16373 * constants.c: Include "system.h".
16374 * decl.c: Likewise.
16375 * lang.c (flag_new_exceptions): Get via extern now.
16376 (lang_init_options): New functions. Turn on flag_new_exceptions.
16377
16378 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16379
16380 * lex.c (java_lex): Return 0 when we see an invalid character in
16381 the input.
16382
16383 * lex.c (java_read_char): Specify extra argument when calling
16384 java_lex_error.
16385 (java_read_unicode, java_parse_end_comment,
16386 java_parse_escape_sequence): Likewise,
16387 (java_lex): Specify extra argument when calling
16388 java_lex_error. Test that IDs are beginning with a legal character
16389 for IDs. Handle invalid characters with an error message and a
16390 call to java_lex_error.
16391 (java_lex_error): Adjust column position by new argument
16392 `forward'. Issue an error even if in the middle of reporting an
16393 other error.
16394
16395 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
16396
16397 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
16398 we don't explicitly put a null pointer when we're copying it.
16399
16400 1998-07-07 Tom Tromey <tromey@cygnus.com>
16401
16402 * gjavah.c (print_cxx_classname): New function.
16403 (super_class_name): Likewise.
16404 (print_super_fields): Removed.
16405 (in_super): Removed.
16406 (print_field_info): Never generate #defines.
16407 (print_c_decl): Changed generated types to match JNI. No longer
16408 print class name before method name.
16409 (print_method_info): Print "static" before static methods.
16410 Print "virtual" before non-final methods.
16411 (usage): Use exit(1), not exit(-1).
16412 (main): Likewise.
16413 (print_field_info): Use %.17g to print a double.
16414 (last_access): New globals.
16415 (process_file): Initialize last_access.
16416 (usage): Now static.
16417 (ACC_VISIBILITY): New define.
16418 (generate_access): New function.
16419 (print_field_info): Call it.
16420 (print_method_info): Likewise. Also, generate information for all
16421 methods, not just native methods. Return void.
16422 (print_c_decl): Return void.
16423 (print_field_info): Return void.
16424
16425 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16426
16427 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
16428 processing the jc1 grammar file. Prefix bison functions and
16429 variables with java_.
16430 (parse.c): Dependencies on parse.h and lex.h
16431 * expr.c (build_java_arrayaccess): Function now global.
16432 * java-tree.h: Comment reorganized to carry on previous
16433 classification effort.
16434 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
16435 RESOLVE_TYPE_NAME_P): New flags on WFLs.
16436 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
16437 java_parse (new prefix java_ generated by bison).
16438 (java_layout_parsed_class, java_register_parsed_class): Function
16439 call removed.
16440 (yyparse): Removed unnecessary call to init_outgoing_cpool.
16441 * lex.c (static tree wfl_op): Variable deleted.
16442 (java_init_lex): Initialize kw_super and kw_this. Initialize more
16443 ctxp fields to NULL_TREE.
16444 (java_lex): No longer create WFL for operators. Filename caching
16445 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
16446 created as STRING_CST and later expanded. Removed extra argument
16447 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
16448 and SUPER.
16449 (build_wfl_node): Removed code in comments.
16450 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
16451 store token and location data in the current bison token.
16452 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
16453 static/extern function declaration at the beginning of the file.
16454 (struct qualification): Data structure definition deleted.
16455 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
16456 (qualify_ambiguous_name): Function declaration modified. Function
16457 now returns nothing.
16458 (build_array_ref, patch_array_ref, make_qualified_name,
16459 resolve_qualified_expression_name, maybe_generate_clinit,
16460 resolve_field_access): New static function declarations.
16461 (build_java_arrayaccess): New extern function declaration.
16462 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
16463 (CALL_EXPR_PRIMARY): Macro deleted.
16464 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
16465 (struct parser_ctxt): Field initialized_final
16466 removed. non_static_initialized, static_initialized: New fields.
16467 * parse.y (static tree kw_super, static tree kw_this): New global
16468 static.
16469 (%union): tree wfl field of operator member replaced by int
16470 location. WFLs are non longer created for operators.
16471 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
16472 (qualified_name:): Now calls make_qualified_name to build the
16473 identifier.
16474 (type_declaration:): Consider generating <clinit> when class
16475 parsing completed.
16476 (variable_declarator:): Directly build an assignment node when the
16477 variable is initialized when declared.
16478 (this_or_super:): Build a WFL and set current location when THIS
16479 or SUPER are parsed.
16480 (expression_statement:): Wrap statement around a WFL.
16481 (primary_no_new_array:): Fixed typo. Changed value returned by
16482 THIS_TK because of its new type (temporary).
16483 (dim_exprs:): Temporary fix because of OSB_TK's new type.
16484 (field_access:): Build qualified name with SUPER.
16485 (method_invocation:): Fixed returned value because of SUPER's new
16486 type.
16487 (array_access:): Use OSB_TK location information.
16488 (post_increment_expression:, post_decrement_expression:,
16489 unary_expression:, pre_increment_expression:,
16490 pre_decrement_expression:, unary_expression_not_plus_minus:,
16491 cast_expression:, multiplicative_expression:,
16492 additive_expression:, shift_expression:, relational_expression:,
16493 equality_expression:, and_expression:, exclusive_or_expression:,
16494 inclusive_or_expression:, conditional_and_expression:,
16495 conditional_or_expression:, assignment:): Use new location/token
16496 information available on operators.
16497 (create_class): Set super_decl_type to NULL_TREE when processing
16498 java.lang.Object.
16499 (register_fields): Field initialization is now a MODIFY_EXPR
16500 node. Chain initialization code to the matching lists (according
16501 to the field declaration modifiers).
16502 (maybe_generate_clinit): New function.
16503 (method_header): Don't set method's DECL_NAME to a WFL when adding
16504 methods to java.lang.Object.
16505 (resolve_and_layout): Now can return NULL_TREE if the type
16506 resolution fails. Otherwise, return the class DECL instead of its
16507 TYPE.
16508 (check_method_redefinition): Don't patch method DECL_NAME if it
16509 belongs to java.lang.Object.
16510 (process_imports): Simply assign error_found to the value returned
16511 by check_pkg_class_access.
16512 (declare_local_variables): Don't use their init statements (if
16513 any) when parsing error were previously found. Reuse MODIFY_EXPR
16514 build during parsing as an init statement.
16515 (java_method_add_stmt): Now return the current method body.
16516 (java_layout_parsed_class, java_register_parsed_class): Functions
16517 removed.
16518 (java_complete_expand_methods): Initialize the constant pool on a
16519 per class basis. Layout the classes before expanding their method
16520 bodies. Don't try expand artificial constructor code if error were
16521 found. Make the classes data and register them if no error were
16522 found.
16523 (java_complete_expand_method): Retrieve an artificial constructor
16524 argument list before entering its body. Assign the top block to
16525 the artificial constructor function body and set types of declared
16526 blocks and compound statements to void. Walk method body if not an
16527 artificial constructor.
16528 (make_qualified_name, cut_identifier_in_qualified): New functions.
16529 (resolve_expression_name): Fixed comments. Save/restore the
16530 current class CLASS_LOADED_P flag value. Build non qualified
16531 static field access and handle qualified expression names.
16532 (resolve_field_access, resolve_qualified_expression_name): New
16533 functions.
16534 (patch_method_invocation_stmt): Use the new expression resolution
16535 scheme, calling resolve_field_access when the function call is
16536 resolved as an expression.
16537 (qualify_ambiguous_name): Function rewritten to work on qualified
16538 expression produced by make_qualified_name.
16539 (java_complete_tree): Promote type when function's argument are
16540 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
16541 the assignment to discover further errors if RHS is a expression
16542 name that fails to evaluate. Declare LHS initialized even though
16543 the assignment failed. Don't use the location variable and removed
16544 extra argument in patch function calls. Now handle the ARRAY_REF
16545 case and build internal string representation when STRING_CSTs are
16546 walked.
16547 (build_method_invocation): Don't wrap function call around a WFL.
16548 (build_assignment): Likewise. Use the operator location
16549 information.
16550 (patch_assignment): Handle array access LHSs. Handle error
16551 provenance, resulting in a better error report.
16552 (build_binop): Use op_location from operator as binop location
16553 information.
16554 (build_unaryop, build_incdec, build_cast): Likewise.
16555 (patch_binop): Extract location information from the node. Fixed
16556 typo in error message.
16557 (patch_unary_op): Extract location information from the node.
16558 (build_array_ref, patch_array_ref): New functions.
16559
16560 1998-07-01 Tom Tromey <tromey@cygnus.com>
16561
16562 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
16563 match _Jv_IsInstanceOf.
16564 * decl.c (init_decl_processing): Use _Jv_NewArray, not
16565 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
16566
16567 1998-06-30 Tom Tromey <tromey@cygnus.com>
16568
16569 * decl.c (init_decl_processing): Functions are now named
16570 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
16571
16572 1998-06-29 Per Bothner <bothner@cygnus.com>
16573
16574 * java-tree.h (load_class): Add prototype.
16575 * class.c (is_compiled_class): Add missing arg to load_class.
16576 * expr.c (expand_java_NEW): Call load_class.
16577 * parse.y (process_import): Removed bogus use of void return value.
16578
16579 1998-06-25 Per Bothner <bothner@cygnus.com>
16580
16581 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
16582 Function name is "_Jv_Throw" instead of "soft_athrow".
16583 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
16584 Function name is "_Jv_AllocObject" instead of "soft_new".
16585 Takes an extra parameter (object size).
16586 * expr.c: Update calls.
16587
16588 1998-06-24 Per Bothner <bothner@cygnus.com>
16589
16590 * lex.c (java_get_line_col): Handle end-of-file.
16591 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
16592
16593 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
16594
16595 * lang.c (lang_init): Make -fexceptions the default.
16596 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
16597 exception handling is not turned on.
16598
16599 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
16600
16601 * lang.c (flag_new_exceptions): Make this this default.
16602 * decl.c (end_java_method): Call emit_handlers.
16603 * except.c (method_init_exceptions): Set language code and version.
16604 (expand_start_java_handler): Enable exception, and call
16605 expand_eh_region_start.
16606 (expand_end_java_handler): Enable exception, and set up catch blocks.
16607 (emit_handlers): New routine to generate the saved handlers.
16608 * java-except.h (emit_handlers): Add prototype.
16609
16610 1998-06-12 Per Bothner <bothner@cygnus.com>
16611
16612 We used to have three different representations of the constant pool:
16613 the CPool structure, the tree_constant_pool, and the constructures
16614 used to build the Class object (which may need class and string
16615 constants) in compiled code. None were appropriate for compiling
16616 to .class files, so I did a major overhaul.
16617
16618 First, the tree_constant_pool array was removed. Things were
16619 modified to the CPool structure in the JCF could be used.
16620 Second, a "capacity" field was added to the CPool, and functions
16621 written to search for a matching constant, adding one if not found.
16622 The code that generated the Class object was changed to use a CPool.
16623 The actual TREE_LISTs used to build the CONSTRUCTORs used for
16624 the static Class object are now only in build_constants_constructor.
16625 Finally, I wrote code which can generate a .class file (including its
16626 constant pool) from the RECORD_TYPE of a class. This is a big step
16627 on the way to compiling Java source into .class files.
16628
16629 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
16630 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
16631
16632 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
16633 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
16634 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
16635 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
16636 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
16637 (lang_type): Removed constant_pool field.
16638 * jcf.h (CPool): Renamed size to count. Added field capacity.
16639 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
16640 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
16641 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
16642
16643 * constants.c (current_constant_pool_tags, current_constant_pool_data,
16644 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
16645 * constants.c (build_constants_constructor): Use new outgoing_cpool.
16646 (set_constant_entry, find_constant1, find_constant2,
16647 find_class_constant, count_constant_pool_bytes, write_constant_pool,
16648 find_utf8_constant, find_class_or_string_constant): New functions.
16649
16650 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
16651 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
16652 (give_name_to_class, get_class_constant): Likewise.
16653 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
16654 (get_name_and_type_constant, get_ref_constant): Removed.
16655 * parse.h (parser_ctxt): Remove field tree_constant_pool.
16656 * parse.y: Don't save/restore tree_constant_pool.
16657 * verify.c (verify_jvm_instructions): Update for new approach.
16658 * expr.c (expand_invoke, expand_java_field_op): Likewise.
16659
16660 * lang-options.h: Added -femit-class-file, -femit-class-files.
16661 * lang.c (flag_emit_class_files), java-tree.h: New flag.
16662 (lang_f_options): Added "emit-class-file(s)".
16663
16664 * expr.c (build_java_arrayaccess): Generate more efficient array
16665 bounds checking, by using unsigned compare.
16666
16667 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
16668
16669 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16670
16671 * parse.h: New comment on the handling of unresolved type
16672 identifiers. JDEPs are now part of the jdep_code enum.
16673 (typedef struct jdep): Now use enum jdep_code or int, depending on
16674 availability. Both are narrowed down to an 8 bits bitfield.
16675 (CALL_EXPR_PRIMARY): Fixed comment.
16676
16677 1998-06-10 Tom Tromey <tromey@cygnus.com>
16678
16679 * Make-lang.in (java): Added gjavac and jvgenmain.
16680 (java.start.encap): Depend on gjavac.
16681 (java.rest.encap): Depend on jvgenmain.
16682
16683 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
16684 (JAVA_CROSS_NAME): Likewise.
16685 (java.all.build): Depend on jvgenmain and gjavac.
16686 (java.all.cross): Depend on jvgenmain and gjavac-cross.
16687 (jvgenmain$(exeext)): New target.
16688 (java.install-common): Wrote.
16689 * config-lang.in (compilers, stagestuff): Added gjavac and
16690 jvgenmain.
16691
16692 1998-06-10 Dave Brolley <brolley@cygnus.com>
16693
16694 * lang.c (lang_decode_option): New argc/argv interface.
16695
16696 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16697
16698 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
16699 * decl.c (build_decl_no_layout): New function.
16700 * expr.c (java_lang_expand_expr): Layout declarations found in
16701 blocks before they're pushed.
16702 * jcf-parse.c (load_class): Save current line when parsing class
16703 file.
16704 (parse_source_file): Register class before expanding their
16705 methods.
16706 * lang.c (put_decl_node): Produce `null' when `void *' is
16707 processed.
16708 * lex.c (static tree wfl_op): New static global, for error report
16709 on casts.
16710 (java_init_lex): wfl_operator and wfl_op initialized
16711 here. Filename caching added for wfl_op. Return wfl_op when `(' is
16712 parsed.
16713 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
16714 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
16715 build_unresolved_array_type): New static function definitions.
16716 (build_decl_no_layout): New extern function declared.
16717 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
16718 faulty modifier exists.
16719 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
16720 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
16721 (UNARY_PLUS_EXPR): New fake operator.
16722 (struct parser_ctxt): New field osb_number.
16723 * parse.y (static tree wfl_operator): New static WFL for operator
16724 bound error messages.
16725 (DECR_TK, INCR_TK): Moved.
16726 (OP_TK): Tagged <operator>.
16727 (array_type:): Now call build_unresolved_array_type.
16728 (dim_expr:): Count the number of '[' seen.
16729 (post_increment_expression, post_decrement_expression,
16730 pre_increment_expression, pre_decrement_expression,
16731 unary_expression_not_plus_minus, unary_expression:): Actions are
16732 now building the corresponding unary expressions.
16733 (cast_expression:): Actions are now building cast expressions.
16734 (build_unresolved_array_type): New function.
16735 (create_interface): Reset the number of declared interfaces.
16736 (create_class): Likewise.
16737 (method_header): Methods declared within the scope of an interface
16738 are now implicitly set public and abstract.
16739 (java_complete_class): Variable's and parameter's type are patched
16740 with a promoted type.
16741 (declare_local_variables): Resolved non builtin types are promoted
16742 before being used to build a variable decl. Removed type patch
16743 posted on variable initialization statement.
16744 (source_start_java_method): Use build_decl_no_layout to build the
16745 decl of a parameter of incomplete type.
16746 (java_register_parsed_class): Process interfaces too. Call
16747 rest_of_decl_compilation on each processed class declarations.
16748 (java_complete_expand_methods): Don't attempt to expand things in
16749 interfaces.
16750 (java_complete_tree): Process CONVERT_EXPR, even though it always
16751 has a type. Propagate error_mark_node to node's type too. Promote
16752 method's call argument type and return error_mark_node if
16753 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
16754 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
16755 handle unary operator nodes.
16756 (build_assignment): Added comment.
16757 (print_int_node): New function.
16758 (patch_assignment): New second argument. New error handling. Use
16759 print_int_node. Handle references. Use can_cast_to_p to issue
16760 different error message according to the context and check upon
16761 the initialization of the RHS.
16762 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
16763 (operator_string): Handle more operators.
16764 (patch_binop): No longer use a function static
16765 wfl_operator. Improved error message on shift distance.
16766 (build_unaryop, build_incdec, build_cast, patch_unaryop,
16767 patch_cast): New functions.
16768
16769 1998-06-05 Per Bothner <bothner@cygnus.com>
16770
16771 * jvspec.c: New file.
16772 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
16773
16774 * java-tree.h (identifier_subst): Add declaration.
16775
16776 1998-06-04 Tom Tromey <tromey@cygnus.com>
16777
16778 * jvgenmain.c (main): Generate call to JvRunMain.
16779
16780 * class.c (make_class_data): Push value for "sync_info" field.
16781 * decl.c (init_decl_processing): Push "sync_info" field.
16782
16783 1998-06-03 Per Bothner <bothner@cygnus.com>
16784
16785 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
16786 Java (source) name, not signature.
16787 Set TYPE_ALIGN to (at least) that of element_type.
16788
16789 1998-06-02 Per Bothner <bothner@cygnus.com>
16790
16791 * class.c: Moved classname-mangling-rekated code to ...
16792 * mangle.c: ... this new file.
16793 * jvgenmain.c: New program (needs mangle.c) to generate main program.
16794 * Makefile.in: Update for above changes.
16795
16796 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16797
16798 * expr.c (truthvalue_conversion): Convert integer and floating
16799 point value to their truth value.
16800 * lex.c (java_lex): Handle the `null' literal.
16801 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
16802 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
16803 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
16804 New macros.
16805
16806 * parse.y: Reorganization/documentation on token declaration.
16807 (binop_lookup[]): New added new tree codes.
16808 (relational_expression): Build corresponding binary operators.
16809 (equality_expression, conditional_and_expression,
16810 conditional_or_expression): Likewise.
16811 (java_complete_class): Fix crash in debug message.
16812 (java_complete_tree): Check initialization of method call
16813 arguments. Further bogus node evaluation to detect more error
16814 during assignments. Handles more binary operators.
16815 (patch_assignment): Use DECL_P.
16816 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
16817 code.
16818 (operator_string): Handle more case. Compacted source.
16819 (patch_binop): Changed function comment. Checking for
16820 uninitialized first operand takes the compound assignment into
16821 account and uses DECL_P. Checking for uninitialized second operand
16822 delayed to routine's end. Use macros to issue type bound error
16823 messages and issue messages on both operands if their types are
16824 different. Force fixed type into node. Handle all binary
16825 operators.
16826
16827 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16828
16829 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
16830 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
16831 build operator node and return tokens.
16832 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
16833 * parse.h (java_complete_tree): Changed returned type in prototype.
16834 (build_method_invocation, build_assignment, patch_assignment,
16835 patch_binop): New static function declarations.
16836 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
16837 BUILD_EXPR_WFL): New macros.
16838 * parse.y (enum tree_code binop_lookup[]): New static for token to
16839 TREE_CODE lookup.
16840 (%union): Parser union has new sub-structure `operator'.
16841 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
16842 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
16843 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
16844 ASSIGN_ANY_TK): Tokens tagged `operator'.
16845 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
16846 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
16847 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
16848 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
16849 (assignment_operator:): Rule tagged `operator'.
16850 (expression_statement:): Re-installed default rule.
16851 (method_invocation:): Sub rules call build_method_invocation.
16852 (postfix_expression:): Don't attempt to resolve name here. Just
16853 return an ID.
16854 (multiplicative_expression:): Sub-rules build corresponding binop
16855 expression node.
16856 (additive_expression:, shift_expression:, and_expression:,
16857 exclusive_or_expression:, inclusive_or_expression:): Likewise.
16858 (assignment:): Sub rule invoke build_assignment.
16859 (assignment_operator:): Default rules on sub rules.
16860 (force_error): Added documentation on this variable.
16861 (declare_local_variables): Build initialization calling
16862 build_assignment.
16863 (expand_start_java_method): Removed unused rtx declaration. Mark
16864 arguments as already initialized.
16865 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
16866 (java_complete_expand_methods): Don't process next method if
16867 completion of the previous one triggered errors.
16868 (java_complete_expand_method): Call source_end_java_method if no
16869 error were found during completion.
16870 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
16871 locals declaratilon. Handle names found within a class. Return
16872 error_mark_node when things aren't found.
16873 (patch_method_invocation_stmt): Return error_mark_node on failures.
16874 (patch_invoke): Removed unused local. Return the correct node.
16875 (java_complete_tree): Now returns a value. The BLOCK section binds
16876 local identifiers and the type of a BLOCK is now void. Assign the
16877 result of operand completion on COMPOUND_EXPR. Assign the
16878 encapsulated node of a WFL to the result of its completion, except
16879 when the node is an identifier. Now handle MODIFY_EXPR and several
16880 binary operators. Return error_mark_node on errors.
16881 (build_method_invocation, build_assignment, patch_assignment,
16882 build_binop, operator_string, patch_binop): New functions.
16883 * typeck.c (binary_numeric_promotion): New function.
16884
16885 1998-05-21 Per Bothner <bothner@cygnus.com>
16886
16887 * class.c (identifier_subst): New convenience wrapper for ident_subst.
16888 Replace most uses of ident_subst by identifier_subst.
16889
16890 * class.c (push_class_static_dummy_field): Removed function.
16891 (build_class_ref): Find Class object decl by looking up "CNAME.class",
16892 instead of looking got "class" static field. Create that decl here.
16893 (class_identifier_node): Removed; no longer needed.
16894 (init_class_processing): Don't init class_identifier_node.
16895 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
16896 Do nreverse 0 times (instead of twice) for Object and Class.
16897 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
16898
16899 1998-05-20 Per Bothner <bothner@cygnus.com>
16900
16901 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
16902 while initializing linenumber_count and linenumber_table.
16903 Do it before init_function_start (which calls emit_line_note).
16904 * expr.c (expand_byte_code): Don't need to clear lineno here.
16905
16906 1998-05-18 Tom Tromey <tromey@cygnus.com>
16907
16908 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
16909 then mangle number as _N_.
16910
16911 * class.c (mangle_class_field): New function.
16912 (build_class_ref): Set assembler name of class reference using
16913 mangle_class_field.
16914 (push_class_static_dummy_field): Likewise.
16915
16916 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
16917
16918 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
16919 of assigning to TREE_CODE. The latter method exploits a feature
16920 of GCC that is not ANSI compliant.
16921
16922 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16923
16924 * decl.c (pushdecl_force_head): New function.
16925 (pushlevel): Removed conditional printf.
16926 (complete_start_java_method): Don't enter local variable scope if
16927 function is compiled from source code.
16928 * expr.c: parse.h now included
16929 (java_lang_expand_expr): New function.
16930 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
16931 printf. Terminate buffer when doing directories.
16932 * jcf-parse.c (parse_source_file): Call lang_init_source before
16933 parsing and before code generation.
16934 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
16935 use printf if the macro is defined.
16936 * lang.c (lang_init): Install lang_expand_expr hook on
16937 java_lang_expand_expr.
16938 (java_dummy_print): New function.
16939 (lang_init_source): New function.
16940 * lex.c (java_lex): Remember location of an opening brace at the
16941 second nesting level.
16942 (java_is_eol): Unget character seen after a CR if it is EOF.
16943 * parse.h: Now includes lex.h
16944 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
16945 printf if the macro is defined.
16946 (expand_start_java_method, build_expr_block, enter_block,
16947 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
16948 New static function declarations.
16949 (pushdecl_force_head): New extern function declaration.
16950 (INCOMPLETE_TYPE_P): New macro.
16951 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
16952 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
16953 BLOCK_EXPR_ORIGIN): New macros.
16954 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
16955 DECL_SOURCE_LINE_LAST): New macros.
16956 (struct parser_ctxt): Removed field current_method_decl, redundant
16957 with the field current_function_decl. Added fields
16958 first_ccb_indent1 and pending_block.
16959 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
16960 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
16961 tagged <node>
16962 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
16963 (compilation_unit:): Cosmetic on sub rule.
16964 (type_declaration:): Cosmetic on sub rules. Added an error rule.
16965 (variable_initializer:): Installed default rule on expression:.
16966 (method_declaration:): method_header: starts a new
16967 method. method_body: installs the function body, absorbs blocks
16968 emitted for temporary variable scopings, pops function's body block
16969 and merges function's last statement lineno in DECL_SOURCE_LINE.
16970 (method_body:): Installed default rules.
16971 (block:): Call enter_block when an opening brace is seen. Absorb
16972 scoping blocks and call exit_block when a closing brace is seen.
16973 (block_statement:): Cosmetic changes.
16974 (method_invocation:): Create WFL around CALL_EXPR node.
16975 (patch_stage): Added comment around definition.
16976 (method_header): Try to use first_ccb_indent1 as the first line of
16977 the method, so BP debug info are emitted at the first opening
16978 brace of the function. If the function has no body, use the
16979 location of the function's name. Override currently defined method
16980 name with the matching WFL so we can point redefinition errors
16981 using the location where the function's name was declared.
16982 (check_abstract_method_header): Interprets DECL_NAME as an
16983 identifier or as a WFL, accordingly.
16984 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
16985 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
16986 location and name information out of it and reinstall DECL_NAME to
16987 its original identifier node value.
16988 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
16989 function's source code).
16990 (read_import_dir): Test the value returned by find_class and issue
16991 a fatal accordingly.
16992 (declare_local_variables): Push a new block for the scope of the
16993 new variable(s) if code has been already generated at that nesting
16994 level. Pinpoint redefinition errors using the variable id
16995 WFLs. Generate initialization code if necessary. If the variable
16996 type is incomplete, register a patch on its decl.
16997 (source_start_java_method): Rewritten. Define a new block for the
16998 function's parameters. Build parameter decl out of function's
16999 arguments and register them for a patch if their types are
17000 incomplete.
17001 (expand_start_java_method): Includes the part of
17002 source_start_java_method that was pushing the parameter decls and
17003 completing the method start code.
17004 (source_end_java_method): Removed call the expand_end_bindings and
17005 poplevel (already taken care of). Reinstall function's arguments
17006 and get function's last line of code before calling
17007 expand_function_end.
17008 (java_method_add_stmt): New comment before the function's
17009 code. Complement the second operand of the current COMPOUND_EXPR
17010 if necessary.
17011 (java_complete_expand_methods): Don't generate debug info on line
17012 zero when expanding a generated constructor.
17013 (java_complete_expand_method): Set start and end line numbers for
17014 a artificially generated constructor to one and manually call
17015 enter_block and exit_block when defining it. For all methods:
17016 expand function's start calling the new expand_start_java_method
17017 and invoke java_complete_tree on the effective method's body, if
17018 any.
17019 (resolve_expression_name): Now use lookup_name_in_blocks to search
17020 local variable decls and print out an error when variables are
17021 undefined.
17022 (patch_method_invocation_stmt): Inserted comment before the
17023 function's code.
17024 (lookup_method_invoke): Chain method's arguments using chainon
17025 with the current arg list as a second argument. Inserted missing
17026 IDENTIFIER_POINTER when reporting an error on methods not found.
17027 (refine_accessible_methods_list): Don't retain constructors.
17028 (patch_arguments): Function removed.
17029 (java_complete_tree): Inserted comment before the function's
17030 code. New case for BLOCKs. Moved the WFL case a bit
17031 further. Complete function's arguments.
17032 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
17033 maybe_absorb_scoping_blocks): New functions.
17034
17035 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17036
17037 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
17038 previously set.
17039 * jcf-parse.c (parse_source_file, java_error_count): New forward
17040 and extern declarations.
17041 (java_parse_abort_on_error): Macro moved.
17042 (jcf_parse_source): fatal called if fopen fails. Now calls
17043 parse_source_file.
17044 (parse_source_file): New parse_only parameter. Reflects the
17045 elimination of the second pass.
17046 (yyparse): parse_source_file called with argument set to 0.
17047 * jcf.h (JCF_ZERO): Sets java_source to zero.
17048 * lex.c (java_init_lex): pass argument is gone. Function modified
17049 to be called once during the analysis of a file.
17050 (java_unget_unicode): Fixed typo in fatal message.
17051 (java_get_line_col): Likewise.
17052 (java_lval): Likewise. String literals no longer built during
17053 second pass.
17054 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
17055 account.
17056 * parse.h (MODIFIER_WFL): New macro.
17057 (parse_check_super, parser_check_super_interface): Now return int.
17058 (parser_chain_incomplete_item, not_builtin_p,
17059 complete_method_decl): Declarations removed.
17060 (build_method_invocation_stmt, build_invoke): Renamed using the
17061 `patch' instead of `build'
17062 (register-incomplete_type, obtain_incomplete_type,
17063 java_complete_tree, java_complete_expand_method,
17064 unresolved_type_p, create_jdep_list): New function declarations.
17065 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
17066 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
17067 (jdep): New typedef on new struct _jdep.
17068 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
17069 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
17070 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17071 JDEP_RESOLVED_P): New macros.
17072 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
17073 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
17074 JDEP_VARIABLE): New enum values and jdep kinds.
17075 (jdeplist): New typedef on struct _jdeplist.
17076 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
17077 macros.
17078 (CALL_EXPR_PRIMARY): New macro.
17079 (struct parser_ctxt): Fields java_pass, current_method_decl,
17080 method_decl_list deleted. New field jdeplist.
17081 (INCOMPLETE_P): Macro deleted.
17082 * parse.y (single_type_import_declaration:): Removed pass switch.
17083 (type_import_on_demand_declaration): Likewise.
17084 (field_declaration:): Removed pass switch on all sub rules.
17085 (class_declaration:): Call the complete_class_decl removed on
17086 class_body rules.
17087 (method_declaration:): Removed second pass switch. No longer chain
17088 methods decl when method_header reduced.
17089 (method_header:): Sub rules no longer depend on pass switch.
17090 (method_declarator:): Likewise.
17091 (method_body:): Likewise.
17092 (abstract_method_declaration:): Likewise.
17093 (block_statement:): Likewise.
17094 (local_variable_declaration:): Likewise.
17095 (argument_list:): Likewise.
17096 (method_invocation:): Likewise. Call to build_method_invocation_stmt
17097 removed. Partial CLASS_EXPR tree node built instead.
17098 (postfix_expression:): Removed pass switch on all sub rules.
17099 (java_pop_parser_context): Free classd_list content.
17100 (yyerror): Call obstrack_grow0 to finalize error message.
17101 (check_class_interface_creation): Comment modified to reflect new
17102 returned value meaning. Removed second pass switch. Return 1 if an
17103 error was found, 0 otherwise. Adjust pointer on filename if a
17104 leading path separator was found.
17105 (maybe_create_class_interface_decl): Removed first pass switch
17106 when linking the class decl to the class_list. Install a new
17107 jdep_list for the class.
17108 (add_superinterfaces): List of unresolved interfaces is
17109 gone. Unresolved interfaces are directly added to the current
17110 dependencies list.
17111 (create_interface): Second pass shortcut removed.
17112 ctpx->modifier_ctx access through MODIFIER_WFL.
17113 (create_class): Second pass shortcut removed. Call to
17114 register_incomplete_type replaces the call to
17115 parser_chain_incomplete_item.
17116 (complete_class_decl): Function removed.
17117 (duplicate_declaration_error): New way of retrieving redeclared
17118 item type.
17119 (register_fields): Call to lookup_modifier_cl replaced by
17120 MODIFIER_WFL. New way of handling unresolved type, using
17121 unresolved_type_p and obtain_incomplete_type.
17122 register_incomplete_type replaces call to parser_chain_incomplete_item.
17123 (patch_stage): New static global variable.
17124 (method_header): New way of handling unresolved type, using
17125 unresolved_type_p and obtain_incomplete_type. patch_stage used to
17126 indicates that the method decl needs to be patched.
17127 (check_abstract_method_header): Call to lookup_modifier_cl
17128 replaced by MODIFIER_WFL.
17129 (method_declarator): Incomplete argument type are registered
17130 calling register_incomplete_type. Patch on the declared method is
17131 issued in that case.
17132 (unresolved_type_p): New function.
17133 (parser_check_super_interface): New comment to reflect function's
17134 modified returned type (int). Function and has a new argument
17135 this_wfl. Call to parse_error_context uses this_wfl instead of
17136 relying on lookup_cl.
17137 (parser_check_super): Comment reflects function's new returned
17138 type (int). Function returns nonzero value on error.
17139 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
17140 register_incomplete_type, jdep_resolve_class): New functions to
17141 handle incomplete types in declarations.
17142 (java_complete_class): Rewritten to work with the new incomplete
17143 type handling scheme.
17144 (complete_class_report_errors): Likewise.
17145 (complete_method_decl): Removed: it jobs is now handled by
17146 java_complete_class.
17147 (do_resolve_class): Class loaded in not already loaded and not
17148 found in Java source code.
17149 (java_check_regular_methods, java_check_abstract_methods): Don't
17150 call complete_method_decl anymore.
17151 (lookup_modifier_cl, not_builtin_p): Functions deleted.
17152 (read_import_dir): Got rid of the pass number dependency.
17153 (declare_local_variables): New handling of unresolved types (patch
17154 issued).
17155 (source_start_java_method): New parameter level. Function called
17156 with level set to 1 when argument types are potentially
17157 unresolved. Called to complete the job with level set to 2 once
17158 types are complete.
17159 (source_end_java_method): Call to permanent_allocation
17160 removed. Waiting to be replaced by a more suitable obstack
17161 management.
17162 (java_complete_expand_methods, java_complete_expand_method,
17163 java_expand_finals): New functions.
17164 (build_method_invocation_stmt): Renamed
17165 patch_method_invocation_stmt. Extracts function call expression
17166 (wfl) and arguments (args) from CALL_EXPR tree operands.
17167 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
17168 call. Patch the function and argument operand of the CALL_EXPR
17169 tree argument.
17170 (patch_argument, java_complete_tree): New functions.
17171
17172 1998-04-20 Per Bothner <bothner@cygnus.com>
17173
17174 Recover from missing fields and methods (i.e. error instead of fatal).
17175 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
17176 * expr.c (expand_invoke): Recover from missing method.
17177 (expand_java_field_op): Recover from missing field.
17178 Inline references to java.lang.{Integer,Char,...}.TYPE.
17179 * typeck.c (get_type_from_signature), java-tree.h: New function.
17180 * class.c (add_method): Use get_type_from_signature.
17181 (build_class_ref): Handle a class that was not found.
17182 * typeck.c (convert): Handle conversion to pointers (for convenience).
17183 * verify.c (verify_jvm_instructions): Use get_type_from_signature
17184 instead of lookup_field to handle missing fields.
17185
17186 * jcf-parse.c (process_zip_dir): Set java_source.
17187
17188 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
17189
17190 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
17191
17192 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17193
17194 * jcf-parse.c (load_class): Don't change input_filename before
17195 calling jcf_parse_source (but still do it before calling
17196 jcf_parse).
17197 (jcf_parse_source): Assign input_filename after having saved the
17198 parser context.
17199 * lex.c (java_init_lex): Chain a WFL node to the import on demand
17200 list. ctxp->modifier_ctx zeroed according to its new
17201 definition. ctxp->filename initialized. Removed
17202 JAVA_MODIFIER_CTX_UNMARK.
17203 (java_unget_unicode): Update the character based column position.
17204 (java_allocate_new_line): ref_count not used anymore. Always free
17205 ctxp->p_line. Initialize c_line->char_col to 0.
17206 (java_get_unicode): Update the character based column position.
17207 (java_lex): Use ctxp->elc to store current position in source
17208 file, at the beginning of the parsed token. Set modifier_ctx entry
17209 corresponding to the parse modifier to a WFL node. Return a WFL
17210 node when an identifier is parsed.
17211 (java_lex_error): Now uses ctxp->elc to store current position in
17212 source.
17213 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
17214 * lex.h (build_wfl_node): New function definitions.
17215 (struct java_line): ref_count and next fields are gone. New field
17216 char_col.
17217 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17218 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
17219 (JAVA_COLUMN_DELTA): New macro.
17220 (java_lc): New typedef on new struct _java_lc.
17221 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
17222 (parse_error_context, parse_warning_context): Changed prototypes.
17223 (java_get_line_col): Added as an available global function.
17224 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
17225 (IC_DECL): Replaced by macro IC_TYPE
17226 (DEPEND_WFL): New macro.
17227 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
17228 wrong modifier.
17229 (exit_java_complete_class): Removed a commented out statement.
17230 (struct parser_ctxt): Added comments on fields. modifier_ctx is
17231 now an array of tree nodes. Deleted fields line_list and
17232 e_line. New field elc, to replace e_line.
17233 * parse.y (array_type:): Build WFL node.
17234 (qualified_name:): Build a single WFL node out of two. Retain
17235 the location information of the first node in the resulting node.
17236 (package_declaration:): Use package name as a WFL node
17237 (single_type_import_declaration:): Use imported name as a WFL node.
17238 (type_import_on_demand_declaration:): Use root of the imported
17239 packages as a WFL node.
17240 (field_declaration:): Removed unused local variable cl.
17241 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
17242 (yyerror): New static elc. Removed static error_line, error_pos.
17243 New local code_from_source. Save ctxp->elc into elc at the first
17244 pass. Call java_get_line_col to get a string of the line where
17245 the error occurred.
17246 (debug_line): Removed static function.
17247 (parse_error_context, parse_warning_context): Parameter cl is now
17248 a WFL node. Use its value to initialize ctxp->elc.
17249 (redefinition_error): Parameter cl is now a WFL node.
17250 (parse_add_interface): New parameter wfl. No longer call
17251 lookup_cl, use wfl instead.
17252 (check_class_interface_creation): Parameter cl is now a WFL node.
17253 (maybe_create_class_interface_decl): Likewise.
17254 (add_superinterfaces): New function.
17255 (create_interface): Removed local cl, node, super_decl,
17256 super_decl_type. Function now uses id as a WFL node. Better
17257 warning/error report on obsolete or forbidden mix of
17258 modifiers. Now calls add_superinterfaces to register interfaces.
17259 (create_class): Removed local cl, node. Local variable id is used
17260 as a WFL node. Better error report on forbidden modifier
17261 mix. Uses add_superinterfaces to register interfaces.
17262 (find_field): Argument cl is now a WFL node. Now store the WFL
17263 node of a fields that needs to be checked for their
17264 initialization.
17265 (method_header): Local variable node non longer used. Local
17266 variable id replaces cl.
17267 (check_modifiers_consistency): Local variable cl is now a WFL
17268 node.
17269 (method_declarator): Local variable cl replaced by parameter id.
17270 (parser_qualified_name): Now uses parameter name as a WFL node.
17271 (parser_check_super_interface): New parameter wfl, for achieve
17272 greater accuracy during error reports.
17273 (parser_chain_incomplete_item): New parameter named location. Used,
17274 along the decl, to construct the incomplete item node.
17275 (java_complete_class): resolve_class now uses WFL node extracted
17276 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
17277 where appropriate.
17278 (complete_method_decl): Unresolved function's argument types are WFL.
17279 (resolve_class): Parameter cl is now a WFL node.
17280 (resolve_and_layout): Likewise.
17281 (do_resolve_class): Likewise. Try first to use cl and then do the
17282 lookup on the decl when calling check_pkg_class_access.
17283 (complete_class_report_errors): Use IC_TYPE in place of
17284 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
17285 instead of doing a lookup over the decl.
17286 (java_check_final): Use WFL info from field tree list.
17287 (lookup_cl): Rewritten and returns a statically defined WFL node.
17288 (lookup_modifier_cl): Now uses information from WFL nodes.
17289 (process_imports): Likewise.
17290 (read_import_dir): name and cl arguments replaced by a single WFL
17291 node. Function modified accordingly.
17292 (find_in_imports_on_demand): Now uses WFL node.
17293 (check_pkg_class_access): cl argument is now a WFL node.
17294 (declare_local_variables): Fixed to use WFL nodes.
17295 (resolve_expression_name): Likewise.
17296 (build_method_invocation_stmt): name_combo argument renamed
17297 wfl. Function modified to use WFL nodes.
17298 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
17299 (lookup_method_invoke): cl is now a WFL node. Added missing
17300 IDENTIFIER_POINTER to class type decl name.
17301
17302 1998-04-14 Dave Brolley <brolley@cygnus.com>
17303
17304 * lang.c (init_parse): Now returns char* containing the filename.
17305
17306 1998-04-10 Per Bothner <bothner@cygnus.com>
17307
17308 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
17309
17310 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
17311 * class.c (make_class_data): If flag_assume_compiled, initial class
17312 state is CSTATE_PREPARED; make superclass and interfaces direct
17313 references, rather than constant pool indexes.
17314
17315 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17316
17317 * parser.y: Include flags.h. Removed debug variable pl.
17318 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
17319 (block:): Likewise.
17320 (labeled_statement_nsi:): Generate debug info when reducing
17321 expression_statement:.
17322 (check_pkg_class_access): get_access_flags_from_decl invocation
17323 fixed for new CLASS_* flags location.
17324 (source_end_java_method): Save/restore parser context when
17325 entering/leaving this routine. Restore lineno to its right value
17326 before calling expand_end_bindings.
17327 (build_method_invocation_stmt): build_invoke called with the
17328 current line information.
17329 (build_invoke): New argument cl. Wrap the function call around a
17330 wfl node.
17331 (refine_accessible_methods_list): Changed comment, removed
17332 unnecessary code.
17333 * parse.h: Fixed typo in comments.
17334 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
17335 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
17336 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
17337 parser_ccb_indent.
17338 * lex.c (java_lex): Record the last closing curly bracket of a
17339 function.
17340 * jcf-parse.c (jcf_parse_source): Now calls
17341 java_check_methods. Clarified comment, fixed typo.
17342
17343 1998-04-09 Dave Brolley <brolley@cygnus.com>
17344
17345 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
17346 (finish_parse): Expose for non USE_CPPLIB builds.
17347
17348 1998-04-08 Jeffrey A Law (law@cygnus.com)
17349
17350 * lang.c (lang_print_xnode): New function.
17351
17352 1998-04-03 Per Bothner <bothner@cygnus.com>
17353
17354 * decl.c (class_dtable_decl), java-tree.h: New tree node.
17355 * class.c (get_dispatch_vector, get_dispatch_table): New functions
17356 used to build a class's dispatch table.
17357 (make_class_data): Generate dispatch table if flag_assume_compiled.
17358 Set dtable of class object to address of class_dtable_decl.
17359
17360 * decl.c (int_decl_processing): Make soft_badarrayindex_node
17361 be volatile and have side effects - generates better code.
17362
17363 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
17364 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
17365
17366 * expr.c (expand_invoke): If class is final, method is
17367 effectively final, so can call it directly.
17368
17369 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
17370
17371 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
17372
17373 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17374
17375 * parse.y (build_method_invocation_stmt): Removed extra argument
17376 to build_invoke.
17377
17378 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17379
17380 * expr.c (dtable_indent): Now static global.
17381 (expand_invoke): Now call invoke_build_dtable and
17382 build_invokevirtual.
17383 (invoke_build_dtable, build_invokevirtual): New functions.
17384 * jcf-io.c (find_class): Defer issuing a warning by setting
17385 jcf->outofsynch to 1.
17386 * jcf-parse.c (jcf_out_of_synch): New function.
17387 (load_class): Test this_jcf.outofsynch flag and call
17388 jcf_out_of_synch accordingly.
17389 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
17390 comment indentation.
17391 * lex.c (java_get_unicode): Fixed code indentation.
17392 (java_lex): Create string literal. Fixed typo. Removed several
17393 premature obstack_free.
17394 * parse.h: New enums for name resolution and invocation mode.
17395 (struct qualification): New data structure.
17396 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
17397 (do_resolve_class, build_method_invocation_stmt,
17398 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
17399 debug_line, identical_subpath_p, invocation_mode,
17400 refine_accessible_methods_list, build_invoke,
17401 lookup_method_invoke): New functions declared.
17402 (build_invokevirtual, invoke_build_dtable, match_java_method,
17403 build_field_ref, jcf_out_of_synch): New references to external
17404 functions.
17405 (struct parse_ctxt): Removed artificial_constructor field.
17406 * parse.y: (array_type:): Type defined for this rule.
17407 (class_type:): Installed default rule for interface_type:.
17408 (array_type:): Now build Java array type.
17409 (qualified_name:): Now use obstack_grow0.
17410 (method_declaration:): Skip the artificial constructor added to
17411 the list, if any.
17412 (abstract_method_declaration:): Execute the code only during pass 1.
17413 (block:): Installed default rule in block_statements:.
17414 (block_statement:): Add the statement to the method during pass 2.
17415 (statement_expression): Installed default rule for
17416 method_invocation:.
17417 (argument_list:): Added code to build the argument list.
17418 (method_invocation:): Added call to create the method invocation
17419 node.
17420 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
17421 (debug_line): New function for debug.
17422 (complete_class_decl): No longer do something during pass 1.
17423 (method_header): Use BUILD_PTR_FROM_NAME.
17424 (parser_qualified_classname): Use obstack_grow0. Removed bogus
17425 obstack_free.
17426 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
17427 function's main comment.
17428 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
17429 classes.
17430 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
17431 (resolve_class): Now works with arrays.
17432 (do_resolve_class, resolve_and_layout): New functions.
17433 (java_check_regular_methods): Reverse method list before and after
17434 having processed it. No longer set ctxp->artificial_constructor.
17435 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
17436 accordingly. Fixed typo in issued error message. Now use
17437 obstack_grow0.
17438 (find_in_imports_on_demand): Now use obstack_grow0.
17439 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
17440 (source_end_java_method): Call expand_expr_stmt instead of
17441 expand_expr. Calls it before calling expand_function_end.
17442 (java_method_add_stmt): Do nothing if errors were found during
17443 parsing.
17444 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
17445 (build_method_invocation_stmt, build_invoke, invocation_mode,
17446 lookup_method_invoke, refine_accessible_methods_list,
17447 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
17448 New functions.
17449 * typeck.c (build_java_signature): Properly end method signature
17450 if return type skipped.
17451 (match_java_method): New function.
17452
17453 1998-03-16 Per Bothner <bothner@cygnus.com>
17454
17455 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
17456
17457 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
17458
17459 * expr.c (build_invoke_non_interface): New function.
17460 (methods_ident, ncode_ident): Now static globals.
17461 (expand_invoke): Use build_invoke_non_interface.
17462 * java-tree.h (struct lang_decl): New field function_decl_body.
17463 (DECL_FUNCTION_BODY): New macro.
17464 * jcf-parse.c (jcf_parse_source): Deeper check before setting
17465 CLASS_FROM_SOURCE_P.
17466 (parse_source_file): Fixed typos. Call java_layout_parsed_class
17467 before starting pass 2. Call to java_generate_parsed_class replaced
17468 by java_register_parsed_class.
17469 * lex.c: Fixed typo in header. Some line width related formating.
17470 * lex.h: Some line width related formating.
17471 * parse.h (source_end_java_method, resolve_expression_name,
17472 complete_class_decl, maybe_create_class_interface_decl,
17473 check_class_interface_creation): New static function declarations.
17474 (java_layout_parsed_class, java_method_add_stmt): New function
17475 declarations.
17476 (struct parser_ctxt): Field mark_class_generate removed. New
17477 fields class_list and artificial_constructor.
17478 * parse.y: Fixed typo in header.
17479 (class_declaration:): Call complete_class_decl when class body
17480 parsed.
17481 (method_declaration:): Call source_end_java_method in pass 2 when
17482 the method body is defined.
17483 (postfix_expression:): Do expression name resolution on sub-rule
17484 name during pass 2.
17485 (create_class, create_interface): Merged common pieces.
17486 (check_class_interface_creation, maybe_create_class_interface_decl):
17487 New functions.
17488 (complete_class_decl): New function.
17489 (register_fields): Fixed line width related typo.
17490 (method_header): Correctly skip first argument when fixing
17491 argument line. Changed the loop.
17492 (java_check_circular_reference): Now use ctxp->class_list.
17493 (java_complete_class): Removed start/stop marking.
17494 (java_check_regular_methods): Now takes a class decl as an
17495 argument. Add default constructor if none were encountered.
17496 (java_check_methods): Now use ctxp->class_list. Changed call to
17497 java_check_regular_methods.
17498 (source_start_java_method): Set DECL_ARG_TYPE for each function
17499 arguments.
17500 (source_end_java_method, java_method_add_stmt): New functions.
17501 (java_generate_parsed_class): No longer exists.
17502 (java_layout_parsed_class, java_register_parsed_class): New functions.
17503 (resolve_expression_name): New function.
17504
17505 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17506
17507 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
17508 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
17509 until pass initializations are done. Call read_import_dir with
17510 pass set to 0.
17511 * parse.h: (lookup_modifier_cl): New function declared.
17512 (INTERFACE_FIELD_MODIFIERS): New macro.
17513 (OBSOLETE_MODIFIER_WARNING): New macro.
17514 * parse.y: (register_fields): Class type and current field name in
17515 local variables. Check modifier(s) if adding field(s) to an interface.
17516 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
17517 and report errors using the faulty modifier line context.
17518 (lookup_modifier_cl): New function.
17519 (read_import_dir): Detect and report default import processing
17520 failure.
17521
17522 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
17523
17524 Add a pair of -fassume-compiled/-fno-assume-compiled options.
17525 * class.c (is_compiled_class): Return 1 after making sure it
17526 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
17527 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
17528 * java-tree.h (flag_assume_compiled): Add decl.
17529 * lang.c (lang_f_options): Add the flag.
17530 (flag_assume_compiled): Add decl, default to 0.
17531
17532 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17533
17534 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
17535 (is_compiled_class): Likewise.
17536 (layout_class): Likewise.
17537 (layout_class): Detect and lay out classes defined in source code.
17538 (interface_of_p, add_interface_do, may_add_interface): New
17539 function.
17540 (add_interface): Now use add_interface_do.
17541 (add_method_1): New function.
17542 (add_method): Now use add_method_1.
17543 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
17544 (complete_start_java_method): New function.
17545 (start_java_mehod): Now call complete_start_java_method.
17546 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
17547 (expand_invoke): Likewise and fixed typo.
17548 *gjava.c: (print_super_field): Use new argument to find_class
17549 DO_CLASS_FILE.
17550 (main): Likewise.
17551 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
17552 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
17553 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
17554 IDENTIFIER_NODE.
17555 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
17556 (add_method_1, push_class): New prototypes.
17557 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
17558 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
17559 directory where the class was found.
17560 (find_class): New argument DO_CLASS_FILE. Function find_class
17561 modified accordingly.
17562 *jcf-parse.c: (fix_class_path): New function.
17563 (load_class): Use new VERBOSE argument. load_class now finds and
17564 loads/parses .class/.java files. Save read_state of current_jcf
17565 if necessary.
17566 (java_parser_abort_on_error): New macro.
17567 (jcf_parse_source, parse_source_file): New function.
17568 (jcf_parse): Fixed typo.
17569 (yyparse): Call parse_source_file () only.
17570 (process_zip_dir): Fixed typo, fix zdir->filename_length when
17571 writing the real class name back in the zip directory entry.
17572 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
17573 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
17574 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
17575 (find_class): Prototype fixed.
17576 *lex.c: Added 1998 time stamp.
17577 Removed all static global variables, moved into the parser
17578 context data structure.. Now include unistd.h if SEEK_SET not
17579 defined.
17580 (java_init_lex): Rewritten.
17581 (java_sneak_unicode): Modified current unicode access in current line.
17582 (java_unget_unicode): Likewise.
17583 (java_allocate_new_line): New allocation management.
17584 (java_read_char): Modified access and storage of unget_utf8_value.
17585 New way of processing current unicode.
17586 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
17587 (java_get_unicode): Now use the parser context.
17588 (java_lineterminator): Likewise.
17589 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
17590 of the reentrant parser implementation. Function now use the
17591 parser context data structure and java_lval. Fixed production of
17592 the float and double constant "out of range" error message. Fixed
17593 obstack use. Return integer value when hitting a modifier. Now
17594 return type for TRUE, FALSE and other predefined types. Return
17595 identifier as a TREE_LIST list containing the current line context
17596 as the TREE_VALUE sub-node.
17597 (java_unicode_2_utf8): Fixed typo in declaration.
17598 (java_lex_error): Now use the parser context data structure.
17599 *lex.h: Added 1998 time stamp.
17600 (struct java_line): New fields ref_count and next.
17601 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17602 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
17603 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
17604 *parse.h: Added 1998 time stamp.
17605 (java_parse_source_file): Renamed from parse_source_file.
17606 (YYERROR_NOW, YYNOT_TWICE): Fixed.
17607 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
17608 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
17609 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
17610 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
17611 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
17612 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
17613 (struct parser_ctxt): New data structure to keep the parser context.
17614 *parse.y: Added 1998 time stamp, got rid of static global variables.
17615 (java_error_count, ctxp): New global variables.
17616 (%union): New value field.
17617 (numeric_type, integral_type): Rules removed.
17618 (primitive_type): Rule defined to handle integral, float, double and
17619 boolean types.
17620 (qualified_name, package_declaration,
17621 single_type_import_declaration, type_import_on_demand_declaration,
17622 modifiers, class_declaration, super, interfaces,
17623 interface_type_list, class_body, field_declaration,
17624 field_declaration, variable_declarators, variable_declarator,
17625 variable_declarator_id, method_declaration, method_header,
17626 formal_parameter_list, formal_parameter, method_body, block,
17627 static, interface_declaration, extends_interfaces,
17628 abstract_method_declaration, local_variable_declarators): Rules now
17629 define actions.
17630 (force_error, do_warning): New global statics.
17631 (push_parser_context, parser_context_save_global,
17632 parser_context_restore_global, pop_parser_context): New functions.
17633 (yyerror): Now uses the global parser context. Fixed use of obstack.
17634 (parse_error, parse_error_context, parse_warning_context,
17635 java_accstring_lookup, redefinition_error, check_modifiers,
17636 parser_add_interface, create_interface, create_class, find_field,
17637 duplicate_declaration_error, register_fields, method_header,
17638 check_modifiers_consistency, check_abstract_method_header,
17639 method_declarator, parser_qualified_classname,
17640 parser_check_super_interface, parser_check_super,
17641 parser_chain_incomplete_item, java_check_circular_reference,
17642 layout_class_from_source, java_complete_class,
17643 complete_method_decl, resolve_class, complete_class_report_errors,
17644 java_check_final, check_method_redefinition,
17645 java_check_regular_methods, java_check_abstract_methods,
17646 java_check_methods, lookup_java_interface_method2,
17647 lookup_java_method2, lookup_cl, find_name_in_single_imports,
17648 process_imports, find_in_imports, read_import_entry,
17649 read_import_dir, find_in_imports_on_demand,
17650 check_pkg_class_access, not_builtin_p, declare_local_variables,
17651 source_start_java_method, java_generate_parsed_class): New
17652 functions.
17653 *typeck.c: (signature_include_return): New global variable.
17654 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
17655 to add the function returned type in the signature.
17656
17657 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
17658
17659 * jcf-io.c (open_in_zip): Use strncmp and LEN.
17660
17661 1998-01-29 Dave Brolley <brolley@cygnus.com>
17662
17663 * Make-lang.in (java.info): Added.
17664 (java.install-info): Added
17665
17666 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
17667
17668 * Makefile.in (clean): Also remove java/parse.c.
17669
17670 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
17671
17672 Add a pair of -fbounds-check/-fno-bounds-check options.
17673 * lang.c (lang_decode_option): Add code to grok arguments.
17674 (flag_bounds_check): Add decl.
17675 (lang_f_options): New array w/ the option in it.
17676 * java-tree.h (flag_bounds_check): Add decl.
17677 * lang-options.h: New file.
17678 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
17679 of a static macro value.
17680 (JAVA_ARRAY_EXCEPTION): Delete macro.
17681
17682 1998-01-23 Per Bothner <bothner@cygnus.com>
17683
17684 * typeck.c (build_java_array_type): Fix two bugs in previous change.
17685 * expr.c (build_anewarray): Add missing promote_type.
17686
17687 1998-01-22 Per Bothner <bothner@cygnus.com>
17688
17689 Add array types with known length to optimize bounds checking.
17690 * typeck.c (build_java_array_type): Take length parameter.
17691 (java_array_type_length, build_prim_array_type): New functions.
17692 * java-tree.h: Update for new functions.
17693 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
17694 * class.c: Use build_prim_array_type.
17695 * expr.c (can_widen_reference_to): Handle known-length array types.
17696 (verify_jvm_instructions): Keep track of integer push instructions
17697 followed by newarray/anewarray, so we can build known-length arrays.
17698 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
17699 (java_array_data_offset): New function.
17700 (build_java_array_length_access): New function. Optimize if constant.
17701 (build_java_arrayaccess): Constant fold bounds check.
17702 (expand_java_newarray, expand_java_anewarray): Replaced by ...
17703 (build_newarray, build_anewarray): New functions.
17704 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
17705 * verify.c (merge_types): Handle known-lengh array types.
17706
17707 1998-01-19 Per Bothner <bothner@cygnus.com>
17708
17709 * expr.c (expand_byte_code): Fix performace bug, which caused
17710 searching linenumber_table to be linear rather than constant.
17711
17712 1997-12-12 Per Bothner <bothner@cygnus.com>
17713
17714 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
17715
17716 * decl.c, java-tree.h (soft_fmod_node): New global.
17717 * decl.c (init_decl_processing): Define __builtin_fmod.
17718 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
17719 using __builtin_fmod.
17720
17721 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
17722
17723 * keyword.h: New file, output of keyword.gperf as processed by
17724 gperf.
17725 * lex.c (java_lex_init): Initialize java_error_flag.
17726 * parse.c (YYERROR_NOW): Uses java_error_flag.
17727 * parse.y: New static java_error_flag. Useless definition of
17728 buffer_error gone.
17729 * parse.y (java_error): Portable error recovery using
17730 java_error_flag (not yet completely tuned).
17731
17732 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
17733
17734 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
17735
17736 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
17737
17738 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
17739 (parse.c, lex.c, keyword.h): New rules for Java source code
17740 front-end.
17741 * parse.c: Renamed into jcf-parse.c.
17742 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
17743 * keyword.gperf: New file, Java keywords.
17744 * parse.y: New file, Java language grammar.
17745 * parse.h: New file, Java language grammar definitions.
17746 * lex.c: New file, Java language lexer.
17747 * lex.h: New file, Java language lexer definitions.
17748
17749 1997-12-03 Per Bothner <bothner@cygnus.com>
17750
17751 * decl.c (clinit_identifier_node), java-tree.h: New global.
17752 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
17753 * verify.c (verify_jvm_instructions): Inline use of removed macros.
17754 * expr.c (expand_java_field_op): Check for invalid assignment
17755 to final field.
17756
17757 * jcf-reader.c (get_attribute): Test for wrong attribute length.
17758
17759 1997-10-27 Per Bothner <bothner@cygnus.com>
17760
17761 * verify.c (verify_jvm_instructions): When processing a handler,
17762 attempt to set the current_subr to the right value.
17763 (More complicated code combines Sep 17 and Oct 22 versions.)
17764
17765 1997-10-24 Per Bothner <bothner@cygnus.com>
17766
17767 * class.c (push_class): Figure out (guess) name of source file.
17768 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
17769 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
17770 (parse_class_file): Change return type from int to void.
17771 Call debug_start_source_file/debug_end_source_file.
17772
17773 * expr.c (build_java_binop): Fix masking 2nd operand.
17774 * decl.c (init_decl_processing): Set sizetype first.
17775
17776 1997-10-22 Per Bothner <bothner@cygnus.com>
17777
17778 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
17779 (Revert Sep 17 change.)
17780
17781 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17782
17783 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
17784 .class extension in their name and fix thing so we don't process
17785 them parse_zip_file_entries().
17786 (parse_zip_file_entries): Cleaned unused local variables.
17787
17788 1997-10-20 Per Bothner <bothner@cygnus.com>
17789
17790 * expr.c (can_widen_reference_to): Allows equal array element types.
17791 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
17792 * jcf-dump.c (RET): Get (and print) index.
17793
17794 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
17795 Promote element type to POINTER_TYPE.
17796
17797 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17798
17799 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
17800 find_in_current_zip, jcf_figure_file_type): Moved from
17801 jcf-reader.c to parse.c.
17802 * zextract.c: (read_zip_archive): takes file_comment_length possible
17803 field into account.
17804
17805 1997-10-20 Per Bothner <bothner@cygnus.com>
17806
17807 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
17808
17809 * verify.c (merge_types): Handle array types even better ...
17810
17811 1997-10-17 Per Bothner <bothner@cygnus.com>
17812
17813 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
17814
17815 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
17816 * class.c (make_class_data): Don't build fields_decl if no fields.
17817 When building fields_decl, skip if DECL_ARTIFICIAL.
17818
17819 * expr.c (java_stack_swap): Update stack_type_map.
17820 * verify.c (merge_types): Handle array types better.
17821
17822 1997-10-15 Per Bothner <bothner@cygnus.com>
17823
17824 * class.c (add_field): Don't promote short integral fields to
17825 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
17826 * expr.c (push_value): Promote and convert short integral values.
17827
17828 * decl.c, java-tree.h (integer_two_node): New constant node.
17829 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
17830
17831 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
17832
17833 * class.c (append_gpp_mangled_type): Use function argument
17834 unpromoted type to generate mangled name.
17835
17836 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17837
17838 * constants.c (build_constant_data_ref): Now uses current_class
17839 instead of main_class.
17840 (build_constants_constructor): Now uses current_class instead of
17841 main_class.
17842 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
17843 of the global variable SeepZipFiles done here.
17844 * zextract.c (read_zip_archive): extra_field optional field taken
17845 into account while computing the position of the class file in the
17846 archive.
17847 * verify.c (verify_jvm_instructions): Use current_jcf to search
17848 the constant pool.
17849 * parse.c (load_class): First search for the class to load in the
17850 current zip file. Saves current_jcf (restored before returning
17851 from that function). Don't call JCF_FINISH in the class was found
17852 in the current ZIP file.
17853 (jcf_parse): If the class was found in the current ZIP file, save
17854 its tree_constant_pool (for later reuse).
17855 (parse_class_file): New function. Process each method defined in
17856 the current class and record the class as to be later registered.
17857 (yyparse): Rewritten. Figure the type of the current file and switch
17858 accordingly.
17859 * lang.c: New global variable current_jcf.
17860 (lang_init): Removed compiling_from_source test (done later, in
17861 yyparse). Removed call the jcf_parse ().
17862 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
17863 (typedef struct JCF): New fields seen_in_zip (to mark a class found
17864 in the current ZIP file) and zip_offset (offset to the class data in
17865 the current zip file).
17866 * jcf-reader.c: zipfile.h included.
17867 localToFile: New ZipFileCache static global variable
17868 (parse_zip_file_entries): New function. Browse the current ZIP
17869 file directory and process each class found.
17870 (process_zip_dir): New function. Register each class found in the
17871 ZIP file directory. The class aren't parsed but a valid JCF is
17872 link to each of them.
17873 (find_in_current_zip): New function. Search for a class in the
17874 current ZIP file directory. If found, prepare the class so that it
17875 can be loaded.
17876 (jcf_figure_file_type): New function. Examine the file structure
17877 to figure a class file, a ZIP file. If none of these categories are
17878 matched, a source file is assumed.
17879 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
17880 SeenZipFile: New global variable.
17881 (open_in_zip): Use zipmember's length to accelerate the search for
17882 a member. If zipmember was NULL and zip file successfully read,
17883 return 0.
17884 * java-tree.h: New global variable current_jcf declared. Added
17885 declaration for current_constant_pool_tags, current_constant_pool_data,
17886 current_constant_pool_length, current_constant_pool_data_ref.
17887 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
17888 store the JCF of classes seen in a zip file) and tree *constant_pool
17889 (to save a loaded class constant pool). current_class declared here.
17890 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
17891 retrieve method_ref_constant.
17892 (PUSHC): java_push_constant_from_pool now uses current_jcf.
17893 (OBJECT): get_class_constant now uses current_jcf.
17894 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
17895 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
17896 (expand_invoke): Now uses current_class instead of main_class
17897 (build_class_init): Now uses current_class instead of main_class
17898 * class.c: New static global variable registered_class.
17899 (register_class): New function.
17900 (emit_register_class): Modified to use registered_class instead of
17901 main_class
17902 (is_compiled_class): Now take into account class seen in the archive.
17903
17904 1997-10-06 Per Bothner <bothner@cygnus.com>
17905
17906 * except.h: Renamed to: java-except.h.
17907 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
17908 * except.c: Add semi-working (commented out) implementation.
17909
17910 * expr.c (expand_iinc): Add needed flush_quick_stack.
17911 * parse.c (set_source_filename): New function.
17912 (give_name_to_class): Set input_filename from package.classname.java.
17913
17914 * jcf-io.c (find_class): Don't look first in ".".
17915
17916 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17917
17918 * zextract.c (read_zip_archive): Now takes into account the
17919 extra_field field.
17920 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
17921
17922 1997-09-20 Per Bothner <bothner@cygnus.com>
17923
17924 * constants.c, java-tree.h (build_internal_class_name): New function.
17925 (alloc_class_constant): Re-implement using build_internal_class_name.
17926 * class.c (make_class_data): Likewise.
17927 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
17928
17929 1997-09-17 Per Bothner <bothner@cygnus.com>
17930
17931 * verify.c (verify_jvm_instructions): Temporarily set current_subr
17932 to NULL before pushing an exception handler target.
17933
17934 * expr.c (flush_quick_stack): Save from low stack indexes to high.
17935 (java_stack_swap, java_stack_dup): Re-write to be safe from
17936 clobbering registers.
17937 (build_class_init): New function.
17938
17939 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
17940
17941 * typeck.c (build_java_array_type): Temporary use
17942 permanent_obstack to create the array 'length' field.
17943 * expr.c (lookup_label): Temporay use permanent_obstack to create
17944 label if not found.
17945 * class.c (push_super_field): Tempory use permanent_obstack.
17946
17947 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
17948
17949 * typeck.c (type_for_mode): Now handles double_type_node and
17950 float_type_node.
17951 * verify.c (verify_jvm_instructions): The instruction following
17952 the wide bytecode is checked. OPCODE_ret added to the list of
17953 wide.
17954
17955 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17956
17957 * class.c (make_class): Temporary use permanent_obstack. Set the
17958 class CLASS_P field to 1.
17959 (push_class): Temporary use permanent_obstack.
17960 (set_super_info): Temporary use permanent_obstack.
17961 (add_method): Temporary use permanent_obstack, set
17962 METHOD_TRANSIENT().
17963 (add_field): Temporary use permanent_obstack. Sets
17964 FIELD_VOLATILE() and FIELD_TRANSIENT().
17965 (build_class_ref): Temporary use permanent_obstack if the class
17966 isn't compiled.
17967 (build_static_field_ref): Temporary use permanent_obstack when
17968 creating field's rtl.
17969 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
17970 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
17971 and fields. Function finalized, as far as flag handling.
17972 (push_class_static_dummy_field): Temporary use permanent_obstack.
17973 (emit_register_class): Force generation of class registration at
17974 -O3 or deeper.
17975 * decl.c (end_java_method): Call permanent_allocation() before
17976 returning.
17977 * expr.c (can_widen_reference_to): Added comment to interface
17978 handling, fixed typo.
17979 (lookup_field): Now uses CLASS_P() to correct FIXME
17980 (expand_invoke): Verification on public && !static &&
17981 !abstract moved into soft_lookupinterfacemethod (kaffe).
17982 Use Object class dtable if objectref is an array when expanding
17983 invokeinterface.
17984 (java_push_constant_from_pool): Temporary use permanent_obstack
17985 for CONSTANT_string
17986 * parse.c (get_ref_constant): Temporary use permanent_obstack to
17987 create constant references.
17988 (get_constant): Temporary use permanent_obstack to create constant.
17989 (load_class): Temporary use permanent_obstack to load class.
17990 (jcf_parse): Temporary use permanent_obstack to perform class
17991 layout.
17992 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
17993 (build_java_signature): Temporary use permanent_obstack.
17994 * verify.c: (verify_jvm_instruction): removed unnecessary verification
17995 on ACC_SUPER flag.
17996 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
17997 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
17998 (CLASS_P): Defined
17999
18000 1997-09-11 Per Bothner <bothner@cygnus.com>
18001
18002 * class.c (append_gpp_mangled_type): Fix typo.
18003 (emit_register_class): Use main_class to get class object, rather
18004 than looking for no-longer-existing static decl starting with _CL.
18005 * typeck.c (parse_signature_type): Promote array element type
18006 if it is a RECORD_TYPE.
18007
18008 1997-09-10 Per Bothner <bothner@cygnus.com>
18009
18010 * class.c (push_class_static_dummy_field): New function.
18011 (mangle_static_field): New. Do G++-style mangling of static fields.
18012 (layout_class): Mandle static fields here, not in add_field.
18013 (build_class_ref): The class object is now a dummy static field.
18014 * decl.c (find_local_variable): Look for best, instead of first match.
18015 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
18016 (build_java_athrow): Don't check here if exception is Throwable.
18017 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
18018 (TYPE_USED): Removed. No longer used ...
18019 * parse.c (jcf_parse): Call push_class_static_dummy_field.
18020 * verify.c (push_pending_label): New function.
18021 (push_pending_block): Renamed to check_pending_block.
18022 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
18023 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
18024 re-checking possible handlers) after a store (less wasted work).
18025 Check for null handler (finally) before calling add_handler.
18026 Various changes to (finally?) correctly handle try/finally.
18027
18028 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18029
18030 * class.c: Include stdio.h.
18031
18032 1997-09-04 Per Bothner <bothner@cygnus.com>
18033
18034 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
18035 to make sure class is initialized before static/special invoke.
18036
18037 * verify.c (verify_jvm_instructions): On a store instruction,
18038 call find_local_variable to force pre-allocation of decl and rtx.
18039 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
18040
18041 1997-09-03 Per Bothner <bothner@cygnus.com>
18042
18043 * class.c (build_class_ref): Strip off "promoted_" if need be.
18044 (make_field_value): Call build_java_signature when needed.
18045 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
18046 * expr.c (build_java_athrow): Don't push_value of exception.
18047 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
18048 match specification of [fd]cmp[lg] for NaNs.
18049 (expand_byte_code): Add support for exception handler ranges.
18050 * except.c: Add skeleton for EH code-generation.
18051 * verify.c (merge_types): Treat all promoted integral types as equal.
18052 * constants.c (build_constants_constructor): To force creation of
18053 current_constant_pool_data_ref, call build_constant_data_ref.
18054
18055 * javaop.def (lload): Fix typo.
18056 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
18057
18058 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
18059
18060 * parse.c: Don't include function.h.
18061
18062 1997-08-27 Per Bothner <bothner@cygnus.com>
18063
18064 * except.[ch]: New files.
18065 * Makefile.in (JAVA_OBJS): Add except.o
18066 * expr.c: Temporary warning about unimplemented exceptions.
18067 * verify.c: Verify exception handlers.
18068
18069 * jcf-dump.c (disassemble_method): Print exception table.
18070
18071 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18072
18073 * expr.c (verify_jvm_instructions): Started a thorough
18074 verification of invoke* bytecodes.
18075 (expand_byte_code): flush quick stack if PC is the target of a
18076 branch. and undef RET (conflicting with config/i386/i386.h).
18077 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
18078 used.
18079 (expand_invoke): Now handles invokeinterface and do more
18080 verification according to the bytecode.
18081 (lookup_field): Don't try to load the class if processing
18082 dtable_type.
18083 (can_widen_reference_to): Now handles interfaces.
18084 * decl.c (init_decl_processing): New global variable
18085 soft_lookupinterfacemethod_node, declared in java-tree.h.
18086 Call set_super_info on string_type_node.
18087 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
18088 defined.
18089 * class.c (set_super_info): Fills the CLASS_* flags according to
18090 access_flags.
18091 (get_access_flags_from_decl): Handles all class flags.
18092
18093 1997-08-26 Per Bothner <bothner@cygnus.com>
18094
18095 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
18096 * parse.c (yyparse): Check for abstract method, and missing code.
18097 * expr.c (expand_byte_code): Change interface.
18098 * lang.c (put_decl_node): Print promoted types prettier.
18099 * verify.c (verify_jvm_instruction): Change interface.
18100 Partial support for scanning exception table.
18101 For load instructions, handle promoted integral types.
18102
18103 1997-08-21 Per Bothner <bothner@cygnus.com>
18104
18105 * verify.c: New file, with contents moved from expr.c.
18106 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
18107 * typeck.c (is_array_type_p): Moved here from expr.c.
18108 * java-tree.h: Add some now-needed function declarations.
18109 * Makefile.in (JAVA_OBJS): Added verify.o.
18110
18111 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18112
18113 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
18114 METHOD_ABSTRACT flag.
18115
18116 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
18117 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
18118 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
18119
18120 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
18121 variables.
18122 (start_java_method): Hook for SYNCHRONIZED methods.
18123
18124 * expr.c (build_java_jsr, build_java_ret): New functions
18125 (JSR,PRE): New macros
18126 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
18127 (verify_jvm_instructions): tableswitch, lookupswitch,
18128 monitorenter, monitorexit, goto_w: verified.
18129 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
18130 (build_java_monitor): New function.
18131 (MONITOR_OPERATION): Modified to call build_java_monitor()
18132 (verify_jvm_instructions): Started a thorough verification of
18133 invoke* bytecodes.
18134
18135 1997-08-19 Per Bothner <bothner@cygnus.com>
18136
18137 Support verification of jsr/ret subroutines (used for try/finally).
18138 * decl.c (return_address_type_node): New type node.
18139 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
18140 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
18141 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
18142 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
18143 TYPE_USED): New macros for special types in type_map.
18144
18145 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
18146 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
18147 BCODE_JUMP_TARGET.
18148 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
18149
18150 * expr.c (can_widen_reference_to): New function.
18151 (pop_type): Use it.
18152 (merge_type_state): Support handling start of subroutine.
18153 (push_pending_block): Return char* error message, instead of calling
18154 fatal on an error. Also handle subroutines.
18155 (verify_jvm_instructions): Handle errors from push_poending_block.
18156 Support jsr and ret instructions.
18157
18158 1997-08-19 Per Bothner <bothner@cygnus.com>
18159
18160 * jcf-io.c (find_classfile): Fix thinko.
18161 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
18162
18163 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
18164
18165 * Makefile.in (BISON): Remove.
18166
18167 1997-08-07 Per Bothner <bothner@cygnus.com>
18168
18169 * Makefile.in: Convert to autoconf.
18170 * config-lang.in (outputs): Added java/Makefile.
18171
18172 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
18173 Rename cc1java to jc1.
18174
18175 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
18176 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
18177
18178 * class.c (class_depth): Do load_class if needed.
18179
18180 Mostly better verification.
18181 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
18182 (init_decl_processing): Change return type of soft_checkcast.
18183 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
18184 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
18185 lang_print_error): New functions.
18186 (lang_init): Set global hook print_error_function to lang_print_error.
18187 * expr.c: In the type_map ptr_type_node is only used for null now.
18188 (pop_type, merge_types): Hence ptr_type_node matches any reference.
18189 (merge_types): Dererence pointer to record types before comparing.
18190 (decode_newarray_type, merge_types): On error just return NULL.
18191 (build_java_binop): Add preliminary implementation (with warning)
18192 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
18193 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
18194 (expand_compare, expand_java_goto, expand_java_call): Don't
18195 push_pending_block, since that only makes sense when verifying.
18196 (merge_type_state): Different return codes.
18197 (push_pending_block): A block may need to be verified more than once.
18198 (expand_byte_code): Warn about unused code at code generation time.
18199 (verify_jvm_instruction): Changed logic, since code may need to be
18200 re-verified if type-state has changed. Also, better error handling.
18201 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
18202 Improve newarray, anewarray, ?aload, athrow,
18203 * java-tree.h (LABEL_CHANGED): New macro.
18204
18205 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
18206
18207 * decl.c (soft_athrow_node): New global variable initialized.
18208 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
18209 * typeck.c (convert): Added support for REAL_TYPE.
18210 (convert_to_char): New function.
18211 (convert): Handle CHAR_TYPE.
18212 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
18213 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
18214 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
18215 promoted type.
18216 (verify_jvm_instructions): Added break a the end of bogus unop: label.
18217 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
18218 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
18219 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
18220 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
18221 to Use The Right Things.
18222 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
18223 compatible with INT. BOOLEAN is made equivalent to BYTE.
18224 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
18225 OPCODE_ifnonnull): Now supported.
18226 (build_java_athrow): New function.
18227
18228 1997-08-04 Per Bothner <bothner@cygnus.com>
18229
18230 Rename method name <init> to match G++ (and fix mangling).
18231 * class.c (layout_class): Replace method name of <init> by class name.
18232 (make_method_value): Do inverse renaming of constructor from <init>.
18233 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
18234 * typeck.c (lookup_java_constructor): New function.
18235 * expr.c (expand_invoke): If method_name is <init>, call
18236 lookup_java_constructor to find constructor.
18237
18238 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
18239
18240 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18241
18242 * parse.c (get_class_constant): Modified to handle array "classes"
18243 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
18244 wide type.
18245 (convert): Modified to handle real type.
18246 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
18247 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
18248 variables declared.
18249 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
18250 soft_multianewarray, soft_newarray_node, soft_throw_node): New
18251 global variables initialized.
18252 (find_local_variable): Handles the case of a pointer
18253 (end_java_method): Restore the use of one more scope
18254 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
18255 build_java_array_length_access, expand_java_arrayload,
18256 expand_java_arraystore, expand_java_array_length,
18257 expand_java_multianewarray, expand_java_anewarray,
18258 build_java_check_indexed_type, is_array_type_p,
18259 build_java_throw_out_of_bound_exception): New functions.
18260 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
18261 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
18262 OPCODE_<t>aload): Implemented code for verification.
18263 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
18264 ARRAY_NEW_MULTI): Macro defined.
18265 (CONVERT): Modified to invoke convert().
18266 (case OPCODE_aload2): Fixed index typo from 2 to 1.
18267
18268 1997-07-31 Per Bothner <bothner@cygnus.com>
18269
18270 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
18271 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
18272 (make_class_data): Field name needs '/' as package prefix.
18273 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
18274
18275 1997-07-25 Per Bothner <bothner@cygnus.com>
18276
18277 Implement debug information for local variables.
18278 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
18279 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
18280 DECL_LOCAL_SLOT_CHAIN): New macros.
18281 (struct lang_decl_var): New type.
18282 * parse.c (give_name_to_locals): Move to decl.c.
18283 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
18284 (start_java_method): Re-write parameter handling.
18285 (pending_local_decls): New global variable.
18286 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
18287 (find_local_variable): Accept pc so we can skips decls not in range.
18288 (struct binding_level): Add end_pc field.
18289 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
18290 (various): Change so current pc gets passed to find_local_variable.
18291
18292 * decl.c (init_decl_processing): Re-arrange fields in
18293 class_type_node and and method_type_node to match kaffe 0.9.1.
18294 * class.c (make_method_value, make_class_data): Update
18295 initializations to match.
18296
18297 1997-07-16 Per Bothner <bothner@cygnus.com>
18298
18299 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
18300 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
18301 (push_super_field): New function.
18302 (make_class_data): Handle inheritance of class static initializer.
18303 (layout_class): New name mangling.
18304 * constants.c (build_constant_data_ref): Init type of data array
18305 to a one-element array.
18306 (build_constants_constructor): Set DECL_SIZE from complete array type.
18307 * decl.c: Rename class_type, object_type etc to class_type_node,
18308 object_type_node etc. Make former inherit from latter.
18309 * expr.c (expand_invoke): Add cast of function address.
18310 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
18311 * parse.c (yyparse): Don't call layout_class here.
18312 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
18313
18314 1997-06-14 Per Bothner <bothner@cygnus.com>
18315
18316 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
18317 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
18318 (alloc_class_constant): New.
18319 * expr.c (expand_invoke): Make sure method's class is initialized.
18320 * class.c (interits_from_p, emit_register_class): New functions.
18321 * parse.c (yyparse): Call emit_register_class.
18322
18323 1997-06-09 Per Bothner <bothner@cygnus.com>
18324
18325 * constants.c: New file, to handle constant pool.
18326 * Makefile.in (JAVA_OBJS): Add constants.o.
18327 * decl.c (init_decl_processing): Update, fix, finish various structs.
18328 (pushdecl_top_level): New.
18329 * parse.c (layout_class): Moved to class.c.
18330 * expr.c (java_push_constant_from_pool): New function.
18331 * class.c (build_class_ref): Make work fully
18332 (make_class_data): Emit super-class, constant pool, interface vector.
18333
18334 1997-06-03 Per Bothner <bothner@cygnus.com>
18335
18336 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
18337 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
18338 * class.c (class_depth): New function.
18339 (lookup_named_class): Replaced by new function lookup_class.
18340 * decl.c (object_type_node, string_type_node): New.
18341 Remove various types that we no longer need.
18342 * expr.c (verify_jvm_instructions): New separate verifier pass.
18343 (push_type, pop_type): New functions for verifier.
18344 (type_stack_dup, pop_argument_types, merge_types): Likewise.
18345 (expand_byte_code): Simplify, since we assume already verified.
18346 (expand_invoke): Now mostly works.
18347 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
18348 * lang.c (main_class): Move to parse.c. Don't make_class yet.
18349 * parse.c: Wait to allocate class object until we know its name.
18350 (layout_class): Calculate DECL_VINDEX for each virtual method.
18351 * typeck.c (get_array_type): Rename to ...
18352 (build_java_array_type): ... and provide working implementation.
18353 (build_java_signature): New function - build Java signature of type.
18354 (set_java_signature): New function - cache signature with type.
18355 (lookup_java_method): New function.
18356
18357 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
18358
18359 * class.c (ident_subst): Take extra SUFFIX parameter.
18360 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
18361 (set_constant_value, build_static_field_ref, is_compiled_class): New.
18362 (build_class_ref): Actually implement.
18363 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
18364 * decl.c (builtin_function): New.
18365 (init_decl_processing): Update for current Kaffe. Declare some
18366 builtin Kaffe functions.
18367 * expr.c (build_address_of): New.
18368 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
18369 Renamed (from expand_java_new etc), and added working implementations.
18370 (build_field_ref): Now also handle static fields.
18371 (expand_invoke): Implement invokestatic, and start implement rest.
18372 * java-opcodes.h: Use javaop.def to avoid duplicated list.
18373 * javaop.def: Rename invokevirt -> invokevirtual.
18374 * lang.c (use_handles): Removed.
18375 * parse.c: Add support for ConstantValue attribute.
18376 Handle nested loading of a class. (JPOOL_UTF): New.
18377
18378 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
18379
18380 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
18381
18382 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
18383
18384 * Make-lang.in (java.install-man): New empty rule.
18385 * typeck.c (set_local_type): New function.
18386 * expr.c (STORE_INTERNAL): Call find_local_variable,
18387 not find_stack_slot. Call set_local_type.
18388
18389 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
18390
18391 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
18392 and building RECORD_TYPE CONSTRUCTORs.
18393 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
18394
18395 * lang.c (use_handles): Change the default to 0.
18396 * decl.c: Define and build class_type, field_type, utf8const_type.
18397 * class.c (make_class_data, make_field_value,
18398 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
18399 hashUtf8String, strLengthUtf8, mangled_classname:
18400 Functions to build reflective data structures.
18401 * parse.c (yyparse): Call make_class_data.
18402
18403 * jcf-io.c (open_class, find_classfile): New functions.
18404 * jcf-dump.c: Support reading classfile from explicitly-named
18405 class file (without CLASSPATH searching).
18406
18407 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
18408
18409 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
18410 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
18411 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
18412 (get_constant): Now trivial for CONSTANT_Utf8.
18413
18414 * jcf.h: Make NEW_CPOOL the default.
18415 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
18416
18417 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
18418
18419 New directory.