system.h: Poison PARAMS.
[gcc.git] / gcc / java / ChangeLog
1 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2
3 * java-tree.h: Don't use PARAMS().
4
5 2005-04-07 Per Bothner <per@bothner.com>
6
7 * class.c (push_class): By default, suppress debug output.
8 (finish_class): Enable debug output for classes we're emitting.
9
10 2005-04-07 Andrew Haley <aph@redhat.com>
11
12 * gcj.texi: Correct gcj-dbtool instructions.
13
14 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
15
16 * gcj.texi: Fix a typo.
17 * lang.c: Fix a comment typo.
18
19 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
20
21 * gcj.texi (Invoking gij): Add descriptions of new -X options.
22 Mention recognized-and-ignored compatibility options.
23 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
24 JvFree.
25 (About CNI): Add Memory allocation section.
26
27 2005-04-01 Tom Tromey <tromey@redhat.com>
28
29 * decl.c (java_init_decl_processing): Fix types of
30 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
31 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
32 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
33
34 2005-03-31 Jan Hubicka <jh@suse.cz>
35
36 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
37 * class.c: Include cgraph.h
38 (make_local_functoin_alias): Mark aslias as needed.
39 * resource.c: Include cgraph.h
40 (compile_resource_data): Go via cgraph interface.
41
42 2005-03-30 Ian Lance Taylor <ian@airs.com>
43
44 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
45
46 2005-03-30 Tom Tromey <tromey@redhat.com>
47
48 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
49 inner_class_info_index==0 or outer_class_info_index==0.
50
51 2005-03-29 Tom Tromey <tromey@redhat.com>
52
53 * gcj.texi (libgcj Runtime Properties): Document
54 gnu.gcj.runtime.endorsed.dirs.
55
56 2005-03-24 Anthony Green <green@redhat.com>
57
58 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
59 'gcj-dbtool -p'.
60
61 2005-03-23 Tom Tromey <tromey@redhat.com>
62
63 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
64 (parse_version): Use it.
65
66 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
67
68 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
69
70 2005-03-18 Andrew Haley <aph@redhat.com>
71
72 PR java/20522
73 * decl.c (update_aliases): Don't update variables that are about
74 to die.
75 (maybe_poplevels): Add comment.
76
77 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
78
79 PR java/20502
80 * jcf-parse.c (duplicate_class_warning): New function.
81 (java_parse_file): Call duplicate_class_warning if
82 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
83 (parse_zip_file_entries): Likewise. Also set
84 CLASS_FROM_CURRENTLY_COMPILED_P.
85
86 2005-03-16 Andrew Haley <aph@redhat.com>
87
88 * expr.c (expand_java_arrayload): Don't generate a
89 NullPointerException based on the type of the node.
90 (build_java_array_length_access): Likewise.
91
92 2005-03-15 Zack Weinberg <zack@codesourcery.com>
93
94 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
95
96 2005-03-11 Tom Tromey <tromey@redhat.com>
97
98 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
99 (libgcj Runtime Properties): Document the default .db.
100
101 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
102
103 PR java/20312
104 * parse.y (checks_throws_clauses): Check exceptions list even when
105 the base class does not come from a source file being compiled.
106 (java_complete_lhs): Remove unused variable 'wfl'.
107
108 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
109
110 PR java/20338
111 * decl.c (finish_method): Emit _Jv_InitClass for private static
112 methods inside inner classes as well.
113
114 2005-03-08 Julian Brown <julian@codesourcery.com>
115 * Revert patch from 2005-03-08 for causing bootstrap failure on
116 ppc-darwin.
117
118 2005-03-08 Julian Brown <julian@codesourcery.com>
119
120 * decl.c (finish_method): Give methods once-only linkage.
121
122 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
123
124 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
125
126 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
127
128 * verify-glue.c (vfy_is_assignable_from): Perform static check using
129 can_widen_reference_to if the C++ ABI is in use.
130 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
131 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
132 type_isresolved, init_state, set_pc, state_get_pc,
133 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
134 (verify_fail): Report the current PC from the verifier context.
135 (free_state): Remove #if 0 block to enable this function.
136 (free_verifier_context): Call free_state on state_list iterator
137 values before freeing them.
138 * expr.c (pop_type_0): Pop correct type for error message when stack
139 contains a multi-word type.
140
141 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
142
143 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
144 for known NULL array length access.
145
146 2005-03-07 Tom Tromey <tromey@redhat.com>
147
148 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
149
150 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
151
152 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
153 typeck.c: Update copyright.
154
155 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
156
157 Remove xref code.
158 * xref.c, xref.h: Remove file.
159 * Make-lang.in (java/xref.o): Remove.
160 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
161 * lang.c (flag_emit_xref): Remove definition.
162 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
163 * typeck.c (convert): Remove use of do_not_fold.
164 * parse.y (do_not_fold): Remove definition.
165 (parser grammar): Remove xref code.
166 (maybe_create_class_interface_decl, create_class): Likewise.
167 (register_fields, method_header, finish_method_declaration): Likewise.
168 (declare_local_variables, source_end_java_method): Likewise.
169 (java_complete_expand_classes): Do not set do_not_fold.
170 (java_complete_expand_method): Remove xref code.
171 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
172 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
173 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
174 (patch_synchronized_statement, patch_throw_statement): Likewise.
175 (maybe_build_class_init_for_field): Likewise.
176
177 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
178
179 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
180 instead of IS_NON_TYPE_CODE_CLASS.
181
182 2005-03-04 Andrew Haley <aph@redhat.com>
183
184 PR java/18362
185 * class.c (set_method_index): Don't set method_index if it is
186 NULL_TREE.
187 (layout_class_method): Don't complain about "non-static method foo
188 overrides static method" in the case of indirect dispatch.
189
190 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
191
192 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
193 warning.
194 * Make-lang.in: Don't elide warnings in jcf-io.c.
195
196 2005-03-01 Per Bothner <per@bothner.com>
197
198 PR java/8608
199 * check-init.c (wfl): Remove static.
200 (final_assign_error, check_init): Replace calls to parse_error_context
201 by plain error.
202 (check_init): Save, set, and restore input_location for each exp.
203
204 2005-03-01 Per Bothner <per@bothner.com>
205
206 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
207 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
208 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
209
210 2005-03-01 Per Bothner <per@bothner.com>
211
212 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
213
214 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
215
216 PR libgcj/16923
217 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
218 JvVMOption.
219
220 2005-02-22 Tom Tromey <tromey@redhat.com>
221
222 PR java/20056:
223 * verify-impl.c (EITHER): New define.
224 (types_compatible): Handle it.
225 (check_field_constant): Use it.
226
227 2005-02-18 Tom Tromey <tromey@redhat.com>
228
229 PR java/20056:
230 * verify-impl.c (types_equal): Fixed test.
231
232 PR java/20056:
233 * verify-glue.c (vfy_class_has_field): New function.
234 * verify.h (vfy_class_has_field): Declare.
235 * verify-impl.c (check_field_constant): Added 'putfield'
236 argument.
237 (verify_instructions_0): Updated.
238 (types_equal): New function.
239
240 2005-02-14 Tom Tromey <tromey@redhat.com>
241
242 PR java/19921:
243 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
244 stack effect of multianewarray.
245
246 2005-02-14 Andrew Haley <aph@redhat.com>
247
248 PR java/19907
249 * expr.c (expand_byte_code): Call promote_arguments().
250 (promote_arguments): New function.
251 * decl.c (check_local_unnamed_variable): Remove special case for
252 new verifier.
253 (find_local_variable): Promote all boolean types to int
254 when searching for local variable decls.
255
256 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
257
258 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
259 parse-scan.y: Update copyright.
260
261 2005-02-11 Per Bothner <per@bothner.com>
262
263 PR java/15543
264 * parse-scan.y (input_location): Remove variable.
265 (main_input_filename): New - replaces input_filename, which isn't
266 settable if USE_MAPPED_LOCATION.
267 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
268 so we don't reference input_location or wfl_operator in that case.
269 * jv-scan.c (expand_location): Remove - no longer used.
270 (main): Set main_input_filename rather than input_filename.
271
272 2005-02-09 Richard Henderson <rth@redhat.com>
273
274 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
275 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
276
277 2005-02-08 Marcin Dalecki <martin@dalecki.de>
278
279 * expr.c (add_type_assertion): Use the proper enumeration type,
280 since this is what htab_find_slot() is expecting.
281
282 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
283
284 * gcj.texi: Update copyright dates.
285
286 2005-02-02 Tom Tromey <tromey@redhat.com>
287
288 * gcj.texi (libgcj Runtime Properties): Default library_control
289 to 'cache'.
290
291 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
292
293 PR java/15543
294 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
295 (modifiers) when square brackets are present in a declaration for
296 a final paramter.
297 * jv-scan.c (main): Set input_filename and input_line.
298
299 2005-02-01 Tom Tromey <tromey@redhat.com>
300
301 PR java/19742:
302 * gjavah.c (get_field_name): Don't override name for JNI header.
303
304 2005-02-01 Roger Sayle <roger@eyesopen.com>
305
306 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
307 of unsigned types using iushr and lushr JVM bytecodes.
308
309 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
310
311 PR java/19738
312 * gjavah.c (jni_print_float): Do not emit floating-point
313 initialiser for a static final field.
314 (jni_print_double): Likewise.
315
316 2005-02-01 Mark Mitchell <mark@codesourcery.com>
317
318 Revert:
319 2005-01-31 Mark Mitchell <mark@codesourcery.com>
320 * gjavah.c (print_field_info): Mark static data members of
321 floating-point type with "__extension__".
322
323 2005-01-31 Mark Mitchell <mark@codesourcery.com>
324
325 * gjavah.c (print_field_info): Mark static data members of
326 floating-point type with "__extension__".
327
328 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
329
330 PR java/9157
331 * parse.y (build_string_concatenation): Remove redundant if.
332 (patch_conditional_expr): Attempt to patch_string() the condition
333 of a ?: as well, in addition to its other operands.
334
335 2005-01-25 Tom Tromey <tromey@redhat.com>
336
337 * Make-lang.in (java/java-tree-inline.o): Removed.
338
339 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
340
341 PR java/19070
342 * parse.y (patch_binop): Allow comparisons against NULL only
343 if the other operand is of a reference type.
344
345 2005-01-24 Tom Tromey <tromey@redhat.com>
346
347 * java-tree.h (gcj_abi_version): Declare.
348 * class.c (make_class_data): Push gcj_abi_version into "next"
349 field. Renamed field.
350 * decl.c (gcj_abi_version): New global.
351 (parse_version): New function.
352 (java_init_decl_processing): Call it. Renamed 'next' field.
353 Include version.h.
354 (GCJ_BINARYCOMPAT_ADDITION): New define.
355
356 2005-01-24 Roger Sayle <roger@eyesopen.com>
357
358 PR java/19295
359 * jcf-write.c (generate_bytecode_insns): Conversions between
360 integer types of the same precision shouldn't generate widening
361 or narrowing conversion bytecodes.
362
363 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
364
365 * java-except.h, java-tree.h: Remove unused prototypes.
366
367 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
368
369 PR java/18091:
370 * jcf-write.c (perform_relocations): Don't call memcpy if source
371 and destination are the same.
372
373 2005-01-17 Tom Tromey <tromey@redhat.com>
374
375 * verify-impl.c (get_short): Sign extend.
376 (get_int): Likewise.
377
378 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
379
380 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
381 with TYPE_SIZE.
382
383 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
384
385 * verify.c: Revert to the version before the BC-ABI merge.
386
387 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
388
389 PR java/19277
390 * check-init.c (check_init): Take care of references that do not
391 have an explicit final variable declaration (e.g. array length
392 access) for pre/post in/de-crement operators.
393
394 2005-01-08 Mark Wielaard <mark@klomp.org>
395
396 * parse.y (process_imports): Allocate (and free) original_name only
397 when not already defined.
398 * jcf-parse.c (read_class): Free results of find_class() and
399 lrealpath().
400 (java_parse_file): Keep pointer to head of file_list and free when
401 done. Free result of lrealpath().
402
403 2005-01-05 Tom Tromey <tromey@redhat.com>
404
405 * gcj.texi (Standard Properties): java.ext.dirs is now used.
406
407 2004-12-20 Andrew Haley <aph@redhat.com>
408
409 * typeck.c: Use fold_convert for ints and booleans.
410
411 2004-12-17 Andrew Haley <aph@redhat.com>
412
413 PR java/18931
414 * typeck.c (convert): Use a CONVERT_EXPR when converting to
415 BOOLEAN_TYPE or CHAR_TYPE.
416 (convert_to_boolean, convert_to_char) : Remove.
417 * convert.h (convert_to_boolean, convert_to_char) : Remove.
418 * expr.c (expand_load_internal): Do type conversion if type is not
419 as required.
420
421 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
422
423 PR target/18459
424 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
425 Update comment.
426
427 2004-12-07 Andrew Haley <aph@redhat.com>
428
429 PR java/18811:
430 * jcf-parse.c (load_class): Remove sanity test for missing inner
431 class file.
432
433 2004-12-06 Tom Tromey <tromey@redhat.com>
434
435 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
436 (java.uninstall): Likewise.
437 (java.maintainer-clean): Likewise.
438 (.INTERMEDIATE): Likewise.
439 (java.install-man): Likewise.
440 (gcj-dbtool.pod): New target.
441 * gcj.texi (Code Generation): Document -findirect-dispatch.
442 (libgcj Runtime Properties): Document
443 gnu.gcj.precompiled.db.path.
444 (Top): Link to "Invoking gcj-dbtool".
445
446 2004-12-06 Tom Tromey <tromey@redhat.com>
447
448 PR java/14853:
449 * java-tree.h (extract_field_decl): Declare.
450 * parse.y (extract_field_decl): Renamed from
451 strip_out_static_field_access_decl. No longer static.
452 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
453
454 2004-12-03 Tom Tromey <tromey@redhat.com>
455
456 * lang.c (flag_new_verifier): Define.
457 (java_post_options): Set flag_new_verifier if indirect dispatch
458 is being used.
459 * lang.opt (fnew-verifier): Removed.
460
461 2004-12-03 Tom Tromey <tromey@redhat.com>
462
463 PR bootstrap/14614:
464 * Make-lang.in (java.install-common): Only install transformed
465 gcjh if gcj-cross exists.
466
467 2004-12-03 Andrew Haley <aph@redhat.com>
468
469 PR java/18812
470 * except.c (link_handler): Patch 'outer' field of siblings of the
471 range we're demoting.
472
473 2004-12-03 Andrew Haley <aph@redhat.com>
474
475 PR java/18697
476 * class.c (layout_class_method): Don't fail to override a method
477 simply because it has DECL_ARTIFICIAL set.
478
479 2004-12-02 Tom Tromey <tromey@redhat.com>
480
481 PR java/16675:
482 * parse.y (craft_constructor): Special case null_pointer_node.
483
484 2004-12-02 Tom Tromey <tromey@redhat.com>
485
486 PR java/18741:
487 * java-gimplify.c (java_gimplify_expr): Don't call
488 SET_EXPR_LOCATION unless wrapped tree is an expression.
489
490 2004-11-27 Per Bothner <per@bothner.com>
491
492 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
493 Fix fencepost error in 'i', which got executed one too many times.
494 Also, fold memcpy into explicit loop, as originally intended.
495 Also, free temporary 'buf' which otherwise leaks.
496
497 2004-11-27 Per Bothner <per@bothner.com>
498
499 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
500 local static variables if not USE_MAPPED_LOCATION.
501
502 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
503
504 * class.c, decl.c, expr.c: Fix comment typos.
505
506 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
507
508 PR java/18305
509 * decl.c (end_java_method): Call
510 attach_init_test_initialization_flags on all the init_decls.
511 * parse.y (attach_init_test_initialization_flags): Move to ...
512 * expr.c (attach_init_test_initialization_flags): here and
513 support BIND_EXPR also.
514 * java-tree.h (attach_init_test_initialization_flags): Prototype.
515 * jcf-parse.c (parse_class_file): Don't disable class init
516 optimization.
517
518 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
519
520 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
521 in diagnostics.
522
523 2004-11-24 Richard Henderson <rth@redhat.com>
524
525 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
526 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
527
528 2004-11-24 Tom Tromey <tromey@redhat.com>
529
530 * verify.c (defer_merging): Don't use C++-style comment.
531 * verify.h (java_opcode): Added java_opcode_end.
532 * class.c (build_class_ref): Remove C++ comment and old FIXME.
533
534 * verify-impl.c (vfy_push_type): Removed bogus "return".
535 (initialize_stack): Use vfy_alloc and vfy_free.
536 (verify_instructions_0): Likewise.
537
538 * Merged gcj-abi-2-dev-branch to trunk.
539
540 2004-11-24 Andrew Haley <aph@redhat.com>
541
542 * jcf-parse.c (parse_class_file): Set file_start_location.
543
544 2004-11-10 Tom Tromey <tromey@redhat.com>
545
546 * class.c (make_field_value): Don't call build_static_field_ref.
547 (build_static_field_ref): Don't emit direct references when using
548 indirect dispatch.
549
550 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
551 -verbose:class into man page synopsis.
552
553 2004-11-09 Tom Tromey <tromey@redhat.com>
554
555 * expr.c (build_java_arraystore_check): Still generate check if
556 element type is itself an array.
557
558 2004-11-08 Tom Tromey <tromey@redhat.com>
559
560 * java-tree.h (soft_check_assignment_node): Removed.
561 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
562 * decl.c (java_init_decl_processing): Don't initialize
563 soft_check_assignment_node.
564
565 2004-11-05 Tom Tromey <tromey@redhat.com>
566
567 * class.c (layout_class_methods): Don't add Miranda methods when
568 using indirect dispatch.
569
570 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
571
572 * class.c (make_class_data): Call emit_assertion_table to set the
573 'assertion_table' field.
574 (build_signature_for_libgcj): Move here from expr.c.
575 (add_assertion_table_entry): New function. Callback for assertion
576 hashtable traversal.
577 (emit_assertion_table): New. Take class argument, and generate
578 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
579 * decl.c (init_decl_processing): Define assertion_entry_type record.
580 Push 'assertion_table' class field instead of 'verify'.
581 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
582 (type_assertion_hash): Include 'assertion_code' in hash.
583 (add_type_assertion): Rewritten. Take class and assertion_code
584 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
585 (can_widen_reference_to): Use new add_type_assertion() arguments.
586 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
587 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
588 (verify_identifier_node): Removed.
589 (assertion_entry_type, assertion_table_type): New.
590 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
591 assertion code definitions.
592 (struct type_assertion): Add assertion_code. Rename 'source_type' and
593 'target_type' to 'op1' and 'op2'.
594 (add_type_assertion): Declare.
595 (lang_printable_name_wls): Remove unused definition.
596 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
597 to emit runtime assertion.
598 (vfy_note_stack_type): Clean up non-C90 declarations.
599 (vfy_note_local_type): Likewise.
600 * verify.h (vfy_is_assignable_from): Declare.
601 * verify-impl.c (is_assignable_from_slow): Remove unused function.
602 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
603 instead of is_assignable_from_slow().
604 (types_compatible): Reinstate ref_compatible() call.
605
606 2004-11-04 Tom Tromey <tromey@redhat.com>
607
608 * class.c (build_static_field_ref): Reverted previous patch.
609
610 * class.c (build_static_field_ref): Don't emit direct references
611 when using indirect dispatch.
612
613 2004-11-03 Tom Tromey <tromey@redhat.com>
614
615 * expr.c (expand_java_arrayload): Set lhs_type_node.
616 (expand_java_arraystore): Set rhs_type_node.
617
618 2004-11-02 Tom Tromey <tromey@redhat.com>
619
620 * jcf-parse.c (compute_class_name): Use filename length from zip
621 directory, not strlen.
622
623 * expr.c (expand_invoke): Mark new interface methods as abstract.
624
625 2004-11-01 Tom Tromey <tromey@redhat.com>
626
627 * verify-impl.c (push_jump): Removed check for uninitialized
628 objects.
629 (push_exception_jump): Likewise.
630 (handle_ret_insn): Likewise.
631 (handle_jsr_insn): Likewise.
632 (state_check_no_uninitialized_objects): Removed.
633
634 * decl.c (check_local_unnamed_variable): Recognize
635 promoted-to-int parameters when using the new verifier.
636 * expr.c (expand_java_arraystore): Explicitly request array type
637 when using new verifier.
638 (expand_java_arrayload): Likewise.
639 (invoke_build_dtable): Don't pass object_type_node as
640 expression argument to build_java_indirect_ref.
641 (build_java_check_indexed_type): Do nothing.
642 (build_java_arraystore_check): Handle case where array doesn't
643 have array type.
644 (build_java_array_length_access): Likewise.
645 (expand_invoke): Handle case where interface overrides a method
646 from Object.
647 (pop_type_0): Always succeed for reference types.
648 (process_jvm_instruction): Don't pop a value in a dead
649 exception handler.
650 (pop_arguments): Convert arguments to correct types.
651
652 2004-10-29 Andrew Haley <aph@redhat.com>
653
654 * jcf-parse.c (give_name_to_class): Remove line that was
655 incorrectly merged.
656
657 2004-10-29 Andrew Haley <aph@redhat.com>
658
659 * jcf-parse.c (set_source_filename): Add code to build new sfname.
660
661 2004-10-20 Andrew Haley <aph@redhat.com>
662
663 * decl.c (end_java_method): Don't expand if flag_syntax_only.
664
665 2004-10-26 Tom Tromey <tromey@redhat.com>
666
667 * verify.h (vfy_notify_verified): Removed.
668 * verify-glue.c (vfy_notify_verified): Removed.
669
670 2004-10-26 Tom Tromey <tromey@redhat.com>
671
672 * verify-impl.c (debug_print_state): Declare `i' before code.
673 (merge_types): Modify `t' when it is null_type.
674
675 2004-10-26 Tom Tromey <tromey@redhat.com>
676
677 * verify-impl.c (type_print): Renamed from print. Now static and
678 takes an argument.
679 (debug_print_state): Use type_print.
680
681 2004-10-25 Tom Tromey <tromey@redhat.com>
682
683 * expr.c (build_invokeinterface): Compute correct offset for
684 index into interface methods.
685
686 2004-10-20 Tom Tromey <tromey@redhat.com>
687
688 * java-tree.h (verify_jvm_instructions_new): Declare.
689
690 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
691 command line.
692
693 * verify-impl.c (verify_instructions): Correctly handle wide
694 types on the stack.
695 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
696 (vfy_get_component_type): Strip pointer types.
697 (vfy_find_class): Use get_type_from_signature. Strip pointer
698 types.
699 Include java-except.h.
700
701 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
702
703 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
704 vfy_push_type_t, set_variable, add_new_state, merge_into,
705 handle_jsr_insn, branch_prepass, check_class_constant,
706 check_wide_constant, get_one_type, compute_static_types,
707 verify_instructions_0): Clean up C99 declarations after statements.
708
709 2004-10-20 Tom Tromey <tromey@redhat.com>
710
711 * verify-impl.c (merge_refs): Compare reference against iterator,
712 not ref2.
713
714 * verify-glue.c (vfy_tag): Mask off resolved flag.
715
716 2004-10-19 Tom Tromey <tromey@redhat.com>
717
718 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
719 (init_state_with_stack): Initialize `this_type' in state.
720 (verify_method): Use debug_print.
721 * verify-glue.c (vfy_is_primitive): Removed debugging print.
722 (vfy_note_stack_depth): Reverted last patch.
723 (vfy_note_stack_type): Note pointer to Object, not Object.
724 (vfy_note_local_type): Likewise.
725
726 * verify.h (vfy_note_instruction_seen): Declare.
727 * verify-glue.c (verify_jvm_instructions_new): Set
728 BCODE_EXCEPTION_TARGET on target instruction.
729 (vfy_note_instruction_seen): New function.
730 * verify-impl.c (FLAG_INSN_SEEN): New define.
731 (verify_instructions_0): Set flag on instruction. Save state for
732 PC=0 later.
733 (verify_instructions): Call vfy_note_instruction_seen.
734
735 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
736 (verify_jvm_instructions_new): Call method_init_exceptions,
737 add_handler, and handle_nested_ranges.
738 * verify-impl.c (verify_method): Return 1 on success.
739 (verify_instructions_0): Save the state at PC=0.
740
741 * verify-impl.c (init_type_from_class): Set is_resolved and
742 ref_next on new ref_intersection.
743 (init_type_from_string): Likewise.
744
745 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
746
747 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
748 if flag_new_verifier is set.
749 * java-tree.h (flag_new_verifier): Declare.
750 * lang.opt (fnew-verifier): New option.
751 * verify-impl.c: Work around namespace pollution by undef'ing
752 'current_class'.
753 (struct verifier_context): Make 'bytecode' const.
754 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
755 (types_compatible): For the BC-ABI, always consider reference types
756 compatible.
757 (check_class_constant): Use vfr->current_class.
758 (check_constant): Likewise.
759 (check_wide_constant): Likewise.
760 (check_field_constant): Check for 'L' at start of type name.
761 (get_one_type): Return pointer instead of type. Set type result in
762 caller via passed type pointer.
763 (compute_argument_types): Update to use new get_one_type arguments.
764 (compute_return_type): Likewise.
765 (make_verifier_context): New. Allocate and initialize 'vfr'.
766 (free_verifier_context): New. Free 'vfr' and its contents.
767 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
768 and free_verifier_context.
769
770 2004-10-15 Tom Tromey <tromey@redhat.com>
771
772 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
773 * verify.h (vfy_fail): Fixed formatting.
774
775 * verify-impl.c (vfr): Fixed comment formatting.
776 (collapse_type): New function.
777 (verify_instructions): Notify compiler about type map.
778 * verify.h (vfy_note_stack_depth): Updated.
779 (vfy_note_stack_type): Likewise.
780 (vfy_note_local_type): Likewise.
781 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
782 Declare.
783 * verify-glue.c (vfy_note_stack_depth): Correctly size type
784 state. Added `method' argument.
785 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
786 argument.
787 (vfy_note_local_type): New function.
788 (vfy_unsuitable_type): Likewise.
789 (vfy_return_address_type): Likewise.
790 (vfy_null_type): Likewise.
791
792 * verify.h (VFY_IN_GCC): Removed.
793 (VFY_WANT_TYPEMAP): Removed.
794 * verify-impl.c (verify_instructions_0): Removed useless "\".
795 (struct state) <next>: Uncomment.
796
797 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
798
799 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
800 C-style.
801
802 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
803
804 * Make-lang.in (verify.o): Re-enabled this target.
805 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
806 (vfy_get_interface): Likewise.
807 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
808 * verify.h (verify_jvm_instructions_new): Declare.
809 * verify-impl.c (free_state): Temporarily comment out unused
810 function.
811
812 2004-10-06 Tom Tromey <tromey@redhat.com>
813
814 * java-tree.h (JV_STATE_READ): New enum value.
815
816 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
817
818 * verify.h: New file.
819
820 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
821
822 * verify-impl.c, verify-glue.c, verify.h: New files.
823 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
824
825 2004-09-24 Andrew Haley <aph@redhat.com>
826
827 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
828 for a slot if it's of pointer type.
829
830 2004-09-14 Tom Tromey <tromey@redhat.com>
831
832 * class.c (make_class_data): Correctly initialize "state" field.
833 Initialize "engine" field.
834 * decl.c (java_init_decl_processing): Add "engine" field.
835
836 2004-09-10 Andrew Haley <aph@redhat.com>
837
838 PR java/12760
839 * expr.c (build_invokeinterface): Use fast method for interface
840 dispatch.
841 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
842 JTI_ITABLE_PTR_TYPE.
843 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
844 (emit_symbol_table): Add new arg, element_size.
845 * decl.c (java_init_decl_processing): Initialize Class.itable.
846 * class.c (GEN_TABLE): New macro.
847 (gen_indirect_dispatch_tables): Use it. Add itable.
848 (make_class_data): Add new arg for emit_symbol_table().
849 Emit itable.
850 (add_miranda_methods): Make sure search_class has been parsed.
851 (emit_symbol_table): Add new arg, element_size.
852
853 2004-09-06 Andrew Haley <aph@redhat.com>
854
855 * verify.c (merge_types): Return Object for all merges of
856 interfaces.
857 * expr.c (add_type_assertion): Don't generate assertions when
858 source type is array of Object.
859
860 2004-09-03 Andrew Haley <aph@redhat.com>
861
862 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
863
864 * lang.c (java_post_options): Force flag_verify_invocations if
865 we're not using indirect dispatch.
866
867 * expr.c (pop_type_0): Move test for interfaces before call to
868 can_widen_reference_to().
869 (build_signature_for_libgcj): Remove generation of canonical array
870 type.
871 (add_type_assertion): Canonicalize both arrays.
872 Don't assert that type X can be assigned to Object.
873 Don't assert that type X an be assigned to type X.
874 Don't assert that Object can be assigned to type X.
875 (can_widen_reference_to): Warn whenever we generate an assertion.
876 (process_jvm_instruction): Use throwable_type_node for the type of
877 an exception class.
878
879 2004-09-01 Andrew Haley <aph@redhat.com>
880
881 * decl.c (java_init_decl_processing): Change
882 verify_identifier_node to "__verify".
883 * expr.c (add_type_assertion): Use verify_identifier_node for name.
884 * java-tree.h (verify_identifier_node): Change to "__verify".
885
886 * expr.c (build_signature_for_libgcj): New function.
887 (add_type_assertion): Use it to construct signatures for
888 source_type and target_type.
889
890 2004-08-27 Andrew Haley <aph@redhat.com>
891
892 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
893 (verify_identifier_node): New.
894 (TYPE_VERIFY_METHOD): New.
895 (struct type_assertion): New type.
896 * expr.c (type_assertion_eq): New function.
897 (type_assertion_hash): New function.
898 (add_type_assertion): New function.
899 (can_widen_reference_to): Call add_type_assertion().
900 * decl.c (java_init_decl_processing): Add verify_identifier_node.
901 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
902 (finish_class): Output TYPE_VERIFY_METHOD (type).
903
904 * decl.c (end_java_method): Nullify unused fields.
905
906 2004-08-17 Andrew Haley <aph@redhat.com>
907
908 * verify.c (defer_merging): Quieten.
909 * jcf-parse.c (load_class): Only try to open a class file if it's
910 java.lang.Object or if it's part of the current compilation.
911 Check that the class we just tried to load is the class we just
912 loaded. Quieten.
913 (java_parse_file): Set flag_verify_invocations off if we're
914 compiling from .class.
915 (parse_zip_file_entries): Abort if we try to read a dummy class.
916 * expr.c (can_widen_reference_to): Quieten.
917 (build_invokevirtual): Abort if we try to invokevirtual an
918 interface.
919 (expand_invoke): Don't build a non-interface call to an interface.
920 (build_instanceof): Don't do premature optimization if
921 flag_verify_invocations is not set.
922 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
923 from superclass.
924 (build_static_field_ref): Add correct type conversion for
925 field_address.
926 (add_miranda_methods): Disable generation of Miranda methods for
927 dummy classes.
928 (layout_class_method): Don't complain about non-static method
929 overrides static method with dummy classes.
930
931 2004-08-13 Tom Tromey <tromey@redhat.com>
932
933 * class.c (build_static_field_ref): Re-enable atable lookups for
934 static fields.
935
936 * parse.y (strip_out_static_field_access_decl): Indentation fix.
937
938 2004-08-11 Tom Tromey <tromey@redhat.com>
939
940 * gcj.texi (libgcj Runtime Properties): Document new properties.
941
942 2004-08-06 Andrew Haley <aph@redhat.com>
943
944 * jcf-parse.c (load_class): Check that we really have loaded the
945 class we're looking for.
946
947 2004-07-19 Andrew Haley <aph@redhat.com>
948
949 * verify.c (verify_jvm_instructions): Comment change only.
950
951 * typeck.c (build_java_array_type): Add size field to array name.
952
953 * java-tree.h (LOCAL_SLOT_P): New.
954 (update_aliases): Add PC argument.
955 (pushdecl_function_level): New function.
956
957 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
958 MODIFY_EXPR, and SAVE_EXPR.
959 (java_gimplify_modify_expr): New function.
960
961 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
962 (expand_iinc): Pass PC to update_aliases().
963 (STORE_INTERNAL): Likewise.
964 (process_jvm_instruction): Likewise.
965
966 * decl.c (base_decl_map): New variable.
967 (uniq): New variable.
968 (update_aliases): Rewrite with more thorough checking.
969 (debug_variable_p): New function.
970 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
971 (check_local_named_variable): Delete whole function.
972 (initialize_local_variable): New function.
973 (check_local_unnamed_variable): Add checks and comments.
974 (find_local_variable): Rewrite.
975 (java_replace_reference): New function.
976 (function_binding_level): New variable.
977 (pushdecl_function_level): New function.
978 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
979 (maybe_pushlevels): Call pushdecl() on each of the new decls.
980 (start_java_method): Reset uniq. Create base_decl_map. Set
981 function_binding_level.
982 (end_java_method): Null unused fields to save memory.
983
984 2004-06-29 Andrew Haley <aph@redhat.com>
985
986 * except.c (expand_start_java_handler): Push a new binding level.
987 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
988 register_exception_range() to register where we'll do it.
989 (expand_end_java_handler): Remove old bogus code. Replace with
990 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
991 the top of the expression we're curently building.
992 (maybe_end_try): Delete.
993 * decl.c (binding_level.exception_range): New field.
994 (clear_binding_level): Add field exception_range. Reformat.
995 (poplevel): Call expand_end_java_handler().
996 (poplevel): Call java_add_stmt only if functionbody is false.
997 (maybe_poplevels): Don't call maybe_end_try() from here.
998 (end_java_method): Clear no longer used trees in function decl.
999 (register_exception_range): New function.
1000 * java-tree.h (register_exception_range, struct eh_range): Declare.
1001
1002 2004-06-22 Andrew Haley <aph@redhat.com>
1003
1004 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1005 the otable.
1006 * check-init.c (get_variable_decl): Teach check-init about
1007 FIELD_DECLs addressed via the otable.
1008 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1009 CLASS_PARSED_P.
1010
1011 2004-05-28 Andrew Haley <aph@redhat.com>
1012
1013 * jcf-parse.c (load_class): Don't try to read a class that we've
1014 already read.
1015
1016 * expr.c (build_invokeinterface): Use the old-fashioned way of
1017 doing indirect dispatch: look up interfaces by name.
1018 * java-tree.h (enum java_tree_index): Add
1019 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1020 * decl.c (java_init_decl_processing): Add
1021 soft_lookupinterfacemethodbyname_node.
1022
1023 * gjavah.c (print_method_info): Final methods have vtable entries,
1024 so gjavah needs to output them.
1025 * class.c (layout_class_method): Generate vtable entries for final
1026 methods.
1027 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1028 dispatch, even if a method is final.
1029
1030 2004-05-25 Andrew Haley <aph@redhat.com>
1031
1032 * class.c (build_symbol_entry): Convert the names of constructors
1033 to init_identifier_node when generating an entry for the indirect
1034 dispatch table.
1035
1036 * expr.c (build_known_method_ref): Generate indirect calls for
1037 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1038
1039 2004-05-24 Andrew Haley <aph@redhat.com>
1040
1041 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1042 atable element is of the right type.
1043
1044 * class.c (build_static_field_ref): Cast pointer to correct type
1045 for field.
1046
1047 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
1048
1049 * Merged with HEAD as of 20040514. Diff against
1050 gcj-abi-2-merge-20040514.
1051
1052 2004-04-16 Andrew Haley <aph@redhat.com>
1053
1054 * verify.c (check_pending_block): Disable subroutine checks.
1055 (defer_merging): New function.
1056 (merge_types): If types are dummy, use defer_merging to combine them.
1057 (verify_jvm_instructions): If invocation is invokeinterface and
1058 target is dummy, assume target really is an interface.
1059
1060 * parse.y (patch_invoke): Break out call to java_create_object.
1061
1062 * lang.c (flag_verify_invocations): New.
1063
1064 * jcf-parse.c (load_class): If we've already failed to load a
1065 class, don't try again.
1066 (load_class): If we can't find a .class file, don't fail, but emit
1067 a warning.
1068 (parse_class_file): Don't act on dummy methods.
1069
1070 * java-tree.h (flag_verify_invocations): New.
1071 (TYPE_DUMMY): New.
1072 (lang_type.dummy_class): New field.
1073 (java_create_object): New function.
1074 (METHOD_DUMMY): New.
1075
1076 * expr.c (build_field_ref): Widen field offset.
1077 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1078 that each of its elements is compatible with the one we're
1079 popping.
1080 (pop_type_0): Issue a warning to say that we need to generate a
1081 runtime check.
1082 (java_create_object): New function.
1083 (build_field_ref): Only generate hard refs if we're not using
1084 indirect dispatch.
1085 (expand_java_field_op): If we're using !verify_invocations and we
1086 see a missing field, generate a decl for it.
1087
1088 (expand_invoke): If a class doesn't have the method we seek and
1089 we're using !flag_verify_invocations, generate a decl for the
1090 method now.
1091
1092 (build_known_method_ref): Always use indirect dispatch via the
1093 atable for static methods.
1094
1095 (expand_java_NEW): Break out object creation into new function,
1096 java_create_object.
1097
1098 (can_widen_reference_to): Issue a warning to say that we need to
1099 generate a runtime check.
1100
1101 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1102 (make_method_value): Also use index for interfaces.
1103 (make_class_data): Skip dummy field for inherited data.
1104 Don't build method array for dummy methods.
1105 Set size_in_byte to -1 when using inirect dispatch
1106 Don't build a hard class ref if we don't have a hard ref to our
1107 superclass, or if we're using inirect dispatch.
1108 Null out dispatch tables.
1109
1110 (layout_class_method): Don't complain about non-static method
1111 overrides static method is method is artificial.
1112
1113 (build_static_field_ref): Disable atable references to static
1114 fields for the time being.
1115
1116 (layout_class_methods): Check for CLASS_INTERFACE as
1117 well as CLASS_ABSTRACT.
1118
1119 2004-11-24 Steven Bosscher <stevenb@suse.de>
1120
1121 * class.c (make_class_data): Don't check flag_inline_functions.
1122 * lang.c (flag_really_inline): Remove unused flag.
1123 (java_handle_option): Don't set it here. Remove special handling
1124 of flag_inline_functions for Java.
1125 (java_init): Don't set flag_inline_trees here. Already done...
1126 (java_post_options): ...here. Don't clear flag_inline_functions.
1127
1128 2004-11-24 Steven Bosscher <stevenb@suse.de>
1129
1130 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1131 (java_gimplify_exit_block_expr): New function.
1132 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1133 LABELED_BLOCK_EXPR.
1134 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1135 (EXIT_BLOCK_EXPR): Likewise.
1136 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1137 (LABELED_BLOCK_BODY): Likewise.
1138 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1139 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1140 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
1141 TREE_OPERAND.
1142 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1143 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1144 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
1145 second operand of EXIT_BLOCK_EXPR.
1146 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1147 TREE_OPERAND.
1148 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1149
1150 2004-11-23 Ben Elliston <bje@au.ibm.com>
1151
1152 * xref.h (xref_flag_value): Remove.
1153 (xref_set_data, xref_get_data): Likewise.
1154 (xref_set_current_fp): Likewise.
1155 (XREF_NONE): Likewise.
1156 (XREF_GET_DATA): Likewise.
1157 * xref.c (xref_flag_value): Remove.
1158 (xref_set_data, xref_get_data): Likewise.
1159 (xref_set_current_fp): Likewise.
1160
1161 2004-11-23 Ben Elliston <bje@au.ibm.com>
1162
1163 * gjavah.c (output_directory): Make static.
1164 (temp_directory): Likewise.
1165
1166 2004-11-15 Tom Tromey <tromey@redhat.com>
1167
1168 * decl.c (instn_ptr_type_node): Removed.
1169 (lineNumbers_ptr_type_node): Removed.
1170 (jint_type): Removed.
1171 (jint_ptr_type): Removed.
1172
1173 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
1174
1175 PR java/15576
1176 * check-init.c (check_init): Ignore DECL_EXPR.
1177 * expr.c (always_initialize_class_p): Reenable.
1178 (build_class_init): Use a variable to store the decl. Also use
1179 boolean_false_node instead of integer_zero_node.
1180 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1181 to the block.
1182
1183 2004-11-08 Tom Tromey <tromey@redhat.com>
1184
1185 PR java/16843:
1186 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1187 generating a JNI header.
1188 (print_field_info): Handle JNI headers.
1189 (jni_print_float): Likewise.
1190 (jni_print_double): Likewise.
1191
1192 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
1193
1194 * decl.c (end_java_method): Remove duplicated code.
1195
1196 2004-11-06 Zack Weinberg <zack@codesourcery.com>
1197 Gerald Pfeifer <gerald@pfeifer.com>
1198
1199 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1200 as well.
1201
1202 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
1203
1204 PR java/17265
1205 * class.c: Reinstate 2004-08-18 patch.
1206 (make_local_function_alias): Don't create an alias for extern (native)
1207 functions.
1208
1209 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
1210
1211 PR java/17265
1212 * class.c (make_local_function_alias): Revert 2004-08-18 change.
1213 (make_method_value): Likewise.
1214
1215 2004-10-21 Andrew Haley <aph@redhat.com>
1216
1217 PR java/18091:
1218 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1219
1220 2004-10-20 Andrew Haley <aph@redhat.com>
1221
1222 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1223 Remove duplicated code block.
1224
1225 2004-10-18 Steven Bosscher <stevenb@suse.de>
1226
1227 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1228 New rules to work around old Bison warnings.
1229
1230 2004-10-17 Steven Bosscher <stevenb@suse.de>
1231
1232 * class.c (ident_subst): Always alloca buffer.
1233 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1234 opcode after including javaop.def.
1235 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1236 conditional expression that exits, to avoid warnings.
1237 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1238 a user of an extension.
1239 * win32-host.c: Move check down to have non-empty file when
1240 WIN32 is not defined.
1241
1242 * Make-lang.in (java-warn): Add STRICT_WARN.
1243 (java/jcf-io.o-warn): Don't have Werror for this file.
1244 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1245
1246 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
1247
1248 * expr.c (expr_add_location): Move declaration to before all
1249 statements.
1250 * parse.y (java_expand_classes): Ditto.
1251 * lex.c (java_peek_unicode): Ditto.
1252
1253 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1254
1255 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1256 if possible, else convert `foo' to 'foo'.
1257 * class.c: Likewise.
1258 * decl.c: Likewise.
1259 * expr.c: Likewise.
1260 * jcf-io.c: Likewise.
1261 * jcf-parse.c: Likewise.
1262 * lang.c: Likewise.
1263 * lex.c: Likewise.
1264 * parse.h: Likewise.
1265
1266 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1267
1268 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1269 rename parameter 'msg' to 'msgid' in function declaration.
1270 (issue_warning_error_from_context): Likewise.
1271 (yyerror): Rename parameter 'msg' to 'msgid'.
1272 (all over): Use new quoting style for diagnostics.
1273
1274 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1275
1276 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1277 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1278 Update copyright.
1279
1280 2004-10-14 Matt Austern <austern@apple.com>
1281
1282 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1283 pointer_set_t* now.
1284
1285 2004-10-13 Tom Tromey <tromey@redhat.com>
1286
1287 PR java/15578:
1288 * lang.opt (--extdirs): Document.
1289 * jvspec.c (lang_specific_driver): Recognize -encoding and
1290 -extdirs.
1291
1292 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
1293
1294 * parse.y (issue_warning_error_from_context): Use va_list *
1295 instead of va_list parameter.
1296 (parse_error_context): Update call.
1297 (parse_warning_context): Likewise.
1298
1299 2004-10-05 Zack Weinberg <zack@codesourcery.com>
1300
1301 * parse.y, parse-scan.y: Add list of diagnostic messages to
1302 insulate translation template from version of yacc/bison used
1303 to compile the grammar.
1304
1305 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
1306
1307 Prepare for %q, %< and %> in diagnostic message strings.
1308 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1309 Name second parameter 'msgid'.
1310 * parse.y: Additionally include pretty-print.h and diagnostic.h.
1311 (issue_warning_error_from_context): Use pretty-printer functions
1312 instead of vsprintf for constructing formatted messages. Rename
1313 parameter 'msg' to 'msgid'.
1314 (parse_error_context): Rename parameter 'msg' to 'msgid'.
1315 (parse_warning_context): Likewise.
1316
1317 2004-10-05 Andrew Haley <aph@redhat.com>
1318
1319 PR java/17779
1320 * jcf-parse.c (parse_zip_file_entries): If a class has a
1321 superclass and a TYPE_SIZE of zero, lay it out.
1322
1323 2004-09-30 Andrew Haley <aph@redhat.com>
1324
1325 PR java/17733
1326 * jcf-parse.c (compute_class_name): Rewrite.
1327
1328 2004-10-01 Jan Hubicka <jh@suse.cz>
1329
1330 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1331
1332 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1333
1334 * lex.c: Fix a comment typo.
1335
1336 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1337
1338 * java-tree.h: Fix a comment typo.
1339
1340 2004-09-30 Per Bothner <per@bothner.com>
1341
1342 Simplify lexer. Implement --enable-mapped-location support.
1343 * jcf-parse.c (parse_class_file): Use linemap_line_start.
1344 (parse_source_file_1): Pass filename as extra parameter, so we can call
1345 linemap_add and set input_location here, rather than in both callers.
1346 (read_class): Pass copied filename to parse_source_file_1.
1347 Don't initialize wfl_operator - only needed for source compilation.
1348 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
1349 * lex.h: Remove a bunch of debugging macros.
1350 * lex.h (struct_java_line, struct java_error): Remove types.
1351 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
1352 (struct java_lc_s): Remove prev_col field.
1353 (struct java_lexer): New fields next_unicode, next_columns, and
1354 avail_unicode. New position field, and maybe token_start field.
1355 Don't need hit_eof field - use next_unicode == -1 instead.
1356 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
1357 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
1358 * parse.h: Various changes for USE_MAPPED_LOCATION.
1359 (EXPR_WFL_EMIT_LINE_NOTE): XXX
1360 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1361 (struct parser_ctxt): New file_start_location field.
1362 Remove p_line, c_line fields since we no longer save lines.
1363 Remove elc, lineno, and current_jcf fields - no longer used.
1364 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
1365 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1366 source_location and is probably not needed anymore anyway.
1367 Use new expr_add_Location function.
1368 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
1369 (java_pop_parser_context): Minor cleanup.
1370 (java_parser_context_save_global, java_parser_context_restore_global,
1371 java_pop_parser_context): Save/restore input_location as a unit.
1372 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
1373 a source_location instead of a wfl context node.
1374 (check_class_interface_creation): input_filename is not addressable.
1375 (create_artificial_method): Calling java_parser_context_save_global
1376 and java_parser_context_restore_global is overkill. Instead,
1377 temporarily set input_location from class decl.
1378 (java_layout_seen_class_methods): Set input_location from method decl.
1379 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1380 (finish_loop_body): Likewise.
1381 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
1382 (java_sprint_unicode): Take a character, not index in line.
1383 (java_sneak_uncode): Replaced by java_peek_unicode.
1384 (java_unget_unicode): No longer used.
1385 (java_allocate_new_line. java_store_unicode): Removed, since we
1386 no longer remember "lines".
1387 (java_new_lexer): Update for new data structures.
1388 (java_read_char): Move unget_value checking to java_read_unicode.
1389 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1390 efficient functions that are used directly when lexing.
1391 (java_read_unicode_collapsing_terminators): No longer needed.
1392 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1393 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1394 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
1395 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
1396 combine switch branches, and test for common token kinds earlier.
1397 (java_lex_error): Rewrite.
1398 * jv-scan.c (expand_location): New function, copied from tree.c.
1399 (main): Set ctxp->filename instead of setting input_filename directly.
1400
1401 2004-09-30 Per Bothner <per@bothner.com>
1402
1403 More cleanup for --enable-mapped-location.
1404 * class.c (push_class): If USE_MAPPED_LOCATION don't set
1405 input_location here. Instead do it in give_name_to_class.
1406 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1407 * expr.c (expand_byte_code): Call linemap_line_start.
1408 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
1409 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
1410 (expr_add_location): New function, if USE_MAPPED_LOCATION.
1411 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
1412 to USE_MAPPED_LOCATION case.
1413
1414 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
1415 * jcf-parse.c (java_parse_file): Don't set input_filename.
1416 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1417 Create a list of TRANSLATION_UNIT_DECL.
1418 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
1419 reason is so we can set a DECL_SOURCE_LOCATION for each file.
1420 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1421 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1422 (file_start_location): New static.
1423 (set_source_filename): Avoid extra access to input_filename macro.
1424 Concatenate new name with class's package prefix.
1425 (set_source_filename, give_name_to_class): Update.
1426 (give_name_to_class): Set class's "line 0" input_location here.
1427 (parse_class_file): Set input_location as a unit.
1428
1429 * jcf-parse.c (load_class): Sanity test if missing inner class file.
1430
1431 2004-09-29 Per Bothner <per@bothner.com>
1432
1433 * java-tree.h: Redefine some macros and add some declaration
1434 to handle the USE_MAPPED_LOCATION case.
1435 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
1436 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
1437 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1438 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1439
1440 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1441 * decl.c (finish_method, java_add_stmt): Likewise.
1442 * java-gimplify.c (java-gimplify.c): Likewise.
1443 * jcf-write.c (generate_bytecode_insns): Likewise.
1444 * lang.c (java_post_options): Likewise - call linemap_add.
1445
1446 2004-09-29 Andrew Haley <aph@redhat.com>
1447
1448 PR java/17007
1449 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1450 result of TRUNC_MOD_EXPR.
1451 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1452 * decl.c (java_init_decl_processing): Mark
1453 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1454
1455 2004-09-28 Tom Tromey <tromey@redhat.com>
1456
1457 PR java/15710:
1458 * class.c (add_miranda_methods): Load superinterface if not
1459 already loaded.
1460
1461 2004-09-28 Andrew Haley <aph@redhat.com>
1462
1463 PR java/17586
1464 * jcf-parse.c (load_class): Don't try to read a class that we've
1465 already read.
1466
1467 2004-09-28 Andrew Haley <aph@redhat.com>
1468
1469 * jcf-parse.c (load_class): Back out previous broken patch.
1470
1471 2004-09-28 Andrew Haley <aph@redhat.com>
1472
1473 PR java/17586
1474 * jcf-parse.c (load_class): Don't try to read a class that we've
1475 already read.
1476 Check that we really did read the right class.
1477
1478 2004-09-25 Tom Tromey <tromey@redhat.com>
1479
1480 PR java/17500:
1481 * parse.y (create_artificial_method): Use add_method_1.
1482
1483 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
1484
1485 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1486 comment typos.
1487 * gcj.texi: Fix typos.
1488
1489 2004-09-24 Tom Tromey <tromey@redhat.com>
1490
1491 PR java/15656:
1492 * parse.y (class_instance_creation_expression): Set `$$' to NULL
1493 in error parts of rule.
1494 (unary_expression): Don't call error_if_numeric_overflow when $1
1495 is NULL.
1496
1497 2004-09-24 Tom Tromey <tromey@redhat.com>
1498
1499 PR java/16789:
1500 * parse.y (resolve_qualified_expression_name): Set
1501 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1502 * expr.c (force_evaluation_order): Check for empty argument list
1503 after stripping COMPOUND_EXPR.
1504
1505 2004-09-23 Andrew Haley <aph@redhat.com>
1506
1507 PR java/16927:
1508 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1509 COND_EXPRs.
1510
1511 2004-09-23 Tom Tromey <tromey@redhat.com>
1512
1513 PR java/17329:
1514 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1515 where operand is null.
1516
1517 2004-09-23 Tom Tromey <tromey@redhat.com>
1518
1519 PR java/17380:
1520 * parse.y (not_accessible_p): Allow access to protected members
1521 even when class is not static.
1522
1523 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1524
1525 * Make-lang.in: Revert the gcc-none.o change.
1526
1527 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1528
1529 * parse.y (patch_anonymous_class): VEC_space returns true if there
1530 is space.
1531
1532 2004-09-21 Matt Austern <austern@apple.com>
1533
1534 Fix bootstrap.
1535 * gjavah.c (free_method_name_list): Fix function definition so
1536 it's a proper C prototype.
1537
1538 2004-09-21 Tom Tromey <tromey@redhat.com>
1539
1540 PR java/17575:
1541 * gjavah.c (free_method_name_list): New method.
1542 (main): Call it.
1543
1544 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1545 Zack Weinberg <zack@codesourcery.com>
1546
1547 * java-tree.def: Use tree_code_class enumeration constants
1548 instead of code letters.
1549 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1550 new tree-class enumeration constants.
1551
1552 2004-09-13 Tom Tromey <tromey@redhat.com>
1553
1554 PR java/17216:
1555 * class.c (layout_class_method): Put synthetic methods into the
1556 vtable.
1557
1558 2004-09-11 Andrew Pinski <apinski@apple.com>
1559
1560 * Make-lang.in (java/ggc-none.c): Change dependency
1561 for ggc.h into $(GGC_H).
1562
1563 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1564
1565 * Make-lang.in (java/win32-host.o): Add dependency on
1566 coretypes.h.
1567 * win32-host.c: Add includes for coretypes.h, jcf.h
1568
1569 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1570
1571 * Make-lang.in (GCJH_OBJS): Change dependency from
1572 ggc-none.o to java/ggc-none.o
1573 (JCFDUMP_OBJS): Likewise.
1574 (java/ggc-none.o): New target.
1575
1576 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1577
1578 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
1579 * class.c (build_utf8_ref, build_static_field_ref,
1580 make_field_value, make_method_value, get_dispatch_table,
1581 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1582 * constants.c (get_tag_node, build_ref_from_constant_pool,
1583 build_constants_constructor): Likewise.
1584 * decl.c (java_init_decl_processing): Likewise.
1585 * expr.c (build_java_array_length_access, build_newarray,
1586 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1587 build_java_binop, build_field_ref, expand_java_add_case,
1588 expand_java_call, build_known_method_ref, build_invokevirtual,
1589 build_invokeinterface, build_jni_stub): Likewise.
1590 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1591 * jcf-parse.c (get_constant): Likewise.
1592 * lex.c (do_java_lex): Likewise.
1593 * parse.y (patch_binop, patch_unaryop, patch_cast,
1594 build_newarray_node, patch_newarray): Likewise.
1595 * resource.c (compile_resource_data): Likewise.
1596 * typeck.c (build_prim_array_type): Likewise.
1597
1598 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1599
1600 * decl.c (java_init_decl_processing): Adjust
1601 initialize_sizetypes call.
1602
1603 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1604
1605 * jv-scan.c (fancy_abort): Add.
1606
1607 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1608
1609 * expr.c (build_java_arrayaccess): Use convert to change
1610 len's type.
1611
1612 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
1613
1614 * class.c (make_local_function_alias): Allocate extra space for 'L'
1615 in name buffer. Reported by Thomas Neumann.
1616
1617 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1618
1619 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1620 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
1621 * lex.c (do_java_lex): Adjust.
1622 (error_if_numeric_overflow): Likewise.
1623
1624 2004-08-18 Andrew Pinski <apinski@apple.com>
1625
1626 * class.c (make_local_function_alias): Only make a new decl if we
1627 support alias attribute on all decls.
1628
1629 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
1630
1631 * class.c (make_local_function_alias): New function. Create local
1632 alias for public method DECL.
1633 (make_method_value): Use make_local_function_alias.
1634 * parse.y (craft_constructor): Don't special-case anonymous classes.
1635 Always set ctor_name to init_identifier_node.
1636 (lookup_method_invoke): Call layout_class_method when creating
1637 anonymous class constructor.
1638
1639 2004-08-18 Richard Henderson <rth@redhat.com>
1640
1641 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1642 default case. Treat '<' similarly. Update for
1643 is_gimple_formal_tmp_var name change.
1644
1645 2004-08-17 Andrew Haley <aph@redhat.com>
1646
1647 * lang.c (lang_printable_name): Obey verbose flag.
1648 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1649 lang_printable_name().
1650 (verify_constructor_circularity, get_printable_method_name,
1651 check_abstract_method_definitions, java_check_regular_methods,
1652 java_check_abstract_methods, check_inner_class_access,
1653 fix_constructors, patch_method_invocation, patch_return):
1654 Likewise.
1655 * expr.c (pop_type_0): Likewise.
1656
1657 * java-tree.h (lang_printable_name_wls): Delete.
1658
1659 2004-08-16 Tom Tromey <tromey@redhat.com>
1660
1661 PR java/8473:
1662 * parse.y (primary): Changed for initialized and uninitialized
1663 array creations.
1664 (array_access): Handle array_creation_initialized.
1665 (array_creation_expression): Split into
1666 array_creation_initialized and array_creation_uninitialized.
1667
1668 2004-08-16 Andrew Haley <aph@redhat.com>
1669
1670 * jcf-write.c (find_constant_index): Canonicalize NaNs when
1671 generating bytecode.
1672
1673 2004-08-16 Elliot Lee <sopwith@redhat.com>
1674
1675 PR java/9677
1676 * jcf-parse.c (java_parse_file): Handle filenames with embedded
1677 spaces, and quoted filelists.
1678
1679 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1680
1681 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1682 * class.c (build_utf8_ref, build_static_field_ref,
1683 make_field_value, make_method_value, get_dispatch_table,
1684 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1685 * constants.c (get_tag_node, build_ref_from_constant_pool,
1686 build_constants_constructor): Likewise.
1687 * decl.c (java_init_decl_processing): Likewise.
1688 * expr.c (build_java_array_length_access, build_newarray,
1689 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1690 build_java_binop, build_field_ref, expand_java_add_case,
1691 expand_java_call, build_known_method_ref, build_invokevirtual,
1692 build_invokeinterface, build_jni_stub): Likewise.
1693 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1694 * jcf-parse.c (get_constant): Likewise.
1695 * lex.c (do_java_lex): Likewise.
1696 * parse.y (patch_binop, patch_unaryop, patch_cast,
1697 build_null_of_type, patch_newarray): Likewise.
1698 * resource.c (compile_resource_data): Likewise.
1699 * typeck.c (build_prim_array_type): Likewise.
1700
1701 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
1702
1703 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1704 Don't create BLOCK here or call java_gimplify_block.
1705
1706 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
1707
1708 * java-tree.h (flag_deprecated): Removed.
1709 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1710 * parse.y (check_deprecation): Check warn_deprecated instead of
1711 flag_deprecated.
1712
1713 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
1714
1715 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1716 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1717 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1718 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1719 flag_force_classes_archive_check, flag_optimize_sci,
1720 flag_indirect_dispatch): Remove explicit declarations.
1721 * lang.opt: Add implicit declare/define/assign. Remove obsolete
1722 final comment.
1723
1724 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
1725
1726 PR bootstrap/14893
1727 * Make-lang.in (java.install-man): Install from either build
1728 tree or source tree, whichever has the file first.
1729
1730 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1731
1732 * jcf-parse.c (get_constant): Adjust force_fit_type call.
1733 * lex.h (SET_LVAL_NODE_TYPE): Remove.
1734 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1735 (do_java_lex): Likewise. Adjust force_fit_type call.
1736
1737 2004-08-04 Roger Sayle <roger@eyesopen.com>
1738 Andrew Haley <aph@redhat.com>
1739
1740 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1741 checking trees as they're being built.
1742 (convert): Call convert_ieee_real_to_integer if we're
1743 converting a constant, even if we're writing a class file.
1744
1745 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
1746
1747 PR java/16701
1748 * parse.y (fold_constant_for_init): Call resolve_field_access with
1749 correct current_class context.
1750
1751 2004-08-01 Roger Sayle <roger@eyesopen.com>
1752
1753 * decl.c (update_aliases, initialize_local_variable): Replace calls
1754 to build with calls to buildN.
1755 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1756 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1757 * parse.h (BUILD_THROW): Likewise.
1758 * parse.y (switch_expression, synchronized_statement,
1759 catch_clause_parameter, array_creation_expression,
1760 conditional_expression, make_qualified_name,
1761 resolve_qualified_expression_name, patch_method_invocation,
1762 patch_invoke, build_method_invocation, build_new_invocation,
1763 build_assignment, patch_assignment, build_binop, patch_binop,
1764 build_string_concatenation, build_incdec, patch_unaryop,
1765 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1766 patch_return, build_if_else_statement, build_labeled_block,
1767 build_new_loop, build_loop_body, build_bc_statement,
1768 build_assertion, encapsulate_with_try_catch, build_try_statement,
1769 build_try_finally_statement, patch_synchronized_statement,
1770 emit_test_initialization): Likewise, replace build with buildN.
1771
1772 2004-07-28 Eric Christopher <echristo@redhat.com>
1773
1774 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1775 (java_unsafe_for_reeval): Ditto.
1776
1777 2004-07-26 <hp@bitrange.com>
1778
1779 * parse.y (build_super_invocation): Adjust declaration order to
1780 avoid declaration after statement.
1781
1782 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1783
1784 * decl.c: Rename all identifiers named `class' to `cl'.
1785
1786 2004-07-25 Richard Henderson <rth@redhat.com>
1787
1788 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1789
1790 2004-07-23 Mike Stump <mrs@apple.com>
1791
1792 * boehm.c (set_bit): Improve type safety wrt unsignedness.
1793 * gjavah.c (throwable_p, decode_signature_piece,
1794 print_full_cxx_name, print_include, add_namelet, add_class_decl,
1795 process_file): Likewise.
1796 * jcf-dump.c (main): Likewise.
1797 * jcf-io.c (read_zip_member): Likewise.
1798 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1799 give_name_to_class, get_class_constant): Likewise.
1800 * jcf-write.c (find_constant_wide, push_long_const,
1801 generate_classfile): Likewise.
1802 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1803 * parse.y (read_import_dir): Likewise.
1804 * typeck.c (parse_signature_type): Likewise.
1805 * verify.c (verify_jvm_instructions): Likewise.
1806 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1807
1808 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1809
1810 * Make-lang.in: Replace rmic and rmiregistry references with
1811 grmic and grmiregistry.
1812 * gcj.texi: Likewise.
1813
1814 2004-07-20 Andrew Haley <aph@redhat.com>
1815
1816 PR java/16431.
1817 * verify.c (verify_jvm_instructions): Comment change only.
1818
1819 * typeck.c (build_java_array_type): Add size field to array name.
1820
1821 * java-tree.h (LOCAL_SLOT_P): New.
1822 (update_aliases): Add PC argument.
1823 (pushdecl_function_level): New function.
1824
1825 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1826 MODIFY_EXPR, and SAVE_EXPR.
1827 (java_gimplify_modify_expr): New function.
1828
1829 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1830 (expand_iinc): Pass PC to update_aliases().
1831 (STORE_INTERNAL): Likewise.
1832 (process_jvm_instruction): Likewise.
1833
1834 * decl.c (base_decl_map): New variable.
1835 (uniq): New variable.
1836 (update_aliases): Rewrite with more thorough checking.
1837 (debug_variable_p): New function.
1838 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1839 (check_local_named_variable): Delete whole function.
1840 (initialize_local_variable): New function.
1841 (check_local_unnamed_variable): Add checks and comments.
1842 (find_local_variable): Rewrite.
1843 (java_replace_reference): New function.
1844 (function_binding_level): New variable.
1845 (pushdecl_function_level): New function.
1846 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1847 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1848 (start_java_method): Reset uniq. Create base_decl_map. Set
1849 function_binding_level.
1850 (end_java_method): Null unused fields to save memory.
1851
1852 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1853
1854 * class.c (add_interface_do): Remove.
1855 (set_super_info, interface_of_p, maybe_add_interface,
1856 add_interface, make_class_data, layout_class,
1857 add_miranda_methods): Adjust BINFO accessors and addition.
1858 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1859 accessors.
1860 * jcf-write.c (generate_classfile): Likewise.
1861 * parse.y (patch_anonymous_class, check_inner_circular_reference,
1862 check_circular_reference, java_complete_class,
1863 check_abstract_method_definitions,
1864 java_check_abstract_method_definitions,
1865 check_interface_throws_clauses, java_check_abstract_methods,
1866 lookup_java_interface_method2,
1867 find_applicable_accessible_methods_list): Adjust BINFO accessors
1868 and addition.
1869 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1870
1871 2004-07-18 Roger Sayle <roger@eyesopen.com>
1872
1873 * builtins.c (max_builtin, min_builtin,
1874 java_build_function_call_expr): Replace calls to build with buildN.
1875 * class.c (build_class_ref, build_static_field_ref,
1876 get_dispatch_table, make_class_data, layout_class_method): Likewise.
1877 * constants.c (build_ref_from_constant_pool): Likewise.
1878 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1879 add_stmt_to_compound): Likewise.
1880 * except.c (build_exception_object_ref, expand_end_java_handler):
1881 Likewise.
1882 * java-gimplify.c (java_gimplify_case_expr,
1883 java_gimplify_default_expr, java_gimplify_block,
1884 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1885 * jcf-write.c (generate_bytecode_insns): Likewise.
1886 * typeck.c (convert_ieee_real_to_integer): Likewise.
1887
1888 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1889
1890 * java-tree.h (builtin_function): Declare.
1891
1892 2004-07-16 Steven Bosscher <stevenb@suse.de>
1893
1894 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1895 abuse restore_line_number_status.
1896
1897 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
1898
1899 g++/15861
1900 * jcf-parse.c (java_emit_static_constructor): Specify default
1901 priority.
1902
1903 2004-07-13 Per Bothner <per@bothner.com>
1904
1905 * java-tree.h (all_class_filename): Remove useless macro.
1906 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
1907 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
1908 * parse.y (java_parser_context_restore_global): Replace
1909 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1910 * jcf-parse.c (read_class, java_parse_file): Likewise.
1911
1912 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
1913
1914 PR java/16474
1915 gjavah.c (print_field_info): Emit constant only if field is static.
1916
1917 2004-07-11 Roger Sayle <roger@eyesopen.com>
1918
1919 * expr.c (java_truthvalue_conversion, flush_quick_stack,
1920 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1921 build_java_ret, build_java_throw_out_of_bounds_exception,
1922 build_java_array_length_access, java_check_reference,
1923 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1924 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1925 expand_java_arrayload, build_java_monitor, expand_java_return,
1926 expand_load_internal, expand_java_NEW, build_get_class,
1927 build_instanceof, expand_java_CHECKCAST, expand_iinc,
1928 build_java_soft_divmod, build_java_binop, build_field_ref,
1929 expand_compare, expand_java_goto, expand_java_switch,
1930 expand_java_add_case, build_class_init, build_known_method_ref,
1931 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1932 expand_invoke, build_jni_stub, expand_java_field_op,
1933 java_expand_expr, expand_byte_code, STORE_INTERNAL,
1934 force_evaluation_order, emit_init_test_initialization): Convert
1935 calls to "build" into calls to the prefered "buildN" functions.
1936
1937 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1938
1939 * java-tree.h (set_block): Remove.
1940 * lang.c (java_clear_binding_stack): New.
1941 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1942 * decl.c (struct binding_level): Remove this_block.
1943 (clear_binding_level): Likewise.
1944 (poplevel): Don't handle this_block.
1945 (set_block): Remove.
1946
1947 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
1948
1949 * class.c (common_enclosing_context_p): Remove statement with no
1950 side-effects.
1951
1952 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1953
1954 PR java/8618
1955 * parse.y (create_anonymous_class): Remove 'location' argument. Use
1956 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
1957 (craft_constructor): Inherit access flags for implicit constructor
1958 from the enclosing class.
1959 (create_class): Fix comment typo.
1960 (resolve_qualified_expression_name): Pass type of qualifier to
1961 not_accessible_p, not the type in which target field was found.
1962 (not_accessible_p): Handle inner classes. Expand protected
1963 qualifier-subtype check to enclosing instances, but don't apply this
1964 check to static members. Allow protected access to inner classes
1965 of a subtype. Allow private access within common enclosing context.
1966 (build_super_invocation): Get WFL line number info from current
1967 class decl.
1968 (build_incomplete_class_ref): Update for new create_anonymous_class
1969 signature.
1970 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
1971 common_enclosing_instance_p.
1972 * class.c (common_enclosing_context_p): New. Determine if types
1973 share a common enclosing context, even across static contexts.
1974 (common_enclosing_instance_p): Renamed from
1975 common_enclosing_context_p. Determines if types share a common
1976 non-static enclosing instance.
1977 * java-tree.h (common_enclosing_instance_p): Declare.
1978 * jcf-write.c (get_method_access_flags): New. Surpress private flag
1979 for inner class constructors.
1980 (generate_classfile): Use get_method_access_flags.
1981
1982 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1983
1984 * class.c (interface_of_p): Check for null TYPE_BINFO.
1985
1986 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
1987
1988 * class.c (make_class): Do not create binfo here.
1989 (set_super_info): Create it here.
1990 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
1991
1992 2004-07-08 Richard Henderson <rth@redhat.com>
1993
1994 * expr.c (case_identity, get_primitive_array_vtable,
1995 java_expand_expr, emit_init_test_initialization): Remove.
1996 * java-tree.h (java_expand_expr): Remove.
1997 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
1998
1999 2004-07-07 Per Bothner <per@bothner.com>
2000
2001 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
2002 get internal error due to mismatched types.
2003
2004 * gcj.texi (Invoking gij): Document new -verbose:class flag.
2005
2006 * gcj.texi (Linking): New node. Document -lgij usage.
2007
2008 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2009
2010 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2011 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2012 * java/class.c (set_super_info, class_depth, interface_of_p,
2013 maybe_add_interface, add_interface, make_class_data,
2014 layout_class, add_miranda_methods): Adjust BINFO macros.
2015 * expr.c (can_widen_reference_to, lookup_field): Likewise.
2016 * jcf-write.c (generate_classfile): Likewise.
2017 * parse.y (patch_anonymous_class,
2018 check_inner_circular_reference, check_circular_reference,
2019 java_complete_class, check_abstract_method_definitions,
2020 java_check_abstract_method_definitions,
2021 check_interface_throws_clauses, java_check_abstract_methods,
2022 lookup_java_interface_method2,
2023 find_applicable_accessible_methods_list): Likewise.
2024 * typeck.c (find_method_in_interface): Likewise.
2025 * verify.c (merge_types): Likewise.
2026
2027 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2028
2029 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2030 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2031
2032 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2033
2034 * class.c (make_class): Use make_tree_binfo.
2035 (set_super_info, add_interface_do): Likewise.
2036 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2037
2038 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2039
2040 * verify.c: Correct array element access formatting thinko.
2041
2042 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2043
2044 * verify.c: Insert a short blurb at the start referring to the JVMS.
2045 (merge_type_state): Remove redundant nested if statement.
2046 (verify_jvm_instructions): Ensure current_subr is initialised to
2047 NULL_TREE.
2048 Minor formatting fixes all over the place.
2049
2050 2004-07-02 Richard Henderson <rth@redhat.com>
2051
2052 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2053
2054 2004-07-01 Richard Henderson <rth@redhat.com>
2055
2056 * class.c (registerClass_libfunc): Remove.
2057 (init_class_processing): Don't set it.
2058 (emit_register_classes): Take list_p parameter. Fill it in
2059 with _Jv_RegisterClass calls.
2060 * decl.c (java_init_decl_processing): Don't call
2061 init_resource_processing.
2062 * jcf-parse.c (java_emit_static_constructor): New.
2063 (java_parse_file): Call it.
2064 * resource.c (registerResource_libfunc): Remove.
2065 (init_resource_processing): Remove.
2066 (write_resource_constructor): Take list_p parameter. Fill it in
2067 with _Jv_RegisterResource calls.
2068 * java-tree.h: Update prototypes.
2069
2070 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
2071
2072 PR java/1262
2073 * class.c (layout_class_method): Do not override package-private
2074 method if its in a different package.
2075 (split_qualified_name): Move here from parse.y. Rename from
2076 breakdown_qualified. Add comment.
2077 (in_same_package): Move here from parse.y. Add comment.
2078 * java-tree.h (break_down_qualified, in_same_package): Declare.
2079 (in_same_package): Likewise.
2080 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2081 Callers updated.
2082
2083 2004-06-29 Andrew Haley <aph@redhat.com>
2084
2085 * except.c (expand_start_java_handler): Push a new binding level.
2086 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
2087 register_exception_range() to register where we'll do it.
2088 (expand_end_java_handler): Remove old bogus code. Replace with
2089 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2090 the top of the expression we're curently building.
2091 (maybe_end_try): Delete.
2092 * decl.c (binding_level.exception_range): New field.
2093 (clear_binding_level): Add field exception_range. Reformat.
2094 (poplevel): Call expand_end_java_handler().
2095 (poplevel): Call java_add_stmt only if functionbody is false.
2096 (maybe_poplevels): Don't call maybe_end_try() from here.
2097 (end_java_method): Clear no longer used trees in function decl.
2098 (register_exception_range): New function.
2099 * java-tree.h (register_exception_range, struct eh_range): Declare.
2100
2101 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
2102
2103 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2104
2105 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
2106
2107 Formatting fixes.
2108 * expr.c (class_has_finalize_method): Fix method name indentation.
2109 (expand_java_call): Remove K&R style parameter declaration.
2110 (expand_invoke): Fix statement indentation.
2111 (expand_java_field_op): Likewise.
2112 * parse-scan.y: Fix typo.
2113 (reset_report): Fix method name indentation.
2114 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2115 line. Fix typos.
2116 * verify.c (verify_jvm_instructions): Document parameters, insert
2117 page break.
2118 * lang.c (lang_init_source): Fix method name indentation.
2119 * class.c (common_enclosing_context_p): Likewise.
2120 (emit_symbol_table): Fix parameter list indentation.
2121 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2122 parameter declaration.
2123 * constants.c: Fix copyright notice indentation.
2124 * typeck.c (find_method_in_superclasses): Fix parameter list
2125 indentation.
2126 (find_method_in_interfaces): Likewise.
2127 * zextract.c (makelong): Fix method name indentation.
2128
2129 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2130
2131 PR java/15715.
2132 * parse.y (create_interface): Set correct access modifiers for
2133 interfaces.
2134 * jcf-write.c (get_classfile_modifiers): New function.
2135 (generate_classfile): Use get_classfile_modifiers, not
2136 get_access_flags.
2137
2138 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2139
2140 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2141 dependency to current parser context, not NULL_TREE, for top-level
2142 classes.
2143 (jdep_resolve_class): Enable member access check for all inner
2144 class dependencies.
2145
2146 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2147
2148 * parse.y (qualify_and_find): Pass type decl, not identifier, to
2149 load_class.
2150
2151 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2152
2153 PR java/15734
2154 * expr.c (expand_java_field_op): Ensure that target class for static
2155 field access has been loaded.
2156
2157 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2158 Ranjit Mathew <rmathew@hotmail.com>
2159
2160 PR java/1207, java/16178
2161 * jcf-parse.c (load_class): Return immediately if passed a type decl
2162 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2163 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2164 before calling load_class.
2165 (qualify_and_find): Likewise.
2166 (find_in_imports_on_demand): Likewise.
2167 (find_applicable_accessible_methods_list): Likewise.
2168
2169 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
2170
2171 * parse.y (java_layout_seen_class_methods): Don't call load_class
2172 on class defined by source parser.
2173
2174 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
2175
2176 * parse.y (set_nested_class_simple_name_value): Removed.
2177 (java_complete_expand_class): Remove calls to
2178 set_nested_class_simple_name_value.
2179
2180 2004-06-22 Andrew Haley <aph@redhat.com>
2181 Ranjit Mathew <rmathew@hotmail.com>
2182
2183 Fixes PR java/16113.
2184 * decl.c (force_poplevels): Remove call to expand_end_bindings.
2185
2186 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
2187
2188 * parse.y (create_class): Correct diagnostic message about
2189 java.lang.Object extending anything else.
2190
2191 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2192
2193 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2194 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2195 * constants.c (build_ref_from_constant_pool): Likewise.
2196 * expr.c (build_java_array_length_access): Likewise.
2197 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2198 (invoke_build_dtable, build_invokevirtual): Likewise.
2199 (build_invokeinterface, java_expand_expr): Likewise.
2200 (emit_init_test_initialization): Likewise.
2201 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2202 * parse.y (make_qualifed_name, build_array_ref): Likewise.
2203
2204 2004-06-21 Andrew Haley <aph@redhat.com>
2205
2206 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2207 block.
2208
2209 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2210
2211 * jcf.h (struct JCF): Change java_source, right_zip and finished
2212 to unsigned int.
2213 * lex.h (struct java_lexer): Change hit_eof, read_anything,
2214 byte_swap and use_fallback to unsigned int.
2215 * parse.h (struct _jdep): Change flag0 to unsigned int.
2216
2217 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
2218
2219 Fixes PR java/13948
2220 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2221 before trying to lay out its methods.
2222 * jcf-parse.c (read_class): Track parsed files using canonical paths
2223 obtained via lrealpath from libiberty.
2224 (java_parse_file): Likewise.
2225 (parse_source_file_1): Rename formal parameter to reflect its
2226 modified purpose. Minor formatting fix.
2227
2228 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2229
2230 * class.c (emit_register_classes): Make the function uninlinable,
2231 do not set current_function_cannot_inline.
2232 * resource.c (write_resource_constructor): Do not reset
2233 flag_inline_functions around rest_of_compilation.
2234
2235 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
2236
2237 PR java/15769
2238 * expr.c (java_truthvalue_conversion): Handle
2239 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2240 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2241 i.e. return the expression.
2242
2243 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
2244
2245 * gjavah.c: Include version.h
2246
2247 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
2248
2249 * jcf-write.c (generate_bytecode_conditional): Correct handling
2250 of unordered conditionals. Add comment.
2251
2252 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
2253 Per Bothner <per@bothner.com>
2254
2255 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2256 local variable was initialised upon declaration.
2257 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2258 variable was final and initialised upon declaration.
2259 * check-init.c (check_final_reassigned): Give error only if a blank
2260 final is not definitely unassigned or if an initialised final is
2261 reassigned.
2262 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2263 assignment expressions. Remove case MODIFY_EXPR, label do_default.
2264 (check_init): Perform initialised-variable-removing-optimisation
2265 only on non-final local variables.
2266
2267 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2268
2269 * jcf-write.c (generate_bytecode_conditional): Handle binops
2270 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2271 and LTGT_EXPR.
2272 (generate_bytecode_insns): Likewise.
2273
2274 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2275
2276 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2277 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2278
2279 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2280
2281 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2282 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2283
2284 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2285
2286 * decl.c (struct binding_level): Add GTY marker. Compile
2287 binding_depth unconditionally.
2288 (current_binding_level, free_binding_level, global_binding_level):
2289 Likewise.
2290 (clear_binding_level): Unconditionally set binding_depth.
2291 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2292
2293 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2294
2295 * lex.c (java_new_lexer): Set 'encoding'.
2296 (java_read_char): Improve error message for unrecognized characters.
2297 * lex.h (struct java_lexer): New field 'encoding'.
2298
2299 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2300
2301 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2302
2303 2004-05-21 Mark Wielaard <mark@klomp.org>
2304
2305 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2306 extern.
2307
2308 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
2309
2310 * typeck.c: Remove non-printable character 160.
2311
2312 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
2313
2314 * check-init.c: Correct minor typos.
2315
2316 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2317
2318 * Make-lang.in, expr.c, java-gimplify.c: Rename
2319 tree-simple.[ch] to tree-gimple.[ch].
2320
2321 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
2322
2323 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2324
2325 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2326
2327 Merge from tree-ssa-20020619-branch. See
2328 ChangeLog.tree-ssa for details.
2329
2330 * Make-lang.in, builtins.c, check-init.c, class.c,
2331 constants.c, decl.c, except.c, expr.c, java-except.h,
2332 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2333 lang.c, lang.opt, parse.y, resource.c: Merged.
2334 * java-gimplify.c: New file.
2335
2336 2004-05-10 Andrew Haley <aph@redhat.com>
2337
2338 * parse.y (create_class): Set TYPE_VFIELD.
2339 * decl.c (java_init_decl_processing): Likewise.
2340
2341 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2342 * class.c (make_method_value): Replace DECL_VINDEX with call to
2343 get_method_index().
2344 (get_dispatch_vector): Likewise.
2345 (layout_class_method): Likewise.
2346 Replace set of DECL_VINDEX with call to set_method_index().
2347 (set_method_index): New function.
2348 (get_method_index): New function.
2349 * java-tree.h (set_method_index): New function decl.
2350 (get_method_index): New function decl.
2351
2352 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
2353
2354 * parse.y (check_pkg_class_access): Add new argument
2355 and use it when cl is NULL to call lookup_cl on it.
2356 (parser_check_super_interface): Do not call lookup_cl.
2357 Pass this_decl to check_pkg_class_access and NULL
2358 instead of lookup_cl.
2359 (parser_check_super): Update for change in
2360 check_pkg_class_access.
2361 (do_resolve_class): Likewise.
2362 (process_imports): Likewise.
2363 (find_in_imports_on_demand): Likewise.
2364 (resolve_qualified_expression_name): Likewise.
2365
2366 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
2367
2368 Fixes PR java/9685, PR java/15073
2369 * parse.y (accessibility_string): New method.
2370 (not_accessible_field_error): Use accessibility_string()
2371 instead of java_accstring_lookup().
2372 (resolve_qualified_expression_name): Check with
2373 check_pkg_class_access() before allowing access using
2374 qualified names.
2375 Fix comment typo.
2376 Use check_pkg_class_access() instead of not_accessible_p()
2377 for unqualified types.
2378 (not_accessible_p): Use DECL_CONTEXT (member) instead of
2379 REFERENCE for package-private access checking.
2380 (patch_method_invocation): Use accessibility_string() instead
2381 of java_accstring_lookup().
2382
2383 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
2384
2385 Fixes PR java/15133
2386 * gjavah.c (struct method_name): Add member is_native.
2387 (overloaded_jni_method_exists_p): Match candidate method only if
2388 it is native.
2389 (print_method_info): Initialise is_native flag from the method's
2390 access flags.
2391
2392 2004-04-30 Roger Sayle <roger@eyesopen.com>
2393
2394 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2395 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2396
2397 2004-04-22 Roger Sayle <roger@eyesopen.com>
2398
2399 * resource.c (write_resource_constructor): Guard call to possibly
2400 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2401
2402 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
2403
2404 * class.c (make_class_data): Add new field aux_info.
2405 * decl.c (java_init_decl_processing): Push type and decl for
2406 `aux_info'.
2407
2408 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2409
2410 * expr.c (expand_java_NEW): Don't use size argument for
2411 _Jv_AllocObject calls.
2412 * parse.y (patch_invoke): Likewise.
2413
2414 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2415
2416 * expr.c (build_invokeinterface): Remove unused variables to
2417 fix warnings.
2418
2419 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2420
2421 * class.c (get_interface_method_index): New function. Return dispatch
2422 index for interface method.
2423 (make_method_value): For interface methods, set index field to
2424 iface dispatch index, not DECL_VINDEX.
2425 * expr.c (build_invokeinterface): Use get_interface_method_index.
2426
2427 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2428
2429 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2430
2431 2004-03-31 Andrew Haley <aph@redhat.com>
2432
2433 PR java/14104
2434 * jcf-io.c (opendir_in_zip): Tidy up error handling.
2435
2436 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2437
2438 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2439 form of GTY markers.
2440
2441 2004-03-25 Marcus Meissner <meissner@suse.de>
2442
2443 PR java/14689:
2444 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2445
2446 2004-03-23 Tom Tromey <tromey@redhat.com>
2447
2448 PR java/14315:
2449 * jcf-write.c (make_class_file_name): Don't report if mkdir
2450 failed with EEXIST.
2451
2452 2004-03-23 Tom Tromey <tromey@redhat.com>
2453
2454 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2455
2456 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
2457
2458 * class.c, gjavah.c, lang.c: Fix comment typos.
2459 * gcj.texi: Fix typos.
2460
2461 2004-03-19 Per Bothner <per@bothner.com>
2462
2463 * gcj.texi (Code Generation): Document new flags and assert defaults.
2464
2465 * class.c (assume_compiled_node_struct): Rename type to
2466 class_flag_node_struct, as it is now also used for enable_assertions.
2467 Rename assume_compiled_node typedef. Rename excludep field to value.
2468 (find_assume_compiled_node): Rename function to find_class_flag_node.
2469 Minor optimization - avoid needless strlen.
2470 (add_assume_compiled): Some tweaking and optimization.
2471 Rename and generalize to add_class_flag takem an extra parameter.
2472 (add_assume_compled): New just calls add_class_flag.
2473 (add_enable_assert, enable_assertions): New functions.
2474 (enable_assert_tree): New static.
2475 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2476 * lang.opt (fenable-assertions, fenable-assertions=,
2477 fdisable-assertions, fdisable-assertions=): New options.
2478 * lang.c (java_handle_option): Handle new options.
2479 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
2480 class in an interface - create helper class nested in outer interface.
2481 (build_assertion): Short-circuit if enable_assertions is false.
2482
2483 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2484
2485 * java-tree.h: Changes throughout to add checking to macros
2486 and numerous whitespace changes.
2487 (VAR_OR_FIELD_CHECK): New macro.
2488 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2489 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2490
2491 2004-03-16 Per Bothner <per@bothner.com>
2492
2493 * jcf-jump.c (options): New --print-constants option.
2494 * gcj.texi (Invoking jcf-dump): Document --print-constants.
2495
2496 * jcf-dump.c (flag_print_constant_pool): Default to off.
2497 (print_constant_terse_with_index): New helper function.
2498 (various places): Check flag_print_constant_pool where missing.
2499 (main): If verbose set flag_print_constant_pool.
2500 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2501
2502 2004-03-15 Andrew Haley <aph@redhat.com>
2503
2504 PR java/14581
2505 * parse.y (java_complete_lhs): Check that final variable has an
2506 initializer.
2507
2508 2004-03-12 Andrew Haley <aph@redhat.com>
2509
2510 PR java/14551
2511 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2512 conversion.
2513
2514 2004-02-29 Roger Sayle <roger@eyesopen.com>
2515
2516 * jcf-parse.c (java_parse_file): Handle the case that input_filename
2517 is NULL.
2518
2519 2004-02-27 Per Bothner <per@bothner.com>
2520
2521 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
2522 suggestion: Use build_incomplete_class_ref.
2523 This fixes PR java/13508, java/11714.
2524
2525 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
2526
2527 * java/parse.h: Update copyright.
2528
2529 2004-02-26 Andrew Haley <aph@redhat.com>
2530
2531 PR java/14231:
2532 * parse.y (check_interface_throws_clauses): Check for
2533 !METHOD_INVISIBLE (iface_method).
2534 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2535 well as CLASS_ABSTRACT.
2536
2537 2004-02-25 Per Bothner <per@bothner.com>
2538
2539 * parse.y (build_assertion): If we're in an inner class, create the
2540 class$ helper routine in the outer class.
2541
2542 2004-02-19 Richard Henderson <rth@redhat.com>
2543
2544 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2545
2546 2004-02-16 Geoffrey Keating <geoffk@apple.com>
2547
2548 * Make-lang.in (java.install-man): Add extra dependencies.
2549
2550 2004-02-13 Geoffrey Keating <geoffk@apple.com>
2551
2552 * Make-lang.in: Install man pages under the same names
2553 (possibly transformed) as the program they document.
2554
2555 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
2556
2557 * gjavah.c: Include "intl.h".
2558 (error): New function.
2559 (main): Call gcc_init_libintl.
2560 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2561 print_stub_or_jni, process_file, main): Use error rather than
2562 fprintf.
2563 (print_method_info, usage, help, version, main): Mark strings for
2564 translation with _. Avoid splitting up sentences. Send
2565 information messages to stdout.
2566 * jcf-dump.c: Include "intl.h".
2567 (main): Call gcc_init_libintl.
2568 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2569 Mark error, usage and version messages for translation with _.
2570 Avoid splitting up sentences.
2571 * jv-scan.c: Include "intl.h".
2572 (fatal_error, warning): Change parameter s to msgid. Translate
2573 messages.
2574 (main): Call gcc_init_libintl.
2575 (usage, help, version): Mark error, usage and version messages for
2576 translation with _. Avoid splitting up sentences.
2577 * jvgenmain.c: Include "intl.h".
2578 (main): Call gcc_init_libintl.
2579 (usage, main): Mark error messages for translation with _.
2580 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2581 JVGENMAIN_OBJS): Add intl.o.
2582 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2583 java/jvgenmain.o): Update dependencies.
2584
2585 2004-02-08 Per Bothner <per@bothner.com>
2586
2587 * parse.y (resolve_qualified_expression_name): In case of inaccessible
2588 class don't use not_accessible_field_error, which can get confused.
2589
2590 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2591
2592 Make-lang.in (po-generated): Delete.
2593
2594 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2595
2596 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2597 Depend on target.h.
2598 * decl.c: Include target.h.
2599 (start_java_method): Replace PROMOTE_PROTOTYPES with
2600 targetm.calls.promote_prototypes.
2601 * expr.c: Include target.h.
2602 (pop_arguments): Replace PROMOTE_PROTOTYPES with
2603 targetm.calls.promote_prototypes.
2604 * parse.y: Include target.h.
2605 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2606 with targetm.calls.promote_prototypes.
2607
2608 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2609
2610 * typeck.c: Update copyright.
2611
2612 2004-02-02 Tom Tromey <tromey@redhat.com>
2613
2614 * decl.c (java_init_decl_processing): Remove duplicate
2615 gnu/gcj/RawData.
2616
2617 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
2618
2619 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2620
2621 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
2622
2623 * expr.c (build_field_ref): Move variable
2624 definition up.
2625
2626 2004-01-28 Andrew Haley <aph@redhat.com>
2627
2628 * expr.c (build_field_ref): Widen field offset.
2629
2630 2004-01-27 Andrew Haley <aph@redhat.com>
2631
2632 java/13273
2633 * parse.y (check_interface_throws_clauses): Make sure class_decl
2634 has been loaded.
2635
2636 2004-01-22 Jeff Sturm <jsturm@one-point.com>
2637
2638 PR java/13733
2639 * parse.y (patch_assignment): Don't modify lhs_type for
2640 reference assignments.
2641
2642 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2643
2644 * Make-lang.in: Replace $(docdir) with doc.
2645 (java.info, java.srcinfo, java.man, java.srcman): New rules.
2646 (java.install-man): Revamp rule.
2647
2648 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2649
2650 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2651 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2652 instead of deferred backquote.
2653
2654 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
2655
2656 * typeck.c (find_method_in_interfaces): Move variable
2657 definition up.
2658
2659 2004-01-16 Andrew Haley <aph@redhat.com>
2660
2661 PR java/13273:
2662 * typeck.c (shallow_find_method): New.
2663 (find_method_in_superclasses): New.
2664 (find_method_in_interfaces): New.
2665 (lookup_do): Rewrite.
2666 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2667
2668 * jcf-parse.c (read_class): Save and restore output_class.
2669 * decl.c (java_expand_body): Set output_class from fndecl.
2670
2671 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
2672
2673 * class.c (gen_indirect_dispatch_tables): Fix string length
2674 calculations.
2675
2676 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2677
2678 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2679 (java.srcextra): Copy above back to source directory if requested.
2680 (po-generated): Delete reference to $(parsedir).
2681 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2682 Use implicit rule.
2683
2684 2004-01-14 Jan Hubicka <jh@suse.cz>
2685
2686 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2687 estimation.
2688
2689 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2690
2691 * java-tree.h (java_expand_expr): Change prototype.
2692 * expr.c (java_expand_expr): Add alt_rtl parameter.
2693
2694 2004-01-09 Andrew Haley <aph@redhat.com>
2695
2696 PR java/12755:
2697 * parse.y (java_fix_constructors): Set output_class.
2698 (java_reorder_fields): Likewise.
2699 (java_layout_classes): Likewise.
2700 (java_expand_classes): Generate indirect dispatch tables.
2701 (java_expand_classes): Set output_class.
2702 (java_finish_classes): Likewise.
2703 * lang.c (java_init): Turn on always_initialize_class_p if we're
2704 using indirect dis[atch.
2705 (java_decl_ok_for_sibcall): Use output_class, not current_class.
2706 (java_get_callee_fndecl): Use class local atable.
2707 * jcf-parse.c
2708 (always_initialize_class_p): Decl moved to java-tree.h.
2709 (HANDLE_CLASS_INFO): Set output_class.
2710 (read_class): Likewise.
2711 (parse_class_file): Call gen_indirect_dispatch_tables.
2712 (parse_zip_file_entries): Set output_class.
2713 (java_parse_file): Set output_class. Don't emit symbol tables.
2714 * java-tree.h (output_class): New.
2715 Remove global declarations for otable, atable, and ctable.
2716 (always_initialize_class_p): moved here from decl.c.
2717 (DECL_OWNER): New.
2718 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2719 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2720 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2721 (struct lang_type): Add otable_methods, otable_decl,
2722 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2723 ctable_decl, catch_classes, type_to_runtime_map.
2724 * expr.c (build_field_ref): Make otable, atable, and ctable class
2725 local rather than global.
2726 (build_known_method_ref): Likewise.
2727 (build_invokeinterface): Likewise.
2728 (java_expand_expr): Pass runtime type (rather than actual type) to
2729 expand_start_catch.
2730 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2731 this class. Look up each class in that map to delete duplicates.
2732 (expand_end_java_handler): Pass runtime type (rather than actual
2733 type) to expand_start_catch.
2734 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2735 (do_nothing): New.
2736 (java_init_decl_processing): Rearrange things. Remove global
2737 declarations of otable, atable, and ctable.
2738 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2739 (java_expand_body): Set output_class.
2740 * constants.c (build_constant_data_ref): Use output_class, not
2741 current_class.
2742 (alloc_name_constant): Likewise.
2743 * class.c (gen_indirect_dispatch_tables): New.
2744 (build_class_ref): Generate hard reference to superclass, even if
2745 using indirect dispatch.
2746 (build_static_field_ref): Use class local atable.
2747 (make_class_data): Generate hard reference to superclass, even if
2748 using indirect dispatch.
2749 Generate symbolic references to interfaces when using indirect
2750 dispatch.
2751 (make_class_data): Emit otable, atable, and ctable.
2752 Make otable, atable, and ctable class local rather than global.
2753 (emit_catch_table): Make otable, atable, and ctable class local
2754 rather than global.
2755
2756 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
2757
2758 * parse.y (catch_clause_parameter): Fix typo.
2759
2760 PR java/13404
2761 * parse.y: (catch_clause_parameter): Return early if $3, aka
2762 formal_parameter, is null.
2763
2764 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
2765
2766 * class.c: Remove uses of "register" specifier in
2767 declarations of arguments and local variables.
2768 * decl.c: Likewise.
2769 * expr.c: Likewise.
2770 * gjavah.c: Likewise.
2771 * jcf-dump.c: Likewise.
2772 * jcf-io.c: Likewise.
2773 * jcf-parse.c: Likewise.
2774 * jcf-write.c: Likewise.
2775 * keyword.h: Likewise.
2776 * parse.y: Likewise.
2777 * typeck.c: Likewise.
2778 * verify.c: Likewise.
2779
2780 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
2781
2782 * Make-lang.in (GCJ_CROSS_NAME): Delete.
2783 (java.install_common, java.install-man): Adjust for above.
2784 (java.uninstall): Likewise.
2785
2786 2003-12-03 Michael Koch <konqueror@gmx.de>
2787
2788 * class.c (make_class_data):
2789 Push field value to 'hack_signers' instead of 'signers'.
2790 * decl.c (java_init_decl_processing):
2791 Push field 'hack_signers' instead of 'signers'.
2792
2793 2003-12-03 Zack Weinberg <zack@codesourcery.com>
2794
2795 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2796 including iconv.h.
2797
2798 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
2799
2800 PR java/12374:
2801 * parse.y (qualify_ambiguous_name): Remove lots of broken
2802 field access processing - there's no need to do that here,
2803 because we have resolve_field_access. Remove
2804 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2805 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2806 used.
2807
2808 2003-12-01 Jeff Sturm <jsturm@one-point.com>
2809
2810 Fix PR java/13237
2811 * parse.y (java_complete_lhs): Save location prior to patching
2812 CALL_EXPR.
2813
2814 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
2815
2816 PR java/12548
2817 * resource.c (write_resource_constructor): Append
2818 "_resource" to constructor identifier name.
2819
2820 2003-11-25 Jeff Sturm <jsturm@one-point.com>
2821
2822 Fix PR java/13183.
2823 * constants.c (cpool_for_class): New function.
2824 (outgoing_cpool): Remove global variable.
2825 (alloc_name_constant): Use cpool_for_class.
2826 (build_constants_constructor): Likewise.
2827 * decl.c (java_expand_body): Set current_class.
2828 * java-tree.h (outgoing_cpool) Remove declaration.
2829 (init_outgoing_cpool): Likewise.
2830 * jcf-parse.c (init_outgoing_cpool): Remove function.
2831 (parse_class_file): Don't call init_outgoing_cpool.
2832 * parse.y (java_complete_expand_methods): Don't call
2833 init_outgoing_cpool. Don't save outgoing_cpool.
2834 (java_expand_classes): Don't restore outgoing_cpool.
2835 (java_finish_classes): Likewise.
2836
2837 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
2838
2839 * Make-lang.in: (java.install-common) Add
2840 symlink for $(target_noncanonical)-gcjh for
2841 native builds.
2842
2843 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2844
2845 * Make-lang.in (java.extraclean): Delete.
2846
2847 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2848
2849 * Make-lang.in (check-java): Add.
2850
2851 2003-11-19 Jeff Sturm <jsturm@one-point.com>
2852
2853 Fix PR java/13024.
2854 * except.c (prepare_eh_table_type): Allocate variable-sized
2855 buffer `buf' with alloca.
2856
2857 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2858
2859 Fix PR java/12857.
2860
2861 decl.c (java_init_decl_processing): Don't initialize
2862 class_not_found_type_node, no_class_def_found_type_node.
2863
2864 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2865 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2866 (class_not_found_type_node, no_class_def_found_type_node):
2867 Don't define.
2868
2869 parse.y (build_dot_class_method_invocation): Add this_class
2870 argument. Qualify method invocations to a different class.
2871 (create_new_parser_context): Initialize saved_data_ctx to 0.
2872 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2873 (build_dot_class_method): Don't load classes. Register
2874 incomplete types.
2875 (build_incomplete_class_ref): Special cases for interfaces
2876 and inner classes. Move build_dot_class_method call to here...
2877 (patch_incomplete_class_ref): ...from here. Pass current_class
2878 to build_dot_class_method_invocation.
2879 (build_assertion): Pass class_type to
2880 build_dot_class_method_invocation.
2881 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2882
2883 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2884
2885 Fix PR java/12739.
2886 * java-tree.h (BLOCK_EMPTY_P): Define.
2887 * parse.y (java_complete_lhs): Check for empty blocks
2888 in TRY_FINALLY_EXPR case.
2889
2890 2003-11-17 Andrew Haley <aph@redhat.com>
2891
2892 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2893 (struct lang_decl_var:freed): New variable.
2894 * decl.c (poplevel): Mark local vars that have gone out of scope.
2895 (push_jvm_slot): Don't use the RTL of a var that has gone out of
2896 scope.
2897
2898 2003-11-16 Jason Merrill <jason@redhat.com>
2899
2900 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2901 and TAGS files that include them for each front end.
2902
2903 2003-11-15 Tom Tromey <tromey@redhat.com>
2904
2905 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2906
2907 2003-11-12 Jason Merrill <jason@redhat.com>
2908
2909 PR optimization/12547
2910 * lang.c (java_tree_inlining_walk_subtrees): Just walk
2911 BLOCK_EXPR_BODY directly.
2912
2913 2003-11-12 Andrew Haley <aph@redhat.com>
2914
2915 PR java/11045
2916 * parse.y (fold_constant_for_init): Check that we really do have a
2917 constant.
2918
2919 PR java/11533
2920 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2921 init_test_decls being inlined.
2922
2923 PR java/12890:
2924 * parse.y (do_resolve_class): Check return value from
2925 breakdown_qualified().
2926
2927 2003-11-11 Tom Tromey <tromey@redhat.com>
2928
2929 PR java/12915:
2930 * parse.y (merge_string_cste): Handle case where we have a
2931 pointer that happens to be zero, not null_pointer_node.
2932
2933 2003-11-10 Tom Tromey <tromey@redhat.com>
2934
2935 * jcf-parse.c (classify_zip_file): Correctly compare
2936 filename_length against length of manifest file's name.
2937
2938 2003-11-08 Tom Tromey <tromey@redhat.com>
2939
2940 PR java/12894:
2941 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2942
2943 2003-11-06 Andrew Haley <aph@redhat.com>
2944
2945 * expr.c (java_stack_swap): Make sure destination stack slots are
2946 of the correct type.
2947
2948 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
2949
2950 * Make-lang.in (dvi): Move targets to $(docobjdir).
2951 (gcj.dvi): Simplify rule and adjust target.
2952 (gcj.info): Simplify rule.
2953 (gcj.pod): New intermediate rule.
2954 (gcjh.pod): Likewise.
2955 (jv-scan.pod): Likewise.
2956 (jcf-dump.pod): Likewise.
2957 (gij.pod): Likewise.
2958 (jv-convert.pod): Likewise.
2959 (rmic.pod): Likewise.
2960 (rmiregistry.pod): Likewise.
2961 (gcj.1): Delete.
2962 (gcjh.1): Delete.
2963 (jv-scan.1): Delete.
2964 (jcf-dump.1): Delete.
2965 (gij.1): Delete.
2966 (jv-convert.1): Delete.
2967 (rmic.1): Delete.
2968 (rmiregistry.1): Delete.
2969
2970 2003-11-02 Jeff Sturm <jsturm@one-point.com>
2971
2972 Fixes PR java/12866.
2973 * parse.y (resolve_qualified_expression_name): Move test
2974 for outer field access methods from here...
2975 (check_thrown_exceptions) ...to here.
2976
2977 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
2978
2979 * .cvsignore: Delete.
2980
2981 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
2982
2983 * verify.c (verify_jvm_instructions): Don't warn about legal
2984 eh binding regions generated for example by jdk 1.4.1.
2985
2986 2003-10-24 David S. Miller <davem@redhat.com>
2987
2988 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
2989
2990 2003-10-22 Andrew Haley <aph@redhat.com>
2991
2992 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
2993 (java_get_callee_fndecl): New.
2994
2995 * jcf-parse.c (java_parse_file): Call emit_catch_table().
2996
2997 * java-tree.h (ctable_decl): New.
2998 (catch_classes): New.
2999 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3000
3001 * decl.c (java_init_decl_processing): Add catch_class_type.
3002 Add ctable_decl.
3003 Add catch_classes field.
3004
3005 * class.c (build_indirect_class_ref): Break out from
3006 build_class_ref.
3007 (make_field_value): Check flag_indirect_dispatch.
3008 (make_class_data): Ditto.
3009 Tidy uses of PUSH_FIELD_VALUE.
3010 Add field catch_classes.
3011 (make_catch_class_record): New.
3012
3013 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3014
3015 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3016
3017 * jcf-write.c: Follow spelling conventions.
3018 * parse.y: Likewise.
3019
3020 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3021
3022 * ChangeLog: Fix typos.
3023 * expr.c: Fix comment typos.
3024 * jcf-write.c: Likewise.
3025 * lang.c: Likewise.
3026 * lex.c: Likewise.
3027 * mangle.c: Likewise.
3028 * parse-scan.y: Likewise.
3029 * parse.y: Likewise.
3030
3031 2003-10-22 Tom Tromey <tromey@redhat.com>
3032
3033 * expr.c (expand_byte_code): Only warn about dead bytecode when
3034 extra_warnings is set.
3035
3036 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
3037
3038 Fix for PR java/12586.
3039 * mangle.c (find_compression_record_match): Don't iterate through
3040 package namespace elements unless they all match compression_table
3041 entries.
3042
3043 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
3044
3045 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3046 (generate-manpages): Likewise.
3047 (java.maintainer-clean): Likewise.
3048 (gcj.info): Likewise.
3049 (gcj.1): Likewise.
3050 (gcjh.1): Likewise.
3051 (jv-scan.1): Likewise.
3052 (jcf-dump.1): Likewise.
3053 (gij.1): Likewise.
3054 (jv-convert.1): Likewise.
3055 (rmic.1): Likewise.
3056 (rmiregistry.1): Likewise.
3057 (java.install-man): Likewise.
3058 (parse-scan.o): Move and define complete compile line.
3059 (parse.o): Likewise.
3060 (jcf-tree-inline.o): Move.
3061
3062 2003-10-20 Mark Mitchell <mark@codesourcery.com>
3063
3064 * Make-lang.in (info): Update dependencies.
3065 (java.install-info): Remove.
3066 ($(srcdir)/java/gcj.info): Replace with ...
3067 ($(docobjdir)/gcj.info): ... this.
3068
3069 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
3070
3071 * Make-lang.in: Replace uses of $(target_alias) with
3072 $(target_noncanonical).
3073
3074 2003-10-09 Tom Tromey <tromey@redhat.com>
3075
3076 * decl.c (java_init_decl_processing): Declare signers field.
3077 * class.c (make_class_data): Set signers field.
3078
3079 2003-10-09 Jason Merrill <jason@redhat.com>
3080
3081 * parse.y (patch_assignment): Use make_node to create a BLOCK.
3082 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
3083 POINTER_TYPE.
3084
3085 2003-10-06 Mark Mitchell <mark@codesourcery.com>
3086
3087 * Make-lang.in (java.info): Replace with ...
3088 (info): ... this.
3089 (java.dvi): Replace with ...
3090 (dvi): ... this.
3091 (java.generated-manpages): Replace with ...
3092
3093 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
3094
3095 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
3096
3097 2003-10-01 Andrew Haley <aph@redhat.com>
3098
3099 * jcf-parse.c (java_parse_file): Write otable and atable.
3100 * java-tree.h (atable_methods): New.
3101 (atable_decl): New.
3102 (atable_syms_decl): New.
3103 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
3104 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
3105 (symbol_*type): Rename method_symbol* to symbol*type.
3106 (emit_offset_symbol_table): Delete.
3107 (emit_symbol_table): New.
3108 (get_symbol_table_index): New.
3109 (atable_type): New.
3110 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
3111 (build_known_method_ref): Likewise.
3112 (get_symbol_table_index): Rename from get_offset_table_index.
3113 Parameterize to allow re-use by differing types of symbol table.
3114 (build_invokevirtual): Pass table to get_offset_table_index.
3115 * decl.c (java_init_decl_processing): Push types and decls for
3116 atable and atable_syyms.
3117 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
3118 (make_class_data): Add new fields atable and atable_syms.
3119 (emit_symbol_table): Rename from emit_offset_symbol_table.
3120 Parameterize to allow re-use by different types of symbol table.
3121 (build_symbol_entry): Renamed from build_method_symbols_entry.
3122
3123 2003-09-30 Roger Sayle <roger@eyesopen.com>
3124
3125 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
3126 semantics for SAVE_EXPR, by caching the result in a temporary.
3127
3128 2003-09-28 Richard Henderson <rth@redhat.com>
3129
3130 * check-init.c (check_init): Save and restore input_location
3131 instead of file and line separately.
3132 * decl.c (java_expand_body): Likewise.
3133 * jcf-write.c (generate_bytecode_insns): Likewise.
3134 * parse.y (safe_layout_class): Likewise.
3135 * jcf-parse.c (read_class, parse_class_file): Likewise.
3136 (java_parse_file): Use %H for warning locator.
3137
3138 2003-09-28 Roger Sayle <roger@eyesopen.com>
3139
3140 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
3141 with void-type branches instead of using a COMPOUND_EXPR.
3142
3143 2003-09-28 Jeff Sturm <jsturm@one-point.com>
3144
3145 * decl.c (java_optimize_inline, dump_function): Remove.
3146 * java-tree.h (java_optimize_inline): Remove declaration.
3147 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
3148 * parse.y (source_end_java_method, java_expand_classes):
3149 Likewise. Remove dead code.
3150
3151 2003-09-27 Roger Sayle <roger@eyesopen.com>
3152
3153 * lang.c (java_init_options): Set flag_evaluation_order.
3154 * expr.c (force_evaluation_order): Don't attempt to force
3155 evaluation order of binary operations using save_expr.
3156 * parse.y (java_complete_lhs): No longer need to call
3157 force_evaluation_order when constructing binary operators.
3158
3159 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3160 Bryce McKinlay <bryce@mckinlay.net.nz>
3161
3162 PR java/1333:
3163 * parse.y (not_accessible_field_error): New function.
3164 (resolve_expression_name): Check field access permissions.
3165 (resolve_qualified_expression_name): Use
3166 not_accessible_field_error.
3167 (resolve_qualified_expression_name): Likewise.
3168
3169 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3170
3171 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
3172
3173 2003-09-23 Roger Sayle <roger@eyesopen.com>
3174
3175 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
3176 with equal operands without side-effects.
3177
3178 2003-09-22 Jeff Sturm <jsturm@one-point.com>
3179
3180 * decl.c (java_init_decl_processing): Don't emit otable decls
3181 if flag_indirect_dispatch is not set.
3182
3183 2003-09-21 Richard Henderson <rth@redhat.com>
3184
3185 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3186 resource.c: Revert.
3187
3188 2003-09-21 Richard Henderson <rth@redhat.com>
3189
3190 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3191 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
3192
3193 2003-09-20 Richard Henderson <rth@redhat.com>
3194
3195 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
3196
3197 2003-09-18 Roger Sayle <roger@eyesopen.com>
3198
3199 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
3200 * check-init.c (check_init): Likewise.
3201
3202 2003-09-18 Roger Sayle <roger@eyesopen.com>
3203
3204 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
3205
3206 2003-09-16 Andrew Haley <aph@redhat.com>
3207
3208 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
3209
3210 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
3211
3212 Fixes PR java/9577
3213 * mangle.c (find_compression_record_match): Skip
3214 over a "6JArray" (the array template mangled string)
3215 IDENTIFIER_NODE.
3216 (mangle_array_type): Correct minor typo.
3217 (atms): Move definition to the beginning.
3218
3219 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
3220
3221 * class.c (add_miranda_methods): Ensure super-interfaces are laid
3222 out. Fix for PR java/12254.
3223
3224 2003-09-11 Richard Henderson <rth@redhat.com>
3225
3226 * parse.y (source_end_java_method): Update for new
3227 cgraph_finalize_function argument.
3228
3229 2003-09-09 Richard Henderson <rth@redhat.com>
3230
3231 * parse.y (source_end_java_method): Update call to
3232 cgraph_finalize_function.
3233
3234 2003-09-03 Jeff Sturm <jsturm@one-point.com>
3235
3236 * decl.c (java_expand_body): New function.
3237 * expr.c (build_class_init): Set DECL_IGNORED_P.
3238 * java-tree.h (start_complete_expand_method,
3239 java_expand_body): Declare.
3240 * jcf-parse.c (cgraph.h): Include.
3241 (java_parse_file): Handle flag_unit_at_a_time.
3242 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
3243 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
3244 (java_estimate_num_insns): Use walk_tree_without_duplicates.
3245 (java_start_inlining): New function.
3246 * parse.h (java_finish_classes): Declare.
3247 * parse.y: Include cgraph.h.
3248 (block): Don't special-case empty block production.
3249 (craft_constructor): Set DECL_INLINE.
3250 (source_end_java_method): Handle flag_unit_at_a_time.
3251 Replace inline code with call to java_expand_body.
3252 (start_complete_expand_method): Remove static modifier.
3253 (java_expand_method_bodies): Patch function tree for
3254 class initialization and/or synchronization as needed.
3255 Don't begin RTL expansion yet.
3256 (java_expand_classes): Check flag_unit_at_a_time before
3257 calling finish_class.
3258 (java_finish_classes): New function.
3259 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
3260 (patch_assignment): Set DECL_CONTEXT on temporary variable.
3261 (emit_test_initialization): Set DECL_IGNORED_P.
3262
3263 2003-09-03 Roger Sayle <roger@eyesopen.com>
3264
3265 * builtins.c (enum builtin_type): Delete unused enumeration.
3266 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
3267
3268 2003-08-28 Tom Tromey <tromey@redhat.com>
3269
3270 * gcj.texi (Extensions): Document gcjlib URLs.
3271
3272 2003-08-20 Tom Tromey <tromey@redhat.com>
3273
3274 * gcj.texi (Extensions): Added xref.
3275 (libgcj Runtime Properties): Document
3276 gnu.gcj.runtime.VMClassLoader.library_control.
3277
3278 2003-08-20 Andrew Haley <aph@redhat.com>
3279
3280 * except.c (prepare_eh_table_type): Use new encoding for exception
3281 handlers when using -fno-assume-compiled.
3282
3283 2003-08-13 Tom Tromey <tromey@redhat.com>
3284
3285 * gcj.texi (Invoking gij): Document -X and -?.
3286
3287 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
3288
3289 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
3290 GCJH_OBJS, JCFDUMP_OBJS
3291 * win32-host.c: Removed the unnecessary and broken dependency
3292 on jcf.h
3293
3294 2003-08-11 Tom Tromey <tromey@redhat.com>
3295
3296 * parse.y (java_check_regular_methods): Typo fixes. Call
3297 check_interface_throws_clauses. Use
3298 check_concrete_throws_clauses.
3299 (check_interface_throws_clauses): New function.
3300 (check_concrete_throws_clauses): New function.
3301 (hack_is_accessible_p): New function.
3302 (find_most_specific_methods_list): Added FIXME.
3303 * typeck.c (lookup_do): Use `flags' argument to decide what to
3304 do. Reimplemented.
3305 (lookup_argument_method_generic): New function.
3306 (lookup_argument_method2): Removed.
3307 * jcf.h (ACC_INVISIBLE): New define.
3308 * jcf-write.c (generate_classfile): Skip invisible methods.
3309 * class.c (add_miranda_methods): New function.
3310 (layout_class_methods): Use it.
3311 (get_access_flags_from_decl): Use ACC_INVISIBLE.
3312 * java-tree.h (METHOD_INVISIBLE): New define.
3313 (lang_decl_func) [invisible]: New field.
3314 (lookup_argument_method_generic): Declare.
3315 (SEARCH_INTERFACE): New define.
3316 (SEARCH_SUPER): Likewise.
3317 (SEARCH_ONLY_INTERFACE): Likewise.
3318 (SEARCH_VISIBLE): Likewise.
3319 (lookup_argument_method2): Removed declaration.
3320
3321 2003-08-05 Tom Tromey <tromey@redhat.com>
3322
3323 Fix for PR java/11600:
3324 * parse.y (java_complete_lhs): See whether we're calling a method
3325 on an array.
3326 (check_thrown_exceptions): Added `is_array_call' argument;
3327 fixed `clone' checking; updated all callers.
3328
3329 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
3330
3331 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3332
3333 2003-08-03 Tom Tromey <tromey@redhat.com>
3334
3335 * java-tree.h (METHOD_TRANSIENT): Removed.
3336 * decl.c (pushdecl): Removed some dead code.
3337 * class.c (get_access_flags_from_decl): Can't have transient
3338 method.
3339 (add_method_1): Can't have a transient method.
3340
3341 2003-07-28 Andreas Jaeger <aj@suse.de>
3342
3343 * jvspec.c: Convert to ISO C90 prototypes.
3344
3345 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
3346
3347 * decl.c (force_poplevels): Fix warning call.
3348
3349 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3350
3351 * expr.c (expand_java_field_op): Don't use xxx_with_decl
3352 (expand_java_field_op): Likewise.
3353 * class.c (layout_class_method): Likewise
3354 (emit_register_classes): Likewise.
3355 * decl.c (pushdecl): Likewise.
3356 (poplevel): Likewise.
3357 (force_poplevels): Likewise.
3358 (give_name_to_locals): Likewise.
3359 * check-init.c (check_for_initialization): Likewise.
3360
3361 2003-07-24 Jason Merrill <jason@redhat.com>
3362
3363 * java-tree.h: Move boolean_type_node et al to the back end.
3364
3365 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3366
3367 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3368 casts.
3369
3370 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
3371
3372 * lang.opt: Don't show -MD_ and -MDD_.
3373
3374 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
3375
3376 * lang-options.h: Remove.
3377 * lang.opt: Add help text.
3378
3379 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
3380
3381 * expr.c: Remove the last argument to expand_assignment().
3382
3383 2003-07-09 Jan Hubicka <jh@suse.cz>
3384
3385 * java-tree.h (DECL_NUM_STMTS): Rename to...
3386 (DECL_ESTIMATED_INSNS): ... this.
3387 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3388 New static functions.
3389 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3390 * parser.y (add_stmt_to_compound): Do not account statements.
3391
3392 2003-07-08 Mark Wielaard <mark@klomp.org>
3393
3394 * gcj.texi: CNI now expands to Compiled Native Interface.
3395
3396 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3397
3398 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3399
3400 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3401
3402 * expr.c (expand_byte_code): Adjist emit_line_note call.
3403
3404 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3405
3406 * lang.c (java_handle_option): Don't handle filenames.
3407
3408 2003-07-02 Zack Weinberg <zack@codesourcery.com>
3409
3410 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3411 DIR_SEPARATOR.
3412 Use FILENAME_CMP.
3413 * jcf-write.c: Don't default-define DIR_SEPARATOR.
3414 * jcf.h: Delete COMPARE_FILENAMES definition.
3415
3416 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
3417
3418 * lang.c (java_init_options): Update prototype.
3419
3420 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3421
3422 * decl.c (poplevel): Adjust define_label call.
3423
3424 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3425
3426 * gjavah.c (flag_jni): Make non-static.
3427 * parse-scan.y (ctxp): Make non-static.
3428
3429 * class.c (build_method_symbols_entry)
3430 * expr.c (get_offset_table_index)
3431 * jcf-parse.c (jcf_parse):
3432 Mark the definition static, matching the forward declaration.
3433
3434 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
3435
3436 * lang.c (java_handle_option): Don't check for missing arguments.
3437
3438 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3439
3440 * class.c (push_class): Use a location_t to save place.
3441 (emit_register_classes): Set input_location. Adjust
3442 expand_function_end call.
3443 * resource.c (write_resource_constructor): Likewise.
3444 * decl.c (end_java_method): Adjust expand_function_end call.
3445 * parse.y (source_end_java_method): Likewise.
3446
3447 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3448
3449 * lang.c (java_handle_option): Likewise.
3450
3451 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
3452
3453 * lang.c (java_handle_option): Special-casing of optional
3454 joined arguments no longer needed.
3455 * lang.opt: Update switches that take optional argument.
3456
3457 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3458
3459 * lang.opt: Declare Java.
3460 * lang.c (java_init_options): Update.
3461
3462 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3463
3464 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3465
3466 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3467
3468 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3469 * lang.c (java_handle_option): -MD and -MMD have an underscore.
3470 * lang.opt: -MD and -MMD have an underscore.
3471
3472 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3473
3474 * class.c (emit_register_classes): Adjust init_function_start
3475 call.
3476 * decl.c (complete_start_java_method): Likewise.
3477 * resource.c (write_resource_constructor): Likewise.
3478
3479 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3480
3481 * Make-lang.in: Update to use options.c and options.h.
3482 * lang.c: Include options.h not j-options.h.
3483 (java_handle_option): Abort on unrecognized option.
3484 (java_init_options): Request Java switches.
3485
3486 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
3487
3488 * Make-lang.in: Handle mostlyclean.
3489
3490 2003-06-11 Tom Tromey <tromey@redhat.com>
3491
3492 * lang.c (java_handle_option): Update dependency_tracking for
3493 OPT_MF case.
3494
3495 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3496 empty argument.
3497
3498 2003-06-10 Andrew Haley <aph@redhat.com>
3499
3500 * resource.c (write_resource_constructor): Use expand_expr to
3501 generate the address of the label attached to a resource.
3502 * Make-lang.in (java/resource.o): Add expr.h
3503
3504 2003-06-10 Andrew Haley <aph@redhat.com>
3505
3506 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3507 (java_decl_ok_for_sibcall): New.
3508
3509 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
3510
3511 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3512 (java/j-options.c, java/j-options.h): New.
3513 * java-tree.h (resource_name, compile_resource_file,
3514 compile_resource_data): Constify.
3515 * jcf-write.c (jcf_write_base_directory): Similarly.
3516 * jcf.h (jcf_write_base_directory): Similarly.
3517 * lang.c: Include j-options.h.
3518 (cl_options_count, cl_options, string_option, java_decode_option,
3519 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3520 process_option_with_no): Remove.
3521 (resource_name): Constify.
3522 (LANG_HOOKS_HANDLE_OPTION): Override.
3523 (java_handle_option): New.
3524 (java_init): Don't call jcf_path_init.
3525 (java_init_options): Call jcf_path_init.
3526 * lang.opt: New.
3527 * resource.c (compile_resource_data, compile_resource_file): Constify.
3528
3529 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
3530
3531 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3532 (struct lang_decl_func): Add last_line field.
3533 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3534 DECL_SOURCE_LINE_LAST): Remove.
3535 * parse.y (missing_return_error, finish_method_declaration,
3536 lookup_cl, start_artificial_method_body, source_end_java_method,
3537 start_complete_expand_method): Adjust.
3538
3539 2003-06-08 Tom Tromey <tromey@redhat.com>
3540
3541 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3542 fno-assume-compiled.
3543
3544 2003-06-08 Roger Sayle <roger@eyesopen.com>
3545
3546 * builtins.c (define_builtin_type, builtin_types): Delete.
3547 (define_builtin): Rewritten to take just the built-in code,
3548 the function's name, type and fallback library function name.
3549 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3550 (initialize_builtins): Overhaul to define the GCC builtins
3551 used by gcj manually, providing the Java run-time's
3552 implementations as the fallback library function.
3553
3554 2003-06-08 Anthony Green <green@redhat.com>
3555
3556 * parse.y (patch_cast): Fix conversions from floating-point to
3557 integral types.
3558
3559 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
3560
3561 * Make-lang.in: Update.
3562 * lang.c: Include opts.h. Define cl_options_count and cl_options.
3563
3564 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3565
3566 * lang.c (java_init_options): Update.
3567
3568 2003-06-05 Jan Hubicka <jh@suse.cz>
3569
3570 * Make-lang.in: Add support for stageprofile and stagefeedback
3571
3572 2003-05-31 Roger Sayle <roger@eyesopen.com>
3573
3574 * lang.c (java_init_options): Prescribe wrap-around two's
3575 complement arithmetic overflow by setting flag_wrapv.
3576
3577 2003-05-29 Roger Sayle <roger@eyesopen.com>
3578
3579 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3580 (builtin_record): Add an additional builtin_code field to
3581 record which GCC built-in corresponds to the Java function.
3582 (java_builtins): Add new entries for atan, atan2, exp, log,
3583 pow and tan.
3584 (max_builtin, min_builtin, abs_builtin): Perform constant
3585 folding on the resulting tree.
3586 (java_build_function_call_expr): Likewise, perform constant
3587 folding on the resulting tree.
3588 (initialize_builtins): The NULL creators are now allowed in
3589 the java_builtins table, which is now terminated by an entry
3590 with builtin_code == END_BUILTINS.
3591 (check_for_builtin): Likewise. If the matching creator is
3592 NULL, construct the call using java_build_function_call_expr
3593 directly with the decl for the corresponding builtin_code.
3594
3595 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
3596
3597 * win32-host.c: Normalize copyright boilerplate.
3598
3599 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3600
3601 * parse.y (print_int_node): Use string concatentation on
3602 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3603 function calls into one.
3604
3605 2003-05-13 Zack Weinberg <zack@codesourcery.com>
3606
3607 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3608 fatal_io_error with calls to fatal_error; add ": %m" to the end of
3609 all the affected error messages.
3610
3611 2003-05-13 Richard Henderson <rth@redhat.com>
3612
3613 * class.c (layout_class_method): Set DECL_EXTERNAL.
3614 * decl.c (java_mark_decl_local, java_mark_class_local): New.
3615 * java-tree.h (java_mark_class_local): Declare.
3616 * jcf-parse.c (parse_class_file): Use it.
3617 * parse.y (java_expand_classes): Likewise.
3618
3619 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
3620
3621 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3622 * lex.h: #include input.h.
3623 * jv-scan.c (input_filename): Remove.
3624
3625 2003-05-02 Tom Tromey <tromey@redhat.com>
3626
3627 PR java/10491:
3628 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3629 (handle_inner_classes): New function.
3630
3631 2003-05-01 Tom Tromey <tromey@redhat.com>
3632
3633 PR java/10459:
3634 * parse.y (finish_for_loop): Do nothing if update expression is a
3635 EXPR_WFL_NODE wrapping nothing.
3636 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3637
3638 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
3639
3640 * lex.h (input_lineno): Remove declaration.
3641 * parse-scan.y: #include input.h.
3642 (input_filename): Remove declaration.
3643 (input_location): Add definition.
3644 (input_line): Remove definition.
3645
3646 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3647
3648 * lex.h (lineno): Rename to ...
3649 (input_line): ... here
3650 * parse-scan.y (lineno): Rename to ...
3651 (input_line): ... here.
3652 (reset_report): Rename lineno to input_line.
3653 * check-init.c (check_init): Likewise.
3654 * class.c (push_class): Likewise.
3655 * decl.c (complete_start_java_method, end_java_method): Likewise.
3656 * expr.c (expand_byte_code): Likewise.
3657 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3658 * jcf-write.c (generate_bytecode_insns): Likewise.
3659 * lex.c (java_init_lex, java_allocate_new_line,
3660 do_java_lex): Likewise.
3661 * parse.h (YYNOT_TWICE): Likewise.
3662 * parse.y (empty_statement, expression_statement,
3663 java_pop_parser_context, java_parser_context_save_global,
3664 yyerror, register_fields, method_header, safe_layout_class,
3665 find_in_imports_on_demand, create_artificial_method,
3666 source_end_java_method, start_complete_expand_method,
3667 build_thisn_assign, java_complete_lhs,
3668 maybe_absorb_scoping_block): Likewise.
3669
3670 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
3671
3672 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3673 '/' when computing java source filename
3674
3675 2003-04-13 Tom Tromey <tromey@redhat.com>
3676
3677 * gjavah.c (print_c_decl): Indentation fix.
3678
3679 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3680
3681 * class.c (make_field_value, make_method_value, get_dispatch_table)
3682 (make_class_data, emit_offset_symbol_table)
3683 * constants.c (build_constants_constructor)
3684 * java-tree.h (START_RECORD_CONSTRUCTOR)
3685 * parse.y (maybe_build_array_element_wfl):
3686 Use build_constructor.
3687
3688 2003-04-10 Eric Blake <ebb9@email.byu.edu>
3689
3690 PR java/10253:
3691 * parse.y (string_convert_int_cst): Always use at least one digit
3692 in string conversion. Remove ASCII dependence.
3693 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3694
3695 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
3696
3697 * Make-lang.in: added win32-host.c
3698 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3699 resolves to open() on non-Win32 platforms and
3700 Win32-specific jcf_open_exact_case() on Win32
3701 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3702 when trying .java and .class files
3703 * win32-host.c: added to repository. Defines
3704 Win32-specific jcf_open_exact_case()
3705
3706 2003-04-10 Andrew Haley <aph@redhat.com>
3707
3708 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3709 (maybe_free_localvar): Renamed from localvar_free.
3710 Add new arg, really.
3711 (generate_bytecode_insns): Set new variable, jsrs.
3712 Only free local vars if no jsr insns have been emittted.
3713 Call maybe_free_localvar, not localvar_free.
3714
3715 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
3716
3717 * gcj.texi: Remove @ at start of file.
3718
3719 2003-03-25 Tom Tromey <tromey@redhat.com>
3720
3721 * parse.y (create_interface): Call CHECK_DEPRECATED.
3722
3723 2003-03-23 Zack Weinberg <zack@codesourcery.com>
3724
3725 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3726
3727 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3728
3729 * javaop.h (jfloat, jdouble): Make them structures mirroring
3730 the bit fields of IEEE float and double respectively.
3731 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3732 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3733 (union Word, union DWord): Delete.
3734 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3735
3736 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3737 D_NAN_MASK): Delete.
3738 (jni_print_float, jni_print_double): New. Generate
3739 hexadecimal floating constants.
3740 (print_field_info): Use jni_print_float/double.
3741
3742 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
3743 finite floating point numbers for output; special case
3744 non-finite floats.
3745
3746 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3747
3748 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3749 Replace 0 and 1 with true and false in return statements.
3750
3751 2003-03-19 Tom Tromey <tromey@redhat.com>
3752
3753 * lex.c (do_java_lex): Renamed from java_lex.
3754 (java_lex): New function.
3755 Include timevar.h.
3756
3757 2003-03-13 Tom Tromey <tromey@redhat.com>
3758
3759 * parse.y (resolve_inner_class): Error if qualifier is a primitive
3760 type.
3761
3762 2003-03-04 Andrew Haley <aph@redhat.com>
3763
3764 * gjavah.c (is_first_data_member): New global variable.
3765 (print_c_decl): If it's the first data member, align it as the
3766 superclass.
3767 (process_file): Set is_first_data_member.
3768
3769 2003-03-11 Tom Tromey <tromey@redhat.com>
3770
3771 * parse.y (resolve_field_access): Initialize class if field is
3772 found in another static field.
3773 * expr.c (build_class_init): Don't optimize out initialization of
3774 implemented interface.
3775
3776 2003-03-11 Andrew Haley <aph@redhat.com>
3777
3778 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3779 warning.
3780
3781 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
3782
3783 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3784 and DIR_SEPARATOR_2 for a target.
3785 Correct minor typos.
3786
3787 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3788 and DIR_SEPARATOR_2 for a target into account.
3789
3790 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3791
3792 * lang.c (java_init): Update prototype, move code to java_post_options.
3793 (java_post_options): Similarly.
3794
3795 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
3796
3797 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3798 compare file name components depending on the case-sensitivity
3799 or otherwise of the host file system.
3800
3801 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3802 "strcmp" to compare file name components.
3803 Use IS_DIR_SEPARATOR instead of comparing directly against
3804 DIR_SEPARATOR.
3805 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3806 comparing directly against DIR_SEPARATOR.
3807
3808 2003-03-04 Tom Tromey <tromey@redhat.com>
3809
3810 * Make-lang.in (java.tags): New target.
3811
3812 2003-03-01 Roger Sayle <roger@eyesopen.com>
3813
3814 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3815 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3816
3817 2003-03-01 Tom Tromey <tromey@redhat.com>
3818
3819 * parse.y (jdep_resolve_class): Only check deprecation if we found
3820 a decl.
3821
3822 2003-02-28 Tom Tromey <tromey@redhat.com>
3823
3824 PR java/9695:
3825 * class.c (maybe_layout_super_class): Always pass a WFL to
3826 do_resolve_class.
3827 * parse.y (do_resolve_class): Updated comment to explain
3828 parameters.
3829
3830 2003-02-26 Tom Tromey <tromey@redhat.com>
3831
3832 * jcf-write.c (generate_classfile): Check whether class is
3833 deprecated before writing attribute count.
3834
3835 2003-02-25 Roger Sayle <roger@eyesopen.com>
3836
3837 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3838 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3839
3840 2003-02-23 Tom Tromey <tromey@redhat.com>
3841
3842 * lang-options.h: Added -Wdeprecated.
3843 * gcj.texi (Warnings): Document -Wdeprecated.
3844 * java-tree.h (flag_deprecated): Declare.
3845 * lang.c (lang_W_options): Added deprecated.
3846 (flag_deprecated): New global.
3847 * chartables.h: Rebuilt.
3848 * gen-table.pl (process_one): Look at whitespace.
3849 (print_tables): Define LETTER_SPACE, LETTER_MASK.
3850 * parse.h (CLEAR_DEPRECATED): New macro.
3851 (CHECK_DEPRECATED_NO_RESET): New macro.
3852 * jcf-parse.c (handle_deprecated): New function.
3853 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3854 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3855 * parse.y (resolve_type_during_patch): Check deprecation.
3856 (jdep_resolve_class): Likewise.
3857 (process_imports): Likewise.
3858 (resolve_expression_name): Likewise.
3859 (check_deprecation): Strip arrays from decl. Check
3860 flag_deprecated.
3861 (patch_method_invocation): Also check the particular constructor
3862 for deprecation.
3863 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3864 * jcf-write.c (append_deprecated_attribute): New function.
3865 (generate_classfile): Generate deprecated attribute when
3866 appropriate.
3867 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
3868 (java_lex) [case '*']: Simplify logic.
3869 (java_start_char_p): Use LETTER_MASK.
3870 (java_part_char_p): Likewise.
3871 (java_space_char_p): New function.
3872
3873 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3874
3875 Change base class access representation.
3876 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3877 (add_interface_do): Likewise.
3878
3879 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
3880
3881 * decl.c (java_init_decl_processing): Change
3882 soft_lookupjnimethod_node to reflect the change in
3883 signature of _Jv_LookupJNIMethod in libjava/jni.cc
3884 * expr.c (build_jni_stub): Calculate and pass the size
3885 on the stack of the arguments to a JNI function. Use
3886 new target macro MODIFY_JNI_METHOD_CALL to allow a
3887 target to modify the call to a JNI method.
3888
3889 2003-02-08 Roger Sayle <roger@eyesopen.com>
3890
3891 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3892 instead of basename to avoid compiler warnings on Tru64.
3893
3894 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
3895
3896 * gcj.texi: Update to GFDL 1.2.
3897
3898 2003-01-31 Andrew Haley <aph@redhat.com>
3899
3900 * parse.y (java_expand_classes): Scan the whole class list looking
3901 for access methods that haven't yet been expanded.
3902
3903 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3904
3905 Fix for java/4269:
3906
3907 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3908 to fix bootstrap on sparc-unknown-netbsdelf1.5.
3909 * jcf-parse.c: Likewise.
3910
3911 2003-01-31 Mark Wielaard <mark@klomp.org>
3912
3913 * gjavah.c (throwable_p): Allocate 1 more byte for string.
3914
3915 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3916
3917 * class.c (make_class): Use BINFO_ELTS.
3918 (set_super_info): Likewse.
3919 (add_interface_do): Likewise.
3920
3921 2003-01-30 Tom Tromey <tromey@redhat.com>
3922
3923 * jcf-parse.c (read_class): Update identifier's class value if it
3924 changed during parsing.
3925
3926 2003-01-30 Loren James Rittle <ljrittle@acm.org>
3927
3928 * Make-lang.in (po-generated): Find the targets in $(parsedir).
3929 Propagate change to all other rules as required.
3930 (java/parse-scan.o): Add explicit dependency on
3931 $(parsedir)/java/parse-scan.c .
3932
3933 2003-01-29 Tom Tromey <tromey@redhat.com>
3934
3935 * parse.y (patch_assignment): Only transform the rhs of an
3936 assignment when compiling to native.
3937
3938 2003-01-28 Tom Tromey <tromey@redhat.com>
3939
3940 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
3941
3942 2003-01-28 Tom Tromey <tromey@redhat.com>
3943
3944 * lex.c (java_lex): Don't include UEOF as part of token.
3945 (java_read_unicode): Error if \u sequence prematurely terminated.
3946
3947 2003-01-27 Tom Tromey <tromey@redhat.com>
3948
3949 * parse.y (java_check_regular_methods): Check for construct after
3950 checking types in throws clause.
3951
3952 2003-01-24 Tom Tromey <tromey@redhat.com>
3953
3954 * class.c (build_static_field_ref): Only a String or numeric field
3955 can fold to a constant.
3956
3957 2003-01-23 Tom Tromey <tromey@redhat.com>
3958
3959 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
3960 file name in resource buffer.
3961
3962 2003-01-23 Tom Tromey <tromey@redhat.com>
3963
3964 * expr.c (build_known_method_ref): Use method's context to find
3965 method table index.
3966
3967 2003-01-23 Tom Tromey <tromey@redhat.com>
3968
3969 * constants.c (set_constant_entry): Allocated cleared memory.
3970
3971 2003-01-22 Tom Tromey <tromey@redhat.com>
3972
3973 * java-tree.h: Don't use PARAMS.
3974 * resource.c: Add prototypes for all functions.
3975 (write_resource_constructor): Use `const char *' to avoid
3976 warning.
3977
3978 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
3979
3980 * jcf-parse.c (process_zip_dir): Remove unused variable.
3981
3982 2003-01-22 Tom Tromey <tromey@redhat.com>
3983
3984 * expr.c (build_invokeinterface): Abort if method's context is not
3985 an interface.
3986
3987 2003-01-22 Tom Tromey <tromey@redhat.com>
3988
3989 * gcj.texi (Input and output files): Mention non-class entries.
3990 * decl.c (java_init_decl_processing): Call
3991 init_resource_processing.
3992 * java-tree.h (compile_resource_data, write_resource_constructor,
3993 compile_resource_file, init_resource_processing): Declare.
3994 * config-lang.in (gtfiles): Added resource.c.
3995 * Make-lang.in (gt-java-resource.h): New target.
3996 (JAVA_OBJS): Added resource.o.
3997 (java/resource.o): New target.
3998 * resource.c: New file.
3999 * class.c (compile_resource_file): Moved to resource.c.
4000 (registerResource_libfunc): Likewise.
4001 (utf8_decl_list): Mark with GTY; now static.
4002 * jcf-parse.c (classify_zip_file): New function.
4003 (parse_zip_file_entries): Use it; compile .properties files.
4004 (process_zip_dir): Use classify_zip_file and compute_class_name.
4005 Don't write class name into zip directory.
4006 (java_parse_file): Call write_resource_constructor.
4007 (compute_class_name): New function.
4008 * jcf-io.c (read_zip_member): Reindented.
4009
4010 2003-01-21 Tom Tromey <tromey@redhat.com>
4011
4012 * class.c (supers_all_compiled): New function.
4013 (make_class_data): Use it.
4014
4015 2003-01-21 Tom Tromey <tromey@redhat.com>
4016
4017 * parse.y (method_header): Native method can't be strictfp.
4018 No method can be transient or volatile.
4019
4020 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4021
4022 Make-lang.in (jvspec.o-warn): Add -Wno-error.
4023
4024 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
4025
4026 * check-init.c: Fix comment typos.
4027 * class.c: Likewise.
4028 * constants.c: Likewise.
4029 * decl.c: Likewise.
4030 * except.c: Likewise.
4031 * expr.c: Likewise.
4032 * java-except.h: Likewise.
4033 * java-tree.h: Likewise.
4034 * javaop.h: Likewise.
4035 * jcf-dump.c: Likewise.
4036 * jcf-io.c: Likewise.
4037 * jcf-parse.c: Likewise.
4038 * jcf-write.c: Likewise.
4039 * lang.c: Likewise.
4040 * mangle.c: Likewise.
4041 * typeck.c: Likewise.
4042 * verify.c: Likewise.
4043
4044 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4045
4046 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
4047 * jcf-write.c: Include "tm_p.h".
4048
4049 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4050
4051 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
4052
4053 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4054
4055 * builtins.c (java_build_function_call_expr): Renamed from
4056 build_function_call_expr. All callers changed.
4057
4058 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
4059 * jcf-parse.c: Include tm_p.h.
4060
4061 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
4062 warning.
4063
4064 2003-01-14 Tom Tromey <tromey@redhat.com>
4065
4066 * class.c (make_class_data): Check that super is compiled before
4067 building class reference to it.
4068
4069 2003-01-14 Andrew Haley <aph@redhat.com>
4070
4071 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4072 varargs function -- correct.
4073
4074 2003-01-14 Andrew Haley <aph@redhat.com>
4075
4076 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
4077
4078 2003-01-14 Andrew Haley <aph@redhat.com>
4079
4080 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
4081 varargs function -- correct.
4082
4083 * parse.y (patch_assignment): Copy the rhs of an assignment into a
4084 temporary if the RHS is a reference.
4085
4086 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4087
4088 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
4089 * keyword.h: Regenerated.
4090
4091 * All Files: Convert to ISO C style function definitions.
4092
4093 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
4094
4095 * parse.y (check_pkg_class_access): ANSIfy definition.
4096
4097 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4098
4099 * decl.c, parse-scan.y, parse.y: Don't cast return value of
4100 xmalloc et al.
4101
4102 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
4103
4104 2003-01-09 Geoffrey Keating <geoffk@apple.com>
4105
4106 Merge from pch-branch:
4107
4108 2002-12-02 Geoffrey Keating <geoffk@apple.com>
4109
4110 * Make-lang.in (java/gjavah.o): Update dependencies.
4111 * gjavah.c: Include ggc.h.
4112
4113 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
4114
4115 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
4116 (JCFDUMP_OBJS): Add ggc-none.o.
4117 (java/jcf-dump.o): Depend on GGC_H.
4118 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
4119 CPool substructures.
4120 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
4121 * jcf-dump.c: Include ggc.h.
4122
4123 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
4124
4125 * jcf.h (union cpool_entry): New.
4126 (struct CPool): Use gengtype to mark. Change field 'data' to be
4127 an array of unions.
4128 (struct JCF): Use gengtype to mark.
4129 (CPOOL_UINT): Update for new cpool_entry type.
4130 (CPOOL_USHORT1): Likewise.
4131 (CPOOL_USHORT2): Likewise.
4132 (CPOOL_FINISH): Use GC to free cpool subfields.
4133 * parse.h (struct parser_ctxt): Mark field current_jcf.
4134 * lex.c (java_init_lex): Use GC to allocate struct JCF.
4135 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
4136 (main_jcf): Use gengtype to mark.
4137 (ggc_mark_jcf): Delete.
4138 (get_constant): Update for new cpool_entry type.
4139 (give_name_to_class): Likewise.
4140 (get_class_constant): Likewise.
4141 (init_outgoing_cpool): Use GGC to allocate struct CPool.
4142 (java_parse_file): Use GGC to allocate struct JCF.
4143 (init_jcf_parse): Don't call ggc_add_root.
4144 * jcf-reader.c (jcf_parse_constant_pool): Update for new
4145 cpool_entry type.
4146 * java-tree.h (current_jcf): Use gengtype to mark.
4147 (CPOOL_UTF): Update for new cpool_entry type.
4148 (outgoing_cpool): Use gengtype to mark.
4149 (struct lang_type): GC struct JCF and struct CPool.
4150 * config-lang.in (gtfiles): Add jcf.h.
4151 * constants.c (find_tree_constant): New.
4152 (set_constant_entry): Allocate cpool subfields using GGC. Update
4153 for new cpool_entry type.
4154 (find_constant1): Update for new cpool_entry type.
4155 (find_constant2): Likewise.
4156 (find_utf8_constant): Use find_tree_constant.
4157 (find_class_or_string_constant): Remove unnecessary cast to jword.
4158 Update for new cpool_entry type.
4159 (count_constant_pool_bytes): Update for new cpool_entry type.
4160 (write_constant_pool): Likewise.
4161 (alloc_name_constant): Use find_tree_constant.
4162 (build_constants_constructor): Update for new cpool_entry type.
4163
4164 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
4165
4166 * parse.y (mark_parser_ctxt): Delete.
4167 (goal): Don't use ggc_add_root.
4168 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
4169 (java_pop_parser_context): Let GC free parser_ctxt.
4170 (java_parser_context_resume): Likewise.
4171 * parse.h (struct parser_ctxt): Use gengtype to mark.
4172 (ctxp): Likewise.
4173 (ctxp_for_generation): Likewise.
4174 * lex.h (struct java_lc_s): Mark for gengtype.
4175 (java_lexer): Rearrange for gengtype.
4176 * config-lang.in (gtfiles): Add lex.h, parse.h.
4177
4178 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4179
4180 * All Files: Remove PARAMS macro.
4181
4182 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
4183 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
4184 `__STDC__' macros.
4185
4186 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
4187 VA_CLOSE.
4188
4189 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
4190
4191 * Make-lang.in (java.install-common, java.uninstall,
4192 java.install-info, java.install-man): Prepend $(DESTDIR)
4193 to destination paths in all (un)installation commands.
4194 (java.install-common): Rewrite $(LN) command to support
4195 DESTDIR with "ln" as well as with "ln -s".
4196
4197 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
4198
4199 * java-tree.h: Protect against multiple inclusion.
4200
4201 2003-01-07 Tom Tromey <tromey@redhat.com>
4202
4203 * class.c (add_assume_compiled): Don't adjust parent if we're
4204 already at the root of tree.
4205
4206 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4207
4208 * lang.c (dump_compound_expr): Prototype.
4209
4210 2003-01-03 Tom Tromey <tromey@redhat.com>
4211
4212 Fix for PR java/8712:
4213 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
4214 when simply checking against `null'.
4215
4216 2003-01-03 Tom Tromey <tromey@redhat.com>
4217
4218 * gcj.texi (Standard Properties): Document http.proxyHost and
4219 http.proxyPort.
4220
4221 * gcj.texi (GNU Classpath Properties): Document new properties.
4222
4223 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4224
4225 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
4226 java/lang-options.h, java/mangle.c, java/mangle_name.c,
4227 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
4228
4229 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
4230
4231 * Make-lang.in, boehm.c, buffer.c,
4232 buffer.h, builtins.c, class.c,
4233 config-lang.in, constants.c,
4234 convert.h, decl.c, except.c,
4235 expr.c, java-except.h,
4236 java-tree.h, javaop.def,
4237 jcf-parse.c, jcf-write.c,
4238 jv-scan.c, jvgenmain.c,
4239 jvspec.c, keyword.gperf,
4240 keyword.h, lang-options.h,
4241 lang-specs.h, lang.c, lex.c,
4242 lex.h, mangle.c, mangle_name.c,
4243 parse-scan.y, parse.h, parse.y,
4244 typeck.c, verify.c, xref.c,
4245 xref.h: Replace "GNU CC" with
4246 "GCC" in the copyright header.
4247
4248 * check-init.c, gjavah.c, javaop.h,
4249 jcf-depend.c, jcf-dump.c, jcf-io.c,
4250 jcf-path.c, jcf-reader.c, jcf.h,
4251 zextract.c, zipfile.h: These files are
4252 "part of GCC". Also say "GCC" not "GNU CC".
4253
4254 2002-12-30 DJ Delorie <dj@redhat.com>
4255
4256 * Make-lang.in: Protect against texi2pod/pod2man failing.
4257
4258 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
4259
4260 * gcj.texi: Use @copying.
4261
4262 2002-12-27 Mark Mitchell <mark@codesourcery.com>
4263
4264 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
4265 print_cxx_classname.
4266 (print_cxx_classname): Add add_scope parameter.
4267 (print_class_decls): Do not emit a semicolon after the extern
4268 "Java" block.
4269 (process_file): Adjust calls to print_cxx_classname.
4270
4271 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
4272
4273 * gcj.texi: Include Cover Texts in man page.
4274
4275 2002-12-23 Jeff Sturm <jsturm@one-point.com>
4276
4277 * class.c (build_static_field_ref): Check FIELD_FINAL.
4278
4279 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
4280 instead of current_constant_pool_data_ref.
4281 * java-tree.h (current_constant_pool_data_ref): Undefine.
4282 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
4283 * jcf-parse.c (init_outgoing_cpool): Don't initialize
4284 current_constant_pool_data_ref.
4285
4286 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
4287 not build_internal_class_name.
4288
4289 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
4290 Use it when class ref isn't certain to be compiled.
4291
4292 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
4293
4294 * gcj.texi: Include gcc-common.texi.
4295 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
4296 $(srcdir)/doc/include/gcc-common.texi.
4297
4298 2002-12-22 Anthony Green <green@redhat.com>
4299
4300 * gcj.texi (Limitations): Add note about org.xml.sax and
4301 org.w3c.dom.
4302
4303 2002-12-20 Tom Tromey <tromey@redhat.com>
4304
4305 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
4306 where minimum case value is Integer.MIN_VALUE.
4307 Fixes PR java/8955.
4308
4309 2002-12-18 Andrew Haley <aph@redhat.com>
4310
4311 * parse.y (patch_invoke): Force evaluation order when `check' is
4312 set. For PR libgcj/8945.
4313
4314 2002-12-16 Mark Mitchell <mark@codesourcery.com>
4315
4316 * gcj.texi: Change version number to 3.4.
4317
4318 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
4319 Andrew Haley <aph@redhat.com>
4320
4321 * parse.y (source_end_java_method): Remove custom encoding of line
4322 numbers for a function decl before passing it to the back end.
4323
4324 2002-12-03 Andrew Haley <aph@redhat.com>
4325
4326 * class.c (make_class_data): New field, "chain".
4327 * decl.c (java_init_decl_processing): Likewise.
4328
4329 2002-12-02 Tom Tromey <tromey@redhat.com>
4330
4331 For PR java/8740:
4332 * parse.y (do_resolve_class): Handle qualified name via
4333 recursion.
4334
4335 2002-11-30 Zack Weinberg <zack@codesourcery.com>
4336
4337 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
4338 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
4339 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
4340 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
4341 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
4342 Include coretypes.h and tm.h.
4343 * Make-lang.in: Update dependencies.
4344
4345 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4346
4347 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
4348
4349 2002-11-25 Diego Novillo <dnovillo@redhat.com>
4350
4351 * jcf-reader.c: Don't expand JCF_readu4 inside the
4352 expansion of JCF_SKIP.
4353
4354 2002-11-25 Diego Novillo <dnovillo@redhat.com>
4355
4356 * jcf-reader.c: Don't expand JCF_readu4 inside the
4357 expansion of JCF_SKIP.
4358
4359 2002-11-22 Tom Tromey <tromey@redhat.com>
4360
4361 * parse.y (patch_binop): Cast right hand side of shift expression
4362 to `int'. Fixes PR java/8676.
4363
4364 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
4365 Andrew Haley <aph@redhat.com>
4366
4367 * gcc/java/jcf-write.c (write_classfile): Remove target
4368 class file, if it exists, before renaming the temporary
4369 class file to it.
4370
4371 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
4372
4373 * jvspec.c (lang_specific_spec_functions): New.
4374
4375 2002-11-18 Tom Tromey <tromey@redhat.com>
4376
4377 Fix for PR java/7912:
4378 * expr.c (can_widen_reference_to): Allow cast of array to
4379 Cloneable or Serializable.
4380 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
4381 (java_io_serializable_identifier_node): Likewise.
4382 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
4383 (valid_ref_assignconv_cast_p): Use new identifier nodes.
4384 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
4385 java_io_serializable.
4386 * decl.c (java_init_decl_processing): Initialize
4387 java_lang_cloneable_identifier_node and
4388 java_io_serializable_identifier_node.
4389 (java_lang_cloneable_identifier_node): New global.
4390 (java_io_serializable_identifier_node): Likewise.
4391
4392 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
4393
4394 * buffer.c: Remove unnecessary casts.
4395 * check-init.c: Likewise.
4396 * class.c: Likewise.
4397 * constants.c: Likewise.
4398 * decl.c: Likewise.
4399 * except.c: Likewise.
4400 * gjavah.c: Likewise.
4401 * jcf-io.c: Likewise.
4402 * jcf-parse.c: Likewise.
4403 * jcf-path.c: Likewise.
4404 * jvspec.c: Likewise.
4405 * lang.c: Likewise.
4406 * lex.c: Likewise.
4407 * verify.c: Likewise.
4408
4409 2002-11-06 Tom Tromey <tromey@redhat.com>
4410
4411 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
4412 a JNI header.
4413
4414 2002-11-05 Tom Tromey <tromey@redhat.com>
4415
4416 Fix for PR java/6388.
4417 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
4418 * java-tree.h (enum java_tree_index): New values
4419 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
4420 (decimal_int_max, decimal_long_max): New defines.
4421 * lex.c (yylex): Rewrote range checking. Sign extend literals.
4422 (error_if_numeric_overflow): Rewrote range checking.
4423 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
4424 decimal_long_max.
4425
4426 2002-11-02 Tom Tromey <tromey@redhat.com>
4427
4428 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
4429
4430 * class.c (make_method_value): Put class name, not signature, into
4431 `throws' field. For PR java/8415.
4432
4433 2002-10-24 Tom Tromey <tromey@redhat.com>
4434
4435 * gcj.texi (Invoking gij): Document --showversion.
4436 (Standard Properties): java.library.path now set.
4437
4438 2002-10-23 Tom Tromey <tromey@redhat.com>
4439
4440 * gjavah.c (decode_signature_piece): In JNI mode, print
4441 `jobjectArray' when array depth is nonzero.
4442 Fixes PR java/8296.
4443
4444 2002-10-15 Andrew Haley <aph@redhat.com>
4445
4446 * parse.y (patch_invoke): Call force_evaluation_order on a static
4447 arg list.
4448 (resolve_qualified_expression_name): Call force_evaluation_order
4449 on a arg list that is part of a Qualified Expression Name.
4450
4451 * lang.c (dump_compound_expr): New.
4452 (java_dump_tree): New.
4453
4454 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
4455
4456 * gcj.texi: Added item describing the GCJ runtime property
4457 "gnu.gcj.progname".
4458
4459 2002-10-15 Richard Henderson <rth@redhat.com>
4460
4461 * jcf-parse.c (get_constant): Fix type warning.
4462
4463 2002-10-15 Andrew Haley <aph@redhat.com>
4464
4465 * java-tree.h (java_inlining_merge_static_initializers): Declare.
4466 (java_inlining_map_static_initializers): Declare.
4467
4468 2002-10-14 Andrew Haley <aph@redhat.com>
4469
4470 * tree-inline.c (remap_block): All local class initialization
4471 flags go in the outermost scope.
4472 (expand_call_inline): Call java_inlining_map_static_initializers.
4473 (expand_call_inline): Call java_inlining_merge_static_initializers.
4474 * java/lang.c (merge_init_test_initialization): New.
4475 (java_inlining_merge_static_initializers): New.
4476 (inline_init_test_initialization): New.
4477 (java_inlining_map_static_initializers): New.
4478
4479 2002-10-11 Mark Wielaard <mark@klomp.org>
4480
4481 * gcj.texi (Compatibility): Add Limitations and Extensions section.
4482
4483 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4484
4485 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
4486
4487 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4488
4489 * parse.y (merge_string_cste): Add parentheses around & within |.
4490
4491 2002-10-08 Tom Tromey <tromey@redhat.com>
4492
4493 * parse.y (variable_declarator_id): Simplify error path for
4494 array declarator error. For PR java/8003.
4495
4496 2002-10-08 Zack Weinberg <zack@codesourcery.com>
4497
4498 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
4499 bug_report_url.
4500
4501 2002-10-08 Andrew Haley <aph@redhat.com>
4502
4503 * parse.y (attach_init_test_initialization_flags): Check for
4504 error_mark_node.
4505
4506 2002-10-07 Anthony Green <green@redhat.com>
4507
4508 * parse.y (merge_string_cste): Fix bug in string concatenation.
4509
4510 2002-10-03 Michael Koch <konqueror@gmx.de>
4511
4512 * gcj.texi (Standard properties):
4513 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
4514
4515 2002-10-02 Roger Sayle <roger@eyesopen.com>
4516
4517 PR optimization/6627
4518 * lang.c (java_init): If storing the vbit in function
4519 pointers, ensure that force_align_functions_log is atleast
4520 one to aid compatability with g++ vtables.
4521
4522 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
4523
4524 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
4525 foul of type-based aliasing.
4526
4527 2002-09-30 Anthony Green <green@redhat.com>
4528
4529 * gcj.texi (Invoking jv-scan): Fix texinfo.
4530
4531 2002-09-28 Anthony Green <green@redhat.com>
4532
4533 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
4534 (Code Generation): Add -fno-assert documentation.
4535 * jv-scan.c (flag_assert): New global.
4536 (options): Add assert option.
4537 (help): Add --no-assert documentation.
4538 * parse-scan.y (flag_assert): New global.
4539 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
4540 (flag_assert): New global.
4541 * java-tree.h (flag_assert): New global.
4542 * lex.c (java_lex): Obey flag_assert.
4543 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
4544 calling cc1.
4545
4546 2002-09-26 Andrew Haley <aph@redhat.com>
4547
4548 * expr.c (build_java_array_length_access): Check for null pointer.
4549 * expr.c (expand_java_arrayload): Likewise.
4550
4551 2002-09-21 Richard Henderson <rth@redhat.com>
4552
4553 * jcf-parse.c (get_constant): Decode from IEEE no matter
4554 what the target format.
4555
4556 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
4557
4558 * ChangeLog: Follow spelling conventions.
4559 * class.c: Likewise.
4560 * decl.c: Likewise.
4561 * expr.c: Likewise.
4562 * gjavah.c: Likewise.
4563 * java-tree.h: Likewise.
4564 * jcf-dump.c: Likewise.
4565 * jcf-parse.c: Likewise.
4566 * jvspec.c: Likewise.
4567 * lang.c: Likewise.
4568 * mangle.c: Likewise.
4569 * parse.y: Likewise.
4570
4571 2002-09-17 Tom Tromey <tromey@redhat.com>
4572
4573 * lex.c (java_read_unicode_collapsing_terminators): Handle case
4574 where \r appears at EOF. Fixes PR java/7950.
4575
4576 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4577
4578 * jvspec.c (lang_specific_driver): Remove unused variable.
4579
4580 2002-09-16 Geoffrey Keating <geoffk@apple.com>
4581
4582 * java-tree.h (union lang_tree_node): Add chain_next option.
4583
4584 2002-09-16 Richard Henderson <rth@redhat.com>
4585
4586 * jcf-parse.c (get_constant): Runtime check for IEEE format;
4587 use new real.h interface.
4588 * jcf-write.c (find_constant_index): Use new real.h interface.
4589 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
4590
4591 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
4592
4593 * lang.c: Follow spelling conventions.
4594
4595 2002-09-11 Per Bothner <per@bothner.com>
4596
4597 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
4598 constant to the type of the field.
4599 (java_complete_tree): Remove now-redundant code.
4600
4601 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
4602
4603 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
4604
4605 For PR java/5794:
4606 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
4607 return label if a ret instruction for the jsr has been reached.
4608
4609 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
4610
4611 * parse.y (DIR_SEPARATOR): Don't define.
4612 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
4613
4614 2002-08-28 Andrew Haley <aph@redhat.com>
4615
4616 * verify.c (verify_jvm_instructions): Allow exception handler
4617 inside code that is being protected, but generate a warning.
4618 * except.c (link_handler): Initialize `expanded' in new eh_range.
4619 (binding_depth, is_class_level, current_pc): Declare extern.
4620
4621 2002-09-01 Mark Wielaard <mark@klomp.org>
4622
4623 * gcj.texi: Add chapter about system properties.
4624 Fixed some typos.
4625
4626 2002-08-26 Tom Tromey <tromey@redhat.com>
4627
4628 * parse.y (try_builtin_assignconv): Allow narrowing primitive
4629 conversion if RHS_TYPE is byte, short, or char.
4630
4631 2002-08-22 Tom Tromey <tromey@redhat.com>
4632
4633 * gcj.texi (Invoking gij): Document -cp and -classpath.
4634
4635 2002-08-21 Tom Tromey <tromey@redhat.com>
4636
4637 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
4638 $(prefix)/share. For PR libgcj/7633.
4639
4640 For PR java/6005 and PR java/7611:
4641 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
4642 (java_can_use_bit_fields_p): New function.
4643
4644 2002-08-16 Tom Tromey <tromey@redhat.com>
4645
4646 * gcj.texi (Class Initialization): Mention class initialization of
4647 arrays.
4648
4649 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
4650
4651 * Make-lang.in (java-tree-inline.o): New.
4652 (JAVA_OBJS): Add java-tree-inline.o.
4653 * parse.y (source_end_java_method): Call java_optimize_inline.
4654 (java_expand_method_bodies): Save method's tree in
4655 DECL_SAVED_TREE.
4656 (add_stmt_to_compound): Keep track of the number of statments.
4657 * lang.c (java_init): Enable flag_inline_trees.
4658 (java_post_options): If flag_inline_functions is on, enable
4659 flag_inline_trees instread.
4660 (decl_constant_value): New.
4661 (java_tree_inlining_walk_subtrees): New.
4662 * java-tree.h (DECL_NUM_STMTS): New macro.
4663 (java_optimize_inline): Declare.
4664 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
4665 Handle a LABEL_EXPR.
4666 * decl.c (build_result_decl): If we already have a DECL_RESULT
4667 don't make another.
4668 (dump_function): New.
4669 (java_optimize_inline): New.
4670 (dump_function): New.
4671
4672 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
4673
4674 For PR java/7483:
4675 * parse.y (build_assertion): Invert return from
4676 desiredAssertionStatus.
4677
4678 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4679
4680 * jcf-write.c (get_access_flags): Return correct access flags for
4681 private and protected inner classes.
4682
4683 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
4684
4685 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
4686
4687 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
4688
4689 * mangle_name.c: Don't include obstack.h twice.
4690 * xref.c: Don't include obstack.h.
4691
4692 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
4693
4694 * class.c: (permanent_obstack): Delete declaration.
4695 * constants.c: (permanent_obstack): Delete declaration.
4696 * except.c: (permanent_obstack): Delete declaration.
4697 * expr.c: (permanent_obstack): Delete declaration.
4698 * jcf-parse.c: (permanent_obstack): Delete declaration.
4699 (saveable_obstack): Delete declaration.
4700 * parse.h: (permanent_obstack): Delete declaration.
4701 * typeck.c: (permanent_obstack): Delete declaration.
4702
4703 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
4704
4705 * gcj.texi (version-gcc): Increase to 3.3.
4706
4707 2002-07-22 Tom Tromey <tromey@redhat.com>
4708
4709 * lex.c (java_lex): Check for `e' or `E' after 0.
4710
4711 2002-07-21 Richard Henderson <rth@redhat.com>
4712
4713 * lang.c (java_unsafe_for_reeval): New.
4714 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
4715
4716 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
4717
4718 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
4719 (jcf_path_init): Use GET_ENVIRONMENT.
4720
4721 2002-07-10 Roger Sayle <roger@eyesopen.com>
4722 Zack Weinberg <zack@codesourcery.com>
4723
4724 * builtins.c (initialize_builtins): Remove defines that
4725 handled C/C++ specific junk hereby removed from builtins.def.
4726
4727 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
4728
4729 * lang.c (java_post_options): Update prototype.
4730
4731 2002-07-05 Roger Sayle <roger@eyesopen.com>
4732
4733 * builtins.c (initialize_builtins): Ignore the additional
4734 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
4735 the builtins.def file.
4736
4737 2002-07-01 Tom Tromey <tromey@redhat.com>
4738
4739 For PR libgcj/7073:
4740 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
4741 specially.
4742
4743 2002-07-01 Roger Sayle <roger@eyesopen.com>
4744
4745 * java/decl.c (builtin_function): Accept additional parameter.
4746 (java_init_decl_processing): Pass an additional NULL_TREE
4747 argument to builtin_function.
4748
4749 2002-06-29 T.J. Mather <tjmather@maxmind.com>
4750
4751 * gcj.texi: Fixed gcj invocation example so that it compiles.
4752
4753 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4754
4755 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
4756 * parse.y (mark_parser_ctxt): Likewise.
4757 (check_modifiers, declare_local_variables): Avoid incorrect
4758 hardcoded constant 10.
4759
4760 * lex.c (java_read_char): Avoid "comparison is always true"
4761 warning.
4762
4763 2002-06-25 Andreas Schwab <schwab@suse.de>
4764
4765 * expr.c (JSR): Avoid undefined operation on PC.
4766
4767 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4768
4769 * decl.c (clear_binding_level): Const-ify.
4770
4771 2002-06-13 Akim Demaille <akim@epita.fr>
4772
4773 * parse.y (class_declaration, interface_declaration): Make sure
4774 all their rules have an action, in order to avoid meaningless `$$
4775 = $1' and their type clashes.
4776
4777 2002-06-11 Tom Tromey <tromey@redhat.com>
4778
4779 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
4780 * parse-scan.y (statement_without_trailing_substatement): Added
4781 assert_statement.
4782 (assert_statement): New rule.
4783 * java-tree.h (struct lang_type) [assertions]: New field.
4784 (TYPE_USES_ASSERTIONS): New macro.
4785 (CLASS_USES_ASSERTIONS): Likewise.
4786 (FIELD_SYNTHETIC): New define.
4787 * lex.c (java_lval;): Added ASSERT_TK.
4788 * parse.y (ASSERT_TK): Added.
4789 (statement_without_trailing_substatement): Added assert_statement.
4790 (assert_statement): New rule.
4791 (build_assertion): New function.
4792 (maybe_generate_pre_expand_clinit): Create and initialize
4793 $assertionsDisabled.
4794 (lookup_package_type): Removed decl.
4795 * keyword.h: Rebuilt.
4796 * keyword.gperf (assert): New token.
4797
4798 2002-06-10 Akim Demaille <akim@epita.fr>
4799
4800 * parse.y (interface_type_list, class_member_declaration)
4801 (unary_expression_not_plus_minus): Remove duplicate %type.
4802 Whitespace changes.
4803
4804 2002-06-09 Tom Tromey <tromey@redhat.com>
4805
4806 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
4807
4808 * parse.y (method_header): Give error message in all cases.
4809 Fixes PR java/6865.
4810
4811 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4812
4813 Don't use RTL inlining. Fix for PR java/6820.
4814 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
4815 (flag_really_inline): New.
4816 (java_decode_option): Set flag_really_inline if -finline-functions
4817 is seen.
4818 (java_post_options): New function. Turn off inlining unless
4819 flag_really_inline is set.
4820
4821 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4822
4823 * gjavah.c (throwable_p): Accept argument as either a classname or
4824 signature fragment. Create null-terminated classname string for super
4825 when calling itself recursively.
4826 (decode_signature_piece): Skip first character from class name
4827 signature when calling throwable_p.
4828
4829 2002-06-08 H.J. Lu (hjl@gnu.org)
4830
4831 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
4832
4833 2002-06-04 Tom Tromey <tromey@redhat.com>
4834
4835 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
4836
4837 2002-06-04 Michael Koch <konqueror@gmx.de>
4838
4839 * gcj.texi (Input Options): Fixed typo.
4840
4841 2002-06-04 Zack Weinberg <zack@codesourcery.com>
4842
4843 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
4844 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
4845 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
4846 and all now-pointless local variables. Rename other local
4847 variables to reflect their not being handles.
4848
4849 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
4850 #if JCF_USE_STDIO blocks.
4851
4852 * parse.y: Add missing semicolon at end of rule.
4853
4854 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
4855
4856 * check-init.c (attach_initialized_static_class): Delete, unused.
4857 * parse.y: Use htab_t instead of struct hashtable, update
4858 all uses.
4859 * java-tree.h: Include hashtab.h instead of hash.h.
4860 (struct lang_decl_func): Use htab_t, set up for gengtype.
4861 (struct init_test_hash_entry): Delete.
4862 (struct treetreehash_entry): New.
4863 (java_treetreehash_find): New
4864 (java_treetreehash_new): New prototype.
4865 (java_treetreehash_create): New prototype.
4866 (java_mark_tree): Delete prototype.
4867 (java_hash_hash_tree_node): Delete prototype.
4868 (java_hash_compare_tree_node): Delete prototype.
4869 (attach_initialized_static_class): Delete prototype.
4870 * expr.c (build_class_init): Update to use java_treetreehash
4871 functions.
4872 (java_expand_expr): Update to use htab_t.
4873 (emit_init_test_initialization): Likewise.
4874 * decl.c (java_mark_tree): Delete.
4875 * class.c (init_test_hash_newfunc): Delete.
4876 (java_hash_hash_tree_node): Delete.
4877 (java_hash_compare_tree_node): Delete.
4878 (add_method_1): Update to use java_treetreehash functions.
4879 (JAVA_TREEHASHHASH_H): New macro.
4880 (java_treetreehash_hash): New function.
4881 (java_treetreehash_compare): New function.
4882 (java_treetreehash_find): New function.
4883 (java_treetreehash_new): New function.
4884 (java_treetreehash_create): New function.
4885 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
4886
4887 * Make-lang.in (java/parse.o): Depend on debug.h.
4888 * java-tree.h (struct lang_identifier): Use gengtype.
4889 (union lang_tree_node): New.
4890 (struct lang_decl_func): Use gengtype.
4891 (struct lang_decl_var): Likewise.
4892 (struct lang_decl): Likewise.
4893 * parse.y: Include debug.h.
4894 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
4895
4896 * lang.c (struct language_function): New dummy structure.
4897
4898 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
4899 descriminator for DECL_LANG_SPECIFIC.
4900 (struct lang_decl_func): Rename from struct lang_decl.
4901 (enum lang_decl_desc): New.
4902 (struct lang_decl): Make it a union. Update all the accessor macros.
4903 (struct lang_type): Use gengtype.
4904 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
4905 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
4906 are now the same size.
4907 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
4908 use discriminator to mark DECL_LANG_SPECIFIC.
4909
4910 * Make-lang.in (gt-java-builtins.h): New rule.
4911 (java/builtins.o): Add dependency on gt-<filename>.h.
4912 * builtins.c: Use gengtype for roots.
4913 (union string_or_tree): Use gengtype.
4914 (struct builtin_record): Use gengtype.
4915 * config-lang.in (gtfiles): Add builtins.c.
4916
4917 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
4918 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
4919 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
4920 gt-java-parse.h, gtype-java.h): Add rules to generate.
4921 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
4922 (class.o): Add dependency on gt-*.h.
4923 (constants.o): Likewise.
4924 (decl.o): Likewise.
4925 (expr.o): Likewise.
4926 (jcf-parse.o): Likewise.
4927 (jcf-write.o): Likewise.
4928 (lang.o): Likewise.
4929 * config-lang.in (gtfiles): New.
4930 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4931 * constants.c: Replace uses of ggc_add_* with GTY markers.
4932 Include gt-*.h.
4933 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4934 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4935 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
4936 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
4937 Include gt-*.h.
4938 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
4939 Include gt-*.h.
4940 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4941 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
4942 gt-*.h.
4943 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
4944 Include gtype-java.h.
4945
4946 2002-06-02 Tom Tromey <tromey@redhat.com>
4947
4948 Fix for PR java/5913:
4949 * parse.y (patch_binop): Call patch_string on op1.
4950
4951 2002-06-02 Tom Tromey <tromey@redhat.com>
4952
4953 Fix for PR java/1343, PR java/6336:
4954 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
4955 formatting. Changed return type.
4956 (anonymous_class_counter): Moved to top of file.
4957 (maybe_make_nested_class_name): Append number to class name for
4958 function-local classes.
4959
4960 2002-05-28 Zack Weinberg <zack@codesourcery.com>
4961
4962 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
4963 * Make-lang.in: Update dependency lists.
4964
4965 2002-05-18 Mark Mitchell <mark@codesourcery.com>
4966
4967 * gjavah.c (throwable_p): Do not free the name of the class after
4968 passing it to find_class.
4969 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
4970 * jcf-io.c (dirent.h): Include it.
4971 (fnmatch.h): Likewise.
4972 (compare_path): New function.
4973 (java_or_class_file): Likewise.
4974 (memoized_dirlist_entry): New type.
4975 (memoized_dirlist_lookup_eq): New function.
4976 (memoized_dirlists): New variable.
4977 (caching_stat): New function.
4978 (memoized_class_lookup_eq): New function.
4979 (memoized_class_lookups): Likewise.
4980 (find_class): Use memoized_class_lookups and caching_stat.
4981 * jcf.h (JCF_USE_SCANDIR): Define.
4982 * parse.y (java_expand_classes): Write the class files in reverse
4983 order.
4984
4985 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4986
4987 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
4988
4989 2002-05-13 Mark Mitchell <mark@codesourcery.com>
4990
4991 * jcf-write.c (write_classfile): Unlink the temporary file if it
4992 cannot be renamed. Use concat to build up the name of the
4993 temporary file.
4994
4995 2002-05-08 Mark Mitchell <mark@codesourcery.com>
4996
4997 * jcf-write.c (write_classfile): Write the file to a
4998 temporary file and then rename it.
4999
5000 2002-05-07 Tom Tromey <tromey@redhat.com>
5001
5002 * gjavah.c (throwable_p): Use xstrdup, not strdup.
5003
5004 Fix for PR java/1200:
5005 * gjavah.c (throwable_p): New function.
5006 (decode_signature_piece): Use it. A `WeakReference' isn't the
5007 same as a `jweak'.
5008 Include hashtab.h.
5009 (gcjh_streq): New function.
5010
5011 2002-05-07 Andreas Jaeger <aj@suse.de>
5012
5013 * parse.y (finish_for_loop): Fix if statement.
5014
5015 2002-05-06 Tom Tromey <tromey@redhat.com>
5016
5017 Fix for PR java/5941:
5018 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
5019 loop update expression.
5020 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
5021 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
5022
5023 2002-05-04 Mark Wielaard <mark@klomp.org>
5024
5025 For PR java/6519:
5026 * parse.y (build_string_concatenation): Return just op1 only when op2
5027 is null and op1 is a STRING_CST, otherwise always construct a
5028 StringBuffer.
5029
5030 2002-04-27 Tom Tromey <tromey@redhat.com>
5031
5032 For PR java/6382:
5033 * parse.y (string_convert_int_cst): New function.
5034 (merge_string_cste): Use it.
5035
5036 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
5037
5038 * java-tree.h (java_parse_file): Update.
5039 (java_set_yydebug): Remove.
5040 * jcf-parse.c (yydebug): Remove.
5041 (java_set_yydebug): Die.
5042 (java_parse_file): Update.
5043 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5044
5045 2002-04-24 Tom Tromey <tromey@redhat.com>
5046
5047 For PR java/6425:
5048 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
5049 EXPR_WFL_QUALIFICATION of qual_wfl.
5050
5051 2002-04-23 Per Bothner <per@bothner.com>
5052
5053 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
5054 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
5055 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
5056
5057 2002-04-23 Tom Tromey <tromey@redhat.com>
5058
5059 For PR java/6314:
5060 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
5061 recognize `-fcompile-resource='.
5062 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
5063 a bit.
5064
5065 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
5066
5067 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
5068 paths. Fixes PR java/2791.
5069
5070 2002-04-19 Andrew Haley <aph@redhat.com>
5071
5072 * jcf-write.c (push_long_const): lo, hi: New variables.
5073 Use rshift_double to extract the high part of a 64-bit long.
5074 Use WORD_TO_INT to extract the low part.
5075
5076 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
5077 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
5078 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
5079
5080 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
5081
5082 * typeck.c (incomplete_type_error): Remove.
5083
5084 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5085
5086 * class.c (make_class_data): Set DECL_ALIGN on static class data,
5087 for hash synchronization.
5088 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
5089 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
5090 class_type_node.
5091
5092 2002-04-16 Mark Wielaard <mark@klomp.org>
5093
5094 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
5095 negative zero.
5096
5097 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5098
5099 Fix for PR java/6294:
5100 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
5101 interfaces.
5102
5103 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5104
5105 Fix for PR java/6085:
5106 * parse.y (patch_method_invocation): Always use build_access_to_thisn
5107 to get enclosing "this" argument for inner-class constructor
5108 invocation. Pass correct arguments to build_access_to_thisn.
5109
5110 2002-04-10 Andreas Jaeger <aj@suse.de>
5111
5112 * gcj.texi (Input Options): Fix extdirs patch.
5113
5114 2002-04-10 Anthony Green <green@redhat.com>
5115
5116 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
5117
5118 2002-04-09 Anthony Green <green@redhat.com>
5119
5120 * gcj.texi (Input Options): Add --extdirs documentation.
5121 * jcf-dump.c (OPT_extdirs): New macro.
5122 (options): Add extdirs option.
5123 (help): Describe --extdirs.
5124 (main): Handle OPT_extdirs.
5125 * gjavah.c (OPT_extdirs): New macro.
5126 (options): Add extdirs option.
5127 (help): Describe --extdirs.
5128 (main): Handle OPT_extdirs.
5129 * jcf-path.c (jcf_path_init): Add extdirs support.
5130 (jcf_path_extdirs_arg): New function.
5131 (extensions): New variable to hold extensions path entries.
5132 * jvspec.c: Remove -fextdirs= when compiling main().
5133 * lang.c (java_decode_option): Handle -fextdirs=.
5134 * jcf.h (jcf_path_extdirs_arg): Declare new function.
5135 * Make-lang.in: Compile jcf-path with version info for use in
5136 identifying the appropriate libgcj.jar.
5137
5138 2002-04-08 Tom Tromey <tromey@redhat.com>
5139
5140 For PR libgcj/5303:
5141 * .cvsignore: Added rmic.1 and rmiregistry.1.
5142 * gcj.texi (Top): Link to new nodes.
5143 (Invoking rmic): New node.
5144 (Invoking rmiregistry): Likewise.
5145 * Make-lang.in (java.generated-manpages): Added rmic.1 and
5146 rmiregistry.1.
5147 (java.maintainer-clean): Likewise.
5148 ($(srcdir)/java/rmic.1): New target.
5149 ($(srcdir)/java/rmiregistry.1): Likewise.
5150 (java.install-man): Handle rmic.1 and rmiregistry.1.
5151
5152 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5153
5154 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
5155 Add note about handling uncaught exceptions. Add an exception handler
5156 to example.
5157
5158 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5159
5160 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
5161 after using it to patch CALL_EXPR.
5162
5163 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5164
5165 * gcj.texi (Invocation): Document CNI invocation API.
5166
5167 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
5168
5169 * expr.c (truthvalue_conversion): Rename. Update.
5170 (expand_compare): Update.
5171 * java-tree.h (java_truthvalue_conversion): New.
5172 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5173
5174 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
5175
5176 * java-tree.h (java_mark_addressable): New.
5177 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5178 * typeck.c (mark_addressable): Rename, update.
5179
5180 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
5181
5182 * expr.c (build_java_binop): Update.
5183 * java-tree.h (java_signed_type, java_unsigned_type,
5184 java_signed_or_unsigned_type): Update.
5185 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5186 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5187 * parse.y (patch_binop): Update.
5188 * typeck.c (signed_or_unsigned_type, unsigned_type,
5189 signed_type): Update.
5190
5191 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
5192
5193 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5194 (java_dummy_print): Remove.
5195 (lang_print_error): Rename. Exit early if inhibiting output.
5196 (inhibit_error_printing_function): New.
5197 (java_init): Don't set hook.
5198 (lang_init_source): Use new boolean.
5199
5200 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
5201
5202 * parse.y (do_resolve_class): Fix infinite recursion.
5203
5204 2002-03-29 Tom Tromey <tromey@redhat.com>
5205
5206 * parse.y (check_inner_circular_reference): Ignore incomplete
5207 types.
5208
5209 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
5210
5211 * Make-lang.in (builtins.o): Update.
5212 * boehm.c (get_boehm_type_descriptor): Update.
5213 * builtins.c: Include langhooks.h.
5214 * decl.c (java_init_decl_processing): Update.
5215 * java-tree.h (java_type_for_mode, java_type_for_size): New.
5216 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
5217 Redefine.
5218 * typeck.c (type_for_mode, type_for_size): Update.
5219
5220 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
5221
5222 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
5223
5224 2002-03-28 Tom Tromey <tromey@redhat.com>
5225
5226 * except.c (expand_end_java_handler): If the handler type is NULL,
5227 use java.lang.Throwable. Fixes PR java/5986.
5228
5229 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
5230
5231 Fix for PR java/4715:
5232 * jcf-parse.c (parse_source_file_3): New function.
5233 (read_class): Call it.
5234 (java_parse_file): Likewise.
5235
5236 2002-03-28 Jan Hubicka <jh@suse.cz>
5237
5238 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
5239
5240 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5241
5242 * parse.y (resolve_package): Initialize "decl".
5243 (lookup_package_type): Remove unused function.
5244
5245 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5246
5247 Fix for PR java/5993:
5248 * parse.y (resolve_package): Return the decl if resolution was
5249 successful. Don't special case "java.lang" and "java.lang.reflect"
5250 packages. Set type_name to the merged identifier.
5251 (resolved_qualified_expression_name): Print error using "name" if
5252 resolve_package returns NULL_TREE.
5253
5254 2002-03-27 Tom Tromey <tromey@redhat.com>
5255
5256 * expr.c (expand_invoke): Don't generate null pointer check if
5257 we're calling <init>.
5258
5259 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
5260
5261 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
5262 fix prototype.
5263 * java-tree.h (java_lang_expand_expr): Similarly.
5264 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5265 (java_init): Don't set hook.
5266
5267 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5268
5269 Fix for PR java/5850:
5270 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
5271 context if field was not found in the current scope.
5272 * expr.c (lookup_field): Don't look in enclosing contexts.
5273
5274 2002-03-26 Tom Tromey <tromey@redhat.com>
5275
5276 Fix for PR java/5942:
5277 * parse.y (init_src_parse): Added sanity check.
5278 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
5279 elements, not 11.
5280
5281 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
5282
5283 * decl.c (lang_mark_tree): Rename java_mark_tree.
5284 * java-tree.h (java_mark_tree): New.
5285 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5286
5287 2002-03-25 Zack Weinberg <zack@codesourcery.com>
5288
5289 * lex.c: Change java_perform_atof to take normal parameters
5290 instead of a pointer to a parameter block. Call it directly
5291 from java_lex.
5292
5293 2002-03-22 Mark Wielaard <mark@klomp.org>
5294
5295 Fix for PR java/5368:
5296 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
5297 when printing error message.
5298
5299 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
5300
5301 * decl.c (maybe_build_cleanup): Remove.
5302
5303 2002-03-22 Tom Tromey <tromey@redhat.com>
5304
5305 Andrew Haley <aph@cambridge.redhat.com>
5306
5307 * expr.c (build_field_ref): Don't build a check if the field is a
5308 member of `this'.
5309
5310 2002-03-21 Eric Blake <ebb9@email.byu.edu>
5311
5312 Fix for PR java/6026:
5313 * lex.c (java_lex): Fix parsing of consecutive floats.
5314
5315 2002-03-21 Tom Tromey <tromey@redhat.com>
5316
5317 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
5318 class.
5319
5320 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
5321
5322 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5323 insert_block, getdecls, kept_level_p, global_bindings_p): New.
5324
5325 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5326
5327 * gcj.texi: @code{gcj} becomes @command{gcj}.
5328 @code{gcc} becomes @command{gcc}.
5329 GcjRaw changed to gnu.gcc.RawData.
5330
5331 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
5332
5333 * decl.c (start_java_method): Use new hook.
5334 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5335 (java_init): Remove old hook.
5336
5337 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
5338
5339 * builtins.c (define_builtin): Do nothing if `type' is null.
5340 Fixes PR java/5876.
5341
5342 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5343
5344 * parse.y (parser_check_super_interface): Fix error message
5345 grammar/order.
5346
5347 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5348
5349 * jcf-parse.c (get_constant): Delete unused variables.
5350
5351 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
5352
5353 * java-tree.h (java_parse_file): New.
5354 * jcf-parse.c (yyparse): Rename java_parse_file.
5355 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5356
5357 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5358
5359 * parse.y (craft_constructor): Return the constructor decl.
5360 (java_expand_classes): Update comments.
5361 (lookup_method_invoke): Call fix_constructors immediately for
5362 anonymous class. Fixes PR java/5935.
5363
5364 2002-03-15 Anthony Green <green@redhat.com>
5365
5366 * jcf-parse.c (yyparse): Don't emit class registration
5367 constructor when compiling resource files.
5368
5369 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5370
5371 * lang.c (java_tree_code_type, java_tree_code_length,
5372 tree_code_name): Delete.
5373 (tree_code_type, tree_code_length, tree_code_name): Define.
5374 (java_init): Don't try to copy into the various tree_code
5375 arrays.
5376
5377 2002-03-12 Tom Tromey <tromey@redhat.com>
5378
5379 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
5380 UTF-8, not UCS-2. Fixes PR java/5923.
5381
5382 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
5383 a call_expr wrapped in a convert. Fixes PR java/5848.
5384
5385 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5386
5387 * jcf-write.c (write_classfile): Improve error strings.
5388
5389 2002-03-11 Eric Blake <ebb9@email.byu.edu>
5390
5391 * lex.c: Adjust comments to GNU standards.
5392
5393 2002-03-11 Eric Blake <ebb9@email.byu.edu>
5394
5395 Fix for PR java/5902:
5396 * lex.c (java_lex): Fix parsing of literals.
5397
5398 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5399
5400 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
5401 to prevent it getting evaluated twice in the store checking case.
5402 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
5403 examining OBJECT.
5404
5405 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5406
5407 * decl.c (java_init_decl_processing): Make sure class_type_node
5408 alignment is not less than 64 bits if hash synchronization is enabled.
5409
5410 2002-03-08 Per Bothner <per@bothner.com>
5411
5412 * parse.y (java_complete_lhs): Check if patch_assignment
5413 returned an error-mark.
5414
5415 * parse.y (try_builtin_assignconv): Don't special-case zero.
5416
5417 2002-03-08 Per Bothner <per@bothner.com>
5418
5419 Fix for PR java/5812.
5420 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
5421 here instead of in JSR macro. Likewise with load_type_state call.
5422 Do the latter on if the return_pc has been verified (the jsr returns).
5423 (JSR): Now just call build_java_jsr.
5424
5425 2002-03-07 Jeff Sturm <jsturm@one-point.com>
5426
5427 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
5428 (java.install-common): Link native driver to
5429 JAVA_TARGET_INSTALL_NAME.
5430
5431 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
5432
5433 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
5434 * builtins.c(sin_builtin): Likewise
5435 * builtins.c(sqrt_builtin): Likewise
5436
5437 2002-03-03 Zack Weinberg <zack@codesourcery.com>
5438
5439 * java/expr.c, java/jcf-parse.c, java/lex.c:
5440 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
5441 REAL_ARITHMETIC blocks unconditional. Delete some further
5442 #ifdef blocks predicated on REAL_ARITHMETIC.
5443
5444 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5445
5446 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
5447 explicit sizeof/sizeof.
5448 * decl.c (java_init_decl_processing): Likewise.
5449 * jcf-parse.c (init_jcf_parse): Likewise.
5450 * parse.y (init_src_parse): Likewise.
5451
5452 2002-03-02 Per Bothner <per@bothner.com>
5453
5454 Make --CLASSPATH by a synonym for --classpath and -classpath.
5455 Implement --bootclasspath.
5456 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
5457 (classpath_l): Remove.
5458 (jcf_path_CLASSPATH_arg): Remove.
5459 (jcf_path_bootclasspath_arg): New function.
5460 (jcf_path_seal): Simplify accordingly.
5461
5462 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
5463 (jcf_path_CLASSPATH): Remove declaration.
5464 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
5465 (lang_specific_driver): Translate -bootclasspath.
5466 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
5467 * lang.c (decode_lang_options): Do jcf_path_init first.
5468 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
5469 * gjavah.c: Also handle --bootclasspath.
5470 Handle --CLASSPATH as a synonum for --classpath.
5471 * jcf-dump.c: Likewise.
5472
5473 "." is not part of system path, but is the default for --classpath.
5474 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
5475 (jcf_path_seal): Add "." if no CLASSPATH specified.
5476
5477 * gcj.texi: Document changes.
5478
5479 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5480
5481 * expr.c (build_java_arraystore_check): Fix formatting.
5482
5483 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
5484
5485 Fix for PR java/5758, java/5632:
5486 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
5487 inner-class separator too.
5488 * parse.y (do_resolve_class): New local `decl_result.'
5489 Progressively build a name for what can have been loaded.
5490
5491 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5492
5493 * expr.c (java_array_data_offset): Removed function.
5494 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
5495 (build_java_array_length_access): Obtain "length" value using a
5496 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
5497 (build_java_arrayaccess): Correct comment. Access "data" using a
5498 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
5499 (build_java_arraystore_check): New function.
5500 (expand_java_arraystore): Use build_java_arraystore_check.
5501 * parse.y (patch_assignment): Simplify code to insert a store check
5502 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
5503 * check-init.c (check_init): Update to reflect that an array length
5504 access is now a COMPONENT_REF.
5505 * gcj.texi (Code Generation): Improve documentation of
5506 -fno-bounds-check. Add documentation for -fno-store-check.
5507 * java-tree.h (flag_store_check): Declare.
5508 (build_java_arraystore_check): Declare.
5509 * lang.c (flag_store_check): Initialize to 1.
5510 (lang_f_options): Add store-check option.
5511 * jvspec.c: Don't pass store-check option to jvgenmain.
5512 * lang-options.h: Add help string for -fno-store-check.
5513
5514 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
5515
5516 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
5517 * java-tree.h (java_dup_lang_specific_decl): New.
5518 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5519
5520 2002-02-27 Zack Weinberg <zack@codesourcery.com>
5521
5522 * builtins.c, decl.c: Delete traditional-mode-related code
5523 copied from the C front end but not used, or used only to
5524 permit the compiler to link.
5525
5526 2002-02-22 Tom Tromey <tromey@redhat.com>
5527
5528 Fix for PR java/2369:
5529 * jvspec.c (verify_class_name): New function.
5530 (lang_specific_driver): Call it.
5531 (JAVA_START_CHAR_P): New macro.
5532 (JAVA_PART_CHAR_P): Likewise.
5533
5534 2002-02-22 Per Bothner <per@bothner.com>
5535
5536 * class.c: Change vtable to be more compatible with g++ v3 abi.
5537 (get_dispatch_table): Prepend offset-to-top (always 0) and
5538 type_info pointer (currently unimplemented hence NULL) to vtable.
5539 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
5540 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
5541 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
5542 (build_dtable_decl): Add declarations for new fields.
5543
5544 2002-02-20 Per Bothner <per@bothner.com>
5545
5546 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
5547 to finit$ (otherwise generate_bytecode_insns drops it). However, we
5548 don't need to set it on the COMPOUND_EXPR - the caller does that.
5549
5550 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5551
5552 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
5553 `--CLASSPATH' becomes `--classpath.'
5554 * gjavah.c: Likewise.
5555 * jcf-dump.c: Likewise.
5556 * lang-options.h: Likewise.
5557 * lang.c: Likewise.
5558 * jcf-path.c: Updated comment.
5559 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
5560 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
5561 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
5562 (jcf_path_CLASSPATH_arg): Ditto.
5563 (classpath_u): Updated leading comment.
5564
5565 2002-02-20 Per Bothner <per@bothner.com>
5566
5567 * builtins.c (check_for_builtin): New function.
5568 (build_call_or_builtin): Remove.
5569 * java-tree.h: Update accordingly.
5570 * expr.c (expand_invoke): Use build + check_for_builtin instead
5571 of build_call_or_builtin.
5572 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
5573 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
5574 flag (which had caused jcf-write to incorrectly emit invokevirtual).
5575
5576 2002-02-17 Tom Tromey <tromey@redhat.com>
5577
5578 * java-tree.h (TYPE_STRICTFP): New macro.
5579 (struct lang_type) [strictfp]: New field.
5580 (CLASS_STRICTFP): New macro.
5581 (METHOD_STRICTFP): New macro.
5582 (struct lang_decl) [strictfp]: New field.
5583 * parse.y (method_header): Disallow strictfp constructor or
5584 abstract method.
5585 (STRICT_TK): Move before MODIFIER_TK.
5586 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
5587 (METHOD_MODIFIERS): Likewise.
5588 (INTERFACE_MODIFIERS): Likewise.
5589 * jcf-write.c (get_access_flags): Likewise.
5590 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
5591 (add_method_1): Likewise.
5592 (get_access_flags_from_decl): Likewise.
5593 * jcf-dump.c (print_access_flags): Print in standard order. Also,
5594 recognize strictfp flag.
5595 * jcf.h (ACC_STRICT): New define.
5596
5597 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
5598
5599 * class.c(build_utf8_ref): Move declaration of decl_size
5600
5601 2002-02-07 Tom Tromey <tromey@redhat.com>
5602
5603 * gcj.texi (Input Options): --CLASSPATH does not suppress system
5604 path.
5605
5606 2002-02-04 Anthony Green <green@redhat.com>
5607
5608 * class.c (build_utf8_ref): Put UTF-8 constants into merged
5609 sections if available.
5610
5611 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5612
5613 * parse.y (java_expand_classes): Fix typo in static field loop.
5614
5615 2002-02-02 Richard Henderson <rth@redhat.com>
5616
5617 * class.c (add_field): Mark static fields external.
5618 (build_class_ref): Remove redundant set.
5619 * parse.y (java_expand_classes): Mark static fields of classes
5620 to be compiled as local.
5621 * jcf-parse.c (parse_class_file): Likewise.
5622
5623 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
5624
5625 * gcj.texi (About CNI): New node.
5626
5627 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
5628
5629 PR java/5080
5630 * jcf-parse.c : Check for HAVE_LOCALE_H before using
5631 setlocale() with LC_CTYPE as a parameter.
5632 * jv-scan.c: Same.
5633
5634 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
5635
5636 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5637 Follow GNU Coding Standards for --version.
5638
5639 2002-01-28 Tom Tromey <tromey@redhat.com>
5640
5641 * expr.c (build_jni_stub): Ensure storage for `meth' is
5642 generated.
5643 * parse.y (java_complete_expand_methods): Set
5644 current_function_decl before building JNI stub.
5645
5646 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
5647
5648 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
5649 BUILT_IN_SQRTF.
5650
5651 2002-01-22 Tom Tromey <tromey@redhat.com>
5652
5653 * decl.c (java_init_decl_processing): Use add_predefined_file.
5654 Predefine RawData.java.
5655 (predef_filenames): Removed.
5656 (java_init_decl_processing): Don't register predef_filenames.
5657 * jcf-parse.c (add_predefined_file): New function.
5658 (predefined_filename_p): Rewrote.
5659 (predefined_filename_p): No longer static.
5660 * decl.c (java_init_decl_processing): Call initialize_builtins.
5661 * Make-lang.in (JAVA_OBJS): Added builtins.o.
5662 (java/builtins.o): New target.
5663 * builtins.c: New file.
5664 * parse.y (patch_invoke): Use build_call_or_builtin.
5665 * java-tree.h (build_call_or_builtin): Declare.
5666 (initialize_builtins): Declare.
5667 (java_set_exception_lang_code): Removed unused declaration.
5668 (PREDEF_FILENAMES_SIZE): Removed.
5669 (java_tree_index): Added JTI_PREDEF_FILENAMES.
5670 (predef_filenames): New define.
5671 (add_predefined_file): Declare.
5672 (predefined_filename_p): Declare.
5673 * expr.c (expand_invoke): Use build_call_or_builtin.
5674
5675 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5676
5677 * parse.y (patch_switch_statement): Fix format specifier.
5678
5679 2002-01-16 Tom Tromey <tromey@redhat.com>
5680
5681 More for PR java/5365:
5682 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
5683 default.
5684 (process_file): Generate include for
5685 java.lang.UnsupportedOperationExceptions.
5686
5687 2002-01-15 Andreas Jaeger <aj@suse.de>
5688
5689 * .cvsignore: Add man pages.
5690
5691 2002-01-15 Tom Tromey <tromey@redhat.com>
5692
5693 Fix for PR java/5365:
5694 * gjavah.c (process_file): Turn class name into a file name.
5695
5696 2002-01-14 Matthias Klose <doko@debian.org>
5697
5698 * gcj.texi: Fix whitespace and formatting errors in the
5699 synopsis of the man pages. Update copyright.
5700
5701 2002-01-14 Tom Tromey <tromey@redhat.com>
5702
5703 For PR libgcj/5303:
5704 * Make-lang.in (java.install-man): Handle jv-convert man page.
5705 (java.generated-manpages): Added jv-convert.1.
5706 (java.uninstall): Remove jv-convert.1.
5707 (java.maintainer-clean): Likewise.
5708 ($(srcdir)/java/jv-convert.1): New target.
5709 * gcj.texi (Top): Link to jv-convert node.
5710 (Individual utilities): Likewise.
5711 (Invoking jv-convert): New node.
5712
5713 2001-01-10 Jeff Sturm <jsturm@one-point.com>
5714 Martin Kahlert <martin.kahlert@infineon.com>
5715
5716 * jcf-parse.c (get_constant): Don't swap lo/hi for big
5717 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
5718
5719 2002-01-03 Graham Stott <grahams@redhat.com>
5720
5721 * class.c (compile_resource_file): Update copyright date.
5722 Constify filename parameter.
5723 (java-tree.h): Update copyright date.
5724 (compile_resource_file): Constify filename parameter.
5725
5726 2002-01-03 Graham Stott <grahams@redhat.com>
5727
5728 * gcc/jcf-parse.c: Update copyright date.
5729 (yyparse): Constify resource_filename.
5730
5731 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5732
5733 * parse.y (src_parse_roots): Don't needlessly zero init.
5734
5735 2001-12-31 Tom Tromey <tromey@redhat.com>
5736
5737 * parse.y (dump_java_tree): New function.
5738 (source_end_java_method): Call it.
5739 (end_class_declaration): Likewise.
5740 * lang.c (java_decode_option): Call dump_switch_p.
5741
5742 2001-12-28 Tom Tromey <tromey@redhat.com>
5743
5744 * gen-table.pl: Don't process characters after \uffff. Added
5745 comment pointing to input file.
5746
5747 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5748
5749 * gen-table.pl: Const-ify output. Document the location of a
5750 suitable unicode input file.
5751
5752 * chartables.h: Regenerate.
5753
5754 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5755
5756 * chartables.h: Const-ify.
5757 * gjavah.c (options): Likewise.
5758 * jcf-dump.c (options): Likewise.
5759 * jv-scan.c (options): Likewise.
5760 * lex.c (java_start_char_p, java_part_char_p): Likewise.
5761 * parse.y (binop_lookup): Likewise.
5762
5763 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5764
5765 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
5766 the static arrays that are output.
5767 * jvspec.c (jvgenmain_spec): Make static.
5768 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
5769 * keyword.h: Regenerate.
5770 * lang.c (string_option, process_option_with_no, lang_f_options,
5771 lang_W_options): Const-ify.
5772 * lex.c (java_lex): Likewise.
5773
5774 2001-12-21 Richard Henderson <rth@redhat.com>
5775
5776 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
5777 (get_boehm_type_descriptor): ... here. Arrange for the
5778 TREE_TYPE to get set properly.
5779
5780 2001-12-21 Richard Henderson <rth@redhat.com>
5781
5782 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
5783 only if the target requires collect2.
5784
5785 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
5786
5787 2001-12-20 Tom Tromey <tromey@redhat.com>
5788
5789 For PR java/4509:
5790 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
5791 CAN_COMPLETE_NORMALLY for the node.
5792 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
5793 generate code for second branch if first branch can't complete
5794 normally.
5795 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
5796 the loop head if the loop body can't complete normally.
5797
5798 2001-12-20 Tom Tromey <tromey@redhat.com>
5799
5800 For PR java/4766:
5801 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
5802 case where `finally' clause can't complete normally.
5803
5804 2001-12-20 Tom Tromey <tromey@redhat.com>
5805
5806 Fixes PR java/5057:
5807 * parse.y (analyze_clinit_body): Added this_class parameter.
5808 Check for more cases where we must keep <clinit>.
5809 (maybe_yank_clinit): Cleaned up flow control.
5810
5811 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5812
5813 * decl.c (java_init_decl_processing): Don't initialize
5814 finit_leg_identifier_node.
5815 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
5816 (finit_leg_identifier_node): Remove.
5817 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
5818
5819 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5820
5821 * mangle.c (mangle_member_name): Don't special-case for
5822 NO_DOLLAR_IN_LABEL.
5823 * mangle_name.c (unicode_mangling_length): Likewise.
5824 (append_unicode_mangled_name): Likewise.
5825 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
5826 code.
5827
5828 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5829
5830 * expr.c (build_java_array_length_access): Don't force null pointer
5831 check unless flag_check_references is set.
5832
5833 2001-12-20 Tom Tromey <tromey@redhat.com>
5834
5835 Fix for PR java/3417:
5836 * parse.y (patch_assignment): Added special processing for
5837 `return'.
5838 (patch_return): Don't convert booleans to integers, and don't
5839 special-case `null'.
5840
5841 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
5842
5843 * config-lang.in (diff_excludes): Remove.
5844
5845 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
5846
5847 * gcj.texi: Update link to GCC manual.
5848
5849 2001-12-17 Tom Tromey <tromey@redhat.com>
5850
5851 * parse.y (link_nested_class_to_enclosing): Removed useless
5852 statement.
5853
5854 2001-12-16 Tom Tromey <tromey@redhat.com>
5855
5856 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
5857 Fixes PR java/5088.
5858
5859 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
5860
5861 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
5862 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
5863 spelling errors.
5864
5865 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5866
5867 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
5868
5869 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5870
5871 * decl.c (java_init_decl_processing): Build otable_type correctly.
5872 otable_decl is an otable_type.
5873
5874 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5875
5876 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
5877 otable_type, otable_ptr_type, method_symbol_type,
5878 method_symbols_array_type, method_symbols_array_ptr_type): New
5879 field/global tree definitions.
5880 (flag_indirect_dispatch): New flag.
5881 * decl.c (java_init_decl_processing): Initialize new otable and
5882 otable_syms type nodes and decls. Add new field "index" to
5883 method_type_node.
5884 * class.c (build_method_symbols_entry): New function.
5885 (make_method_value): Set "index" to to method's vtable index for
5886 virtual methods when indirect-dispatch is not used.
5887 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
5888 and set vtable_method_count to -1. Set otable and otable_syms field
5889 if indirect-dispatch is used and there was something to put in them.
5890 (build_method_symbols_entry): New function.
5891 (emit_offset_symbol_table): New function.
5892 * expr.c (get_offset_table_index): New function.
5893 (build_invokevirtual): Build array reference to otable at the index
5894 returned by get_offset_table_index, and use the result as the vtable
5895 offset.
5896 (build_invokeinterface): Similar.
5897 * jcf-parse.c (yyparse): If indirect-dispatch, call
5898 emit_offset_symbol_table at the end of compilation, after all classes
5899 have been generated.
5900 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
5901 * lang.c (flag_indirect_dispatch): Define.
5902 (lang_f_options): Add indirect-dispatch flag.
5903
5904 2001-12-14 Matthias Klose <doko@debian.org>
5905
5906 * gcj.texi: Markup for man page generation. Document missing
5907 options printed by <tool> --help.
5908 Terminate description of gij's -ms option with a dot.
5909 * Make-lang.in ($(srcdir)/java/*.1): New targets.
5910 (java.generated-manpages java.install-man, java.uninstall,
5911 java-maintainer-clean) Updated.
5912
5913 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
5914
5915 * class.c (get_dispatch_table): Fix java vtable layout
5916 for TARGET_VTABLE_USES_DESCRIPTORS.
5917 * decl.c (java_init_decl_processing): Initialize
5918 alloc_no_finalizer_node, finalize_identifier_node.
5919 * expr.c (class_has_finalize_method): New function.
5920 (expand_java_NEW): Generate calls for finalizer-free allocation.
5921 (build_invokevirtual): Fix java vtable layout for
5922 TARGET_VTABLE_USES_DESCRIPTORS.
5923 * java-tree.h (enum java_tree_index): New entries:
5924 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
5925 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
5926 (class_has_finalize_method): declare.
5927 (HAS_FINALIZER_P): New macro.
5928 * parse.y (patch_invoke): Generate calls for finalizer-free
5929 allocation.
5930
5931 2001-12-12 Matthias Klose <doko@debian.org>
5932
5933 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
5934 whitespace at end of line.
5935
5936 2001-12-11 Tom Tromey <tromey@redhat.com>
5937
5938 * lex.c (java_init_lex): Define wfl_to_string as
5939 gnu.gcj.runtime.StringBuffer unless generating bytecode.
5940
5941 2001-12-11 Jeff Sturm <jsturm@one-point.com>
5942
5943 * class.c (make_method_value): Use null_pointer_node to
5944 represent empty exception table.
5945
5946 2001-12-10 Tom Tromey <tromey@redhat.com>
5947
5948 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
5949
5950 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
5951
5952 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
5953
5954 2001-12-09 Per Bothner <per@bothner.com>
5955
5956 * check-init.c (current_switch_has_default): New static field.
5957 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
5958 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
5959 DEFAULT_EXPR seen, simulate a default alternative that copies state.
5960
5961 2001-12-09 Tom Tromey <tromey@redhat.com>
5962
5963 * check-init.c (check_init): Don't allow pre- or post- increment
5964 or decrement of final variable.
5965 (final_assign_error): Minor error message rewording.
5966
5967 2001-12-08 Tom Tromey <tromey@redhat.com>
5968
5969 * java-tree.h: Fixed typo.
5970
5971 * gjavah.c (decompile_method): Don't decompile to `return this'
5972 for static methods.
5973
5974 * gjavah.c (cxx_keywords): Re-sorted.
5975 * lex.c (cxx_keywords): Re-sorted.
5976
5977 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
5978 else.
5979
5980 * gjavah.c (print_namelet): Clear subnamelets.
5981 (HANDLE_METHOD): Set `method_printed' earlier.
5982
5983 2001-12-07 Tom Tromey <tromey@redhat.com>
5984
5985 * lang.c (lang_f_options): Added
5986 optimize-static-class-initialization.
5987 (java_decode_option): Removed special case.
5988
5989 2001-12-07 Per Bothner <per@bothner.com>
5990
5991 * check-init.c (check_init): Fix typo freeing memory twice.
5992
5993 2001-12-05 Per Bothner <per@bothner.com>
5994
5995 Restore support for static class initialization optimization.
5996 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
5997 * check-init.c (check_int): At end of BLOCK handle initialization
5998 blocks, which used to be done in java_complete_expand_method but did
5999 not handle the case where check_for_initialization might allocate
6000 more than a word of bits.
6001 * decl.c (lang_make_tree): The smic field is now a tree.
6002 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
6003 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
6004
6005 * parse.y (emit_test_initialization): Combine hash_lookup calls.
6006
6007 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
6008 Change from a hash table to a list.
6009 (struct_lang_decl): Change field 'smic' to match.
6010 * class.c (add_method_1): Initialize
6011 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
6012 * parse.y (adjust_init_test_initialization): Removed - inlined into -
6013 (java_expand_method_bodies): -here, since 'smic' is now a list.
6014 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
6015
6016 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
6017
6018 * class.c (java_hash_compare_tree_node): Fix casts.
6019
6020 2001-12-04 Per Bothner <per@bothner.com>
6021
6022 * check-init.c: Handle definite unassignment to finals in addition
6023 to definite assignment.
6024 (loop_current_locals): New field.
6025 (num_current_locals, int start_current_locals, num_current_words):
6026 Make static.
6027 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
6028 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
6029 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
6030 (get_variable_decl, check_final_reassigned): New functions.
6031 (check_init, check_bool_init): Modify as needed for checking finals.
6032 (check_for_initialization): Take extra parameter and return void.
6033 Do extra start-up logic to check final fields for assignment.
6034 * parse.y (check_static_final_variable_assignment_flag,
6035 reset_static_final_variable_assignment_flag, check_final_assignment,
6036 check_final_variable_local_assignment_flag,
6037 reset_final_variable_indirect_assignment_flag,
6038 reset_final_variable_global_assignment_flag): Remove functions.
6039 (java_complete_expand_methods, outer_field_access_fix,
6040 patch_assignment): Remove no-longer used logic.
6041 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
6042 * parse.y (register_fields, java_complete_tree): Update accordingly.
6043
6044 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
6045 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
6046 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
6047
6048 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
6049
6050 * java-tree.h (DECL FINAL): New bit-field.
6051 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
6052 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
6053 (DECL_INIT_CALLS_THIS): New macro.
6054 (struct lang_decl): New bit-field init_calls_this.
6055 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
6056 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
6057 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
6058 use it for both local variables and final fields.
6059 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
6060 and local_final.
6061 (struct lang_type): Remove hfv bit-field.
6062 (check_for_initialization): Change to return void.
6063
6064 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
6065 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
6066 * check-init.c (final_assign_error): New helper function.
6067 (check_final_reassigned, check_init): Use it.
6068 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
6069
6070 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
6071 bit-fields to unsigned.
6072
6073 2001-12-03 Per Bothner <per@bothner.com>
6074
6075 * parse.y (patch_binop): Minor constant folding.
6076
6077 * parse.y (build_current_thisn): Shorter 'buffer'.
6078
6079 2001-12-03 Per Bothner <per@bothner.com>
6080
6081 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
6082 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
6083 * jcf-write.c (generate_bytecode_insns): Remove support for
6084 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
6085 * check-init.c (check_init): Likewise.
6086
6087 2001-12-03 Per Bothner <per@bothner.com>
6088
6089 * verify.c (subroutine_nesting): New function.
6090 (verify_jvm_instructions): Use it to fix logic for checking that
6091 we're done with the current subroutine.
6092
6093 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
6094 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
6095
6096 2001-12-03 Per Bothner <per@bothner.com>
6097
6098 * jcf.h: Fix obvious typo in comment.
6099 * typeck.c (build_null_signature): Add comment.
6100
6101 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
6102
6103 * expr.c: Remove leading capital from diagnostic messages, as
6104 per GNU coding standards.
6105 * jcf-io.c: Similarly.
6106 * jcf-parse.c: Similarly.
6107 * jv-scan.c: Similarly.
6108 * jvspec.c: Similarly.
6109 * mangle.c: Similarly.
6110
6111 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
6112 Alexandre Petit-Bianco <apbianco@redhat.com>
6113
6114 * expr.c (build_java_arrayaccess): Call save_expr on array for
6115 correct evaluation order, modified comment, fixed indentation.
6116 * parse.y: (patch_assignment): Correctly extract the array base
6117 from the tree generate by build_java_arrayaccess, added comments.
6118 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
6119 Fixes PR java/3096, PR java/3803, PR java/3965.
6120
6121 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
6122
6123 * expr.c (expand_byte_code): Remove trailing periods from messages.
6124 * jcf-parse.c (load_class, jcf_parse): Similarly.
6125 * jcf-write.c (generate_classfile): Similarly.
6126 * lex.c (java_lex): Similarly.
6127
6128 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6129
6130 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
6131
6132 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
6133
6134 * Make-lang.in (java.generated-manpages): New dummy target.
6135
6136 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6137
6138 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6139 ASM_FINAL_SPEC.
6140 (lang_specific_pre_link): Use set_input to set input_filename.
6141 Append `main' here.
6142 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6143 (main): Fix definition.
6144 Strip `main' from classname.
6145 Fixes PR java/227.
6146
6147 2001-11-18 Roger Sayle <roger@eyesopen.com>
6148
6149 * parse.h (java_expand_switch): Remove old prototype.
6150
6151 2001-11-18 Tom Tromey <tromey@redhat.com>
6152
6153 Fix for PR java/1401:
6154 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
6155 arg0 is null.
6156 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
6157 correctly.
6158
6159 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
6160
6161 * lang.c (finish_parse): Rename to java_finish.
6162 (LANG_HOOKS_FINISH, java_finish): New.
6163
6164 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
6165
6166 * decl.c (init_decl_processing): Rename java_init_decl_processing.
6167 * java-tree.h: New prototype.
6168 * lang.c (java_init): Update prototype. Combine with old init_parse.
6169
6170 2001-11-13 Tom Tromey <tromey@redhat.com>
6171
6172 * gjavah.c (method_signature): New global.
6173 (HANDLE_METHOD): Set it.
6174 (decompile_return_statement): New function.
6175 (decompile_method): Use it.
6176 (print_method_info): Removed `synth' argument.
6177
6178 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
6179
6180 * java-tree.h (java_set_yydebug): New.
6181 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
6182 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
6183 (print_lang_decl, print_lang_type, print_lang_identifier,
6184 print_lang_statistics, lang_print_xnode): Remove.
6185
6186 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
6187
6188 * jcf-parse.c (init_lex): Remove.
6189 * lang.c (language_string, lang_identify): Remove.
6190 (struct lang_hooks): Constify.
6191 (LANG_HOOKS_NAME): Override.
6192 (init_parse): Update.
6193
6194 2001-11-08 Andreas Franck <afranck@gmx.de>
6195
6196 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
6197 program_transform_name the way suggested by autoconf.
6198 (java.install-common): Also transform auxiliary program names with
6199 program_transform_name.
6200
6201 2001-11-08 Tom Tromey <tromey@cygnus.com>
6202
6203 * parse.y (trap_overflow_corner_case): New rule.
6204 (unary_expression): Use it.
6205 * lex.c (java_init_lex): Don't set minus_seen.
6206 (yylex): Don't use minus_seen. Communicate overflow to parser for
6207 it to handle.
6208 (error_if_numeric_overflow): New function.
6209 * parse.h (minus_seen): Removed field.
6210 (JAVA_RADIX10_FLAG): New define.
6211
6212 2001-11-07 Tom Tromey <tromey@redhat.com>
6213
6214 Patch for PR java/1414:
6215 * parse.y (case_label_list): New global.
6216 (goal): Register case_label_list with GC.
6217 (java_complete_lhs): Save new case on case_label_list.
6218 (patch_switch_statement): Check for duplicate case labels.
6219
6220 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
6221
6222 * parse.y (patch_assignment): Removed unused third argument.
6223 (java_complete_lhs): Removed unused third argument to patch_assignment.
6224
6225 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
6226
6227 * lang.c: Include langhooks-def.h.
6228 * Make-lang.in: Update.
6229
6230 2001-10-31 Zack Weinberg <zack@codesourcery.com>
6231
6232 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6233
6234 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6235
6236 * mangle.c (find_compression_record_match): Don't match compression
6237 records for package name elements unless they occur at the start of
6238 the name. Fix for PR java/4717.
6239
6240 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6241
6242 * expr.c (expand_java_field_op): Don't special-case references to
6243 java.lang.PRIMTYPE.TYPE.
6244 (build_primtype_type_ref): Removed.
6245 * java-tree.h (build_primtype_type_ref): Remove prototype.
6246 * parse.y (maybe_build_primttype_type_ref): Removed.
6247 (complete_function_arguments): Don't special-case references to
6248 java.lang.PRIMTYPE.TYPE.
6249 (patch_assignment): Likewise.
6250 (array_constructor_check_entry): Likewise.
6251
6252 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
6253
6254 * mangle.c (static tree compression_table): Fixed leading comment.
6255 * parse.h (struct parser_ctxt): Fixed field comment.
6256 * parse.y (check_pkg_class_access): New prototype, fixed leading
6257 comment, new parameter used to emit error only if passed as true.
6258 (parse_check_super): Pass extra argument to check_pkg_class_access.
6259 (do_resolve_class): Likewise.
6260 (process_imports): Likewise.
6261 (read_import_dir): Fixed indentation.
6262 (find_in_imports_on_demand): New local class_type_name. Local
6263 node_to_use deleted. while loop changed into for loop. Report
6264 multiple definition only for accessible classes. Improved error
6265 message.
6266 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
6267 assigned to parameter list, fixed indentation. while loop changed
6268 into for loop, restore TREE_CHAIN on local `tem' before the next
6269 iteration.
6270
6271 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6272
6273 * lang.c (lang_get_alias_set): Deleted.
6274
6275 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6276
6277 * gjavah.c (jni_print_char): Fix thinko in last change.
6278
6279 * gjavah.c (jni_print_char, decode_signature_piece): Use
6280 safe-ctype macros and/or fold extra calls into fewer ones.
6281 * lex.c (java_read_unicode, java_lex): Likewise.
6282 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
6283 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
6284 * mangle_name.c (append_unicode_mangled_name,
6285 unicode_mangling_length): Likewise.
6286
6287 2001-10-17 Richard Henderson <rth@redhat.com>
6288
6289 * Make-lang.in (java/lang.o): Depend on langhooks.h.
6290
6291 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
6292
6293 * lang.c (langhooks.h): Included.
6294 (LANG_HOOKS_INIT): Redefined.
6295 (LANG_HOOKS_INIT_OPTIONS): Likewise.
6296 (LANG_HOOKS_DECODE_OPTION): Likewise.
6297 (struct lang_hooks lang_hooks): New initialization.
6298
6299 2001-10-11 Per Bothner <per@bothner.com>
6300
6301 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
6302 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
6303 The former is simpler, and jcf-write.c handles it better.
6304 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
6305 or WITH_CLEANUP_EXPR.
6306 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
6307 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
6308
6309 * parse.y (patch_if_else_statement): If the condition is constant,
6310 optimize away the test.
6311
6312 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6313
6314 * parse.y (patch_cast): Call patch_string on the first operand of
6315 the incoming node, update it if necessary. Fixes PR java/4510.
6316
6317 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6318
6319 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
6320 when name qualifier matches a package name.
6321
6322 2001-10-08 Tom Tromey <tromey@redhat.com>
6323
6324 Fix for PR java/4489:
6325 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
6326 force a new label when computing `body_block'.
6327
6328 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6329
6330 * jcf-io.c (format_uint): Const-ify.
6331 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
6332 * lex.c (java_get_line_col): Likewise.
6333 * parse.y (build_incdec): Likewise.
6334
6335 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6336
6337 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
6338 a NULL enclosing context if appropriate. Fixes PR java/4466.
6339
6340 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
6341
6342 * parse.y (patch_assignment): Use lvalue's original TYPE when
6343 building the final COMPOUND_EXPR.
6344 (try_reference_assignconv): Fixed leading comment.
6345
6346 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
6347
6348 * parse.y (check_final_variable_indirect_assignment): For
6349 COMPOUND_EXPR, return only if finals were found initialized
6350 properly, if not, keep on checking.
6351 (check_final_variable_global_assignment_flag): New local
6352 error_found, set when appropriate and used to decide whether to
6353 report uninitialized finals. Fixed typo in comment.
6354
6355 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
6356
6357 * decl.c (init_decl_processing): Fixed typo in predef_filenames
6358 last three initializations. Fixes PR java/4360.
6359
6360 2001-09-21 Richard Henderson <rth@redhat.com>
6361
6362 * class.c (get_dispatch_table): Handle function descriptors.
6363 (build_dtable_decl): Likewise.
6364 * expr.c (build_invokevirtual): Likewise.
6365
6366 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6367
6368 * parse.y (patch_method_invocation): Build class initialization
6369 when static finals are used to qualify method invocation.
6370 Fixes PR java/4366.
6371
6372 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
6373
6374 * parse.h: (WFL_STRIP_BRACKET): Re-written using
6375 build_type_name_from_array_name.
6376 (STRING_STRIP_BRACKETS): New macro.
6377 * parse.y (build_type_name_from_array_name): New function.
6378 (array_creation_expression:): Accumulate []s instead of [s.
6379 (cast_expression:): Accumulate []s instead of [s after cast type
6380 name.
6381 (build_array_from_name): Local string deleted, use
6382 build_type_name_from_array_name.
6383 (build_unresolved_array_type): Accumulate []s instead of [s after
6384 type name.
6385 (register_fields): Fixed comment.
6386 (resolve_class): Local name, base deleted, new locals tname and
6387 array_dims. Use build_type_name_from_array_name. Use array_dims to
6388 build array type.
6389 (purify_type_name): Use STRING_STRIP_BRACKETS.
6390
6391 2001-09-18 Andreas Jaeger <aj@suse.de>
6392
6393 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
6394 * jv-scan.c: Likewise.
6395
6396 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6397
6398 * parse.y (patch_method_invocation): Inner class creation context
6399 check not enforced within constructors. Fixes PR java/1873.
6400
6401 2001-09-16 Tom Tromey <tromey@redhat.com>
6402
6403 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
6404 NOTE_PUSH for single-case push. Fixes PR java/4189.
6405
6406 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6407
6408 * java-tree.h (TYPE_IMPORT_LIST): New macro.
6409 (TYPE_IMPORT_DEMAND_LIST): Likewise.
6410 (struct lang_type): New fields import_list and import_demand_list.
6411 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
6412 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
6413 (do_resolve_class): New local saved_enclosing_type, initialized,
6414 passed as parameter to find_in_imports and find_in_imports_on_demand.
6415 (find_in_imports): Added paramater enclosing_type, use its
6416 TYPE_IMPORT_LIST when applicable.
6417 (find_in_imports_on_demand): Added parameter enclosing_type, use
6418 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
6419 declaration and initialization.
6420 (fold_constant_for_init): Switch/restore current_class to the
6421 appropriate context.
6422
6423 2001-09-13 Mark Mitchell <mark@codesourcery.com>
6424
6425 * verify.c (verify_jvm_instructions): Fix typo.
6426
6427 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6428
6429 * expr.c (expand_invoke): Const-ification.
6430 * parse.y (patch_method_invocation): Likewise.
6431
6432 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6433
6434 * gjavah.c (cxx_keywords): Const-ification.
6435 * keyword.gperf (java_keyword): Likewise.
6436 * lang.c (java_tree_code_name): Likewise.
6437 * lex.c (cxx_keywords): Likewise.
6438 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
6439
6440 2001-09-11 Richard Henderson <rth@redhat.com>
6441
6442 * parse.h (ctxp_for_generation): Mark extern.
6443
6444 2001-09-10 Richard Henderson <rth@redhat.com>
6445
6446 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
6447
6448 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
6449
6450 * typeck.c (java_array_type_length, build_prim_array_type):
6451 Represent empty arrays by NULL index.
6452
6453 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
6454
6455 * java-tree.h (compile_resource_file): Grouped with other prototypes.
6456 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
6457
6458 2001-09-06 Anthony Green <green@redhat.com>
6459
6460 * class.c (O_BINARY): Define if necessary.
6461 (registerResource_libfunc): Declare.
6462 (init_class_processing): Initilize registerResource_libfunc.
6463 (compile_resource_file): New function.
6464 * java-tree.h (resource_name): Declare.
6465 (compile_resource_file): Declare.
6466 * jcf-parse.c (yyparse): Handle compiling java resource files.
6467 * lang.c (java_decode_option): Handle -fcompile-resource option.
6468 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
6469 resource files.
6470 * gcj.texi (Code Generation): Add documentation for -R flag.
6471
6472 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
6473
6474 * jcf-write.c (generate_classfile): Issue an error in case of
6475 field/initial value mismatch.
6476 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
6477 being initialized and we're generating bytecode.
6478 (java_complete_lhs): In MODIFY_EXPR section: added comments,
6479 set DECL_INITIAL properly when appropriate.
6480 Fixes PR java/4230
6481 Fixes PR java/4204
6482
6483 2001-09-01 Per Bothner <per@bothner.com>
6484
6485 * parse.y (maybe_yank_clinit): A field without an initializer is not
6486 relevant. All initializers except static final and constant require
6487 <clinit>, regardless of flag_emit_class_files.
6488
6489 2001-08-31 Per Bothner <per@bothner.com>
6490
6491 * class.c (set_constant_value): When not emitting class files, then a
6492 String ConstantValue is a utf8const_ptr_type.
6493
6494 2001-08-30 Per Bothner <per@bothner.com>
6495
6496 * jcf-write.c (generate_classfile): Check that field is primitive
6497 or string before emitting ConstantValue attribute.
6498
6499 2001-08-30 Per Bothner <per@bothner.com>
6500
6501 * parse.y (resolve_qualified_expression_name): If creating a
6502 COMPOUND_EXPR, set it's type correctly.
6503
6504 2001-08-30 Per Bothner <per@bothner.com>
6505
6506 * jcf-io.c (open_class): Set filename field.
6507
6508 * jcf-parse,c (parse_class_file): Set current_function_decl
6509 for better error message when Code attribute is missing.
6510
6511 * lang.c (put_decl_node, lang_print_error): Re-arrange for
6512 better diagnostics, especially for constructors.
6513
6514 2001-08-30 Per Bothner <per@bothner.com>
6515
6516 * jcf-write.c (generate_classfile): Don't write ConstantValue
6517 attribute if field is not final, for compatibility with jdk.
6518
6519 * jcf-write.c (generate_classfile): Convert ConstantValue values
6520 to correct type. Work-around for front-end bug.
6521 * class.c (set_constant_value): Error if constant has wrong type.
6522
6523 2001-08-30 Per Bothner <per@bothner.com>
6524
6525 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
6526 "Double" are printed at verbosity 1.
6527
6528 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
6529
6530 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
6531
6532 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
6533
6534 * parse.y (patch_assignment): Don't verify final re-assignment here.
6535 (java_complete_lhs): Verify assignments to finals calling
6536 patch_assignment. Verify re-assignments to finals before calling
6537 patch_assignment.
6538
6539 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
6540
6541 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
6542 Fixes PR java/1413
6543
6544 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
6545
6546 * lex.c (java_lex): new local found_hex_digits. Set and then used
6547 in test to reject invalid hexadecimal numbers.
6548 * parse.y (java_complete_tree): Prevent unwanted cast with
6549 initialized floating point finals.
6550 (patch_binop): Emit a warning when detecting a division by zero,
6551 mark result not constant, don't simplify non integer division.
6552
6553 2001-08-28 Per Bothner <per@bothner.com>
6554
6555 * jcf-write.c (generate_bytecode_insns): For increments and
6556 decrements just recurse to push constant. Improvement on Mark's patch.
6557
6558 2001-08-28 Mark Mitchell <mark@codesourcery.com>
6559
6560 * jcf-write.c (generate_bytecode_insns): Generate an integer to
6561 real conversion for increments and decrements of reals.
6562
6563 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6564
6565 * parse.y (resolve_qualified_expression_name): Handle unresolved
6566 qualified expressions, prevent numerical qualifiers, fixed typo.
6567 Fixes PR java/4141
6568
6569 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
6570
6571 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
6572 don't report anything but deprecated class when marked so. Handle
6573 VAR_DECL.
6574 (patch_method_invocation): Check deprecation on methods and types.
6575 (patch_binop): code becomes an enum tree_code, added default: to
6576 switch to handle that. Detect division by zero, try to fold and
6577 return before using a subroutine.
6578
6579 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
6580
6581 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
6582 file smaller than 4 bytes.
6583 * parse.y (check_inner_circular_reference): New function.
6584 (check_circular_reference): Likewise.
6585 (array_initializer:): Accept {,}.
6586 (java_check_circular_reference): Rewritten using
6587 check_circular_reference and check_inner_circular_reference.
6588 (java_complete_expand_method): Unconditionally save and restore
6589 the unpurged exception list.
6590 (build_dot_class_method_invocation): Unmangle signature parameter.
6591
6592 2001-08-21 Tom Tromey <tromey@redhat.com>
6593
6594 * decl.c (init_decl_processing): Add `throws' field to method
6595 descriptor.
6596 * class.c (make_method_value): Compute `throws' field for method.
6597
6598 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
6599
6600 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
6601 circularity is detected.
6602 (ctors_unchecked_throws_clause_p): Fixed leading comment.
6603
6604 2001-08-17 Richard Henderson <rth@redhat.com>
6605
6606 * class.c (emit_register_classes): Add align parameter to
6607 call to assemble_integer.
6608
6609 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
6610
6611 * jcf-parse.c (load_class): New locals saved and class_loaded. If
6612 loading a class_or_name fails, try considering an innerclass name
6613 and load the enclosing context.
6614 * parse.y (resolve_inner_class): New function.
6615 (find_as_inner_class): Added leading comment.
6616 (register_incomplete_type): Keep the current context as enclosing
6617 context for JDEP_FIELD dependencies.
6618 (do_resolve_class): Locals new_class_decl and super initialized to
6619 NULL. Call resolve_inner_class, explore the enclosing context
6620 superclass if necessary.
6621 Fixes PR java/4007
6622
6623 2001-08-16 Tom Tromey <tromey@redhat.com>
6624
6625 * jcf-dump.c (main): Updated for change to jcf_path_seal.
6626 * gjavah.c (main): Updated for change to jcf_path_seal.
6627 * lang.c (version_flag): New global.
6628 (java_decode_option): Recognize `-version'.
6629 (java_init): Update for change to jcf_path_seal.
6630 * jcf.h (jcf_path_seal): Added `print' argument.
6631 * jcf-path.c (jcf_path_seal): Added `print' argument.
6632
6633 2001-08-13 Zack Weinberg <zackw@panix.com>
6634
6635 * Make-lang.in (java/decl.o): Update dependencies.
6636 * decl.c: Include libfuncs.h, don't include toplev.h.
6637
6638 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6639
6640 * decl.c (init_decl_processing): exception_type_node,
6641 class_not_found_type_node, and no_class_def_found_type_node
6642 initialized. predef_filenames augmented accordingly.
6643 instinit_identifier_node initialized.
6644 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
6645 * java-tree.h (enum java_tree_index): New entries
6646 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
6647 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
6648 (exception_type_node): New macro.
6649 (class_not_found_type_node): Likewise.
6650 (no_class_def_found_type_node): Likewise.
6651 (instinit_identifier_node): Likewise.
6652 (PREDEF_FILENAMES_SIZE): Adjusted.
6653 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
6654 (struct lang_type): Fixed typo in bitfield name.
6655 (DECL_INSTINIT_P): New macro.
6656 (ID_INSTINIT_P): Likewise.
6657 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
6658 attribute.
6659 * parse.y (encapsulate_with_try_catch): New function.
6660 (generate_instinit): Likewise.
6661 (build_instinit_invocation): Likewise.
6662 (ctors_unchecked_throws_clause_p): Likewise.
6663 (add_instance_initializer): Deleted.
6664 (build_instance_initializer): Likewise.
6665 (in_instance_initializer): Likewise.
6666 (check_method_redefinition): instinit$ not to be verified.
6667 (java_complete_expand_methods): Generate instinit$, simplified code.
6668 (build_dot_class_method): Eliminated unnecessary locals. Use
6669 encapsulate_with_try_catch, removed unnecessary code.
6670 (fix_constructors): New local iii. Use build_instinit_invocation.
6671 (patch_method_invocation): Added comment.
6672 (maybe_use_access_method): Don't consider instinit$.
6673 (find_applicable_accessible_methods_list): Shorten the search for
6674 instinit$ too.
6675 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
6676 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
6677 (patch_throw_statement): Likewise. Fixed typo.
6678
6679 2001-08-12 David Edelsohn <edelsohn@gnu.org>
6680
6681 Revert:
6682 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6683 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6684 ASM_FINAL_SPEC.
6685 (lang_specific_pre_link): Use set_input to set input_filename.
6686 Append `main' here.
6687 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6688 (main): Fix definition.
6689 Strip `main' from classname.
6690 Fixes PR java/227.
6691
6692 2001-08-11 Zack Weinberg <zackw@panix.com>
6693
6694 * lex.h: Don't include setjmp.h. Don't define
6695 SET_FLOAT_HANDLER or prototype set_float_handler.
6696
6697 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6698
6699 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
6700 `poplevel' in the right order.
6701
6702 2001-08-09 Richard Henderson <rth@redhat.com>
6703
6704 * Make-lang.in (class.o): Depend on TARGET_H.
6705 * class.c (emit_register_classes): Use target hooks instead of
6706 assemble_constructor and assemble_destructor.
6707
6708 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
6709
6710 * check-init.c (flags.h): Include
6711 (check_init): Don't report uninitialized static class
6712 initialization flags, don't free bit index when doing static class
6713 initialization optimization.
6714 (check_for_initialization): Return type changed to `unsigned int.'
6715 (attach_initialized_static_class): New function.
6716 * class.c (add_method_1): Create the initialized static class
6717 table if necessary.
6718 (finish_class): Always emit deferred inline methods.
6719 * decl.c (emit_init_test_initialization): Moved to expr.c
6720 (complete_start_java_method): Don't traverse
6721 DECL_FUNCTION_INIT_TEST_TABLE.
6722 (lang_mark_tree): Mark hash tables in function decls.
6723 * expr.c (emit_init_test_initialization): Moved from decl.c.
6724 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
6725 initialization flag, set DECL_CONTEXT and
6726 LOCAL_CLASS_INITIALIZATION_FLAG.
6727 (java_lang_expand_expr): Emit initialization code for static class
6728 initialized flags when entering block, if necessary.
6729 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
6730 * java-tree.h (flag_optimize_sci): New global variable declaration.
6731 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
6732 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
6733 (LOCAL_FINAL_P): Fixed typo in comment.
6734 (FINAL_VARIABLE_P): Likewise.
6735 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
6736 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
6737 (struct lang_decl): New fields `ict', `smic' and `cif.'
6738 (check_for_initialization): New returned value for global.
6739 (attach_initialized_static_class): New global function.
6740 (STATIC_CLASS_INIT_OPT_P): New macro.
6741 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
6742 * lang.c (java_decode_option): Handle
6743 `-fno-optimize-static-class-initialization'
6744 * parse.y (start_complete_expand_method): New function.
6745 (java_expand_method_bodies): Likewise.
6746 (attach_init_test_initialization_flags): Likewise.
6747 (adjust_init_test_initialization): Likewise.
6748 (emit_test_initialization): Likewise.
6749 (java_complete_expand_methods): Nullify abstract and native method
6750 bodies.
6751 (java_complete_expand_method): New locals `fbody', `block_body'
6752 and `exception_copy.' Reorganized: directly return on empty method
6753 bodies, call `start_complete_expand_method', remember definitely
6754 initialized static class in function, don't expand method bodies.
6755 (java_expand_classes): Call `java_expand_method_bodies' before
6756 `finish_class' when compiling to native.
6757 (resolve_expression_name): Use `orig' after building outer class
6758 field access.
6759 (patch_invoke): Remember static method invocations.
6760
6761 2001-08-06 Richard Henderson <rth@redhat.com>
6762
6763 * class.c (emit_register_classes): Pass a symbol_ref and priority
6764 to assemble_constructor.
6765
6766 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
6767
6768 * java-tree.h (all_class_filename): New macro.
6769 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
6770 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
6771 newly created IDENTIFIER_NODE to `all_class_filename.'
6772
6773 2001-08-01 Jeff Sturm <jsturm@one-point.com>
6774
6775 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
6776 Use ggc_add_tree_root to register roots.
6777
6778 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
6779
6780 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
6781 second operand calling check_init.
6782 * decl.c (complete_start_java_method): Swaped second and third
6783 arguments while creating WITH_CLEANUP_EXPR node.
6784 * jcf-write.c (generate_bytecode_insns): Use second operand
6785 instead of third when handling WITH_CLEANUP_EXPR.
6786 * parse.y (java_complete_lhs): Expand second operand of
6787 WITH_CLEANUP_EXPR nodes.
6788 (patch_synchronized_statement): Swaped second and third arguments
6789 while creating WITH_CLEANUP_EXPR node.
6790
6791 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
6792
6793 * parse.y (create_interface): Avoid cyclic inheritance report when
6794 syntax error encountered during class definition.
6795 Fixes PR java/2956
6796
6797 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6798
6799 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
6800 ASM_FINAL_SPEC.
6801 (lang_specific_pre_link): Use set_input to set input_filename.
6802 Append `main' here.
6803 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
6804 (main): Fix definition.
6805 Strip `main' from classname.
6806 Fixes PR java/227.
6807
6808 2001-07-18 Tom Tromey <tromey@redhat.com>
6809
6810 For PR java/2812:
6811 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
6812 * lex.c (java_new_lexer): Use ICONV_CONST.
6813 (java_read_char): Likewise.
6814 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
6815 (jv-scan$(exeext)): Likewise.
6816
6817 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6818
6819 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
6820 * parse.y (check_class_interface_creation): Allow `private' if the
6821 enclosing is not an interface.
6822 (create_interface): Interface tagged public if the enclosing
6823 context is an interface.
6824 (create_class): Class tagged public if the enclosing context
6825 is an interface.
6826 Fixes PR java/2959
6827
6828 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
6829
6830 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
6831 Fixes PR java/2665
6832
6833 2001-07-14 Tim Josling <tej@melbpc.org.au>
6834
6835 * check-init.c (check_init): Remove references to EXPON_EXPR.
6836
6837 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
6838
6839 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
6840 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
6841 Fixes PR java/3602
6842
6843 2001-07-13 Tom Tromey <tromey@redhat.com>
6844
6845 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
6846 invocation.
6847
6848 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6849
6850 * parse.y (patch_method_invocation): Don't override primary if one
6851 is already provided, but let this$<n> be built. Fixed comment.
6852
6853 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
6854
6855 * parse.y (empty_statement:): Report empty statement error only
6856 when found at class declaration level.
6857 Fixes PR java/3635
6858
6859 2001-07-12 Tom Tromey <tromey@redhat.com>
6860
6861 * expr.c (expand_load_internal): New function.
6862 (LOAD_INTERNAL): Use it.
6863
6864 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
6865
6866 * parse.y (verify_constructor_super): Compare anonymous class ctor
6867 args with `valid_method_invocation_conversion_p.'
6868 Fixes PR java/3285
6869
6870 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6871
6872 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
6873 `-fsyntax-only.' Fixes PR java/3248
6874
6875 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6876
6877 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
6878
6879 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
6880
6881 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
6882 current function is static. Fixes PR java/1970
6883
6884 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6885
6886 * parse.y (patch_method_invocation): Add enclosing context to ctor
6887 calls if necessary. Fixes PR java/2953
6888
6889 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
6890
6891 * parse.y (resolve_package): Abort if qualified expression member
6892 isn't right.
6893 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
6894 Fixes PR java/1391
6895
6896 2001-07-07 Zack Weinberg <zackw@stanford.edu>
6897
6898 * verify.c: Don't use // comments.
6899
6900 2001-07-05 Tom Tromey <tromey@redhat.com>
6901
6902 * lang.c (flag_assume_compiled): Removed.
6903 * java-tree.h (flag_assume_compiled): Removed.
6904 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
6905 -fhash-synchronization, -fuse-divide-subroutine,
6906 -fcheck-references, -femit-class-file, -femit-class-files,
6907 -fassume-compiled. Updated --encoding information. Changed
6908 -foutput-class-dir to `-d'.
6909
6910 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
6911
6912 * jcf-parse.c (parse_class_file): Add lineno parameter to
6913 debug_start_source_file call.
6914
6915 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
6916
6917 * gcj.texi: Use gpl.texi.
6918 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
6919 dependencies and use doc/include in search path.
6920
6921 2001-07-03 Jeff Sturm <jsturm@one-point.com>
6922
6923 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
6924 `this'. If so, don't build instance initializers.
6925
6926 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
6927
6928 * parse.y (resolve_expression_name): Improved error message for
6929 inner class cases. Fixes PR java/1958
6930
6931 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
6932
6933 * lang.c: #include diagnostic.h
6934 (lang_print_error): Add a `diagnostic_context *' parameter.
6935 (java_dummy_print): Likewise.
6936 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
6937
6938 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6939
6940 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
6941 * jcf.h (typedef struct JCF): New bitfield `finished.'
6942 (JCF_FINISH): Set `finished.'
6943 (JCF_ZERO): Reset `finished.'
6944 Fixes PR java/2633
6945
6946 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6947
6948 * parse.y (class_body_declaration:): Don't install empty instance
6949 initializers.
6950 Fixes PR java/1314
6951
6952 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6953
6954 * class.c (set_super_info): Call `set_class_decl_access_flags.'
6955 (set_class_decl_access_flags): New function.
6956 * java-tree.h (set_class_decl_access_flags): New prototype.
6957 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
6958 (parse_class_file): New local `decl_max_locals.' Take wide types
6959 into account to compute DECL_MAX_LOCALS.
6960 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
6961 imports on demand.
6962
6963 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
6964
6965 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
6966
6967 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
6968
6969 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
6970 * parse.y (do_resolve_class): Moved comments out to leading comment
6971 section. Removed local `start', New local `_ht' and
6972 `circularity_hash.' Record `enclosing' in hash table and search
6973 it to detect circularity. Use `enclosing' as an argument to
6974 `lookup_cl.' Free the hash table when done.
6975
6976 2001-06-19 Tom Tromey <tromey@redhat.com>
6977
6978 * lex.c (java_read_char): Disallow invalid and overlong
6979 sequences. Fixes PR java/2319.
6980
6981 2001-06-05 Jeff Sturm <jsturm@one-point.com>
6982
6983 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
6984
6985 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
6986
6987 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
6988 arguments accordingly.
6989
6990 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
6991
6992 * gcj.texi: Move contents to just after title page.
6993
6994 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
6995
6996 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
6997 builtin type.
6998 (patch_incomplete_class_ref): Build the class ref, build the class
6999 init if necessary, complete the tree.
7000 Fixes PR java/2605
7001
7002 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
7003
7004 * parse.y (lookup_field_wrapper): Test `name' code.
7005 (resolve_qualified_expression_name): Test `qual_wfl' code.
7006 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
7007 handle `qual_wfl' by code.
7008 (maybe_build_primttype_type_ref): Test `wfl' code.
7009
7010 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7011
7012 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
7013 fdl.texi.
7014 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
7015 the dvi file in the java directory.
7016
7017 2001-05-25 Sam TH <sam@uchicago.edu>
7018
7019 * gen-table.pl javaop.h jcf.h lex.h,
7020 parse.h: Fix header include guards.
7021
7022 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
7023
7024 * jv-scan.c (version): Update copyright year.
7025
7026 2001-05-21 Per Bothner <per@bothner.com>
7027
7028 * jcf-parse.c (read_class): If class is from .class or .zip file
7029 and it's already been read, don't push/pop parser context.
7030
7031 2001-05-18 Per Bothner <per@bothner.com>
7032
7033 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
7034 command line so the jvgenmain-generated main program comes first.
7035
7036 2001-05-15 Tom Tromey <tromey@redhat.com>
7037
7038 * class.c (build_utf8_ref): Don't generate identifier based on
7039 utf8const contents.
7040
7041 2001-05-12 Richard Henderson <rth@redhat.com>
7042
7043 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
7044 * expr.c (java_lang_expand_expr): Expand it.
7045 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
7046 calling build_exception_object_ref.
7047 * parse.y (catch_clause_parameter): Likewise.
7048 (build_dot_class_method): Likewise.
7049 (try_reference_assignconv): Likewise.
7050 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
7051 * jcf-write.c (generate_bytecode_insns): Likewise.
7052
7053 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
7054
7055 * parse.y (build_unresolved_array_type): Set
7056 EXPR_WFL_QUALIFICATION on the newly created wfl.
7057 Fixes PR java/2538. Fixes PR java/2535.
7058
7059 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
7060
7061 * parse.y (fix_constructors): Removed unnecessary assignment to
7062 local. Moved assignment to `this$<n>', fixed comments and
7063 indentation.
7064 (build_wfl_wrap): Fixed indentation.
7065 Fixes PR java/2598, java/2579 and java/2658.
7066
7067 2001-05-03 Mo DeJong <mdejong@redhat.com>
7068
7069 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
7070 check for byte swap.
7071
7072 2000-05-02 Jeff Sturm <jsturm@one-point.com>
7073
7074 * expr.c (build_class_init): Move MODIFY_EXPR
7075 outside of COND_EXPR. Remove variable `call'.
7076
7077 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7078
7079 * decl.c: NULL_PTR -> NULL.
7080 * jcf-write.c: Likewise.
7081
7082 2001-05-01 Tom Tromey <tromey@redhat.com>
7083
7084 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
7085 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
7086 * gcj.texi: Updated copyright text. Include fdl.texi.
7087 (Top): Link to new node.
7088
7089 2001-05-01 Per Bothner <per@bothner.com>
7090
7091 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
7092
7093 2001-05-01 Per Bothner <per@bothner.com>
7094
7095 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
7096 import_list contains the name, not the TREE_PURPOSE.
7097
7098 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7099
7100 * jcf-io.c (read_zip_member): Cast to long in comparison with
7101 signed value.
7102
7103 * jvspec.c (lang_specific_driver): Initialize variables.
7104
7105 * mangle.c (find_compression_record_match): Likewise.
7106
7107 * typeck.c (build_null_signature): Provide static prototype. Mark
7108 parameter with ATTRIBUTE_UNUSED.
7109
7110 * verify.c (verify_jvm_instructions): Initialize variable.
7111
7112 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7113
7114 * parse.y (do_resolve_class): Check for cyclic inheritance during
7115 inner class resolution.
7116
7117 2001-04-27 Per Bothner <per@bothner.com>
7118
7119 * parse.y (java_expand_classes): Don't change ctxp_for_generation
7120 while iterating, since that could cause gc to lose stuff.
7121
7122 2001-04-26 Per Bothner <per@bothner.com>
7123
7124 Fix method search wrt scope of inner classes to match JLS2.
7125 * typeck.c (build_null_signature): New static function.
7126 (has_method): New function. Uses build_null_signature and lookup_do.
7127 * java-tree.h (has_method): New declaration.
7128 * parse.y (find_applicable_accessible_methods_list): Do not search
7129 context of inner classes here.
7130 (patch_method_invocation): Search scope, ie. current and outer clases,
7131 for method matching simple name, to find class.
7132
7133 2001-04-26 Per Bothner <per@bothner.com>
7134
7135 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
7136 Fix thinko: If a single case, use if_icmpeq, not ifeq.
7137
7138 * constants.c (find_methodref_with_class_index): New function.
7139 (find_methodref_index): Use find_methodref_with_class_index.
7140 * java-tree.h (find_methodref_with_class_index): New declaration.
7141 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
7142 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
7143 If context changed from interface to class, don't use invokeinterface.
7144
7145 2001-04-25 Per Bothner <per@bothner.com>
7146
7147 * verify.c (verify_jvm_instructions): For field instructions,
7148 check that field index is valid. For invoke instructions, check that
7149 method index is valid.
7150
7151 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
7152
7153 * config-lang.in (target_libs): Copy from $libgcj_saved.
7154
7155 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7156
7157 * decl.c (init_decl_processing): Add new class "protectionDomain"
7158 field.
7159 * class.c (make_class_data): Set initial value for "protectionDomain".
7160
7161 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7162
7163 * jvspec.c (lang_specific_driver): Fix memory allocation
7164 deficit, by using concat in lieu of xmalloc/sprintf.
7165
7166 2001-04-20 Per Bothner <per@bothner.com>
7167
7168 Fixes to compile multiple .class files at once.
7169 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
7170 * java-tree.h (CLASS_PARSED_P): New macro.
7171 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
7172 * jcf-parse.c (jcf_parse_source): Inline into read_class.
7173 (read_class): Avoid some code duplication.
7174 Don't call JCF_FINISH for a .class file - might be needed later.
7175 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
7176 rather than CLASS_LOADED_P, since latter implies class laid out.
7177 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
7178 * parse.y: Don't need to set CLASS_LOADED_P for array types.
7179
7180 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7181
7182 * Make-lang.in (java/boehm.o): Depend on toplev.h.
7183
7184 * boehm.c: Include toplev.h.
7185
7186 2001-04-06 Tom Tromey <tromey@redhat.com>
7187 Alexandre Petit-Bianco <apbianco@redhat.com>
7188
7189 Fix for PR gcj/1404 and PR gcj/2332:
7190 * parse.y (build_array_from_name): If we use the type_wfl then
7191 accumulate dimensions from the original type as well.
7192 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
7193
7194 2001-04-06 Tom Tromey <tromey@redhat.com>
7195
7196 * parse.y (analyze_clinit_body): Return true if the second operand
7197 of a METHOD_EXPR is nonzero.
7198
7199 2001-04-06 Tom Tromey <tromey@redhat.com>
7200
7201 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
7202 directory.
7203 ($(srcdir)/java/parse.c): Likewise.
7204
7205 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
7206
7207 * gcj.texi: Use `which-gcj' instead of `which-g77.'
7208 (version-gcc): Initialized.
7209 (which-gcj): Likewise.
7210
7211 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
7212
7213 * java-tree.h (struct lang_decl): New macro
7214 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
7215 * parse.y (build_instance_initializer): New function.
7216 (add_instance_initializer): Use it.
7217 (java_fix_constructors): Set `current_class' before fix pass.
7218 (fix_constructors): Just return if already fixed. Move `super()'
7219 invocation ahead. Use `build_instance_initializer.'
7220 Fixes PR java/1315.
7221
7222 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
7223
7224 * parse.y (resolve_qualified_expression_name): Pass field's
7225 DECL_CONTEXT to `not_accessible_p.'
7226 (not_accessible_p): Changed parameters order in `inherits_from_p'
7227 invocation.
7228
7229 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
7230
7231 * lang-options.h: Add flag_check_references.
7232
7233 2001-04-04 Per Bothner <per@bothner.com>
7234
7235 * java-tree.h (CONSTANT_VALUE_P): New macro.
7236 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
7237 * parse.y (maybe_build_class_init_for_field): New static function.
7238 (resolve_expression_name, resolve_field_access): Use
7239 maybe_build_class_init_for_field instead of build_class_init
7240 This does not do the init if the field is compile-time-constant.
7241 (resolve_field_access): Simplify.
7242
7243 * parse.y (fold_constant_for_init): Merge test into switch.
7244
7245 2001-04-03 Zack Weinberg <zackw@stanford.edu>
7246
7247 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
7248 on gansidecl.h.
7249 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
7250
7251 2001-04-02 Zack Weinberg <zackw@stanford.edu>
7252
7253 * expr.c (pop_type_0): Save the result of the first
7254 lang_printable_name call in a scratch buffer, so it
7255 won't be clobbered by the second call.
7256
7257 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
7258
7259 * parse-scan.y (array_type:): Rewritten.
7260 (type_declaration:): `empty_statement' replaces `SC_TK.'
7261 (class_member_declaration:): `empty statement' added.
7262 (method_body:): Simplified.
7263 (static_initializer:): Likewise.
7264 (primary_no_new_array:): Use `type_literals.'
7265 (type_literals:): New rule.
7266 (dims:): Set and update `bracket_count.'
7267 Fixes PR java/1074. Fixes PR java/2412.
7268
7269 2001-03-28 Hans Boehm <boehm@acm.org>
7270
7271 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
7272 (get_boehm_type_descriptor): Set type on returned value to be a
7273 pointer length integer.
7274
7275 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7276
7277 * expr.c (pop_type_0): Call `concat' rather than building the
7278 string manually.
7279 (pop_type): Add format specifier in call to `error'.
7280
7281 * parse.y (patch_method_invocation): Avoid casting away
7282 const-ness.
7283
7284 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
7285
7286 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
7287
7288 2001-03-28 Richard Henderson <rth@redhat.com>
7289
7290 IA-64 ABI Exception Handling:
7291 * Make-lang.in (except.o): Don't depend on eh-common.h.
7292 * check-init.c (check_init): Handle EXC_PTR_EXPR.
7293 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
7294 [soft_exceptioninfo_call_node]: Remove.
7295 [eh_personality_libfunc, lang_eh_runtime_type]: New.
7296 (end_java_method): No emit_handlers.
7297 * except.c (java_set_exception_lang_code): Remove.
7298 (method_init_exceptions): Don't call it.
7299 (prepare_eh_table_type): No CATCH_ALL_TYPE.
7300 (build_exception_object_ref): New.
7301 (expand_end_java_handler): Update for except.h name changes.
7302 (emit_handlers, expand_resume_after_catch): Remove.
7303 * expr.c (java_lang_expand_expr): Update for except.h name changes.
7304 (process_jvm_instruction): Use build_exception_object_ref.
7305 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
7306 (soft_exceptioninfo_call_node): Remove.
7307 (build_exception_object_ref): Declare.
7308 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
7309 soft_exceptioninfo_call_node. Move processing ...
7310 [EXC_PTR_EXPR]: ... here.
7311 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
7312 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
7313 (source_end_java_method): No java_set_exception_lang_code or
7314 emit_handlers.
7315 (build_dot_class_method): Use build_exception_object_ref.
7316 (try_reference_assignconv): Check EXC_PTR_EXPR not
7317 soft_exceptioninfo_call_node.
7318
7319 2001-03-28 Richard Henderson <rth@redhat.com>
7320
7321 * java-tree.h (throw_node): Define as a single member of
7322 java_global_trees instead of a separate array.
7323 (JTI_THROW_NODE): New.
7324 * decl.c (throw_node): Don't declare.
7325 (init_decl_processing): Init a scalar throw_node.
7326 Don't register it for gc.
7327 * check-init.c (check_init): Reference scalar throw_node.
7328 * expr.c (build_java_athrow): Likewise.
7329 * jcf-write.c (generate_bytecode_insns): Likewise.
7330 * parse.h (BUILD_THROW): Likewise.
7331
7332 2001-03-28 Richard Henderson <rth@redhat.com>
7333
7334 * decl.c (end_java_method): Do not save and restore
7335 flag_non_call_exceptions.
7336 * parse.y (source_end_java_method): Likewise.
7337 * lang.c (flag_exceptions): Don't declare.
7338 (java_init_options): Set flag_non_call_exceptions. Set
7339 flag_exceptions here ...
7340 (java_init): ... not here.
7341
7342 2001-03-27 Richard Henderson <rth@redhat.com>
7343
7344 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
7345 exceptions_via_longjmp.
7346
7347 * lang.c (flag_new_exceptions): Don't declare it.
7348 (java_init_options): Or set it.
7349
7350 2001-03-27 Richard Henderson <rth@redhat.com>
7351
7352 * decl.c (end_java_method): Rename asynchronous_exceptions to
7353 flag_non_call_exceptions.
7354 * parse.y (source_end_java_method): Likewise.
7355
7356 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7357
7358 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
7359
7360 2001-03-26 Mark Mitchell <mark@codesourcery.com>
7361
7362 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
7363
7364 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
7365
7366 * parse.y (find_as_inner_class): Follow current package
7367 indications not to mistakingly load an unrelated class.
7368
7369 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7370
7371 * constants.c (PUTN): Use memcpy, not bcopy.
7372
7373 * lex.c (java_read_char): Use memmove, not bcopy.
7374
7375 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
7376
7377 2001-03-23 Per Bothner <per@bothner.com>
7378
7379 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
7380 macro for better error pin-pointing.
7381 * java-tree.h: Fix typo in comment.
7382
7383 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
7384 Don't include jsr/goto in exception range.
7385 Check if start and end of exception range are the same (also TRY_EXPR).
7386 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
7387 However, do emit the following goto even if try_block is empty.
7388 Defer freeing exception_decl until after the finalizer, to make
7389 sure the local isn't reused in the finalizer. Fixes PR java/1208.
7390
7391 * parse.y (java_complete_lhs): If the try-clause is empty, just
7392 return the finally-clause and vice versa.
7393
7394 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
7395
7396 * gcj.texi (Input Options): documented the check for attribute
7397 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
7398 * java-tree.h (flag_force_classes_archive_check): Declared extern.
7399 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
7400 (jcf_parse): Check for the right classes archive if necessary.
7401 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
7402 (jcf_parse_fields): Fixed indentation.
7403 * jcf-write.c (append_gcj_attribute): New function.
7404 (generate_classfile): Compute the attribute count, invoke
7405 `append_gcj_attribute'.
7406 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
7407 turned into bit-fields. New bit-field `right_zip.'
7408 (JCF_ZERO): Set `right_zip' to zero.
7409 * lang-options.h (-fforce-classes-archive-check): Added flag.
7410 * lang.c (flag_force_classes_archive_check): New flag.
7411 (lang_f_options): New entry `force-classes-archive-check.'
7412 Fixes PR java/1213.
7413
7414 2001-02-07 Andrew Haley <aph@redhat.com>
7415
7416 * gcj.texi (Configure-time Options): Add -fcheck-references.
7417 * expr.c (build_java_indirect_ref): New function.
7418 (java_check_reference): New function.
7419 (build_java_array_length_access): Use build_java_indirect_ref to
7420 check for null references.
7421 (build_java_arrayaccess): Likewise.
7422 (build_get_class): Likewise.
7423 (build_field_ref): Likewise.
7424 (invoke_build_dtable): Likewise.
7425 (build_invokeinterface): Likewise.
7426 * lang.c (lang_f_options): Add flag_check_references.
7427 * jvspec.c (jvgenmain_spec): Add flag_check_references.
7428 * java-tree.h (flag_check_references): New variable.
7429 * lang.c (flag_check_references): Likewise.
7430 * parse.y (patch_invoke): Use java_check_reference.
7431 (patch_assignment): Allow for extra nesting in
7432 _Jv_CheckArrayStore.
7433
7434 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
7435
7436 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
7437 * lex.c (cxx_keywords): Likewise.
7438
7439 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
7440
7441 * parse.y (qualify_ambiguous_name): Broaden `length'
7442 recognition. Help MODIFY_EXPR be resolved as expression names.
7443 Fixes PR java/2066. Fixes PR java/2400.
7444
7445 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
7446
7447 * gjavah.c (process_file): Mark interface definitions with
7448 "__attribute__ ((java_interface))".
7449
7450 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
7451
7452 * class.c (layout_class): Fixed push_super_field's second
7453 argument. Fixes PR java/2333.
7454 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
7455 too early to lay innerclasses out.
7456
7457 2001-03-20 Tom Tromey <tromey@redhat.com>
7458 Alexandre Petit-Bianco <apbianco@redhat.com>
7459
7460 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
7461 inside an array reference. Insertion of the array store check
7462 rewritten. Fixes PR java/2299.
7463
7464 2001-03-20 Tom Tromey <tromey@redhat.com>
7465
7466 * lex.c (java_read_unicode): Only accept leading `u's.
7467
7468 2001-03-20 Tom Tromey <tromey@redhat.com>
7469
7470 * jcf-parse.c (read_class): Initialize `class'.
7471
7472 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7473
7474 * jcf_parse.c (jcf_parse): Eliminate unused variable.
7475
7476 2001-03-19 Mark Mitchell <mark@codesourcery.com>
7477
7478 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
7479 (layout_class): Likewise.
7480 (layout_class_method): Likewise.
7481 (emit_register_classes): Likewise.
7482 * decl.c (builtin_function): Likewise.
7483 (give_name_to_locals): Likewise.
7484
7485 2001-03-19 Per Bothner <per@bothner.com>
7486
7487 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
7488 before trying to load an inner class.
7489
7490 Fixes to process to command-line .class files in two passes.
7491 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
7492 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
7493 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
7494 * class.c (is_compiled_class): Fix for renamed flag.
7495 * parse.y (maybe_create_class_interface_decl): Likewise.
7496 * jcf-parse.c (yyparse): Also set if compiling .class files.
7497 * jcf-parse.c (read_class); Read current_class.
7498 (jcf_parse): Make static.
7499 (load_inner_classes): New function, with code moved from jcf_parse,
7500 because we need to inner classes after the command-line files are read.
7501 (yyparse): Set finput to NULL when it doesn't need to be closed.
7502 Reduce use of main_jcf (basically only for archive) and
7503 use finput instead of main_jcf->read_state.
7504 Inline jcf_figure_file_type into yyparse.
7505 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
7506 Defer load_inner_classes and parse_class_file to a second pass,
7507 after we've correctly mapped command-line .clas fiels to classes.
7508 (jcf_figure_file_type): Removed.
7509 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
7510 (JCF_ZERO): Also clear zipd field.
7511 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
7512
7513 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
7514
7515 * jcf-parse.c (yyparse): Change ch from char * to char.
7516
7517 2001-03-19 Per Bothner <per@bothner.com>
7518
7519 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
7520 Add constructed filelist-file at end, following -xjava. Thus any .o
7521 and library files are not affected by the -xjava. Also wrap
7522 explicit @FILE with -xjava and -xnone.
7523
7524 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
7525
7526 * class.c (build_static_field_ref): Call make_decl_rtl() after
7527 setting the DECL_EXTERNAL flag.
7528
7529 2001-03-17 Per Bothner <per@bothner.com>
7530
7531 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
7532
7533 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
7534 when result is is needed (target is STACK_TARGET).
7535
7536 * parse.h (JDEP_SOLV): Removed.
7537 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
7538
7539 * parse.y (incomplete_class_list): Removed.
7540 (obtain_incomplete_type): Don't use or set incomplete_class_list.
7541 It doesn't work if resolve_class changes the name of an array type
7542 that is on the list and then someone else looks for the modified name.
7543 Also, seems liable to break when compiling multiple source files at
7544 once. So the simplest is to just remove incomplete_class_list -
7545 it is only a minor space win and it is not even clear it saves time.
7546
7547 * parse.y (resolve_class): Remove unneeded promote_type.
7548
7549 2001-03-15 Per Bothner <per@bothner.com>
7550
7551 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
7552 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
7553 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
7554 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
7555
7556 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
7557 * parse.y (java_expand_classes): Likewise.
7558
7559 * parse.y (expand_start_java_method): Was only called once and had a
7560 misleading name, so inline in caller java_complete_expand_method.
7561 (enter_a_block): Likewise inline in enter_block and remove.
7562
7563 Remove junk from when gcc/java was created (by copying from C/C++).
7564 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
7565 (struct binding_level): Remove fields keep, keep_if_subblocks,
7566 more_cleanups_ok, have_cleanups (which have never been used).
7567 (pushlevel, poplevel): Remove related useless code.
7568
7569 * class.c (make_class_data): The class_dtable_decl (i.e. the
7570 vtable for Class) should be external, except when compiling Class.
7571
7572 * jvspec.c (lang_specific_driver): Fix -C handling.
7573 Check -save-temps to see if temp @FILE should be deleted.
7574 Follow-up to/fix for February 16 patch.
7575
7576 * verify.c (verify_jvm_instructions): Better error msgs for dup.
7577 (type_stack_dup): Remove no-longer neded error check.
7578
7579 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
7580
7581 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
7582 to 'for_pointer'. If this type is for a pointer (argument) mangling,
7583 don't surround the element with 'N..E' if the type name is
7584 unqualified.
7585
7586 2001-03-14 Mark Mitchell <mark@codesourcery.com>
7587
7588 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
7589 DECL_RTL_SET_P, etc.
7590 (make_method_value): Likewise.
7591 (get_dispatch_table): Likewise.
7592
7593 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
7594
7595 2001-03-07 Tom Tromey <tromey@redhat.com>
7596
7597 * config-lang.in (lang_requires): Define.
7598
7599 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
7600
7601 * typeck.c (convert): Check flag_unsafe_math_optimizations,
7602 not flag_fast_math.
7603
7604 2001-03-05 Per Bothner <per@bothner.com>
7605
7606 Fix a problem where rest_of_decl_compilation applied to
7607 class_dtable_decl causes problems because it was done too early,
7608 before output file was opened.
7609 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
7610 * class.c (class_dtable_decl): Add macro - element of class_roots.
7611 (make_class_data): Define class_dtable_decl.
7612 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
7613
7614 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7615
7616 * java/class.c, java/decl.c, java/java-tree.h: Replace all
7617 uses of 'boolean' with 'bool'.
7618
7619 2001-03-01 Zack Weinberg <zackw@stanford.edu>
7620
7621 * lang-specs.h: Add zero initializer for cpp_spec field to all
7622 array elements.
7623
7624 2001-02-16 Per Bothner <per@bothner.com>
7625
7626 Handle compiling multiple input files at once, and @FILE syntax.
7627 * gcj.texi: Updated documentation to match.
7628 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
7629 * jcf-parse.c (parse_source_file): Split into ...
7630 (parse_source_file_1): New function - and:
7631 (parse_source_file_2): New function.
7632 (yyparse): On -ffilelist-file, open and scan named file.
7633 On first pass over files, only do parse_source_file_1.
7634 A new second pass calls parse_source_file_2 for each file to compile.
7635 (init_jcf_parse): Call init_src_parse.
7636 * jvspec.c (INDIRECT_FILE_ARG): New flag.
7637 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
7638 as multiple input file combined in one compilation.
7639 * lang-options.h: Add -ffilelist-file
7640 * lang.c (flag_filelist_file): New flag variable.
7641 (lang_f_options): Handle -ffilelist-file.
7642 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
7643 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
7644 gclass_list - use global fields of src_parse_roots instead.
7645 * parse.y (src_parse_roots): New array.
7646 (incomplete_class_list, gclass_list): New macros.
7647 (push_parser_context, java_pop_parser_context,
7648 java_parser_context_resume): Don't fiddle with deleted fields.
7649 (various): Use incomplete_class gclass_list and global macros
7650 instead of parse_ctxt fields - the lists are global.
7651 (init_src_parse): New function.
7652
7653 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7654
7655 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
7656
7657 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
7658
7659 * parse.y (check_inner_class_access): Moved declaration of local
7660 `enclosing_decl_type' to the right location.
7661
7662 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
7663
7664 * parse.y (parser_check_super_interface): Don't call
7665 check_pkg_class_access for an inner interface.
7666 (parser_check_super): Don't call check_pkg_class_access for inner
7667 class.
7668 (do_resolve_class): Simplify enclosing type loop. Don't call
7669 check_pkg_class_access if CL and DECL are not set.
7670 (find_in_imports_on_demand): Set DECL if class_type needed to be
7671 loaded. Don't call check_pkg_class_access for an inner class.
7672 (check_inner_class_access): Rewritten to implement member access
7673 rules as per spec 6.6.1.
7674 (check_pkg_class_access): Handle the empty package correctly.
7675 (in_same_package): New function. Determine if two classes are in the
7676 same package.
7677
7678 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
7679
7680 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
7681 method into array types.
7682 * parse.y (patch_method_invocation): Bypass access check on clone call
7683 to array instance.
7684
7685 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
7686
7687 * expr.c (build_instanceof): Check for arrays when trying fold to
7688 false.
7689
7690 2001-02-15 Jim Meyering <meyering@lucent.com>
7691
7692 * Make-lang.in (java.install-common): Depend on `installdirs'.
7693 (java.install-info): Likewise.
7694
7695 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
7696
7697 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
7698
7699 2001-02-14 Tom Tromey <tromey@redhat.com>
7700 Alexandre Petit-Bianco <apbianco@cygnus.com>
7701
7702 Fix for PR java/1261.
7703 * typeck.c (build_java_array_type): Add public `clone' method to
7704 arrays.
7705 * parse.y (resolve_qualified_expression_name): Use current_class
7706 when checking for inaccessibility.
7707 (patch_method_invocation): Fixed error message when accessibility
7708 denied. Added `from_super' argument.
7709
7710 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
7711
7712 * parse.y (resolve_class): Don't build a fake decl. Use the one
7713 already built.
7714 * typeck.c (build_java_array_type): Build and assign decl to array
7715 type.
7716
7717 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
7718
7719 * parse.y (not_accessible_p): Changed leading comment. Added extra
7720 `where' argument. Use it to enforce protected access rules.
7721 (resolve_qualified_expression_name): Added extra argument to
7722 not_accessible_p.
7723 (patch_method_invocation): Use argument `primary' to provide
7724 not_accessible_p with an extra argument.
7725 (lookup_method_invoke): Added extra argument to not_accessible_p.
7726 (search_applicable_method_list): Likewise.
7727
7728 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
7729
7730 * parse.y (resolve_qualified_expression_name): Try to resolve as
7731 an inner class access only if `decl' is a TYPE_DECL.
7732
7733 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7734
7735 * decl.c (classdollar_identifier_node): Initialize.
7736 * java-tree.h (enum java_tree_index): New entry
7737 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
7738 (classdollar_identifier_node): New macro.
7739 (ID_CLASSDOLLAR_P): Likewise.
7740 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
7741 (build_dot_class_method_invocation): Likewise.
7742 (find_applicable_accessible_methods_list): `class$' can't be
7743 inherited.
7744
7745 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
7746
7747 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
7748
7749 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7750
7751 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
7752 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
7753 gone.
7754
7755 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7756
7757 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
7758 outside of the `__U' sequence too.
7759 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
7760 sequence too.
7761
7762 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
7763
7764 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
7765
7766 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
7767
7768 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
7769 (JVGENMAIN_OBJS): Likewise.
7770 * java-tree.h (append_gpp_mangled_name): New prototype.
7771 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
7772 Removed cast calling `gcc_add_root.'
7773 * jvgenmain.c (mangle_obstack): New global, initialized.
7774 (main): Use it.
7775 (do_mangle_class): Constify local `ptr.'
7776 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
7777 append_gpp_mangle_name and update `count' if necessary.
7778 Use `mangle_obstack.'
7779 * mangle.c (append_unicode_mangled_name): Removed.
7780 (append_gpp_mangled_name): Likewise.
7781 (unicode_mangling_length): Likewise.
7782 (mangle_member_name): Return type set to `void.'
7783 (mangle_field_decl): Don't append `U' in escaped names.
7784 (mangle_method_decl): Likewise.
7785 (mangle_member_name): Just use `append_gpp_mangled_name.'
7786 * mangle_name.c: New file.
7787
7788 2001-02-07 Per Bothner <per@bothner.com>
7789
7790 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
7791
7792 * check-init.c (check_init): Don't call done_alternative after
7793 processing loop code, as a LOOP_EXPR never terminates normally.
7794
7795 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
7796
7797 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
7798
7799 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7800
7801 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
7802 DECLs.
7803
7804 2001-02-06 Tom Tromey <tromey@redhat.com>
7805
7806 * lex.c (java_new_lexer): Longer error message.
7807
7808 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
7809 Alexandre Petit-Bianco <apbianco@cygnus.com>
7810
7811 * typeck.c (build_prim_array_type): Added leading comment.
7812 (build_java_array_type): Moved locals out of
7813 block. Always create the `data' field, fixed alignment to match
7814 C++.
7815
7816 2001-02-04 Tom Tromey <tromey@redhat.com>
7817
7818 * expr.c (java_lang_expand_expr): Don't bother recomputing
7819 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
7820 Fixes PR java/1866.
7821
7822 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7823
7824 * parse.y (process_imports): Save the original name of the import
7825 for better error report.
7826
7827 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
7828
7829 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
7830 of macros used when compiling jvspec.c.
7831 * jvspec.c (lang_specific_driver): Link with the shared
7832 libgcc by default.
7833
7834 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7835
7836 * check-init.c (check_init): Call internal_error instead of fatal.
7837 * expr.c (java_lang_expand_expr): Likewise.
7838 * jcf-parse.c (get_constant): Likewise.
7839 * mangle.c (java_mangle_decl): Likewise.
7840 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
7841 (operator_string): Likewise.
7842 * check-init.c (check_init): Call abort instead of fatal.
7843 * class.c (build_class_ref): Likewise.
7844 * constants.c (write_constant_pool): Likewise.
7845 * decl.c (start_java_method): Likewise.
7846 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
7847 (java_stack_dup, encode_newarray_type): Likewise.
7848 (build_java_array_length_access): Likewise.
7849 (build_java_check_indexed_type, expand_java_pushc): Likewise.
7850 (build_java_soft_divmod, build_invokeinterface): Likewise.
7851 * java-tree.h (INNER_CLASS_P): Likewise.
7852 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
7853 (give_name_to_class, get_class_constant): Likewise.
7854 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
7855 (find_constant_index, generate_bytecode_conditional): Likewise.
7856 (generate_bytecode_insns, perform_relocations): Likewise.
7857 * lex.c (java_unget_unicode, java_lex): Likewise.
7858 * mangle.c (mangle_type, mangle_record_type): Likewise.
7859 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
7860 (finish_mangling): Likewise.
7861 * parse.h (MARK_FINAL_PARMS): Likewise.
7862 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
7863 (obtain_incomplete_type, java_complete_class): Likewise.
7864 (java_check_regular_methods, java_complete_expand_method): Likewise.
7865 (cut_identifier_in_qualified, check_deprecation): Likewise.
7866 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
7867 (java_complete_lhs, lookup_name_in_blocks): Likewise.
7868 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
7869 * typeck.c (set_local_type, parse_signature_type): Likewise.
7870 (parse_signature_string, build_java_signature): Likewise;
7871 (set_java_signature): Likewise.
7872 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
7873 * class.c (add_method): Call fatal_error instead of fatal.
7874 (build_static_field_ref): Likewise.
7875 * expr.c (build_known_method_ref, expand_invoke): Likewise.
7876 * jcf-parse.c (get_constant, jcf_parse): Likewise.
7877 * lex.c (java_new_new_lexer): Likewise.
7878 * jv-scan.c (main): Likewise.
7879 (fatal_error): Renamed from fatal.
7880 * jcf-parse.c (yyparse): Call fatal_io_error instead of
7881 pfatal_with_name.
7882 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
7883 (yyparse): Likewise.
7884 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
7885 * lex.c (java_get_line_col): Likewise.
7886 * jcf-parse.c (load_class): Make errors non-fatal.
7887 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
7888
7889 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
7890
7891 * jvgenmain.c (class_mangling_suffix): Remove unused string.
7892 (error): Remove unused function.
7893 (main): Don't use "__attribute__ alias" on generated class symbol.
7894
7895 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
7896
7897 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
7898 argument.
7899 * parse.y (finish_method_declaration): Code accounting for WFLed
7900 method DECL_NAMEs deleted.
7901 (check_abstract_method_definitions): Likewise.
7902 (resolve_type_during_patch): Layout resolved type.
7903 * typeck.c (lookup_do): Removed unused local.
7904
7905 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
7906
7907 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
7908 * decl.c (init_decl_processing): Use integer_minus_one_node, not
7909 integer_negative_one_node.
7910 * expr.c (build_java_binop): Likewise.
7911
7912 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7913
7914 * zextract.c (read_zip_archive): Read file_offset before writing
7915 zipd and consequently clobbering the header contents.
7916
7917 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7918
7919 * Make-lang.in: Remove all dependencies on defaults.h.
7920 * decl.c: Don't include defaults.h.
7921 * expr.c: Likewise.
7922 * parse.y: Likewise.
7923
7924 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7925
7926 * ChangeLog (2001-01-21): Fixed typo.
7927 * class.c (layout_class_method): Code accounting for WFLed
7928 method DECL_NAMEs deleted.
7929 * constant.c (find_methodref_index): Likewise.
7930 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
7931 * java-tree.h (DECL_FUNCTION_WFL): New macro.
7932 (struct lang_decl): New field `wfl'.
7933 (java_get_real_method_name): Prototype deleted.
7934 * mangle.c (mangle_method_decl): Code accounting for WFLed
7935 method DECL_NAMEs deleted.
7936 * parse.h (GET_METHOD_NAME): Macro deleted.
7937 * parse.y (reset_method_name): Deleted.
7938 (method_header): Set DECL_FUNCTION_WFL.
7939 (check_abstract_method_header): Code accounting for WFLed method
7940 DECL_NAMEs deleted.
7941 (java_get_real_method_name): Deleted.
7942 (check_method_redefinition): Code accounting for WFLed method
7943 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
7944 (java_check_regular_methods): Likewise.
7945 (java_check_abstract_methods): Likewise.
7946 (java_expand_classes): Don't call `reset_method_name.'
7947 (search_applicable_method_list): Use DECL_NAMEs instead of
7948 GET_METHOD_NAME.
7949 * typeck.c (lookup_do): Code accounting for WFLed method
7950 DECL_NAMEs deleted.
7951
7952 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
7953
7954 * lex.c (java_read_char): Check for EOF from getc first.
7955
7956 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7957
7958 * class.c (layout_class): Don't lay the superclass out if it's
7959 already being laid out.
7960 * jcf-parse.c (handle_innerclass_attribute): New function.
7961 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
7962 handle_innerclasses_attribute.
7963 (jcf_parse): Don't load an innerclasses if it's already being
7964 laid out.
7965 * jcf-write.c (append_innerclass_attribute_entry): Static
7966 `anonymous_name' and its initialization deleted. `ocii' and `ini'
7967 to be zero for anonymous classes.
7968
7969 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7970
7971 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
7972 necessary.
7973 * jcf-parse.c (set_source_filename): Use
7974 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
7975
7976 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7977
7978 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
7979 gets a unique asm name.
7980
7981 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7982
7983 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
7984 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
7985 if necessary.
7986 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
7987 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
7988 * parse.y (lookup_package_type_and_set_next): Deleted.
7989 (resolve_package): Removed unnecessary code.
7990 (find_applicable_accessible_methods_list): `finit$' can't be
7991 inherited.
7992 * verify.c (pop_argument_types): Added missing prototype.
7993
7994 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
7995
7996 * config-lang.in: Disable java by default.
7997
7998 2001-01-23 Tom Tromey <tromey@redhat.com>
7999
8000 * gcj.texi (Copying): New node.
8001 Added copyright information.
8002
8003 2001-01-21 Per Bothner <per@bothner.com>
8004
8005 Various fixes to allow compiling a compressed .jar/.zip archive.
8006 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
8007 (struct ZipFile): Add fields name and next (from ZipFileCache).
8008 (struct ZipDirectory): New field zipf points to owning ZipFile.
8009 * jcf.h (struct ZipDirectory): Add forward declaration.
8010 (struct JCF): Declare zipd field to have type struct ZipDirectory.
8011 Remove seen_in_zip and zip_offset fields.
8012 (JCF_SEEN_IN_ZIP): New macro.
8013 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
8014 * jcf-io.c: Change all ZipFileCache to ZipFile.
8015 (read_zip_member): New function.
8016 (open_in_zip): Call read_zip_member.
8017 * jcf-parse.c (find_in_current_zip): Remove function.
8018 (read_class): Merge in find_in_current_zip functionality.
8019 Call read_zip_member if needed.
8020 (parse_zip_file_entries): Use read_zip_member.
8021 (process_zip_dir): Update for removed and added JCF fields.
8022 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
8023
8024 2001-01-21 Per Bothner <per@bothner.com>
8025
8026 Minor optimization of static ggc roots.
8027 * jcf-parse.c (parse_roots): New static field.
8028 (current_field, current_method, current_file_list): Replace by macros
8029 naming fields of parse_roots.
8030 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
8031 * class.c (class_roots): New static field.
8032 (registered_class, fields_ident, info_ident, class_list):
8033 New macros naming fields of parse_roots.
8034 (build_static_field_ref): Don't register roots here.
8035 (layout_class): Static field list replaced by macro class_list.
8036 (init_class_processing): Call ggc_add_tree_root for 4 roots.
8037 Initialize fields_ident and info_ident here.
8038
8039 2001-01-21 Per Bothner <per@bothner.com>
8040
8041 * jcf-parse.c (ggc_mark_jcf): New function.
8042 (init_jcf_parse): Register current_jcf as ggc root.
8043
8044 2001-01-21 Per Bothner <per@bothner.com>
8045
8046 * lang.c (put_decl_node): Print method's name.
8047
8048 2001-01-21 Per Bothner <per@bothner.com>
8049
8050 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
8051 (verify_jvm_instructions): Use it, for better error messages on loads.
8052
8053 2001-01-21 Per Bothner <per@bothner.com>
8054
8055 * verify.c (merge_type_state): Still may have to merge even if
8056 LABEL_VERIFIED (label).
8057
8058 2001-01-21 Per Bothner <per@bothner.com>
8059
8060 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
8061 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
8062
8063 2001-01-19 Per Bothner <per@bothner.com>
8064
8065 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
8066 if expeting an interface type. Refines Tom's change of 2000-09-12.
8067
8068 2001-01-18 Per Bothner <per@bothner.com>
8069
8070 * gcj.texi (Input Options): Mention .java files.
8071
8072 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8073
8074 * lang-options.h (-Wunsupported-jdk11): Removed.
8075 * lang.c (flag_not_overriding): Deleted.
8076 (flag_static_local_jdk1_1): Likewise.
8077 (lang_W_options): Removed "unsupported-jdk11" entry.
8078 * parse.y (java_check_methods): Removed dead code.
8079
8080 2001-01-17 Tom Tromey <tromey@redhat.com>
8081
8082 Changes suggested by Per Bothner:
8083 * gcj.texi (Input Options): Don't mention input files.
8084 (Code Generation): Updated --main information.
8085 (Invoking jcf-dump): Mention that --javap is incomplete.
8086 From Alexandre Petit-Bianco:
8087 (Warnings): Don't mention -Wunsupported-jdk11.
8088 My stuff:
8089 (Compatibility): Mention JDK 1.2-ness of libraries.
8090 (Resources): Mention resources used when writing gcj.
8091
8092 2001-01-17 Tom Tromey <tromey@redhat.com>
8093
8094 * gcj.texi: New file.
8095 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
8096 (java.info): Depend on gcj.info.
8097 (java/gcj.dvi): New target.
8098 (java.dvi): Depend on gcj.dvi.
8099 (java.install-info): Wrote.
8100
8101 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
8102
8103 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
8104 having called make_decl_rtl.
8105
8106 2001-01-14 Per Bothner <per@bothner.com>
8107
8108 Various patches to emit better messages on verification errors.
8109 * expr.c (push_type_0): Return error indication on stack overflow,
8110 instead of callinfg fatal.
8111 (push_type): Now just call push_type_0 (nd fatal on overflow).
8112 (pop_type_0): Return detailed error message (in a char** argument).
8113 (pop_type): If pop_type_0 fails, print error message.
8114 (pop_argument_types): Moved to verify.c.
8115 * verify.c (pop_argument_types): Moved from expr.c.
8116 Return a (possible) error message, rather than void.
8117 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
8118 (verify_jvm_instruction): Use new macros, improving error messages.
8119 For case OPCODE_astore use object_ptr_type_node.
8120 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
8121 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
8122
8123 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
8124 constant, return body without wrapper. (Improves constant folding.)
8125 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
8126
8127 2001-01-13 Per Bothner <per@bothner.com>
8128
8129 * expr.c (expand_java_field_op): Assigning to a final field outside
8130 an initializer does not violate JVM spec, so should be warning, not
8131 error. (Sun's verifier does not complain - though MicroSoft's does.)
8132
8133 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
8134
8135 * gjavah.c (version), jcf-dump.c (version): Update copyright year
8136 to 2001.
8137
8138 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
8139
8140 * parse.y (resolve_expression_name): Permit instance variables from
8141 enclosing context in super constructor call.
8142 (resolve_qualified_expression_name): Permit enclosing class's qualified
8143 "this" in super constructor call.
8144
8145 2001-01-10 Mark Mitchell <mark@codesourcery.com>
8146
8147 * class.c (build_utf8_ref): Remove last argument in call to
8148 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
8149 (build_class_ref): Likewise.
8150 (build_static_field_ref): Likewise.
8151 (get_dispatch_table): Likewise.
8152 (layout_class_method): Likewise.
8153 (emit_register_classes): Likewise.
8154 * constants.c (build_constant_data_ref): Likewise.
8155 * decl.c (builtin_function): Likewise.
8156 (create_primitive_vtable): Likewise.
8157 * expr.c (build_known_method_def): Likewise.
8158 (build_jni_stub): Likewise.
8159 (java_lang_expand_expr): Likewise.
8160
8161 2001-01-10 Tom Tromey <tromey@redhat.com>
8162
8163 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
8164
8165 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
8166
8167 * java-tree.h (lang_printable_name_wls): New prototype.
8168 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
8169 rather than `current_class' to print type name. Don't prepend type
8170 names when printing constructor names.
8171 (lang_printable_name_wls): New function.
8172 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
8173 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
8174 * parse.y (patch_method_invocation): Message tuned for constructors.
8175 (not_accessible_p): Grant `private' access from within
8176 enclosing contexts.
8177
8178 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8179
8180 All files with updated copyright when applicable.
8181 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
8182 * class.c (mangle_class_field): Function removed.
8183 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
8184 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
8185 (build_class_ref): Call `java_mangle_class_field' instead of
8186 `mangle_class_field.'
8187 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
8188 (layout_class): Call `java_mangle_decl' instead of
8189 `mangle_static_field.'
8190 (cxx_keywords): Initialized static array moved to `lex.c.'
8191 (layout_class_method): Changed leading comment. Simplified to
8192 call `java_mangle_decl.' Local `ptr' moved in for loop body.
8193 * decl.c (lang_mark_tree): Mark field `package_list.'
8194 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
8195 (struct lang_type): New field `package_list.'
8196 (unicode_mangling_length): Prototype removed.
8197 (append_gpp_mangled_name, append_gpp_mangled_classtype,
8198 emit_unicode_mangled_name): Likewise.
8199 (cxx_keyword_p): New prototype.
8200 (java_mangle_decl, java_mangle_class_field,
8201 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
8202 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
8203 `build_expr_wfl.'
8204 * jvgenmain.c (main_method_prefix): Global variable removed.
8205 (main_method_suffix): Likewise.
8206 (do_mangle_classname): New function.
8207 (main): Call it. Format changed to accommodate new mangling scheme.
8208 * lex.c: (utf8_cmp): Conditionally prototyped.
8209 (cxx_keywords): Moved from class.c, conditionally defined.
8210 (utf8_cmp, cxx_keyword_p): Likewise.
8211 * mangle.c (obstack.h, ggc.h): Included.
8212 (mangle_field_decl): New function.
8213 (mangle_method_decl, mangle_type, mangle_pointer_type,
8214 mangle_array_type, mangle_record_type,
8215 find_compression_pointer_match, find_compression_array_match,
8216 find_compression_record_match,
8217 find_compression_array_template_match, set_type_package_list,
8218 entry_match_pointer_p, emit_compression_string, init_mangling,
8219 finish_mangling, compression_table_add, mangle_member_name): Likewise.
8220 (mangle_obstack): New global.
8221 (MANGLE_RAW_STRING): New macro.
8222 (unicode_mangling_length): Turned static.
8223 (append_unicode_mangled_name): Renamed from
8224 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
8225 replaces `obstack', removed from the parameter list.
8226 (append_gpp_mangled_name): Turned static. `mangle_obstack'
8227 replaces parameter `obstack', removed from the parameter list. Call
8228 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
8229 (append_gpp_mangled_classtype): Removed.
8230 (compression_table, compression_next): New static variables.
8231 * parse.y (temporary_obstack): Extern declaration removed.
8232
8233 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
8234
8235 * parse.y (patch_binop): Compute missing type in error situations.
8236
8237 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
8238
8239 * class.c (make_class_data): Push initial value for "arrayclass".
8240 * decl.c (init_decl_processing): Add new class field "arrayclass".
8241
8242 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
8243
8244 From patha@softlab.ericsson.se:
8245 * parse.y (switch_label): Use build, not build1, to construct
8246 DEFAULT_EXPR.
8247
8248 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
8249
8250 * lang.c (lang_decode_option): Change -MA to -MP.
8251 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
8252 Update to new prototype; do quote targets.
8253 (jcf_dependency_write): Update.
8254
8255 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
8256
8257 Shorten primitive array allocation path:
8258 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
8259 to create new primitive arrays.
8260 * expr.c (build_newarray): If generating native code, call
8261 soft_newarray_node with a reference to the primitive TYPE identifier
8262 instead of type_value.
8263
8264 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
8265
8266 Fix for PRs gcj/312 and gcj/253:
8267 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
8268 dest if they arn't already.
8269 * class.c (layout_class): Call maybe_layout_super_class on
8270 superinterfaces also, but only if compiling from bytecode.
8271
8272 Fix for PR gcj/373:
8273 * parse.y (create_class): Set ACC_STATIC if class is declared in an
8274 interface.
8275
8276 2000-12-15 Tom Tromey <tromey@redhat.com>
8277
8278 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
8279 set.
8280
8281 2000-12-14 Andrew Haley <aph@redhat.com>
8282
8283 * boehm.c (mark_reference_fields): Change test to correctly detect
8284 bitmap overflow.
8285
8286 2000-12-15 Andreas Jaeger <aj@suse.de>
8287
8288 * config-lang.in (lang_dirs): Added.
8289
8290 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
8291
8292 * parse.y (end_artificial_method_body): Fixed undefined behavior.
8293 Credits go to rth for finding it.
8294
8295 2000-12-13 Mike Stump <mrs@wrs.com>
8296
8297 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
8298
8299 2000-11-07 Tom Tromey <tromey@cygnus.com>
8300
8301 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
8302 * lex.c (java_ignorable_control_p): Removed.
8303 (java_letter_or_digit_p): Removed.
8304 (java_start_char_p): New function.
8305 (java_read_char): Return `int', not `unicode_t'. Changed
8306 callers.
8307 (java_read_unicode): Likewise.
8308 (java_read_unicode_collapsing_terminators): Likewise.
8309 (java_get_unicode): Likewise.
8310 (java_new_lexer): Initialize hit_eof.
8311 (java_parse_end_comment): Take `int' argument.
8312 (java_parse_doc_section): Likewise.
8313 (java_parse_escape_sequence): Don't allow backlash-newline.
8314 Return `int'.
8315 * lex.h (JAVA_DIGIT_P): Removed.
8316 (_JAVA_LETTER_OR_DIGIT_P): Removed.
8317 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
8318 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
8319 (JAVA_PART_CHAR_P): New macro.
8320 (UEOF): Now -1.
8321 (JAVA_CHAR_ERROR): Now -2.
8322 (java_lexer): New field `hit_eof'.
8323 * chartables.h: New file.
8324 * gen-table.pl: new file.
8325
8326 2000-11-20 Tom Tromey <tromey@cygnus.com>
8327 Alexandre Petit-Bianco <apbianco@cygnus.com>
8328
8329 * parse.y (java_complete_lhs): Only allow compound assignment of
8330 reference type if type is String.
8331
8332 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8333
8334 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
8335 jcf-path.c: Likewise.
8336
8337 2000-12-09 Anthony Green <green@redhat.com>
8338
8339 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
8340 filestart and filename_length as int values.
8341
8342 2000-12-07 Mo DeJong <mdejong@redhat.com>
8343
8344 * jcf-io.c (find_class): Correct the logic that tests to see if a
8345 .java file is newer than its .class file. The compiler was
8346 incorrectly printing a warning when file mod times were equal.
8347
8348 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
8349
8350 * jvgenmain.c: Use ISPRINT not isascii.
8351
8352 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8353
8354 * parse.y (end_artificial_method_body): Fixed typo.
8355
8356 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
8357
8358 * parse.y (patch_method_invocation): Pick the correct enclosing
8359 context when creating inner class instances.
8360 Fixes gcj/332.
8361
8362 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
8363
8364 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8365 Update copyright year to 2000.
8366
8367 2000-11-23 Anthony Green <green@redhat.com>
8368
8369 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
8370 Move current_file_list out of yyparse and make it static.
8371
8372 * expr.c: Declare quick_stack and tree_list_free_list as static
8373 (init_expr_processing): Register quick_stack and
8374 tree_list_free_list roots.
8375
8376 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8377
8378 * parse.y (build_outer_field_access): New local `decl_ctx', use
8379 it. Check for field's context and current class immediate outer
8380 context inheritance.
8381 (outer_field_access_p): Consider fields inherited from the last
8382 enclosing context.
8383 (build_access_to_thisn): Stop at the last enclosing context if
8384 necessary.
8385 Fixes gcj/367.
8386
8387 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
8388
8389 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
8390
8391 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
8392
8393 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
8394 scratch buffer.
8395
8396 2000-11-20 Tom Tromey <tromey@cygnus.com>
8397
8398 * jv-scan.c (help): Document --complexity.
8399 (options): Added --complexity.
8400 (flag_complexity): New global.
8401 (main): Call `report'.
8402 * parse-scan.y (complexity): New global.
8403 (if_then_statement, if_then_else_statement,
8404 if_then_else_statement_nsi, switch_block_statement_group,
8405 while_expression, do_statement, for_begin, continue_statement,
8406 throw_statement, catch_clause, finally, method_invocation,
8407 conditional_and_expression, conditional_or_expression,
8408 conditional_expression): Update complexity.
8409 (reset_report): Reset complexity.
8410 (report): New function.
8411
8412 2000-11-20 Tom Tromey <tromey@cygnus.com>
8413
8414 * lex.c (yylex): Added STRICT_TK case.
8415 * parse.y (STRICT_TK): Added.
8416 * parse-scan.y (STRICT_TK): Added.
8417 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
8418 `;'. Use 4, not 3, with -k option. Correctly rename resulting
8419 file.
8420 * keyword.h: Rebuilt.
8421 * keyword.gperf (strictfp): Added.
8422
8423 2000-11-20 Tom Tromey <tromey@cygnus.com>
8424
8425 * lex.c (yylex): Recognize floating point constants with leading
8426 0.
8427
8428 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8429
8430 * java-tree.h (cyclic_inheritance_report): Constify.
8431 * parse.y (cyclic_inheritance_report): Likewise.
8432
8433 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
8434
8435 * parse.y (goal): Remove call to ggc_add_string_root.
8436
8437 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
8438
8439 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
8440 Create string in scratch buffer, then pass to build_string.
8441
8442 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
8443
8444 * parse.y (issue_warning_error_from_context): Add
8445 ATTRIBUTE_PRINTF.
8446
8447 2000-11-11 Anthony Green <green@redhat.com>
8448
8449 * jcf-parse.c (process_zip_dir): Add finput parameter.
8450 (jcf_figure_file_type): Call process_zip_dir with appropriate
8451 argument.
8452
8453 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8454
8455 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
8456 * jcf-parse.c (jcf_figure_file_type): Likewise.
8457
8458 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
8459
8460 * parse.y (create_new_parser_context): Use memset () instead of
8461 bzero ().
8462
8463 2000-11-08 Tom Tromey <tromey@cygnus.com>
8464
8465 * gjavah.c (process_file): Only include gcj/cni.h when generating
8466 CNI stubs.
8467
8468 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
8469
8470 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
8471 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
8472 instead of bzero ().
8473
8474 2000-11-05 Tom Tromey <tromey@cygnus.com>
8475
8476 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
8477 * lex.c (IS_ZERO): New define.
8478 (java_perform_atof): Error on floating point underflow.
8479
8480 2000-11-04 Tom Tromey <tromey@cygnus.com>
8481
8482 * lex.c (java_parse_escape_sequence): Only read two octal
8483 characters if the first one is greater than 3. Don't allow
8484 "octal" numbers to include the digits 8 or 9.
8485
8486 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
8487
8488 * Make-lang.in (java.distdir): Remove.
8489
8490 2000-11-03 Tom Tromey <tromey@cygnus.com>
8491
8492 * Make-lang.in (java.dvi): New target.
8493 Partial fix for PR other/567.
8494
8495 * lang-options.h: Mention -Wout-of-date.
8496 * jcf-dump.c (flag_newer): New global.
8497 * gjavah.c (flag_newer): New global.
8498 * jcf-io.c (find_class): Only warn when flag_newer set.
8499 * lang.c (flag_newer): New global.
8500 (struct string_option): New declaration.
8501 (lang_W_options): New global.
8502 (process_option_with_no): New function.
8503 (lang_decode_option): Use it.
8504
8505 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
8506 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
8507 `$'.
8508
8509 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
8510 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
8511 * lex.c (java_read_unicode): Removed `term_context' argument.
8512 Recognize any number of `u' in `\u'.
8513 (java_read_unicode_collapsing_terminators): New function.
8514 (java_get_unicode): Use it.
8515 (java_lineterminator): Removed.
8516 (yylex): Produce error if character literal is newline or single
8517 quote. Return if eof found in middle of `//' comment. EOF in
8518 `//' comment is only an error if pedantic.
8519 (java_ignorable_control_p): New function.
8520 (java_parse_end_comment): Return if eof found in middle of
8521 comment.
8522 Include flags.h.
8523 * jv-scan.c (pedantic): New global.
8524
8525 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
8526
8527 * parse.y (outer_field_access_p): Inherited fields aren't
8528 consider outer fields.
8529 (maybe_build_thisn_access_method): Use
8530 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
8531 (resolve_expression_name): Trigger an error if a static field
8532 is being accessed as an outer field.
8533
8534 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8535
8536 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
8537 Fixes gcj/365.
8538
8539 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
8540
8541 * Make-lang.in: Move all build rules here from Makefile.in,
8542 adapt to new context. Wrap all rules that change the current
8543 directory in parentheses. Expunge all references to $(P).
8544 When one command depends on another and they're run all at
8545 once, use && to separate them, not ;. Add OUTPUT_OPTION to
8546 all object-file generation rules. Delete obsolete variables.
8547
8548 * Makefile.in: Delete.
8549 * config-lang.in: Delete outputs= line.
8550
8551 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
8552
8553 * parse.y (patch_method_invocation): NULLify this_arg when already
8554 inserted.
8555 (maybe_use_access_method): Handle call to methods unrelated to the
8556 current class. Fixed comment.
8557 Fixes gcj/361.
8558
8559 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8560
8561 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
8562 scope.
8563
8564 2000-10-24 Tom Tromey <tromey@cygnus.com>
8565
8566 * lex.c (java_new_lexer): Initialize new fields. Work around
8567 broken iconv() implementations.
8568 (java_read_char): Swap bytes if required. Use fallback decoder if
8569 required.
8570 (byteswap_init, need_byteswap): New globals.
8571 (java_destroy_lexer): Only close iconv handle if it is in use.
8572 * lex.h (java_lexer): New fields read_anything, byte_swap,
8573 use_fallback.
8574 Made out_buffer unsigned.
8575
8576 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8577
8578 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
8579 where an enclosing context can be set on the jdep.
8580 (do_resolve_class): Fixed identation.
8581
8582 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8583
8584 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
8585
8586 * jcf-reader.c (peek_attribute, skip_attribute): Only define
8587 when requested.
8588
8589 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
8590
8591 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
8592
8593 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8594
8595 * jcf-write.c (OP1): Update `last_bc'.
8596 (struct jcf_block): Fixed indentation and typo in comments. New
8597 field `last_bc'.
8598 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
8599 follows `monitorenter'.
8600 * parse.y (patch_synchronized_statement): New local `tmp'. Call
8601 `patch_string'.
8602 Fixes gcj/232.
8603
8604 2000-10-16 Tom Tromey <tromey@cygnus.com>
8605
8606 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
8607 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
8608 * lang-options.h: Added -MA, -MT, -MF..
8609 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
8610 (DEPEND_TARGET_SET): New macro.
8611 (DEPEND_FILE_ALREADY_SET): Likewise.
8612 (init_parse): Handle new flags.
8613 * jcf.h (jcf_dependency_print_dummies): Declare.
8614 * Make-lang.in (s-java): Added mkdeps.o.
8615 * Makefile.in (BACKEND): Added mkdeps.o.
8616 (../gcjh$(exeext)): Added mkdeps.o.
8617 (../jcf-dump$(exeext)): Added mkdeps.o.
8618 * jcf-depend.c: Include mkdeps.h.
8619 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
8620 add_entry): Removed.
8621 (jcf_dependency_reset): Rewrote.
8622 (dependencies): New global.
8623 (jcf_dependency_set_target): Rewrote.
8624 (jcf_dependency_add_target): Likewise.
8625 (jcf_dependency_add_file): Likewise.
8626 (munge): Removed.
8627 (print_ents): Removed.
8628 (jcf_dependency_write): Rewrote.
8629 (print_dummies): New global.
8630 (jcf_dependency_print_dummies): New function
8631 (jcf_dependency_write): Call deps_dummy_targets if required.
8632
8633 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8634
8635 * gjavah.c (add_class_decl): Removed unused variables `tname',
8636 `tlen' and `name_index'.
8637 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
8638 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
8639 in `wfl_operator' with value.
8640 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
8641 (jcf_figure_file_type): Fixed identation.
8642 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
8643 * parse.y (analyze_clinit_body): New function.
8644 (static_initializer:): Reset `current_static_block'.
8645 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
8646 `wfl_operator' with new value.
8647 (lookup_cl): Use EXPR_WFL_FILENAME.
8648 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
8649 analyze_clinit_body.
8650 (build_outer_field_access): Access to this$<n> built from
8651 current_class, not its outer context.
8652 (build_access_to_thisn): Fixed leading comment. Tidied things up.
8653 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
8654 (patch_method_invocation): Use `is_static_flag' when already
8655 initialized.
8656 (patch_newarray): Removed assignment in ternary operator.
8657
8658 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8659
8660 * except.c (free_eh_ranges): Don't free `whole_range'.
8661
8662 2000-10-15 Anthony Green <green@redhat.com>
8663
8664 * decl.c (init_decl_processing): Call init_class_processing before
8665 anything else.
8666
8667 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8668
8669 * check-init.c (check_init): Fixed leading comment. Use
8670 LOCAL_FINAL_P.
8671 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8672 (give_name_to_locals): Likewise.
8673 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
8674 fields in lang_decl_var.
8675 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
8676 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
8677 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
8678 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
8679 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
8680 (LOCAL_FINAL): Rewritten.
8681 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
8682 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
8683 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
8684 `init_final' fields.
8685 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
8686 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
8687 (TYPE_HAS_FINAL_VARIABLE): New macro.
8688 (struct lang_type): Added `afv' field.
8689 * parse.y (check_static_final_variable_assignment_flag): New function.
8690 (reset_static_final_variable_assignment_flag): Likewise.
8691 (check_final_variable_local_assignment_flag): Likewise.
8692 (reset_final_variable_local_assignment_flag): Likewise.
8693 (check_final_variable_indirect_assignment): Likewise.
8694 (check_final_variable_global_assignment_flag): Likewise.
8695 (add_inner_class_fields): Use LOCAL_FINAL_P.
8696 (register_fields): Handle local finals and final variables.
8697 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
8698 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8699 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
8700 on local finals.
8701 (java_complete_expand_methods): Loop to set
8702 TYPE_HAS_FINAL_VARIABLE. Call
8703 `reset_final_variable_local_assignment_flag' and
8704 `check_final_variable_local_assignment_flag' accordingly before
8705 and after constructor expansion. Call
8706 `reset_static_final_variable_assignment_flag'
8707 before expanding <clinit> and after call
8708 `check_static_final_variable_assignment_flag' if the
8709 current_class isn't an interface. After all methods have been
8710 expanded, call `check_final_variable_global_assignment_flag' and
8711 `check_static_final_variable_assignment_flag' if the current class
8712 is an interface.
8713 (maybe_yank_clinit): Fixed typo in comment.
8714 (build_outer_field_access_methods): Removed old sanity check. Use
8715 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
8716 Don't create access methods for finals.
8717 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
8718 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
8719 existing DECL_INIT has been processed.
8720 (java_complete_lhs): Likewise.
8721 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
8722 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
8723 logic.
8724 (patch_assignment): Use LOCAL_FINAL_P.
8725 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
8726 DECL_INITIAL is nullified.
8727 Fixes gcj/163.
8728
8729 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8730
8731 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
8732
8733 * Makefile.in (parse.c, parse-scan.c): Likewise.
8734
8735 2000-10-12 Mark Mitchell <mark@codesourcery.com>
8736
8737 * class.c (temporary_obstack): Remove.
8738 (make_class): Don't mess with obstascks.
8739 (push_class): Likewise.
8740 (set_super_info): Likewise.
8741 (add_method_1): Likewise.
8742 (add_method): Likewise.
8743 (add_field): Likewise.
8744 (build_utf8_ref): Likewise.
8745 (build_class_ref): Likewise.
8746 (build_static_field_ref): Likewise.
8747 (finish_class): Likewise.
8748 (push_super_field): Likewise.
8749 (layout_class): Likewise.
8750 (layout_class_methods): Likewise.
8751 (init_class_processing): Likewise.
8752 * constants.c (get_tag_node): Likewise.
8753 (build_constant_data_ref): Likewise.
8754 * decl.c (ggc_p): Remove.
8755 (copy_lang_decl): Use ggc_alloc.
8756 (complete_start_java_method): Don't mess with obstacks.
8757 (start_java_method): Likewise.
8758 (end_java_method): Likewise.
8759 * except.c (link_handler): Use xmalloc.
8760 (free_eh_ranges): New function.
8761 (method_init_exceptions): Use it.
8762 (add_handler): Use xmalloc.
8763 (expand_start_java_handler): Don't mess with obstacks.
8764 (prepare_eh_table_type): Likewise.
8765 (expand_end_java_handler): Likewise.
8766 * expr.c (push_value): Likewise.
8767 (create_label_decl): Likewise.
8768 (build_jni_stub): Likewise.
8769 (java_lang_expand_expr): Likewise.
8770 (note_instructions): Use xrealloc.
8771 (java_push_constant_from_pool): Don't mess with obstacks.
8772 (process_jvm_instruction): Likewise.
8773 * java-tree.h (cyclic_inheritance_report): Remove duplicate
8774 declaration.
8775 * jcf-parse.c (get_constant): Don't mess with obstacks.
8776 (read_class): Likewise.
8777 (jcf_parse): Likewise.
8778 * lex.c (expression_obstack): Remove.
8779 (java_lex): Don't use obstack_free.
8780 * parse.h (exit_java_complete_class): Don't mess with obstacks.
8781 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
8782 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
8783 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
8784 * parse.y (gaol): Add more GC roots.
8785 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
8786 (lookup_field_wrapper): Likewise.
8787 (obtain_incomplete_type): Don't mess with obstacks.
8788 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
8789 macros.
8790 (craft_constructor): Don't mess with obstacks.
8791 (safe_layout_class): Likewise.
8792 (java_complete_class): Likewise.
8793 (source_end_java_method): Likewise.
8794 (build_outer_field_access_methods): Likewise.
8795 (build_outer_method_access_method): Likewise.
8796 (maybe_build_thisn_access_method): Likewise.
8797 (build_dot_class_method_invocation): Likewise.
8798 (java_complete_tree): Likewise.
8799 (java_complete_lhs): Likewise.
8800 (do_merge_string_cste): Likewise.
8801 (patch_string_cst): Likewise.
8802 (array_constructor_check_entry): Likewise.
8803 * typeck.c (build_java_array_type): Likewise.
8804 (parse_signature_string): Likewise.
8805 (build_java_signature): Likewise.
8806
8807 2000-10-12 Tom Tromey <tromey@cygnus.com>
8808
8809 Fix for PR gcj/356:
8810 * gjavah.c (add_class_decl): Don't special-case inner classes.
8811 (add_namelet): Likewise.
8812
8813 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
8814
8815 * java-tree.h: Constify current_encoding.
8816 * lang.c: Constify current_encoding.
8817
8818 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
8819
8820 * jvgenmain.c (class_mangling_suffix): Omit `.'.
8821 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
8822
8823 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8824
8825 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
8826 patch. Fixes gcj/340.
8827
8828 2000-10-10 Tom Tromey <tromey@cygnus.com>
8829
8830 * lex.c (java_new_lexer): Initialize out_first and out_last
8831 fields.
8832 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
8833
8834 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8835
8836 * parse.y (pop_current_osb): New function.
8837 (array_type:): Use `dims:', changed actions
8838 accordingly. Suggested by Anthony Green.
8839 (array_creation_expression:): Used pop_current_osb.
8840 (cast_expression:): Likewise.
8841 (search_applicable_method_list): Fixed indentation.
8842
8843 2000-10-08 Anthony Green <green@redhat.com>
8844
8845 * parse.y (array_type_literal): Remove production.
8846 (type_literals): Refer to array_type, not array_type_literal.
8847
8848 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
8849
8850 Patch contributed by Corey Minyard.
8851 * decl.c (check_local_named_variable): New function.
8852 (tree check_local_unnamed_variable): Likewise.
8853 (find_local_variable): Splitted. Call check_local_{un}named_variable.
8854
8855 2000-10-07 Anthony Green <green@redhat.com>
8856
8857 * class.c (layout_class): Handle case where superclass can't be
8858 layed out yet.
8859
8860 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
8861
8862 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
8863 gperf.
8864
8865 2000-10-05 Tom Tromey <tromey@cygnus.com>
8866
8867 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
8868 * jvgenmain.c (class_mangling_prefix): Removed.
8869 (class_mangling_suffix): New global.
8870 (main): Use it.
8871 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
8872 `$'.
8873 (print_method_info): Handle overrides for static and final
8874 methods.
8875 (process_file): Generate declaration for class object field.
8876 * class.c (cxx_keywords): New array.
8877 (utf8_cmp): New function.
8878 (cxx_keyword_p): New function.
8879 (layout_class_method): Mangle C++ keywords by appending `$'.
8880 (mangle_field): New function.
8881 (mangle_class_field): Use mangle_field. Mangle class name as
8882 `class$'.
8883 (mangle_static_field): Use mangle_field.
8884
8885 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
8886
8887 * decl.c (find_local_variable): Removed uncessary type check and
8888 fixed range check typo. From Corey Minyard.
8889
8890 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8891
8892 * decl.c (give_name_to_locals): New local `code_offset'. Call
8893 `maybe_adjust_start_pc'.
8894 * expr.c (note_instructions): New function.
8895 (expand_byte_code): Don't collect insn starts here.
8896 (peek_opcode_at_pc): New function.
8897 (maybe_adjust_start_pc): Likewise.
8898 * java-tree.h (maybe_adjust_start_pc): Declare.
8899 (note_instructions): Likewise.
8900 * jcf-parse.c (parse_class_file): Call `note_instructions'.
8901
8902 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
8903
8904 * parse.y (field_access:): Fixed indentation.
8905 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
8906
8907 2000-09-07 Tom Tromey <tromey@cygnus.com>
8908
8909 Fix for PR gcj/307:
8910 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
8911 JPRIMITIVE_TYPE_P, for arithmetic operators.
8912 (patch_method_invocation): Indentation fix.
8913 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
8914 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
8915 (do_unary_numeric_promotion): Cleaned up code.
8916 (valid_cast_to_p): Handle boolean correctly.
8917
8918 2000-09-27 Tom Tromey <tromey@cygnus.com>
8919
8920 * lex.c (java_read_unicode): Reset bs_count when finished with
8921 `\u' sequence.
8922
8923 2000-10-01 Mark Mitchell <mark@codesourcery.com>
8924
8925 Convert to GC.
8926 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
8927 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
8928 (typeck.o): Depend on ggc.h.
8929 * class.c (add_method_1): Use GC functions for allocation.
8930 (init_class_processing): Register roots.
8931 * decl.c (ggc_p): Set to 1.
8932 (pending_local_decls): Make it static.
8933 (push_jvm_slot): Use GC functions for allocation.
8934 (init_decl_processing): Register roots.
8935 (give_name_to_locals): Use GC functions for allocation.
8936 (lang_mark_tree): New function.
8937 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
8938 functions for allocation.
8939 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
8940 * lex.c (java_lex): Use build_string, rather than replicating it
8941 inline.
8942 * parse.y (goal): Add more roots.
8943 (mark_parser_ctxt): New function.
8944 * typeck.c: Include ggc.h.
8945
8946 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8947
8948 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
8949 contains something else than MODIFY_EXPR.
8950
8951 2000-09-23 Mark Mitchell <mark@codesourcery.com>
8952
8953 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
8954 * Makefile.in (parse.o): Depend on ggc.h.
8955 (class.o): Likewise.
8956 (constants.o): Likewise.
8957 (decl.o): Likewise.
8958 (expr.o): Likewise.
8959 (jcf-parse.o): Likewise.
8960 (jcf-write.o): Likewise.
8961 (mangle.o): Likewise.
8962 * class.c: Include ggc.h.
8963 (build_static_field_ref): Register GC roots.
8964 (layout_class): Likewise.
8965 (init_class_processing): Likewise.
8966 * constants.c: Include ggc.h.
8967 (current_constant_pool_data_ref): Remove.
8968 (tag_nodes): Move it to ...
8969 (get_tag_node): ... here. Register GC roots.
8970 * decl.c: Include ggc.h. Remove many global tree definitions.
8971 (throw_node): Define.
8972 (java_global_trees): Likewise.
8973 (predef_filenames): Make the size a constant.
8974 (init_decl_processing): Adjust accordingly.
8975 (init_decl_processing): Call init_jcf_parse. Register GC roots.
8976 * expr.c: Include ggc.h.
8977 (init_expr_processing): Register GC roots.
8978 (build_invokeinterface): Likewise.
8979 * java-tree.h: Replace extern tree declarations with macros.
8980 (java_global_trees): New variable.
8981 (java_tree_index): New enumeration.
8982 (init_jcf_parse): Declare.
8983 * jcf-parse.c: Include ggc.h.
8984 (current_class): Remove declaration.
8985 (main_class): Likewise.
8986 (all_class_list): Likewise.
8987 (predefined_filename_p): Adjust for constant size of
8988 predef_filenames.
8989 (init_jcf_parse): New function.
8990 * jcf-write.c: Include ggc.h.
8991 (generate_classfile): Register GC roots.
8992 (append_synthetic_attribute): Likewise.
8993 (append_innerclass_attribute_entry): Likewise.
8994 * lang.c: Include ggc.h.
8995 (lang_print_error): Register GC roots.
8996 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
8997 with macros.
8998 * parse.y: Include ggc.h.
8999 (wfl_operator): Remove.
9000 (goal): Register GC roots.
9001 (java_pop_parser_context): Adjust for new field names.
9002 (java_parser_context_save_global): Likewse.
9003 (java_parser_context_restore_global): Likewise.
9004 (java_parser_context_suspend): Likewise.
9005 (java_parser_context_resume): Likewise.
9006 (verify_constructor_circularity): Register GC roots.
9007 (lookup_cl): Likewise.
9008 (java_reorder_fields): Likewise.
9009 (build_current_this): Likewise.
9010 (class_in_current_package): Likewise.
9011 (argument_types_convertible): Likewise.
9012 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
9013
9014 2000-09-14 Tom Tromey <tromey@cygnus.com>
9015
9016 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
9017
9018 2000-09-13 Tom Tromey <tromey@cygnus.com>
9019
9020 * jcf-parse.c: Include <locale.h>.
9021 * jv-scan.c: Include <locale.h>.
9022
9023 2000-09-12 Tom Tromey <tromey@cygnus.com>
9024
9025 * expr.c (pop_type_0): Return `Object' if trying to merge two
9026 interface types.
9027 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
9028 interface types; `Object' is always a valid supertype.
9029
9030 2000-09-12 Tom Tromey <tromey@cygnus.com>
9031
9032 Fix for PR gcj/33:
9033 * jv-scan.c (help): Document --encoding.
9034 (options): Added `encoding' entry.
9035 (OPT_ENCODING): New define.
9036 (main): Handle --encoding.
9037 Include <langinfo.h> if nl_langinfo exists.
9038 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
9039 --encoding.
9040 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
9041 (parse_source_file): Correctly call java_init_lex. Added `finput'
9042 argument. Use nl_langinfo to determine default encoding.
9043 * java-tree.h (current_encoding): Declare.
9044 * parse.y (java_parser_context_restore_global): Don't restore
9045 `finput'.
9046 (java_parser_context_save_global): Don't set `finput' field.
9047 (java_pop_parser_context): Don't restore `finput'. Free old lexer
9048 if required.
9049 * lang.c (current_encoding): New global.
9050 (lang_decode_option): Recognize `-fencoding='.
9051 (finish_parse): Don't close finput.
9052 * parse.h (struct parser_ctxt): Removed `finput' and
9053 `unget_utf8_value' fields. Added `lexer' field.
9054 (java_init_lex): Fixed declaration.
9055 * lex.c (java_new_lexer): New function.
9056 (java_destroy_lexer): Likewise.
9057 (java_read_char): Added `lex' argument. Handle iconv case.
9058 (java_read_unicode): Added `lex' argument. Count backslashes in
9059 lexer structure.
9060 (java_init_lex): Added `finput' and `encoding' arguments. Set
9061 `lexer' field in ctxp.
9062 (BAD_UTF8_VALUE): Removed.
9063 (java_lex): Handle seeing UEOF in the middle of a string literal.
9064 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
9065 (java_lexer): New structure.
9066 (UNGETC): Removed.
9067 (GETC): Removed.
9068 (DEFAULT_ENCODING): New define.
9069 (java_destroy_lexer): Declare.
9070
9071 2000-09-12 Tom Tromey <tromey@cygnus.com>
9072
9073 Fix for PR gcj/343:
9074 * lex.c (java_init_lex): Initialize java_io_serializable.
9075 * parse.y (java_io_serializable): New global.
9076 (valid_ref_assignconv_cast_p): An array can be cast to
9077 serializable.
9078
9079 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
9080
9081 * decl.c, expr.c: Include defaults.h if not already included.
9082 Don't define the *_TYPE_SIZE macros.
9083
9084 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
9085
9086 * typeck.c (build_java_array_type): Correct first parameter
9087 in ADJUST_FIELD_ALIGN invocation.
9088
9089 2000-09-06 Tom Tromey <tromey@cygnus.com>
9090
9091 * lang-specs.h: Also recognize `-femit-class-files'.
9092
9093 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9094
9095 * verify.c (merge_types): Load the types to merge if necessary.
9096
9097 2000-09-02 Anthony Green <green@redhat.com>
9098
9099 * jcf-io.c: Include zlib.h.
9100 (open_in_zip): Read compressed class file archives.
9101 * zipfile.h (ZipDirectory): Add uncompressed_size and
9102 compression_method fields.
9103 * zextract.c (read_zip_archive): Collect file compression info.
9104
9105 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
9106
9107 * parse.y (do_resolve_class): Also explore superclasses of
9108 intermediate enclosing contexts when searching for inner classes.
9109
9110 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
9111
9112 * parse.y (variable_declarator_id:): Better error message.
9113 (expression_statement:): Use YYNOT_TWICE.
9114 (cast_expression:): Likewise.
9115 (assignment:): Likewise.
9116
9117 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
9118
9119 * parse.y (do_merge_string_cste): New locals. Create new
9120 STRING_CSTs each time, use memcpy. Fixes gcj/311.
9121
9122 2000-08-07 Hans Boehm <boehm@acm.org>
9123
9124 * boehm.c (mark_reference_fields): Set marking bits for all words in
9125 a multiple-word record.
9126 (get_boehm_type_descriptor): Use the procedure marking descriptor for
9127 java.lang.Class.
9128
9129 2000-08-31 Mike Stump <mrs@wrs.com>
9130
9131 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
9132 jcf-dump$(exeext)): Make parallel safe.
9133
9134 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
9135
9136 * jcf-parse.c (set_source_filename): Constify a char *.
9137 * jcf-write.c (append_innerclasses_attribute,
9138 make_class_file_name): Constify a char *. Don't recycle a
9139 variable for an unrelated purpose.
9140 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
9141 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
9142
9143 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9144
9145 * expr.c (can_widen_reference_to): Fixed indentation.
9146 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
9147 * parse.y: `finit$' replaces `$finit$' in comments.
9148 (try_builtin_assignconv): Fixed leading comment.
9149
9150 2000-08-25 Greg McGary <greg@mcgary.org>
9151
9152 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
9153
9154 2000-08-24 Greg McGary <greg@mcgary.org>
9155
9156 * lang.c (lang_decode_option): Use ARRAY_SIZE.
9157 * parse.y (BINOP_LOOKUP): Likewise.
9158
9159 2000-08-22 Andrew Haley <aph@cygnus.com>
9160
9161 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
9162 sign extending. Fixes gcj/321.
9163 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
9164 combining to make a jlong. Fixes gcj/321.
9165
9166 2000-08-21 Nix <nix@esperi.demon.co.uk>
9167
9168 * lang-specs.h: Do not process -o or run the assembler if
9169 -fsyntax-only.
9170
9171 2000-08-16 Andrew Haley <aph@cygnus.com>
9172
9173 * typeck.c (build_java_array_type): Rewrite code to do array
9174 alignment. Take into account back-end macros when aligning array
9175 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
9176 user to set alignment. Fixes gcj/252 and 160.
9177
9178 2000-08-09 Tom Tromey <tromey@cygnus.com>
9179
9180 * parse.y (check_abstract_method_definitions): Now return `int'.
9181 Check implemented interfaces. Fixes PR gcj/305.
9182
9183 * parse.y (patch_switch_statement): Disallow `long' in switch
9184 expressions. Fixes PR gcj/310.
9185
9186 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
9187
9188 * decl.c (finit_leg_identifier_node): New global.
9189 (init_decl_processing): Use `finit$' to initialize
9190 finit_identifier_node. Use `$finit$' to initialize
9191 finit_leg_identifier_node.
9192 * expr.c (expand_java_field_op): Use ID_FINIT_P.
9193 * java-tree.h (finit_identifier_node): Changed attached comment.
9194 (finit_leg_identifier_node): New declaration.
9195 (ID_FINIT_P): Take finit_identifier_node and
9196 finit_leg_identifier_node into account. This is a backward
9197 compatibility hack.
9198
9199 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9200
9201 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
9202 Jan 6 2000 patch.
9203 (generate_bytecode_insns): Check `nargs' before emitting it.
9204 * verify.c (merge_type_state): Fixed typo.
9205 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
9206 generate_bytecode_{conditional,insns}.
9207
9208 2000-08-13 Anthony Green <green@redhat.com>
9209
9210 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
9211 for -pg builds).
9212
9213 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9214
9215 * class.c (maybe_layout_super_class): Fixed indentation.
9216 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
9217 (java_check_methods): New function declaration.
9218 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
9219 instead of `str_ptr'.
9220 * jcf-write.c (generate_bytecode_insns): Emit number the of args
9221 of a `invokeinterface' at the right time.
9222 * parse.h (WFL_STRIP_BRACKET): New macro.
9223 (SET_TYPE_FOR_RESOLUTION): Use it.
9224 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
9225 (check_class_interface_creation): Don't check for cross package
9226 innerclass name clashes.
9227 (method_header): Behave properly if MDECL is `error_mark_node'.
9228 (method_declarator): Return `error_mark_node' if bogus current
9229 class.
9230 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
9231 (resolve_and_layout): New local `decl_type', set and used. Call
9232 java_check_methods.
9233 (java_check_methods): New method.
9234 (java_layout_classes): Use it.
9235 (resolve_qualified_expression_name): No EH check necessary in
9236 access$<n>.
9237 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
9238 `case' statement.
9239 (patch_assignment): Set DECL_INITIAL on integral final local.
9240
9241 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
9242
9243 * java-tree.h (flag_extraneous_semicolon): New extern.
9244 * lang-options.h: (-Wextraneous-semicolon): New option.
9245 * lang.c (flag_redundant): Fixed typo in leading comment.
9246 (flag_extraneous_semicolon): New global.
9247 (lang_decode_option): Set `flag_extraneous_semicolon' when
9248 -Wall. Decode `-Wextraneous-semicolon'.
9249 * parse.y (type_declaration:): Removed `SC_TK' hack, added
9250 `empty_statement' rule.
9251 (class_body_declaration): Likewise.
9252 (method_body:): Accept `;' as a method body.
9253 (static_initializer:): Removed `SC_TK' hack.
9254 (constructor_block_end:): Likewise.
9255 (empty_statement:): Report deprecated empty declaration. Fixes
9256 gcj/295
9257
9258 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9259
9260 * parse.y (build_dot_class_method_invocation): Changed parameter
9261 name to `type'. Build signature from `type' and convert it to a
9262 STRING_CST if it's an array.
9263 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
9264 to use `ref_type' directly.
9265
9266 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
9267
9268 * lang-options.h: Added a comma after the last element to avoid
9269 syntax errors when other languages define additional options.
9270
9271 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
9272
9273 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
9274 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
9275 (jc1): Link with $(BACKEND).
9276 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
9277
9278 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
9279
9280 * jvspec.c: Adjust type of second argument to
9281 lang_specific_driver, and update code as necessary.
9282
9283 * class.c (build_dtable_decl): Initialize dummy.
9284
9285 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9286
9287 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
9288 method bodies not to rule out discarding `<clinit>'; don't use
9289 <clinit> to initialize static fields with constant initializers.
9290
9291 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9292
9293 * gjavah.c (print_method_info): Added `synth' parameter. Skip
9294 synthetic methods.
9295 (method_synthetic): New global.
9296 (HANDLE_METHOD): Recognize synthetic method and tell
9297 `print_method_info' about it.
9298 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
9299 processing a synthetic method.
9300 * jcf-reader.c (skip_attribute): New function.
9301 ( skip_attribute): Likewise.
9302
9303 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9304
9305 * parse.y (build_outer_field_access): Fixed comments.
9306 (fix_constructors): Emit the initialization of this$<n> before
9307 calling $finit$.
9308 (resolve_qualified_expression_name): Build an access to `decl' if
9309 necessary.
9310
9311 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
9312
9313 * parse-scan.y (curent_class): Non longer const.
9314 (inner_qualifier, inner_qualifier_length): Deleted.
9315 (current_class_length): New global.
9316 (bracket_count): Fixed typo in leading comment.
9317 (anonymous_count): New global.
9318 (class_instance_creation_expression:): Handle anonymous classes.
9319 (anonymous_class_creation:): New rule.
9320 (push_class_context): Rewritten.
9321 (pop_class_context): Likewise.
9322 (INNER_QUALIFIER): Macro deleted.
9323 (report_class_declaration): call `push_class_context' when
9324 entering the function. `fprintf' format modified not to use
9325 INNER_QUALIFIER.
9326 (report_class_declaration): Assign `package_name' and
9327 `current_class' to NULL separately.
9328
9329 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
9330
9331 * expr.c (build_invokeinterface): Call layout_class_methods on
9332 target interface.
9333
9334 2000-07-27 Tom Tromey <tromey@cygnus.com>
9335 Anthony Green <green@cygnus.com>
9336 Alexandre Petit-Bianco <apbianco@cygnus.com>
9337
9338 * class.c (make_class_data): Create vtable for abstract classes.
9339 (get_dispatch_table): Changed to cope with abstract classes.
9340
9341 2000-07-27 Tom Tromey <tromey@cygnus.com>
9342
9343 * parse.y (patch_method_invocation): Don't reverse the argument
9344 list when dealing with anonymous class constructors. Fixed typo in
9345 comment.
9346
9347 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9348
9349 * parse.y (build_alias_initializer_parameter_list): Reverse
9350 crafted list when building aliases for anonymous class
9351 constructors.
9352
9353 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9354
9355 * parse.y (jdep_resolve_class): Don't bother checking potential
9356 innerclass access if `decl' is NULL.
9357 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
9358 WFL.
9359
9360 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9361
9362 * parse.c: Remove (again.)
9363
9364 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9365
9366 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
9367 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
9368 outside the `if' statement, alias to innerclass removed, `decl'
9369 used to mark the class complete.
9370
9371 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9372
9373 * parse.y (simple_name:): Fixed typo in error message.
9374
9375 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9376
9377 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
9378 or its first operand can be error marks.
9379
9380 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9381
9382 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
9383 * parse.y (method_header): Likewise.
9384
9385 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9386
9387 * parse.y (process_imports): Consider that one might be trying to
9388 import an innerclass. Fixes gcj/254
9389
9390 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9391
9392 * parse.y (find_as_inner_class): Handle the case where the
9393 enclosing context of an innerclass has been loaded as bytecode.
9394
9395 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9396
9397 * parse.y (simple_name:): Reject `$' in type names.
9398 (resolve_type_during_patch): Use `type' as a second
9399 argument to resolve_no_layout. Fixes gcj/257.
9400
9401 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
9402
9403 * parse.y (find_most_specific_methods_list): Select the only
9404 non-abstract method even if max has been set.
9405 Fixes gcj/285, gcj/298.
9406
9407 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
9408
9409 * lang-specs.h: Added %(jc1) to java compiler options.
9410
9411 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
9412
9413 * .cvsignore: New file.
9414
9415 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9416
9417 * parse.y (not_accessible_p): Access granted to innerclasses
9418 (indirectly) extending the reference type. Fixes gcj/249.
9419
9420 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9421
9422 * parse.y (patch_method_invocation): Fixed comment.
9423 (maybe_use_access_method): Build this$<n>s to the context of the
9424 target method, or a type that extends it. Fixes gcj/242.
9425
9426 2000-07-13 Mark Mitchell <mark@codesourcery.com>
9427
9428 * parse.c: Remove.
9429
9430 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9431
9432 * parse.y (fold_constant_for_init): Avoid bullish conversion.
9433
9434 2000-07-13 Tom Tromey <tromey@cygnus.com>
9435
9436 * lang-specs.h: Added %{I*}.
9437
9438 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
9439
9440 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
9441
9442 2000-07-12 Mark Mitchell <mark@codesourcery.com>
9443
9444 * parse-scan.c: Remove.
9445
9446 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9447
9448 * class.c (set_super_info): Handled protected inner classes.
9449 (common_enclosing_context_p): Bail early if arguments aren't both
9450 inner classes.
9451 (get_access_flags_from_decl): Handle private and protected inner
9452 classes.
9453 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
9454 (CLASS_PROTECTED): Likewise.
9455 (struct lang_type): New bitfield `poic'.
9456 * parse.y (jdep_resolve_class): Call check_inner_class_access on
9457 inner classes only.
9458 (check_inner_class_access): Renamed arguments, added
9459 comments. Handles protected inner classes (fixes gcj/225)
9460 (not_accessible_p): Fixed comments. Avoid handling inner classes.
9461
9462 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9463
9464 * parse.y (resolve_qualified_expression_name): Verify qualified
9465 access to `this'. Fixes gcj/239.
9466
9467 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9468
9469 * jcf-write.c (generate_classfile): Don't install ConstantValue
9470 for null pointers.
9471
9472 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9473
9474 * parse.y (resolve_qualified_expression_name): Handle inner class
9475 access. Fixes gcj/256.
9476
9477 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9478
9479 * jcf-write.c (generate_classfile): Properly install the
9480 ConstantValue attribute and the initial value constant pool index
9481 on string constants.
9482 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
9483 class files.
9484
9485 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9486
9487 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
9488 construct.
9489 * parse.y (find_as_inner_class): Fixed typo.
9490 (do_resolve_class): Explore enclosing contexts when searching for
9491 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
9492 (check_inner_class_access): Check `decl' which can be null in case
9493 of previous errors.
9494
9495 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9496
9497 * java-tree.h (java_debug_context): Declared `extern'.
9498 (safe_layout_class): Likewise.
9499 * parse.y (resolve_field_access): Field must be `static' in order
9500 to be replaced by its initial value. Added comments.
9501 (find_applicable_accessible_methods_list): Fixed typo.
9502 (find_most_specific_methods_list): Methods found in innerclasses
9503 take over methods founds in the enclosing contexts.
9504 (java_complete_tree): Loosen restrictions on the type of DECLs
9505 that can be replaced by their initialization values.
9506 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
9507
9508 2000-07-05 Tom Tromey <tromey@cygnus.com>
9509
9510 * Make-lang.in (PARSE_DIR): New macro.
9511 (PARSE_RELDIR): Likewise.
9512 (PARSE_C): Likewise.
9513 (PARSE_SCAN_C): Likewise.
9514 ($(PARSE_C)): New target.
9515 ($(PARSE_SCAN_C)): Likewise.
9516 (SET_BISON): New macro.
9517 (BISONFLAGS): Likewise.
9518 (JAVABISONFLAGS): Likewise.
9519
9520 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
9521
9522 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
9523 argument on the first pass for CNI as well as JNI.
9524 (print_method_info): Set up method name on the first pass only.
9525
9526 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9527
9528 * parse.y (parser_qualified_classname): Removed parameter
9529 `is_static'.
9530 (create_interface): Removed first passed parameter to
9531 parser_qualified_classname.
9532 (create_class): Likewise. Don't install alias on static
9533 innerclasses. Fixes gcj/275.
9534
9535 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9536
9537 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
9538 debugable statement with empty_stmt_node. Fixes gcj/272
9539
9540 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9541
9542 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
9543 gcj/271.
9544
9545 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9546
9547 * jcf-write.c (push_long_const): Appropriately cast short negative
9548 constant to jword.
9549
9550 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
9551
9552 * parse.y (verify_constructor_super): Use loop variable
9553 `m_arg_type' initialized with `mdecl_arg_type'.
9554
9555 2000-06-29 Tom Tromey <tromey@cygnus.com>
9556
9557 * parse.y (resolve_field_access): Handle case where `type_found'
9558 is NULL.
9559
9560 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9561
9562 * expr.c (lookup_field): The same field can be found through two
9563 different interface. Don't declare it ambiguous in that case.
9564
9565 2000-06-27 Tom Tromey <tromey@cygnus.com>
9566
9567 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
9568 follows \r, then unget it at a lower level.
9569
9570 2000-06-26 Tom Tromey <tromey@cygnus.com>
9571
9572 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
9573 java_complete_tree.
9574
9575 2000-06-25 Tom Tromey <tromey@cygnus.com>
9576
9577 * parse.y (for_statement): Wrap expression in a WFL if it is a
9578 constant. For PR gcj/268.
9579
9580 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9581
9582 * parse.y (do_resolve_class): Minor optimiztion in the package
9583 list search. Removed unnecessary test and return statement.
9584 (valid_ref_assignconv_cast_p): Order of arguments to
9585 enclosing_context_p fixed.
9586
9587 2000-06-24 Tom Tromey <tromey@cygnus.com>
9588
9589 * expr.c (lookup_field): Print error and return error_mark_node if
9590 field reference is ambiguous.
9591
9592 * parse.y (check_abstract_method_definitions): Also check if
9593 `other_method' is abstract.
9594
9595 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9596
9597 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
9598 classes.
9599 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
9600 (struct lang_type): New field `pic'.
9601 (CLASS_PRIVATE): New macro.
9602 * parse.y (check_inner_class_access): New function.
9603 (jdep_resolve_class): Call it.
9604
9605 2000-06-23 Tom Tromey <tromey@cygnus.com>
9606
9607 * parse.y (patch_incomplete_class_ref): Initialize the returned
9608 class. For PR gcj/260.
9609
9610 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9611
9612 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
9613
9614 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9615
9616 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9617 Java specific checks.
9618 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
9619 screened by DECL_P.
9620 * java-tree.def (CASE_EXPR): Marked 'e'.
9621 (DEFAULT_EXPR): Likewise.
9622 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
9623 screened by DECL_P.
9624 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
9625 Java specific checks.
9626 (generate_bytecode_insns): Test try_block for BLOCK before using
9627 BLOCK_EXPR_BODY.
9628 * parse.y (build_wfl_wrap): Added `location' argument. Set
9629 EXPR_WFL_LINECOL accordingly.
9630 (dim_expr:): Wrap constants with WFLs.
9631 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
9632 (resolve_package): Check for `stmt' not being a BLOCK before
9633 building a debuggable statement with it.
9634 (make_qualified_primary): Added extra parameter to build_wfl_wrap
9635 invocation.
9636 (resolve_field_access): Make sure `decl' is a DECL before treating
9637 it as such.
9638 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
9639 IDENTIFIER_NODE before treating it as such.
9640 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
9641 treating it as such.
9642 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
9643 to be applied only on non array types.
9644
9645 2000-06-16 Per Bothner <per@bothner.com>
9646
9647 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
9648 define in terms of DECL_RESULT, as that fails when --enable-checking.
9649
9650 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9651
9652 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
9653 types the same in comparison.
9654 (CHECK_OP): Add static prototype.
9655
9656 2000-06-13 Jakub Jelinek <jakub@redhat.com>
9657
9658 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
9659 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
9660 * parse.c: Rebuilt.
9661
9662 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9663
9664 * decl.c (create_primitive_vtable): Prototype.
9665
9666 * jcf-write.c (generate_bytecode_insns): Initialize variable
9667 `saved_context'.
9668
9669 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
9670
9671 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
9672
9673 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
9674 to track searched classes, and do not search the same class more than
9675 once. Call find_applicable_accessible_methods_list on immediate
9676 superclass, instead of search_applicable_method_list on all ancestors.
9677 Fix for PR gcj/238.
9678
9679 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
9680
9681 * parse.y (register_fields): Permit static fields in inner classes
9682 if they are final. Fix for PR gcj/255.
9683
9684 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9685
9686 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
9687 * parse.y (find_in_imports): Returned type changed to void,
9688 leading comment fixed.
9689 (register_package): New function.
9690 (qualify_and_find): Likewise.
9691 (package_declaration:): Use `register_package'.
9692 (single_type_import_declaration:): Removed local variable
9693 `node'. Added missing `;' for consistency.
9694 (type_import_on_demand_declaration:): Use `chainon' to link new
9695 entries.
9696 (lookup_field_wrapper): Lookup local variables defined in outer
9697 contexts first.
9698 (java_complete_class): Don't reverse the list of imported on demand.
9699 (do_resolve_class): Reorganized. Removed local variable
9700 `original_name'. Call `qualify_and_find' with the current package
9701 name, invoke `find_in_imports_on_demand' right after. Call
9702 `qualify_and_find' with the packages we've seen so far. Fixed
9703 operations numbering in comments.
9704 (java_expand_class): Don't reverse `package_list'.
9705 (find_most_specific_methods_list): New local variables `abstract'
9706 and `candidates'. Use them to pick the right method.
9707
9708 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
9709
9710 * parse.y (check_modifiers_consistency): Don't subtract out
9711 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
9712
9713 2000-06-04 Philipp Thomas <pthomas@suse.de>
9714
9715 * Makefile.in (INTLLIBS): New.
9716 (LIBS): Add above.
9717 (DEPLIBS): Ditto.
9718
9719 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9720
9721 * class.c (get_dispatch_table): Build the vtable dummy entry list
9722 element with a null purpose. Fixed leading comment.
9723 (build_dtable_decl): Build an accurate dtable type when appropriate
9724 and use it.
9725
9726 2000-06-02 Richard Henderson <rth@cygnus.com>
9727
9728 * lang.c (lang_get_alias_set): New.
9729
9730 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
9731
9732 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
9733 before using it as the accessed field.
9734
9735 2000-05-31 Tom Tromey <tromey@cygnus.com>
9736
9737 * java-tree.h (boolean_array_vtable, byte_array_vtable,
9738 char_array_vtable, short_array_vtable, int_array_vtable,
9739 long_array_vtable, float_array_vtable, double_array_vtable):
9740 Declare.
9741 * expr.c (get_primitive_array_vtable): New function.
9742 (create_primitive_vtable): New function.
9743 (java_lang_expand_expr): Enable code to statically generate
9744 arrays.
9745 * decl.c (init_decl_processing): Create primitive vtables.
9746 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
9747 short_array_vtable, int_array_vtable, long_array_vtable,
9748 float_array_vtable, double_array_vtable): Define.
9749
9750 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
9751
9752 * java/parse.y (find_applicable_accessible_methods_list):
9753 Don't add an uninitialized value to the list.
9754
9755 2000-05-25 Tom Tromey <tromey@cygnus.com>
9756
9757 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
9758 when trying to see if field's class should be initialized. Always
9759 initialize field's declaring class, not qualified class.
9760 For PR gcj/162.
9761
9762 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
9763 `wfl_operator', to maybe_build_primttype_type_ref.
9764 Fixes PR gcj/235.
9765
9766 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
9767
9768 * parse.y (patch_method_invocation): Don't try to lookup methods
9769 in primitive types.
9770
9771 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9772
9773 * parse.y (resolve_field_access): Call the appropriate <clinit>
9774 before accessing the length of a static array. Craft a decl for
9775 the field while its time. Fixes PR gcj/129.
9776
9777 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9778
9779 * parse.y (resolve_package): Correctly set `*next' (was off by
9780 one.)
9781 (resolve_qualified_expression_name): Fixed comment.
9782
9783 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9784
9785 * jcf-parse.c (jcf_parse_source): Reset current_class and
9786 current_function_decl to NULL before parsing a new file.
9787
9788 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9789
9790 * parse.y (block_end:): If the collected block doesn't feature a
9791 statement, insert an empty statement.
9792
9793 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9794
9795 * parse.y (maybe_yank_clinit): New function.
9796 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
9797 end of the list of methods belonging to a class.
9798 (java_complete_expand_method): Check whether <clinit> is really
9799 necessary and expand it accordingly.
9800
9801 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9802
9803 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
9804 processed by the method's switch statement.
9805
9806 2000-05-19 Tom Tromey <tromey@cygnus.com>
9807
9808 * java-tree.h: Added init state enum.
9809 * decl.c (emit_init_test_initialization): Initialize class
9810 initialization check variable by looking at class' state.
9811
9812 2000-05-19 Tom Tromey <tromey@cygnus.com>
9813
9814 * java-tree.h (build_instanceof): Declare.
9815 (build_get_class): Declare.
9816 * parse.y (patch_binop): Use build_instanceof.
9817 * expr.c (build_instanceof): New function. If class is final,
9818 don't make a function call.
9819 (expand_java_INSTANCEOF): Use it.
9820 (build_get_class): New function.
9821
9822 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
9823
9824 * jcf-write.c (generate_classfile): Scan the source_file for
9825 slashes with the right pointer variable.
9826
9827 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
9828
9829 * lang.c (lang_decode_option): Update -Wunused flags by calling
9830 set_Wunused.
9831 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
9832
9833 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
9834
9835 * check_init.c (check_init): Constify local char *.
9836 * class.c (push_class): Constify local char *.
9837 * java_tree.h: Update prototypes.
9838 * jcf-io.c (open_class): Constify filename parameter and
9839 return value.
9840 (find_class): Remove redundant string copy. Cast return from
9841 open_class.
9842 * jcf-parse.c (read_class, parse_class_file, yyparse):
9843 Constify local char *.
9844 * jcf-write.c (generate_bytecode_insns, generate_classfile):
9845 Constify local char *.
9846 * jcf.h (JCF): Constify filename and classname.
9847 (JCF_FINISH): Cast args to FREE to char * when appropriate.
9848 * lang.c (init_parse): Constify parameter and return value.
9849 * lex.c (java_get_line_col): Constify filename parameter.
9850 * parse.h: Constify parser_ctxt.filename. Update prototypes.
9851 * parse.y (java_parser_context_suspend,
9852 issue_warning_error_from_context, safe_layout_class): Constify
9853 local char *.
9854 * parse.c: Regenerate.
9855
9856 2000-05-08 Tom Tromey <tromey@cygnus.com>
9857
9858 * expr.c (build_jni_stub): Cache the result of
9859 _Jv_LookupJNIMethod.
9860
9861 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9862
9863 * decl.c (predef_filenames_size): Now 7.
9864 (predef_filenames): New seventh entry.
9865
9866 2000-05-04 Tom Tromey <tromey@cygnus.com>
9867
9868 * boehm.c (mark_reference_fields): Don't mark RawData fields.
9869 Keep track of when we've seen a reference field after a
9870 non-reference field.
9871 (get_boehm_type_descriptor): Handle case where we see
9872 non-reference fields but no trailing reference field.
9873 * decl.c (rawdata_ptr_type_node): Define.
9874 (init_decl_processing): Initialize rawdata_ptr_type_node.
9875 * java-tree.h (rawdata_ptr_type_node): Declare.
9876
9877 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9878
9879 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
9880 specifiers in calls to fprintf.
9881
9882 2000-05-03 Andrew Haley <aph@cygnus.com>
9883
9884 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
9885
9886 * javaop.h (WORD_TO_INT): New function.
9887 (IMMEDIATE_s4): Use WORD_TO_INT.
9888 * jcf.h (JPOOL_INT): Ditto.
9889
9890 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
9891 separator.
9892
9893 2000-04-19 Tom Tromey <tromey@cygnus.com>
9894
9895 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
9896 on native function.
9897 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
9898 JNI methods.
9899 * expr.c (build_jni_stub): New function.
9900 * lang-specs.h: -fjni and -femit-class-file are incompatible.
9901 * parse.c: Rebuilt.
9902 * parse.y (java_complete_expand_methods): Expand a native method
9903 and call build_jni_stub if -fjni given.
9904 * lang-options.h: Document -fjni.
9905 * lang.c (flag_jni): New global.
9906 (lang_f_options): Added `jni' entry.
9907 * java-tree.h (soft_lookupjnimethod_node,
9908 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
9909 Declare.
9910 (flag_jni): Declare.
9911 (build_jni_stub): Declare.
9912 (struct lang_decl): Added `native' flag.
9913 (METHOD_NATIVE): Redefined to use `native' field of lang specific
9914 structure.
9915 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
9916 soft_jnipopsystemframe_node): New globals.
9917 (init_decl_processing): Set them. _Jv_InitClass only takes one
9918 argument.
9919
9920 * java-tree.def: Put into `C' mode.
9921
9922 2000-04-27 Tom Tromey <tromey@cygnus.com>
9923
9924 Fix for PR gcj/2:
9925 * expr.c (expand_invoke): Generate check to see if object pointer
9926 is null in nonvirtual invocation case.
9927 * java-tree.h (soft_nullpointer_node): Declare.
9928 * decl.c (soft_nullpointer_node): New global.
9929 (init_decl_processing): Initialize soft_nullpointer_node.
9930 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
9931 or `private' methods.
9932 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
9933
9934 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
9935
9936 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9937 from <clinit>
9938
9939 2000-04-26 Tom Tromey <tromey@cygnus.com>
9940
9941 * zextract.c (find_zip_file_start): New function.
9942 (read_zip_archive): Use it.
9943
9944 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9945
9946 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
9947
9948 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9949
9950 * class.c (common_enclosing_context_p): New function.
9951 * java-tree.h (common_enclosing_context_p): Added prototype.
9952 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
9953 classes sharing an outer context with the current instance.
9954 * parse.y (build_access_to_thisn): Fixed leading comment.
9955 (verify_constructor_super): New local `supper_inner'. Skip
9956 enclosing context argument in the case of inner class constructors.
9957 (patch_method_invocation): Insert proper context as second
9958 parameter to pure inner class constructor super invocations.
9959
9960 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9961
9962 * parse.y (end_class_declaration): Reset the interface number
9963 counter.
9964
9965 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9966
9967 * parse.y (source_start_java_method): Deleted unnecessary code.
9968 (patch_method_invocation): Fixed comment.
9969
9970 2000-04-24 Robert Lipe <robertlipe@usa.net>
9971
9972 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
9973
9974 2000-04-23 Tom Tromey <tromey@cygnus.com>
9975
9976 * boehm.c (mark_reference_fields): Use int_byte_position.
9977
9978 2000-04-22 Tom Tromey <tromey@cygnus.com>
9979
9980 * boehm.c (mark_reference_fields): Only call byte_position on
9981 non-static fields.
9982
9983 2000-04-22 Tom Tromey <tromey@cygnus.com>
9984
9985 * boehm.c (mark_reference_fields): Added `last_view_index'
9986 argument. Use DECL_FIELD_OFFSET to determine field's offset.
9987
9988 2000-04-20 Mo DeJong <mdejong@cygnus.com>
9989
9990 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
9991 * parse.y (check_class_interface_creation): Fixed comments. Select
9992 permitted modifiers for (inner) interfaces. Changed error message
9993 to report rejected modifiers used with local classes.
9994
9995 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9996
9997 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
9998 of directly inherited type considered in scope.
9999 * parse.y (do_resolve_class): Search inherited classes for inner
10000 classes.
10001
10002 2000-04-20 Tom Tromey <tromey@cygnus.com>
10003
10004 * parse.y (not_accessible_p): Use member's class, not current
10005 class, when doing inheritance check for protected reference.
10006 Fixes PR gcj/124.
10007
10008 2000-04-20 Jason Schroeder <shrode@subnature.com>
10009
10010 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
10011
10012 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10013
10014 * parse.y (lookup_field_wrapper): Search for final local aliases.
10015 (resolve_expression_name): Let lookup_field_wrapper search for
10016 final local aliases. Force the value of `name' if one is found.
10017 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
10018 an expression name. Fixed comments.
10019
10020 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10021
10022 * parse.y (yyerror): `msg' can be null, don't use it in that case.
10023
10024 2000-04-19 Tom Tromey <tromey@cygnus.com>
10025
10026 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
10027
10028 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10029
10030 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
10031
10032 2000-04-18 Tom Tromey <tromey@cygnus.com>
10033
10034 PR gcj/211:
10035 * gjavah.c (utf8_cmp): Changed return value.
10036 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
10037 result.
10038 (cxx_keywords): New global.
10039 (get_field_name): Handle new result of cxx_keyword_subst.
10040 (print_method_info): Likewise.
10041
10042 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
10043
10044 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
10045 with a newline, for CNI.
10046 (print_stub_or_jni): Print a space or newline before method name for
10047 CNI as well as JNI.
10048 (print_cxx_classname): Don't write leading "::" in CNI stub method.
10049 (process_file): Include gcj/cni.h if generating CNI stubs.
10050
10051 2000-04-16 Tom Tromey <tromey@cygnus.com>
10052
10053 * gjavah.c (decompile_method): Use print_field_name.
10054 Fixes PR gcj/205.
10055
10056 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10057
10058 * parse.y (java_expand_classes): Reverse the package list once.
10059 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
10060 reduction.
10061 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
10062 the `==' and `!=' operators.
10063
10064 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10065
10066 * jcf-write.c (generate_bytecode_insns): At invocation time,
10067 always relate an interface method to the type of its selector.
10068
10069 2000-04-05 Tom Tromey <tromey@cygnus.com>
10070
10071 Fix for PR gcj/2:
10072 * expr.c (expand_invoke): Generate check to see if object pointer
10073 is null in nonvirtual invocation case.
10074 * java-tree.h (soft_nullpointer_node): Declare.
10075 * decl.c (soft_nullpointer_node): New global.
10076 (init_decl_processing): Initialize soft_nullpointer_node.
10077 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
10078 or `private' methods.
10079 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
10080
10081 2000-04-05 Tom Tromey <tromey@cygnus.com>
10082
10083 Fix for PR gcj/140:
10084 * parse.y (check_final_assignment): Recognize assignments to the
10085 `length' field of an array when generating class files.
10086
10087 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10088
10089 * class.c (decl_hash): Prototype removed.
10090 (decl_compare): Likewise.
10091
10092 2000-04-05 Tom Tromey <tromey@cygnus.com>
10093
10094 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
10095 * parse.y (check_modifiers_consistency): Check for final/volatile
10096 clash. Fixes PR gcj/164.
10097
10098 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10099
10100 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
10101 made global.
10102 (java_hash_compare_tree_node): Renamed from `decl_compare, made
10103 global.
10104 (add_method_1): Use `java_hash_hash_tree_node' and
10105 `java_hash_compare_tree_node'.
10106 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
10107 (java_hash_compare_tree_node): Likewise.
10108 * parse.y (find_applicable_accessible_methods_list): Create,
10109 delete and use a hash table to remember already searched interfaces.
10110
10111 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
10112
10113 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
10114 with latest entry.
10115
10116 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10117
10118 * boehm.c (mark_reference_fields, set_bit): Prototype.
10119 (set_bit): Un-ANSI-fy definition.
10120
10121 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
10122 Prototype.
10123
10124 * decl.c (emit_init_test_initialization): Likewise.
10125
10126 * gjavah.c (jni_print_char): Likewise.
10127
10128 * parse.y (create_new_parser_context): Likewise.
10129
10130 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10131
10132 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
10133 patch missing hunk. Fixed indentation.
10134
10135 2000-03-30 Tom Tromey <tromey@cygnus.com>
10136
10137 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
10138 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
10139
10140 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10141
10142 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10143 when negative *before* using it as an array index.
10144 * ChangeLog: Fixed typo.
10145
10146 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10147
10148 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
10149 to 0 when it reaches -1.
10150
10151 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
10152
10153 * jcf-parse.c (get_constant): Properly cast `num' during the
10154 invocation of `add_double'.
10155 * jcf-write.c (push_long_const): Properly cast `lo' before
10156 comparing it to short bounds.
10157 * parse-scan.y (interface_declaration:): Rule re-arrange so that
10158 `interface_body:' is reduced after the current interface is
10159 pushed.
10160
10161 2000-03-26 Tom Tromey <tromey@cygnus.com>
10162
10163 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
10164 Java-specific `-f' option.
10165
10166 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10167
10168 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
10169 Adjust order of making types.
10170 Make bitsize_*_node values.
10171
10172 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10173
10174 * class.c (make_field_value): Use byte_position.
10175 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
10176 (java_array_data_offset): Likewise.
10177 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
10178 bzero call.
10179
10180 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10181
10182 * parse.y (check_abstract_method_definitions): New local
10183 `end_type_reached'. Make sure we also consider `end_type'.
10184 (java_check_abstract_method_definitions): Make sure we eventually
10185 consider `java.lang.Object'.
10186 (maybe_use_access_method): Don't use access method if not in the
10187 context of a pure inner class or if the method's context is right.
10188 (find_applicable_accessible_methods_list): New static flag
10189 `object_done'. Don't search abstract classes as interfaces. Fixed
10190 indentation. Fixed the `java.lang.Object' only search. Search
10191 class interface(s) first, then fully search enclosing contexts.
10192 (find_most_specific_methods_list): Pick the closest candidate when
10193 they're all abstract.
10194
10195 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
10196
10197 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10198 properly initialize `finished_label'. Don't emit gotos for empty
10199 try statements.
10200
10201 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10202
10203 * except.c (emit_handlers): Clear catch_clauses_last.
10204
10205 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10206
10207 * parse.y (check_method_types_complete): New function.
10208 (create_class): Reset anonymous class counter only when seeing an
10209 non inner classe.
10210 (java_complete_class): JDEP_METHOD: Don't recompute signature
10211 if incomplete.
10212
10213 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10214
10215 * class.c (build_static_ref): Fixed indentation in comment.
10216 * java-tree.def (TRY_EXPR): Fixed typo in name.
10217 (CLASS_LITERAL): Likewise.
10218 * java-tree.h: (TYPE_DOT_CLASS): New macro.
10219 (struct lang_type): New field `dot_class'.
10220 * jcf-write.c (generate_bytecode_insns): Fixed error message.
10221 (generate_classfile): Method `class$' is synthetic.
10222 * parse.y (build_do_class_method): New function.
10223 (build_dot_class_method_invocation): Likewise.
10224 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
10225 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
10226 (qualify_ambiguous_name): Likewise.
10227 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
10228 (build_try_statement): Fixed leading comment.
10229
10230 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10231
10232 * class.c (make_field_value): Properly handle sizes.
10233 (get_dispatch_vector): Use tree_low_cst and host_integerp.
10234 (layout_class_method): Count using trees.
10235 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
10236 * expr.c (java_array_data_offset): Use int_bit_position.
10237 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
10238 (build_invokevirtual): Use tree_low_cst and do computations with trees.
10239
10240 2000-03-16 Tom Tromey <tromey@cygnus.com>
10241
10242 * lang.c (flag_hash_synchronization): New global.
10243 (lang_f_options): Added `hash-synchronization'.
10244 * lang-options.h: Mention -fhash-synchronization.
10245 * java-tree.h (flag_hash_synchronization): Declare.
10246 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
10247 hash table synchronization is disabled.
10248 * decl.c (init_decl_processing): Only push `sync_info' value when
10249 hash table synchronization is disabled.
10250 * class.c (make_class_data): Only push `sync_info' field when hash
10251 table synchronization is disabled. Removed dead code.
10252
10253 2000-03-16 Tom Tromey <tromey@cygnus.com>
10254
10255 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
10256
10257 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10258
10259 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
10260 classes.
10261 * parse.y (patch_method_invocation): Handle anonymous classes
10262 creation in static context.
10263
10264 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10265
10266 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
10267 * parse.y (resolve_qualified_expression_name): Use it.
10268 (patch_method_invocation): Likewise.
10269
10270 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10271
10272 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
10273 depending on the type of dependency which dictates what the
10274 current class is.
10275 (unresolved_type_p): Resolved types limited to the current class.
10276
10277 2000-03-15 Tom Tromey <tromey@cygnus.com>
10278
10279 * decl.c (init_decl_processing): Set type of `sync_info' to be
10280 pointer to Object.
10281
10282 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
10283 Correctly compute bit number for current slot. Zero `high' and
10284 `low' in DS_LENGTH case. Don't skip inherited fields. Use
10285 mark_reference_fields.
10286 (mark_reference_fields): New function.
10287
10288 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
10289
10290 * parse.y (register_incomplete_type): Fixed initialization of
10291 JDEP_ENCLOSING.
10292
10293 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10294
10295 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
10296 static globals.
10297 (push_class_context, pop_class_context): New function.
10298 (class_body:): Call pop_class_context.
10299 (interface_body:): Likewise.
10300 (INNER_QUALIFIER): New macro.
10301 (report_class_declaration): Changed output format and use
10302 INNER_QUALIFIER. Call push_class_context.
10303
10304 2000-02-14 Andrew Haley <aph@cygnus.com>
10305
10306 * check-init.c (check_init): Add new cases for unary and binary
10307 tree nodes.
10308
10309 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10310
10311 * parse.y (resolve_package): Set `next' once a type name has been
10312 progressively discovered.
10313 (resolve_qualified_expression_name): Propagate resolution only if
10314 there are remaining qualifiers. Take into account `q' might have
10315 been cleared after re-qualification.
10316 * parse.y (patch_method_invocation): New local `resolved'.
10317 Section dealing with qualified expression rewritten to use
10318 resolve_field_access.
10319
10320 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10321
10322 * parse.h (PUSH_CPC): Fixed indentation.
10323 (DEBUG_CPC): New macro.
10324 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
10325 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
10326 * parse.y (class_body_declaration:): Use
10327 SET_CPC_INSTANCE_INITIALIZER_STMT.
10328 (method_declaration:): Check for null current_function_decl.
10329 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
10330 (java_parser_context_pop_initialized_field): Better handling of
10331 empty lists.
10332 (maybe_make_nested_class_name): Mark nested class name as
10333 qualified when necessary.
10334 (end_class_declaration): Don't call java_parse_context_resume when
10335 one or more error occurred.
10336 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
10337 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
10338 SET_CPC_INITIALIZER_STMT.
10339 (method_header): Check for inner classes declaring static methods.
10340 (resolve_qualified_expression_name): Handle situation where `this'
10341 is implied.
10342
10343 2000-03-13 Hans Boehm <boehm@acm.org>
10344
10345 * typeck.c (build_prim_array_type): Correctly set the high word too.
10346
10347 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10348
10349 * parse.y (java_complete_expand_methods): Leave <clinit> out of
10350 ordinary methods.
10351 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
10352 list of methods for interfaces.
10353
10354 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10355
10356 * parse.y (qualify_ambiguous_name): Properly handle expressions
10357 using `null'.
10358
10359 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10360
10361 * parse.y (check_final_assignment): Extended to process
10362 COMPOUND_EXPR.
10363 (patch_assignment): Have check_final_assignment called only once.
10364
10365 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10366
10367 * java-tree.h (IS_INIT_CHECKED): New flag.
10368 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
10369 * parse.y (patch_string): Call force_evaluation_order on the
10370 completed string concatenation tree.
10371 * expr.c (force_evaluation_order): Call force_evaluation_order on
10372 function's arguments too.
10373
10374 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10375
10376 * decl.c (emit_init_test_initialization): Mark KEY as unused.
10377 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10378 (build_anewarray): Likewise.
10379 * parse.y (patch_newarray): Likewise.
10380 * parse.c: Regenerated.
10381
10382 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
10383
10384 * decl.c (init_decl_processing): Added new class fields `depth',
10385 `ancestors', and `idt' to class_type_node. Use
10386 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
10387 * class.c (make_class_data): Push initial values for new fields.
10388 * java-tree.h: Updated prototype for `build_invokeinterface'.
10389 * expr.c (build_invokeinterface): Changed parameters to accept
10390 `method' tree. Calculate index of `method' in its declaring
10391 interface. Build call to _Jv_LookupInterfaceMethodIdx.
10392 (expand_invoke): Call `build_invokeinterface' with new parameters.
10393 * parse.y (patch_invoke): Call `build_invokeinterface' with new
10394 parameters.
10395
10396 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
10397
10398 * typeck.c (lookup_do): Search superinterfaces first
10399 when looking up an interface method. From Godmar Back
10400 <gback@cs.utah.edu>
10401
10402 2000-03-06 Tom Tromey <tromey@cygnus.com>
10403
10404 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
10405
10406 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10407
10408 * java-tree.h (lookup_argument_method2): Declared.
10409 (safe_layout_class): Prototype moved from parse.h.
10410 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
10411 * parse.y (java_check_regular_methods): Local `super_class' gone.
10412 Call lookup_argument_method2 instead of lookup_argument_method.
10413 Perform modifier match for methods found declared in implemented
10414 interfaces. Fixed indentation problem. Overriding/hiding error
10415 report to take place only for methods found in classes.
10416 * typeck.c (lookup_argument_method): Changed leading
10417 comment. Re-written by calling lookup_do.
10418 (lookup_argument_method2): New function.
10419 (lookup_java_method): Re-written by calling lookup_do.
10420 (lookup_do): New function.
10421
10422 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10423
10424 * check-init.c (check_init): Removed dead code. Handle (blank)
10425 final variables.
10426 * parse.y (declare_local_variables): New local `final_p', set it
10427 and use it to initialize LOCAL_FINAL.
10428 (check_final_assignment): Only check FIELD_DECLs.
10429
10430 2000-02-17 Tom Tromey <tromey@cygnus.com>
10431
10432 * Makefile.in (JAVA_OBJS): Added boehm.o.
10433 (boehm.o): New target.
10434 * Make-lang.in (JAVA_SRCS): Added boehm.c.
10435 * java-tree.h (flag_use_boehm_gc): Declare.
10436 (get_boehm_type_descriptor): Declare.
10437 * lang.c (lang_f_options): Added `use-boehm-gc'.
10438 (flag_use_boehm_gc): New global.
10439 * lang-options.h: Added -fuse-boehm-gc.
10440 * boehm.c: New file.
10441 * class.c (get_dispatch_table): If class uses a Boehm type
10442 descriptor, put it in the vtable.
10443 (make_class_data): Removed dead code.
10444
10445 2000-03-03 Per Bothner <per@bothner.com>
10446
10447 * decl.c (init_decl_processing): Initialize sizetype properly.
10448
10449 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10450
10451 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
10452 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
10453 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10454 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
10455 (jcf_parse): New local `current'. Load innerclasses seen in outer
10456 context being processed.
10457 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
10458 * jcf-write.c (append_innerclasses_attribute): New function.
10459 (append_innerclasses_attribute_entry): Likewise.
10460 (get_access_flags): Handle static classes. Set anonymous and local
10461 classes to be private.
10462 (generate_classfile): Attribute count adjusted. Call
10463 append_innerclasses_attribute.
10464 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
10465 PURE_INNER_CLASS_TYPE_P.
10466 * parse.y (parser_qualified_classname): New parameter `is_static',
10467 produce non qualified name accordingly.
10468 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
10469 (create_interface): Added argument to parser_qualified_classname.
10470 (create_class): Added argument to parser_qualified_classname. Setup
10471 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
10472 (add_inner_class_fields): Fixed indentation.
10473 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
10474 (method_declarator): Fixed typo in comment.
10475 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
10476 (build_current_thisn): Likewise.
10477 (patch_method_invocation): Likewise.
10478
10479 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
10480
10481 * decl.c (current_function_decl): Move to toplev.c.
10482
10483 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10484
10485 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
10486 (DECL_BIT_INDEX): Use underlying representation.
10487 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
10488
10489 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10490
10491 * expr.c (build_java_ret): Pass proper type to size_binop.
10492
10493 2000-02-25 Anthony Green <green@cygnus.com>
10494
10495 * expr.c (build_class_init): Mark the decl to be ignored by
10496 check_init.
10497 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
10498 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
10499 * class.c (init_test_hash_newfunc): New function.
10500 (decl_hash): New function.
10501 (decl_compare): New function.
10502 * decl.c (emit_init_test_initialization): New function.
10503 (complete_start_java_method): Traverse the init test hashtable,
10504 calling emit_init_test_initialization.
10505 (always_initialize_class_p): Define.
10506 * expr.c (build_class_init): Use initialization tests when
10507 emitting class initialization code.
10508 (always_initialize_class_p): Declare.
10509 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
10510 1.
10511 * java-tree.h: Include hash.h.
10512 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
10513 (struct lang_decl): Add init_test_table field.
10514 (init_test_hash_entry): Define.
10515
10516 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10517
10518 * gjavah.c (main): Avoid using `argi' to report unimplemented
10519 options.
10520
10521 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10522
10523 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
10524 initialize locals to avoid warnings. Local `exception_type' moved
10525 into if statement.
10526
10527 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10528
10529 * parse.y (resolve_expression_name): Use `orig' as a second
10530 argument to resolve_field_access.
10531 (resolve_field_access): Removed unnecessary code when dealing with
10532 static fields.
10533
10534 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10535
10536 * class.c (push_super_field): Don't push the field twice.
10537 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
10538 * parse.h (java_reorder_fields): Prototyped.
10539 * parse.y (java_reorder_fields): New function.
10540 (java_layout_class): Simplified not to worry about re-ordering.
10541
10542 2000-02-23 Tom Tromey <tromey@cygnus.com>
10543
10544 * gjavah.c (print_name): In JNI case, correctly quote string.
10545 (print_method_info): Don't handle overrides in JNI mode.
10546
10547 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10548
10549 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
10550 value type set to `boolean_type_node'.
10551
10552 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
10553
10554 * jcf-dump.c (main): Test for correct condition after
10555 output file creation.
10556
10557 2000-02-19 Anthony Green <green@cygnus.com>
10558
10559 * jcf-depend.c (add_entry): Fix test for first list entry.
10560
10561 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10562
10563 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
10564 * constants.c (build_constants_constructor): Likewise.
10565
10566 2000-02-19 Anthony Green <green@cygnus.com>
10567
10568 * jcf-depend.c (add_entry): Add entries to the end of the list.
10569
10570 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
10571
10572 * decl.c (INT_TYPE_SIZE): Define if necessary.
10573 (expand_java_return): Handle the case of a native integer smaller
10574 than a JVM integer.
10575
10576 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
10577
10578 * gjavah.c (help): Use GCCBUGURL.
10579 * jv-scan.c (help): Likewise.
10580 * jcf-dump.c (help): Likewise.
10581
10582 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10583
10584 * jcf-write.c (generate_bytecode_insns): Don't generate empty
10585 `finally' clauses.
10586
10587 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10588
10589 * jcf-parse.c (load_class): Call `fatal' if no file containing
10590 the target class are found.
10591
10592 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
10593
10594 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
10595 lex.c, lex.h, and PARSE_H to...
10596 (parse.o, parse-scan.o): ...here, respectively.
10597
10598 * lex.c: Split out code that may trigger SIGFPE from yylex()
10599 to its own function.
10600 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
10601
10602 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10603
10604 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
10605
10606 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10607
10608 * parse.y (outer_field_access_p): Stop in time when outer contexts
10609 are exhausted.
10610 (resolve_qualified_expression_name): Properly qualify *everything*
10611 after a package.type to be resoled as expression names.
10612 (find_applicable_accessible_methods_list): Save/restore `class' to
10613 isolate it from a possible outer context search.
10614
10615 2000-02-15 Tom Tromey <tromey@cygnus.com>
10616
10617 * gjavah.c (jni_print_char): New function.
10618 (print_full_cxx_name): Use it.
10619 (decode_signature_piece): Likewise.
10620 (print_cxx_classname): Likewise.
10621
10622 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10623
10624 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
10625 version.o.
10626 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
10627
10628 * gjavah.c: Include version.h.
10629
10630 * jcf-dump.c: Likewise.
10631
10632 * jv-scan.c: Likewise.
10633
10634 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10635
10636 * parse.y (outer_field_access_fix): First parameter now a tree
10637 node. Check for assignment to final. First argument to
10638 build_outer_field_access_fix modified to accommodate prototype.
10639 (build_outer_field_access): Don't check for assignment to final
10640 here.
10641 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
10642 possibly returned by outer_field_access_fix. Changed
10643 outer_field_access_fix's first argument.
10644 (check_final_assignment): $finit$'s context is OK.
10645 (patch_unaryop): Use node instead of its line/column value when
10646 calling outer_field_access_fix.
10647
10648 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10649
10650 * parse.y (interface_declaration:): No longer tagged
10651 <node>. Re-installed default action.
10652 (class_member_declaration:): Handle inner interfaces.
10653 (interface_member_declaration): Handle inner interfaces and
10654 classes.
10655 (create_interface): Push error if one seen. Suspend parsing
10656 context when processing an inner interface.
10657 (register_fields): Inner class static field limitations not to
10658 apply to inner interfaces.
10659
10660 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10661
10662 * jcf-parse.c (load_class): Update `java_error_count' when a
10663 class' file can't be found.
10664 (parse.y): Avoid (byte)code generation when errors seen.
10665
10666 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10667
10668 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
10669 decodes a valid node.
10670 (patch_binop): Handle TRUNC_DIV_EXPR.
10671
10672 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10673
10674 * parse.y (resolve_package): New local `acc'. Try to progressively
10675 build and guess a package and type name.
10676
10677 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10678
10679 * parse.y (find_applicable_accessible_methods_list): Load and
10680 layout the search class if necessary.
10681 (java_complete_tree): Keep to original type of the folded initial
10682 value.
10683
10684 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10685
10686 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
10687 Generate error message if circularity is detected. New static
10688 local `list'.
10689 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
10690 * jcf-write.c (generate_bytecode_insns): Very simply handle
10691 SAVE_EXPR.
10692 * parse.y (java_check_circular_reference): Use
10693 `cyclic_inheritance_report' during report, if necessary.
10694 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
10695 walking NEW_ARRAY_INIT twice.
10696
10697 2000-02-09 Tom Tromey <tromey@cygnus.com>
10698
10699 * parse.y (check_class_interface_creation): Allow inner classes to
10700 be `private' or `protected', check modifiers' consistency. Prevent
10701 block local classes from bearing any modifiers.
10702
10703 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10704
10705 * except.c (check_start_handlers): Re-add prototype lost in last
10706 patch.
10707 (maybe_start_try): Remove excess argument to `check_start_handlers'.
10708
10709 2000-02-09 Andrew Haley <aph@cygnus.com>
10710
10711 * decl.c (clear_binding_level): Remove excess initializer.
10712 (maybe_poplevels): Remove unused variable.
10713 (force_poplevels): Ditto.
10714 (struct binding_level): Add comment.
10715
10716 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10717
10718 * jcf-write.c (generate_classfile): Don't consider
10719 pre-initialization with reference value (use <clinit> instead.)
10720 * parse.y (java_fix_constructors): No generated constructor for
10721 interfaces.
10722 (build_outer_field_access): Removed debug message.
10723 (outer_field_expanded_access_p): Adapted to bytecode generation.
10724 (build_outer_field_access_method): Use fix_method_argument_names.
10725 (build_outer_method_access_method): Fixed indentation. Added
10726 comment. Handle access method generation for static and also void
10727 methods.
10728 (build_access_to_thisn): Inserted debug message.
10729 (maybe_build_thisn_access_method): Use fix_method_argument_names.
10730 (resolve_qualified_expression_name): Fixed comment.
10731 (not_accessible_p): Adapted to bytecode generation. Added comment.
10732 (patch_method_invocation): Added comment.
10733 (maybe_use_access_method): Fixed leading comment. Handle static
10734 methods.
10735 (java_complete_lhs): Don't shortcut handling of initialized upon
10736 declaration String type static fields when generating bytecode.
10737 (patch_unaryop): Handle outer field access when generating
10738 bytecode.
10739
10740 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
10741
10742 * java-tree.h (FIELD_THISN): New macro.
10743 * jcf-write.c (append_synthetic_attribute): New function.
10744 (generate_classfile): Set "Synthetic" attribute on this$<n>,
10745 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
10746 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
10747 this$<n> fields.
10748 (build_outer_field_access): Turned on access functions usage and
10749 generation when compiling to bytecode.
10750 (maybe_use_access_method): Likewise.
10751
10752 2000-01-25 Andrew Haley <aph@cygnus.com>
10753
10754 * java-except.h (struct eh_range): Add `expanded' field.
10755 (maybe_start_try): Add end_pc arg.
10756 (maybe_end_try): Ditto.
10757 * java-tree.h (force_poplevels): new function.
10758 * expr.c (expand_byte_code): Don't call maybe_start_try or
10759 maybe_end_try.
10760 * except.c (add_handler): Reset expanded.
10761 (expand_start_java_handler): Set expanded.
10762 (check_start_handlers): Don't expand a start handler that's
10763 already been expanded.
10764 (maybe_start_try): Add end_pc arg. Only expand a handler which
10765 ends after end_pc.
10766 (expand_end_java_handler): call force_poplevels.
10767 (force_poplevels): new function.
10768 * decl.c (binding_level): Add start_pc of binding level.
10769 (maybe_pushlevels): Call maybe_start_try when pushing binding
10770 levels.
10771 (maybe_poplevels): Call maybe_end_try when popping binding levels.
10772 (LARGEST_PC): Define.
10773 (clear_binding_level): Use LARGEST_PC.
10774
10775 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
10776 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
10777 (binding_depth, is_class_level, current_pc): new variables.
10778 (struct binding_level): ditto.
10779 (indent): new function.
10780 (push_jvm_slot): add debugging info.
10781 (maybe_pushlevels): ditto.
10782 (maybe_poplevels): ditto.
10783 (pushlevel): ditto.
10784 (poplevel): ditto.
10785 (start_java_method): ditto.
10786 (give_name_to_locals): comment only.
10787 * except.c (binding_depth, is_class_level, current_pc):
10788 new variables.
10789 (expand_start_java_handler): add debugging info.
10790 (expand_end_java_handler): ditto.
10791
10792 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10793
10794 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
10795 (print_name_for_stub_or_jni, process_file): Constify a char*.
10796
10797 2000-02-03 Tom Tromey <tromey@cygnus.com>
10798
10799 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
10800
10801 2000-01-31 Scott Bambrough <scottb@netwinder.org>
10802
10803 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
10804 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
10805 defined to be 1.
10806
10807 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
10808
10809 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
10810 * java-tree.h (TYPE_II_STMT_LIST): New macro.
10811 (struct lang_type): New field `ii_block'.
10812 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
10813 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
10814 * parse.h (struct parser_ctxt): New field `instance_initializers'.
10815 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
10816 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
10817 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
10818 macros.
10819 * parse.y (add_instance_initializer): New function.
10820 (in_instance_initializer): New static global.
10821 (class_body_declaration:): Link instance initializer block.
10822 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
10823 (array_creation_expression:): Remove unused local.
10824 (java_parser_context_push_initialized_field): Fixed leading
10825 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
10826 CPC_INSTANCE_INITIALIZER_LIST.
10827 (java_parser_context_pop_initialized_field): Likewise.
10828 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
10829 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
10830 CPC_INITIALIZER_STMT.
10831 (fix_constructors): New local `class_type'. Use it. Call
10832 add_instance_initializer.
10833 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
10834 (patch_return): Forbid return in instance initializers.
10835 (patch_throw_statement): Enforce exception handling in the context
10836 of instance initializers.
10837
10838 2000-02-03 Tom Tromey <tromey@cygnus.com>
10839
10840 * Make-lang.in (java.mostlyclean): Remove executables in
10841 `mostlyclean'.
10842
10843 2000-01-31 Scott Bambrough <scottb@netwinder.org>
10844
10845 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
10846 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
10847 (java_float_finite): Convert to use union Word from javaop.h.
10848 (java_double_finite): Convert to use union DWord from javaop.h.
10849
10850 2000-02-02 Tom Tromey <tromey@cygnus.com>
10851
10852 * gjavah.c (options): Added `jni' entry.
10853 (help): Document -jni.
10854 (flag_jni): New global.
10855 (process_file): Handle JNI output. Don't print text from
10856 -prepend, -add, etc, when generating stubs. Only remove `.class'
10857 suffix if it actually exists.
10858 (main): Create a `.c' file when run with `--jni --stubs'. Create
10859 correct output file name with `--jni'.
10860 (print_include): Mangle header name differently in JNI case.
10861 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
10862 method list.
10863 (print_method_info): Handle JNI case. Put signature info into
10864 method name. Handle case when STREAM is NULL.
10865 (print_name_for_stub_or_jni): New function.
10866 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
10867 (print_cxx_classname): Handle JNI.
10868 (print_full_cxx_name): Likewise.
10869 (decode_signature_piece): Likewise.
10870 (overloaded_jni_method_exists_p): New function.
10871 (struct method_name): Added `signature' and `sig_length' fields.
10872 (HANDLE_END_FIELD): Do nothing in JNI mode.
10873
10874 2000-02-02 Tom Tromey <tromey@cygnus.com>
10875
10876 * jv-scan.c: Include version.c, <getopt.h>.
10877 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
10878 (options): New array.
10879 (usage): New function.
10880 (version): New function.
10881 (main): Use getopt_long to parse command line.
10882 * jcf-dump.c: Include version.c, <getopt.h>.
10883 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
10884 OPT_JAVAP): New macros.
10885 (options): New array.
10886 (usage): Return `void'. Changed message.
10887 (help): New function.
10888 (version): New function.
10889 (main): Use getopt_long_only to parse command line.
10890 * gjavah.c: Include <getopt.h>.
10891 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
10892 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
10893 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
10894 (options): New array.
10895 (java_no_argument): Removed.
10896 (help): Updated with missing options.
10897 (main): Use getopt_long_only to parse command line.
10898 (usage): Changed message.
10899
10900 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10901
10902 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
10903 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
10904 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
10905 * parse.y (array_creation_expression:): Handle anonymous arrays.
10906 (build_array_from_name): Don't set `ret_name' if null.
10907 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
10908 (qualify_ambiguous_name): Likewise.
10909 (java_complete_expand_class): Likewise.
10910
10911 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
10912
10913 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
10914 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
10915 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
10916 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
10917 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
10918 AIPL_FUNCTION_COMPLETED_INVOCATION.
10919 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
10920 AIPL_FUNCTION_INVOCATION_READY.
10921 (AIPL_FUNCTION_DECLARATION): New enum entry.
10922 * parse.y (reorder_static_initialized): New function.
10923 (java_parser_context_pop_initialized_field): Use it.
10924 (add_inner_class_fields): Use
10925 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
10926 augmented. Install marker after last alias initializer, if any.
10927 (generate_finit): Fixed typo. Don't try to retain only the used
10928 fields.
10929 (method_header): Compute and set DECL_FUNCTION_NAP.
10930 (method_declarator): Fixed comment. Insert alias initializer in
10931 parameter list.
10932 (build_alias_initializer_parameter_list): Fixed leading
10933 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
10934 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
10935 (java_complete_expand_class): Code to retain only used aliases
10936 removed.
10937 (java_complete_expand_methods): New local `first_decl'. Generate
10938 $finit$ first, then expand the constructors, regular methods and
10939 <clinit>.
10940 (java_complete_expand_method): Don't report error on missing
10941 return statement if previously detected bogus.
10942 (fix_constructors): Don't patch constructor parameters list.
10943 (patch_method_invocation): Use new AIPL enum values. Reverse
10944 alias initializer list for anonymous classes.
10945
10946 2000-01-30 Anthony Green <green@redhat.com>
10947
10948 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
10949 determine how many stack slots to pop.
10950
10951 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10952
10953 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
10954 error handling/recovery.
10955 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
10956
10957 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10958
10959 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
10960 FIELD_LOCAL_ALIAS_USED): New macros.
10961 (DECL_FUNCTION_NAP): New macro.
10962 (struct lang_decl): New field `nap'.
10963 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
10964 (struct lang_type): New fields `finit_stmt_list' and
10965 `clinit_stmt_list'.
10966 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
10967 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
10968 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
10969 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
10970 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
10971 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
10972 (BUILD_THROW): Macro line separator re-indented.
10973 * parse.y (end_class_declaration): New function.
10974 (maybe_generate_pre_expand_clinit): New name for
10975 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
10976 pre-expand static fields.
10977 (maybe_generate_clinit): Function deleted.
10978 (check_for_static_method_reference): Prototype's parameter list
10979 indented.
10980 (generate_finit): New name for maybe_generate_finit. Changed
10981 leading comment. Function rewritten to use
10982 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
10983 (build_alias_initializer_parameter_list): New function.
10984 (java_parser_context_pop_initialized_field): Likewise.
10985 (add_inner_class_fields): Likewise.
10986 (type_declaration:): Call end_class_declaration.
10987 (class_member_declaration:): Likewise.
10988 (formal_parameter_list:): Fixed typos.
10989 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
10990 element. Improved error handling.
10991 (block_statement:): Call end_class_declaration.
10992 (anonymous_class_creation:): Likewise.
10993 (create_anonymous_class): Fixed comments.
10994 (create_class): Call add_inner_class_fields.
10995 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
10996 (method_header): Use MARK_FINAL_PARMS.
10997 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
10998 (method_declarator): Propagate final argument flag.
10999 (craft_constructor): New local `artificial'. Call
11000 build_alias_initializer_parameter_list. Use
11001 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
11002 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
11003 necessary.
11004 (complete_expand_class): Get rid of unused outer context local
11005 alias fields.
11006 (java_complete_expand_methods): Fixed leading
11007 comment. Generate/pre-expand <clinit> first. Changed method
11008 expansion order to regular, $finit$, constructors, <clinit>.
11009 (java_complete_expand_method): Set current_function_decl.
11010 (fix_constructors): Fix constructor parameter list to account for
11011 outer context local alias initializers.
11012 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11013 (resolve_expression_name): Lookup outer context local aliases. New
11014 local `access', use it.
11015 (patch_method_invocation): Patch inner class ctor invocation with
11016 outer context local aliases initialization values. $finit$
11017 invocation patching now includes things generated with
11018 build_alias_initializer_parameter_list.
11019 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
11020 (build_super_invocation): Likewise.
11021 (patch_assignment): Changed comment.
11022
11023 2000-01-27 Andrew Haley <aph@cygnus.com>
11024
11025 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
11026 (emit_if): Ditto.
11027 (emit_jsr): Ditto.
11028
11029 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11030
11031 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
11032 concatenation.
11033 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
11034
11035 * parse.y (register_fields): Don't pass a format specifier to
11036 OBSOLETE_MODIFIER_WARNING.
11037 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
11038 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
11039 specifier.
11040 (check_modifiers): Change function into a macro.
11041 (check_class_interface_creation): Pass a literal format string.
11042
11043 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11044
11045 * buffer.h: PROTO -> PARAMS.
11046 * check-init.c: Likewise.
11047 * class.c: Likewise.
11048 * constants.c: Likewise.
11049 * convert.h: Likewise.
11050 * decl.c: Likewise.
11051 * except.c: Likewise.
11052 * expr.c: Likewise.
11053 * gjavah.c: Likewise.
11054 * java-except.h: Likewise.
11055 * java-tree.h: Likewise.
11056 * jcf-depend.c: Likewise.
11057 * jcf-dump.c: Likewise.
11058 * jcf-parse.c: Likewise.
11059 * jcf-path.c: Likewise.
11060 * jcf-reader.c: Likewise.
11061 * jcf-write.c: Likewise.
11062 * jcf.h: Likewise.
11063 * jv-scan.c: Likewise.
11064 * jvgenmain.c: Likewise.
11065 * jvspec.c: Likewise.
11066 * lang.c: Likewise.
11067 * lex.c: Likewise.
11068 * lex.h: Likewise.
11069 * parse-scan.y: Likewise.
11070 * parse.h: Likewise.
11071 * parse.y: Likewise.
11072 * typeck.c: Likewise.
11073 * verify.c: Likewise.
11074 * xref.c: Likewise.
11075 * xref.h: Likewise.
11076 * zextract.c: Likewise.
11077 * zipfile.h: Likewise.
11078
11079 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11080
11081 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11082 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
11083 * constants.c (build_constant_data_ref): Check for cached
11084 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
11085 in TYPE_CPOOL_DATE_REF.
11086 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
11087 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
11088 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
11089 (LOCAL_FINAL): New macro.
11090 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
11091 constant pool -- don't try to reuse.
11092 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
11093 TYPE_LANG_SPECIFIC.
11094 (find_in_current_zip): Use TYPE_JCF.
11095 * parse.h (java_check_final): Prototype removed.
11096 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
11097 (maybe_create_class_interface_decl,
11098 check_class_interface_creation): Likewise.
11099 (java_expand_finals): Function removed.
11100 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
11101 (block_statement:): Fixed comment.
11102 (anonymous_class_creation:): Likewise.
11103 (check_class_interface_creation): Reversed Jan 12, 2000 extra
11104 argument patch.
11105 (check_class_interface_creation): Loosened error report on (inner)
11106 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
11107 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
11108 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
11109 argument patch.
11110 (create_interface): Likewise.
11111 (anonymous_class_counter): New static global.
11112 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
11113 patch. Fixed comments.
11114 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
11115 anonymous_class_counter when declaring a toplevel class.
11116 (craft_constructor): Fixed constructor name when handling
11117 anonymous classes. Anonymous class constructors to feature hidden
11118 this$<n> parameter.
11119 (java_fix_constructors): Added comment.
11120 (java_check_final): Function removed.
11121 (java_complete_expand_methods): Fixed comment. Don't generate
11122 class data, save its outgoing constant pool instead.
11123 (verify_constructor_super): Skip anonymous class constructor
11124 hidden this$<n> parameter.
11125 (java_expand_classes): New local `saved_ctxp'. Removed call to
11126 java_expand_finals and java_check_final. Expand anonymous class
11127 constructors. Generate class data.
11128 (build_super_invocation): Skip anonymous class hidden this$<n>
11129 parameter.
11130 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
11131 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
11132 (set_java_signature): Likewise.
11133
11134 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
11135
11136 * gjavah.c: Delete ACC_VISIBILITY define.
11137 * jcf.h: Add ACC_VISIBILITY define.
11138 * parse.y: final: rule tagged <value>.
11139 (java_check_regular_methods): Use ACC_VISIBILITY define for
11140 default package access check.
11141 (local_variable_declaration_statement): Use final: rule.
11142
11143 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
11144
11145 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
11146 (final:): New rule.
11147
11148 2000-01-17 Tom Tromey <tromey@cygnus.com>
11149
11150 * gjavah.c (print_field_info): Allow non-static final fields.
11151
11152 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11153
11154 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
11155 * parse.y (patch_anonymous_class): New function.
11156 (create_anonymous_class): Register incomplete type when the
11157 class/interface to extends/implement isn't known yet.
11158 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
11159 (verify_constructor_super): Tuned error message.
11160
11161 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11162
11163 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
11164 (ANONYMOUS_CLASS_P): New macro.
11165 (TYPE_SIGNATURE, TYPE_JCF): New macros.
11166 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
11167 * parse.y (create_class): Added leading argument.
11168 (maybe_create_class_interface_decl,
11169 check_class_interface_creation): Likewise.
11170 (craft_constructor): New function.
11171 (verify_constructor_super): Added argument in prototype.
11172 (class_declaration:): Inserted leading argument.
11173 (for_begin:): Use FOR_LOOP_P.
11174 (anonymous_class_creation): Create WFL of the anonymous class to
11175 instantiate. Call build_new_invocation. Added comments.
11176 (check_class_interface_creation): Handle parameter `anonymous' in
11177 verbose mode class creation announce.
11178 (link_nested_class_to_enclosing): Exclude anonymous classes.
11179 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
11180 anonymous class, even though they appear to have an enclosing
11181 context.
11182 (create_interface): Pass extra argument to
11183 check_class_interface_creation.
11184 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
11185 (create_class): Call check_class_interface_creation and
11186 maybe_create_class_interface_decl with extra new argument. Don't
11187 add private this$<n> to anonymous classes.
11188 (method_declarator): Insert hidden this$<n> to anonymous class
11189 constructors.
11190 (java_fix_constructors): Deleted code creating default
11191 constructor. Call craft_constructor instead.
11192 (java_check_regular_methods): Set `saw_constructor' to 1 for
11193 anonymous classes.
11194 (fix_constructors): Pass extra argument to verify_constructor_super.
11195 (verify_constructor_super): New local `sdecl', use it. Search for
11196 matching constructor (possibly featuring arguments) in super
11197 class.
11198 (lookup_method_invoke): Craft constructor according to arguments
11199 list when dealing with anonymous class constructors.
11200 (build_super_invocation): Pass arguments to anonymous class super
11201 constructors.
11202 (search_loop): Use FOR_LOOP_P.
11203 (labeled_block_contains_loop_p): Likewise.
11204
11205 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11206
11207 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
11208 (enclosing_context_p): New function.
11209 (get_access_flags_from_decl): Handle CLASS_STATIC.
11210 (maybe_layout_super_class): Extra first argument passed to
11211 do_resolve_class.
11212 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
11213 ID_INIT_P.
11214 * decl.c (access0_identifier_node): New global.
11215 (init_decl_processing): access0_identifier_node initialized.
11216 (pushdecl): Set DECL_CONTEXT only on non type decls.
11217 * expr.c (lookup_field): Lookup inner class fields in enclosing
11218 contexts.
11219 (expand_invoke): Use ID_INIT_P.
11220 (expand_java_field_op): Use DECL_CLINIT_P.
11221 * java-tree.def (CLASS_LITERAL): New tree code.
11222 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
11223 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
11224 (struct lang_decl): New field `inner_access'.
11225 (enclosing_context_p): Prototyped.
11226 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
11227 ID_CLINIT_P): New macros.
11228 (CLASS_STATIC): New macro.
11229 (CLASS_ACCESS0_GENERATED_P): New macro.
11230 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
11231 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
11232 INNER_CLASS_P): New macros.
11233 (DECL_INNER_CLASS_LIST): New macro.
11234 * jcf-parse.c (yyparse): Avoid the use of ANSI string
11235 concatenation.
11236 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11237 the shift value to int. Fixed typo in comment.
11238 * lex.c (inst_id, wpv_id): Initialize.
11239 * mangle.c (unicode_mangling_length): Take `$' into account.
11240 * parse.h (DRECOVER, RECOVER): Terminate properly.
11241 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
11242 (typedef struct _jdep): New field `enclosing'.
11243 (JDEP_ENCLOSING): New macro.
11244 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
11245 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
11246 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
11247 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
11248 GET_ENCLOSING_CPC_CONTEXT): New macros.
11249 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
11250 (do_resolve_class): Added extra argument in prototype.
11251 * parse.y (resolve_class): Added extra argument in prototype.
11252 (maybe_create_class_interface_decl): Likewise.
11253 (maybe_use_access_method, build_wfl_wrap): New functions.
11254 (java_complete_expand_classes, java_complete_expand_class):
11255 Likewise.
11256 (java_parser_context_push_initialized_field,
11257 java_parser_context_suspend, java_parser_context_resume):
11258 Likewise.
11259 (maybe_make_nested_class_name, make_nested_class_name,
11260 set_nested_class_simple_name_value,
11261 link_nested_class_to_enclosing, find_as_inner_class,
11262 find_as_inner_class_do, check_inner_class_redefinition,
11263 build_thisn_assign, build_current_thisn, build_access_to_thisn,
11264 maybe_build_thisn_access_method, build_outer_field_access,
11265 build_outer_field_access_methods, build_outer_field_access_expr,
11266 build_outer_method_access_method, build_new_access_id,
11267 build_outer_field_access_method, outer_field_access_p,
11268 outer_field_expanded_access_p, outer_field_access_fix,
11269 build_incomplete_class_ref, patch_incomplete_class_ref,
11270 create_anonymous_class): Likewise.
11271 (inst_id, wpv_id): New static global variables.
11272 (synchronized:): New rule, tagged <node>.
11273 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
11274 rules.
11275 (anonymous_class_creation:): New rule, tagged <node>.
11276 (NEW_TK): Tagged <node>.
11277 (type_literals, array_type_literal): New rules, tagged <node>.
11278 (class_declaration:): Removed action when reducing by class_body:
11279 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
11280 using GET_CPC in sub-rules.
11281 (class_member_declaration): Handle inner classes.
11282 (method_declaration): When reducing method_header:, reset
11283 current_function_decl when appropriate.
11284 (method_declarator:): Set the number of formal parameter to 0 for
11285 method declared without arguments.
11286 (constructor_declarator:): Likewise.
11287 (static_initializer:): List of elements kept in a list.
11288 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
11289 use of the keyword `static' for type declarations.
11290 (block_statement:): Handle inner class declarations.
11291 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
11292 type qualified `this'.
11293 (class_instance_creation_expression): Use anonymous_class_creation:
11294 to handle inner class instances creation. Handle qualified `new'.
11295 (something_dot_new): Added appropriate actions.
11296 (create_new_parser_context): New function.
11297 (java_push_parser_context, java_parser_context_save_global,
11298 java_parser_context_suspend): Use create_new_parser_context.
11299 (check_modifiers): Changed leading comment.
11300 (check_class_interface_creation): Handle interclasses.
11301 (add_superinterfaces): Fixed comment.
11302 (create_interface): Build qualified name from the raw_name instead
11303 of its matching WFL. Push the initialized fields list. raw_name added
11304 as an extra argument to maybe_create_class_interface_decl.
11305 (create_class): Build qualified name from the raw_name instead of
11306 its matching WFL. Removed assignment to current_parsed_class_un.
11307 Call PUSH_ERROR before returning an error. Suspend the current
11308 parser context when processing an inner class. Push the
11309 initialized fields list. raw_name added as an extra argument to
11310 maybe_create_class_interface_decl. Add the private this$<n>
11311 field.
11312 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
11313 (register_fields): Get the class type from GET_CPC and handle
11314 previous errors. Added code to handle the creation of static
11315 fields in inner classes. Initialized fields initialization
11316 statements kept in a list of lists.
11317 (maybe_generate_finit): Initialized fields initialization
11318 statements kept in a list of lists. Use GET_CPC.
11319 (maybe_generate_clinit): Likewise.
11320 (method_header): Use GET_CPC and GET_CPC_UN.
11321 (parser_qualified_classname): Handle inner classes.
11322 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
11323 (java_fix_constructors): Hide pointer to enclosing context
11324 instance in constructor list when dealing with inner classes.
11325 (jdep_resolve_class): Call resolve_class with extra first argument
11326 JDEP_ENCLOSING.
11327 (resolve_class): Add enclosing context as a first extra argument
11328 to do_resolve_class.
11329 (do_resolve_class): Call find_as_inner_class. Handle WFLs
11330 properly.
11331 (resolve_no_layout): Extra argument added to resolve_class
11332 invocation.
11333 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
11334 (java_get_real_method_name): Use GET_CPC_UN.
11335 (check_abstract_method_definitions): Use DECL_CLINIT_P.
11336 (java_check_abstract_methods): Handle static method declared in
11337 inner classes by an error.
11338 (java_check_regular_methods): Use DECL_CLINIT_P.
11339 (source_start_java_method): Also set DECL_MAX_LOCALS.
11340 (create_artificial_method): Call java_parser_context_save_global
11341 and java_parser_context_restore_global instead of saving/restoring
11342 the context by hand.
11343 (expand_start_java_method): Improved verbose mode message.
11344 (java_complete_expand_methods): Fixed leading comment. Use
11345 DECL_CLINIT_P.
11346 (fix_constructors): Added assignment to this$<n> if necessary.
11347 (java_expand_classes): Call java_complete_expand_classes instead
11348 of java_complete_expand_methods.
11349 (make_qualified_primary): Simplified.
11350 (merge_qualified_name): Optimized for missing left or right parts.
11351 (resolve_expression_name): Handle access to outer class fields from
11352 interclasses.
11353 (resolve_qualified_expression_name): New macro
11354 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
11355 classes. Report error on non appropriate qualification of
11356 `new'. Handle qualified `this'.
11357 (not_accessible_p): Allow access to outer class private fields from
11358 inner classes.
11359 (patch_method_invocation): Handle method invocations through
11360 access methods and inner class constructor invocations.
11361 (find_applicable_accessible_methods_list): Search enclosing
11362 contexts of an inner class.
11363 (search_applicable_methods_list): Fixed typo.
11364 (argument_types_convertible): Handle inner class constructors'
11365 hidden outer context reference argument.
11366 (qualify_ambiguous_name): Handle qualified `this'.
11367 (java_complete_lhs): Handle use of field accessed through
11368 artificial access methods in various cases of assignments. Handle
11369 CLASS_LITERAL node.
11370 (check_final_assignment): Use DECL_CLINIT_P.
11371 (valid_ref_assignconv_cast_p): Handle the destination being an
11372 enclosing context of the source.
11373 (patch_unaryop): Handle use of field accessed through artificial
11374 access methods.
11375 (patch_return): Use DECL_CLINIT_P.
11376 (patch_throw_statement): Use DECL_CLINIT_P.
11377 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
11378 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
11379 ID_INIT_P.
11380
11381 2000-01-16 Anthony Green <green@cygnus.com>
11382
11383 * parse.y (build_string_concatenation): Only use
11384 StringBuffer(String) shortcut if String arg is constant.
11385
11386 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11387
11388 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
11389 the shift value to int. Fixed typo in comment.
11390
11391 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11392
11393 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
11394 * jcf-write.c: Likewise.
11395 * parse.y: Likewise.
11396 * parse.c: Regenerate.
11397
11398 2000-01-09 Anthony Green <green@cygnus.com>
11399
11400 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
11401 bytecodes in the correct order.
11402
11403 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11404
11405 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
11406
11407 2000-01-06 Anthony Green <green@cygnus.com>
11408
11409 * expr.c (java_lang_expand_expr): Switch to permanent obstack
11410 before building constant array decl.
11411
11412 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11413
11414 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
11415 method invocation and typo in conditional expression.
11416 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
11417 the appropriate NOTE_POP.
11418 * parse.y (patch_binop): Shift value mask to feature the right
11419 type.
11420
11421 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11422
11423 * class.c (assume_compiled, assume_compiled_node): Add static
11424 prototype.
11425 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
11426
11427 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
11428
11429 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
11430
11431 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
11432 to `__modifier' to avoid stringifying it.
11433
11434 * parse.y (verify_constructor_circularity): Don't call a variadic
11435 function with a non-literal format string.
11436 (java_check_abstract_methods): Move unreachable code inside
11437 `continue' statement.
11438 (lookup_method_invoke): Call xstrdup, not strdup.
11439
11440 * expr.c (expand_java_field_op): Avoid the use of ANSI string
11441 concatenation.
11442
11443 * jcf-parse.c (yyparse): Likewise.
11444
11445 * jv-scan.c (main): Likewise.
11446
11447 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11448
11449 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
11450 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
11451 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
11452 concatenation.
11453
11454 * parse.y (synchronized, variable_redefinition_error,
11455 check_class_interface_creation, create_interface, create_class,
11456 method_header, finish_method_declaration,
11457 check_modifiers_consistency, method_declarator,
11458 complete_class_report_errors, check_abstract_method_definitions,
11459 java_check_regular_methods, check_throws_clauses,
11460 java_check_abstract_methods, read_import_dir,
11461 check_pkg_class_access, declare_local_variables, fix_constructors,
11462 cut_identifier_in_qualified, resolve_expression_name,
11463 resolve_qualified_expression_name, patch_method_invocation,
11464 java_complete_lhs, patch_assignment, try_builtin_assignconv,
11465 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
11466 patch_exit_expr, patch_exit_expr, patch_switch_statement,
11467 patch_try_statement, patch_synchronized_statement,
11468 patch_throw_statement, check_thrown_exceptions,
11469 patch_conditional_expr): Likewise.
11470
11471 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11472
11473 * Makefile.in (LIBDEPS): Added gcc's errors.o
11474 (../jcf-dump$(exeext):): Link with gcc's errors.o
11475 (../gcjh$(exeext):): Likewise.
11476 * expr.c (expand_java_NEW): Layout the entire target type instead of
11477 laying out its methods only.
11478 (lookup_field): Layout the class after having loaded it.
11479 * java-tree.h (java_debug_context): Declared.
11480 * jcf-io.c (toplev.h): Included.
11481 (find_class): Removed assignment to jcf's outofsynch
11482 field. Force source file to be read if newer than its matching
11483 class file. Tweaked debug messages.
11484 * jcf-parse.c (jcf_out_of_synch): Deleted.
11485 (read_class): Call to jcf_out_of_synch removed.
11486 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
11487 (jcf_out_of_synch): Prototype deleted.
11488 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
11489 `deprecated' and `class_err': integer turned into bit-fields.
11490 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
11491 * parse.y (package_list): New global.
11492 (package_declaration:): Record newly parsed package name.
11493 (extra_ctxp_pushed_p): Static global deleted.
11494 (java_parser_context_save_global): Create buffer context for the
11495 purpose of saving globals, if necessary.
11496 (java_parser_context_restore_global): Pop context pushed for the
11497 purpose of saving globals, if necessary.
11498 (java_debug_context_do): New prototype and function.
11499 (java_debug_context): Likewise.
11500 (do_resolve_class): Use already parsed package names to qualify
11501 and lookup class candidate.
11502 (java_pre_expand_clinit): Removed unnecessary local variable.
11503
11504 1999-12-17 Tom Tromey <tromey@cygnus.com>
11505
11506 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
11507 fixes PR gcj/119.
11508 (process_file): Use `\n\' at end of each line in string.
11509
11510 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11511
11512 * expr.c (expand_invoke): Layout the loaded class before
11513 attempting to use it.
11514 (expand_java_field_op): Allow final field assignments to take
11515 place in $finit$.
11516 * typeck.c (convert): Return error_mark_node if expr is null.
11517
11518 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11519
11520 * class.c (class_depth): Return -1 if the class doesn't load
11521 properly.
11522 * expr.c (can_widen_reference_to): Check for errors during depth
11523 computation and return 0 accordingly.
11524 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
11525 create default constructors and add an other error check.
11526 * parse.h (java_fix_constructors): Prototyped.
11527 * parse.y (java_pre_expand_clinit): Likewise.
11528 (build_super_invocation): Re-prototyped to feature one argument.
11529 (java_check_circular_reference): Directly use `current'.
11530 (java_fix_constructors): New function.
11531 (java_check_regular_methods): Don't create default constructors
11532 here, but abort if none were found.
11533 (java_complete_expand_methods): Pre-process <clinit> calling
11534 java_pre_expand_clinit.
11535 (java_pre_expand_clinit): New function.
11536 (fix_constructors): build_super_invocation invoked with the
11537 current method declaration as an argument.
11538 (build_super_invocation): Use the context of the processed method
11539 decl argument instead of current_class.
11540 * typeck.c (lookup_java_method): Take WFLs in method names into
11541 account.
11542
11543 1999-12-14 Per Bothner <per@bothner.com>
11544
11545 * class.c (make_class_data): flag_keep_inline_functions to keep
11546 private methods in the method array.
11547
11548 1999-12-15 Anthony Green <green@cygnus.com>
11549
11550 * check-init.c (check_init): Take into account both types of
11551 `throw's when checking for uninitialized variables.
11552
11553 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11554
11555 * parse.y (java_complete_lhs): Force conversion of array
11556 dimensions to int_type_node, that's what runtime's ABI expects.
11557
11558 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11559
11560 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
11561 operand of a WFL, until the Java front-end gets fixed with regard
11562 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
11563
11564 1999-12-10 Andrew Haley <aph@cygnus.com>
11565
11566 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
11567 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
11568 expr.c (build_java_athrow): Add support for sjlj-exceptions.
11569 java-tree.h: Ditto.
11570 jcf-write.c: Ditto.
11571
11572 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11573
11574 * expr.c (java_lang_expand_expr): Switch to permanent obstack
11575 before calling expand_eh_region_start and expand_start_all_catch.
11576 * except.c (expand_start_java_handler): Switch to permanent
11577 obstack before calling expand_eh_region_start.
11578 (expand_end_java_handler): Switch to permanent obstack before
11579 calling expand_start_all_catch.
11580
11581 1999-12-5 Anthony Green <green@cygnus.com>
11582
11583 * decl.c (init_decl_processing): Mark throw_node as a noreturn
11584 function with side effects.
11585 (init_decl_processing): Mark all memory allocating DECLs with
11586 DECL_IS_MALLOC.
11587
11588 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11589
11590 * except.c (expand_end_java_handler): Call
11591 expand_resume_after_catch and end_catch_handler.
11592
11593 1999-11-30 Anthony Green <green@cygnus.com>
11594
11595 * verify.c (verify_jvm_instructions): Create new return label
11596 chain if non existent (don't rely on the verified state of the jsr
11597 target.)
11598
11599 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
11600
11601 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
11602 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
11603
11604 * parse.y (patch_assignment): Removed bogus final class test on
11605 lhs when checking on whether to emit an ArrayStoreException runtime
11606 check.
11607 * expr.c (expand_java_arraystore): Likewise.
11608
11609 1999-11-28 Anthony Green <green@cygnus.com>
11610
11611 * decl.c (find_local_variable): Reuse single slot decls when
11612 appropriate.
11613
11614 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11615
11616 * jcf-parse.c (saw_java_source): Global variable removed.
11617 (read_class): Don't use `saw_java_source'. Added extra braces.
11618 (yyparse): Code setting `saw_java_source' removed.
11619
11620 1999-11-24 Mark Mitchell <mark@codesourcery.com>
11621
11622 * except.c (emit_handlers): Zero catch_clauses after emitting them.
11623
11624 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11625
11626 * verify.c (merge_type_state): Non verified subroutines being
11627 considered more than once to trigger passive type merge.
11628
11629 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11630
11631 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
11632 in case of error. Error message tuned.
11633
11634 1999-11-21 Anthony Green <green@cygnus.com>
11635
11636 * constants.c (find_methodref_index): Unwrap method names before
11637 inserting them in the constant pool.
11638
11639 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
11640
11641 * class.c (assume_compiled_node): New typedef.
11642 (assume_compiled_tree): New static data.
11643 (find_assume_compiled_node): New function.
11644 (add_assume_compiled): New function.
11645 (assume_compiled): New function.
11646 * class.c (make_class_data): Use assume_compiled.
11647 (is_compiled_class): Use assume_compiled.
11648
11649 * java-tree.h (add_assume_compiled): Declare.
11650
11651 * lang.c (lang_decode_option): Parse new options.
11652
11653 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11654
11655 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
11656 int_type_node: that's what `_Jv_AllocObject' expects.
11657
11658 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11659
11660 * parse.y (lookup_method_invoke): Use lang_printable_name to
11661 reliably build the type name during error report. Fixes PR gcj/97.
11662
11663 1999-11-09 Tom Tromey <tromey@cygnus.com>
11664
11665 * jcf-path.c: Include <sys/stat.h>.
11666 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
11667 (DIR_UP): New macro.
11668
11669 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11670
11671 * parse.y (source_end_java_method): Resume permanent allocation,
11672 reversing Apr 27 1998 patch.
11673 (patch_string_cst): Pop obstacks after having pushed the permanent
11674 ones.
11675
11676 1999-11-05 Tom Tromey <tromey@cygnus.com>
11677
11678 * class.c (finish_class): Emit inlined methods if any native
11679 methods exist in the class. Fixes PR gcj/85.
11680
11681 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11682
11683 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
11684 (qualify_ambiguous_name): Likewise.
11685
11686 1999-11-03 Godmar Back <gback@cs.utah.edu>
11687
11688 * typeck.c: (lookup_java_method): search all inherited
11689 interfaces when looking up interface method.
11690
11691 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11692
11693 * parse.y (method_header:): Issue error message for rule `type
11694 error'.
11695 (synchronized:): Error report when not using synchronized.
11696
11697 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11698
11699 * parse.y (resolve_qualified_expression_name): Prevent `this' from
11700 being used before the superclass constructor has been called.
11701 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
11702 instead of `CALL_THIS_CONSTRUCTOR_P'.
11703
11704 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
11705
11706 * check-init.c: Fix typo in comment.
11707
11708 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11709
11710 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
11711 and final method.
11712
11713 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11714
11715 * parse.y (expression_statement:): Call function to report
11716 improper invocation of a constructor.
11717 (parse_ctor_invocation_error): New function.
11718
11719 1999-10-26 Mark Mitchell <mark@codesourcery.com>
11720
11721 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
11722 remember_end_note.
11723
11724 1999-10-21 Tom Tromey <tromey@cygnus.com>
11725
11726 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
11727 in generated `main'.
11728
11729 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11730
11731 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
11732 (qualify_ambiguous_name): Likewise.
11733
11734 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11735
11736 * parse.y (java_complete_tree): fold_constant_for_init to work on
11737 permanent_obstack.
11738 (java_complete_lhs): Likewise.
11739 (array_constructor_check_entry): Complete an initializer element
11740 on permanent_obstack.
11741
11742 1999-10-19 Tom Tromey <tromey@cygnus.com>
11743
11744 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
11745 From Mike Moreton <mike@pillim.demon.co.uk>.
11746
11747 1999-10-15 Greg McGary <gkm@gnu.org>
11748
11749 * java-tree.h (flag_bounds_check): Remove extern decl.
11750 * lang.c (flag_bounds_check): Remove global variable.
11751 (lang_f_options): Remove "bounds-check" entry.
11752 (lang_init_options): Default flag_bounds_check to "on".
11753
11754 1999-10-14 Tom Tromey <tromey@cygnus.com>
11755
11756 * jvgenmain.c (usage): New function.
11757 (main): Use it. Also, handle `-D' options.
11758 * jvspec.c (lang_specific_driver): Recognize -D.
11759 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
11760
11761 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
11762
11763 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11764
11765 * jcf-dump.c (print_constant, disassemble_method): Don't call a
11766 variadic function with a non-literal format string.
11767
11768 * parse-scan.y (report_main_declaration): Likewise.
11769
11770 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
11771
11772 * parse.y (read_import_dir, patch_assignment, patch_binop,
11773 patch_array_ref): Likewise.
11774
11775 * typeck.c (build_java_array_type): Likewise.
11776
11777 * verify.c (verify_jvm_instructions): Likewise.
11778
11779 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11780
11781 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
11782
11783 1999-10-07 Anthony Green <green@cygnus.com>
11784
11785 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
11786 where CHECK_PUT may fail for valid reasons.
11787
11788 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
11789 UNSAFE_PUTN): New macros.
11790
11791 1999-10-04 Tom Tromey <tromey@cygnus.com>
11792
11793 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
11794 well. Fixes Java PR gcj/59.
11795 * parse-scan.y (yyerror): Report errors.
11796
11797 1999-09-24 Glenn Chambers <GChambers@provsol.com>
11798
11799 * decl.c (insert_block): Remove unconditional `abort'.
11800
11801 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
11802
11803 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
11804 FUNCTION_CODE now of type int. All callers changed.
11805 Set the builtin's DECL_BUILT_IN_CLASS.
11806
11807 1999-09-23 Tom Tromey <tromey@cygnus.com>
11808
11809 * jvspec.c (lang_specific_driver): Don't read spec file if
11810 -fsyntax-only given.
11811
11812 1999-09-22 Tom Tromey <tromey@cygnus.com>
11813
11814 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
11815
11816 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
11817 (WORDS_TO_LONG): Likewise.
11818 (WORDS_TO_DOUBLE): Likewise.
11819
11820 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11821
11822 * jcf-write.c (RELOCATION_VALUE_0): New macro.
11823 (RELOCATION_VALUE_1): Likewise.
11824 (emit_iinc, emit_reloc, push_constant1, push_constant2,
11825 push_in_const, push_long_const): Prototyped.
11826 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
11827 (push_constant2): Likewise.
11828 (push_int_const): Cast find_constant1's integer arguments to `jword'.
11829 (find_constant_wide): Cast find_constant2's integer arguments to
11830 `jword'.
11831 (find_constant_index): Cast find_constant2's and find_constant2's
11832 integer arguments to `jword'.
11833 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
11834 (emit_switch_reloc): Use RELOCATION_VALUE_0.
11835 (emit_if): Use RELOCATION_VALUE_1.
11836 (emit_goto): Likewise.
11837 (emit_jsr): Likewise.
11838 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
11839 argument to push_long_const to HOST_WIDE_INT.
11840
11841 1999-09-15 Andreas Schwab <schwab@suse.de>
11842
11843 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
11844
11845 1999-09-20 Nick Clifton <nickc@cygnus.com>
11846
11847 * lang.c (lang_decode_option): Extend comment.
11848
11849 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
11850
11851 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
11852 instead of fndecl.
11853
11854 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11855
11856 * gjavah.c (get_field_name, print_method_info, print_include,
11857 add_namelet): Use xmalloc, not malloc.
11858
11859 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
11860 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
11861 NULL pointer.
11862
11863 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
11864
11865 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
11866
11867 * jcf-path.c (add_entry): Likewise.
11868
11869 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
11870
11871 * jv-scan.c (xmalloc): Remove definition.
11872
11873 * jvgenmain.c (xmalloc): Likewise.
11874
11875 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
11876
11877 * lex.c (java_store_unicode): Use xrealloc, not realloc.
11878
11879 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
11880 concat, not xmalloc/sprintf.
11881 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
11882 (xstrdup): Remove definition.
11883
11884 * parse.y (duplicate_declaration_error_p,
11885 constructor_circularity_msg, verify_constructor_circularity,
11886 check_abstract_method_definitions, java_check_regular_methods,
11887 java_check_abstract_methods, patch_method_invocation,
11888 check_for_static_method_reference, patch_assignment, patch_binop,
11889 patch_cast, array_constructor_check_entry, patch_return,
11890 patch_conditional_expr): Use xstrdup, not strdup.
11891
11892 * zextract.c (ALLOC): Use xmalloc, not malloc.
11893
11894 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11895
11896 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
11897
11898 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
11899 (do_spec, lang_specific_pre_link, lang_specific_driver,
11900 input_filename, input_filename_length): Don't declare.
11901 (main_class_name, jvgenmain_spec, lang_specific_driver):
11902 Constify a char*.
11903 (lang_specific_driver): All calls to the function pointer
11904 parameter now explicitly call `fatal'.
11905
11906 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11907
11908 * parse.y (find_applicable_accessible_methods_list): Search
11909 abstract classes as interfaces.
11910
11911 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11912
11913 * class.c (finish_class): We're now outside a valid method
11914 declaration. Tell the rest of gcc so.
11915
11916 1999-09-08 Bruce Korb autogen@linuxbox.com
11917
11918 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
11919
11920 1999-09-07 Tom Tromey <tromey@cygnus.com>
11921
11922 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
11923 java-array.h.
11924 (decode_signature_piece): Don't emit "::" in JArray<>.
11925 (print_namelet): Only print trailing `;' when printing a class.
11926
11927 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
11928
11929 * java-tree.h: Delete declarations for all tree nodes now moved to
11930 global_trees.
11931 * decl.c: Delete their definitions.
11932
11933 1999-09-04 Mark Mitchell <mark@codesourcery.com>
11934
11935 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
11936 * Makefile.in (OBJS): Add ggc-callbacks.o.
11937 (OBJDEPS): Likewise.
11938
11939 1999-09-03 Tom Tromey <tromey@cygnus.com>
11940
11941 * parse.y (strip_out_static_field_access_decl): Return operand if
11942 it satisfies JDECL_P.
11943
11944 1999-09-02 Tom Tromey <tromey@cygnus.com>
11945
11946 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
11947 Handle nested arrays, like `[[I'.
11948
11949 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11950
11951 * class.c (finish_class): Remove unused parameter, all callers
11952 changed.
11953
11954 * expr.c (build_java_athrow): Change return type to void.
11955 (java_lang_expand_expr): Make sure each case in switch returns a
11956 value.
11957
11958 * java-tree.h (finish_class): Fix prototype to take void args.
11959
11960 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
11961 (main): Issue return from main, not exit.
11962
11963 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
11964
11965 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
11966
11967 * jv-scan.c (main): Issue return from main, not exit.
11968
11969 * parse.y (check_abstract_method_definitions,
11970 java_check_abstract_method_definitions): Add static prototypes.
11971 (java_complete_expand_methods): Fix call to `finish_class'.
11972
11973 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
11974 and `prevpc'.
11975
11976 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11977
11978 * lang.c (language_string): Constify.
11979
11980 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11981
11982 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
11983 Remove hacks for stuff which comes from libiberty.
11984
11985 * Make-lang.in: Likewise.
11986
11987 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
11988
11989 * Makefile.in (xref.o): Depend on xref.c explicitly.
11990
11991 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11992
11993 * java-tree.h (lang_printable_name): Constify a char*.
11994
11995 * lang.c (lang_printable_name): Likewise.
11996
11997 1999-08-27 Jeffrey A Law (law@cygnus.com)
11998
11999 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
12000 comments in C code.
12001
12002 1999-08-26 Tom Tromey <tromey@cygnus.com>
12003
12004 * gjavah.c (print_cxx_classname): Print "::" before qualified
12005 name.
12006
12007 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12008
12009 * parse.y (lookup_cl): Changed leading comment. Now does its best
12010 to set the column number.
12011 (qualify_ambiguous_name): Take WFL wrappers into account.
12012
12013 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
12014
12015 * verify.c (verify_jvm_instructions): Don't check instruction
12016 validity beyond end of method.
12017
12018 1999-08-25 Tom Tromey <tromey@cygnus.com>
12019
12020 * jvspec.c (lang_specific_driver): Correctly handle --help again.
12021
12022 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12023
12024 * gjavah.c (print_name, print_base_classname, utf8_cmp,
12025 cxx_keyword_subst, generate_access, name_is_method_p,
12026 get_field_name, print_field_name, super_class_name, print_include,
12027 decode_signature_piece, print_class_decls, usage, help,
12028 java_no_argument, version, add_namelet, print_namelet): Add static
12029 prototype.
12030 (print_base_classname, utf8_cmp, cxx_keyword_subst,
12031 name_is_method_p): Constify a char*.
12032 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
12033 Provide a final else clause in an if-else-if.
12034 (print_field_info): Add missing final arg in function call to
12035 `print_field_name'.
12036 (print_method_info, decompile_method, decode_signature_piece,
12037 print_c_decl, print_full_cxx_name, print_stub,
12038 print_mangled_classname, super_class_name, print_include,
12039 add_namelet, add_class_decl, print_class_decls, process_file,
12040 help): Constify a char*.
12041
12042 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
12043 push_int_const, find_constant_wide, find_constant_index,
12044 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
12045 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
12046 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
12047 emit_if, emit_goto, emit_jsr, call_cleanups,
12048 make_class_file_name): Add static prototypes.
12049 (generate_bytecode_return, generate_bytecode_insns): Pass a
12050 NULL_PTR, not a NULL_TREE.
12051
12052 * jv-scan.c: Include "jcf.h".
12053 (main): Declare using DEFUN macro.
12054
12055 * jvspec.c (find_spec_file, lang_specific_pre_link,
12056 lang_specific_driver): Add prototypes.
12057 (find_spec_file): Constify a char*.
12058
12059 * keyword.gperf (hash, java_keyword): Add prototypes.
12060
12061 * lang.c (lang_print_error): Add static prototype.
12062 (lang_init): Prefer memcpy over bcopy to avoid casts.
12063
12064 * lex.c (yylex): Add static prototype.
12065
12066 * parse-scan.y: Include "lex.c" earlier.
12067
12068 * parse.h: Remove redundant declaration for `yylex'.
12069
12070 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
12071 labeled_block_contains_loop_p): Add static prototypes.
12072 (not_accessible_p): Make static to match prototype.
12073
12074 * verify.c (start_pc_cmp): Don't needlessly cast away const.
12075
12076 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12077
12078 * parse.y (check_method_redefinition): Changed leading comment.
12079 (check_abstract_method_definitions): New function.
12080 (java_check_abstract_method_definitions): New function.
12081 (java_check_regular_methods): Call it.
12082 (verify_constructor_super): Fixed indentation.
12083 (lookup_method_invoke): Likewise.
12084
12085 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12086
12087 * parse.y (method_header): Return a null pointer if the current
12088 class node is null.
12089 (finish_method_declaration): Return if the current function decl
12090 is null.
12091 (source_start_java_method): Likewise.
12092 (java_method_add_stmt): Likewise.
12093
12094 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12095
12096 * class.c (emit_register_class): Removed unnecessary call to
12097 start_sequence.
12098 * parse.y (labeled_block_contains_loop_p): Removed unused local
12099 variable.
12100
12101 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12102
12103 * parse.y (java_refold): Added prototype.
12104
12105 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12106
12107 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
12108 (java_stabilize_reference): Removed unnecessary `else'.
12109 (java_complete_lhs): Set flag to remember boolean. Call
12110 java_refold. Added comments.
12111 (java_decl_equiv): New function.
12112 (binop_compound_p): Likewise.
12113 (java_refold): Likewise.
12114 (patch_unaryop): Striped static field access assigned to decl and
12115 op. Changed promotion scheme for ++/-- operators.
12116 (search_loop): New function.
12117 (labeled_block_contains_loop_p): Likewise.
12118 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
12119 comment.
12120 (patch_bc_statement): Call search_loop. Fixed comment.
12121
12122 1999-08-14 Anthony Green <green@cygnus.com>
12123
12124 * expr.c (java_lang_expand_expr): Mark static array data as
12125 referenced.
12126
12127 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
12128
12129 * jvgenmain.c (main): NUL-terminate name_obstack.
12130
12131 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12132
12133 * check-init.c (check_bool2_init, done_alternative): Add static
12134 prototypes.
12135
12136 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
12137 (add_method, build_utf8_ref, build_class_ref,
12138 append_gpp_mangled_type, layout_class_method): Constify a char*.
12139
12140 * decl.c (push_promoted_type, make_binding_level): Add static
12141 prototypes.
12142 (push_promoted_type, pushdecl): Constify a char*.
12143
12144 * except.c (find_handler_in_range, link_handler,
12145 check_start_handlers): Add static prototypes.
12146
12147 * expr.c (process_jvm_instruction): Constify a char*.
12148
12149 * gjavah.c (main): Constify a char*.
12150
12151 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
12152 Constify a char*.
12153
12154 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
12155 static prototypes.
12156 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
12157 munge, print_ents): Constify a char*.
12158
12159 * jcf-dump.c (disassemble_method): Constify a char*.
12160 (print_constant_pool, print_exception_table): Add static prototypes.
12161 (print_constant, print_exception_table, main, disassemble_method):
12162 Constify a char*.
12163
12164 * jcf-io.c (find_classfile, find_class): Likewise.
12165
12166 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
12167 (set_source_filename, predefined_filename_p): Add static prototypes.
12168 (set_source_filename, get_constant, get_class_constant,
12169 find_in_current_zip): Constify a char*.
12170
12171 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
12172 static prototypes.
12173 (add_entry, add_path, jcf_path_classpath_arg,
12174 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12175
12176 * jcf-reader.c (get_attribute, jcf_parse_preamble,
12177 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
12178 jcf_parse_one_method, jcf_parse_methods,
12179 jcf_parse_final_attributes): Add static prototypes.
12180 (get_attribute): Constify a char*.
12181
12182 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
12183 jcf_dependency_add_target, jcf_path_classpath_arg,
12184 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
12185
12186 * jv-scan.c (main): Constify a char*.
12187 (gcc_obstack_init): Add prototype arguments.
12188
12189 * jvgenmain.c (gcc_obstack_init): Likewise.
12190 (main): Constify a char*.
12191
12192 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
12193 static prototypes.
12194 (put_decl_string, lang_print_error): Constify a char*.
12195 (lang_init): Remove redundant extern prototype.
12196
12197 * mangle.c (emit_unicode_mangled_name): Constify a char*.
12198
12199 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
12200 Add static prototypes.
12201 (get_type_from_signature): Constify a char*.
12202
12203 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
12204 Add static prototypes.
12205 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
12206 (verify_jvm_instructions): Constify a char*.
12207
12208 * xref.c (xref_flag_value): Likewise.
12209
12210 * xref.h (xref_flag_value): Likewise.
12211
12212 * zextract.c (makeword, makelong): Add static prototypes.
12213 (makeword, makelong): Constify a uch*.
12214
12215 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12216
12217 * lang.c (java_dummy_print): Constify a char*.
12218 (lang_print_error): Likewise.
12219 (lang_init): Remove redundant prototype for `print_error_function'.
12220 (lang_init_source): Likewise.
12221 (lang_identify): Constify a char*.
12222
12223 1999-08-09 Tom Tromey <tromey@cygnus.com>
12224
12225 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
12226 (WORDS_TO_LONG): Likewise.
12227 (WORDS_TO_DOUBLE): Likewise.
12228
12229 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12230
12231 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
12232
12233 * expr.c (java_stack_pop, java_array_data_offset,
12234 build_java_throw_out_of_bounds_exception, case_identity,
12235 build_java_check_indexed_type): Add static prototypes.
12236 (linenumber_table, expand_invoke, expand_java_field_op,
12237 build_primtype_type_ref, expand_byte_code): Constify a char*.
12238
12239 * java-tree.h (build_primtype_type_ref, linenumber_table):
12240 Constify a char*.
12241 (java_lang_expand_expr): Add prototype.
12242
12243 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
12244 `java_lang_expand_expr'.
12245
12246 * lex.c (java_lex_error): Constify a char*.
12247 (java_get_unicode, java_read_char, java_allocate_new_line,
12248 java_unget_unicode, java_sneak_unicode): Prototype.
12249
12250 * parse-scan.y (current_class, package_name, method_declarator,
12251 report_class_declaration, yyerror): Constify a char*.
12252
12253 * parse.h (java_report_errors): Prototype.
12254 (yyerror): Constify a char*.
12255
12256 * parse.y (classitf_redefinition_error, check_modifiers,
12257 parse_jdk1_1_error, lookup_package_type,
12258 lookup_package_type_and_set_next, get_printable_method_name,
12259 purify_type_name): Constify a char*.
12260 (build_super_invocation, maybe_generate_finit,
12261 verify_constructor_super, parser_add_interface,
12262 add_superinterfaces, jdep_resolve_class, note_possible_classname,
12263 java_complete_expand_methods, java_expand_finals,
12264 cut_identifier_in_qualified, java_stabilize_reference,
12265 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
12266 merge_string_cste): Prototype.
12267 (single_type_import_declaration, yyerror,
12268 variable_redefinition_error, build_array_from_name,
12269 build_unresolved_array_type, check_class_interface_creation,
12270 resolve_class, complete_class_report_errors,
12271 note_possible_classname, read_import_dir,
12272 find_in_imports_on_demand, resolve_package, fix_constructors,
12273 check_deprecation, lookup_method_invoke,
12274 maybe_build_primttype_type_ref, array_constructor_check_entry):
12275 Constify a char*.
12276 (java_complete_expand_methods, java_expand_finals): Make static.
12277 (convert_narrow): Remove static prototype.
12278
12279 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
12280
12281 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
12282
12283 1999-08-02 Richard Henderson <rth@cygnus.com>
12284
12285 * decl.c: Include defaults.h instead of expr.h.
12286 * parse.y: Likewise.
12287
12288 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
12289
12290 * java/decl.c (start_java_method): Change all uses of
12291 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
12292 Ensure expr.h is included.
12293 * java/expr.c (pop_arguments): Ditto.
12294 * java/parse.y (expand_start_java_method): Ditto.
12295
12296 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12297
12298 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
12299
12300 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
12301
12302 * decl.c: Include "function.h".
12303 * except.c: Likewise.
12304 * parse.y: Likewise.
12305 * Makefile.in: Update dependencies.
12306
12307 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12308
12309 * expr.c (build_java_soft_divmod): Provide a default case in switch.
12310 (java_lang_expand_expr): Mark parameters `target', `tmode' and
12311 `modifier' with ATTRIBUTE_UNUSED.
12312
12313 * gjavah.c (process_file): Add braces around ambiguous `else'.
12314
12315 * jcf-dump.c (print_access_flags, localvar_free): Change return
12316 type to void.
12317
12318 * parse.y (java_complete_expand_method): Initialize variable
12319 `exception_copy'.
12320 (resolve_qualified_expression_name): Likewise for `field_decl'.
12321 (patch_method_invocation): Likewise for `class_to_search'.
12322 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
12323 (patch_assignment): Likewise for `lhs_type'.
12324
12325 * verify.c (verify_jvm_instructions): Remove unused variable
12326 `caller'.
12327
12328 1999-07-25 Richard Henderson <rth@cygnus.com>
12329
12330 * decl.c (va_list_type_node): New.
12331
12332 1999-07-25 Anthony Green <green@cygnus.com>
12333
12334 * gjavah.c (print_stub): New function.
12335 (METHOD_IS_NATIVE): New macro.
12336 (print_mangled_classname): Make static.
12337 (HANDLE_END_FIELD): Don't emit fields during stub generation.
12338 (process_file): Perform stub generation.
12339 (HANDLE_METHOD): Don't emit class decls during stub
12340 generation.
12341 (HANDLE_END_METHOD): Take into account stub generation.
12342 (print_method_info): Handle stub generation.
12343 (print_stub): New function.
12344 (print_cxx_classname): Make signature consistant with others.
12345 (help): Describe -stubs option.
12346 (main): Create stub file.
12347 (version): Use version.c.
12348 (print_full_cxx_name): New function.
12349 (print_c_decl): Use print_full_cxx_name.
12350
12351 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12352
12353 * check-init.c (check_init): Handle MAX_EXPR.
12354
12355 1999-07-15 Andrew Haley <aph@cygnus.com>
12356
12357 * lang.c (flag_use_divide_subroutine): New variable.
12358 * typeck.c: (convert_ieee_real_to_integer): Bounds check
12359 fp-to-integer conversion.
12360 (convert): Call convert_ieee_real_to_integer when flag_fast_math
12361 is not set.
12362
12363 * expr.c (build_java_soft_divmod): New function.
12364 (build_java_binop): Call build_java_soft_divmod if
12365 flag_use_divide_subroutine is set.
12366 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12367 soft_lrem_node: new builtin functions.
12368 (init_decl_processing) Initialize the new builtins.
12369 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
12370 soft_lrem_node: new builtin functions.
12371 (build_java_soft_divmod): New function.
12372 * parse.y: Call build_java_soft_divmod if
12373 flag_use_divide_subroutine is set.
12374 * parse.c: Rebuilt.
12375
12376 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
12377 a --specs= arg) even if not linking.
12378 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
12379 -fuse-divide-subroutine
12380
12381 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12382
12383 * parse.y (resolve_and_layout): Check methods only once.
12384 (resolve_qualified_expression_name): Verify thrown exceptions
12385 compatibility.
12386 (check_thrown_exceptions): Reject exceptions thrown in
12387 initializer. Error message tuned.
12388
12389 1999-07-14 Andrew Haley <aph@cygnus.com>
12390
12391 * expr.c (expand_expr): Do not return the last statement in a
12392 block as the block's value.
12393
12394 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12395
12396 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
12397 CALL_EXPR, to avoid order of evaluation changes.
12398
12399 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12400
12401 * parse.y (qualify_ambiguous_name): Do not use
12402 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
12403
12404 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12405
12406 * check-init.c (check_init): Handle MAX_EXPR.
12407 * expr.c (force_evaluation_order): Force method call arguments to
12408 be evaluated in left-to-right order.
12409 * parse.y (qualify_ambiguous_name): Loop again to qualify
12410 NEW_ARRAY_EXPR properly.
12411
12412 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12413
12414 * parse.y (patch_invoke): Resolve unresolved invoked method
12415 returned type.
12416 (qualify_ambiguous_name): STRING_CST to qualify expression for
12417 type name resolution.
12418
12419 1999-06-24 Andrew Haley <aph@cygnus.com>
12420
12421 * class.c (finish_class): Whenever a deferred method is
12422 output, rescan the list of methods to see if a new candidate for
12423 output can be found.
12424
12425 1999-06-28 Tom Tromey <tromey@cygnus.com>
12426
12427 * jvspec.c (lang_specific_driver): Recognize --help.
12428
12429 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12430
12431 * parse.y (resolve_package): Fixed bogus return statement.
12432 (patch_method_invocation): Resolve method invocation beginning with
12433 a package name qualifier.
12434
12435 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12436
12437 * Make-lang.in (java.stage1): Depend on stage1-start.
12438 (java.stage2): Likewise for stage2-start.
12439 (java.stage3): Likewise for stage3-start.
12440 (java.stage4): Likewise for stage4-start.
12441
12442 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12443
12444 * parse.y (java_complete_lhs): When doing cross referencing, don't
12445 try to keep file location on a WFL expanded as a CALL_EXPR.
12446
12447 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12448
12449 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
12450 compiling to class file a void method with an empty method body.
12451 As a side effect, the bytecode backend will generate the
12452 appropriate `return' instruction.
12453
12454 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12455
12456 * parse.y (lookup_package_type_and_set_next): New function prototype.
12457 (resolve_package): Search current and imported packages.
12458 (lookup_package_type_and_set_next): New function.
12459
12460 1999-06-22 Andrew Haley <aph@cygnus.com>
12461
12462 * verify.c (verify_jvm_instructions): Check for pending blocks
12463 before invalid PC test and opcode switch, not after.
12464
12465 1999-06-21 Andrew Haley <aph@cygnus.com>
12466
12467 * except.c (find_handler_in_range): The upper limit for exception
12468 ranges is exclusive, not inclusive: (start <= pc < end).
12469 (link_handler): find child pointer which points to outer by
12470 searching sibling list: previous code incorrectly assumed that
12471 outer->outer->first_child must point to outer.
12472 * verify.c (verify_jvm_instructions): FIXME added to code for
12473 `athrow'.
12474 (verify_jvm_instructions): Do not assume that the last block
12475 processed in a subroutine is a block which ends with a `ret'
12476 instruction. With some control flows it is possible that the last
12477 block ends with an `athrow'.
12478
12479 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12480
12481 * parse.y (qualify_ambiguous_name): Reorganized the post
12482 evaluation of non WFL leading expression nodes.
12483
12484 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12485
12486 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
12487 CONVERT_EXPR.
12488
12489 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12490
12491 * parse.y (qualify_ambiguous_name): Handle qualified expression
12492 beginning with a STRING_CST.
12493
12494 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12495
12496 * parse.y (register_fields): Set DECL_INITIAL on both
12497 pre-initialized static and public fields.
12498 (resolve_field_access): Static field access expressions to always
12499 use pointer types.
12500 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
12501 qualification. CONVERT_EXPR to be resolved as an expression name.
12502 (java_complete_lhs): Identify and access qualified final
12503 initialized field in switch statement case expression.
12504 (fold_constant_for_init): Pre-initialized field decl constant to
12505 be folded.
12506
12507 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12508
12509 * parse.y (note_possible_classname): Mark returned node with
12510 QUALIFIED_P only if the original class name contained a '/'.
12511
12512 1999-06-05 Anthony Green <green@cygnus.com>
12513
12514 * Make-lang.in (gcjh): More parallel build fixes.
12515
12516 1999-06-03 Mike Stump <mrs@wrs.com>
12517
12518 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
12519
12520 1999-06-02 Anthony Green <green@cygnus.com>
12521
12522 * except.c (link_handler): Chain exception handlers in order.
12523
12524 1999-06-02 Anthony Green <green@cygnus.com>
12525
12526 * expr.c (expand_byte_code): Fill unreachable bytecode regions
12527 with nops and process as usual in order to always set correct EH
12528 ranges. Emit detailed warnings about unreachable bytecodes.
12529
12530 1999-06-02 Anthony Green <green@cygnus.com>
12531
12532 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
12533 constant.
12534
12535 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12536
12537 * parse.y (lookup_field_wrapper): Unified returned value to NULL
12538 or the searched field decl.
12539
12540 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12541
12542 * parse.y (fold_constant_for_init): Convert numerical constant
12543 values to the type of the assigned field.
12544
12545 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12546
12547 * expr.c (lookup_field): Relaxed the test on class loading error
12548 detection.
12549 * parse.y (fold_constant_for_init): Enabeled old code.
12550
12551 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12552
12553 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
12554 decide the validity of the cast of a java.lang.Cloneable reference
12555 to an array.
12556 (patch_conditional_expr): Fixed first argument passed to
12557 binary_numeric_promotion.
12558
12559 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12560
12561 * parse.y (qualify_ambiguous_name): Take into account that a
12562 CONVERT_EXPR might specify a type as a WFL.
12563
12564 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12565
12566 * parse.y (patch_assignment): Save the rhs before using it as an
12567 argument to _Jv_CheckArrayStore.
12568
12569 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12570
12571 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
12572
12573 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12574
12575 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
12576 floating point literal only when the exponent indicator has been
12577 parsed.
12578
12579 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12580
12581 * parse.y (formal_parameter:): Construct argument tree list
12582 element even if a yet unsupported final parameter was encountered.
12583
12584 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12585
12586 * parse.y (finish_method_declaration): Issue errors for native or
12587 abstract methods declared with a method body, as well as for non
12588 native or non abstract methods with no method body.
12589
12590 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12591
12592 * class.c (build_utf8_ref): Initialize variable `field'.
12593
12594 * decl.c (init_decl_processing): Initialize variable `field'.
12595
12596 * expr.c (build_known_method_ref): Mark parameters `method_type',
12597 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
12598 (process_jvm_instruction): Likewise for parameter `length'.
12599
12600 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
12601 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
12602 ATTRIBUTE_UNUSED.
12603
12604 * parse.y (maybe_generate_clinit): Remove unused variable
12605 `has_non_primitive_fields'.
12606 (find_in_imports_on_demand): Initialize variables `node_to_use'
12607 and `cl'.
12608 (patch_binop): Likewise for variable `prom_type'.
12609 (patch_unaryop): Likewise for variable `prom_type'.
12610
12611 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
12612
12613 * xref.c (xref_table): Add missing initializer.
12614
12615 1999-05-14 Tom Tromey <tromey@cygnus.com>
12616
12617 * java-except.h (struct eh_range): Removed unused `next' member.
12618 * verify.c (verify_jvm_instructions): Call check_nested_ranges
12619 after adding all exception handlers. Sort exception ranges in
12620 order of start PC.
12621 (struct pc_index): New structure.
12622 (start_pc_cmp): New function.
12623 * except.c (add_handler): Return `void'. Don't call link_handler;
12624 instead construct an ordinary linked list and do range
12625 coalescing.
12626 (check_nested_ranges): New function.
12627 (link_handler): Changed interface to allow merging of eh_ranges.
12628 Split overlapping ranges. Return `void'.
12629
12630 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12631
12632 * parse.y (constructor_block_end:): New rule, tagged <node>.
12633 (constructor_body:): Use `constructor_block_end' instead of
12634 `block_end'.
12635
12636 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12637
12638 * parse.y (statement_nsi:): Pop `for' statement block.
12639 (java_complete_lhs): Labeled blocks containing no statement are
12640 marked as completing normally.
12641
12642 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12643
12644 * xref.c (xref_set_current_fp): New function, defined.
12645 * xref.h (xref_set_current_fp): New function, prototyped.
12646
12647 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12648
12649 * check-init.c (check_init): Take into account that
12650 LABELED_BLOCK_STMT can be empty.
12651
12652 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12653
12654 * parse.y (java_check_regular_methods): Warning check on not
12655 overriding methods with default access in other packages does not
12656 apply to `<clinit>'.
12657 (java_complete_lhs): If block body is an empty_stmt_node, replace
12658 it by NULL_TREE. This prevents gcc from generating an irrelevant
12659 warning.
12660
12661 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12662
12663 * check-init.c (check_init): Removed code accepting to see things
12664 falling through default:, when doing xrefs.
12665 * java-tree.h (do_not_fold): New global variable, declared.
12666 * parse.y (do_not_fold): New global variable, defined.
12667 (java_complete_expand_method): Set `do_not_fold' to the value of
12668 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
12669 and reinstall them after them have been purged; do not check for
12670 initializations; do not issue missing return errors.
12671 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
12672 when doing xrefs.
12673 (patch_binop): Skip the fold part when doing xrefs.
12674 (build_string_concatenation): Skip the concatenation part when
12675 doing xrefs.
12676 (patch_synchronized_statement): Do not generate a try-finally when
12677 doing xrefs.
12678 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
12679 and keep the location where the throw was seen.
12680 * typeck.c (convert): When `do_not_fold' is set, do not attempt
12681 any treatment on the converted node an simply return a NOP_EXPR of
12682 the targeted type.
12683 * xref.c (xref_get_data): New function, defined.
12684 * xref.h (xref_get_data): New function, declared.
12685 (XREF_GET_DATA): Use xref_get_data.
12686
12687 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12688
12689 * gjavah.c (print_include): Cast the result of `strlen' to int
12690 when comparing against a signed value.
12691 (add_namelet): Likewise.
12692
12693 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12694
12695 * expr.c (expand_invoke): Mark parameter `nargs' with
12696 ATTRIBUTE_UNUSED.
12697 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
12698
12699 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
12700 ATTRIBUTE_UNUSED.
12701
12702 * jcf-reader.c (get_attribute): Cast a value to long
12703 when comparing against a signed expression. Likewise.
12704
12705 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
12706 HOST_BITS_PER_CHAR.
12707
12708 1999-05-11 Andrew Haley <aph@cygnus.com>
12709
12710 * parse.y (source_end_java_method): If the current method contains
12711 any exception handlers, force asynchronous_exceptions: this is
12712 necessary because signal handlers in libjava may throw exceptions.
12713 * decl.c (end_java_method): Ditto.
12714
12715 1999-05-11 Tom Tromey <tromey@cygnus.com>
12716
12717 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
12718 flags.
12719 * jvspec.c (THREAD_NAME): Removed.
12720 (GC_NAME): Likewise.
12721 (MATHLIB): Likewise.
12722 (WITHLIBC): Likewise.
12723 (GCLIB): Likewise.
12724 (THREADLIB): Likewise.
12725 (MATH_LIBRARY): Likewise.
12726 (lang_specific_driver): Don't add `-l' options to command line.
12727 Instead, add a single --specs option. Recognize `-L' options and
12728 use them to search for spec file.
12729 (find_spec_file): New function.
12730 (SPEC_FILE): New define.
12731
12732 1999-05-11 Dave Brolley <brolley@cygnus.com>
12733
12734 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
12735 cpplib-enabled build.
12736
12737 1999-05-05 Per Bothner <bothner@cygnus.com>
12738
12739 * class.c (make_field_value): DECL_INITIAL may be a string literal;
12740 temporarily zero it while calling rest_of_decl_compilation.
12741
12742 * java-tree.h (string_ptr_type_node): Add declaration.
12743 * decl.c: Define and initialize string_ptr_type_node.
12744 * parse.y (patch_string_cst): Use string_ptr_type_node.
12745
12746 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
12747 * parse.y (for_statement): Now unconditionally exit_block.
12748 (finish_labeled_statement): No longer exit_block if for-loop.
12749 (patch_loop_statement): Check harder if the loop is already labeled.
12750
12751 * parse.y (patch_initialized_static_field): Removed function.
12752 (maybe_generate_clinit): Removed special handling for interfaces.
12753 (java_complete_expand_methods): Do a preliminary java_complete_tree
12754 on <clinit> to determine if it can be removed.
12755 (java_complete_expand_method): Remove special handling for <clinit>.
12756 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
12757 optimize if we get back empty_stmt_node.
12758 For MODIFY_EXPR, re-do checking of static initializers.
12759 (fold_constant_for_init): Don't return immediate if VAR_DECL.
12760 For VAR_DECL, pass correct context.
12761
12762 * verify.c (verify_jvm_instructions): Better error messages.
12763
12764 1999-05-03 Tom Tromey <tromey@cygnus.com>
12765
12766 * parse-scan.y (interface_declaration): Call
12767 report_class_declaration for interfaces.
12768
12769 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
12770
12771 * Makefile.in: Remove -v from bison command lines.
12772
12773 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12774
12775 * check-init.c (check_init): Exclude a case of error when doing
12776 xrefs.
12777 * class.c (layout_class_method): Don't generate the error message
12778 twice when compiling from source.
12779 * lang-options.h: Added `-Wredundant-modifers' and
12780 `-Wunusupported-jdk11' flags and help text.
12781 * lang.c (lang_decode_option): Added support for
12782 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
12783 flag_static_local_jdk11 and flag_redundant set accordingly.
12784 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
12785 * parse.h (EXPR_WFL_ADD_COL): New macro.
12786 (DECL_END_SOURCE_LINE): Likewise.
12787 (DECL_INHERITED_SOURCE_LINE): Likewise.
12788 * parse.y (static_ref_err): New function, prototyped.
12789 (CCB_TK): Now tagged <operator>.
12790 (class_body:): Remember the location of the closing '}' of a class
12791 definition when doing xrefs.
12792 (block:): Likewise.
12793 (block_end:): Likewise.
12794 (create_class): Remember the location of the inherited class
12795 identifier when doing xrefs.
12796 (register_fields): Added test on first operand of `init' before
12797 testing it TREE_CODE.
12798 (method_header): Store the location of the class identifier in the
12799 class decl when doing xrefs.
12800 (finish_method_declaration): Don't combine first/last method line
12801 when doing xref.
12802 (java_check_regular_methods): Warning check on not overriding
12803 methods with default access on other packages move before check on
12804 static methods. Initialization of `aflags' also moved up.
12805 (resolve_expression_name): Call static_ref_err to report the error.
12806 (static_ref_err): New function, implemented.
12807 (resolve_field_access): Returned simplified static field access
12808 when doing xrefs.
12809 (resolve_qualified_expression_name): Check for illegal use of
12810 static fields in a non static context. Call static_ref_err to
12811 report error in various places.
12812 (java_complete_tree): Do not fold initialized static fields when
12813 doing xrefs.
12814 (java_complete_lhs): Likewise.
12815
12816 1999-04-29 Anthony Green <green@cygnus.com>
12817
12818 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
12819 create internal labels.
12820 (lookup_label): Ditto.
12821
12822 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12823
12824 * class.c (layout_class_method): Generate <clinit>'s rtl for
12825 interfaces.
12826 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12827 for interfaces' <clinit>.
12828 * expr.c (lookup_field): Search for fields in interfaces.
12829 (expand_invoke): Fixed indentation.
12830 (expand_java_field_op): Likewise. Use IS_CLINIT.
12831 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
12832 (IS_CLINIT): New macro.
12833 * parse.y (type_declaration:): Call maybe_generate_clinit after an
12834 interface was parsed.
12835 (maybe_generate_clinit): Don't generate if the current class is an
12836 interface with only fields of primitive types.
12837 (reset_method_name): Use IS_CLINIT.
12838 (java_complete_expand_method): Expand <clinit> when it exists for
12839 interfaces. Use IS_CLINIT.
12840 (resolve_expression_name): Use DECL_CONTEXT instead of
12841 current_class to build static field references.
12842 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
12843 ARRAY_REF when doing xreferencing.
12844 (check_final_assignment): Fixed typo in leading comment. Use
12845 IS_CLINIT.
12846 (patch_array_ref): Don't fully expand array references when
12847 xreferencing.
12848 (patch_return): Use IS_CLINIT.
12849 (patch_throw_statement): Likewise.
12850
12851 1999-04-22 Tom Tromey <tromey@cygnus.com>
12852
12853 * Make-lang.in (JAVA_SRCS): Added check-init.c.
12854
12855 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12856
12857 * decl.c (predef_filenames, predef_filenames_size): New globals
12858 (init_decl_processing): predef_filenames and predef_filenames_size
12859 initialized.
12860 * java-tree.h (predef_filenames, predef_filenames_size): Declared
12861 extern.
12862 * jcf-parse.c (predefined_filename_p): New function.
12863 (yyparse): Check that files on the command line are specified only
12864 once and issue a warning otherwise.
12865 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
12866 * parse.y (source_end_java_method): Nullify NOP method bodies, to
12867 avoid a gcc warning with -W -Wall turned on.
12868 (java_expand_classes): Abort if errors were encountered.
12869 (java_complete_lhs): If the cross reference flag is set, wrap
12870 field DECL node around a WFL when resolving expression name.
12871
12872 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12873
12874 * lang.c (lang_decode_option): Fixed returned value when parsing
12875 `-fxref=...' and `-Wall'.
12876 * parse.y (source_end_java_method): Do not generate code when
12877 flag_emit_xref is set.
12878 (resolve_expression_name): Do not build static field access when
12879 flag_emit_xref is set.
12880 (resolve_field_access): No special treatment on `length' when
12881 flag_emit_xref is set. Do not build qualified static field access
12882 when flag_emit_xref is set.
12883 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
12884 when flag_emit_xref is set.
12885 (patch_assignment): Do not generate array store runtime check when
12886 flag_emit_xref is set.
12887 * xref.c (xref_flag_value): Fixed function declaration
12888 indentation.
12889 (xset_set_data): New function.
12890 * xref.h (xref_set_data): Added prototype for new function.
12891 (typedef struct xref_flag_table): New field data.
12892 (XREF_GET_DATA): New macro.
12893
12894 1999-04-19 Tom Tromey <tromey@cygnus.com>
12895
12896 * xref.h (enum): Removed trailing comma.
12897
12898 * parse.y (resolve_qualified_expression_name): Added missing
12899 `break'.
12900
12901 1999-04-15 Anthony Green <green@cygnus.com>
12902
12903 * gjavah.c: New prototypes for java_float_finite and
12904 java_double_finite.
12905
12906 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12907
12908 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
12909 references.
12910
12911 1999-04-06 Jeffrey A Law (law@cygnus.com)
12912
12913 * Makefile.in (TREE_H): Add tree-check.h.
12914 (RTL_H): Add genrtl.h.
12915
12916 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12917
12918 * parse.y (patch_assignment): Added ArrayStoreException runtime
12919 check.
12920
12921 1999-04-06 Per Bothner <bothner@cygnus.com>
12922
12923 * expr.c (pop_type_0): New function.
12924 (pop_type): Use pop_type_0.
12925 * java-tree.h (pop_type_0): New declaration.
12926 * verify.c (verify_jvm_instructions): Check return instructions.
12927
12928 * parse.y (patch_binop): Don't fold if non-constant and emiting
12929 class files.
12930
12931 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12932
12933 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
12934
12935 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
12936 (main_jcf): Don't define.
12937 (process_file): Don't set `main_jcf'.
12938
12939 * java-tree.h (main_jcf): Don't declare.
12940
12941 * jcf-parse.c (main_jcf): Add static definition.
12942
12943 * lang.c (main_jcf): Don't define.
12944
12945 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12946
12947 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
12948
12949 * decl.c (copy_lang_decl): Likewise for `bcopy'.
12950
12951 * jcf-depend.c: Include "config.h", not <config.h>.
12952
12953 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
12954 `bcopy' to PTR.
12955
12956 * jcf-path.c: Include "config.h", not <config.h>.
12957
12958 * lex.c: Don't include various system header files.
12959 (java_init_lex): Cast the argument of `bzero' to PTR
12960
12961 * parse-scan.y (java_push_parser_context): Likewise.
12962
12963 * parse.y (java_push_parser_context): Likewise.
12964 (patch_bc_statement): Match format specifier to variable argument.
12965
12966 * xref.c: Don't include <stdio.h>.
12967
12968 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12969
12970 * parse.y (struct parser_ctxt *ctxp): Now global.
12971 (declare_local_variables): Use WFL compound value for the
12972 declaration source line value, when doing cross-referencing.
12973
12974 1999-03-31 Tom Tromey <tromey@cygnus.com>
12975
12976 * gjavah.c (print_field_info): Allow constants of other types.
12977 (print_include): Generate include when new name is proper prefix
12978 of already printed name.
12979 (add_namelet): Likewise.
12980 (cxx_keyword_subst): New function.
12981 (print_method_info): Use it.
12982 (print_field_name): New function.
12983 (get_field_name): New function.
12984 (print_field_info): Use get_field_name and print_field_name.
12985
12986 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12987
12988 * Makefile.in (keyword.h): Generate using gperf language 'C', not
12989 'KR-C', so gperf uses the `const' keyword on strings.
12990
12991 * keyword.gperf (java_keyword): Const-ify a char*.
12992
12993 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12994
12995 * parse.y (patch_bc_statement): Fixed identation and a bogus
12996 `printf' format.
12997
12998 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12999
13000 * parse.y (patch_assignment): Allow static variables in other
13001 classes to be assigned.
13002
13003 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13004
13005 * class.c (maybe_add_interface): Remove unused variable
13006 `interface_binfo'.
13007 (make_class_data): Use = for assignment, not ==. Likewise.
13008 (emit_register_classes): Remove unused variable `decl'.
13009
13010 * lex.c: Fix comment so as not to contain an embedded `/*'.
13011
13012 * verify.c (verify_jvm_instructions): Remove unused variable
13013 `self_type'.
13014
13015 1999-03-27 Per Bothner <bothner@cygnus.com>
13016
13017 * parse.y (complete_loop_body): Rename to finish_loop_body.
13018 (complete_labeled_statement): Rename to finish_labeled_statement.
13019 (complete_for_loop): Rename to finish_for_loop.
13020 (complete_method_declaration): Rename to finish_method_declaration.
13021
13022 * java-tree.h (continue_identifier_node): New global node.
13023 * decl.c: Define and initialize continue_identifier_node.
13024 * parse.y (generate_labeled_block): Remove - no longer needed.
13025 (build_loop_body): Use continue_identifier_node for continue block.
13026 (finish_labeled_statement): Also do pop_labeled_block actions.
13027 (java_complete_lhs): POP_LOOP even if error.
13028 (build_labeled_block): Special handling for continue_identifier_node.
13029 (patch_loop_statement): Re-organize.
13030 (patch_bc_statement): Re-write.
13031
13032 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13033
13034 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
13035 using a WFL compound value.
13036 * parse.y (xref.h): Include.
13037 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
13038 WFL compound value.
13039 (register_fields): Set WFL compound value to lineno if doing
13040 xrefs.
13041 (java_complete_expand_method): Call expand_xref if flag_emit_xref
13042 is set.
13043 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
13044 * xref.h (expand_xref): Prototype renamed from xref_generate.
13045
13046 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13047
13048 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
13049 (GET_CURRENT_BLOCK): New macro.
13050 * parse.y (current_static_block): New global variable.
13051 (method_body:): Define action.
13052 (complete_method_declaration): Set current_function_decl to NULL
13053 when work on the current method is done.
13054 (declare_local_variables): Use GET_CURRENT_BLOCK.
13055 (java_method_add_stmt): Likewise.
13056 (java_complete_expand_method): Disable the use of `this' when
13057 expanding <clinit>.
13058 (enter_a_block): If no current method exist, use
13059 current_static_block to link static initializer blocks.
13060 (exit_block): Rewritten to use current_static_block when no current
13061 method decl exists.
13062 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
13063 (patch_return): Forbid the use of `return' in static initializers.
13064 (patch_throw_statement): Fixed indentation. Issue specific error
13065 for uncaught thrown checked exception in static initializer
13066 blocks. Removed FIXME.
13067
13068 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
13069
13070 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
13071 Link gcj from gcc.o.
13072
13073 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13074
13075 * parse.y (find_applicable_accessible_methods_list): When dealing
13076 with interface: ensure that a given interface or java.lang.Object
13077 are searched only once.
13078
13079 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13080
13081 * gjavah.c (print_c_decl): Remove unused argument `flags'.
13082
13083 * jcf-dump.c (print_access_flags): Add braces around if-else.
13084
13085 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
13086 COMBINE_INPUTS.
13087
13088 * lex.c (build_wfl_node): Add static prototype.
13089
13090 * lex.h (build_wfl_node): Remove static prototype.
13091
13092 * parse.y: Include lex.c early enough to declare everything needed.
13093 Ensure calls to `build_wfl_node' pass the proper arguments.
13094 (create_class): Remove unused variable `super_decl'.
13095 (get_printable_method_name): Initialize variable `name'.
13096
13097 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13098
13099 * Changelog: Fixed 1999-03-22 typos.
13100 * lang.c (lang_decode_option): Fixed typo in error string in the
13101 XARG section.
13102
13103 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13104
13105 * Makefile.in (JAVA_OBJS): Added entry xref.o.
13106 (xref.o): New rule.
13107 * java-tree.h (flag_emit_xref): Declared extern.
13108 * lang.c (xref.h): Included.
13109 (flag_emit_xref): New global variable.
13110 (lang_decode_option): Added support for -fxref.
13111 * xref.c: Created.
13112 * xref.h: Likewise.
13113
13114 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
13115
13116 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
13117 linked with.
13118
13119 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13120
13121 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
13122 $(srcdir)/../system.h and $(JAVA_TREE_H).
13123 (jcf-io.o): Depend on $(JAVA_TREE_H).
13124 (mangle.o): Likewise.
13125
13126 * check-init.c (check_cond_init): Add static prototype.
13127
13128 * class.c (build_java_method_type, hashUtf8String,
13129 make_field_value, get_dispatch_vector, get_dispatch_table,
13130 append_gpp_mangled_type, mangle_static_field): Likewise.
13131 (strLengthUtf8): Hide unused definition.
13132 (hashUtf8String): Const-ify.
13133 (make_field_value): Un-ANSI-fy.
13134
13135 * constants.c: Move inclusion of jcf.h above java-tree.h.
13136 (set_constant_entry, find_class_or_string_constant,
13137 find_name_and_type_constant, get_tag_node,
13138 build_constant_data_ref): Add static prototype.
13139
13140 * decl.c (push_jvm_slot, builtin_function,
13141 lookup_name_current_level): Likewise.
13142 (builtin_function): Const-ify.
13143
13144 * except.c (expand_start_java_handler, expand_end_java_handler):
13145 Add static prototype.
13146
13147 * expr.c (flush_quick_stack, push_value, pop_value,
13148 java_stack_swap, java_stack_dup, build_java_athrow,
13149 build_java_jsr, build_java_ret, expand_java_multianewarray,
13150 expand_java_arraystore, expand_java_arrayload,
13151 expand_java_array_length, build_java_monitor, expand_java_pushc,
13152 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
13153 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
13154 expand_compare, expand_test, expand_cond, expand_java_goto,
13155 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
13156 expand_java_field_op, java_push_constant_from_pool): Likewise.
13157
13158 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
13159 (build_java_arraynull_check): Mark parameters `node' and `type'
13160 with ATTRIBUTE_UNUSED.
13161 (note_label): Likewise for parameter `current_pc'.
13162 (expand_java_call, expand_java_ret): Hide unused definition.
13163
13164 * java-tree.h (make_class, build_constants_constructor,
13165 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
13166 init_outgoing_cpool, register_class, emit_register_classes,
13167 java_layout_seen_class_methods): Prototype.
13168 (unicode_mangling_length): Const-ify.
13169 (append_gpp_mangled_name, append_gpp_mangled_classtype,
13170 emit_unicode_mangled_name, format_int, format_uint,
13171 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
13172 jcf_print_utf8_replace, open_class): Prototype.
13173
13174 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
13175 <stdio.h>. Include tree.h/java-tree.h.
13176 (utf8_equal_string usage, process_class): Add static prototype.
13177 (open_class): Don't prototype this here.
13178 (utf8_equal_string): Match arguments to format specifiers.
13179 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
13180 TABLE_SWITCH, disassemble_method): Likewise.
13181
13182 * jcf-io.c: Include tree.h/java-tree.h.
13183 (open_class, find_classfile, jcf_print_utf8,
13184 jcf_print_utf8_replace): Const-ify.
13185
13186 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
13187 parse_class_file): Add static prototype.
13188 (find_in_current_zip): Match definition to existing static
13189 prototype.
13190
13191 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
13192 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
13193 finish_jcf_block, define_jcf_label, get_jcf_label_here,
13194 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
13195 write_chunks, adjust_typed_op, generate_bytecode_conditional,
13196 generate_bytecode_return, perform_relocations, init_jcf_state,
13197 init_jcf_method, release_jcf_state, generate_classfile):
13198 Add static prototype.
13199 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
13200 (make_class_file_name): Const-ify.
13201
13202 * jcf.h (find_classfile): Const-ify.
13203
13204 * jv-scan.c (reset_report): Remove prototype.
13205
13206 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
13207 (error): Rewrite to allow varargs.
13208
13209 * lang.c (lang_f_options): Const-ify.
13210
13211 * lex.c (java_parse_escape_sequence): Add static prototype.
13212 (java_allocate_new_line): Match definition to existing static
13213 prototype.
13214
13215 * mangle.c Include tree.h/java-tree.h.
13216 (unicode_mangling_length, emit_unicode_mangled_name,
13217 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
13218
13219 * parse.h (jdep_code): Remove trailing comma in enumeration.
13220 (java_get_line_col): Move prototype outside of !JC1_LITE test.
13221 (reset_report): Add prototype.
13222
13223 * verify.c (push_pending_label, merge_types): Add static
13224 prototypes.
13225
13226 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
13227
13228 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13229
13230 * parse.y (find_applicable_accessible_methods_list): Extend the
13231 search to superinterfaces when relevant.
13232 (search_applicable_methods_list): New function.
13233
13234 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13235
13236 * class.c (unmangle_classname): Implemented stricter testing
13237 before setting the QUALIFIED_P flag on an identifier.
13238
13239 1999-03-16 Per Bothner <bothner@cygnus.com>
13240
13241 * parse.y (java_complete_lhs): Call force_evaluation_order
13242 after patch_newarray.
13243 (patch_binop): Don't call fold if there are side effects.
13244
13245 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13246
13247 * parse.y (java_stabilize_reference): Use save_expr instead of
13248 building a SAVE_EXPR node.
13249 (java_complete_lhs): Patch the resulting string of the `+='
13250 operator (if necessary) and complete the RHS after having built
13251 the cast.
13252
13253 1999-03-15 Per Bothner <bothner@cygnus.com>
13254
13255 * class.c (make_class): Don't set CLASS_P here (because
13256 this function is also called by build_java_array_type).
13257 (push_class): Set CLASS_P here instead.
13258 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
13259
13260 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
13261 context. If the context is class, perfer "super" over "synchronized".
13262 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
13263
13264 * parse.y (create_class): Don't call parser_check_super here;
13265 it is not robust. Always wait until later.
13266
13267 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
13268 match what JDK 1.2 does), but don't set ACC_PUBLIC.
13269
13270 1999-03-13 Per Bothner <bothner@cygnus.com>
13271
13272 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
13273 * lex.h (UNGETC): Change misleading macro.
13274
13275 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13276
13277 * parse.y (java_stabilize_reference): Return NODE when patching a
13278 COMPOUND_EXPR.
13279 (java_complete_lhs): Put parenthesis around truth values.
13280
13281 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13282
13283 * class.c (layout_class_method): Don't make rtl for interface
13284 methods.
13285 * parse.h (GET_TYPE_NAME): New macro.
13286 * parse.y (if_then_statement:): Fixed indentation.
13287 (if_then_else_statement:): Likewise.
13288 (for_statement:): Fixed spacing.
13289 (try_statement:): Fixed indentation.
13290 (create_interface): Don't force interfaces to be abstract.
13291 (method_header): Abstract methods are OK in interfaces.
13292 (declare_local_variables): Fixed typo in comment.
13293 (java_complete_expand_method): Fixed indentation.
13294 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
13295 non accessible fields.
13296 (java_stabilize_reference): New function.
13297 (java_complete_lhs): Fixed indentation. Use
13298 java_stabilize_reference in compound assignment. Insert the
13299 cast. If not processing `+' fix string constants before processing
13300 binop.
13301
13302 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13303
13304 * constants.c (find_class_or_string_constant): Cast variable `j'
13305 to a `jword' when comparing against one.
13306
13307 * expr.c (java_lang_expand_expr): Remove unused variables
13308 `has_finally_p' and `op0'.
13309
13310 * gjavah.c (print_field_info): Cast a value to jint when comparing
13311 against one. Likewise for a jlong.
13312 (add_namelet): Likewise cast a `sizeof' to an int when comparing
13313 against a signed quantity.
13314
13315 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
13316 (print_signature): Don't needlessly dereference variable `str'
13317
13318 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
13319 `max_locals' with ATTRIBUTE_UNUSED.
13320 (jcf_parse_class): Likewise for variable `index'.
13321
13322 * parse.h (reverse_jdep_list): Remove static prototype.
13323
13324 * parse.y (build_jump_to_finally): Remove prototype and definition.
13325 (reverse_jdep_list): Add static prototype.
13326
13327 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
13328 `assignment' and `expr_decl'.
13329
13330 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
13331
13332 1999-03-12 Andrew Haley <aph@cygnus.com>
13333
13334 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
13335 we'll need a directory separator and a null character.
13336
13337 1999-03-10 Per Bothner <bothner@cygnus.com>
13338
13339 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
13340
13341 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
13342
13343 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
13344 interfaces.
13345
13346 1999-03-05 Per Bothner <bothner@cygnus.com>
13347
13348 * lex.c (java_parse_end_comment): Take extra parameter (next char).
13349
13350 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
13351
13352 * class.c (layout_class_method): A static method in a base class
13353 is never overridden, so treat it like it doesn't exist.
13354 However, do complain about private non-static method overriding
13355 public static method.
13356
13357 * parse.y: Don't set unused INITIALIZED_P flag.
13358 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
13359
13360 * parse.y (find_expr_with_wfl): Optimize tail-calls.
13361 (build_array_from_name): Re-order &index[string] to &string[index].
13362
13363 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
13364 error_mark (it might catch more errors, but it is more likely to lose).
13365
13366 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13367
13368 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
13369 (parse-scan.o): Depend on toplev.h.
13370
13371 * class.c (make_method_value): Add prototype. Make it static.
13372 Remove unused second argument, caller changed.
13373
13374 * expr.c (java_lang_expand_expr): Remove unused variable
13375 `return_label'.
13376
13377 * java-tree.h: Don't prototype find_in_current_zip.
13378 Add prototypes for verify_constant_pool, start_java_method,
13379 end_java_method, give_name_to_locals, expand_byte_code,
13380 open_in_zip, set_constant_value, find_constant1, find_constant2,
13381 find_utf8_constant, find_string_constant, find_class_constant,
13382 find_fieldref_index, find_methodref_index, write_constant_pool,
13383 count_constant_pool_bytes and encode_newarray_type.
13384
13385 * jcf-dump.c: Remove unused variable `LONG_temp'.
13386
13387 * jcf-parse.c: Include parse.h.
13388 (jcf_parse_source): Remove unused parameter, all callers changed.
13389 (jcf_figure_file_type): Add static prototype.
13390 (find_in_current_zip): Likewise. Also remove unused parameter,
13391 all callers changed.
13392 (read_class): Initialize variable `saved_pos'.
13393
13394 * jcf-reader.c (jcf_parse_preamble): Mark variables
13395 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
13396
13397 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
13398 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
13399 (java_parse_doc_section): Initialize variable `seen_star'.
13400 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
13401 (java_lex_error): Mark parameters `msg' and `forward' with
13402 ATTRIBUTE_UNUSED.
13403 (java_get_line_col): Mark parameters `filename' and `line' with
13404 ATTRIBUTE_UNUSED.
13405
13406 * parse-scan.y: Include toplev.h.
13407 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
13408
13409 * parse.h: use `struct JCF', not plain `JCF'.
13410 (java_parser_context_save_global, java_expand_classes
13411 java_parser_context_restore_global, java_parse): Add prototypes.
13412
13413 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
13414 `node'.
13415
13416 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
13417
13418 * check-init.c (check_init): COPYN takes word count, not bit count.
13419
13420 1999-02-26 Per Bothner <bothner@cygnus.com>
13421
13422 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
13423 explicit build_decl. (Avoids crash in reload when optimizing.)
13424
13425 1999-02-25 Per Bothner <bothner@cygnus.com>
13426
13427 * decl.c (complete_start_java_method): Handle synchronized method
13428 even when compiling from bytecode.
13429
13430 1999-02-26 Tom Tromey <tromey@cygnus.com>
13431
13432 * gjavah.c (add_class_decl): Only generate `#include' if outer
13433 class is not the name of the class we are processing. Correctly
13434 append `.h' in #include.
13435 (process_file): Clean up newlines around generated `#include's.
13436 (decode_signature_piece): Correctly handle inner classes.
13437 (struct include): New structure.
13438 (all_includes): New global.
13439 (print_include): New function.
13440 (add_class_decl): Use it.
13441 (process_file): Likewise.
13442 (add_class_decl): Generate include for java-array.h if array
13443 seen.
13444 (process_file): Don't generate java-array.h include.
13445
13446 * gjavah.c (add_namelet): Check for standard package names here.
13447 (add_class_decl): Don't check for standard package names here.
13448
13449 1999-02-25 Tom Tromey <tromey@cygnus.com>
13450
13451 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
13452 When reading a zip file, only use strncmp if both strings are
13453 bigger than the buffer length. Initialize `k' when looping
13454 through zip file.
13455
13456 1999-02-24 Tom Tromey <tromey@cygnus.com>
13457
13458 * gjavah.c (struct namelet): New structure.
13459 (add_namelet): New function.
13460 (print_namelet): New function.
13461 (print_class_decls): Use add_namelet and print_namelet to generate
13462 namespaces and not classes.
13463 (method_printed): New global.
13464 (HANDLE_END_METHOD): Examine method_printed.
13465 (print_method_info): Set method_printed when required. Print
13466 error if function to be ignored is marked virtual. Handle $finit$
13467 method.
13468 (METHOD_IS_FINAL): New macro.
13469 (print_field_info): Use it.
13470 (HANDLE_METHOD): Clear method_printed.
13471 (method_pass): New global.
13472 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
13473 (process_file): Do two passes over both fields and methods.
13474 (HANDLE_METHOD): Examine method_pass.
13475 (root): New global.
13476 (add_class_decl): New function.
13477 (print_class_decls): Don't scan over entire constant pool.
13478
13479 1999-02-23 Tom Tromey <tromey@cygnus.com>
13480
13481 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
13482 disable linking in that case.
13483
13484 1999-02-20 Tom Tromey <tromey@cygnus.com>
13485
13486 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
13487 not 0x1f.
13488
13489 1999-02-21 Per Bothner <bothner@cygnus.com>
13490
13491 * decl.c (build_result_decl), java-tree.h: New method.
13492 (complete_start_java_method): Handle synchronized methods.
13493 Don't build DECL_RESULT here. (Ordering dependency problem.)
13494 (start_java_method): Call build_result_decl here instead ...
13495 * parse.y (java_complete_expand_method): ... and here.
13496 (expand_start_java_method): Don't call complete_start_java_method here.
13497 (java_complete_expand_method): Call it here instead.
13498 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
13499 * java-tree.h: ... here.
13500
13501 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
13502 * parse.y (java_complete_lhs): Don't call force_evaluation_order
13503 for ARRAY_REF - it doesn't work when array bounds are checked.
13504 (patch_array_ref): Handle it here instead.
13505
13506 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
13507
13508 1999-02-19 Per Bothner <bothner@cygnus.com>
13509
13510 Force left-to-right evaluation of binary operations etc.
13511 * expr.c (force_evaluation_order), java-tree.h: New function.
13512 * parse.y (java_complete_lhs): Pass binary operations, procedure
13513 calls, and ARRAY_REFs to force_evaluation_order.
13514 (various): Set TREE_SIDE_EFFECTS more carefully.
13515
13516 Tolerate random (non-UTF8) encoding in comments without complaining.
13517 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
13518 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
13519
13520 * parse.y (resolve_qualified_expression_name): Handle error_mark.
13521 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
13522
13523 * parse.y (java_complete_lhs): Ignore an empty statement in a
13524 COMPOUND_EXPR. Don't complain about empty statement after return.
13525
13526 1999-02-19 Per Bothner <bothner@cygnus.com>
13527
13528 * parse.y (obtain_incomplete_type): Don't wrap unknown types
13529 in TREE_LIST - just chain the POINTER_TYPEs together.
13530 (resolve_class): If type already resolved, return decl.
13531 After resolving, update TREE_TYPE(class_type), and name (if array).
13532 * parse.h (do_resolve_class), parse.y: Make non-static.
13533 * class.c (maybe_layout_super_class): Take this_class argument.
13534 Do do_resolve_class if necessary.
13535 (layout_class, layout_class_methods): Adjust calls appropriately.
13536 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
13537 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
13538 * typeck.c (build_java_array_type): Don't call layout_class.
13539
13540 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13541
13542 * parse.y (check_pkg_class_access): Allow private class access
13543 within the same package.
13544 (strip_out_static_field_access_decl): New function.
13545 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
13546 operator argument before testing its nature.
13547
13548 1999-02-03 Per Bothner <bothner@cygnus.com>
13549
13550 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
13551 (TRY_EXPR): Simplify - it no longer has a finally clause.
13552 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
13553 Simpler handling of TRY_EXPR, which no longer has a finally clause.
13554 * expr.c (java_lang_expand_expr): Likewise.
13555 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
13556 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
13557 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
13558 (build_try_statement): Remove finally parameter and handling.
13559 (build_try_finally_statement): New function.
13560 (patch_try_statement): No longer need to support finally clause.
13561 (try_statement): Update grammar action rules.
13562 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
13563 Simpler handling of TRY_EXPR, which no longer has a finally clause.
13564
13565 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
13566
13567 * jcf-parse.c (get_constant): Add braces around computation of 'd'
13568 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
13569
13570 1999-02-17 Andrew Haley <aph@cygnus.com>
13571
13572 * class.c (build_utf8_ref): Back out broken patch which was
13573 intended to to output signatures using '.' as a separator.
13574
13575 * class.c (make_class_data): Output signatures using '.' as a
13576 separator, rather than '/'.
13577 (mangled_classname): Likewise.
13578 (make_field_value): Likewise.
13579 (make_method_value): Likewise.
13580 * constants.c (alloc_class_constant): Likewise.
13581 * expr.c (build_invokeinterface): Likewise.
13582
13583 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13584
13585 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
13586 of an ancient workaround.
13587
13588 1999-02-10 Jeffrey A Law (law@cygnus.com)
13589
13590 * jvspec.c (xmalloc): Kill the prototype. It does not belong
13591 here anymore.
13592
13593 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13594
13595 * lex.c (yylex): Encode \0 as UTF8.
13596
13597 1999-02-10 Tom Tromey <tromey@cygnus.com>
13598
13599 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
13600 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
13601 (libgcj_zip): Renamed.
13602 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
13603 LIBJAVA_ZIP_FILE.
13604 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
13605
13606 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
13607 (GC_NAME): Renamed -lgc to -lgcjgc.
13608
13609 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13610
13611 * lex.c (java_lang_cloneable): Initialize.
13612 * parse.y (java_lang_cloneable): New static variable.
13613 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
13614 doing one more qualification round.
13615 (valid_ref_assignconv_cast_p): Reject null source or
13616 destination. Allow an array to be cast into java.lang.Cloneable.
13617 (patch_cast): Swapped two first arguments to first call to
13618 valid_ref_assignconv_cast_p.
13619
13620 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13621
13622 * parse.h: DECL_P renamed JDECL_P.
13623 * parse.y: DECL_P replaced by JDECL_P.
13624 (build_array_from_name): Always use pointer's type.
13625 (patch_bc_statement): Extra code to search continue target in a
13626 for loop. Fixed comments. Continue target is current loop when
13627 unlabeled.
13628
13629 1999-02-05 Andrew Haley <aph@cygnus.com>
13630
13631 * class.c (make_class_data): The superclass of an interface should
13632 be null, not class Object.
13633
13634 * lex.c (java_lex): Sign extend hex literals.
13635
13636 1999-02-04 Andrew Haley <aph@cygnus.com>
13637
13638 * class.c (build_utf8_ref): Output signatures using '.' as a
13639 separator, rather than '/'.
13640 (make_class_data): Likewise.
13641
13642 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
13643
13644 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
13645 mkstemp.o. Get them from libiberty now.
13646
13647 1999-02-02 Jeffrey A Law (law@cygnus.com)
13648
13649 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
13650
13651 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13652
13653 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
13654 from libiberty.h
13655
13656 1999-02-02 Per Bothner <bothner@cygnus.com>
13657
13658 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
13659 * jcf-write.c (generate_bytecode_return): New function.
13660 (generate_bytecode_insns): Use it, for RETURN_EXPR.
13661
13662 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
13663 generate special [fd]const_[01] instructions.
13664
13665 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
13666
13667 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
13668 handling OPCODE_lookupswitch or OPCODE_tableswitch.
13669
13670 1999-02-01 Per Bothner <bothner@cygnus.com>
13671
13672 * parse.y (patch_method_invocation): Handle calling static methods,
13673 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
13674
13675 * parse.y (java_complete_lhs): Don't complain about unreachable
13676 exit condition in a do-while statement.
13677
13678 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13679
13680 * lex.c (java_read_char): Fixed utf8 decoding.
13681 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
13682 range.
13683 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
13684 comments. Local variable `all_primitive' is gone. Broadened
13685 acceptance of `0' to floating point targets. `long' can now be
13686 widened to `double' or `float'.
13687 (valid_method_invocation_conversion_p): Added leading
13688 comment. Fixed tabulation.
13689 (build_string_concatenation): Optimize out left or right empty
13690 string constants.
13691
13692 1999-01-28 Per Bothner <bothner@cygnus.com>
13693
13694 * jcf-write.c (localvar_alloc): Only emit entry for
13695 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
13696 (generate_bytecode_insns): Only call put_linenumber if
13697 debug_info_level > DINFO_LEVEL_NONE.
13698 * jvspec.c (lang_specific_driver): If no -O* or -g* option
13699 is specified, add -g1 (for compatibility wih javac).
13700
13701 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
13702
13703 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
13704 gjavah.o, check-init.o, jv-scan.o
13705
13706 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13707
13708 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
13709
13710 * gjavah.c: Include config.h and system.h.
13711
13712 * javaop.h (inline): Don't define, its handled by system.h.
13713 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
13714 from `inline' to `static inline'.
13715
13716 * jcf.h (inline): Don't define, its handled by system.h.
13717
13718 * lex.c (inline): Likewise.
13719
13720 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
13721
13722 * lang-specs.h: Map -Qn to -fno-ident.
13723
13724 1999-01-29 Richard Henderson <rth@cygnus.com>
13725
13726 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
13727
13728 1999-01-29 Tom Tromey <tromey@cygnus.com>
13729
13730 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
13731 then cast it to Object before calling `append' method.
13732
13733 1999-01-28 Per Bothner <bothner@cygnus.com>
13734
13735 * check-init.c (check_bool2_init, check_bool_init, check_init):
13736 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
13737 * jcf-write.c (generate_bytecode_insns): Likewise.
13738
13739 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13740
13741 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
13742 * parse.y (patch_cast): Allow a boolean to be cast into a
13743 boolean.
13744
13745 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13746
13747 * parse.y: (class_declaration:): Fixed indentation.
13748 (class_member_declaration:): Extra `;' after field declaration now
13749 accepted.
13750 (interface_declaration:): Removed debug messages in error reports.
13751 (patch_binop): Nodes created and returned inherit the orignal
13752 node's COMPOUND_ASSIGN_P flag value.
13753 (patch_cast): Fix cast from char to floating point.
13754
13755 1999-01-25 Andrew Haley <aph@cygnus.com>
13756
13757 * except.c, java-except.h (expand_resume_after_catch): new
13758 function.
13759 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
13760 to branch back to main flow of control after a catch block.
13761
13762 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13763
13764 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
13765 $(srcdir)/../system.h.
13766 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
13767 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
13768 (jcf-write.o): Likewise.
13769 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13770 (mangle.o): Depend on $(srcdir)/../toplev.h.
13771 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13772 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
13773
13774 * class.c: Include output.h and parse.h.
13775 (mangled_classname): Add the `const' keyword to a char*.
13776 (find_named_method): Hide unused function definition.
13777 (build_utf8_ref): Change type of variable `c' to unsigned char.
13778 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
13779 (build_class_ref): Add the `const' keyword to a char*.
13780 (layout_class_method): Remove unused variable `buf'.
13781
13782 * decl.c (find_local_variable): Remove unused variable `rtl'.
13783 (pushdecl): Likewise for variables `different_binding_level' and
13784 `oldglobal'.
13785 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
13786 (maybe_build_cleanup): Likewise for parameter `decl'.
13787
13788 * except.c (expand_start_java_handler): Mark parameter `range'
13789 with ATTRIBUTE_UNUSED.
13790
13791 * expr.c: Include except.h.
13792 (pop_type): Remove unused variable `i'.
13793 (pop_value): Likewise for variables `n_words' and `i'.
13794 (expand_java_arrayload): Likewise for variable `convert'.
13795 (java_lang_expand_expr): Likewise for variables `op0', `type',
13796 `mode', `unsignedp', `node' and `elements'.
13797 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
13798 `eh_ranges'.
13799 (process_jvm_instruction): Add a `const' qualifier to a char*.
13800
13801 * gjavah.c (output_directory): Add the `const' keyword to a char*.
13802 (temp_directory): Likewise.
13803 (print_c_decl): Likewise.
13804 (print_method_info): Likewise.
13805 (decode_signature_piece): Likewise.
13806 (print_mangled_classname): Likewise.
13807
13808 * java-except.h: Provide prototypes for maybe_start_try,
13809 maybe_end_try and add_handler.
13810
13811 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
13812 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
13813 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
13814 init_expr_processing, push_super_field, init_class_processing,
13815 can_widen_reference_to, class_depth, verify_jvm_instructions,
13816 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
13817 set_local_type, merge_type_state, push_type, load_type_state,
13818 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
13819 emit_unicode_mangled_name): Add prototypes.
13820
13821 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
13822 (print_signature_type): Use ISDIGIT, not isdigit.
13823 (print_signature): Remove unused variable `j'.
13824
13825 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
13826 int when comparing against one.
13827
13828 * jcf-parse.c: Include toplev.h.
13829
13830 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
13831 (localvar_free): Remove unused variable `i'.
13832 (generate_bytecode_conditional): Likewise for variable `kind'.
13833
13834 * jv-scan.c: Include config.h and system.h. Remove redundant
13835 OS header and gansidecl.h includes.
13836 (warning): Add the `const' keyword to a char*. Also add
13837 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
13838 __STDC__, when determining whether to use ANSI-isms.
13839 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
13840 (xmalloc): Don't redundantly prototype here.
13841 (main): Remove unused parameter `envp'. Also fix the arguments
13842 passed to function `fatal' to match the format specifier.
13843
13844 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
13845
13846 * mangle.c: Include toplev.h.
13847 (emit_unicode_mangled_name): Declare parameter `len'.
13848
13849 * parse.y (parse_warning_context): Add the `const' keyword to a
13850 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
13851 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
13852 (issue_warning_error_from_context): Add the `const' keyword to
13853 a char*.
13854 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
13855 not `__STDC__' for whether to use ANSI-isms.
13856
13857 * typeck.c (incomplete_type_error): Mark parameters `value' and
13858 `type' with ATTRIBUTE_UNUSED.
13859 (parse_signature_type): Use ISDIGIT, not isdigit.
13860
13861 * verify.c (check_pending_block): Add the `const' keyword to a char*.
13862 (verify_jvm_instructions): Likewise. Remove unused variables
13863 `field_name' and `default_val'.
13864
13865 * zextract.c: Include config.h and system.h. Remove redundant
13866 OS header includes.
13867
13868 * zipfile.h: Prototype `read_zip_archive'.
13869
13870 1999-01-21 Andrew Haley <aph@cygnus.com>
13871
13872 * typeck.c (convert): Allow conversions to void type: some
13873 optimizations in gcc do this.
13874
13875 1999-01-21 Andrew Haley <aph@cygnus.com>
13876
13877 * typeck.c (convert_ieee_real_to_integer): New function.
13878 (convert): When not using fast-math and using hardware fp, convert
13879 an IEEE NaN to zero.
13880
13881 1999-01-18 Andrew Haley <aph@cygnus.com>
13882
13883 * parse.y (patch_binop): Do a type conversion from signed to
13884 unsigned and then back to signed when a ">>>" is found.
13885
13886 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13887
13888 * java-tree.h: (check_for_initialization): Added prototype.
13889 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
13890 * parse.y (do_resolve_class): Removed unused locals.
13891 (read_import_dir): Likewise.
13892 (resolve_qualified_expression_name): Array creation
13893 expressions are valid primary expressions.
13894 (qualify_ambiguous_name): Likewise.
13895 (patch_synchronized_statement): Removed unused local.
13896
13897 1999-01-17 Jeffrey A Law (law@cygnus.com)
13898
13899 * Makefile.in (zextract.o): Add dependencies.
13900
13901 * Makefile.in: Do not put ^Ls at the start of a line.
13902
13903 1999-01-15 Per Bothner <bothner@cygnus.com>
13904
13905 * expr.c (process_jvm_instruction): Coerce to correct Throwable
13906 sub-type the result of the call that gets the exception value.
13907
13908 * parse.y (java_complete_expand_methods): If flags_syntax_only,
13909 don't call finish_class.
13910
13911 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
13912 clear found before continuing.
13913
13914 * verify.c (verify_jvm_instructions): On an array load, allow
13915 and handle top of stack to be TYPE_NULL.
13916
13917 * gjavah.c (generate_access): Translate Java package private or
13918 protected access to C++ public, but with a comment.
13919
13920 1999-01-13 Andrew Haley <aph@cygnus.com>
13921
13922 * expr.c (generate_name): Name prefix changed to avoid clashes
13923 with assembler temp labels.
13924
13925 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
13926 MODIFY_EXPR. Without this, code for the assignment may not be
13927 generated at all and the synchronized statement will read an
13928 uninitialized variable.
13929
13930 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13931
13932 * class.c (maybe_layout_super_class): Fixed returned value.
13933 * lex.c: Added 1999 to the copyright.
13934 (java_init_lex): Initialize java_lang_imported.
13935 * lex.h: Added 1999 to the copyright.
13936 * parse.h: Added 1999 to the copyright.
13937 (REGISTER_IMPORT): Fixed typo in trailing macro.
13938 (CURRENT_OSB): New macro.
13939 (struct parser_ctxt): New fields osb_depth, osb_limit.
13940 * parse.y (java_lang_id): New global variable.
13941 (type_import_on_demand_declaration): Don't import java.lang.* twice.
13942 (array_creation_expression:): Use CURRENT_OSB.
13943 (dims:): Uses a stack to keep track of array dimensions.
13944 (cast_expression:): Use CURRENT_OSB.
13945 (find_expr_with_wfl): Return NULL if node found doesn't meet the
13946 conditions.
13947 (register_fields): Fixed typos in comment.
13948 (check_method_redefinition): Fixed comment indentation.
13949 (java_check_regular_methods): Set saved found wfl to NULL after
13950 having reinstalled it in the previously found DECL_NAME.
13951
13952 1999-01-10 Richard Henderson <rth@cygnus.com>
13953
13954 * gjavah.c (java_float_finite): Use a union to do type punning.
13955 (java_double_finite): Likewise.
13956
13957 1999-01-09 Per Bothner <bothner@cygnus.com>
13958
13959 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
13960 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
13961 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
13962 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
13963 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
13964 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
13965
13966 1999-01-08 Per Bothner <bothner@cygnus.com>
13967
13968 * check-init.c (check_init): If compiling to native, we don't
13969 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
13970
13971 1999-01-08 Tom Tromey <tromey@cygnus.com>
13972
13973 * parse-scan.y (variable_declarator_id): Set or increment
13974 bracket_count.
13975 (bracket_count): New global.
13976 (formal_parameter): Handle case where bracket pairs trail variable
13977 declarator id.
13978
13979 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
13980
13981 * jcf-parse.c (yyparse): variable len changed from a char to an
13982 int to prevent overflow.
13983
13984 1999-01-06 Per Bothner <bothner@cygnus.com>
13985
13986 * java-tree.h: Declare read_class.
13987 * jcf-parse.c (read_class): New function.
13988 (load_class): Now just call read_class.
13989
13990 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
13991 * jcf-parse.c (parse_source_file): Declare save_error_count,
13992 which is needed by java_parse_abort_on_error macro,
13993 * parse.y (java_layout_classes, java_expand_classes): Likewise.
13994
13995 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
13996 constructor, if initializing a static field.
13997 (patch_new_array_init): Set TREE_CONSTANT if it is.
13998 * expr.c (java_lang_expand_expr): For a static array constructor
13999 of primitive elements, allocate the array itself statically.
14000 Disabled until we can set the vtable field statically.
14001
14002 * check-init.c: New file. Checks for definite assignment.
14003 * Makefile.in (JAVA_OBJS): Add check-init.o.
14004 * parse.y (java_complete_expand_method): Call check_for_initialization.
14005 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
14006
14007 1999-01-06 Graham <grahams@rcp.co.uk>
14008
14009 * parse.y : include system.h instead of including
14010 standard headers directly with the exception of <dirent.h>.
14011
14012 1999-01-06 Per Bothner <bothner@cygnus.com>
14013
14014 * lex.h: Moved static function declarations to lex.c,
14015 to shut up some -Wall warnings.
14016 * lex.c: Static function declarations moved here.
14017 * jcf-dump.c: Small fixes to shut up -Wall warnings.
14018
14019 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14020
14021 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
14022
14023 1998-12-22 Per Bothner <bothner@cygnus.com>
14024
14025 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
14026 * verify.c (verify_jvm_instructions): Fix off-by-one error.
14027
14028 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
14029 (localvar_alloc): Change return type to void,
14030 (emit_unop): Remove unused variable size.
14031
14032 * jcf-write.c (struct jcf_block): Add new union.
14033 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
14034 (call_cleanups): New functions.
14035 (struct jcf_partial): New fields num_finalizers and return_value_decl.
14036 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
14037 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
14038 * lang.c (lang_init): Call using_eh_for_cleanups.
14039 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
14040 completing operands to patch_synchronized_statement.
14041 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
14042 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
14043 WITH_CLEANUP_EXPR instead of TRY_EXPR.
14044
14045 1998-12-20 John F. Carr <jfc@mit.edu>
14046
14047 * Make-lang.in: Comment out control-Ls; they upset some makes.
14048
14049 1998-12-18 Tom Tromey <tromey@cygnus.com>
14050
14051 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
14052 consistently.
14053
14054 1998-12-17 Tom Tromey <tromey@cygnus.com>
14055
14056 * parse.y (DIR_SEPARATOR): New define.
14057 (check_class_interface_creation): Use it.
14058
14059 * parse-scan.y (report_main_declaration): Recognize
14060 `java.lang.String' in argument to main.
14061
14062 1998-12-16 Per Bothner <bothner@cygnus.com>
14063
14064 * parse.y (create_interface): Remove bogus test.
14065
14066 1998-12-16 Per Bothner <bothner@cygnus.com>
14067
14068 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
14069 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
14070
14071 1998-12-16 Tom Tromey <tromey@cygnus.com>
14072
14073 * parse-scan.y (qualified_name): Use correct sprintf format.
14074
14075 1998-12-15 Tom Tromey <tromey@cygnus.com>
14076
14077 * gjavah.c (print_field_info): Changed how most negative number is
14078 printed.
14079
14080 1998-12-14 Per Bothner <bothner@cygnus.com>
14081
14082 * parse.y (fold_constant_for_init): New function.
14083 (resolve_expression_name): Don't replace static final
14084 constant-initialized fields by its value.
14085 (java_complete_lhs): New. Same as java_complete_tree, except does
14086 not replace static final constant-initialized fields by their values.
14087 (register_fields): If there is an initializer, set DECL_INITIAL and
14088 MODIFY_EXPR_FROM_INITIALIZATION_P.
14089 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
14090 Only call patch_initialized_static_field if
14091 MODIFY_EXPR_FROM_INITIALIZATION_P.
14092 (patch_initialized_static_field): If not valid constant, clear
14093 DECL_INITIAL.
14094
14095 * parse.y (lookup_field_wrapper): Fix thinko.
14096
14097 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
14098 set and restore global lineno.
14099
14100 1998-12-14 Tom Tromey <tromey@cygnus.com>
14101
14102 * gjavah.c (print_field_info): If value to print is the smallest
14103 value of its size, then print as hex to avoid later warnings from
14104 C++ compiler.
14105
14106 1998-12-14 Tom Tromey <tromey@cygnus.com>
14107
14108 * gjavah.c (decompile_method): Decompile `return null'.
14109 (process_file): Generate `#pragma interface'.
14110 (method_declared): New global.
14111 (print_method_info): Set it.
14112 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
14113 (print_method_info): Handle abstract methods.
14114
14115 1998-12-13 Per Bothner <bothner@cygnus.com>
14116
14117 * parse.y (patch_method_invocation): If class_decl is null
14118 (e.g. an array type), use original type.
14119
14120 * parse.y (check_thrown_exceptions): Temporary hack to suppress
14121 errors about uncaught exception from clone (of array, specifically).
14122
14123 1998-12-13 Tom Tromey <tromey@cygnus.com>
14124
14125 * gjavah.c (decompile_method): Handle all types of `return'
14126 opcode. Decompile `return this' and `return'.
14127 (method_access): New global.
14128 (print_method_info): Set it.
14129 (decompile_method): Don't decompile a synchronized method.
14130
14131 1998-12-13 Tom Tromey <tromey@cygnus.com>
14132
14133 * jcf-reader.c (jcf_parse_one_method): Recognize
14134 HANDLE_END_METHOD.
14135 * gjavah.c (HANDLE_END_METHOD): New macro.
14136 (HANDLE_CODE_ATTRIBUTE): New macro.
14137 (decompile_method): New function.
14138 (print_method_info): Don't print `;\n' at end of function decl.
14139 Include java-opcodes.h.
14140 (decompiled): New global.
14141
14142 1998-12-12 Per Bothner <bothner@cygnus.com>
14143
14144 * class.c (build_class_ref): Handle PRIMTYPE.class if
14145 flag_emit_class_files.
14146 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
14147 if flag_emit_class_files.
14148 * parse.y (java_complete_tree): Pre-liminary support for
14149 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
14150
14151 * parse.y (patch_synchronized_statement): Don't call monitorexit
14152 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
14153
14154 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
14155
14156 * zipfile.h (opendir_in_zip): New declaration.
14157 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
14158 (opendir_in_zip): New function, using code from open_in_zip.
14159 (open_in_zip): Call opendir_in_zip.
14160 (find_class): Remove no-longer-used do_class_file parameter,
14161 but add source_ok parameter. Change logic so if we find a .java file,
14162 we don't look for .class in later classpath emtries.
14163 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
14164 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
14165 * gjavah.c: Update call to find_class.
14166 * jcf-dump.c: Likewise.
14167
14168 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
14169 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
14170 nothing if body is empty_stmt_node.
14171 Various little fixes so SP gets correctly adjusted.
14172 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
14173 For CALL_EXPR, test if static first.
14174 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
14175 such as the ones we create for Object and Class.
14176 Set and restore current_function_decl.
14177 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
14178 (note_possible_classname): New function.
14179 (read_import_entry): Removed. Merged with read_import_dir.
14180 (read_import_dir): Don't call find_class - that only gives us
14181 the first classpath entry having the needed package.
14182 Use the struct buffer data structure from buffer.h.
14183 (read_import_dir, find_in_imports_on_demand): The remembered
14184 class names now use '.' (not '/') as package separator.
14185
14186 * parse.y (java_complete_expand_methods): Call write_classfile
14187 here, and not in java_expand_classes (which only gets first class).
14188
14189 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14190
14191 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
14192 (register_fields): If a static fields has an initializer, just
14193 chain it on ctxp->static_initialized, and handle later.
14194 (java_complete_expand_methods): Force <clinit> first.
14195 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
14196 - it's already been completed.
14197 (patch_initialized_static_field): New function.
14198 (java_complete_field): Call it.
14199
14200 1998-12-12 Per Bothner <bothner@cygnus.com>
14201
14202 * expr.c (encode_newarray_type, build_new_array): New functions.
14203 * java-tree.h: Declare build_new_array.
14204 * jcf-write.c (patch_newarray): Use build_new_array.
14205
14206 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
14207 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
14208
14209 * parse.y (patch_new_array_init): Re-organize.
14210 Now is passed the actual array (pointer) type of the value.
14211 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
14212 (patch_array_constructor): Removed - merged into patch_new_array_init.
14213 (java_complete_tree): Update patch_new_array_init.
14214
14215 * jcf-write.c (find_constant_index): New function.
14216 (generate_bytecode_insns): Use find_constant_index.
14217 (generate_classfile): Use find_constant_index for ConstantValue.
14218
14219 1998-12-11 Tom Tromey <tromey@cygnus.com>
14220
14221 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
14222 * decl.c (init_decl_processing): Renamed dtable -> vtable.
14223 * class.c (make_class_data): Renamed dtable -> vtable, and
14224 dtable_method_count -> vtable_method_count.
14225
14226 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14227
14228 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
14229 global variables, initialized.
14230 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
14231 Declared new global variables.
14232 * lex.c (java_lex): Return long_zero_node, float_zero_node,
14233 double_zero_node, integer_zero_node upon direct matching.
14234 * parse.y (purify_type_name): Added function prototype.
14235 (duplicate_declaration_error_p): Consider new_type as potentially
14236 being a incomplete type. Use purify_type_name on type string.
14237 (method_header): saved_type: unused variable removed. Don't figure
14238 return type if method name is invalid.
14239 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
14240 processed by patch_unaryop.
14241 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
14242 increment/decrement node into its original type after binary
14243 numeric promotion on its operands.
14244
14245 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14246
14247 * parse.y (array_initializer:): Array init operand is NULL_TREE
14248 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
14249 now an error. Fixed indentation problems.
14250 (patch_string): Handle error_mark_node as an argument.
14251 (patch_new_array_init): Fixed indentation problems.
14252 (array_constructor_check_entry): Removed check on null wfl_value.
14253 Return an error if wfl_value's walk returns an error.
14254
14255 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14256
14257 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
14258 * lex.c (java_lex): Remember column position before advancing one
14259 token. Retain location information on OCB_TK.
14260 * lex.h (typedef struct java_lc): Added new field.
14261 * parse.h (GET_SKIP_TYPE): New macro.
14262 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
14263 * parse.y (build_new_array_init, patch_new_array_init,
14264 patch_array_constructor, maybe_build_array_element_wfl,
14265 array_constructor_check_entry): New function prototypes.
14266 (switch_block:): Tagged <node>.
14267 (OCB_TK): Tagged <operator>.
14268 (array_initializer:): Installed actions.
14269 (variable_initializer): Build location information on element if
14270 necessary.
14271 (switch_statement:): Fixed indentation typo.
14272 (switch_block:): Redefined default action.
14273 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
14274 (patch_assignment): Removed duplicate code.
14275 (maybe_build_array_element_wfl, build_new_array_init,
14276 patch_new_array_init, patch_array_constructor,
14277 array_constructor_check_entry): New functions.
14278
14279 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14280
14281 * parse.y (array_initializer): Tagged <node>.
14282 (variable_initializer:): Use default rule.
14283 (array_initializer:): Defined actions.
14284 (variable_initializers:): Likewise.
14285 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
14286 non-static field accesses.
14287 (patch_invoke): Fixed indentation typo.
14288 (java_complete_tree): Likewise.
14289 (build_labeled_block): Changed leading comment. Generate an error
14290 in case of duplicate loop labels.
14291 (patch_conditional_expr): Patch results of string concatenation
14292 operations.
14293
14294 1998-12-06 Per Bothner <bothner@cygnus.com>
14295
14296 * constants.c (find_methodref_index): When the class is an interface,
14297 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
14298
14299 * decl.c (finit_identifier_node): Use "$finit$", rather than
14300 "<finit>" (which Sun's verifier rejects).
14301 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
14302 (generate_field_initialization_code): Removed.
14303 (fix_constructors) Don't add call to $finit$ here (wrong order).
14304 (patch_method_invocation): Add $finit$ call here.
14305
14306 * java-tree.h (CALL_USING_SUPER): New macro.
14307 * parse.y (patch_invoke): Remove im local variable.
14308 (patch_method_invocation, patch_invoke): Don't pass super parameter.
14309 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
14310 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
14311
14312 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
14313
14314 * parse.y (java_complete_tree): Don't complain about unreachable
14315 statement if it is empty_stmt_node.
14316
14317 * jcf-write.c (find_constant_wide): New function.
14318 (push_long_const): Use find_constant_wide.
14319
14320 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
14321 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
14322 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
14323 Emit invokeinterface when calling an interface method.
14324 Emit invokespecial also when calling super or private methods.
14325
14326 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
14327
14328 1998-12-06 Per Bothner <bothner@cygnus.com>
14329
14330 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
14331
14332 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14333
14334 * java-tree.h (java_layout_seen_class_methods): New function
14335 prototype.
14336 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
14337 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
14338 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
14339 * parse.y (method_declarator:): Defined action.
14340 (issue_warning_error_from_context): input_filename saved, set to
14341 the appropriate value and restored after java_error is called.
14342 (build_unresolved_array_type): Fixed comment.
14343 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
14344 (method_header): Deal with return type the same way type are
14345 handled for fields and method's parameters and local variables
14346 types are handled.
14347 (check_method_redefinition): Removed extra CR.
14348 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
14349 (java_layout_seen_class_methods): New function.
14350 (java_layout_classes): Call java_layout_seen_class_methods.
14351
14352 1998-12-03 Per Bothner <bothner@cygnus.com>
14353
14354 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
14355
14356 1998-12-03 Per Bothner <bothner@cygnus.com>
14357
14358 * jcf-dump.c (main): Fix error message.
14359 * jcf-path.c (add_entry): Style fix.
14360
14361 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14362
14363 * class.c (layout_class_method): Call build_java_argument_signature
14364 on constructors too.
14365 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
14366 (patch_method_invocation): Define a primary when resolving an
14367 expression name. Augmented comment on code checking illegal `this'
14368 usage. Loosened it test by accepting NEW_CLASS_EXPR.
14369
14370 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14371
14372 * class.c (layout_class_method): Don't report error on non-static
14373 overriding static if the method is private.
14374 * java-tree.h (finish_class): Prototype added.
14375 * lex.c (java_get_line_col): Handle col argument -2 value.
14376 * parse.h: All static method declarations moved to parse.y.
14377 * parse.y: Now contains all static method declarations previously
14378 found in parse.h.
14379 (find_expr_with_wfl, missing_return_error,
14380 unreachable_stmt_error): New functions.
14381 (java_get_real_method_name): Identify constructors bearing class
14382 names in source code compiled classes only.
14383 (java_complete_expand_methods): Call missing_return_error.
14384 (invocation_mode): Private methods invoked as static methods.
14385 (java_complete_tree): Call unreachable_stmt_error.
14386
14387 1998-12-01 Tom Tromey <tromey@cygnus.com>
14388
14389 * Makefile.in (+target): Removed.
14390 (+xmake_file): Likewise.
14391 (+tmake_file): Likewise.
14392 (.NOEXPORT): Removed duplicate.
14393
14394 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14395
14396 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
14397
14398 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
14399
14400 * jvgenmain.c: Remove the xmalloc prototype, we get it from
14401 libiberty.h. Provide an xmalloc definition.
14402
14403 * jvspec.c: Remove the xmalloc prototype.
14404
14405 * parse-scan.y: Include config.h and system.h. Don't include
14406 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
14407 Provide an xstrdup definition.
14408
14409 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
14410
14411 * jcf-path.c (add_entry): Recognize ".jar" too.
14412 * lang-specs.h: Likewise.
14413
14414 1998-11-26 Per Bothner <bothner@cygnus.com>
14415
14416 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
14417 soft_monitorenter_node, soft_monitorexit_node, throw_node.
14418
14419 * jcf-write.c (generate_bytecode_insns):
14420 Handle pre/post-increment/decrement of long.
14421
14422 * jcf-write.c (generate_bytecode_insns):
14423 Handle missing exception handler (finally for synchronized).
14424
14425 1998-11-25 Per Bothner <bothner@cygnus.com>
14426
14427 * java-tree.h (end_params_node): Declare global.
14428 * decl.c (end_params_node): New global.
14429 (init_decl_processing, start_java_method): Use end_params_node for
14430 end of list of parameter types. Follows correct gcc conventions.
14431 * expr.c (pop_argument_types, pop_arguments): Likewise.
14432 * lang.c (put_decl_node): Likewise.
14433 * typeck.c (various places): Likewise.
14434 * class.y (various places): Likewise.
14435 * parse.y (various places): Likewise.
14436
14437 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
14438 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
14439
14440 * class.c: Add #include flags.h, remove no-longer needed declaration.
14441
14442 * class.c (layout_class_method): Remove commented-out code, re-format.
14443 Don't add vtable entry (or index) for private methods.
14444 * expr.c (expand_invoke): A private method is implicitly final.
14445 * class.c (make_class_data): If inlining or optimizing,
14446 skip private methods.
14447
14448 * class.c (finish_class): New function. Calls existing methods,
14449 but alls emits deferred inline functions.
14450 * jcf-parse.c (parse_class_file): Call finish_class.
14451 * parse.y (java_complete_expand_methods): Likewise.
14452
14453 * expr.c (build_java_binop): Explicit default, to silence -Wall.
14454
14455 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
14456
14457 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
14458
14459 * jcf-write.c (generate_bytecode_conditional): Fix typo.
14460
14461 1998-11-24 Per Bothner <bothner@cygnus.com>
14462
14463 * (generate_classfile): Always write class access flag with
14464 ACC_SUPER set.
14465
14466 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14467
14468 * class.c (maybe_layout_super_class): New function.
14469 (layout_class): Reorganized. Loop on class methods dispatched into
14470 a new function. Call maybe_layout_super_class.
14471 (layout_class_methods, layout_class_method): New functions.
14472 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
14473 class.
14474 (expand_invoke): Likewise.
14475 * java-tree.h (all_class_list): New global variable declared.
14476 (layout_class_methods, layout_class_method): New function
14477 prototypes.
14478 (LAYOUT_SEEN_CLASS_METHODS): New macro.
14479 * jcf-parse.c (all_class_list): New global variable.
14480 (load_class): Extended what class_or_name can be. Use parser
14481 context mechanism to save globals before calling jcf_parse.
14482 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
14483 is set on the file name.
14484 (jcf_parse): Layout class methods when Object is loaded, otherwise
14485 record class in all_class_list for delayed method layout.
14486 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
14487 * lang.c (put_decl_node): Decode <init> into the decl context
14488 class name.
14489 * lex.c (java_allocate_new_line): Use xmalloc.
14490 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
14491 pointers, not TREE_LIST elements.
14492 (struct parser_ctxt): Fixed comment indentations, added comments
14493 and reordered some fields.
14494 (java_check_methods): Function prototype removed.
14495 * parse.y (java_push_parser_context): Use xmalloc.
14496 (java_parser_context_restore_global): Pop extra pushed ctxp only
14497 when there's nothing next.
14498 (maybe_create_class_interface_decl): Fixed comment, add new
14499 created class decl to all_class_list.
14500 (method_header): Use GET_REAL_TYPE on argument's types.
14501 (method_declarator): Use GET_REAL_TYPE, change type to the real
14502 type in TREE_LIST dependency node. Build argument list with the
14503 real type.
14504 (create_jdep_list): Use xmalloc. Removed allocation error message.
14505 (obtain_incomplete_type): Fixed leading comment. Broadened
14506 incoming argument meaning.
14507 (register_incomplete_type): Use xmalloc. Removed allocation error
14508 message.
14509 (safe_layout_class): Fixed leading comment.
14510 (jdep_resolve_class): Reversed if statement condition and switch
14511 if and else bodies.
14512 (resolve_and_layout): Fixed leading comment. Broadened incoming
14513 argument meaning.
14514 (complete_class_report_errors): New local variable name, for
14515 clarity. purify_type_name used for all error cases.
14516 (java_get_real_method_name): Stricter check on constructors.
14517 (java_check_regular_methods): Reverse methods list only if not
14518 already laid out. Layout artificial constructor.
14519 (java_check_methods): Deleted.
14520 (source_start_java_method): Obtain incomplete type for patchable
14521 method arguments.
14522 (java_layout_classes): Fixed leading comment. Use
14523 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
14524 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
14525 before returning. Fixed comments.
14526 (java_expand_classes): Check for errors up front.
14527 (patch_method_invocation): Class to search is resolved and laid
14528 out.
14529
14530 1998-11-24 Per Bothner <bothner@cygnus.com>
14531
14532 * expr.c (java_lang_expand_expr): Add missing emit_queue.
14533
14534 * javaop.h (int8): Removed - not used.
14535 (jbyte): Redefine portably with correct signedness.
14536
14537 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
14538
14539 * jcf-write.c (generate_bytecode_insns): Fix typo
14540 OPCODE_getstatic to OPCODE_getfield.
14541
14542 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
14543 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
14544 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
14545
14546 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14547
14548 * jcf-parse.c (jcf_parse_source): Function returned type is
14549 void. Added prototype.
14550 (jcf_parse): Function returned type is void.
14551 (yyparse): Remove call to fclose on the last parsed file.
14552
14553 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
14554
14555 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14556
14557 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
14558 (layout_class): Cope with methods featuring WFL in decl names.
14559 * decl.c (unqualified_object_id_node): New global variable,
14560 initialized.
14561 (build_decl_no_layout): Removed.
14562 * expr.c (build_primtype_type_ref): Handle Double.
14563 (java_lang_expand_expr): Fixed indentations.
14564 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
14565 (flag_wall, flag_redundant, flag_not_overriding,
14566 flag_static_local_jdk1_1, unqualified_object_id_node): Global
14567 variable declarations.
14568 (build_decl_no_layout): Removed prototype.
14569 (java_get_real_method_name): Added prototype.
14570 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
14571 (java_parse_abort_on_error): Macro now just returns.
14572 * jcf-parse.c (jcf_parse_source): Check fclose returned
14573 value. Call emit_register_classes if java_report_errors returns
14574 zero.
14575 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
14576 flag_static_local_jdk1_1): New integer flags.
14577 (lang_decode_option): New flags set here.
14578 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
14579 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
14580 the flag_redundant variable.
14581 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
14582 when parsing java.lang.Object class.
14583 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
14584 NULL_TREE to build.
14585 (resolve_qualified_expression_name): Fixed indentation.
14586 (patch_array_ref): Changed prototype.
14587 (not_initialized_as_it_should_p): Prototype removed.
14588 (java_report_errors): Added function prototype.
14589 * parse.y (formal_parameter:): Changed error message for not yet
14590 supported final parameters.
14591 (class_type_list:): Set both PURPOSE and VALUE of created
14592 TREE_LIST to be class_type.
14593 (primary_no_new_array:): Handle class literals on primitive types.
14594 (parse_warning_context): Reinstalled correct force_error and
14595 do_warning flags setups.
14596 (java_report_errors): Changed prototype. Return java_error_count
14597 value.
14598 (variable_redefinition_error): Consider treating variable type as
14599 a fake pointer.
14600 (create_interface): Warn about redundant abstract modifier if
14601 flag_redundant is set. Changed error message.
14602 (lookup_field_wrapper): Save/restore globals before/after looking
14603 up field.
14604 (duplicate_declaration_error_p): Consider treating declaration
14605 type as a fake pointer.
14606 (register_fields): Extract real type from dependency node. Check
14607 for duplicate field declaration after type adjustment. Use
14608 DECL_INITIAL to store static final initialized values.
14609 (method_header): Extract real function type from dependency node.
14610 (check_abstract_method_header): Use GET_METHOD_NAME.
14611 (obtain_incomplete_type): Layout fake pointer type.
14612 (safe_layout_class): Don't try to check for methods before layout.
14613 (java_complete_class): Don't check for correct throws clause
14614 elements inheritance here.
14615 (resolve_and_layout): Broadened name parameter meaning.
14616 (reset_method_name): Use GET_METHOD_NAME.
14617 (java_get_real_method_name): New function.
14618 (java_check_regular_methods): Don't check methods in
14619 java.lang.Object. Verify lineage of throws clause elements. Use
14620 flag_no_overriding in warning report.
14621 (check_throws_clauses): Don't check if class was from
14622 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
14623 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
14624 (declare_local_variables): Use flag_static_local_jdk1_1 to report
14625 warning on unsupported final local variables. Use build_decl
14626 instead of build_decl_no_layout. Get real local variable type from
14627 dependency node.
14628 (source_start_java_method): Get real parameter type from
14629 dependency node. Call build_decl instead of build_decl_no_layout.
14630 (java_layout_classes): Reverse tree and layout type and class as
14631 required. Mark class as loaded when done.
14632 (resolve_field_access): Fixed indentation. Restricted condition
14633 leading to static field access code generation. Set field_type
14634 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
14635 (resolve_qualified_expression_name): Initialize type_found to
14636 null. Handle static field resolved during qualification. Fixed
14637 layout on non primitive field decl types.
14638 (not_accessible_p): Fixed typo in comment.
14639 (patch_method_invocation): Resolve and layout class to search from
14640 type.
14641 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
14642 layout non primitive type, if necessary. Make method node only to
14643 report errors.
14644 (find_applicable_accessible_methods_list): Consider WFL'ed method
14645 decl names. Fixed indentation.
14646 (argument_types_convertible): Resolve and layout target type if
14647 necessary.
14648 (java_complete_tree): Fixed indentation problems. Rewrote
14649 CALL_EXPR thrown exceptions check. Re-installed further processing
14650 of the assignment in certain cases.
14651 (patch_assignment): Call maybe_build_primttype_type_ref to perform
14652 inlining on class literals.
14653 (valid_builtin_assignconv_identity_widening_p): Cope with constant
14654 0 literal.
14655 (valid_method_invocation_conversion_p): Likewise.
14656 (patch_string): Temporary disable forbidden use of `this' in
14657 explicit constructor invocations when doing string concatenation
14658 within their scope.
14659 (patch_unaryop): Added comment. Reinstalled code to disable
14660 further check on assignment operation with cast expression RHS.
14661 (patch_switch_statement): Fixed indentation.
14662 (build_try_statement): Call build_decl instead of
14663 build_decl_no_layout.
14664 (patch_synchronized_statement): Likewise.
14665 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
14666 IS_UNCHECKED_EXPRESSION_P.
14667 (check_thrown_exceptions_do): Changed leading comment. Resolve and
14668 layout argument exception type.
14669 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
14670 of IS_UNCHECKED_EXPRESSION_P.
14671
14672 1998-11-18 Anthony Green <green@cygnus.com>
14673
14674 * jcf-parse.c (yyparse): Open class file in binary mode.
14675
14676 1998-11-15 Per Bothner <bothner@cygnus.com>
14677
14678 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
14679
14680 * jcf-write.c (perform_relocations): Move check out one loop.
14681
14682 1998-11-15 Anthony Green <green@hoser.cygnus.com>
14683
14684 * Make-lang.in: Fix reference to srcdir.
14685 * jv-scan.c: Add missing xmalloc prototype.
14686 * jvgenmain.c: Ditto.
14687
14688 1998-11-15 Per Bothner <bothner@cygnus.com>
14689
14690 * decl.c (error_mark_node), java-tree.h: New global.
14691 * parse.y: Use empty_stmt_node instead of size_zero_node.
14692 (build_if_else_statement): If missing else, use empty_stmt_node.
14693
14694 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
14695 (java_complete_expand_method): Complain if return is missing.
14696 (java_check_regular_methods): Comment out incorrect error check.
14697 (not_accessible_p): Fix incorrect handling of protected methods.
14698 (patch_method_invocation): Pass correct context to not_accessible_p.
14699 (find_applicable_accessible_methods_list): Likewise.
14700 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
14701 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
14702 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
14703 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
14704
14705 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
14706 (push_int_const): Remove reundant NOTE_PUSH.
14707 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
14708 (- case SWITCH_EXPR): Fix code generation bug.
14709 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
14710 (generate_classfile): More robust for abstract methods.
14711
14712 1998-11-15 Anthony Green <green@cygnus.com>
14713
14714 * Makefile.in: jv-scan and jvgenmain all require libiberty.
14715 * Make-lang.in: Ditto.
14716
14717 * jv-scan.c: Remove xmalloc and xstrdup definitions.
14718 * jvgenmain: Ditto.
14719
14720 1998-11-15 Per Bothner <bothner@cygnus.com>
14721
14722 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
14723
14724 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
14725
14726 1998-11-14 Per Bothner <bothner@cygnus.com>
14727
14728 Allow uses of interface types to verify. This is not really
14729 type-safe, but it matches what Sun does, and is OK as long as
14730 there are appropriate run-time checks.
14731 * verify.c (merge_types): If merging two interface types,
14732 just set the result to java.lang.Object.
14733 * expr.c (pop_type): Any interface is matches by java.lang.Object.
14734
14735 1998-11-13 Tom Tromey <tromey@cygnus.com>
14736
14737 * gjavah.c (main): Handle --output-class-directory argument.
14738 * jvspec.c (lang_specific_driver): Translate `-d' into
14739 -foutput-class-dir.
14740 * jcf.h (jcf_write_base_directory): Declare.
14741 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
14742 * lang-options.h: Mention -foutput-class-dir.
14743 * jcf-write.c (jcf_write_base_directory): New global.
14744 (make_class_file_name): Put generated .class file into `-d'
14745 directory, or into source directory if -d not given. Function now
14746 static.
14747 (write_classfile): Free class file name. Handle case where class
14748 file name is NULL.
14749 (DIR_SEPARATOR): New macro.
14750 Include <sys/stat.h>
14751
14752 * Makefile.in (prefix): New macro.
14753
14754 1998-11-12 Per Bothner <bothner@cygnus.com>
14755
14756 * parse.y (patch_invoke): Do less if flag_emit_class_files.
14757 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
14758 here (done in patch_invoke instead).
14759 (case_identity): Moved here from parse.y.
14760
14761 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
14762 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
14763 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
14764 so they can be efficiently scanned without recursion.
14765 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
14766 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
14767 in BLOCK iteratively, rather than recursively.
14768
14769 * parse.y (do_unary_numeric_promotion): New function.
14770 (patch_unaryop, patch_binop, patch_array_ref): Use it.
14771
14772 * parse.y (patch_newarray): Various fixes.
14773
14774 Re-do handling of switch statements (for proper block scoping).
14775 * parse.y: Add just a single block for the enture switch block,
14776 but don't create any "case blocks".
14777 (group_of_labels): Rmeoved unneeded non-terminal.
14778 CASE_EXPR and DEFAULT_EXPR are added to current block.
14779 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
14780 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
14781 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
14782 * parse.y (wfl_operator, print_int_node): Make non-static.
14783 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
14784 as part of recursive scan of block.
14785 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
14786 (patch_switch_statement): Most tests move dinto java_complete_tree.
14787
14788 * parse.y: Make various production be non-typed (void).
14789 * parse.y (parse_error): Merged into issue_warning_error_from_context.
14790 * parse.y (add_stmt_to_compound): Don't create/change extra node.
14791 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
14792
14793 * jcf-write.c (struct jcf_handler): New type.
14794 (struct jcf_switch_state): New type.
14795 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
14796 (alloc_handler, emit_unop, emit_reloc): New functions.
14797 (adjust_typed_op): Add extra parameter ("max type" offset).
14798 (emit_switch_reloc, emit_case-reloc): New function.
14799 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
14800 (generate_bytecode_insns): Support REAL_CST, switch statements,
14801 exception handling, method calls, object/array creation, and more.
14802
14803 * class.c: Remove some unused variables.
14804 * constants.c (find_string_constant): New function.
14805 (count_constant_pool_bytes): Fix to correctly handle wide constants.
14806 * decl.c (complete_start_java_method): Don't _Jv_InitClass
14807 if flag_emit_class_files.
14808
14809 1998-11-12 Tom Tromey <tromey@cygnus.com>
14810
14811 * jcf-io.c (find_class): Added explanatory comment.
14812
14813 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
14814 trailing slash to `.zip' entries.
14815
14816 * jvspec.c (lang_specific_driver): Correctly handle case where
14817 GC_NAME not defined.
14818
14819 1998-11-11 Tom Tromey <tromey@cygnus.com>
14820
14821 * jvspec.c (GC_NAME): New define.
14822 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
14823 if required.
14824 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
14825
14826 1998-11-11 Per Bothner <bothner@cygnus.com>
14827
14828 * jcf-dump.c (TABLE_SWITCH): Fix typos.
14829
14830 1998-11-11 Tom Tromey <tromey@cygnus.com>
14831
14832 * jcf-dump.c (main): Correctly recognize `--'-style long options.
14833
14834 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14835
14836 * class.c (is_compiled_class): Call safe_layout_class for class
14837 compiled from source.
14838 * conver.h (convert_to_integer, convert_to_real,
14839 convert_to_pointer): Added prototypes.
14840 * decl.c (init_decl_processing): Non longer push the decls of
14841 `methodtable', `constants', `Class', `Field', `dispatchTable'
14842 `jexception' and `Method'.
14843 * expr.c (build_invokeinterface): New function.
14844 (expand_invoke): static variable CLASS_IDENT now in
14845 build_invokeinterface. Use build_invokeinterface.
14846 (expand_java_field_op): Moved code to inline
14847 java.lang.PRIMTYPE.TYPE into a function.
14848 (build_primtype_type_ref): New function.
14849 * java-tree.def (INSTANCEOF_EXPR): New tree code.
14850 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
14851 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
14852 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
14853 (DECL_LOCAL_STATIC_VALUE): New macro.
14854 (build_invokeinterface, build_primtype_type_ref): New function
14855 prototypes.
14856 (java_parse_abort_on_error): Macro rewritten.
14857 * jcf-parse.c (current_method): Add comment to declaration.
14858 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
14859 Function prototypes fixed.
14860 (jcf_parse_source): push/pop parser context. save/restore global.
14861 (parse_source_file): Fixed leading comment. Now take a
14862 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
14863 classes and pop the parser context anymore.
14864 (yyparse): Push parser context, save globals, parse the source
14865 file, restore globals and pop the parser context when processing a
14866 source file.
14867 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
14868 * lex.c (java_parse_doc_section): New function.
14869 (java_lex): Call java_parse_doc_section when appropriate. Build an
14870 operator around INSTANCEOF_TK.
14871 * lex.h (java_lineterminator, java_sprint_unicode,
14872 java_unicode_2_utf8, java_lex_error, java_store_unicode):
14873 Prototypes rewritten.
14874 (java_parse_escape_sequence, java_letter_or_digit_p,
14875 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
14876 java_read_unicode, java_store_unicode, java_read_char,
14877 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
14878 Added function prototypes.
14879 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
14880 define.
14881 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
14882 New macros
14883 (struct parser_ctxt): New fields: deprecated,
14884 current_parsed_class_un, gclass_list.
14885 (fix_method_argument_names, issue_warning_error_from_context,
14886 resolve_package, lookup_package_type): New function prototypes.
14887 (resolve_expression_name): Fixed function prototype.
14888 (find_applicable_accessible_methods_list): Fixed indentation, added
14889 extra argument in prototype.
14890 (check_final_assignment, build_null_of_type, check_deprecation,
14891 check_method_redefinition, reset_method_name,
14892 java_check_regular_methods, java_check_abstract_methods,
14893 maybe_build_primttype_type_ref): New function prototype.
14894 * parse.y (conver.h): Include.
14895 (INSTANCEOF_TK): Tagged <operator>.
14896 (single_type_import_declaration): Use REGISTER_IMPORT macro.
14897 (relational_expression:): Build binop for instanceof.
14898 (java_push_parser_context): Remember ctxp->gclass_list across
14899 contexts.
14900 (java_pop_parser_context): Simply return if no context
14901 exists. Remember gclass_list across contexts.
14902 (issue_warning_error_from_context): New function.
14903 (parse_error_context): Don't setup ctxp->elc here. Call
14904 issue_warning_error_from_context instead.
14905 (parse_warning_context): Likewise.
14906 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
14907 setup. Link new class/interface to ctxp->gclass_list.
14908 (add_superinterfaces): Register interface as incomplete if not
14909 loaded.
14910 (create_class): Remember class unqualified name in
14911 ctxp->current_parsed_class_un. Check class deprecation.
14912 (register_fields): Check field deprecation. Remember static final
14913 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
14914 processing INIT.
14915 (method_header): New local variable ORIG_ARG. Use unqualified
14916 current class name for check on constructor errors. Promote return
14917 type if of record type. Argument list fix moved in
14918 fix_method_argument_names, called here. Check method deprecation.
14919 (fix_method_argument_names): New function.
14920 (method_declarator): Promote record typed arguments.
14921 (safe_layout_class): Check class methods before layout.
14922 (java_complete_class): Compute field layout when patched.
14923 (do_resolve_class): Try to load class after having it renamed
14924 after the package name.
14925 (get_printable_method_name): Use DECL_CONTEXT.
14926 (reset_method_name): New function.
14927 (check_method_redefinition): Use reset_method_name.
14928 (java_check_regular_methods): New local variable
14929 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
14930 names for error report. Check for compile-time error when method
14931 found has default (package) access.
14932 (java_check_abstract_methods): Now takes an interface DECL node as
14933 an argument. Also reinstall real name on unchecked
14934 overriding/hiding methods for error report.
14935 (java_check_methods): Fixed leading comment. Get classes to verify
14936 from ctxp->gclass_list. Use CHECK_METHODS macro and set
14937 CLASS_METHOD_CHECKED_P on class verification.
14938 (lookup_java_method2): Get real method name if necessary.
14939 (find_in_imports): Don't check package class access here.
14940 (resolve_package, lookup_package_type): New functions.
14941 (java_layout_classes): Fixed leading comment. Take classes to be
14942 laid out from ctxp->gclass_list.
14943 (java_complete_expand_methods): Don't expand native and abstract
14944 methods.
14945 (java_expand_classes): New function.
14946 (resolve_expression_name): Use additional argument ORIG. Retrieve
14947 values of static final field of primitive types.
14948 (resolve_field_access): Handles static final field of promotive
14949 type.
14950 (resolve_qualified_expression_name): Handle STRING_CST as
14951 primaries and package name resolution. Check deprecation on found
14952 decls. Set where_found and type_found on non static field resolved
14953 during qualification. Layout non primitive field decl types.
14954 (check_deprecation): New function.
14955 (maybe_access_field): Simplified.
14956 (patch_method_invocation_stmt): Local variable CLASS_TYPE
14957 removed. Reverse method's argument when primary is a type. Don't
14958 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
14959 instead. Include abstract class in the list of class searchable
14960 for constructors. Use DECL_CONTEXT of found method for access
14961 checks. Check method deprecation.
14962 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
14963 converting arguments. Handle INVOKE_INTERFACE.
14964 (lookup_method_invoke): Search constructor using existing
14965 infrastructure (don't rely on lookup_java_constructor anymore).
14966 (find_applicable_accessible_methods_list): Extra argument flag
14967 LC. Now include constructor in the search.
14968 (qualify_ambiguous_name): Conditional expression are primaries.
14969 (not_initialized_as_it_should_p): static final are always
14970 initialized.
14971 (java_complete_tree): Pass extra NULL argument to
14972 resolve_expression_name. Stricter test to carry on patching
14973 assignments. New case for INSTANCEOF_EXPR.
14974 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
14975 (check_final_assignment, maybe_build_primttype_type_ref): New
14976 functions.
14977 (patch_assignment): Detect resolved static finals and carry normal
14978 assignment error check on them. Inline PRIMTYPE.TYPE read access.
14979 (try_builtin_assignconv): Access constant 0 on all primitive
14980 types.
14981 (valid_builtin_assignconv_identity_widening_p): Accept identical
14982 types. Accept all promoted type on int type.
14983 (valid_ref_assignconv_cast_p): Accept a null pointer to be
14984 assigned to a reference.
14985 (valid_method_invocation_conversion_p): Accept to check null
14986 pointers.
14987 (build_binop): Merge declaration and initialization of local
14988 variable BINOP.
14989 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
14990 numeric types. Improved validity test for qualify operators on
14991 references.
14992 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
14993 and PREINCREMENT_EXPR. Also detect resolved static finals of a
14994 primitive type and issue the appropriate error message.
14995 (resolve_type_during_patch): Mark class loaded when resolved.
14996 (patch_cast): Allow null to be cased to reference types.
14997 (build_null_of_type): New function.
14998 (patch_array_ref): Handle array on references correctly.
14999 (patch_return): Removed unused local variable MODIFY. Force
15000 boolean to be returned as integers. Allows null to be returned by
15001 a function returning a reference.
15002 * typeck.c (convert_to_integer, convert_to_real,
15003 convert_to_pointer): Prototypes moved to convert.h
15004 (lookup_argument_method): Use method real name, if necessary.
15005
15006 1998-10-30 Tom Tromey <tromey@cygnus.com>
15007
15008 * class.c (build_class_ref): Changed name of primitive classes to
15009 start with `_Jv_'.
15010
15011 * class.c (make_class_data): Renamed fields: nmethods to
15012 method_count, method_count to dtable_method_count. Always set
15013 `state' field to 0.
15014 * decl.c (init_decl_processing): Likewise.
15015
15016 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15017
15018 * class.c (layout_class): Don't mangle <finit>, produce
15019 __finit<class> instead. Don't verify artificial methods.
15020 * decl.c (finit_identifier_node): New declared global.
15021 (init_decl_processing): finit_identifier_node initialized.
15022 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
15023 * java-tree.h (finit_identifier_node): Declared as extern.
15024 (struct lang_decl): New field called_constructor.
15025 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
15026 (CLASS_HAS_FINIT_P): New macro.
15027 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
15028 explicit constructor invocation.
15029 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
15030 CALL_SUPER_CONSTRUCTOR_P): New macros.
15031 (write_classfile): Added prototype.
15032 * jcf-parse.c (jcf_parse_source): Parse and remember for
15033 generation if the file was seen on the command line.
15034 (parse_source_file): Don't write the class file here.
15035 (yyparse): Loop on files rewritten. Set current_jcf.
15036 (parse_zip_file_entries): Parse class file only if it was found.
15037 * lang.c (init_parse): Don't open command line provided filename
15038 here.
15039 (lang_parse): Don't set main_jcf anymore.
15040 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
15041 (JCONSTRUCTOR_CHECK): New macro.
15042 (JBSC_TYPE_P): New macro.
15043 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
15044 (COMPLETE_CHECK_OP_2): New macro.
15045 (struct parse_ctxt): New field explicit_constructor_p.
15046 (check_class_interface_creation): Fixed prototype indentation.
15047 (patch_method_invocation_stmt): Prototype reflects added argument.
15048 (patch_invoke): Likewise.
15049 (complete_method_declaration, build_super_invocation,
15050 verify_constructor_circularity,
15051 build_this_super_qualified_invocation, get_printable_method_name,
15052 patch_conditional_expr, maybe_generate_finit, fix_constructors,
15053 verify_constructor_super, create_artificial_method,
15054 start_artificial_method_body, end_artificial_method_body,
15055 generate_field_initialization_code): New function prototypes.
15056 * parse.y: Fixed leading comment
15057 (constructor_header:, constructor_body:, block_end:): Rules tagged
15058 <node>.
15059 (type_declaration:): Call maybe_generate_finit.
15060 (method_declaration:): Action for method_body: placed in new
15061 function complete_method_declaration, called here.
15062 (constructor_declaration:): Defined actions. Removed leading
15063 FIXME.
15064 (constructor_header:): New rule with action.
15065 (constructor_body:): Rule rewritten using block_begin: and
15066 block_end:. Defined actions.
15067 (constructor_declarator:, explicit_constructor_invocation:):
15068 Defined actions.
15069 (block:): Use new rules block_begin: block_end:.
15070 (block_begin:, block_end:): New rules and actions.
15071 (block_statements:): Fixed error message for explicit
15072 constructors.
15073 (method_invocation:): Call build_this_super_qualified_invocation
15074 if primary is `this' or `super' was seen.
15075 (conditional_expression:): Action defined.
15076 (extra_ctxp_pushed_p): New static global flag.
15077 (java_parser_context_save_global): Create parser context if
15078 necessary. Use extra_ctxp_pushed_p to remember it.
15079 (java_parser_context_restore_global): Pop extra parser context if
15080 one exists.
15081 (build_array_from_name): Array on primitive types are marked
15082 loaded.
15083 (register_fields): Restore new name in field initializer
15084 expression if type was altered. Non static fields initialized upon
15085 declaration marked initialized.
15086 (maybe_generate_finit): New function.
15087 (maybe_generate_clinit): Use create_artificial_method,
15088 start_artificial_method_body, end_artificial_method_body. Generate
15089 debug info for enclosed initialization statements.
15090 (method_header): Fixed leading comment. Check constructor
15091 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
15092 accordingly.
15093 (complete_method_declaration, constructor_circularity_msg,
15094 verify_constructor_circularity): New functions.
15095 (get_printable_method_name): New function.
15096 (check_method_redefinition): Don't rename <finit> methods. Fix
15097 declared constructor names. Error message for
15098 constructors modified.
15099 (java_check_regular_methods): Local variable seen_constructor
15100 renamed saw_constructor. Skip verification on constructors. Create
15101 default constructor with create_artificial_method.
15102 (java_check_methods): Removed unnecessary empty line.
15103 (create_artificial_method, start_artificial_method_body,
15104 end_artificial_method_body): New functions.
15105 (java_layout_classes): Changed leading comment. Reverse fields
15106 list if necessary. Always layout java.lang.Object if being
15107 defined.
15108 (java_complete_expand_methods): Verify constructor circularity.
15109 (java_complete_expand_method): Call fix_constructor on
15110 constructors. Local variable no_ac_found removed. Restore
15111 bindings if method body expansion failed.
15112 (fix_constructors, verify_constructor_super,
15113 generate_field_initialization_code): New function.
15114 (java_expand_classes): Fixed leading comment. Write class file
15115 here.
15116 (resolve_expression_name): Check for illegal instance variable
15117 usage within the argument scope of an explicit constructor
15118 invocation.
15119 (resolve_qualified_expression_name): Pass extra from_super flag
15120 when invoking patch_method_invocation_stmt. New case for
15121 conditional expression when used as a primary. Check for error
15122 when acquiring super.
15123 (patch_method_invocation_stmt): Added extra argument super. New
15124 local variable is_static_flag. Set class_to_search according to
15125 the nature of the constructor invocation. Don't add `this'
15126 argument when expanding NEW_CLASS_EXPR. Check for illegal method
15127 invocation within the argument scope of explicit constructor
15128 invocation. Set is_static according to is_static_flag. Provide
15129 extra `super' argument to patch_invoke invocation.
15130 (patch_invoke): New argument from_super. Loop on arguments
15131 indentation fixed. Pass from_super to invocation_mode. New switch
15132 case INVOKE_SUPER. Fixed error message in switch default case.
15133 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
15134 value.
15135 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
15136 (lookup_method_invoke): Fixed prototypes in candidates list. Error
15137 message takes constructors into account.
15138 (find_applicable_accessible_methods_list): Fixed indentation.
15139 (qualify_ambiguous_name): Take explicit constructor invocation
15140 into account. Deal with a conditional expression as a primary to
15141 a method call.
15142 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
15143 case. Added extra argument to patch_method_invocation_stmt.
15144 Register calls made to explicit constructor `this'. Don't call
15145 save_expr in ARRAY_REF case when emitting class files. Check for
15146 illegal use of this when expanding explicit constructor invocation
15147 arguments.
15148 (complete_function_arguments): Set and reset parser context
15149 explicit_constructor_p field value when appropriate.
15150 (build_super_invocation, build_this_super_qualified_invocation):
15151 New functions.
15152 (patch_assignment): Fixed typo.
15153 (patch_unaryop): Check on final fields occurs only when a decl
15154 exits.
15155 (patch_return): Take constructors into account.
15156 (patch_conditional_expr): New function.
15157 * typeck.c (build_java_signature): Removed unnecessary empty line.
15158
15159 1998-10-28 Jeffrey A Law (law@cygnus.com)
15160
15161 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
15162
15163 1998-10-28 Tom Tromey <tromey@cygnus.com>
15164
15165 * decl.c (init_decl_processing): Renamed fields.
15166 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
15167 interface_len, msize fields.
15168
15169 * class.c (make_class_data): Removed subclass_head and
15170 subclass_next fields.
15171 * decl.c (init_decl_processing): Removed subclass_head and
15172 subclass_next fields.
15173
15174 1998-10-28 Jeffrey A Law (law@cygnus.com)
15175
15176 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
15177 * mangle.c (emit_unicode_mangled_name): Similarly.
15178
15179 1998-10-26 Nick Clifton <nickc@cygnus.com>
15180
15181 * jcf-parse.c (get_constant): Place braces around code to compute
15182 'd' when REAL_ARITHMETIC is not defined.
15183
15184 1998-10-25 H.J. Lu (hjl@gnu.org)
15185
15186 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
15187 dependency.
15188
15189 1998-10-23 Tom Tromey <tromey@cygnus.com>
15190
15191 * lang-specs.h: `.zip' files are input to jc1.
15192
15193 1998-10-22 Per Bothner <bothner@cygnus.com>
15194
15195 * jvspecs.c: Add (but don't enable) support for combining multiple
15196 .class and .java input filenames to a single jc1 invocation.
15197 Add support for -C flag (copile to .class files).
15198 Translate -classpath and -CLASSPATH arguments.
15199 * lang-specs.h: Don't set %2 spec.
15200
15201 1998-10-22 Tom Tromey <tromey@cygnus.com>
15202
15203 * jcf-path.c (add_entry): Don't add trailing separator if entry is
15204 a .zip file.
15205 (add_path): Don't add trailing separator to non-empty path
15206 elements.
15207
15208 * lang.c (lang_decode_option): Check for -fclasspath and
15209 -fCLASSPATH before examining other `-f' options.
15210
15211 * java-tree.h (finalize_identifier_node): Don't declare.
15212 * class.c (make_class_data): Don't push "final" field.
15213 * decl.c (init_decl_processing): Don't push "final" field.
15214 (finalize_identifier_node): Removed.
15215 (init_decl_processing): Don't set finalize_identifier_node.
15216
15217 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
15218
15219 1998-10-11 Anthony Green <green@cygnus.com>
15220
15221 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
15222 (JV_SCAN_SOURCES): New macro.
15223 (JCF_DUMP_SOURCES): Likewise.
15224 (jcf-dump$(exeext)): New target.
15225 (jv-scan$(exeext)): New target.
15226
15227 1998-10-22 Tom Tromey <tromey@cygnus.com>
15228
15229 * Makefile.in (LEX): Removed.
15230 (LEXFLAGS): Likewise.
15231 (SET_BISON): New macro.
15232 (BISON): Removed.
15233 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
15234 spurious diffs in parse.c.
15235 ($(PARSE_SCAN_C)): Likewise.
15236 (PARSE_DIR): New macro.
15237 (PARSE_C): Use it.
15238 (PARSE_SCAN_C): Likewise.
15239 (PARSE_RELDIR): New macro.
15240
15241 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
15242
15243 * jcf-io.c (find_class): Use saw_java_source to determine when to
15244 look for `.java' file.
15245 * jcf-parse.c (saw_java_source): New global.
15246 (yyparse): Set it if `.java' file seen.
15247
15248 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
15249 (GCJH_SOURCES): Likewise.
15250 * Makefile.in (datadir): New macro.
15251 (libjava_zip): Likewise.
15252 (JAVA_OBJS): Added jcf-path.o.
15253 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15254 (../gcjh$(exeext)): Likewise.
15255 (jcf-path.o): New target.
15256 * java-tree.h (fix_classpath): Removed decl.
15257 * jcf-parse.c (fix_classpath): Removed.
15258 (load_class): Don't call fix_classpath.
15259 * parse.y (read_import_dir): Don't call fix_classpath.
15260 * lex.h: Don't mention classpath.
15261 * lex.c (java_init_lex): Don't initialize classpath.
15262 * jcf-io.c (classpath): Removed global.
15263 (find_class): Use jcf_path iteration functions. Correctly search
15264 class path for .java file.
15265 (open_in_zip): New argument `is_system'.
15266 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
15267 classpath-related options.
15268 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
15269 and -I.
15270 (lang_init): Call jcf_path_init.
15271 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
15272 * lang-specs.h: Handle -I. Minor cleanup to -M options.
15273 Correctly put braces around second string in each entry.
15274 * gjavah.c (main): Call jcf_path_init. Recognize all the new
15275 classpath-related options.
15276 (help): Updated for new options.
15277 * jcf.h: Declare functions from jcf-path.c. Don't mention
15278 `classpath' global.
15279 * jcf-path.c: New file.
15280
15281 * jcf-depend.c: Include jcf.h.
15282
15283 * jcf-write.c (localvar_alloc): Returns `void'.
15284 (localvar_free): Removed unused variable.
15285
15286 * lang.c (OBJECT_SUFFIX): Define if not already defined.
15287 (init_parse): Use OBJECT_SUFFIX, not ".o".
15288
15289 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15290
15291 * class.c (emit_register_classes): Renamed from
15292 emit_register_class.
15293 * java-tree.h (emit_register_classes): Prototype renamed from
15294 emit_register_class.
15295 * jcf-parse.c (yyparse): Call emit_register_classes once before
15296 returning.
15297 * parse.y (java_expand_classes): No longer register classes.
15298
15299 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15300
15301 * class.c (is_compiled_class): New local variable
15302 seen_in_zip. Identify classes found in currently compiled source
15303 file(s).
15304 * decl.c (complete_start_java_method): Fixed typo.
15305 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
15306 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
15307 (CLASS_P): Moved around.
15308 (java_parse_abort_on_error): Macro moved from jcf-parse.c
15309 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
15310 java-parse.h
15311 (jcf_parse_source): Changed leading comment. Removed unnecessary
15312 fclose and CLASS_FROM_SOURCE_P marking.
15313 (parse_source_file): New local variables remember_for_generation
15314 and filename. Mark parsed file name identifier node. Removed block
15315 executed when parse_only was null. Set remember_for_generation.
15316 Use it as an argument to java_pop_parser_context.
15317 (yyparse): New local variables several_files, list, next node and
15318 current_file_list. Split ampersand separated file names into
15319 current_file_list. Iterate through the list and parse accordingly.
15320 * parse.h (java_pop_parser_context): New function prototype.
15321 * parse.y (ctxp_for_generation): New static global variable.
15322 (java_pop_parser_context): New argument generate. Link popped ctxp
15323 to ctxp_for_generation list accordingly.
15324 (java_complete_expand_methods): Fixed indentation.
15325 (java_expand_classes): New function.
15326
15327 1998-10-17 Per Bothner <bothner@cygnus.com>
15328
15329 * Makefile.in: Link with libiberty.a instead of memmove.o.
15330
15331 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15332
15333 * lex.c (setjmp.h): No longer included.
15334 * lex.h (setjmp.h): Included.
15335 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
15336 (duplicate_declaration_error_p): Renamed from
15337 duplicate_declaration_error.
15338 (build_array_from_name): New function prototype.
15339 * parse.y (setjmp.h): No longer included.
15340 (variable_declarator_id): Define action.
15341 (build_array_from_name): New function.
15342 (duplicate_declaration_error_p): Renamed from
15343 duplicate_declaration_error. Fixed leading comment.
15344 (register_fields): Main `for' loop reorganized. Uses
15345 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
15346 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
15347 build_array_from_name.
15348 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
15349 types.
15350 (read_import_dir): Don't try to skip `.' and `..'.
15351 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
15352 build_array_from_name. Main `for' loop reorganized.
15353 (resolve_qualified_expression_name): When building access to a
15354 field, use the type where the field was found, not its own type.
15355 (maybe_access_field): Use field DECL_CONTEXT if the type where the
15356 field was found is null.
15357 (qualify_ambiguous_name): Sweep through all successive array
15358 dimensions.
15359
15360 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
15361
15362 * java-tree.h (pop_labeled_block, lang_printable_name,
15363 maybe_add_interface, set_super_info, get_access_flags_from_decl,
15364 interface_of_p, inherits_from_p, fix_classpath,
15365 complete_start_java_method, emit_handlers, init_outgoing_cpool,
15366 make_class_data, register_class, alloc_name_constant): New
15367 function prototypes.
15368 * lang.c (lang_decode_option): Set argc argument unused. Fixed
15369 indentation. Added cast to remove warning.
15370 (lang_printable_name): Set v argument unused.
15371 (lang_print_error): Added argument to lang_printable_name call.
15372 (java_dummy_print, print_lang_decl, print_lang_type,
15373 print_lang_identifier, lang_print_xnode): All argument marked
15374 unused.
15375 * lex.c (java_unget_unicode): Removed unnecessary argument.
15376 (java_allocate_new_line): Unused local variable is gone.
15377 (java_read_char): Added parenthesis in expressions to remove
15378 warnings. Added final return statement.
15379 (java_read_unicode): Added parenthesis in expression to remove
15380 warning.
15381 (java_parse_end_comment): Fixed java_unget_unicode invocation.
15382 (java_parse_escape_sequence): Likewise.
15383 (java_lex): Unused local variables are gone. Fixed
15384 java_unget_unicode invocation.
15385 * lex.h (set_float_handler): Prototype added when JC1_LITE not
15386 defined.
15387 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
15388 lang_printable_name invocation in macro.
15389 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
15390 Likewise.
15391 (duplicate_declaration_error): Suppressed unused argument in
15392 prototype.
15393 (identical_subpath_p): Function declaration is gone.
15394 (patch_invoke): Suppressed unused argument in prototype.
15395 (patch_cast, build_labeled_block, check_thrown_exceptions):
15396 Likewise.
15397 * parse.y (setjmp.h): Included
15398 (toplev.h): Likewise.
15399 (field_declaration:): Suppressed unused local
15400 (label_decl:): Fixed build_labeled_block invocation.
15401 (java_pop_parser_context): Put extra parenthesis around assignment
15402 in if.
15403 (yyerror): Suppressed unused local variables.
15404 (variable_redefinition_error): Fixed lang_printable_name
15405 invocation.
15406 (create_interface): Suppressed unused local variables.
15407 (create_class): Likewise.
15408 (duplicate_declaration_error): Suppressed unused argument. Fixed
15409 lang_printable_name invocation.
15410 (register_fields): Suppressed unused local variable. Fixed
15411 duplicate_declaration_error invocation.
15412 (method_header): Suppressed unused local variable.
15413 (method_declarator, parser_check_super): Likewise.
15414 (java_complete_class): Suppressed unused local variable. Fixed
15415 fatal error message.
15416 (complete_class_report_errors): Added default: in switch.
15417 (java_check_regular_methods): Fixed lang_printable_name
15418 invocations.
15419 (check_throws_clauses): Likewise.
15420 (java_check_abstract_methods): Suppressed unused local
15421 variable. Fixed lang_printable_name invocation.
15422 (read_import_entry): Added supplemental return statement.
15423 (read_import_dir): Suppressed unused local variables.
15424 (check_pkg_class_access, declare_local_variables): Likewise.
15425 (source_start_java_method): Suppressed unused extern variable
15426 declarations
15427 (expand_start_java_method): Suppressed unused extern and local
15428 variable declarations.
15429 (java_complete_expand_methods): Likewise.
15430 (java_complete_expand_method): Suppressed unused local variables.
15431 (make_qualified_name): Likewise.
15432 (resolve_qualified_expression_name): Added default: in
15433 switch. Fixed lang_printable_name invocation.
15434 (class_instance_creation_expression): Added parenthesis around
15435 expressions.
15436 (patch_method_invocation_stmt): Fixed lang_printable_name and
15437 patch_invoke invocations.
15438 (check_for_static_method_reference): Fixed lang_printable_name
15439 invocation.
15440 (patch_invoke): Suppressed unused arguments and local variables.
15441 (lookup_method_invoke): Suppressed unused local variables.
15442 (qualify_ambiguous_name): Added default: in switch.
15443 (identical_subpath_p): Function removed.
15444 (patch_assignment): Suppressed unused local variables. Suppressed
15445 unnecessary if statement. Fixed lang_printable_name invocations.
15446 (try_builtin_assignconv): Fixed lang_printable_name invocations.
15447 (valid_ref_assignconv_cast_p): Parenthesis around
15448 expression. Suppressed unused local variables.
15449 (build_binop): Suppressed unused local variables. fixed
15450 lang_printable_name invocations.
15451 (string_constant_concatenation): Suppressed unused local
15452 variables.
15453 (patch_unaryop): Fixed lang_printable_name invocation.
15454 (patch_cast): Suppressed unnecessary argument. Fixed
15455 lang_printable_name invocation.
15456 (patch_array_ref): Fixed lang_printable_name invocation.
15457 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
15458 (build_labeled_block): Suppressed unused argument.
15459 (generate_labeled_block): Fixed build_labeled_block invocation.
15460 (build_loop_body): Suppressed unused local variables.
15461 (patch_loop_statement): Likewise.
15462 (patch_exit): Fixed lang_printable_name invocation.
15463 (patch_switch_statement): Likewise.
15464 (case_identity): First argument marked unused.
15465 (patch_try_statement): Fixed lang_printable_name invocations.
15466 (patch_synchronized_statement, patch_throw_statement): Likewise.
15467 (check_thrown_exceptions): Fixed check_thrown_exceptions and
15468 lang_printable_name invocations.
15469 (check_thrown_exceptions_do): Suppressed unused argument.
15470
15471 1998-10-14 Tom Tromey <tromey@cygnus.com>
15472
15473 * jcf-write.c (write_classfile): Add output class file as target.
15474 * lang-options.h: Added -MD, -MMD, -M, and -MM.
15475 * jcf.h: Added declarations for dependency-tracking functions.
15476 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
15477 * lang.c (lang_decode_option): Recognize -MD and -MMD.
15478 (finish_parse): Call jcf_dependency_write.
15479 (dependency_tracking): New global.
15480 (DEPEND_SET_FILE): New define.
15481 (DEPEND_ENABLE): New define.
15482 (init_parse): Enable dependency tracking if required.
15483 Include "flags.h".
15484 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
15485 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
15486 (../gcjh$(exeext)): Likewise.
15487 (jcf-depend.o): New target.
15488 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
15489 (GCJH_SOURCES): Likewise.
15490 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
15491 dep_name argument.
15492 (find_classfile): Added dep_name argument.
15493 (find_class): Compute name of dependency.
15494 (open_in_zip): Call jcf_dependency_add_file.
15495 * gjavah.c (output_file): No longer global.
15496 (usage): Don't mention "gjavah".
15497 (help): Likewise.
15498 (java_no_argument): Likewise.
15499 (version): Likewise.
15500 (main): Recognize and handle -M family of options.
15501 (print_mangled_classname): Return is void.
15502 (process_file): Handle case where output is suppressed.
15503 (HANDLE_END_FIELD): Likewise.
15504 (HANDLE_METHOD): Likewise.
15505 * jcf-depend.c: New file.
15506
15507 1998-10-13 Jeffrey A Law (law@cygnus.com)
15508
15509 * java-tree.def: Add missing newline at EOF.
15510
15511 1998-10-13 Tom Tromey <tromey@cygnus.com>
15512
15513 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
15514 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
15515 function.
15516 Include <config.h> and "system.h".
15517 (disassemble_method): Undefine RET to avoid clash with
15518 config/i386/i386.h.
15519
15520 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15521
15522 * decl.c (runtime_exception_type_node, error_exception_type_node):
15523 New global variables.
15524 (init_decl_processing): Initialized.
15525 * expr.c (java_lang_expand_expr): Set caught exception type to
15526 null if catch handler argument doesn't exit.
15527 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
15528 tree codes.
15529 * java-tree.h (runtime_exception_type_node,
15530 error_exception_type_node): Global variables declared.
15531 (DECL_FUNCTION_THROWS): New macro.
15532 (DECL_FUNCTION_BODY): Modified comment.
15533 (DECL_SPECIFIC_COUNT): Likewise.
15534 (struct lang_decl): New field throws_list.
15535 (IS_UNCHECKED_EXPRESSION_P): New macro.
15536 * lex.c (java_lex): Generate location information for THROW_TK.
15537 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
15538 EXCEPTIONS_P): New macros.
15539 (enum jdep_code): New value JDEP_EXCEPTION.
15540 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
15541 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
15542 PATCH_METHOD_RETURN_ERROR): New macros.
15543 (patch_method_invocation_stmt): Added new argument to prototype.
15544 (patch_synchronized_statement, patch_throw_statement,
15545 check_thrown_exceptions, check_thrown_exceptions_do,
15546 purge_unchecked_exceptions, check_throws_clauses): New function
15547 prototypes.
15548 * parse.y Fixed typo in keyword section.
15549 (throw:): Rule tagged <node>.
15550 (THROW_TK): Keyword tagged <operator>.
15551 (method_header:): Last argument to call to method_header passed
15552 from throws: rule.
15553 (throws:, class_type_list:, throw_statement:,
15554 synchronized_statement:, synchronized:): Defined actions.
15555 (method_header): New local variable current. Register exceptions
15556 from throws clause.
15557 (java_complete_tree): Complete and verify exceptions from throws
15558 clause.
15559 (complete_class_report_errors): Error message on exceptions not
15560 found
15561 (java_check_regular_methods): Fixed typo. Shortcut on private
15562 overriding methods. Changed error message on method
15563 redefinition. Check for throws clause compatibility.
15564 (check_throws_clauses): New function.
15565 (java_check_abstract_methods): Use DECL_NAME for wfl or current
15566 method. Changed error message on method redefinition.
15567 (currently_caught_type_list): New static variable.
15568 (java_complete_expand_methods): Purge unchecked exceptions from
15569 throws clause list. Call PUSH_EXCEPTIONS before walk and
15570 POP_EXCEPTIONS after.
15571 (resolve_qualified_expression_name): Pass new argument as NULL to
15572 patch_method_invocation_stmt.
15573 (patch_method_invocation_stmt): New argument ref_decl. Invoke
15574 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
15575 argument list when appropriate. Use new argument if non null to
15576 store selected method decl.
15577 (patch_invoke): Convert if necessary args of builtin types before
15578 forming CALL_EXPR. Argument list no longer reversed here.
15579 (invocation_mode): Treat final methods as static methods.
15580 (java_complete_tree): New cases for THROW_EXPR: and
15581 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
15582 function call.
15583 (complete_function_arguments): No more RECORD_TYPE
15584 conversion. Function parameter nodes no longer saved.
15585 (valid_ref_assignconv_cast_p): Avoid handling null type.
15586 (patch_binop): Fixed null constant reference handling.
15587 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
15588 BUILD_THROW macros.
15589 (patch_try_statement): Fixed comments. Record caught types in
15590 list, push the list, expand try block and pop the list.
15591 (patch_synchronized_statement, patch_throw_statement,
15592 check_thrown_exceptions, check_thrown_exceptions_do,
15593 purge_unchecked_exceptions): New functions.
15594 * typeck.c (lookup_argument_method): Allow WFL in place of method
15595 DECL_NAME during method definition check
15596
15597 1998-10-09 Tom Tromey <tromey@cygnus.com>
15598
15599 * gjavah.c (decode_signature_piece): New function.
15600 (print_c_decl): Use it. Added `name_override' argument.
15601 (print_method_info): Use name_override argument to print_c_decl.
15602 (seen_fields): Removed.
15603 (print_field_info): Don't update seen_fields.
15604 (struct method_name): New structure.
15605 (method_name_list): New global.
15606 (print_method_info): Add new method to list of methods.
15607 (name_is_method_p): New function.
15608 (print_field_info): If field name has same name as method, then
15609 change field name.
15610 (process_file): Parse methods before fields.
15611 (field_pass): New global.
15612 (HANDLE_END_FIELD): Take field_pass into account.
15613
15614 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15615
15616 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
15617 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
15618
15619 1998-10-03 Anthony Green <green@cygnus.com>
15620
15621 * jvspec.c: Fix bug in jvgenmain_spec patch.
15622
15623 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
15624
15625 * Makefile.in (lang.o:): Install dependency on java-tree.def.
15626 * decl.c (soft_exceptioninfo_call_node): New global variable.
15627 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
15628 takes extra integer argument. soft_exceptioninfo_call_node
15629 initialized.
15630 * except.c (java_set_exception_lang_code): New function
15631 (method_init_exceptions): Called here.
15632 (prepare_eh_table_type): New function.
15633 (expand_end_java_handler): Called here.
15634 * expr.c (build_java_throw_out_of_bounds_exception): Now features
15635 one argument. Modified generation of call to
15636 soft_badarrayindex_node to use new argument.
15637 (build_java_arrayaccess): Pass faulty index value to
15638 build_java_throw_out_of_bounds_exception.
15639 (generate_name): New function.
15640 (java_lang_expand_expr): New local variables node, current,
15641 has_finally_p. Expand TRY_EXPR node.
15642 (process_jvm_instruction): Replace top of the stack with thrown
15643 object reference when entering exception handler.
15644 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
15645 specific tree codes.
15646 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
15647 global.
15648 (DECL_SPECIFIC_COUNT): New macro.
15649 (prepare_eh_table_type, java_set_exception_lang_code,
15650 generate_name): New function declarations.
15651 (match_java_method): Declaration deleted.
15652 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
15653 macros.
15654 * lex.c (TRY_TK, CATCH_TK): Generate location information.
15655 * parse.h (redefinition_error, refine_accessible_methods_list,
15656 can_cast_to_p): Function declaration removed.
15657 (classitf_redefinition_error, variable_redefinition_error,
15658 parse_jdk1_1_error, find_applicable_accessible_methods_list,
15659 find_most_specific_methods_list, argument_types_convertible,
15660 enter_a_block, valid_builtin_assignconv_identity_widening_p,
15661 valid_cast_to_p, valid_method_invocation_conversion_p,
15662 try_reference_assignconv, add_stmt_to_compound,
15663 build_jump_to_finally, build_tree_list, patch_try_statement,
15664 java_get_catch_block): New function declarations.
15665 * parse.y (string_buffer_type): Global variable deleted.
15666 (group_of_labels, catches, catch_clause, catch_clause_parameter,
15667 finally): Rules tagged <node>.
15668 (TRY_TK, CATCH_TK): Token tagged <operator>.
15669 (class_body_declaration:, class_member_declaration:,
15670 formal_parameter:, explicit_constructor_invocation:,
15671 interface_member_declaration:, constant_declaration:,
15672 primary_no_new_array:, class_instance_creation_expression:,
15673 array_creation_expression:): Issue error on unsuported JDK1.1
15674 features.
15675 (try_statement:, catches:, finally:): Define actions.
15676 (catch_clause_parameter): New rule.
15677 (catch_clause:): Use new rule catch_clause_parameter.
15678 (parse_jdk1_1_error): New function.
15679 (redefinition_error): Renamed classitf_redefinition_error.
15680 (variable_redefinition_error): New function.
15681 (check_class_interface_creation): Call
15682 classitf_redefinition_error.
15683 (java_complete_tree): Added error message on JDEP_TYPE: case.
15684 (complete_class_report_errors): Fixed indentation.
15685 (declare_local_variables): Call variable_redefinition_error.
15686 (source_end_java_method): Call java_set_exception_lang_code and
15687 emit_handlers where appropriate.
15688 (java_method_add_stmt): Call add_stmt_to_block.
15689 (add_stmt_to_block): New function.
15690 (lookup_method_invoke): Fixed outside comment. new local variable
15691 candicates. Call find_applicable_accessible_methods_list and
15692 find_most_specific_methods_list when searching for a
15693 method. Modified error report to list possible candidates when
15694 applicable.
15695 (find_applicable_accessible_methods_list,
15696 find_most_specific_methods_list, argument_types_convertible): New
15697 function.
15698 (refine_accessible_methods_list): Function deleted.
15699 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
15700 expr (if applicable) before calling patch_array_ref.
15701 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
15702 (enter_block): Fixed comment.
15703 (enter_a_block): New function.
15704 (patch_assignment): Reorganized. Call try_reference_assignconv for
15705 references. Call valid_cast_to_p instead of can_cast_to_p.
15706 (try_reference_assignconv,
15707 valid_builtin_assignconv_identity_widening_p): New functions.
15708 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
15709 (valid_cast_to_p, valid_method_invocation_conversion_p): New
15710 functions.
15711 (build_string_concatenation): Don't resolve StringBuffer.
15712 (patch_cast): Fixed inverted arguments.
15713 (patch_array_ref): Code to save array expr deleted. Call
15714 valid_cast_to_p instead of can_cast_to_p.
15715 (generate_labeled_block): Call generate_name.
15716 (build_jump_to_finally, build_try_statement, java_get_catch_block,
15717 patch_try_statement): New functions.
15718 * typeck.c (match_java_method): Function deleted.
15719
15720 1998-10-02 Anthony Green <green@cygnus.com>
15721
15722 * jvspec.c: jvgenmain_spec uses different temporary file names.
15723
15724 1998-10-02 Anthony Green <green@cygnus.com>
15725
15726 * jvspec.c (lang_specific_driver): Fail if user specifies
15727 --main= when not linking.
15728
15729 1998-09-28 Tom Tromey <tromey@cygnus.com>
15730
15731 * class.c (make_class_data): Push value for `thread' field.
15732 * decl.c (init_decl_processing): Added `thread' field to class.
15733
15734 * class.c (add_field): Always make static fields externally
15735 visible.
15736
15737 1998-09-26 Anthony Green <green@cygnus.com>
15738
15739 * expr.c (build_java_athrow,
15740 build_java_throw_out_of_bounds_exception, expand_invoke,
15741 build_newarray, expand_java_multianewarray, build_java_monitor):
15742 Update comments to reflect _Jv_* function names.
15743
15744 1998-09-25 Per Bothner <bothner@cygnus.com>
15745
15746 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
15747 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
15748 * parse.y (expand_start_java_method): Likewise.
15749
15750 1998-09-24 Per Bothner <bothner@cygnus.com>
15751
15752 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
15753
15754 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
15755 (add_field): No longer need to convert from RECORD_TYPE to pointer,
15756 * expr.c: Remove no-longer-needed calls to promote_type.
15757 * decl.c (give_name_to_locals): Liekwise.
15758 * jcf-parse.c (get_class_constant): Compensate for new signatures.
15759 * parse.y: Add/remove promote_type calls as appropriate.
15760 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
15761 (parse_signature_string): Likewise.
15762 (build_java_array_type): Fix for now signature convenions.
15763
15764 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
15765
15766 1998-09-23 Tom Tromey <tromey@cygnus.com>
15767
15768 * class.c (init_class_processing): libjava function renamed to
15769 _Jv_RegisterClass.
15770
15771 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15772
15773 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
15774 * java-tree.def: Fixed DEFTREECODE third argument.
15775 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
15776 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
15777 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
15778 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
15779 JAVA_THIS_EXPR): Now replaced by tree code definitions.
15780 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
15781 * lang.c (java_tree_code_type, java_tree_code_length,
15782 java_tree_code_name): New arrays.
15783 (lang_init): Append Java tree node definitions to Gcc ones.
15784 * lex.c (expression_obstack): Declared as extern when JC1_LITE
15785 defined.
15786 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
15787 wfl_to_string.
15788 (java_lex): Allow declaration of empty string constants. Retain
15789 location information on CASE_TK and DEFAULT_TK.
15790 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
15791 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
15792 Modified to be more robust.
15793 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
15794 (build_new_invocation, try_builtin_assignconv,
15795 patch_switch_statement, string_constant_concatenation,
15796 build_string_concatenation, patch_string_cst, patch_string,
15797 java_expand_switch): New function declarations.
15798 * parse.y: Rules related to switch and EH tagged <node>.
15799 (label_id): Set to NULL_TREE
15800 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
15801 tree nodes.
15802 (this_or_super:): Fixed indentation.
15803 (statement:, statement_nsi:, statement_without_trailing_substatement:,
15804 statement_expression:): Removed call to RULE on all sub-rules.
15805 (switch_expression:, switch_labels:): New rules.
15806 (switch_statement:, switch_block:, switch_block_statement_groups:,
15807 switch_block_statement_group:, switch_labels:, switch_label:):
15808 Defined actions.
15809 (throw_statement:, synchronized_statement:, try_statement:):
15810 Defined temporary actions.
15811 (class_instance_creation_expression:): Call
15812 build_new_invocation. Fixed indentation.
15813 (field_access): Fixed indentation.
15814 (method_invocation): Likewise.
15815 (make_qualified_primary): Use THIS_EXPR.
15816 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
15817 resolving from SUPER, set *type_found.
15818 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
15819 (java_complete_tree): Removed unused local variable `location'. Case
15820 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
15821 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
15822 on MODIFY_EXPR: and all binary operator tree code cases. Removed
15823 STRING_CST: case. default: checks for patchable strings.
15824 (complete_function_arguments): Transform string constant or
15825 crafted StringBuffer if necessary.
15826 (build_method_invocation): Fixed comments.
15827 (build_new_invocation): New function.
15828 (patch_assignment): Call try_builtin_assignconv to figure a valid
15829 assignment conversion between builtin types.
15830 (try_builtin_assignconv): New function.
15831 (build_binop): Use URSHIFT_EXPR directly to call build.
15832 (operator_string): Use UNARY_PLUS_EXPR.
15833 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
15834 operator.
15835 (do_merge_string_cste, merge_string_cste,
15836 string_constant_concatenation, build_string_concatenation,
15837 patch_string, patch_string_cst): New function.
15838 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
15839 (patch_unaryop): Likewise. New test of valid ++/-- operands.
15840 (build_newarray_node): Use NEW_ARRAY_EXPR.
15841 (build_this): Use THIS_EXPR.
15842 (build_return): Enable debug information on return statement.
15843 (build_if_else_statement): Likewise.
15844 (complete_labeled_statement): Fixed related comment.
15845 (build_loop_body): Fixed comment.
15846 (build_bc_statement): Enable debug information on break/continue
15847 statements.
15848 (patch_bc_statement): Fixed typos. Handle SWITCH statement
15849 context.
15850 (patch_switch_statement, case_identity, java_expand_switch): New
15851 functions.
15852
15853 1998-09-21 Per Bothner <bothner@cygnus.com>
15854
15855 * buffer.h (BUFFER_INIT): New macro.
15856 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
15857 Pass (struct jcf_partial *state) to most functions.
15858 (jcf_block, jcf_relocation): New types.
15859 Support labels, branches, conditionals, loops.
15860
15861 1998-09-21 Tom Tromey <tromey@cygnus.com>
15862
15863 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
15864
15865 1998-09-21 Per Bothner <bothner@cygnus.com>
15866
15867 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
15868 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
15869 not integer_type_node (INT_TYPE_SIZ bits).
15870
15871 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
15872
15873 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
15874 * jcf-dump.c (print_exception_table): New function.
15875 (disassemble_method): Better handling of wide instructions.
15876 Make more robust for bad input.
15877
15878 1998-09-30 Jeffrey A Law (law@cygnus.com)
15879
15880 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
15881 FreeBSD.
15882
15883 1998-09-17 Jeffrey A Law (law@cygnus.com)
15884
15885 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
15886
15887 1998-09-17 Tom Tromey <tromey@cygnus.com>
15888
15889 * Makefile.in ($(PARSE_H)): Removed target.
15890
15891 1998-09-17 Jeffrey A Law (law@cygnus.com)
15892
15893 * Makefile.in (JAVA_OBJS): Add memmove.o
15894 (memmove.o): New target & rules.
15895
15896 1998-09-15 Tom Tromey <tromey@cygnus.com>
15897
15898 * expr.c (expand_invoke): Don't generate a call to the class init
15899 code.
15900
15901 1998-09-14 Jeffrey A Law (law@cygnus.com)
15902
15903 * Makefile.in: Add many missing dependencies.
15904 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
15905 as appropriate.
15906 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
15907 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
15908
15909 1998-09-11 Per Bothner <bothner@cygnus.com>
15910
15911 * decl.c (complete_start_java_method): If method is static (and
15912 not private) call _Jv_InitClass.
15913 * expr.c (expand_invoke): Don't call build_class_init.
15914
15915 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
15916
15917 1998-09-10 Jeffrey A Law (law@cygnus.com)
15918
15919 * Make-lang.in (GCJ): Define before using.
15920
15921 1998-09-09 Jeffrey A Law (law@cygnus.com)
15922
15923 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
15924 losing due to namespace pollution in GNU getopt.h
15925
15926 1998-09-09 Tom Tromey <tromey@cygnus.com>
15927
15928 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
15929 (java.all.cross): Likewise.
15930 (java.rest.encap): Likewise.
15931
15932 1998-09-08 Jeffrey A Law (law@cygnus.com)
15933
15934 * gjavah.c (print_class_decls): Fix thinko in arglist
15935 * jcv-io.c (find_classfile): Similarly.
15936
15937 1998-09-07 Jeffrey A Law (law@cygnus.com)
15938
15939 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
15940
15941 1998-09-05 Tom Tromey <tromey@cygnus.com>
15942
15943 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
15944 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
15945 * Makefile.in (PARSE_C): New macro.
15946 (PARSE_H): Likewise.
15947 (PARSE_SCAN_C): Likewise.
15948 ($(PARSE_C)): Target renamed from parse.c.
15949 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
15950 (clean): Remove parse-scan.c as well.
15951 (parse.o): Depend on $(PARSE_C).
15952
15953 1998-09-05 Anthony Green <green@cygnus.com>
15954
15955 * README, license.terms: Removed.
15956
15957 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
15958 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
15959 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
15960 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
15961 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
15962 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
15963 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
15964 and Java trademark attribution.
15965
15966 1998-09-04 Tom Tromey <tromey@cygnus.com>
15967
15968 * Makefile.in: Use gcjh, not gjavah.
15969 * config-lang.in (stagestuff): Use gcjh, not gjavah.
15970 * Make-lang.in: Changed gjavah to gcjh everywhere.
15971
15972 1998-09-03 Per Bothner <bothner@cygnus.com>
15973
15974 * gjavah.c: Support new -prepend -add -append flags.
15975 (print_method_info): Method is not virtual if class is final.
15976
15977 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15978
15979 * jv-scan.c: Fixed copyright assignment.
15980 * keyword.gperf: Likewise.
15981 * keyword.h: Likewise.
15982 * lex.c: Fixed copyright assignment.
15983 (java_lex): Push unicode back when parsing '<'.
15984 * lex.h: Fixed copyright assignment.
15985 * parse-scan.y: Likewise.
15986 * parse.h: Fixed copyright assignment.
15987 (build_debugable_stmt, complete_for_loop): New function prototypes.
15988 * parse.y: Fixed copyright assignment.
15989 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
15990 size_zero_node when completing a loop with no exit condition.
15991 (for_statement_nsi:): Define action.
15992 (for_init:, for_update:): Return size_zero_node when empty.
15993 (declare_local_variables): Call build_debugable_stmt.
15994 (build_debugable_stmt): New function.
15995 (build_loop_body): Build debugable statement around loop
15996 condition part.
15997 (complete_loop_body): Take into account the debugable statement
15998 around the EXIT_EXPR.
15999 (complete_loop_body): New function.
16000 (patch_exit_expr): Fixed condition inversion.
16001
16002 1998-09-02 Tom Tromey <tromey@cygnus.com>
16003
16004 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
16005 name of thread define.
16006 * jvspec.c (THREAD_NAME): New macro.
16007 (GCLIB): Likewise.
16008 (THREADLIB): Likewise.
16009 (lang_specific_driver): Recognize attempt to link with thread
16010 library or gc library. Recognize -ljava on command line so it
16011 isn't linked against more than once.
16012
16013 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16014
16015 * parse-scan.y (report_main_declaration): Name of the class
16016 containing `main' can be a qualified name.
16017
16018 1998-08-31 Tom Tromey <tromey@cygnus.com>
16019
16020 * config-lang.in: Changed gjavac to gjc everywhere.
16021 * Make-lang.in: Changed gjavac to gjc everywhere.
16022
16023 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
16024
16025 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
16026 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
16027 and install the files.
16028 * Makefile.in (JAVA_OBJS_LITE): New variable.
16029 (compiler:): Now include jv-scan as a dependency.
16030 (../jv-scan$(exeext), parse-scan.c): New targets.
16031 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
16032 * config-lang.in (compilers): Removed gcj, gjavah from the list.
16033 * jcf-parse.c (parse_source_file): Call java_layout_classes and
16034 check for errors even if parse_only.
16035 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
16036 defined.
16037 (yylex): New function. Uses java_lex body.
16038 (java_lex): Removed commented out statement. Remove local variable
16039 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
16040 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
16041 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
16042 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
16043 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
16044 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
16045 where appropriate.
16046 (java_lex_error): Empty if JC1_LITE is defined.
16047 (java_get_line_col): Return 0 if JC1_LITE is defined.
16048 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
16049 SET_MODIFIER_CTX): Moved into the section containing the macros
16050 conditionally defined by JC1_LITE.
16051 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
16052 argument if JC1_LITE is defined.
16053 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
16054 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
16055 is defined.
16056 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
16057 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
16058 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
16059 to different values according to JC1_LITE.
16060 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
16061 declared if JC1_LITE set.
16062 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
16063 defined if JC1_LITE not set.
16064 (struct parser_ctx): Reorganized and skip the jc1 front end part
16065 if JC1_LITE set.
16066 (java_layout_classes): New function definition.
16067 (java_push_parser_context, java_init_lex, yyparse, yylex,
16068 yyerror): Prototype always declared. All other static function
16069 prototypes declared only if JC1_LITE is not set.
16070 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
16071 declared in parse.h.
16072 (java_layout_classes): New function.
16073 (java_complete_expand_methods): No longer layout the class here.
16074 * parse-scan.y: New file.
16075 * jv-scan.c: New file.
16076
16077 1998-08-25 Tom Tromey <tromey@cygnus.com>
16078
16079 * gjavah.c (main): Handle -friend option.
16080 (friend_specs): New global.
16081 (generate_access): Handle friend_specs.
16082 (process_file): Likewise.
16083 (MAX_FRIENDS): New macro.
16084 (friend_count): New global.
16085 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
16086 Changed all callers.
16087
16088 1998-08-24 Per Bothner <bothner@cygnus.com>
16089
16090 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
16091 (main): Handle processing all the entries of a named .zip archive.
16092 * jcf-io.c (jcf_trim_old_input): New function.
16093 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
16094
16095 1998-08-24 Per Bothner <bothner@cygnus.com>
16096
16097 * lang.c (flag_assume_compiled): Make default be on.
16098
16099 1998-08-21 Per Bothner <bothner@cygnus.com>
16100
16101 * jcf-dump.c: Add bunches of flags to control output more.
16102 (process_class): New function; support printing more than one class.
16103 (main): Support new --print-main and --javap flags.
16104 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
16105 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
16106
16107 1998-08-20 Per Bothner <bothner@cygnus.com>
16108
16109 Change mangling of dispatch table to match C++ vtable (w/thunks).
16110 * class.c (build_dtable_decl), java-tree.h: New function.
16111 (make_class_data): Call it.
16112 * decl.c (init_decl_processing): Likewise.
16113
16114 1998-08-19 Warren Levy <warrenl@cygnus.com>
16115
16116 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
16117 soft_anewarray; adjust args passed.
16118 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
16119 match _Jv_NewObjectArray.
16120
16121 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16122
16123 * decl.c (push_labeled_block, pop_labeled_block): New functions.
16124 * expr.c (loopup_label): Call create_label_decl.
16125 (create_label_decl): New function.
16126 (java_lang_expand_expr): Call expand_start_bindings with argument
16127 set to zero.
16128 * java-tree.h Added space after PROTO in function declarations
16129 when necessary.
16130 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
16131 (create_label_decl, push_labeled_block): New function
16132 declarations.
16133 * lex.c (label_id): Initialize.
16134 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
16135 switch.
16136 * parse.h Added space after PROTO in function declarations when
16137 necessary.
16138 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
16139 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
16140 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
16141 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
16142 macros.
16143 (struct parser_ctxt): New fields current_loop,
16144 current_labeled_block.
16145 (build_if_else_statement, patch_if_else_statement,
16146 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
16147 generate_labeled_block, complete_labeled_statement,
16148 build_bc_statement, patch_bc_statement, patch_loop_statement,
16149 build_new_loop, build_loop_body, complete_loop_body): New function
16150 declarations.
16151 * parse.y (java_warning_count): New global variable.
16152 (label_id): New static variable.
16153 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
16154 (block:): Return size_zero_node when block is empty.
16155 (empty_statement:): Return size_zero_node.
16156 (statement:): Implement supplemental action when for_statement: is
16157 reduced.
16158 (label_decl:): New rule.
16159 (labeled_statement:): Rewritten using label_decl. Actions
16160 implemented.
16161 (labeled_statement_nsi:): Likewise.
16162 (if_then_statement): Actions implemented.
16163 (while_expression): New rule.
16164 (while_statement:): Rewritten using while_expression. Actions
16165 implemented.
16166 (while_statement_nsi:): Likewise.
16167 (do_statement_begin:): New rule.
16168 (do_statement:): Rewritten using do_statement_begin. Actions
16169 implemented.
16170 (for_statement:): Rewritten using for_begin. Actions implemented.
16171 (for_statement_nsi:): Likewise.
16172 (for_header:, for_begin:): New rules.
16173 (for_init:): Actions implemented.
16174 (statement_expression_list:, break_statement:,
16175 continue_statement:): Likewise.
16176 (yyerror): Count number of issued warning(s).
16177 (java_report_errors): Report error(s) and/or warning(s).
16178 (java_complete_class): Use build_java_argument_signature to
16179 recompute completed method signature.
16180 (java_check_regular_methods): New locals method_wfl and aflags.
16181 Use method_wfl instead of lookup_cl during error reports. Fixed
16182 indentation and modified some error messages. Use
16183 lang_printable_name in method instead of the DECL_NAME. New code
16184 to issue warnings on methods not overriding corresponding methods
16185 private to a different package.
16186 (java_method_add_stmt): Call add_stmt_to_compound.
16187 (add_stmt_to_compound): New function.
16188 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
16189 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
16190 (build_if_else_statement, patch_if_else_statement,
16191 build_labeled_block, generate_labeled_block,
16192 complete_labeled_statement, build_new_loop, build_loop_body,
16193 complete_loop_body, patch_loop_statement, build_bc_statement,
16194 patch_bc_statement, patch_exit_expr): New functions.
16195 * typeck.c (build_java_signature): Build argument signature before
16196 enclosing it in between parenthesis.
16197
16198 1998-08-17 Warren Levy <warrenl@cygnus.com>
16199
16200 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
16201 (JAVA_OBJS): Added reminder comment
16202
16203 1998-08-13 Nick Clifton <nickc@cygnus.com>
16204
16205 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
16206 be interpreted as a long long.
16207
16208 1998-08-13 Warren Levy <warrenl@cygnus.com>
16209
16210 * decl.c (init_decl_processing): Use _Jv_InitClass, not
16211 soft_initialise_class. Use _Jv_NewMultiArray, not
16212 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
16213 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
16214 _Jv_CheckArrayStore, not soft_checkarraystore. Use
16215 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
16216
16217 1998-08-12 Per Bothner <bothner@cygnus.com>
16218
16219 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
16220 length_identifier_node): New global tree node constants.
16221 * parse.y (kw_super, kw_this, kw_length): Removed globals.
16222 Replace uses by super_identifier_node etc.
16223 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
16224
16225 * parse.y (resolve_field_access): Don't special-case ".length" if
16226 flag_emit_class_files.
16227 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
16228 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
16229 and ARRAY.length.
16230
16231 1998-08-11 Per Bothner <bothner@cygnus.com>
16232
16233 * decl.c (init_decl_processing): Remove unused method_type_node fields.
16234 * class.c (make_method_value): Remove init for removed fields.
16235
16236 * class.c (layout_class): Use build_java_argument_signature.
16237 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
16238
16239 * typeck.c (push_java_argument_signature): Removed. Merged into ...
16240 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
16241 (build_java_signature): Don't use push_java_argument_signature.
16242
16243 * typeck.c (lookup_argument_method): New function.
16244 * parse.y (java_check_regular_methods): Use lookup_argument_method
16245 instead of lookup_java_method2 followed by lookup_java_method.
16246
16247 * parse.y (check_method_redefinition): Minor optimization.
16248
16249 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
16250 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
16251
16252 1998-08-10 Tom Tromey <tromey@cygnus.com>
16253
16254 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
16255 c-pragma.o.
16256
16257 * gjavah.c (java_float_finite): Use K&R-style definition.
16258 (java_double_finite): Likewise.
16259 (generate_access): Now returns void. Changed all callers.
16260 (last_access_generated): Removed.
16261 (process_file): Only make a single pass over the .class file.
16262
16263 1998-07-29 Per Bothner <bothner@cygnus.com>
16264
16265 * class.c (get_dispatch_table): Add extra dummy vtable entry,
16266 for compatibility for G++ (with -fvtable-thunks).
16267 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
16268
16269 * gjavah.c (process_file): Use public inheritance for super-class.
16270
16271 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
16272
16273 * lex.c (java_init_lex): Initialize ctxp->package.
16274 * parse.h (struct parser_ctxt): package and package_len replaced
16275 by tree package, an identifier node. Field method_decl_list is
16276 gone. Fixed comments.
16277 (lookup_field_wrapper, merge_qualified_name, not_accessible,
16278 class_in_current_package): New function prototypes.
16279 * parse.y (array_type:): Set class loaded flag on primitive type
16280 arrays.
16281 (package_declaration:): Assign ctxp->package to the
16282 identifier node.
16283 (method_invocation:): Handle invocation of method qualified by
16284 `super'.
16285 (single_type_import_declaration:): Removed ambiguity check.
16286 (java_pop_parser_context): New local variable `next'. Reset and
16287 set IMPORT_CLASSFILE_NAME flags on current and previous import
16288 list.
16289 (java_accstring_lookup): Use new local macro COPY_RETURN.
16290 (lookup_field_wrapper): New function.
16291 (parser_qualified_classname): Use merge_qualified_name.
16292 (parser_check_super_interface): Broaden error message.
16293 (do_resolve_class): Check for qualified class name in the current
16294 compilation unit if appropriate.
16295 (process_imports): Check for already defined classes.
16296 (check_pkg_class_access): Got rid of call to
16297 get_access_flags_from_decl.
16298 (java_complete_expand_methods): Call safe_layout_class based on
16299 the current class size.
16300 (make_qualified_primary): Build a WFL qualification on primary if
16301 none exists.
16302 (merge_qualified_name): New function.
16303 (make_qualified_name): Use merge_qualified_name.
16304 (resolve_expression_name): Use safe_lookup_field.
16305 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
16306 (resolve_qualified_expression_name): Likewise. Check on resolved
16307 element accessibility.
16308 (not_accessible_p, class_in_current_package): New functions.
16309 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
16310 (patch_method_invocation_stmt): Merged common pieces. Check
16311 accessibility of invoked method.
16312 (check_for_static_method_reference): Add returned type in error
16313 message.
16314 (invocation_mode): Get rid of bogus check on PRIVATE methods.
16315 (refine_accessible_methods_list): Merged two conditions in test.
16316 (java_complete_class): Sanity check on stabilize_ref gone.
16317 * zextract.c (read_zip_archive): Cast lseek second argument to long.
16318
16319 1998-07-28 Per Bothner <bothner@cygnus.com>
16320
16321 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
16322
16323 1998-07-24 Tom Tromey <tromey@cygnus.com>
16324
16325 * gjavah.c (F_NAN): Removed.
16326 (F_NAN_MASK): New macro.
16327 (F_POSITIVE_INFINITY): Removed.
16328 (F_NEGATIVE_INFINITY): Likewise.
16329 (java_float_finite): Rewrote.
16330 (D_NAN_MASK): Renamed.
16331 (java_double_finite): Rewrote.
16332 (D_POSITIVE_INFINITY): Removed.
16333 (D_NEGATIVE_INFINITY): Likewise.
16334
16335 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
16336 If verbose, print underlying representation of value in hex.
16337
16338 1998-07-24 Per Bothner <bothner@cygnus.com>
16339
16340 * buffer.h, buffer.c: New files.
16341 * Makefile.in (JAVA_OBJS): Add buffer.o.
16342
16343 Support locals variables and writing their debug entries to .class.
16344 * jcf-write.c: Simplify some by user new buffer type.
16345 (vode_buffer_grow): Removed.
16346 (struct localvar_info): New type.
16347 (localsvars, localvartable): New buffers.
16348 (localvar_alloc, localvar_free): New functions.
16349 (generate_bytecode_insns): Handle local variables.
16350 (generate_classfile): Write LocalVariableTable attribute.
16351
16352 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16353
16354 * jcf-io.c (open_in_zip): Check the zipfile magic number.
16355 * zipfile.h (ZIPMAGIC): New macro.
16356
16357 1998-07-24 Tom Tromey <tromey@cygnus.com>
16358
16359 * Makefile.in (gjavah.o): Updated dependencies.
16360 (jcf-dump.o): Likewise.
16361 (all.indirect): Use ../gjavah.
16362 (../gjavah$(exeext)): Likewise.
16363 (clean): Don't remove gjavah.
16364 (clean): Remove parse.c, not java/parse.c.
16365 * Make-lang.in (java): Added gjavah.
16366 (gjavah$(exeext)): New target.
16367 (GJAVAH_SOURCES): New macro.
16368 (java.all.build): Added gjavah.
16369 (java.all.cross): Likewise.
16370 (java.rest.encap): Likewise.
16371 * config-lang.in (compilers, stagestuff): Added gjavah.
16372
16373 1998-07-23 Tom Tromey <tromey@cygnus.com>
16374
16375 * gjavah.c (java_float_finite): New function.
16376 (java_double_finite): Likewise.
16377 (F_POSITIVE_INFINITY): New macro.
16378 (F_NEGATIVE_INFINITY): Likewise.
16379 (F_NAN): Likewise.
16380 (D_POSITIVE_INFINITY): Likewise.
16381 (D_NEGATIVE_INFINITY): Likewise.
16382 (D_NAN): Likewise.
16383 (print_field_info): Use java_float_finite and java_double_finite.
16384
16385 1998-07-23 Per Bothner <bothner@cygnus.com>
16386
16387 * parse.y (method_header): Name "this" implicit argument.
16388
16389 1998-07-22 Per Bothner <bothner@cygnus.com>
16390
16391 * jcf-write.c: Write out LineNumberTable attribute in .class file.
16392 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
16393 (put_linenumber): New function.
16394 (generate_bytecode_insns, generate_classfile): Write line numbers.
16395
16396 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16397
16398 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
16399 (lookup_name, build_known_method_ref, build_class_init,
16400 build_invokevirtual, invoke_build_dtable, match_java_method,
16401 build_field_ref, pushdecl_force_head, build_java_binop,
16402 binary_numeric_promotion, build_decl_no_layout,
16403 build_java_arrayaccess, build_newarray, build_anewarray,
16404 build_java_array_length_access, build_java_arraynull_check): New
16405 extern function prototypes.
16406 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16407 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
16408 java-tree.h.
16409 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
16410 to NULL
16411 * jcf.h (jcf_out_of_synch): New extern function prototype.
16412 * parse.h: Static/global function implemented in parse.y
16413 prototyped and declarations moved at the end of the file.
16414 (DECL_P): Check that the argument isn't null.
16415 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
16416 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
16417 (QUAL_DECL_TYPE): New macro.
16418 (PARAMS): Macro definition removed.
16419 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
16420 (return_statement:): Call build_return.
16421 (field_access:): Call make_qualified_primary in sub rule.
16422 (method_invocation:): Build method invocation and call
16423 make_qualified_primary when processing primaries.
16424 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
16425 get_type_from_signature.
16426 (java_check_regular_method): Extra integer 0 argument when calling
16427 lookup_java_method2.
16428 (lookup_java_interface_method2): Extra method DECL argument when
16429 calling lookup_java_interface_method2.
16430 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
16431 COMPOUND_EXPR node.
16432 (java_complete_expand_method): Layout current class iff not
16433 already done. Don't process interface's methods.
16434 (java_complete_expand_method): Use super class only if it
16435 exists. Use current class otherwise.
16436 (make_qualified_primary): New function.
16437 (resolve_expression_name): Process qualified expression or
16438 expression from primary the same way.
16439 (resolve_expression_name): Two last arguments to
16440 resolve_field_access are now NULL_TREEs.
16441 (resolve_field_access): New variable is_static. Local field must
16442 be DECLs. is_static computed on field DECLs only. Append code in
16443 where_found to the field access if necessary. Use QUAL_DECL_TYPE
16444 to initialize field_type.
16445 (resolve_qualified_expression_name): New local variable,
16446 previous_call_static and is_static. Handle primaries with function
16447 calls, casts, array references and `this'. `super' now handled as
16448 `(super_class)this'. Use is_static to clarify boolean expressions.
16449 Added code to handle case where a proper handle is required to
16450 access a field. Use QUAL_DECL_TYPE where applicable.
16451 (maybe_access_field): New function.
16452 (patch_method_invocation_stmt): New arguments primary, where,
16453 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
16454 deleted. Use `where' as a type to search from if specified. Check
16455 for static method reference where forbidden. Append primary or
16456 current_this to the argument list if not calling constructor nor
16457 static methods.
16458 (check_for_static_method_reference): New function.
16459 (patch_invoke): Layout the class on which new is done if
16460 necessary.
16461 (lookup_method_invoke): Changed format to report errors on
16462 methods.
16463 (qualify_ambiguous_name): New local variable this_found. Now
16464 handle things from primaries. Method call are considered
16465 expression names.
16466 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
16467 changed into NULLs.
16468 (not_initialized_as_it_should_p): Comply with the new DECL_P.
16469 (java_complete_tree): New case fo RETURN_EXPR. Process function
16470 call arguments in separate function.
16471 (complete_function_arguments): New function.
16472 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
16473 anymore.
16474 (patch_assignment): Take the return function slot into account as
16475 a RHS. Distinguish assignment from a return.
16476 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
16477 when checking methods in interfaces.
16478 (resolve_type_during_patch): NULL argument to unresolve_type_p
16479 instead of NULL_TREE.
16480 (patch_newarray): Fixed typo in comment.
16481 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
16482 (build_return, patch_return): New functions.
16483 * typeck.c (lookup_java_constructor): Fixed typo in comment.
16484
16485 1998-07-21 Per Bothner <bothner@cygnus.com>
16486
16487 * constants.c (find_name_and_type_constant, find_fieldref_index,
16488 find_methodref_index): New methods.
16489 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
16490 just return given method. Also, rename to build_known_method_ref.
16491 (expand_invoke): Rename call to build_invoke_non_interface.
16492 * java-tree.h, parse.h: Update prototype.
16493 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
16494 (such as expand_expr_stmt) if flag_emit_class_files.
16495 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
16496 STACK_TARGET, IGNORE_TARGET): New macros.
16497 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
16498 (generate_bytecode_insn): New function to generate method's bytecode.
16499 (generate_classfile): Node generate Code attribute for a method.
16500 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
16501 push_long_const, field_op, adjust_typed_op, maybe_wide):
16502 New functions used by generate_bytecode_insn.
16503
16504 * typeck.c (signature_include_return): Remove variable.
16505 (push_java_argument_signature, build_java_argument_signature): New.
16506 (build_java_signature): Use push_java_argument_signature.
16507 * parse.y: Use build_java_argument_signature instead of fiddling
16508 with signature_include_return.
16509
16510 1998-07-17 Tom Tromey <tromey@cygnus.com>
16511
16512 * gjavah.c (print_c_decl): Always generate JArray<>* for array
16513 types.
16514
16515 * Makefile.in (all.indirect): Added gjavah$(exeext).
16516 (gjavah$(exeext)): Added $(exeext).
16517 (clean): Likewise.
16518
16519 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16520
16521 * class.c (layout_class): Call to java_layout_parsed_class replace
16522 by safe_layout_class.
16523 * expr.c (build_java_array_length_access): Removed static storage
16524 class in the function definition.
16525 (build_java_arraynull_check): Likewise.
16526 Also fixed typos in two comments.
16527 * lex.c (java_init_lex): Initialize static global kw_length.
16528 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
16529 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
16530 java_lex_error.
16531 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
16532 * parse.h (resolve_no_layout): New static function declaration.
16533 (get_identifier_in_static): Declaration removed.
16534 (java_layout_parsed_class): Function name declaration changed to
16535 safe_layout_class.
16536 (build_newarray_node, patch_newarray, resolve_type_during_patch,
16537 not_initialized_as_it_should_p, build_this): New static function
16538 declarations.
16539 (pushdecl_force_head, build_java_binop, int_fits_type_p,
16540 binary_numeric_promotion, stabilize_reference,
16541 build_decl_no_layout, build_java_arrayaccess): Extern function
16542 declarations moved into their own section.
16543 (build_newarray, build_anewarray, build_java_array_length_access,
16544 build_java_arraynull_check): New extern function declarations.
16545 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
16546 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
16547 fake tree codes.
16548 (CALL_CONSTRUCTOR_P): New macro.
16549 * parse.y (kw_length): New static global tree node.
16550 (return_statement): Tagged <node>.
16551 (RETURN_TK): Tagged <operator>.
16552 (variable_declarator_id:): Build variable declaration with an
16553 empty initialization value if a syntax error was found in the
16554 initialization part of the variable declaration.
16555 (statement_without_trailing_substatement:): return_statement: now
16556 uses the default rule.
16557 (return_statement:): Temporarily fixed to return NULL_TREE.
16558 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
16559 (class_instance_creation_expression:): Class creation rules now
16560 call build_method_invocation upon reduction.
16561 (array_creation_expression:): Rules call build_newarray_node upon
16562 reduction.
16563 (dim_exprs:): Build a list of dimension expressions.
16564 (dim_expr:): Store location of the OSB_TK in the dimension
16565 expression node.
16566 (method_invocation:): Added a new error rule.
16567 (build_unresolved_array_type): WFL argument may also be an array
16568 on a primitive type. Name of the argument changed to reflect this.
16569 (method_declarator): Insert argument type at the beginning of the
16570 argument type list and later reverse the list.
16571 (unresolved_type_p): Argument 'returned' may be optionally
16572 NULL_TREE.
16573 (java_layout_class_from_source): Function renamed
16574 safe_layout_class.
16575 (resolve_and_layout): Now call resolve_no_layout and
16576 safe_layout_class.
16577 (resolve_no_layout): New function.
16578 (purify_type_name): New function.
16579 (complete_class_report_errors): Call purify_type_name during error
16580 report on a type not found.
16581 (process_imports): error_found local variable doesn't need to be
16582 initialized to zero.
16583 (declare_local_variables): New local type_wfl. Fixed typo in error
16584 message. type_wfl assigned to unresolved type and used to register
16585 incomplete type. Build a WFL around the variable initialization
16586 statement so that debug info can be generated on it.
16587 (source_start_java_method): Reverse argument list after they've
16588 been processed.
16589 (current_this): New static global variable.
16590 (java_complete_expand_methods): Set current_this when appropriate.
16591 (resolve_expression_name): Build correct static and non static
16592 field access bearing a simple name.
16593 (resolve_field_access): Resolve the length field of arrays. Handle
16594 f.m() cases.
16595 (patch_method_invocation_stmt): Set the type of the method
16596 invocation to error_mark_node. This value is later overridden by a
16597 valid type, if any. Don't handle qualified constructor invocation
16598 as qualified method invocation. Call lookup_method_invoke with its
16599 new flag. It's no longer necessary to access the selected method
16600 as the value of a tree list. Handle constructor invocation.
16601 (patch_invoke): Reverse argument list when invoking non interface
16602 methods. Insert call to new as the first argument of the
16603 constructor.
16604 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
16605 defined within a final class. Return INVOKE_STATIC if the invoked
16606 method is a constructor.
16607 (lookup_method_invoke): New lc argument is a flag to indicate a
16608 constructor lookup. Now handle constructor lookup. Choose the most
16609 specific method in case several were matching the invocation
16610 requirements. Return a method decl instead of a tree list featuring
16611 one single method decl element.
16612 (refine_accessible_methods_list): New lc flag argument to
16613 indicate that a constructor is being looked up.
16614 (not_initialized_as_it_should_p): New function.
16615 (java_complete_tree): Now process fake tree codes
16616 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
16617 save_expr on resolved function call arguments. Case on
16618 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
16619 (patch_assignment): LHS can be a field access expression. When
16620 dealing with reference, lhs_type is the promoted type of the
16621 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
16622 applicable.
16623 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16624 (patch_binop): Use not_initialized_as_it_should_p where
16625 applicable.
16626 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
16627 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
16628 where applicable.
16629 (resolve_type_during_patch): New function.
16630 (patch_cast): Call resolve_type_during_patch to resolve type and
16631 report error accordingly.
16632 (patch_array_ref): Use not_initialized_as_it_should_p where
16633 applicable. Array base expression is saved before being
16634 used. Promote the type of an array elements if it contains non
16635 builtin types.
16636 (build_newarray_node, patch_newarray, build_this): New functions.
16637
16638 1998-07-16 Tom Tromey <tromey@cygnus.com>
16639
16640 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
16641 increment it in `for' statement.
16642 (print_field_info): If number is inf or nan, don't print it.
16643 (print_method_info): If method name is `delete', just ignore it.
16644 (print_c_decl): Special-case jstringArray.
16645
16646 * gjavah.c (help): New function.
16647 (no_argument): New function.
16648 (usage): Changed text.
16649 (main): Rewrote argument handling. Now handles -v, --help,
16650 --version.
16651 (version): New function.
16652 (found_error): New global.
16653 (main): Return found_error.
16654 (generate_access): Set found_error.
16655 (print_c_decl): Likewise.
16656
16657 1998-07-15 Tom Tromey <tromey@cygnus.com>
16658
16659 * gjavah.c (print_c_decl): Don't print "," when examining field.
16660 Skip type name when looking at "[L" types.
16661 (process_file): Now static.
16662 (generate_access): Now returns int.
16663 (last_access_generated): New global.
16664 (process_file): Clear last_access_generated; make multiple passes
16665 over the class.
16666 (print_field_info): Just return if generate_access returns true.
16667 (print_method_info): Likewise. Also, allow <init> functions to
16668 pass through.
16669 (print_c_decl): Added is_init argument. Print constructors
16670 properly.
16671 (print_cxx_classname): Use UTF8_GET to extract characters from
16672 string.
16673 (print_base_classname): New function.
16674 (print_class_decls): New function.
16675 (process_file): Use it.
16676 (utf8_cmp): New function.
16677
16678 1998-07-13 Nick Clifton <nickc@cygnus.com>
16679
16680 * lang-options.h: Format changed to match changes in gcc/toplev.c
16681 to implement a --help option.
16682
16683 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
16684
16685 * decl.c (init_decl_processing): Revert change to dtable_type.
16686
16687 1998-07-09 Per Bothner <bothner@cygnus.com>
16688
16689 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
16690
16691 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
16692
16693 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
16694
16695 * lang.c (lang_init): Default flag_exceptions to 1, without
16696 checking to see if it's 2 first.
16697
16698 1998-07-08 Jeffrey A Law (law@cygnus.com)
16699
16700 * constants.c: Include "system.h".
16701 * decl.c: Likewise.
16702 * lang.c (flag_new_exceptions): Get via extern now.
16703 (lang_init_options): New functions. Turn on flag_new_exceptions.
16704
16705 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16706
16707 * lex.c (java_lex): Return 0 when we see an invalid character in
16708 the input.
16709
16710 * lex.c (java_read_char): Specify extra argument when calling
16711 java_lex_error.
16712 (java_read_unicode, java_parse_end_comment,
16713 java_parse_escape_sequence): Likewise,
16714 (java_lex): Specify extra argument when calling
16715 java_lex_error. Test that IDs are beginning with a legal character
16716 for IDs. Handle invalid characters with an error message and a
16717 call to java_lex_error.
16718 (java_lex_error): Adjust column position by new argument
16719 `forward'. Issue an error even if in the middle of reporting an
16720 other error.
16721
16722 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
16723
16724 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
16725 we don't explicitly put a null pointer when we're copying it.
16726
16727 1998-07-07 Tom Tromey <tromey@cygnus.com>
16728
16729 * gjavah.c (print_cxx_classname): New function.
16730 (super_class_name): Likewise.
16731 (print_super_fields): Removed.
16732 (in_super): Removed.
16733 (print_field_info): Never generate #defines.
16734 (print_c_decl): Changed generated types to match JNI. No longer
16735 print class name before method name.
16736 (print_method_info): Print "static" before static methods.
16737 Print "virtual" before non-final methods.
16738 (usage): Use exit(1), not exit(-1).
16739 (main): Likewise.
16740 (print_field_info): Use %.17g to print a double.
16741 (last_access): New globals.
16742 (process_file): Initialize last_access.
16743 (usage): Now static.
16744 (ACC_VISIBILITY): New define.
16745 (generate_access): New function.
16746 (print_field_info): Call it.
16747 (print_method_info): Likewise. Also, generate information for all
16748 methods, not just native methods. Return void.
16749 (print_c_decl): Return void.
16750 (print_field_info): Return void.
16751
16752 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16753
16754 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
16755 processing the jc1 grammar file. Prefix bison functions and
16756 variables with java_.
16757 (parse.c): Dependencies on parse.h and lex.h
16758 * expr.c (build_java_arrayaccess): Function now global.
16759 * java-tree.h: Comment reorganized to carry on previous
16760 classification effort.
16761 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
16762 RESOLVE_TYPE_NAME_P): New flags on WFLs.
16763 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
16764 java_parse (new prefix java_ generated by bison).
16765 (java_layout_parsed_class, java_register_parsed_class): Function
16766 call removed.
16767 (yyparse): Removed unnecessary call to init_outgoing_cpool.
16768 * lex.c (static tree wfl_op): Variable deleted.
16769 (java_init_lex): Initialize kw_super and kw_this. Initialize more
16770 ctxp fields to NULL_TREE.
16771 (java_lex): No longer create WFL for operators. Filename caching
16772 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
16773 created as STRING_CST and later expanded. Removed extra argument
16774 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
16775 and SUPER.
16776 (build_wfl_node): Removed code in comments.
16777 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
16778 store token and location data in the current bison token.
16779 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
16780 static/extern function declaration at the beginning of the file.
16781 (struct qualification): Data structure definition deleted.
16782 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
16783 (qualify_ambiguous_name): Function declaration modified. Function
16784 now returns nothing.
16785 (build_array_ref, patch_array_ref, make_qualified_name,
16786 resolve_qualified_expression_name, maybe_generate_clinit,
16787 resolve_field_access): New static function declarations.
16788 (build_java_arrayaccess): New extern function declaration.
16789 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
16790 (CALL_EXPR_PRIMARY): Macro deleted.
16791 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
16792 (struct parser_ctxt): Field initialized_final
16793 removed. non_static_initialized, static_initialized: New fields.
16794 * parse.y (static tree kw_super, static tree kw_this): New global
16795 static.
16796 (%union): tree wfl field of operator member replaced by int
16797 location. WFLs are non longer created for operators.
16798 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
16799 (qualified_name:): Now calls make_qualified_name to build the
16800 identifier.
16801 (type_declaration:): Consider generating <clinit> when class
16802 parsing completed.
16803 (variable_declarator:): Directly build an assignment node when the
16804 variable is initialized when declared.
16805 (this_or_super:): Build a WFL and set current location when THIS
16806 or SUPER are parsed.
16807 (expression_statement:): Wrap statement around a WFL.
16808 (primary_no_new_array:): Fixed typo. Changed value returned by
16809 THIS_TK because of its new type (temporary).
16810 (dim_exprs:): Temporary fix because of OSB_TK's new type.
16811 (field_access:): Build qualified name with SUPER.
16812 (method_invocation:): Fixed returned value because of SUPER's new
16813 type.
16814 (array_access:): Use OSB_TK location information.
16815 (post_increment_expression:, post_decrement_expression:,
16816 unary_expression:, pre_increment_expression:,
16817 pre_decrement_expression:, unary_expression_not_plus_minus:,
16818 cast_expression:, multiplicative_expression:,
16819 additive_expression:, shift_expression:, relational_expression:,
16820 equality_expression:, and_expression:, exclusive_or_expression:,
16821 inclusive_or_expression:, conditional_and_expression:,
16822 conditional_or_expression:, assignment:): Use new location/token
16823 information available on operators.
16824 (create_class): Set super_decl_type to NULL_TREE when processing
16825 java.lang.Object.
16826 (register_fields): Field initialization is now a MODIFY_EXPR
16827 node. Chain initialization code to the matching lists (according
16828 to the field declaration modifiers).
16829 (maybe_generate_clinit): New function.
16830 (method_header): Don't set method's DECL_NAME to a WFL when adding
16831 methods to java.lang.Object.
16832 (resolve_and_layout): Now can return NULL_TREE if the type
16833 resolution fails. Otherwise, return the class DECL instead of its
16834 TYPE.
16835 (check_method_redefinition): Don't patch method DECL_NAME if it
16836 belongs to java.lang.Object.
16837 (process_imports): Simply assign error_found to the value returned
16838 by check_pkg_class_access.
16839 (declare_local_variables): Don't use their init statements (if
16840 any) when parsing error were previously found. Reuse MODIFY_EXPR
16841 build during parsing as an init statement.
16842 (java_method_add_stmt): Now return the current method body.
16843 (java_layout_parsed_class, java_register_parsed_class): Functions
16844 removed.
16845 (java_complete_expand_methods): Initialize the constant pool on a
16846 per class basis. Layout the classes before expanding their method
16847 bodies. Don't try expand artificial constructor code if error were
16848 found. Make the classes data and register them if no error were
16849 found.
16850 (java_complete_expand_method): Retrieve an artificial constructor
16851 argument list before entering its body. Assign the top block to
16852 the artificial constructor function body and set types of declared
16853 blocks and compound statements to void. Walk method body if not an
16854 artificial constructor.
16855 (make_qualified_name, cut_identifier_in_qualified): New functions.
16856 (resolve_expression_name): Fixed comments. Save/restore the
16857 current class CLASS_LOADED_P flag value. Build non qualified
16858 static field access and handle qualified expression names.
16859 (resolve_field_access, resolve_qualified_expression_name): New
16860 functions.
16861 (patch_method_invocation_stmt): Use the new expression resolution
16862 scheme, calling resolve_field_access when the function call is
16863 resolved as an expression.
16864 (qualify_ambiguous_name): Function rewritten to work on qualified
16865 expression produced by make_qualified_name.
16866 (java_complete_tree): Promote type when function's argument are
16867 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
16868 the assignment to discover further errors if RHS is a expression
16869 name that fails to evaluate. Declare LHS initialized even though
16870 the assignment failed. Don't use the location variable and removed
16871 extra argument in patch function calls. Now handle the ARRAY_REF
16872 case and build internal string representation when STRING_CSTs are
16873 walked.
16874 (build_method_invocation): Don't wrap function call around a WFL.
16875 (build_assignment): Likewise. Use the operator location
16876 information.
16877 (patch_assignment): Handle array access LHSs. Handle error
16878 provenance, resulting in a better error report.
16879 (build_binop): Use op_location from operator as binop location
16880 information.
16881 (build_unaryop, build_incdec, build_cast): Likewise.
16882 (patch_binop): Extract location information from the node. Fixed
16883 typo in error message.
16884 (patch_unary_op): Extract location information from the node.
16885 (build_array_ref, patch_array_ref): New functions.
16886
16887 1998-07-01 Tom Tromey <tromey@cygnus.com>
16888
16889 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
16890 match _Jv_IsInstanceOf.
16891 * decl.c (init_decl_processing): Use _Jv_NewArray, not
16892 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
16893
16894 1998-06-30 Tom Tromey <tromey@cygnus.com>
16895
16896 * decl.c (init_decl_processing): Functions are now named
16897 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
16898
16899 1998-06-29 Per Bothner <bothner@cygnus.com>
16900
16901 * java-tree.h (load_class): Add prototype.
16902 * class.c (is_compiled_class): Add missing arg to load_class.
16903 * expr.c (expand_java_NEW): Call load_class.
16904 * parse.y (process_import): Removed bogus use of void return value.
16905
16906 1998-06-25 Per Bothner <bothner@cygnus.com>
16907
16908 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
16909 Function name is "_Jv_Throw" instead of "soft_athrow".
16910 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
16911 Function name is "_Jv_AllocObject" instead of "soft_new".
16912 Takes an extra parameter (object size).
16913 * expr.c: Update calls.
16914
16915 1998-06-24 Per Bothner <bothner@cygnus.com>
16916
16917 * lex.c (java_get_line_col): Handle end-of-file.
16918 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
16919
16920 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
16921
16922 * lang.c (lang_init): Make -fexceptions the default.
16923 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
16924 exception handling is not turned on.
16925
16926 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
16927
16928 * lang.c (flag_new_exceptions): Make this this default.
16929 * decl.c (end_java_method): Call emit_handlers.
16930 * except.c (method_init_exceptions): Set language code and version.
16931 (expand_start_java_handler): Enable exception, and call
16932 expand_eh_region_start.
16933 (expand_end_java_handler): Enable exception, and set up catch blocks.
16934 (emit_handlers): New routine to generate the saved handlers.
16935 * java-except.h (emit_handlers): Add prototype.
16936
16937 1998-06-12 Per Bothner <bothner@cygnus.com>
16938
16939 We used to have three different representations of the constant pool:
16940 the CPool structure, the tree_constant_pool, and the constructures
16941 used to build the Class object (which may need class and string
16942 constants) in compiled code. None were appropriate for compiling
16943 to .class files, so I did a major overhaul.
16944
16945 First, the tree_constant_pool array was removed. Things were
16946 modified to the CPool structure in the JCF could be used.
16947 Second, a "capacity" field was added to the CPool, and functions
16948 written to search for a matching constant, adding one if not found.
16949 The code that generated the Class object was changed to use a CPool.
16950 The actual TREE_LISTs used to build the CONSTRUCTORs used for
16951 the static Class object are now only in build_constants_constructor.
16952 Finally, I wrote code which can generate a .class file (including its
16953 constant pool) from the RECORD_TYPE of a class. This is a big step
16954 on the way to compiling Java source into .class files.
16955
16956 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
16957 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
16958
16959 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
16960 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
16961 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
16962 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
16963 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
16964 (lang_type): Removed constant_pool field.
16965 * jcf.h (CPool): Renamed size to count. Added field capacity.
16966 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
16967 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
16968 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
16969
16970 * constants.c (current_constant_pool_tags, current_constant_pool_data,
16971 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
16972 * constants.c (build_constants_constructor): Use new outgoing_cpool.
16973 (set_constant_entry, find_constant1, find_constant2,
16974 find_class_constant, count_constant_pool_bytes, write_constant_pool,
16975 find_utf8_constant, find_class_or_string_constant): New functions.
16976
16977 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
16978 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
16979 (give_name_to_class, get_class_constant): Likewise.
16980 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
16981 (get_name_and_type_constant, get_ref_constant): Removed.
16982 * parse.h (parser_ctxt): Remove field tree_constant_pool.
16983 * parse.y: Don't save/restore tree_constant_pool.
16984 * verify.c (verify_jvm_instructions): Update for new approach.
16985 * expr.c (expand_invoke, expand_java_field_op): Likewise.
16986
16987 * lang-options.h: Added -femit-class-file, -femit-class-files.
16988 * lang.c (flag_emit_class_files), java-tree.h: New flag.
16989 (lang_f_options): Added "emit-class-file(s)".
16990
16991 * expr.c (build_java_arrayaccess): Generate more efficient array
16992 bounds checking, by using unsigned compare.
16993
16994 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
16995
16996 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16997
16998 * parse.h: New comment on the handling of unresolved type
16999 identifiers. JDEPs are now part of the jdep_code enum.
17000 (typedef struct jdep): Now use enum jdep_code or int, depending on
17001 availability. Both are narrowed down to an 8 bits bitfield.
17002 (CALL_EXPR_PRIMARY): Fixed comment.
17003
17004 1998-06-10 Tom Tromey <tromey@cygnus.com>
17005
17006 * Make-lang.in (java): Added gjavac and jvgenmain.
17007 (java.start.encap): Depend on gjavac.
17008 (java.rest.encap): Depend on jvgenmain.
17009
17010 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
17011 (JAVA_CROSS_NAME): Likewise.
17012 (java.all.build): Depend on jvgenmain and gjavac.
17013 (java.all.cross): Depend on jvgenmain and gjavac-cross.
17014 (jvgenmain$(exeext)): New target.
17015 (java.install-common): Wrote.
17016 * config-lang.in (compilers, stagestuff): Added gjavac and
17017 jvgenmain.
17018
17019 1998-06-10 Dave Brolley <brolley@cygnus.com>
17020
17021 * lang.c (lang_decode_option): New argc/argv interface.
17022
17023 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17024
17025 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
17026 * decl.c (build_decl_no_layout): New function.
17027 * expr.c (java_lang_expand_expr): Layout declarations found in
17028 blocks before they're pushed.
17029 * jcf-parse.c (load_class): Save current line when parsing class
17030 file.
17031 (parse_source_file): Register class before expanding their
17032 methods.
17033 * lang.c (put_decl_node): Produce `null' when `void *' is
17034 processed.
17035 * lex.c (static tree wfl_op): New static global, for error report
17036 on casts.
17037 (java_init_lex): wfl_operator and wfl_op initialized
17038 here. Filename caching added for wfl_op. Return wfl_op when `(' is
17039 parsed.
17040 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
17041 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
17042 build_unresolved_array_type): New static function definitions.
17043 (build_decl_no_layout): New extern function declared.
17044 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
17045 faulty modifier exists.
17046 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
17047 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
17048 (UNARY_PLUS_EXPR): New fake operator.
17049 (struct parser_ctxt): New field osb_number.
17050 * parse.y (static tree wfl_operator): New static WFL for operator
17051 bound error messages.
17052 (DECR_TK, INCR_TK): Moved.
17053 (OP_TK): Tagged <operator>.
17054 (array_type:): Now call build_unresolved_array_type.
17055 (dim_expr:): Count the number of '[' seen.
17056 (post_increment_expression, post_decrement_expression,
17057 pre_increment_expression, pre_decrement_expression,
17058 unary_expression_not_plus_minus, unary_expression:): Actions are
17059 now building the corresponding unary expressions.
17060 (cast_expression:): Actions are now building cast expressions.
17061 (build_unresolved_array_type): New function.
17062 (create_interface): Reset the number of declared interfaces.
17063 (create_class): Likewise.
17064 (method_header): Methods declared within the scope of an interface
17065 are now implicitly set public and abstract.
17066 (java_complete_class): Variable's and parameter's type are patched
17067 with a promoted type.
17068 (declare_local_variables): Resolved non builtin types are promoted
17069 before being used to build a variable decl. Removed type patch
17070 posted on variable initialization statement.
17071 (source_start_java_method): Use build_decl_no_layout to build the
17072 decl of a parameter of incomplete type.
17073 (java_register_parsed_class): Process interfaces too. Call
17074 rest_of_decl_compilation on each processed class declarations.
17075 (java_complete_expand_methods): Don't attempt to expand things in
17076 interfaces.
17077 (java_complete_tree): Process CONVERT_EXPR, even though it always
17078 has a type. Propagate error_mark_node to node's type too. Promote
17079 method's call argument type and return error_mark_node if
17080 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
17081 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
17082 handle unary operator nodes.
17083 (build_assignment): Added comment.
17084 (print_int_node): New function.
17085 (patch_assignment): New second argument. New error handling. Use
17086 print_int_node. Handle references. Use can_cast_to_p to issue
17087 different error message according to the context and check upon
17088 the initialization of the RHS.
17089 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
17090 (operator_string): Handle more operators.
17091 (patch_binop): No longer use a function static
17092 wfl_operator. Improved error message on shift distance.
17093 (build_unaryop, build_incdec, build_cast, patch_unaryop,
17094 patch_cast): New functions.
17095
17096 1998-06-05 Per Bothner <bothner@cygnus.com>
17097
17098 * jvspec.c: New file.
17099 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
17100
17101 * java-tree.h (identifier_subst): Add declaration.
17102
17103 1998-06-04 Tom Tromey <tromey@cygnus.com>
17104
17105 * jvgenmain.c (main): Generate call to JvRunMain.
17106
17107 * class.c (make_class_data): Push value for "sync_info" field.
17108 * decl.c (init_decl_processing): Push "sync_info" field.
17109
17110 1998-06-03 Per Bothner <bothner@cygnus.com>
17111
17112 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
17113 Java (source) name, not signature.
17114 Set TYPE_ALIGN to (at least) that of element_type.
17115
17116 1998-06-02 Per Bothner <bothner@cygnus.com>
17117
17118 * class.c: Moved classname-mangling-rekated code to ...
17119 * mangle.c: ... this new file.
17120 * jvgenmain.c: New program (needs mangle.c) to generate main program.
17121 * Makefile.in: Update for above changes.
17122
17123 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
17124
17125 * expr.c (truthvalue_conversion): Convert integer and floating
17126 point value to their truth value.
17127 * lex.c (java_lex): Handle the `null' literal.
17128 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
17129 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
17130 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
17131 New macros.
17132
17133 * parse.y: Reorganization/documentation on token declaration.
17134 (binop_lookup[]): New added new tree codes.
17135 (relational_expression): Build corresponding binary operators.
17136 (equality_expression, conditional_and_expression,
17137 conditional_or_expression): Likewise.
17138 (java_complete_class): Fix crash in debug message.
17139 (java_complete_tree): Check initialization of method call
17140 arguments. Further bogus node evaluation to detect more error
17141 during assignments. Handles more binary operators.
17142 (patch_assignment): Use DECL_P.
17143 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
17144 code.
17145 (operator_string): Handle more case. Compacted source.
17146 (patch_binop): Changed function comment. Checking for
17147 uninitialized first operand takes the compound assignment into
17148 account and uses DECL_P. Checking for uninitialized second operand
17149 delayed to routine's end. Use macros to issue type bound error
17150 messages and issue messages on both operands if their types are
17151 different. Force fixed type into node. Handle all binary
17152 operators.
17153
17154 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17155
17156 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
17157 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
17158 build operator node and return tokens.
17159 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
17160 * parse.h (java_complete_tree): Changed returned type in prototype.
17161 (build_method_invocation, build_assignment, patch_assignment,
17162 patch_binop): New static function declarations.
17163 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
17164 BUILD_EXPR_WFL): New macros.
17165 * parse.y (enum tree_code binop_lookup[]): New static for token to
17166 TREE_CODE lookup.
17167 (%union): Parser union has new sub-structure `operator'.
17168 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
17169 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
17170 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
17171 ASSIGN_ANY_TK): Tokens tagged `operator'.
17172 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
17173 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
17174 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
17175 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
17176 (assignment_operator:): Rule tagged `operator'.
17177 (expression_statement:): Re-installed default rule.
17178 (method_invocation:): Sub rules call build_method_invocation.
17179 (postfix_expression:): Don't attempt to resolve name here. Just
17180 return an ID.
17181 (multiplicative_expression:): Sub-rules build corresponding binop
17182 expression node.
17183 (additive_expression:, shift_expression:, and_expression:,
17184 exclusive_or_expression:, inclusive_or_expression:): Likewise.
17185 (assignment:): Sub rule invoke build_assignment.
17186 (assignment_operator:): Default rules on sub rules.
17187 (force_error): Added documentation on this variable.
17188 (declare_local_variables): Build initialization calling
17189 build_assignment.
17190 (expand_start_java_method): Removed unused rtx declaration. Mark
17191 arguments as already initialized.
17192 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
17193 (java_complete_expand_methods): Don't process next method if
17194 completion of the previous one triggered errors.
17195 (java_complete_expand_method): Call source_end_java_method if no
17196 error were found during completion.
17197 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
17198 locals declaratilon. Handle names found within a class. Return
17199 error_mark_node when things aren't found.
17200 (patch_method_invocation_stmt): Return error_mark_node on failures.
17201 (patch_invoke): Removed unused local. Return the correct node.
17202 (java_complete_tree): Now returns a value. The BLOCK section binds
17203 local identifiers and the type of a BLOCK is now void. Assign the
17204 result of operand completion on COMPOUND_EXPR. Assign the
17205 encapsulated node of a WFL to the result of its completion, except
17206 when the node is an identifier. Now handle MODIFY_EXPR and several
17207 binary operators. Return error_mark_node on errors.
17208 (build_method_invocation, build_assignment, patch_assignment,
17209 build_binop, operator_string, patch_binop): New functions.
17210 * typeck.c (binary_numeric_promotion): New function.
17211
17212 1998-05-21 Per Bothner <bothner@cygnus.com>
17213
17214 * class.c (identifier_subst): New convenience wrapper for ident_subst.
17215 Replace most uses of ident_subst by identifier_subst.
17216
17217 * class.c (push_class_static_dummy_field): Removed function.
17218 (build_class_ref): Find Class object decl by looking up "CNAME.class",
17219 instead of looking got "class" static field. Create that decl here.
17220 (class_identifier_node): Removed; no longer needed.
17221 (init_class_processing): Don't init class_identifier_node.
17222 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
17223 Do nreverse 0 times (instead of twice) for Object and Class.
17224 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
17225
17226 1998-05-20 Per Bothner <bothner@cygnus.com>
17227
17228 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
17229 while initializing linenumber_count and linenumber_table.
17230 Do it before init_function_start (which calls emit_line_note).
17231 * expr.c (expand_byte_code): Don't need to clear lineno here.
17232
17233 1998-05-18 Tom Tromey <tromey@cygnus.com>
17234
17235 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
17236 then mangle number as _N_.
17237
17238 * class.c (mangle_class_field): New function.
17239 (build_class_ref): Set assembler name of class reference using
17240 mangle_class_field.
17241 (push_class_static_dummy_field): Likewise.
17242
17243 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
17244
17245 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
17246 of assigning to TREE_CODE. The latter method exploits a feature
17247 of GCC that is not ANSI compliant.
17248
17249 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17250
17251 * decl.c (pushdecl_force_head): New function.
17252 (pushlevel): Removed conditional printf.
17253 (complete_start_java_method): Don't enter local variable scope if
17254 function is compiled from source code.
17255 * expr.c: parse.h now included
17256 (java_lang_expand_expr): New function.
17257 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
17258 printf. Terminate buffer when doing directories.
17259 * jcf-parse.c (parse_source_file): Call lang_init_source before
17260 parsing and before code generation.
17261 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
17262 use printf if the macro is defined.
17263 * lang.c (lang_init): Install lang_expand_expr hook on
17264 java_lang_expand_expr.
17265 (java_dummy_print): New function.
17266 (lang_init_source): New function.
17267 * lex.c (java_lex): Remember location of an opening brace at the
17268 second nesting level.
17269 (java_is_eol): Unget character seen after a CR if it is EOF.
17270 * parse.h: Now includes lex.h
17271 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
17272 printf if the macro is defined.
17273 (expand_start_java_method, build_expr_block, enter_block,
17274 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
17275 New static function declarations.
17276 (pushdecl_force_head): New extern function declaration.
17277 (INCOMPLETE_TYPE_P): New macro.
17278 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
17279 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
17280 BLOCK_EXPR_ORIGIN): New macros.
17281 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
17282 DECL_SOURCE_LINE_LAST): New macros.
17283 (struct parser_ctxt): Removed field current_method_decl, redundant
17284 with the field current_function_decl. Added fields
17285 first_ccb_indent1 and pending_block.
17286 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
17287 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
17288 tagged <node>
17289 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
17290 (compilation_unit:): Cosmetic on sub rule.
17291 (type_declaration:): Cosmetic on sub rules. Added an error rule.
17292 (variable_initializer:): Installed default rule on expression:.
17293 (method_declaration:): method_header: starts a new
17294 method. method_body: installs the function body, absorbs blocks
17295 emitted for temporary variable scopings, pops function's body block
17296 and merges function's last statement lineno in DECL_SOURCE_LINE.
17297 (method_body:): Installed default rules.
17298 (block:): Call enter_block when an opening brace is seen. Absorb
17299 scoping blocks and call exit_block when a closing brace is seen.
17300 (block_statement:): Cosmetic changes.
17301 (method_invocation:): Create WFL around CALL_EXPR node.
17302 (patch_stage): Added comment around definition.
17303 (method_header): Try to use first_ccb_indent1 as the first line of
17304 the method, so BP debug info are emitted at the first opening
17305 brace of the function. If the function has no body, use the
17306 location of the function's name. Override currently defined method
17307 name with the matching WFL so we can point redefinition errors
17308 using the location where the function's name was declared.
17309 (check_abstract_method_header): Interprets DECL_NAME as an
17310 identifier or as a WFL, accordingly.
17311 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
17312 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
17313 location and name information out of it and reinstall DECL_NAME to
17314 its original identifier node value.
17315 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
17316 function's source code).
17317 (read_import_dir): Test the value returned by find_class and issue
17318 a fatal accordingly.
17319 (declare_local_variables): Push a new block for the scope of the
17320 new variable(s) if code has been already generated at that nesting
17321 level. Pinpoint redefinition errors using the variable id
17322 WFLs. Generate initialization code if necessary. If the variable
17323 type is incomplete, register a patch on its decl.
17324 (source_start_java_method): Rewritten. Define a new block for the
17325 function's parameters. Build parameter decl out of function's
17326 arguments and register them for a patch if their types are
17327 incomplete.
17328 (expand_start_java_method): Includes the part of
17329 source_start_java_method that was pushing the parameter decls and
17330 completing the method start code.
17331 (source_end_java_method): Removed call the expand_end_bindings and
17332 poplevel (already taken care of). Reinstall function's arguments
17333 and get function's last line of code before calling
17334 expand_function_end.
17335 (java_method_add_stmt): New comment before the function's
17336 code. Complement the second operand of the current COMPOUND_EXPR
17337 if necessary.
17338 (java_complete_expand_methods): Don't generate debug info on line
17339 zero when expanding a generated constructor.
17340 (java_complete_expand_method): Set start and end line numbers for
17341 a artificially generated constructor to one and manually call
17342 enter_block and exit_block when defining it. For all methods:
17343 expand function's start calling the new expand_start_java_method
17344 and invoke java_complete_tree on the effective method's body, if
17345 any.
17346 (resolve_expression_name): Now use lookup_name_in_blocks to search
17347 local variable decls and print out an error when variables are
17348 undefined.
17349 (patch_method_invocation_stmt): Inserted comment before the
17350 function's code.
17351 (lookup_method_invoke): Chain method's arguments using chainon
17352 with the current arg list as a second argument. Inserted missing
17353 IDENTIFIER_POINTER when reporting an error on methods not found.
17354 (refine_accessible_methods_list): Don't retain constructors.
17355 (patch_arguments): Function removed.
17356 (java_complete_tree): Inserted comment before the function's
17357 code. New case for BLOCKs. Moved the WFL case a bit
17358 further. Complete function's arguments.
17359 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
17360 maybe_absorb_scoping_blocks): New functions.
17361
17362 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
17363
17364 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
17365 previously set.
17366 * jcf-parse.c (parse_source_file, java_error_count): New forward
17367 and extern declarations.
17368 (java_parse_abort_on_error): Macro moved.
17369 (jcf_parse_source): fatal called if fopen fails. Now calls
17370 parse_source_file.
17371 (parse_source_file): New parse_only parameter. Reflects the
17372 elimination of the second pass.
17373 (yyparse): parse_source_file called with argument set to 0.
17374 * jcf.h (JCF_ZERO): Sets java_source to zero.
17375 * lex.c (java_init_lex): pass argument is gone. Function modified
17376 to be called once during the analysis of a file.
17377 (java_unget_unicode): Fixed typo in fatal message.
17378 (java_get_line_col): Likewise.
17379 (java_lval): Likewise. String literals no longer built during
17380 second pass.
17381 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
17382 account.
17383 * parse.h (MODIFIER_WFL): New macro.
17384 (parse_check_super, parser_check_super_interface): Now return int.
17385 (parser_chain_incomplete_item, not_builtin_p,
17386 complete_method_decl): Declarations removed.
17387 (build_method_invocation_stmt, build_invoke): Renamed using the
17388 `patch' instead of `build'
17389 (register-incomplete_type, obtain_incomplete_type,
17390 java_complete_tree, java_complete_expand_method,
17391 unresolved_type_p, create_jdep_list): New function declarations.
17392 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
17393 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
17394 (jdep): New typedef on new struct _jdep.
17395 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
17396 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
17397 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17398 JDEP_RESOLVED_P): New macros.
17399 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
17400 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
17401 JDEP_VARIABLE): New enum values and jdep kinds.
17402 (jdeplist): New typedef on struct _jdeplist.
17403 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
17404 macros.
17405 (CALL_EXPR_PRIMARY): New macro.
17406 (struct parser_ctxt): Fields java_pass, current_method_decl,
17407 method_decl_list deleted. New field jdeplist.
17408 (INCOMPLETE_P): Macro deleted.
17409 * parse.y (single_type_import_declaration:): Removed pass switch.
17410 (type_import_on_demand_declaration): Likewise.
17411 (field_declaration:): Removed pass switch on all sub rules.
17412 (class_declaration:): Call the complete_class_decl removed on
17413 class_body rules.
17414 (method_declaration:): Removed second pass switch. No longer chain
17415 methods decl when method_header reduced.
17416 (method_header:): Sub rules no longer depend on pass switch.
17417 (method_declarator:): Likewise.
17418 (method_body:): Likewise.
17419 (abstract_method_declaration:): Likewise.
17420 (block_statement:): Likewise.
17421 (local_variable_declaration:): Likewise.
17422 (argument_list:): Likewise.
17423 (method_invocation:): Likewise. Call to build_method_invocation_stmt
17424 removed. Partial CLASS_EXPR tree node built instead.
17425 (postfix_expression:): Removed pass switch on all sub rules.
17426 (java_pop_parser_context): Free classd_list content.
17427 (yyerror): Call obstrack_grow0 to finalize error message.
17428 (check_class_interface_creation): Comment modified to reflect new
17429 returned value meaning. Removed second pass switch. Return 1 if an
17430 error was found, 0 otherwise. Adjust pointer on filename if a
17431 leading path separator was found.
17432 (maybe_create_class_interface_decl): Removed first pass switch
17433 when linking the class decl to the class_list. Install a new
17434 jdep_list for the class.
17435 (add_superinterfaces): List of unresolved interfaces is
17436 gone. Unresolved interfaces are directly added to the current
17437 dependencies list.
17438 (create_interface): Second pass shortcut removed.
17439 ctpx->modifier_ctx access through MODIFIER_WFL.
17440 (create_class): Second pass shortcut removed. Call to
17441 register_incomplete_type replaces the call to
17442 parser_chain_incomplete_item.
17443 (complete_class_decl): Function removed.
17444 (duplicate_declaration_error): New way of retrieving redeclared
17445 item type.
17446 (register_fields): Call to lookup_modifier_cl replaced by
17447 MODIFIER_WFL. New way of handling unresolved type, using
17448 unresolved_type_p and obtain_incomplete_type.
17449 register_incomplete_type replaces call to parser_chain_incomplete_item.
17450 (patch_stage): New static global variable.
17451 (method_header): New way of handling unresolved type, using
17452 unresolved_type_p and obtain_incomplete_type. patch_stage used to
17453 indicates that the method decl needs to be patched.
17454 (check_abstract_method_header): Call to lookup_modifier_cl
17455 replaced by MODIFIER_WFL.
17456 (method_declarator): Incomplete argument type are registered
17457 calling register_incomplete_type. Patch on the declared method is
17458 issued in that case.
17459 (unresolved_type_p): New function.
17460 (parser_check_super_interface): New comment to reflect function's
17461 modified returned type (int). Function and has a new argument
17462 this_wfl. Call to parse_error_context uses this_wfl instead of
17463 relying on lookup_cl.
17464 (parser_check_super): Comment reflects function's new returned
17465 type (int). Function returns nonzero value on error.
17466 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
17467 register_incomplete_type, jdep_resolve_class): New functions to
17468 handle incomplete types in declarations.
17469 (java_complete_class): Rewritten to work with the new incomplete
17470 type handling scheme.
17471 (complete_class_report_errors): Likewise.
17472 (complete_method_decl): Removed: it jobs is now handled by
17473 java_complete_class.
17474 (do_resolve_class): Class loaded in not already loaded and not
17475 found in Java source code.
17476 (java_check_regular_methods, java_check_abstract_methods): Don't
17477 call complete_method_decl anymore.
17478 (lookup_modifier_cl, not_builtin_p): Functions deleted.
17479 (read_import_dir): Got rid of the pass number dependency.
17480 (declare_local_variables): New handling of unresolved types (patch
17481 issued).
17482 (source_start_java_method): New parameter level. Function called
17483 with level set to 1 when argument types are potentially
17484 unresolved. Called to complete the job with level set to 2 once
17485 types are complete.
17486 (source_end_java_method): Call to permanent_allocation
17487 removed. Waiting to be replaced by a more suitable obstack
17488 management.
17489 (java_complete_expand_methods, java_complete_expand_method,
17490 java_expand_finals): New functions.
17491 (build_method_invocation_stmt): Renamed
17492 patch_method_invocation_stmt. Extracts function call expression
17493 (wfl) and arguments (args) from CALL_EXPR tree operands.
17494 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
17495 call. Patch the function and argument operand of the CALL_EXPR
17496 tree argument.
17497 (patch_argument, java_complete_tree): New functions.
17498
17499 1998-04-20 Per Bothner <bothner@cygnus.com>
17500
17501 Recover from missing fields and methods (i.e. error instead of fatal).
17502 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
17503 * expr.c (expand_invoke): Recover from missing method.
17504 (expand_java_field_op): Recover from missing field.
17505 Inline references to java.lang.{Integer,Char,...}.TYPE.
17506 * typeck.c (get_type_from_signature), java-tree.h: New function.
17507 * class.c (add_method): Use get_type_from_signature.
17508 (build_class_ref): Handle a class that was not found.
17509 * typeck.c (convert): Handle conversion to pointers (for convenience).
17510 * verify.c (verify_jvm_instructions): Use get_type_from_signature
17511 instead of lookup_field to handle missing fields.
17512
17513 * jcf-parse.c (process_zip_dir): Set java_source.
17514
17515 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
17516
17517 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
17518
17519 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17520
17521 * jcf-parse.c (load_class): Don't change input_filename before
17522 calling jcf_parse_source (but still do it before calling
17523 jcf_parse).
17524 (jcf_parse_source): Assign input_filename after having saved the
17525 parser context.
17526 * lex.c (java_init_lex): Chain a WFL node to the import on demand
17527 list. ctxp->modifier_ctx zeroed according to its new
17528 definition. ctxp->filename initialized. Removed
17529 JAVA_MODIFIER_CTX_UNMARK.
17530 (java_unget_unicode): Update the character based column position.
17531 (java_allocate_new_line): ref_count not used anymore. Always free
17532 ctxp->p_line. Initialize c_line->char_col to 0.
17533 (java_get_unicode): Update the character based column position.
17534 (java_lex): Use ctxp->elc to store current position in source
17535 file, at the beginning of the parsed token. Set modifier_ctx entry
17536 corresponding to the parse modifier to a WFL node. Return a WFL
17537 node when an identifier is parsed.
17538 (java_lex_error): Now uses ctxp->elc to store current position in
17539 source.
17540 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
17541 * lex.h (build_wfl_node): New function definitions.
17542 (struct java_line): ref_count and next fields are gone. New field
17543 char_col.
17544 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17545 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
17546 (JAVA_COLUMN_DELTA): New macro.
17547 (java_lc): New typedef on new struct _java_lc.
17548 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
17549 (parse_error_context, parse_warning_context): Changed prototypes.
17550 (java_get_line_col): Added as an available global function.
17551 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
17552 (IC_DECL): Replaced by macro IC_TYPE
17553 (DEPEND_WFL): New macro.
17554 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
17555 wrong modifier.
17556 (exit_java_complete_class): Removed a commented out statement.
17557 (struct parser_ctxt): Added comments on fields. modifier_ctx is
17558 now an array of tree nodes. Deleted fields line_list and
17559 e_line. New field elc, to replace e_line.
17560 * parse.y (array_type:): Build WFL node.
17561 (qualified_name:): Build a single WFL node out of two. Retain
17562 the location information of the first node in the resulting node.
17563 (package_declaration:): Use package name as a WFL node
17564 (single_type_import_declaration:): Use imported name as a WFL node.
17565 (type_import_on_demand_declaration:): Use root of the imported
17566 packages as a WFL node.
17567 (field_declaration:): Removed unused local variable cl.
17568 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
17569 (yyerror): New static elc. Removed static error_line, error_pos.
17570 New local code_from_source. Save ctxp->elc into elc at the first
17571 pass. Call java_get_line_col to get a string of the line where
17572 the error occurred.
17573 (debug_line): Removed static function.
17574 (parse_error_context, parse_warning_context): Parameter cl is now
17575 a WFL node. Use its value to initialize ctxp->elc.
17576 (redefinition_error): Parameter cl is now a WFL node.
17577 (parse_add_interface): New parameter wfl. No longer call
17578 lookup_cl, use wfl instead.
17579 (check_class_interface_creation): Parameter cl is now a WFL node.
17580 (maybe_create_class_interface_decl): Likewise.
17581 (add_superinterfaces): New function.
17582 (create_interface): Removed local cl, node, super_decl,
17583 super_decl_type. Function now uses id as a WFL node. Better
17584 warning/error report on obsolete or forbidden mix of
17585 modifiers. Now calls add_superinterfaces to register interfaces.
17586 (create_class): Removed local cl, node. Local variable id is used
17587 as a WFL node. Better error report on forbidden modifier
17588 mix. Uses add_superinterfaces to register interfaces.
17589 (find_field): Argument cl is now a WFL node. Now store the WFL
17590 node of a fields that needs to be checked for their
17591 initialization.
17592 (method_header): Local variable node non longer used. Local
17593 variable id replaces cl.
17594 (check_modifiers_consistency): Local variable cl is now a WFL
17595 node.
17596 (method_declarator): Local variable cl replaced by parameter id.
17597 (parser_qualified_name): Now uses parameter name as a WFL node.
17598 (parser_check_super_interface): New parameter wfl, for achieve
17599 greater accuracy during error reports.
17600 (parser_chain_incomplete_item): New parameter named location. Used,
17601 along the decl, to construct the incomplete item node.
17602 (java_complete_class): resolve_class now uses WFL node extracted
17603 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
17604 where appropriate.
17605 (complete_method_decl): Unresolved function's argument types are WFL.
17606 (resolve_class): Parameter cl is now a WFL node.
17607 (resolve_and_layout): Likewise.
17608 (do_resolve_class): Likewise. Try first to use cl and then do the
17609 lookup on the decl when calling check_pkg_class_access.
17610 (complete_class_report_errors): Use IC_TYPE in place of
17611 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
17612 instead of doing a lookup over the decl.
17613 (java_check_final): Use WFL info from field tree list.
17614 (lookup_cl): Rewritten and returns a statically defined WFL node.
17615 (lookup_modifier_cl): Now uses information from WFL nodes.
17616 (process_imports): Likewise.
17617 (read_import_dir): name and cl arguments replaced by a single WFL
17618 node. Function modified accordingly.
17619 (find_in_imports_on_demand): Now uses WFL node.
17620 (check_pkg_class_access): cl argument is now a WFL node.
17621 (declare_local_variables): Fixed to use WFL nodes.
17622 (resolve_expression_name): Likewise.
17623 (build_method_invocation_stmt): name_combo argument renamed
17624 wfl. Function modified to use WFL nodes.
17625 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
17626 (lookup_method_invoke): cl is now a WFL node. Added missing
17627 IDENTIFIER_POINTER to class type decl name.
17628
17629 1998-04-14 Dave Brolley <brolley@cygnus.com>
17630
17631 * lang.c (init_parse): Now returns char* containing the filename.
17632
17633 1998-04-10 Per Bothner <bothner@cygnus.com>
17634
17635 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
17636
17637 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
17638 * class.c (make_class_data): If flag_assume_compiled, initial class
17639 state is CSTATE_PREPARED; make superclass and interfaces direct
17640 references, rather than constant pool indexes.
17641
17642 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
17643
17644 * parser.y: Include flags.h. Removed debug variable pl.
17645 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
17646 (block:): Likewise.
17647 (labeled_statement_nsi:): Generate debug info when reducing
17648 expression_statement:.
17649 (check_pkg_class_access): get_access_flags_from_decl invocation
17650 fixed for new CLASS_* flags location.
17651 (source_end_java_method): Save/restore parser context when
17652 entering/leaving this routine. Restore lineno to its right value
17653 before calling expand_end_bindings.
17654 (build_method_invocation_stmt): build_invoke called with the
17655 current line information.
17656 (build_invoke): New argument cl. Wrap the function call around a
17657 wfl node.
17658 (refine_accessible_methods_list): Changed comment, removed
17659 unnecessary code.
17660 * parse.h: Fixed typo in comments.
17661 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
17662 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
17663 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
17664 parser_ccb_indent.
17665 * lex.c (java_lex): Record the last closing curly bracket of a
17666 function.
17667 * jcf-parse.c (jcf_parse_source): Now calls
17668 java_check_methods. Clarified comment, fixed typo.
17669
17670 1998-04-09 Dave Brolley <brolley@cygnus.com>
17671
17672 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
17673 (finish_parse): Expose for non USE_CPPLIB builds.
17674
17675 1998-04-08 Jeffrey A Law (law@cygnus.com)
17676
17677 * lang.c (lang_print_xnode): New function.
17678
17679 1998-04-03 Per Bothner <bothner@cygnus.com>
17680
17681 * decl.c (class_dtable_decl), java-tree.h: New tree node.
17682 * class.c (get_dispatch_vector, get_dispatch_table): New functions
17683 used to build a class's dispatch table.
17684 (make_class_data): Generate dispatch table if flag_assume_compiled.
17685 Set dtable of class object to address of class_dtable_decl.
17686
17687 * decl.c (int_decl_processing): Make soft_badarrayindex_node
17688 be volatile and have side effects - generates better code.
17689
17690 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
17691 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
17692
17693 * expr.c (expand_invoke): If class is final, method is
17694 effectively final, so can call it directly.
17695
17696 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
17697
17698 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
17699
17700 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
17701
17702 * parse.y (build_method_invocation_stmt): Removed extra argument
17703 to build_invoke.
17704
17705 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17706
17707 * expr.c (dtable_indent): Now static global.
17708 (expand_invoke): Now call invoke_build_dtable and
17709 build_invokevirtual.
17710 (invoke_build_dtable, build_invokevirtual): New functions.
17711 * jcf-io.c (find_class): Defer issuing a warning by setting
17712 jcf->outofsynch to 1.
17713 * jcf-parse.c (jcf_out_of_synch): New function.
17714 (load_class): Test this_jcf.outofsynch flag and call
17715 jcf_out_of_synch accordingly.
17716 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
17717 comment indentation.
17718 * lex.c (java_get_unicode): Fixed code indentation.
17719 (java_lex): Create string literal. Fixed typo. Removed several
17720 premature obstack_free.
17721 * parse.h: New enums for name resolution and invocation mode.
17722 (struct qualification): New data structure.
17723 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
17724 (do_resolve_class, build_method_invocation_stmt,
17725 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
17726 debug_line, identical_subpath_p, invocation_mode,
17727 refine_accessible_methods_list, build_invoke,
17728 lookup_method_invoke): New functions declared.
17729 (build_invokevirtual, invoke_build_dtable, match_java_method,
17730 build_field_ref, jcf_out_of_synch): New references to external
17731 functions.
17732 (struct parse_ctxt): Removed artificial_constructor field.
17733 * parse.y: (array_type:): Type defined for this rule.
17734 (class_type:): Installed default rule for interface_type:.
17735 (array_type:): Now build Java array type.
17736 (qualified_name:): Now use obstack_grow0.
17737 (method_declaration:): Skip the artificial constructor added to
17738 the list, if any.
17739 (abstract_method_declaration:): Execute the code only during pass 1.
17740 (block:): Installed default rule in block_statements:.
17741 (block_statement:): Add the statement to the method during pass 2.
17742 (statement_expression): Installed default rule for
17743 method_invocation:.
17744 (argument_list:): Added code to build the argument list.
17745 (method_invocation:): Added call to create the method invocation
17746 node.
17747 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
17748 (debug_line): New function for debug.
17749 (complete_class_decl): No longer do something during pass 1.
17750 (method_header): Use BUILD_PTR_FROM_NAME.
17751 (parser_qualified_classname): Use obstack_grow0. Removed bogus
17752 obstack_free.
17753 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
17754 function's main comment.
17755 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
17756 classes.
17757 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
17758 (resolve_class): Now works with arrays.
17759 (do_resolve_class, resolve_and_layout): New functions.
17760 (java_check_regular_methods): Reverse method list before and after
17761 having processed it. No longer set ctxp->artificial_constructor.
17762 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
17763 accordingly. Fixed typo in issued error message. Now use
17764 obstack_grow0.
17765 (find_in_imports_on_demand): Now use obstack_grow0.
17766 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
17767 (source_end_java_method): Call expand_expr_stmt instead of
17768 expand_expr. Calls it before calling expand_function_end.
17769 (java_method_add_stmt): Do nothing if errors were found during
17770 parsing.
17771 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
17772 (build_method_invocation_stmt, build_invoke, invocation_mode,
17773 lookup_method_invoke, refine_accessible_methods_list,
17774 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
17775 New functions.
17776 * typeck.c (build_java_signature): Properly end method signature
17777 if return type skipped.
17778 (match_java_method): New function.
17779
17780 1998-03-16 Per Bothner <bothner@cygnus.com>
17781
17782 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
17783
17784 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
17785
17786 * expr.c (build_invoke_non_interface): New function.
17787 (methods_ident, ncode_ident): Now static globals.
17788 (expand_invoke): Use build_invoke_non_interface.
17789 * java-tree.h (struct lang_decl): New field function_decl_body.
17790 (DECL_FUNCTION_BODY): New macro.
17791 * jcf-parse.c (jcf_parse_source): Deeper check before setting
17792 CLASS_FROM_SOURCE_P.
17793 (parse_source_file): Fixed typos. Call java_layout_parsed_class
17794 before starting pass 2. Call to java_generate_parsed_class replaced
17795 by java_register_parsed_class.
17796 * lex.c: Fixed typo in header. Some line width related formating.
17797 * lex.h: Some line width related formating.
17798 * parse.h (source_end_java_method, resolve_expression_name,
17799 complete_class_decl, maybe_create_class_interface_decl,
17800 check_class_interface_creation): New static function declarations.
17801 (java_layout_parsed_class, java_method_add_stmt): New function
17802 declarations.
17803 (struct parser_ctxt): Field mark_class_generate removed. New
17804 fields class_list and artificial_constructor.
17805 * parse.y: Fixed typo in header.
17806 (class_declaration:): Call complete_class_decl when class body
17807 parsed.
17808 (method_declaration:): Call source_end_java_method in pass 2 when
17809 the method body is defined.
17810 (postfix_expression:): Do expression name resolution on sub-rule
17811 name during pass 2.
17812 (create_class, create_interface): Merged common pieces.
17813 (check_class_interface_creation, maybe_create_class_interface_decl):
17814 New functions.
17815 (complete_class_decl): New function.
17816 (register_fields): Fixed line width related typo.
17817 (method_header): Correctly skip first argument when fixing
17818 argument line. Changed the loop.
17819 (java_check_circular_reference): Now use ctxp->class_list.
17820 (java_complete_class): Removed start/stop marking.
17821 (java_check_regular_methods): Now takes a class decl as an
17822 argument. Add default constructor if none were encountered.
17823 (java_check_methods): Now use ctxp->class_list. Changed call to
17824 java_check_regular_methods.
17825 (source_start_java_method): Set DECL_ARG_TYPE for each function
17826 arguments.
17827 (source_end_java_method, java_method_add_stmt): New functions.
17828 (java_generate_parsed_class): No longer exists.
17829 (java_layout_parsed_class, java_register_parsed_class): New functions.
17830 (resolve_expression_name): New function.
17831
17832 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
17833
17834 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
17835 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
17836 until pass initializations are done. Call read_import_dir with
17837 pass set to 0.
17838 * parse.h: (lookup_modifier_cl): New function declared.
17839 (INTERFACE_FIELD_MODIFIERS): New macro.
17840 (OBSOLETE_MODIFIER_WARNING): New macro.
17841 * parse.y: (register_fields): Class type and current field name in
17842 local variables. Check modifier(s) if adding field(s) to an interface.
17843 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
17844 and report errors using the faulty modifier line context.
17845 (lookup_modifier_cl): New function.
17846 (read_import_dir): Detect and report default import processing
17847 failure.
17848
17849 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
17850
17851 Add a pair of -fassume-compiled/-fno-assume-compiled options.
17852 * class.c (is_compiled_class): Return 1 after making sure it
17853 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
17854 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
17855 * java-tree.h (flag_assume_compiled): Add decl.
17856 * lang.c (lang_f_options): Add the flag.
17857 (flag_assume_compiled): Add decl, default to 0.
17858
17859 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
17860
17861 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
17862 (is_compiled_class): Likewise.
17863 (layout_class): Likewise.
17864 (layout_class): Detect and lay out classes defined in source code.
17865 (interface_of_p, add_interface_do, may_add_interface): New
17866 function.
17867 (add_interface): Now use add_interface_do.
17868 (add_method_1): New function.
17869 (add_method): Now use add_method_1.
17870 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
17871 (complete_start_java_method): New function.
17872 (start_java_mehod): Now call complete_start_java_method.
17873 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
17874 (expand_invoke): Likewise and fixed typo.
17875 *gjava.c: (print_super_field): Use new argument to find_class
17876 DO_CLASS_FILE.
17877 (main): Likewise.
17878 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
17879 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
17880 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
17881 IDENTIFIER_NODE.
17882 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
17883 (add_method_1, push_class): New prototypes.
17884 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
17885 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
17886 directory where the class was found.
17887 (find_class): New argument DO_CLASS_FILE. Function find_class
17888 modified accordingly.
17889 *jcf-parse.c: (fix_class_path): New function.
17890 (load_class): Use new VERBOSE argument. load_class now finds and
17891 loads/parses .class/.java files. Save read_state of current_jcf
17892 if necessary.
17893 (java_parser_abort_on_error): New macro.
17894 (jcf_parse_source, parse_source_file): New function.
17895 (jcf_parse): Fixed typo.
17896 (yyparse): Call parse_source_file () only.
17897 (process_zip_dir): Fixed typo, fix zdir->filename_length when
17898 writing the real class name back in the zip directory entry.
17899 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
17900 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
17901 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
17902 (find_class): Prototype fixed.
17903 *lex.c: Added 1998 time stamp.
17904 Removed all static global variables, moved into the parser
17905 context data structure.. Now include unistd.h if SEEK_SET not
17906 defined.
17907 (java_init_lex): Rewritten.
17908 (java_sneak_unicode): Modified current unicode access in current line.
17909 (java_unget_unicode): Likewise.
17910 (java_allocate_new_line): New allocation management.
17911 (java_read_char): Modified access and storage of unget_utf8_value.
17912 New way of processing current unicode.
17913 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
17914 (java_get_unicode): Now use the parser context.
17915 (java_lineterminator): Likewise.
17916 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
17917 of the reentrant parser implementation. Function now use the
17918 parser context data structure and java_lval. Fixed production of
17919 the float and double constant "out of range" error message. Fixed
17920 obstack use. Return integer value when hitting a modifier. Now
17921 return type for TRUE, FALSE and other predefined types. Return
17922 identifier as a TREE_LIST list containing the current line context
17923 as the TREE_VALUE sub-node.
17924 (java_unicode_2_utf8): Fixed typo in declaration.
17925 (java_lex_error): Now use the parser context data structure.
17926 *lex.h: Added 1998 time stamp.
17927 (struct java_line): New fields ref_count and next.
17928 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
17929 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
17930 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
17931 *parse.h: Added 1998 time stamp.
17932 (java_parse_source_file): Renamed from parse_source_file.
17933 (YYERROR_NOW, YYNOT_TWICE): Fixed.
17934 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
17935 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
17936 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
17937 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
17938 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
17939 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
17940 (struct parser_ctxt): New data structure to keep the parser context.
17941 *parse.y: Added 1998 time stamp, got rid of static global variables.
17942 (java_error_count, ctxp): New global variables.
17943 (%union): New value field.
17944 (numeric_type, integral_type): Rules removed.
17945 (primitive_type): Rule defined to handle integral, float, double and
17946 boolean types.
17947 (qualified_name, package_declaration,
17948 single_type_import_declaration, type_import_on_demand_declaration,
17949 modifiers, class_declaration, super, interfaces,
17950 interface_type_list, class_body, field_declaration,
17951 field_declaration, variable_declarators, variable_declarator,
17952 variable_declarator_id, method_declaration, method_header,
17953 formal_parameter_list, formal_parameter, method_body, block,
17954 static, interface_declaration, extends_interfaces,
17955 abstract_method_declaration, local_variable_declarators): Rules now
17956 define actions.
17957 (force_error, do_warning): New global statics.
17958 (push_parser_context, parser_context_save_global,
17959 parser_context_restore_global, pop_parser_context): New functions.
17960 (yyerror): Now uses the global parser context. Fixed use of obstack.
17961 (parse_error, parse_error_context, parse_warning_context,
17962 java_accstring_lookup, redefinition_error, check_modifiers,
17963 parser_add_interface, create_interface, create_class, find_field,
17964 duplicate_declaration_error, register_fields, method_header,
17965 check_modifiers_consistency, check_abstract_method_header,
17966 method_declarator, parser_qualified_classname,
17967 parser_check_super_interface, parser_check_super,
17968 parser_chain_incomplete_item, java_check_circular_reference,
17969 layout_class_from_source, java_complete_class,
17970 complete_method_decl, resolve_class, complete_class_report_errors,
17971 java_check_final, check_method_redefinition,
17972 java_check_regular_methods, java_check_abstract_methods,
17973 java_check_methods, lookup_java_interface_method2,
17974 lookup_java_method2, lookup_cl, find_name_in_single_imports,
17975 process_imports, find_in_imports, read_import_entry,
17976 read_import_dir, find_in_imports_on_demand,
17977 check_pkg_class_access, not_builtin_p, declare_local_variables,
17978 source_start_java_method, java_generate_parsed_class): New
17979 functions.
17980 *typeck.c: (signature_include_return): New global variable.
17981 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
17982 to add the function returned type in the signature.
17983
17984 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
17985
17986 * jcf-io.c (open_in_zip): Use strncmp and LEN.
17987
17988 1998-01-29 Dave Brolley <brolley@cygnus.com>
17989
17990 * Make-lang.in (java.info): Added.
17991 (java.install-info): Added
17992
17993 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
17994
17995 * Makefile.in (clean): Also remove java/parse.c.
17996
17997 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
17998
17999 Add a pair of -fbounds-check/-fno-bounds-check options.
18000 * lang.c (lang_decode_option): Add code to grok arguments.
18001 (flag_bounds_check): Add decl.
18002 (lang_f_options): New array w/ the option in it.
18003 * java-tree.h (flag_bounds_check): Add decl.
18004 * lang-options.h: New file.
18005 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
18006 of a static macro value.
18007 (JAVA_ARRAY_EXCEPTION): Delete macro.
18008
18009 1998-01-23 Per Bothner <bothner@cygnus.com>
18010
18011 * typeck.c (build_java_array_type): Fix two bugs in previous change.
18012 * expr.c (build_anewarray): Add missing promote_type.
18013
18014 1998-01-22 Per Bothner <bothner@cygnus.com>
18015
18016 Add array types with known length to optimize bounds checking.
18017 * typeck.c (build_java_array_type): Take length parameter.
18018 (java_array_type_length, build_prim_array_type): New functions.
18019 * java-tree.h: Update for new functions.
18020 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
18021 * class.c: Use build_prim_array_type.
18022 * expr.c (can_widen_reference_to): Handle known-length array types.
18023 (verify_jvm_instructions): Keep track of integer push instructions
18024 followed by newarray/anewarray, so we can build known-length arrays.
18025 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
18026 (java_array_data_offset): New function.
18027 (build_java_array_length_access): New function. Optimize if constant.
18028 (build_java_arrayaccess): Constant fold bounds check.
18029 (expand_java_newarray, expand_java_anewarray): Replaced by ...
18030 (build_newarray, build_anewarray): New functions.
18031 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
18032 * verify.c (merge_types): Handle known-lengh array types.
18033
18034 1998-01-19 Per Bothner <bothner@cygnus.com>
18035
18036 * expr.c (expand_byte_code): Fix performace bug, which caused
18037 searching linenumber_table to be linear rather than constant.
18038
18039 1997-12-12 Per Bothner <bothner@cygnus.com>
18040
18041 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
18042
18043 * decl.c, java-tree.h (soft_fmod_node): New global.
18044 * decl.c (init_decl_processing): Define __builtin_fmod.
18045 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
18046 using __builtin_fmod.
18047
18048 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
18049
18050 * keyword.h: New file, output of keyword.gperf as processed by
18051 gperf.
18052 * lex.c (java_lex_init): Initialize java_error_flag.
18053 * parse.c (YYERROR_NOW): Uses java_error_flag.
18054 * parse.y: New static java_error_flag. Useless definition of
18055 buffer_error gone.
18056 * parse.y (java_error): Portable error recovery using
18057 java_error_flag (not yet completely tuned).
18058
18059 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
18060
18061 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
18062
18063 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18064
18065 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
18066 (parse.c, lex.c, keyword.h): New rules for Java source code
18067 front-end.
18068 * parse.c: Renamed into jcf-parse.c.
18069 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
18070 * keyword.gperf: New file, Java keywords.
18071 * parse.y: New file, Java language grammar.
18072 * parse.h: New file, Java language grammar definitions.
18073 * lex.c: New file, Java language lexer.
18074 * lex.h: New file, Java language lexer definitions.
18075
18076 1997-12-03 Per Bothner <bothner@cygnus.com>
18077
18078 * decl.c (clinit_identifier_node), java-tree.h: New global.
18079 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
18080 * verify.c (verify_jvm_instructions): Inline use of removed macros.
18081 * expr.c (expand_java_field_op): Check for invalid assignment
18082 to final field.
18083
18084 * jcf-reader.c (get_attribute): Test for wrong attribute length.
18085
18086 1997-10-27 Per Bothner <bothner@cygnus.com>
18087
18088 * verify.c (verify_jvm_instructions): When processing a handler,
18089 attempt to set the current_subr to the right value.
18090 (More complicated code combines Sep 17 and Oct 22 versions.)
18091
18092 1997-10-24 Per Bothner <bothner@cygnus.com>
18093
18094 * class.c (push_class): Figure out (guess) name of source file.
18095 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
18096 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
18097 (parse_class_file): Change return type from int to void.
18098 Call debug_start_source_file/debug_end_source_file.
18099
18100 * expr.c (build_java_binop): Fix masking 2nd operand.
18101 * decl.c (init_decl_processing): Set sizetype first.
18102
18103 1997-10-22 Per Bothner <bothner@cygnus.com>
18104
18105 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
18106 (Revert Sep 17 change.)
18107
18108 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
18109
18110 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
18111 .class extension in their name and fix thing so we don't process
18112 them parse_zip_file_entries().
18113 (parse_zip_file_entries): Cleaned unused local variables.
18114
18115 1997-10-20 Per Bothner <bothner@cygnus.com>
18116
18117 * expr.c (can_widen_reference_to): Allows equal array element types.
18118 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
18119 * jcf-dump.c (RET): Get (and print) index.
18120
18121 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
18122 Promote element type to POINTER_TYPE.
18123
18124 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18125
18126 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
18127 find_in_current_zip, jcf_figure_file_type): Moved from
18128 jcf-reader.c to parse.c.
18129 * zextract.c: (read_zip_archive): takes file_comment_length possible
18130 field into account.
18131
18132 1997-10-20 Per Bothner <bothner@cygnus.com>
18133
18134 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
18135
18136 * verify.c (merge_types): Handle array types even better ...
18137
18138 1997-10-17 Per Bothner <bothner@cygnus.com>
18139
18140 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
18141
18142 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
18143 * class.c (make_class_data): Don't build fields_decl if no fields.
18144 When building fields_decl, skip if DECL_ARTIFICIAL.
18145
18146 * expr.c (java_stack_swap): Update stack_type_map.
18147 * verify.c (merge_types): Handle array types better.
18148
18149 1997-10-15 Per Bothner <bothner@cygnus.com>
18150
18151 * class.c (add_field): Don't promote short integral fields to
18152 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
18153 * expr.c (push_value): Promote and convert short integral values.
18154
18155 * decl.c, java-tree.h (integer_two_node): New constant node.
18156 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
18157
18158 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
18159
18160 * class.c (append_gpp_mangled_type): Use function argument
18161 unpromoted type to generate mangled name.
18162
18163 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
18164
18165 * constants.c (build_constant_data_ref): Now uses current_class
18166 instead of main_class.
18167 (build_constants_constructor): Now uses current_class instead of
18168 main_class.
18169 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
18170 of the global variable SeepZipFiles done here.
18171 * zextract.c (read_zip_archive): extra_field optional field taken
18172 into account while computing the position of the class file in the
18173 archive.
18174 * verify.c (verify_jvm_instructions): Use current_jcf to search
18175 the constant pool.
18176 * parse.c (load_class): First search for the class to load in the
18177 current zip file. Saves current_jcf (restored before returning
18178 from that function). Don't call JCF_FINISH in the class was found
18179 in the current ZIP file.
18180 (jcf_parse): If the class was found in the current ZIP file, save
18181 its tree_constant_pool (for later reuse).
18182 (parse_class_file): New function. Process each method defined in
18183 the current class and record the class as to be later registered.
18184 (yyparse): Rewritten. Figure the type of the current file and switch
18185 accordingly.
18186 * lang.c: New global variable current_jcf.
18187 (lang_init): Removed compiling_from_source test (done later, in
18188 yyparse). Removed call the jcf_parse ().
18189 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
18190 (typedef struct JCF): New fields seen_in_zip (to mark a class found
18191 in the current ZIP file) and zip_offset (offset to the class data in
18192 the current zip file).
18193 * jcf-reader.c: zipfile.h included.
18194 localToFile: New ZipFileCache static global variable
18195 (parse_zip_file_entries): New function. Browse the current ZIP
18196 file directory and process each class found.
18197 (process_zip_dir): New function. Register each class found in the
18198 ZIP file directory. The class aren't parsed but a valid JCF is
18199 link to each of them.
18200 (find_in_current_zip): New function. Search for a class in the
18201 current ZIP file directory. If found, prepare the class so that it
18202 can be loaded.
18203 (jcf_figure_file_type): New function. Examine the file structure
18204 to figure a class file, a ZIP file. If none of these categories are
18205 matched, a source file is assumed.
18206 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
18207 SeenZipFile: New global variable.
18208 (open_in_zip): Use zipmember's length to accelerate the search for
18209 a member. If zipmember was NULL and zip file successfully read,
18210 return 0.
18211 * java-tree.h: New global variable current_jcf declared. Added
18212 declaration for current_constant_pool_tags, current_constant_pool_data,
18213 current_constant_pool_length, current_constant_pool_data_ref.
18214 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
18215 store the JCF of classes seen in a zip file) and tree *constant_pool
18216 (to save a loaded class constant pool). current_class declared here.
18217 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
18218 retrieve method_ref_constant.
18219 (PUSHC): java_push_constant_from_pool now uses current_jcf.
18220 (OBJECT): get_class_constant now uses current_jcf.
18221 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
18222 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
18223 (expand_invoke): Now uses current_class instead of main_class
18224 (build_class_init): Now uses current_class instead of main_class
18225 * class.c: New static global variable registered_class.
18226 (register_class): New function.
18227 (emit_register_class): Modified to use registered_class instead of
18228 main_class
18229 (is_compiled_class): Now take into account class seen in the archive.
18230
18231 1997-10-06 Per Bothner <bothner@cygnus.com>
18232
18233 * except.h: Renamed to: java-except.h.
18234 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
18235 * except.c: Add semi-working (commented out) implementation.
18236
18237 * expr.c (expand_iinc): Add needed flush_quick_stack.
18238 * parse.c (set_source_filename): New function.
18239 (give_name_to_class): Set input_filename from package.classname.java.
18240
18241 * jcf-io.c (find_class): Don't look first in ".".
18242
18243 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18244
18245 * zextract.c (read_zip_archive): Now takes into account the
18246 extra_field field.
18247 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
18248
18249 1997-09-20 Per Bothner <bothner@cygnus.com>
18250
18251 * constants.c, java-tree.h (build_internal_class_name): New function.
18252 (alloc_class_constant): Re-implement using build_internal_class_name.
18253 * class.c (make_class_data): Likewise.
18254 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
18255
18256 1997-09-17 Per Bothner <bothner@cygnus.com>
18257
18258 * verify.c (verify_jvm_instructions): Temporarily set current_subr
18259 to NULL before pushing an exception handler target.
18260
18261 * expr.c (flush_quick_stack): Save from low stack indexes to high.
18262 (java_stack_swap, java_stack_dup): Re-write to be safe from
18263 clobbering registers.
18264 (build_class_init): New function.
18265
18266 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
18267
18268 * typeck.c (build_java_array_type): Temporary use
18269 permanent_obstack to create the array 'length' field.
18270 * expr.c (lookup_label): Temporay use permanent_obstack to create
18271 label if not found.
18272 * class.c (push_super_field): Tempory use permanent_obstack.
18273
18274 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
18275
18276 * typeck.c (type_for_mode): Now handles double_type_node and
18277 float_type_node.
18278 * verify.c (verify_jvm_instructions): The instruction following
18279 the wide bytecode is checked. OPCODE_ret added to the list of
18280 wide.
18281
18282 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
18283
18284 * class.c (make_class): Temporary use permanent_obstack. Set the
18285 class CLASS_P field to 1.
18286 (push_class): Temporary use permanent_obstack.
18287 (set_super_info): Temporary use permanent_obstack.
18288 (add_method): Temporary use permanent_obstack, set
18289 METHOD_TRANSIENT().
18290 (add_field): Temporary use permanent_obstack. Sets
18291 FIELD_VOLATILE() and FIELD_TRANSIENT().
18292 (build_class_ref): Temporary use permanent_obstack if the class
18293 isn't compiled.
18294 (build_static_field_ref): Temporary use permanent_obstack when
18295 creating field's rtl.
18296 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
18297 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
18298 and fields. Function finalized, as far as flag handling.
18299 (push_class_static_dummy_field): Temporary use permanent_obstack.
18300 (emit_register_class): Force generation of class registration at
18301 -O3 or deeper.
18302 * decl.c (end_java_method): Call permanent_allocation() before
18303 returning.
18304 * expr.c (can_widen_reference_to): Added comment to interface
18305 handling, fixed typo.
18306 (lookup_field): Now uses CLASS_P() to correct FIXME
18307 (expand_invoke): Verification on public && !static &&
18308 !abstract moved into soft_lookupinterfacemethod (kaffe).
18309 Use Object class dtable if objectref is an array when expanding
18310 invokeinterface.
18311 (java_push_constant_from_pool): Temporary use permanent_obstack
18312 for CONSTANT_string
18313 * parse.c (get_ref_constant): Temporary use permanent_obstack to
18314 create constant references.
18315 (get_constant): Temporary use permanent_obstack to create constant.
18316 (load_class): Temporary use permanent_obstack to load class.
18317 (jcf_parse): Temporary use permanent_obstack to perform class
18318 layout.
18319 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
18320 (build_java_signature): Temporary use permanent_obstack.
18321 * verify.c: (verify_jvm_instruction): removed unnecessary verification
18322 on ACC_SUPER flag.
18323 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
18324 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
18325 (CLASS_P): Defined
18326
18327 1997-09-11 Per Bothner <bothner@cygnus.com>
18328
18329 * class.c (append_gpp_mangled_type): Fix typo.
18330 (emit_register_class): Use main_class to get class object, rather
18331 than looking for no-longer-existing static decl starting with _CL.
18332 * typeck.c (parse_signature_type): Promote array element type
18333 if it is a RECORD_TYPE.
18334
18335 1997-09-10 Per Bothner <bothner@cygnus.com>
18336
18337 * class.c (push_class_static_dummy_field): New function.
18338 (mangle_static_field): New. Do G++-style mangling of static fields.
18339 (layout_class): Mandle static fields here, not in add_field.
18340 (build_class_ref): The class object is now a dummy static field.
18341 * decl.c (find_local_variable): Look for best, instead of first match.
18342 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
18343 (build_java_athrow): Don't check here if exception is Throwable.
18344 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
18345 (TYPE_USED): Removed. No longer used ...
18346 * parse.c (jcf_parse): Call push_class_static_dummy_field.
18347 * verify.c (push_pending_label): New function.
18348 (push_pending_block): Renamed to check_pending_block.
18349 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
18350 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
18351 re-checking possible handlers) after a store (less wasted work).
18352 Check for null handler (finally) before calling add_handler.
18353 Various changes to (finally?) correctly handle try/finally.
18354
18355 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18356
18357 * class.c: Include stdio.h.
18358
18359 1997-09-04 Per Bothner <bothner@cygnus.com>
18360
18361 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
18362 to make sure class is initialized before static/special invoke.
18363
18364 * verify.c (verify_jvm_instructions): On a store instruction,
18365 call find_local_variable to force pre-allocation of decl and rtx.
18366 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
18367
18368 1997-09-03 Per Bothner <bothner@cygnus.com>
18369
18370 * class.c (build_class_ref): Strip off "promoted_" if need be.
18371 (make_field_value): Call build_java_signature when needed.
18372 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
18373 * expr.c (build_java_athrow): Don't push_value of exception.
18374 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
18375 match specification of [fd]cmp[lg] for NaNs.
18376 (expand_byte_code): Add support for exception handler ranges.
18377 * except.c: Add skeleton for EH code-generation.
18378 * verify.c (merge_types): Treat all promoted integral types as equal.
18379 * constants.c (build_constants_constructor): To force creation of
18380 current_constant_pool_data_ref, call build_constant_data_ref.
18381
18382 * javaop.def (lload): Fix typo.
18383 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
18384
18385 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
18386
18387 * parse.c: Don't include function.h.
18388
18389 1997-08-27 Per Bothner <bothner@cygnus.com>
18390
18391 * except.[ch]: New files.
18392 * Makefile.in (JAVA_OBJS): Add except.o
18393 * expr.c: Temporary warning about unimplemented exceptions.
18394 * verify.c: Verify exception handlers.
18395
18396 * jcf-dump.c (disassemble_method): Print exception table.
18397
18398 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18399
18400 * expr.c (verify_jvm_instructions): Started a thorough
18401 verification of invoke* bytecodes.
18402 (expand_byte_code): flush quick stack if PC is the target of a
18403 branch. and undef RET (conflicting with config/i386/i386.h).
18404 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
18405 used.
18406 (expand_invoke): Now handles invokeinterface and do more
18407 verification according to the bytecode.
18408 (lookup_field): Don't try to load the class if processing
18409 dtable_type.
18410 (can_widen_reference_to): Now handles interfaces.
18411 * decl.c (init_decl_processing): New global variable
18412 soft_lookupinterfacemethod_node, declared in java-tree.h.
18413 Call set_super_info on string_type_node.
18414 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
18415 defined.
18416 * class.c (set_super_info): Fills the CLASS_* flags according to
18417 access_flags.
18418 (get_access_flags_from_decl): Handles all class flags.
18419
18420 1997-08-26 Per Bothner <bothner@cygnus.com>
18421
18422 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
18423 * parse.c (yyparse): Check for abstract method, and missing code.
18424 * expr.c (expand_byte_code): Change interface.
18425 * lang.c (put_decl_node): Print promoted types prettier.
18426 * verify.c (verify_jvm_instruction): Change interface.
18427 Partial support for scanning exception table.
18428 For load instructions, handle promoted integral types.
18429
18430 1997-08-21 Per Bothner <bothner@cygnus.com>
18431
18432 * verify.c: New file, with contents moved from expr.c.
18433 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
18434 * typeck.c (is_array_type_p): Moved here from expr.c.
18435 * java-tree.h: Add some now-needed function declarations.
18436 * Makefile.in (JAVA_OBJS): Added verify.o.
18437
18438 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
18439
18440 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
18441 METHOD_ABSTRACT flag.
18442
18443 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
18444 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
18445 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
18446
18447 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
18448 variables.
18449 (start_java_method): Hook for SYNCHRONIZED methods.
18450
18451 * expr.c (build_java_jsr, build_java_ret): New functions
18452 (JSR,PRE): New macros
18453 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
18454 (verify_jvm_instructions): tableswitch, lookupswitch,
18455 monitorenter, monitorexit, goto_w: verified.
18456 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
18457 (build_java_monitor): New function.
18458 (MONITOR_OPERATION): Modified to call build_java_monitor()
18459 (verify_jvm_instructions): Started a thorough verification of
18460 invoke* bytecodes.
18461
18462 1997-08-19 Per Bothner <bothner@cygnus.com>
18463
18464 Support verification of jsr/ret subroutines (used for try/finally).
18465 * decl.c (return_address_type_node): New type node.
18466 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
18467 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
18468 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
18469 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
18470 TYPE_USED): New macros for special types in type_map.
18471
18472 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
18473 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
18474 BCODE_JUMP_TARGET.
18475 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
18476
18477 * expr.c (can_widen_reference_to): New function.
18478 (pop_type): Use it.
18479 (merge_type_state): Support handling start of subroutine.
18480 (push_pending_block): Return char* error message, instead of calling
18481 fatal on an error. Also handle subroutines.
18482 (verify_jvm_instructions): Handle errors from push_poending_block.
18483 Support jsr and ret instructions.
18484
18485 1997-08-19 Per Bothner <bothner@cygnus.com>
18486
18487 * jcf-io.c (find_classfile): Fix thinko.
18488 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
18489
18490 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
18491
18492 * Makefile.in (BISON): Remove.
18493
18494 1997-08-07 Per Bothner <bothner@cygnus.com>
18495
18496 * Makefile.in: Convert to autoconf.
18497 * config-lang.in (outputs): Added java/Makefile.
18498
18499 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
18500 Rename cc1java to jc1.
18501
18502 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
18503 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
18504
18505 * class.c (class_depth): Do load_class if needed.
18506
18507 Mostly better verification.
18508 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
18509 (init_decl_processing): Change return type of soft_checkcast.
18510 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
18511 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
18512 lang_print_error): New functions.
18513 (lang_init): Set global hook print_error_function to lang_print_error.
18514 * expr.c: In the type_map ptr_type_node is only used for null now.
18515 (pop_type, merge_types): Hence ptr_type_node matches any reference.
18516 (merge_types): Dererence pointer to record types before comparing.
18517 (decode_newarray_type, merge_types): On error just return NULL.
18518 (build_java_binop): Add preliminary implementation (with warning)
18519 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
18520 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
18521 (expand_compare, expand_java_goto, expand_java_call): Don't
18522 push_pending_block, since that only makes sense when verifying.
18523 (merge_type_state): Different return codes.
18524 (push_pending_block): A block may need to be verified more than once.
18525 (expand_byte_code): Warn about unused code at code generation time.
18526 (verify_jvm_instruction): Changed logic, since code may need to be
18527 re-verified if type-state has changed. Also, better error handling.
18528 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
18529 Improve newarray, anewarray, ?aload, athrow,
18530 * java-tree.h (LABEL_CHANGED): New macro.
18531
18532 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
18533
18534 * decl.c (soft_athrow_node): New global variable initialized.
18535 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
18536 * typeck.c (convert): Added support for REAL_TYPE.
18537 (convert_to_char): New function.
18538 (convert): Handle CHAR_TYPE.
18539 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
18540 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
18541 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
18542 promoted type.
18543 (verify_jvm_instructions): Added break a the end of bogus unop: label.
18544 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
18545 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
18546 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
18547 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
18548 to Use The Right Things.
18549 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
18550 compatible with INT. BOOLEAN is made equivalent to BYTE.
18551 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
18552 OPCODE_ifnonnull): Now supported.
18553 (build_java_athrow): New function.
18554
18555 1997-08-04 Per Bothner <bothner@cygnus.com>
18556
18557 Rename method name <init> to match G++ (and fix mangling).
18558 * class.c (layout_class): Replace method name of <init> by class name.
18559 (make_method_value): Do inverse renaming of constructor from <init>.
18560 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
18561 * typeck.c (lookup_java_constructor): New function.
18562 * expr.c (expand_invoke): If method_name is <init>, call
18563 lookup_java_constructor to find constructor.
18564
18565 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
18566
18567 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
18568
18569 * parse.c (get_class_constant): Modified to handle array "classes"
18570 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
18571 wide type.
18572 (convert): Modified to handle real type.
18573 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
18574 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
18575 variables declared.
18576 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
18577 soft_multianewarray, soft_newarray_node, soft_throw_node): New
18578 global variables initialized.
18579 (find_local_variable): Handles the case of a pointer
18580 (end_java_method): Restore the use of one more scope
18581 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
18582 build_java_array_length_access, expand_java_arrayload,
18583 expand_java_arraystore, expand_java_array_length,
18584 expand_java_multianewarray, expand_java_anewarray,
18585 build_java_check_indexed_type, is_array_type_p,
18586 build_java_throw_out_of_bound_exception): New functions.
18587 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
18588 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
18589 OPCODE_<t>aload): Implemented code for verification.
18590 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
18591 ARRAY_NEW_MULTI): Macro defined.
18592 (CONVERT): Modified to invoke convert().
18593 (case OPCODE_aload2): Fixed index typo from 2 to 1.
18594
18595 1997-07-31 Per Bothner <bothner@cygnus.com>
18596
18597 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
18598 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
18599 (make_class_data): Field name needs '/' as package prefix.
18600 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
18601
18602 1997-07-25 Per Bothner <bothner@cygnus.com>
18603
18604 Implement debug information for local variables.
18605 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
18606 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
18607 DECL_LOCAL_SLOT_CHAIN): New macros.
18608 (struct lang_decl_var): New type.
18609 * parse.c (give_name_to_locals): Move to decl.c.
18610 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
18611 (start_java_method): Re-write parameter handling.
18612 (pending_local_decls): New global variable.
18613 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
18614 (find_local_variable): Accept pc so we can skips decls not in range.
18615 (struct binding_level): Add end_pc field.
18616 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
18617 (various): Change so current pc gets passed to find_local_variable.
18618
18619 * decl.c (init_decl_processing): Re-arrange fields in
18620 class_type_node and and method_type_node to match kaffe 0.9.1.
18621 * class.c (make_method_value, make_class_data): Update
18622 initializations to match.
18623
18624 1997-07-16 Per Bothner <bothner@cygnus.com>
18625
18626 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
18627 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
18628 (push_super_field): New function.
18629 (make_class_data): Handle inheritance of class static initializer.
18630 (layout_class): New name mangling.
18631 * constants.c (build_constant_data_ref): Init type of data array
18632 to a one-element array.
18633 (build_constants_constructor): Set DECL_SIZE from complete array type.
18634 * decl.c: Rename class_type, object_type etc to class_type_node,
18635 object_type_node etc. Make former inherit from latter.
18636 * expr.c (expand_invoke): Add cast of function address.
18637 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
18638 * parse.c (yyparse): Don't call layout_class here.
18639 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
18640
18641 1997-06-14 Per Bothner <bothner@cygnus.com>
18642
18643 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
18644 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
18645 (alloc_class_constant): New.
18646 * expr.c (expand_invoke): Make sure method's class is initialized.
18647 * class.c (interits_from_p, emit_register_class): New functions.
18648 * parse.c (yyparse): Call emit_register_class.
18649
18650 1997-06-09 Per Bothner <bothner@cygnus.com>
18651
18652 * constants.c: New file, to handle constant pool.
18653 * Makefile.in (JAVA_OBJS): Add constants.o.
18654 * decl.c (init_decl_processing): Update, fix, finish various structs.
18655 (pushdecl_top_level): New.
18656 * parse.c (layout_class): Moved to class.c.
18657 * expr.c (java_push_constant_from_pool): New function.
18658 * class.c (build_class_ref): Make work fully
18659 (make_class_data): Emit super-class, constant pool, interface vector.
18660
18661 1997-06-03 Per Bothner <bothner@cygnus.com>
18662
18663 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
18664 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
18665 * class.c (class_depth): New function.
18666 (lookup_named_class): Replaced by new function lookup_class.
18667 * decl.c (object_type_node, string_type_node): New.
18668 Remove various types that we no longer need.
18669 * expr.c (verify_jvm_instructions): New separate verifier pass.
18670 (push_type, pop_type): New functions for verifier.
18671 (type_stack_dup, pop_argument_types, merge_types): Likewise.
18672 (expand_byte_code): Simplify, since we assume already verified.
18673 (expand_invoke): Now mostly works.
18674 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
18675 * lang.c (main_class): Move to parse.c. Don't make_class yet.
18676 * parse.c: Wait to allocate class object until we know its name.
18677 (layout_class): Calculate DECL_VINDEX for each virtual method.
18678 * typeck.c (get_array_type): Rename to ...
18679 (build_java_array_type): ... and provide working implementation.
18680 (build_java_signature): New function - build Java signature of type.
18681 (set_java_signature): New function - cache signature with type.
18682 (lookup_java_method): New function.
18683
18684 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
18685
18686 * class.c (ident_subst): Take extra SUFFIX parameter.
18687 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
18688 (set_constant_value, build_static_field_ref, is_compiled_class): New.
18689 (build_class_ref): Actually implement.
18690 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
18691 * decl.c (builtin_function): New.
18692 (init_decl_processing): Update for current Kaffe. Declare some
18693 builtin Kaffe functions.
18694 * expr.c (build_address_of): New.
18695 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
18696 Renamed (from expand_java_new etc), and added working implementations.
18697 (build_field_ref): Now also handle static fields.
18698 (expand_invoke): Implement invokestatic, and start implement rest.
18699 * java-opcodes.h: Use javaop.def to avoid duplicated list.
18700 * javaop.def: Rename invokevirt -> invokevirtual.
18701 * lang.c (use_handles): Removed.
18702 * parse.c: Add support for ConstantValue attribute.
18703 Handle nested loading of a class. (JPOOL_UTF): New.
18704
18705 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
18706
18707 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
18708
18709 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
18710
18711 * Make-lang.in (java.install-man): New empty rule.
18712 * typeck.c (set_local_type): New function.
18713 * expr.c (STORE_INTERNAL): Call find_local_variable,
18714 not find_stack_slot. Call set_local_type.
18715
18716 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
18717
18718 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
18719 and building RECORD_TYPE CONSTRUCTORs.
18720 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
18721
18722 * lang.c (use_handles): Change the default to 0.
18723 * decl.c: Define and build class_type, field_type, utf8const_type.
18724 * class.c (make_class_data, make_field_value,
18725 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
18726 hashUtf8String, strLengthUtf8, mangled_classname:
18727 Functions to build reflective data structures.
18728 * parse.c (yyparse): Call make_class_data.
18729
18730 * jcf-io.c (open_class, find_classfile): New functions.
18731 * jcf-dump.c: Support reading classfile from explicitly-named
18732 class file (without CLASSPATH searching).
18733
18734 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
18735
18736 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
18737 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
18738 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
18739 (get_constant): Now trivial for CONSTANT_Utf8.
18740
18741 * jcf.h: Make NEW_CPOOL the default.
18742 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
18743
18744 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
18745
18746 New directory.