* approved by aph
[gcc.git] / gcc / java / ChangeLog
1 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
2
3 * verify.c (verify_jvm_instructions): Don't warn about legal
4 eh binding regions generated for example by jdk 1.4.1.
5
6 2003-10-24 David S. Miller <davem@redhat.com>
7
8 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
9
10 2003-10-22 Andrew Haley <aph@redhat.com>
11
12 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
13 (java_get_callee_fndecl): New.
14
15 * jcf-parse.c (java_parse_file): Call emit_catch_table().
16
17 * java-tree.h (ctable_decl): New.
18 (catch_classes): New.
19 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
20
21 * decl.c (java_init_decl_processing): Add catch_class_type.
22 Add ctable_decl.
23 Add catch_classes field.
24
25 * class.c (build_indirect_class_ref): Break out from
26 build_class_ref.
27 (make_field_value): Check flag_indirect_dispatch.
28 (make_class_data): Ditto.
29 Tidy uses of PUSH_FIELD_VALUE.
30 Add field catch_classes.
31 (make_catch_class_record): New.
32
33 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
34
35 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
36
37 * jcf-write.c: Follow spelling conventions.
38 * parse.y: Likewise.
39
40 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
41
42 * ChangeLog: Fix typos.
43 * expr.c: Fix comment typos.
44 * jcf-write.c: Likewise.
45 * lang.c: Likewise.
46 * lex.c: Likewise.
47 * mangle.c: Likewise.
48 * parse-scan.y: Likewise.
49 * parse.y: Likewise.
50
51 2003-10-22 Tom Tromey <tromey@redhat.com>
52
53 * expr.c (expand_byte_code): Only warn about dead bytecode when
54 extra_warnings is set.
55
56 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
57
58 Fix for PR java/12586.
59 * mangle.c (find_compression_record_match): Don't iterate through
60 package namespace elements unless they all match compression_table
61 entries.
62
63 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
64
65 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
66 (generate-manpages): Likewise.
67 (java.maintainer-clean): Likewise.
68 (gcj.info): Likewise.
69 (gcj.1): Likewise.
70 (gcjh.1): Likewise.
71 (jv-scan.1): Likewise.
72 (jcf-dump.1): Likewise.
73 (gij.1): Likewise.
74 (jv-convert.1): Likewise.
75 (rmic.1): Likewise.
76 (rmiregistry.1): Likewise.
77 (java.install-man): Likewise.
78 (parse-scan.o): Move and define complete compile line.
79 (parse.o): Likewise.
80 (jcf-tree-inline.o): Move.
81
82 2003-10-20 Mark Mitchell <mark@codesourcery.com>
83
84 * Make-lang.in (info): Update dependencies.
85 (java.install-info): Remove.
86 ($(srcdir)/java/gcj.info): Replace with ...
87 ($(docobjdir)/gcj.info): ... this.
88
89 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
90
91 * Make-lang.in: Replace uses of $(target_alias) with
92 $(target_noncanonical).
93
94 2003-10-09 Tom Tromey <tromey@redhat.com>
95
96 * decl.c (java_init_decl_processing): Declare signers field.
97 * class.c (make_class_data): Set signers field.
98
99 2003-10-09 Jason Merrill <jason@redhat.com>
100
101 * parse.y (patch_assignment): Use make_node to create a BLOCK.
102 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
103 POINTER_TYPE.
104
105 2003-10-06 Mark Mitchell <mark@codesourcery.com>
106
107 * Make-lang.in (java.info): Replace with ...
108 (info): ... this.
109 (java.dvi): Replace with ...
110 (dvi): ... this.
111 (java.generated-manpages): Replace with ...
112
113 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
114
115 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
116
117 2003-10-01 Andrew Haley <aph@redhat.com>
118
119 * jcf-parse.c (java_parse_file): Write otable and atable.
120 * java-tree.h (atable_methods): New.
121 (atable_decl): New.
122 (atable_syms_decl): New.
123 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
124 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
125 (symbol_*type): Rename method_symbol* to symbol*type.
126 (emit_offset_symbol_table): Delete.
127 (emit_symbol_table): New.
128 (get_symbol_table_index): New.
129 (atable_type): New.
130 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
131 (build_known_method_ref): Likewise.
132 (get_symbol_table_index): Rename from get_offset_table_index.
133 Parameterize to allow re-use by differing types of symbol table.
134 (build_invokevirtual): Pass table to get_offset_table_index.
135 * decl.c (java_init_decl_processing): Push types and decls for
136 atable and atable_syyms.
137 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
138 (make_class_data): Add new fields atable and atable_syms.
139 (emit_symbol_table): Rename from emit_offset_symbol_table.
140 Parameterize to allow re-use by different types of symbol table.
141 (build_symbol_entry): Renamed from build_method_symbols_entry.
142
143 2003-09-30 Roger Sayle <roger@eyesopen.com>
144
145 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
146 semantics for SAVE_EXPR, by caching the result in a temporary.
147
148 2003-09-28 Richard Henderson <rth@redhat.com>
149
150 * check-init.c (check_init): Save and restore input_location
151 instead of file and line separately.
152 * decl.c (java_expand_body): Likewise.
153 * jcf-write.c (generate_bytecode_insns): Likewise.
154 * parse.y (safe_layout_class): Likewise.
155 * jcf-parse.c (read_class, parse_class_file): Likewise.
156 (java_parse_file): Use %H for warning locator.
157
158 2003-09-28 Roger Sayle <roger@eyesopen.com>
159
160 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
161 with void-type branches instead of using a COMPOUND_EXPR.
162
163 2003-09-28 Jeff Sturm <jsturm@one-point.com>
164
165 * decl.c (java_optimize_inline, dump_function): Remove.
166 * java-tree.h (java_optimize_inline): Remove declaration.
167 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
168 * parse.y (source_end_java_method, java_expand_classes):
169 Likewise. Remove dead code.
170
171 2003-09-27 Roger Sayle <roger@eyesopen.com>
172
173 * lang.c (java_init_options): Set flag_evaluation_order.
174 * expr.c (force_evaluation_order): Don't attempt to force
175 evaluation order of binary operations using save_expr.
176 * parse.y (java_complete_lhs): No longer need to call
177 force_evaluation_order when constructing binary operators.
178
179 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
180 Bryce McKinlay <bryce@mckinlay.net.nz>
181
182 PR java/1333:
183 * parse.y (not_accessible_field_error): New function.
184 (resolve_expression_name): Check field access permissions.
185 (resolve_qualified_expression_name): Use
186 not_accessible_field_error.
187 (resolve_qualified_expression_name): Likewise.
188
189 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
190
191 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
192
193 2003-09-23 Roger Sayle <roger@eyesopen.com>
194
195 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
196 with equal operands without side-effects.
197
198 2003-09-22 Jeff Sturm <jsturm@one-point.com>
199
200 * decl.c (java_init_decl_processing): Don't emit otable decls
201 if flag_indirect_dispatch is not set.
202
203 2003-09-21 Richard Henderson <rth@redhat.com>
204
205 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
206 resource.c: Revert.
207
208 2003-09-21 Richard Henderson <rth@redhat.com>
209
210 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
211 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
212
213 2003-09-20 Richard Henderson <rth@redhat.com>
214
215 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
216
217 2003-09-18 Roger Sayle <roger@eyesopen.com>
218
219 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
220 * check-init.c (check_init): Likewise.
221
222 2003-09-18 Roger Sayle <roger@eyesopen.com>
223
224 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
225
226 2003-09-16 Andrew Haley <aph@redhat.com>
227
228 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
229
230 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
231
232 Fixes PR java/9577
233 * mangle.c (find_compression_record_match): Skip
234 over a "6JArray" (the array template mangled string)
235 IDENTIFIER_NODE.
236 (mangle_array_type): Correct minor typo.
237 (atms): Move definition to the beginning.
238
239 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
240
241 * class.c (add_miranda_methods): Ensure super-interfaces are laid
242 out. Fix for PR java/12254.
243
244 2003-09-11 Richard Henderson <rth@redhat.com>
245
246 * parse.y (source_end_java_method): Update for new
247 cgraph_finalize_function argument.
248
249 2003-09-09 Richard Henderson <rth@redhat.com>
250
251 * parse.y (source_end_java_method): Update call to
252 cgraph_finalize_function.
253
254 2003-09-03 Jeff Sturm <jsturm@one-point.com>
255
256 * decl.c (java_expand_body): New function.
257 * expr.c (build_class_init): Set DECL_IGNORED_P.
258 * java-tree.h (start_complete_expand_method,
259 java_expand_body): Declare.
260 * jcf-parse.c (cgraph.h): Include.
261 (java_parse_file): Handle flag_unit_at_a_time.
262 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
263 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
264 (java_estimate_num_insns): Use walk_tree_without_duplicates.
265 (java_start_inlining): New function.
266 * parse.h (java_finish_classes): Declare.
267 * parse.y: Include cgraph.h.
268 (block): Don't special-case empty block production.
269 (craft_constructor): Set DECL_INLINE.
270 (source_end_java_method): Handle flag_unit_at_a_time.
271 Replace inline code with call to java_expand_body.
272 (start_complete_expand_method): Remove static modifier.
273 (java_expand_method_bodies): Patch function tree for
274 class initialization and/or synchronization as needed.
275 Don't begin RTL expansion yet.
276 (java_expand_classes): Check flag_unit_at_a_time before
277 calling finish_class.
278 (java_finish_classes): New function.
279 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
280 (patch_assignment): Set DECL_CONTEXT on temporary variable.
281 (emit_test_initialization): Set DECL_IGNORED_P.
282
283 2003-09-03 Roger Sayle <roger@eyesopen.com>
284
285 * builtins.c (enum builtin_type): Delete unused enumeration.
286 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
287
288 2003-08-28 Tom Tromey <tromey@redhat.com>
289
290 * gcj.texi (Extensions): Document gcjlib URLs.
291
292 2003-08-20 Tom Tromey <tromey@redhat.com>
293
294 * gcj.texi (Extensions): Added xref.
295 (libgcj Runtime Properties): Document
296 gnu.gcj.runtime.VMClassLoader.library_control.
297
298 2003-08-20 Andrew Haley <aph@redhat.com>
299
300 * except.c (prepare_eh_table_type): Use new encoding for exception
301 handlers when using -fno-assume-compiled.
302
303 2003-08-13 Tom Tromey <tromey@redhat.com>
304
305 * gcj.texi (Invoking gij): Document -X and -?.
306
307 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
308
309 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
310 GCJH_OBJS, JCFDUMP_OBJS
311 * win32-host.c: Removed the unnecessary and broken dependency
312 on jcf.h
313
314 2003-08-11 Tom Tromey <tromey@redhat.com>
315
316 * parse.y (java_check_regular_methods): Typo fixes. Call
317 check_interface_throws_clauses. Use
318 check_concrete_throws_clauses.
319 (check_interface_throws_clauses): New function.
320 (check_concrete_throws_clauses): New function.
321 (hack_is_accessible_p): New function.
322 (find_most_specific_methods_list): Added FIXME.
323 * typeck.c (lookup_do): Use `flags' argument to decide what to
324 do. Reimplemented.
325 (lookup_argument_method_generic): New function.
326 (lookup_argument_method2): Removed.
327 * jcf.h (ACC_INVISIBLE): New define.
328 * jcf-write.c (generate_classfile): Skip invisible methods.
329 * class.c (add_miranda_methods): New function.
330 (layout_class_methods): Use it.
331 (get_access_flags_from_decl): Use ACC_INVISIBLE.
332 * java-tree.h (METHOD_INVISIBLE): New define.
333 (lang_decl_func) [invisible]: New field.
334 (lookup_argument_method_generic): Declare.
335 (SEARCH_INTERFACE): New define.
336 (SEARCH_SUPER): Likewise.
337 (SEARCH_ONLY_INTERFACE): Likewise.
338 (SEARCH_VISIBLE): Likewise.
339 (lookup_argument_method2): Removed declaration.
340
341 2003-08-05 Tom Tromey <tromey@redhat.com>
342
343 Fix for PR java/11600:
344 * parse.y (java_complete_lhs): See whether we're calling a method
345 on an array.
346 (check_thrown_exceptions): Added `is_array_call' argument;
347 fixed `clone' checking; updated all callers.
348
349 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
350
351 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
352
353 2003-08-03 Tom Tromey <tromey@redhat.com>
354
355 * java-tree.h (METHOD_TRANSIENT): Removed.
356 * decl.c (pushdecl): Removed some dead code.
357 * class.c (get_access_flags_from_decl): Can't have transient
358 method.
359 (add_method_1): Can't have a transient method.
360
361 2003-07-28 Andreas Jaeger <aj@suse.de>
362
363 * jvspec.c: Convert to ISO C90 prototypes.
364
365 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
366
367 * decl.c (force_poplevels): Fix warning call.
368
369 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
370
371 * expr.c (expand_java_field_op): Don't use xxx_with_decl
372 (expand_java_field_op): Likewise.
373 * class.c (layout_class_method): Likewise
374 (emit_register_classes): Likewise.
375 * decl.c (pushdecl): Likewise.
376 (poplevel): Likewise.
377 (force_poplevels): Likewise.
378 (give_name_to_locals): Likewise.
379 * check-init.c (check_for_initialization): Likewise.
380
381 2003-07-24 Jason Merrill <jason@redhat.com>
382
383 * java-tree.h: Move boolean_type_node et al to the back end.
384
385 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
386
387 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
388 casts.
389
390 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
391
392 * lang.opt: Don't show -MD_ and -MDD_.
393
394 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
395
396 * lang-options.h: Remove.
397 * lang.opt: Add help text.
398
399 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
400
401 * expr.c: Remove the last argument to expand_assignment().
402
403 2003-07-09 Jan Hubicka <jh@suse.cz>
404
405 * java-tree.h (DECL_NUM_STMTS): Rename to...
406 (DECL_ESTIMATED_INSNS): ... this.
407 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
408 New static functions.
409 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
410 * parser.y (add_stmt_to_compound): Do not account statements.
411
412 2003-07-08 Mark Wielaard <mark@klomp.org>
413
414 * gcj.texi: CNI now expands to Compiled Native Interface.
415
416 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
417
418 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
419
420 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
421
422 * expr.c (expand_byte_code): Adjist emit_line_note call.
423
424 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
425
426 * lang.c (java_handle_option): Don't handle filenames.
427
428 2003-07-02 Zack Weinberg <zack@codesourcery.com>
429
430 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
431 DIR_SEPARATOR.
432 Use FILENAME_CMP.
433 * jcf-write.c: Don't default-define DIR_SEPARATOR.
434 * jcf.h: Delete COMPARE_FILENAMES definition.
435
436 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
437
438 * lang.c (java_init_options): Update prototype.
439
440 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
441
442 * decl.c (poplevel): Adjust define_label call.
443
444 2003-06-27 Zack Weinberg <zack@codesourcery.com>
445
446 * gjavah.c (flag_jni): Make non-static.
447 * parse-scan.y (ctxp): Make non-static.
448
449 * class.c (build_method_symbols_entry)
450 * expr.c (get_offset_table_index)
451 * jcf-parse.c (jcf_parse):
452 Mark the definition static, matching the forward declaration.
453
454 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
455
456 * lang.c (java_handle_option): Don't check for missing arguments.
457
458 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
459
460 * class.c (push_class): Use a location_t to save place.
461 (emit_register_classes): Set input_location. Adjust
462 expand_function_end call.
463 * resource.c (write_resource_constructor): Likewise.
464 * decl.c (end_java_method): Adjust expand_function_end call.
465 * parse.y (source_end_java_method): Likewise.
466
467 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
468
469 * lang.c (java_handle_option): Likewise.
470
471 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
472
473 * lang.c (java_handle_option): Special-casing of optional
474 joined arguments no longer needed.
475 * lang.opt: Update switches that take optional argument.
476
477 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
478
479 * lang.opt: Declare Java.
480 * lang.c (java_init_options): Update.
481
482 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
483
484 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
485
486 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
487
488 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
489 * lang.c (java_handle_option): -MD and -MMD have an underscore.
490 * lang.opt: -MD and -MMD have an underscore.
491
492 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
493
494 * class.c (emit_register_classes): Adjust init_function_start
495 call.
496 * decl.c (complete_start_java_method): Likewise.
497 * resource.c (write_resource_constructor): Likewise.
498
499 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
500
501 * Make-lang.in: Update to use options.c and options.h.
502 * lang.c: Include options.h not j-options.h.
503 (java_handle_option): Abort on unrecognized option.
504 (java_init_options): Request Java switches.
505
506 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
507
508 * Make-lang.in: Handle mostlyclean.
509
510 2003-06-11 Tom Tromey <tromey@redhat.com>
511
512 * lang.c (java_handle_option): Update dependency_tracking for
513 OPT_MF case.
514
515 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
516 empty argument.
517
518 2003-06-10 Andrew Haley <aph@redhat.com>
519
520 * resource.c (write_resource_constructor): Use expand_expr to
521 generate the address of the label attached to a resource.
522 * Make-lang.in (java/resource.o): Add expr.h
523
524 2003-06-10 Andrew Haley <aph@redhat.com>
525
526 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
527 (java_decl_ok_for_sibcall): New.
528
529 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
530
531 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
532 (java/j-options.c, java/j-options.h): New.
533 * java-tree.h (resource_name, compile_resource_file,
534 compile_resource_data): Constify.
535 * jcf-write.c (jcf_write_base_directory): Similarly.
536 * jcf.h (jcf_write_base_directory): Similarly.
537 * lang.c: Include j-options.h.
538 (cl_options_count, cl_options, string_option, java_decode_option,
539 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
540 process_option_with_no): Remove.
541 (resource_name): Constify.
542 (LANG_HOOKS_HANDLE_OPTION): Override.
543 (java_handle_option): New.
544 (java_init): Don't call jcf_path_init.
545 (java_init_options): Call jcf_path_init.
546 * lang.opt: New.
547 * resource.c (compile_resource_data, compile_resource_file): Constify.
548
549 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
550
551 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
552 (struct lang_decl_func): Add last_line field.
553 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
554 DECL_SOURCE_LINE_LAST): Remove.
555 * parse.y (missing_return_error, finish_method_declaration,
556 lookup_cl, start_artificial_method_body, source_end_java_method,
557 start_complete_expand_method): Adjust.
558
559 2003-06-08 Tom Tromey <tromey@redhat.com>
560
561 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
562 fno-assume-compiled.
563
564 2003-06-08 Roger Sayle <roger@eyesopen.com>
565
566 * builtins.c (define_builtin_type, builtin_types): Delete.
567 (define_builtin): Rewritten to take just the built-in code,
568 the function's name, type and fallback library function name.
569 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
570 (initialize_builtins): Overhaul to define the GCC builtins
571 used by gcj manually, providing the Java run-time's
572 implementations as the fallback library function.
573
574 2003-06-08 Anthony Green <green@redhat.com>
575
576 * parse.y (patch_cast): Fix conversions from floating-point to
577 integral types.
578
579 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
580
581 * Make-lang.in: Update.
582 * lang.c: Include opts.h. Define cl_options_count and cl_options.
583
584 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
585
586 * lang.c (java_init_options): Update.
587
588 2003-06-05 Jan Hubicka <jh@suse.cz>
589
590 * Make-lang.in: Add support for stageprofile and stagefeedback
591
592 2003-05-31 Roger Sayle <roger@eyesopen.com>
593
594 * lang.c (java_init_options): Prescribe wrap-around two's
595 complement arithmetic overflow by setting flag_wrapv.
596
597 2003-05-29 Roger Sayle <roger@eyesopen.com>
598
599 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
600 (builtin_record): Add an additional builtin_code field to
601 record which GCC built-in corresponds to the Java function.
602 (java_builtins): Add new entries for atan, atan2, exp, log,
603 pow and tan.
604 (max_builtin, min_builtin, abs_builtin): Perform constant
605 folding on the resulting tree.
606 (java_build_function_call_expr): Likewise, perform constant
607 folding on the resulting tree.
608 (initialize_builtins): The NULL creators are now allowed in
609 the java_builtins table, which is now terminated by an entry
610 with builtin_code == END_BUILTINS.
611 (check_for_builtin): Likewise. If the matching creator is
612 NULL, construct the call using java_build_function_call_expr
613 directly with the decl for the corresponding builtin_code.
614
615 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
616
617 * win32-host.c: Normalize copyright boilerplate.
618
619 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
620
621 * parse.y (print_int_node): Use string concatentation on
622 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
623 function calls into one.
624
625 2003-05-13 Zack Weinberg <zack@codesourcery.com>
626
627 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
628 fatal_io_error with calls to fatal_error; add ": %m" to the end of
629 all the affected error messages.
630
631 2003-05-13 Richard Henderson <rth@redhat.com>
632
633 * class.c (layout_class_method): Set DECL_EXTERNAL.
634 * decl.c (java_mark_decl_local, java_mark_class_local): New.
635 * java-tree.h (java_mark_class_local): Declare.
636 * jcf-parse.c (parse_class_file): Use it.
637 * parse.y (java_expand_classes): Likewise.
638
639 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
640
641 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
642 * lex.h: #include input.h.
643 * jv-scan.c (input_filename): Remove.
644
645 2003-05-02 Tom Tromey <tromey@redhat.com>
646
647 PR java/10491:
648 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
649 (handle_inner_classes): New function.
650
651 2003-05-01 Tom Tromey <tromey@redhat.com>
652
653 PR java/10459:
654 * parse.y (finish_for_loop): Do nothing if update expression is a
655 EXPR_WFL_NODE wrapping nothing.
656 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
657
658 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
659
660 * lex.h (input_lineno): Remove declaration.
661 * parse-scan.y: #include input.h.
662 (input_filename): Remove declaration.
663 (input_location): Add definition.
664 (input_line): Remove definition.
665
666 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
667
668 * lex.h (lineno): Rename to ...
669 (input_line): ... here
670 * parse-scan.y (lineno): Rename to ...
671 (input_line): ... here.
672 (reset_report): Rename lineno to input_line.
673 * check-init.c (check_init): Likewise.
674 * class.c (push_class): Likewise.
675 * decl.c (complete_start_java_method, end_java_method): Likewise.
676 * expr.c (expand_byte_code): Likewise.
677 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
678 * jcf-write.c (generate_bytecode_insns): Likewise.
679 * lex.c (java_init_lex, java_allocate_new_line,
680 do_java_lex): Likewise.
681 * parse.h (YYNOT_TWICE): Likewise.
682 * parse.y (empty_statement, expression_statement,
683 java_pop_parser_context, java_parser_context_save_global,
684 yyerror, register_fields, method_header, safe_layout_class,
685 find_in_imports_on_demand, create_artificial_method,
686 source_end_java_method, start_complete_expand_method,
687 build_thisn_assign, java_complete_lhs,
688 maybe_absorb_scoping_block): Likewise.
689
690 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
691
692 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
693 '/' when computing java source filename
694
695 2003-04-13 Tom Tromey <tromey@redhat.com>
696
697 * gjavah.c (print_c_decl): Indentation fix.
698
699 2003-04-12 Zack Weinberg <zack@codesourcery.com>
700
701 * class.c (make_field_value, make_method_value, get_dispatch_table)
702 (make_class_data, emit_offset_symbol_table)
703 * constants.c (build_constants_constructor)
704 * java-tree.h (START_RECORD_CONSTRUCTOR)
705 * parse.y (maybe_build_array_element_wfl):
706 Use build_constructor.
707
708 2003-04-10 Eric Blake <ebb9@email.byu.edu>
709
710 PR java/10253:
711 * parse.y (string_convert_int_cst): Always use at least one digit
712 in string conversion. Remove ASCII dependence.
713 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
714
715 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
716
717 * Make-lang.in: added win32-host.c
718 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
719 resolves to open() on non-Win32 platforms and
720 Win32-specific jcf_open_exact_case() on Win32
721 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
722 when trying .java and .class files
723 * win32-host.c: added to repository. Defines
724 Win32-specific jcf_open_exact_case()
725
726 2003-04-10 Andrew Haley <aph@redhat.com>
727
728 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
729 (maybe_free_localvar): Renamed from localvar_free.
730 Add new arg, really.
731 (generate_bytecode_insns): Set new variable, jsrs.
732 Only free local vars if no jsr insns have been emittted.
733 Call maybe_free_localvar, not localvar_free.
734
735 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
736
737 * gcj.texi: Remove @ at start of file.
738
739 2003-03-25 Tom Tromey <tromey@redhat.com>
740
741 * parse.y (create_interface): Call CHECK_DEPRECATED.
742
743 2003-03-23 Zack Weinberg <zack@codesourcery.com>
744
745 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
746
747 2003-03-21 Zack Weinberg <zack@codesourcery.com>
748
749 * javaop.h (jfloat, jdouble): Make them structures mirroring
750 the bit fields of IEEE float and double respectively.
751 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
752 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
753 (union Word, union DWord): Delete.
754 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
755
756 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
757 D_NAN_MASK): Delete.
758 (jni_print_float, jni_print_double): New. Generate
759 hexadecimal floating constants.
760 (print_field_info): Use jni_print_float/double.
761
762 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
763 finite floating point numbers for output; special case
764 non-finite floats.
765
766 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
767
768 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
769 Replace 0 and 1 with true and false in return statements.
770
771 2003-03-19 Tom Tromey <tromey@redhat.com>
772
773 * lex.c (do_java_lex): Renamed from java_lex.
774 (java_lex): New function.
775 Include timevar.h.
776
777 2003-03-13 Tom Tromey <tromey@redhat.com>
778
779 * parse.y (resolve_inner_class): Error if qualifier is a primitive
780 type.
781
782 2003-03-04 Andrew Haley <aph@redhat.com>
783
784 * gjavah.c (is_first_data_member): New global variable.
785 (print_c_decl): If it's the first data member, align it as the
786 superclass.
787 (process_file): Set is_first_data_member.
788
789 2003-03-11 Tom Tromey <tromey@redhat.com>
790
791 * parse.y (resolve_field_access): Initialize class if field is
792 found in another static field.
793 * expr.c (build_class_init): Don't optimize out initialization of
794 implemented interface.
795
796 2003-03-11 Andrew Haley <aph@redhat.com>
797
798 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
799 warning.
800
801 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
802
803 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
804 and DIR_SEPARATOR_2 for a target.
805 Correct minor typos.
806
807 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
808 and DIR_SEPARATOR_2 for a target into account.
809
810 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
811
812 * lang.c (java_init): Update prototype, move code to java_post_options.
813 (java_post_options): Similarly.
814
815 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
816
817 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
818 compare file name components depending on the case-sensitivity
819 or otherwise of the host file system.
820
821 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
822 "strcmp" to compare file name components.
823 Use IS_DIR_SEPARATOR instead of comparing directly against
824 DIR_SEPARATOR.
825 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
826 comparing directly against DIR_SEPARATOR.
827
828 2003-03-04 Tom Tromey <tromey@redhat.com>
829
830 * Make-lang.in (java.tags): New target.
831
832 2003-03-01 Roger Sayle <roger@eyesopen.com>
833
834 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
835 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
836
837 2003-03-01 Tom Tromey <tromey@redhat.com>
838
839 * parse.y (jdep_resolve_class): Only check deprecation if we found
840 a decl.
841
842 2003-02-28 Tom Tromey <tromey@redhat.com>
843
844 PR java/9695:
845 * class.c (maybe_layout_super_class): Always pass a WFL to
846 do_resolve_class.
847 * parse.y (do_resolve_class): Updated comment to explain
848 parameters.
849
850 2003-02-26 Tom Tromey <tromey@redhat.com>
851
852 * jcf-write.c (generate_classfile): Check whether class is
853 deprecated before writing attribute count.
854
855 2003-02-25 Roger Sayle <roger@eyesopen.com>
856
857 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
858 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
859
860 2003-02-23 Tom Tromey <tromey@redhat.com>
861
862 * lang-options.h: Added -Wdeprecated.
863 * gcj.texi (Warnings): Document -Wdeprecated.
864 * java-tree.h (flag_deprecated): Declare.
865 * lang.c (lang_W_options): Added deprecated.
866 (flag_deprecated): New global.
867 * chartables.h: Rebuilt.
868 * gen-table.pl (process_one): Look at whitespace.
869 (print_tables): Define LETTER_SPACE, LETTER_MASK.
870 * parse.h (CLEAR_DEPRECATED): New macro.
871 (CHECK_DEPRECATED_NO_RESET): New macro.
872 * jcf-parse.c (handle_deprecated): New function.
873 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
874 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
875 * parse.y (resolve_type_during_patch): Check deprecation.
876 (jdep_resolve_class): Likewise.
877 (process_imports): Likewise.
878 (resolve_expression_name): Likewise.
879 (check_deprecation): Strip arrays from decl. Check
880 flag_deprecated.
881 (patch_method_invocation): Also check the particular constructor
882 for deprecation.
883 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
884 * jcf-write.c (append_deprecated_attribute): New function.
885 (generate_classfile): Generate deprecated attribute when
886 appropriate.
887 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
888 (java_lex) [case '*']: Simplify logic.
889 (java_start_char_p): Use LETTER_MASK.
890 (java_part_char_p): Likewise.
891 (java_space_char_p): New function.
892
893 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
894
895 Change base class access representation.
896 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
897 (add_interface_do): Likewise.
898
899 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
900
901 * decl.c (java_init_decl_processing): Change
902 soft_lookupjnimethod_node to reflect the change in
903 signature of _Jv_LookupJNIMethod in libjava/jni.cc
904 * expr.c (build_jni_stub): Calculate and pass the size
905 on the stack of the arguments to a JNI function. Use
906 new target macro MODIFY_JNI_METHOD_CALL to allow a
907 target to modify the call to a JNI method.
908
909 2003-02-08 Roger Sayle <roger@eyesopen.com>
910
911 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
912 instead of basename to avoid compiler warnings on Tru64.
913
914 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
915
916 * gcj.texi: Update to GFDL 1.2.
917
918 2003-01-31 Andrew Haley <aph@redhat.com>
919
920 * parse.y (java_expand_classes): Scan the whole class list looking
921 for access methods that haven't yet been expanded.
922
923 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
924
925 Fix for java/4269:
926
927 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
928 to fix bootstrap on sparc-unknown-netbsdelf1.5.
929 * jcf-parse.c: Likewise.
930
931 2003-01-31 Mark Wielaard <mark@klomp.org>
932
933 * gjavah.c (throwable_p): Allocate 1 more byte for string.
934
935 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
936
937 * class.c (make_class): Use BINFO_ELTS.
938 (set_super_info): Likewse.
939 (add_interface_do): Likewise.
940
941 2003-01-30 Tom Tromey <tromey@redhat.com>
942
943 * jcf-parse.c (read_class): Update identifier's class value if it
944 changed during parsing.
945
946 2003-01-30 Loren James Rittle <ljrittle@acm.org>
947
948 * Make-lang.in (po-generated): Find the targets in $(parsedir).
949 Propagate change to all other rules as required.
950 (java/parse-scan.o): Add explicit dependency on
951 $(parsedir)/java/parse-scan.c .
952
953 2003-01-29 Tom Tromey <tromey@redhat.com>
954
955 * parse.y (patch_assignment): Only transform the rhs of an
956 assignment when compiling to native.
957
958 2003-01-28 Tom Tromey <tromey@redhat.com>
959
960 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
961
962 2003-01-28 Tom Tromey <tromey@redhat.com>
963
964 * lex.c (java_lex): Don't include UEOF as part of token.
965 (java_read_unicode): Error if \u sequence prematurely terminated.
966
967 2003-01-27 Tom Tromey <tromey@redhat.com>
968
969 * parse.y (java_check_regular_methods): Check for construct after
970 checking types in throws clause.
971
972 2003-01-24 Tom Tromey <tromey@redhat.com>
973
974 * class.c (build_static_field_ref): Only a String or numeric field
975 can fold to a constant.
976
977 2003-01-23 Tom Tromey <tromey@redhat.com>
978
979 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
980 file name in resource buffer.
981
982 2003-01-23 Tom Tromey <tromey@redhat.com>
983
984 * expr.c (build_known_method_ref): Use method's context to find
985 method table index.
986
987 2003-01-23 Tom Tromey <tromey@redhat.com>
988
989 * constants.c (set_constant_entry): Allocated cleared memory.
990
991 2003-01-22 Tom Tromey <tromey@redhat.com>
992
993 * java-tree.h: Don't use PARAMS.
994 * resource.c: Add prototypes for all functions.
995 (write_resource_constructor): Use `const char *' to avoid
996 warning.
997
998 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
999
1000 * jcf-parse.c (process_zip_dir): Remove unused variable.
1001
1002 2003-01-22 Tom Tromey <tromey@redhat.com>
1003
1004 * expr.c (build_invokeinterface): Abort if method's context is not
1005 an interface.
1006
1007 2003-01-22 Tom Tromey <tromey@redhat.com>
1008
1009 * gcj.texi (Input and output files): Mention non-class entries.
1010 * decl.c (java_init_decl_processing): Call
1011 init_resource_processing.
1012 * java-tree.h (compile_resource_data, write_resource_constructor,
1013 compile_resource_file, init_resource_processing): Declare.
1014 * config-lang.in (gtfiles): Added resource.c.
1015 * Make-lang.in (gt-java-resource.h): New target.
1016 (JAVA_OBJS): Added resource.o.
1017 (java/resource.o): New target.
1018 * resource.c: New file.
1019 * class.c (compile_resource_file): Moved to resource.c.
1020 (registerResource_libfunc): Likewise.
1021 (utf8_decl_list): Mark with GTY; now static.
1022 * jcf-parse.c (classify_zip_file): New function.
1023 (parse_zip_file_entries): Use it; compile .properties files.
1024 (process_zip_dir): Use classify_zip_file and compute_class_name.
1025 Don't write class name into zip directory.
1026 (java_parse_file): Call write_resource_constructor.
1027 (compute_class_name): New function.
1028 * jcf-io.c (read_zip_member): Reindented.
1029
1030 2003-01-21 Tom Tromey <tromey@redhat.com>
1031
1032 * class.c (supers_all_compiled): New function.
1033 (make_class_data): Use it.
1034
1035 2003-01-21 Tom Tromey <tromey@redhat.com>
1036
1037 * parse.y (method_header): Native method can't be strictfp.
1038 No method can be transient or volatile.
1039
1040 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1041
1042 Make-lang.in (jvspec.o-warn): Add -Wno-error.
1043
1044 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
1045
1046 * check-init.c: Fix comment typos.
1047 * class.c: Likewise.
1048 * constants.c: Likewise.
1049 * decl.c: Likewise.
1050 * except.c: Likewise.
1051 * expr.c: Likewise.
1052 * java-except.h: Likewise.
1053 * java-tree.h: Likewise.
1054 * javaop.h: Likewise.
1055 * jcf-dump.c: Likewise.
1056 * jcf-io.c: Likewise.
1057 * jcf-parse.c: Likewise.
1058 * jcf-write.c: Likewise.
1059 * lang.c: Likewise.
1060 * mangle.c: Likewise.
1061 * typeck.c: Likewise.
1062 * verify.c: Likewise.
1063
1064 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1065
1066 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
1067 * jcf-write.c: Include "tm_p.h".
1068
1069 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1070
1071 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
1072
1073 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1074
1075 * builtins.c (java_build_function_call_expr): Renamed from
1076 build_function_call_expr. All callers changed.
1077
1078 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
1079 * jcf-parse.c: Include tm_p.h.
1080
1081 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
1082 warning.
1083
1084 2003-01-14 Tom Tromey <tromey@redhat.com>
1085
1086 * class.c (make_class_data): Check that super is compiled before
1087 building class reference to it.
1088
1089 2003-01-14 Andrew Haley <aph@redhat.com>
1090
1091 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1092 varargs function -- correct.
1093
1094 2003-01-14 Andrew Haley <aph@redhat.com>
1095
1096 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
1097
1098 2003-01-14 Andrew Haley <aph@redhat.com>
1099
1100 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
1101 varargs function -- correct.
1102
1103 * parse.y (patch_assignment): Copy the rhs of an assignment into a
1104 temporary if the RHS is a reference.
1105
1106 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1107
1108 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
1109 * keyword.h: Regenerated.
1110
1111 * All Files: Convert to ISO C style function definitions.
1112
1113 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
1114
1115 * parse.y (check_pkg_class_access): ANSIfy definition.
1116
1117 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1118
1119 * decl.c, parse-scan.y, parse.y: Don't cast return value of
1120 xmalloc et al.
1121
1122 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
1123
1124 2003-01-09 Geoffrey Keating <geoffk@apple.com>
1125
1126 Merge from pch-branch:
1127
1128 2002-12-02 Geoffrey Keating <geoffk@apple.com>
1129
1130 * Make-lang.in (java/gjavah.o): Update dependencies.
1131 * gjavah.c: Include ggc.h.
1132
1133 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
1134
1135 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
1136 (JCFDUMP_OBJS): Add ggc-none.o.
1137 (java/jcf-dump.o): Depend on GGC_H.
1138 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
1139 CPool substructures.
1140 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
1141 * jcf-dump.c: Include ggc.h.
1142
1143 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
1144
1145 * jcf.h (union cpool_entry): New.
1146 (struct CPool): Use gengtype to mark. Change field 'data' to be
1147 an array of unions.
1148 (struct JCF): Use gengtype to mark.
1149 (CPOOL_UINT): Update for new cpool_entry type.
1150 (CPOOL_USHORT1): Likewise.
1151 (CPOOL_USHORT2): Likewise.
1152 (CPOOL_FINISH): Use GC to free cpool subfields.
1153 * parse.h (struct parser_ctxt): Mark field current_jcf.
1154 * lex.c (java_init_lex): Use GC to allocate struct JCF.
1155 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
1156 (main_jcf): Use gengtype to mark.
1157 (ggc_mark_jcf): Delete.
1158 (get_constant): Update for new cpool_entry type.
1159 (give_name_to_class): Likewise.
1160 (get_class_constant): Likewise.
1161 (init_outgoing_cpool): Use GGC to allocate struct CPool.
1162 (java_parse_file): Use GGC to allocate struct JCF.
1163 (init_jcf_parse): Don't call ggc_add_root.
1164 * jcf-reader.c (jcf_parse_constant_pool): Update for new
1165 cpool_entry type.
1166 * java-tree.h (current_jcf): Use gengtype to mark.
1167 (CPOOL_UTF): Update for new cpool_entry type.
1168 (outgoing_cpool): Use gengtype to mark.
1169 (struct lang_type): GC struct JCF and struct CPool.
1170 * config-lang.in (gtfiles): Add jcf.h.
1171 * constants.c (find_tree_constant): New.
1172 (set_constant_entry): Allocate cpool subfields using GGC. Update
1173 for new cpool_entry type.
1174 (find_constant1): Update for new cpool_entry type.
1175 (find_constant2): Likewise.
1176 (find_utf8_constant): Use find_tree_constant.
1177 (find_class_or_string_constant): Remove unnecessary cast to jword.
1178 Update for new cpool_entry type.
1179 (count_constant_pool_bytes): Update for new cpool_entry type.
1180 (write_constant_pool): Likewise.
1181 (alloc_name_constant): Use find_tree_constant.
1182 (build_constants_constructor): Update for new cpool_entry type.
1183
1184 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
1185
1186 * parse.y (mark_parser_ctxt): Delete.
1187 (goal): Don't use ggc_add_root.
1188 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
1189 (java_pop_parser_context): Let GC free parser_ctxt.
1190 (java_parser_context_resume): Likewise.
1191 * parse.h (struct parser_ctxt): Use gengtype to mark.
1192 (ctxp): Likewise.
1193 (ctxp_for_generation): Likewise.
1194 * lex.h (struct java_lc_s): Mark for gengtype.
1195 (java_lexer): Rearrange for gengtype.
1196 * config-lang.in (gtfiles): Add lex.h, parse.h.
1197
1198 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1199
1200 * All Files: Remove PARAMS macro.
1201
1202 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
1203 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
1204 `__STDC__' macros.
1205
1206 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
1207 VA_CLOSE.
1208
1209 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
1210
1211 * Make-lang.in (java.install-common, java.uninstall,
1212 java.install-info, java.install-man): Prepend $(DESTDIR)
1213 to destination paths in all (un)installation commands.
1214 (java.install-common): Rewrite $(LN) command to support
1215 DESTDIR with "ln" as well as with "ln -s".
1216
1217 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
1218
1219 * java-tree.h: Protect against multiple inclusion.
1220
1221 2003-01-07 Tom Tromey <tromey@redhat.com>
1222
1223 * class.c (add_assume_compiled): Don't adjust parent if we're
1224 already at the root of tree.
1225
1226 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1227
1228 * lang.c (dump_compound_expr): Prototype.
1229
1230 2003-01-03 Tom Tromey <tromey@redhat.com>
1231
1232 Fix for PR java/8712:
1233 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
1234 when simply checking against `null'.
1235
1236 2003-01-03 Tom Tromey <tromey@redhat.com>
1237
1238 * gcj.texi (Standard Properties): Document http.proxyHost and
1239 http.proxyPort.
1240
1241 * gcj.texi (GNU Classpath Properties): Document new properties.
1242
1243 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
1244
1245 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
1246 java/lang-options.h, java/mangle.c, java/mangle_name.c,
1247 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
1248
1249 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
1250
1251 * Make-lang.in, boehm.c, buffer.c,
1252 buffer.h, builtins.c, class.c,
1253 config-lang.in, constants.c,
1254 convert.h, decl.c, except.c,
1255 expr.c, java-except.h,
1256 java-tree.h, javaop.def,
1257 jcf-parse.c, jcf-write.c,
1258 jv-scan.c, jvgenmain.c,
1259 jvspec.c, keyword.gperf,
1260 keyword.h, lang-options.h,
1261 lang-specs.h, lang.c, lex.c,
1262 lex.h, mangle.c, mangle_name.c,
1263 parse-scan.y, parse.h, parse.y,
1264 typeck.c, verify.c, xref.c,
1265 xref.h: Replace "GNU CC" with
1266 "GCC" in the copyright header.
1267
1268 * check-init.c, gjavah.c, javaop.h,
1269 jcf-depend.c, jcf-dump.c, jcf-io.c,
1270 jcf-path.c, jcf-reader.c, jcf.h,
1271 zextract.c, zipfile.h: These files are
1272 "part of GCC". Also say "GCC" not "GNU CC".
1273
1274 2002-12-30 DJ Delorie <dj@redhat.com>
1275
1276 * Make-lang.in: Protect against texi2pod/pod2man failing.
1277
1278 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
1279
1280 * gcj.texi: Use @copying.
1281
1282 2002-12-27 Mark Mitchell <mark@codesourcery.com>
1283
1284 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
1285 print_cxx_classname.
1286 (print_cxx_classname): Add add_scope parameter.
1287 (print_class_decls): Do not emit a semicolon after the extern
1288 "Java" block.
1289 (process_file): Adjust calls to print_cxx_classname.
1290
1291 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
1292
1293 * gcj.texi: Include Cover Texts in man page.
1294
1295 2002-12-23 Jeff Sturm <jsturm@one-point.com>
1296
1297 * class.c (build_static_field_ref): Check FIELD_FINAL.
1298
1299 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
1300 instead of current_constant_pool_data_ref.
1301 * java-tree.h (current_constant_pool_data_ref): Undefine.
1302 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
1303 * jcf-parse.c (init_outgoing_cpool): Don't initialize
1304 current_constant_pool_data_ref.
1305
1306 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
1307 not build_internal_class_name.
1308
1309 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
1310 Use it when class ref isn't certain to be compiled.
1311
1312 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
1313
1314 * gcj.texi: Include gcc-common.texi.
1315 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
1316 $(srcdir)/doc/include/gcc-common.texi.
1317
1318 2002-12-22 Anthony Green <green@redhat.com>
1319
1320 * gcj.texi (Limitations): Add note about org.xml.sax and
1321 org.w3c.dom.
1322
1323 2002-12-20 Tom Tromey <tromey@redhat.com>
1324
1325 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
1326 where minimum case value is Integer.MIN_VALUE.
1327 Fixes PR java/8955.
1328
1329 2002-12-18 Andrew Haley <aph@redhat.com>
1330
1331 * parse.y (patch_invoke): Force evaluation order when `check' is
1332 set. For PR libgcj/8945.
1333
1334 2002-12-16 Mark Mitchell <mark@codesourcery.com>
1335
1336 * gcj.texi: Change version number to 3.4.
1337
1338 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
1339 Andrew Haley <aph@redhat.com>
1340
1341 * parse.y (source_end_java_method): Remove custom encoding of line
1342 numbers for a function decl before passing it to the back end.
1343
1344 2002-12-03 Andrew Haley <aph@redhat.com>
1345
1346 * class.c (make_class_data): New field, "chain".
1347 * decl.c (java_init_decl_processing): Likewise.
1348
1349 2002-12-02 Tom Tromey <tromey@redhat.com>
1350
1351 For PR java/8740:
1352 * parse.y (do_resolve_class): Handle qualified name via
1353 recursion.
1354
1355 2002-11-30 Zack Weinberg <zack@codesourcery.com>
1356
1357 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
1358 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
1359 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
1360 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
1361 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
1362 Include coretypes.h and tm.h.
1363 * Make-lang.in: Update dependencies.
1364
1365 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1366
1367 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
1368
1369 2002-11-25 Diego Novillo <dnovillo@redhat.com>
1370
1371 * jcf-reader.c: Don't expand JCF_readu4 inside the
1372 expansion of JCF_SKIP.
1373
1374 2002-11-25 Diego Novillo <dnovillo@redhat.com>
1375
1376 * jcf-reader.c: Don't expand JCF_readu4 inside the
1377 expansion of JCF_SKIP.
1378
1379 2002-11-22 Tom Tromey <tromey@redhat.com>
1380
1381 * parse.y (patch_binop): Cast right hand side of shift expression
1382 to `int'. Fixes PR java/8676.
1383
1384 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
1385 Andrew Haley <aph@redhat.com>
1386
1387 * gcc/java/jcf-write.c (write_classfile): Remove target
1388 class file, if it exists, before renaming the temporary
1389 class file to it.
1390
1391 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
1392
1393 * jvspec.c (lang_specific_spec_functions): New.
1394
1395 2002-11-18 Tom Tromey <tromey@redhat.com>
1396
1397 Fix for PR java/7912:
1398 * expr.c (can_widen_reference_to): Allow cast of array to
1399 Cloneable or Serializable.
1400 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
1401 (java_io_serializable_identifier_node): Likewise.
1402 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
1403 (valid_ref_assignconv_cast_p): Use new identifier nodes.
1404 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
1405 java_io_serializable.
1406 * decl.c (java_init_decl_processing): Initialize
1407 java_lang_cloneable_identifier_node and
1408 java_io_serializable_identifier_node.
1409 (java_lang_cloneable_identifier_node): New global.
1410 (java_io_serializable_identifier_node): Likewise.
1411
1412 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
1413
1414 * buffer.c: Remove unnecessary casts.
1415 * check-init.c: Likewise.
1416 * class.c: Likewise.
1417 * constants.c: Likewise.
1418 * decl.c: Likewise.
1419 * except.c: Likewise.
1420 * gjavah.c: Likewise.
1421 * jcf-io.c: Likewise.
1422 * jcf-parse.c: Likewise.
1423 * jcf-path.c: Likewise.
1424 * jvspec.c: Likewise.
1425 * lang.c: Likewise.
1426 * lex.c: Likewise.
1427 * verify.c: Likewise.
1428
1429 2002-11-06 Tom Tromey <tromey@redhat.com>
1430
1431 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
1432 a JNI header.
1433
1434 2002-11-05 Tom Tromey <tromey@redhat.com>
1435
1436 Fix for PR java/6388.
1437 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
1438 * java-tree.h (enum java_tree_index): New values
1439 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
1440 (decimal_int_max, decimal_long_max): New defines.
1441 * lex.c (yylex): Rewrote range checking. Sign extend literals.
1442 (error_if_numeric_overflow): Rewrote range checking.
1443 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
1444 decimal_long_max.
1445
1446 2002-11-02 Tom Tromey <tromey@redhat.com>
1447
1448 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
1449
1450 * class.c (make_method_value): Put class name, not signature, into
1451 `throws' field. For PR java/8415.
1452
1453 2002-10-24 Tom Tromey <tromey@redhat.com>
1454
1455 * gcj.texi (Invoking gij): Document --showversion.
1456 (Standard Properties): java.library.path now set.
1457
1458 2002-10-23 Tom Tromey <tromey@redhat.com>
1459
1460 * gjavah.c (decode_signature_piece): In JNI mode, print
1461 `jobjectArray' when array depth is nonzero.
1462 Fixes PR java/8296.
1463
1464 2002-10-15 Andrew Haley <aph@redhat.com>
1465
1466 * parse.y (patch_invoke): Call force_evaluation_order on a static
1467 arg list.
1468 (resolve_qualified_expression_name): Call force_evaluation_order
1469 on a arg list that is part of a Qualified Expression Name.
1470
1471 * lang.c (dump_compound_expr): New.
1472 (java_dump_tree): New.
1473
1474 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
1475
1476 * gcj.texi: Added item describing the GCJ runtime property
1477 "gnu.gcj.progname".
1478
1479 2002-10-15 Richard Henderson <rth@redhat.com>
1480
1481 * jcf-parse.c (get_constant): Fix type warning.
1482
1483 2002-10-15 Andrew Haley <aph@redhat.com>
1484
1485 * java-tree.h (java_inlining_merge_static_initializers): Declare.
1486 (java_inlining_map_static_initializers): Declare.
1487
1488 2002-10-14 Andrew Haley <aph@redhat.com>
1489
1490 * tree-inline.c (remap_block): All local class initialization
1491 flags go in the outermost scope.
1492 (expand_call_inline): Call java_inlining_map_static_initializers.
1493 (expand_call_inline): Call java_inlining_merge_static_initializers.
1494 * java/lang.c (merge_init_test_initialization): New.
1495 (java_inlining_merge_static_initializers): New.
1496 (inline_init_test_initialization): New.
1497 (java_inlining_map_static_initializers): New.
1498
1499 2002-10-11 Mark Wielaard <mark@klomp.org>
1500
1501 * gcj.texi (Compatibility): Add Limitations and Extensions section.
1502
1503 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1504
1505 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
1506
1507 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1508
1509 * parse.y (merge_string_cste): Add parentheses around & within |.
1510
1511 2002-10-08 Tom Tromey <tromey@redhat.com>
1512
1513 * parse.y (variable_declarator_id): Simplify error path for
1514 array declarator error. For PR java/8003.
1515
1516 2002-10-08 Zack Weinberg <zack@codesourcery.com>
1517
1518 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
1519 bug_report_url.
1520
1521 2002-10-08 Andrew Haley <aph@redhat.com>
1522
1523 * parse.y (attach_init_test_initialization_flags): Check for
1524 error_mark_node.
1525
1526 2002-10-07 Anthony Green <green@redhat.com>
1527
1528 * parse.y (merge_string_cste): Fix bug in string concatenation.
1529
1530 2002-10-03 Michael Koch <konqueror@gmx.de>
1531
1532 * gcj.texi (Standard properties):
1533 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
1534
1535 2002-10-02 Roger Sayle <roger@eyesopen.com>
1536
1537 PR optimization/6627
1538 * lang.c (java_init): If storing the vbit in function
1539 pointers, ensure that force_align_functions_log is atleast
1540 one to aid compatability with g++ vtables.
1541
1542 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
1543
1544 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
1545 foul of type-based aliasing.
1546
1547 2002-09-30 Anthony Green <green@redhat.com>
1548
1549 * gcj.texi (Invoking jv-scan): Fix texinfo.
1550
1551 2002-09-28 Anthony Green <green@redhat.com>
1552
1553 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
1554 (Code Generation): Add -fno-assert documentation.
1555 * jv-scan.c (flag_assert): New global.
1556 (options): Add assert option.
1557 (help): Add --no-assert documentation.
1558 * parse-scan.y (flag_assert): New global.
1559 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
1560 (flag_assert): New global.
1561 * java-tree.h (flag_assert): New global.
1562 * lex.c (java_lex): Obey flag_assert.
1563 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
1564 calling cc1.
1565
1566 2002-09-26 Andrew Haley <aph@redhat.com>
1567
1568 * expr.c (build_java_array_length_access): Check for null pointer.
1569 * expr.c (expand_java_arrayload): Likewise.
1570
1571 2002-09-21 Richard Henderson <rth@redhat.com>
1572
1573 * jcf-parse.c (get_constant): Decode from IEEE no matter
1574 what the target format.
1575
1576 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
1577
1578 * ChangeLog: Follow spelling conventions.
1579 * class.c: Likewise.
1580 * decl.c: Likewise.
1581 * expr.c: Likewise.
1582 * gjavah.c: Likewise.
1583 * java-tree.h: Likewise.
1584 * jcf-dump.c: Likewise.
1585 * jcf-parse.c: Likewise.
1586 * jvspec.c: Likewise.
1587 * lang.c: Likewise.
1588 * mangle.c: Likewise.
1589 * parse.y: Likewise.
1590
1591 2002-09-17 Tom Tromey <tromey@redhat.com>
1592
1593 * lex.c (java_read_unicode_collapsing_terminators): Handle case
1594 where \r appears at EOF. Fixes PR java/7950.
1595
1596 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1597
1598 * jvspec.c (lang_specific_driver): Remove unused variable.
1599
1600 2002-09-16 Geoffrey Keating <geoffk@apple.com>
1601
1602 * java-tree.h (union lang_tree_node): Add chain_next option.
1603
1604 2002-09-16 Richard Henderson <rth@redhat.com>
1605
1606 * jcf-parse.c (get_constant): Runtime check for IEEE format;
1607 use new real.h interface.
1608 * jcf-write.c (find_constant_index): Use new real.h interface.
1609 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
1610
1611 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
1612
1613 * lang.c: Follow spelling conventions.
1614
1615 2002-09-11 Per Bothner <per@bothner.com>
1616
1617 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
1618 constant to the type of the field.
1619 (java_complete_tree): Remove now-redundant code.
1620
1621 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
1622
1623 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
1624
1625 For PR java/5794:
1626 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
1627 return label if a ret instruction for the jsr has been reached.
1628
1629 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
1630
1631 * parse.y (DIR_SEPARATOR): Don't define.
1632 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
1633
1634 2002-08-28 Andrew Haley <aph@redhat.com>
1635
1636 * verify.c (verify_jvm_instructions): Allow exception handler
1637 inside code that is being protected, but generate a warning.
1638 * except.c (link_handler): Initialize `expanded' in new eh_range.
1639 (binding_depth, is_class_level, current_pc): Declare extern.
1640
1641 2002-09-01 Mark Wielaard <mark@klomp.org>
1642
1643 * gcj.texi: Add chapter about system properties.
1644 Fixed some typos.
1645
1646 2002-08-26 Tom Tromey <tromey@redhat.com>
1647
1648 * parse.y (try_builtin_assignconv): Allow narrowing primitive
1649 conversion if RHS_TYPE is byte, short, or char.
1650
1651 2002-08-22 Tom Tromey <tromey@redhat.com>
1652
1653 * gcj.texi (Invoking gij): Document -cp and -classpath.
1654
1655 2002-08-21 Tom Tromey <tromey@redhat.com>
1656
1657 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
1658 $(prefix)/share. For PR libgcj/7633.
1659
1660 For PR java/6005 and PR java/7611:
1661 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
1662 (java_can_use_bit_fields_p): New function.
1663
1664 2002-08-16 Tom Tromey <tromey@redhat.com>
1665
1666 * gcj.texi (Class Initialization): Mention class initialization of
1667 arrays.
1668
1669 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
1670
1671 * Make-lang.in (java-tree-inline.o): New.
1672 (JAVA_OBJS): Add java-tree-inline.o.
1673 * parse.y (source_end_java_method): Call java_optimize_inline.
1674 (java_expand_method_bodies): Save method's tree in
1675 DECL_SAVED_TREE.
1676 (add_stmt_to_compound): Keep track of the number of statments.
1677 * lang.c (java_init): Enable flag_inline_trees.
1678 (java_post_options): If flag_inline_functions is on, enable
1679 flag_inline_trees instread.
1680 (decl_constant_value): New.
1681 (java_tree_inlining_walk_subtrees): New.
1682 * java-tree.h (DECL_NUM_STMTS): New macro.
1683 (java_optimize_inline): Declare.
1684 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
1685 Handle a LABEL_EXPR.
1686 * decl.c (build_result_decl): If we already have a DECL_RESULT
1687 don't make another.
1688 (dump_function): New.
1689 (java_optimize_inline): New.
1690 (dump_function): New.
1691
1692 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
1693
1694 For PR java/7483:
1695 * parse.y (build_assertion): Invert return from
1696 desiredAssertionStatus.
1697
1698 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1699
1700 * jcf-write.c (get_access_flags): Return correct access flags for
1701 private and protected inner classes.
1702
1703 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
1704
1705 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
1706
1707 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
1708
1709 * mangle_name.c: Don't include obstack.h twice.
1710 * xref.c: Don't include obstack.h.
1711
1712 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
1713
1714 * class.c: (permanent_obstack): Delete declaration.
1715 * constants.c: (permanent_obstack): Delete declaration.
1716 * except.c: (permanent_obstack): Delete declaration.
1717 * expr.c: (permanent_obstack): Delete declaration.
1718 * jcf-parse.c: (permanent_obstack): Delete declaration.
1719 (saveable_obstack): Delete declaration.
1720 * parse.h: (permanent_obstack): Delete declaration.
1721 * typeck.c: (permanent_obstack): Delete declaration.
1722
1723 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
1724
1725 * gcj.texi (version-gcc): Increase to 3.3.
1726
1727 2002-07-22 Tom Tromey <tromey@redhat.com>
1728
1729 * lex.c (java_lex): Check for `e' or `E' after 0.
1730
1731 2002-07-21 Richard Henderson <rth@redhat.com>
1732
1733 * lang.c (java_unsafe_for_reeval): New.
1734 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
1735
1736 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
1737
1738 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
1739 (jcf_path_init): Use GET_ENVIRONMENT.
1740
1741 2002-07-10 Roger Sayle <roger@eyesopen.com>
1742 Zack Weinberg <zack@codesourcery.com>
1743
1744 * builtins.c (initialize_builtins): Remove defines that
1745 handled C/C++ specific junk hereby removed from builtins.def.
1746
1747 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
1748
1749 * lang.c (java_post_options): Update prototype.
1750
1751 2002-07-05 Roger Sayle <roger@eyesopen.com>
1752
1753 * builtins.c (initialize_builtins): Ignore the additional
1754 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
1755 the builtins.def file.
1756
1757 2002-07-01 Tom Tromey <tromey@redhat.com>
1758
1759 For PR libgcj/7073:
1760 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
1761 specially.
1762
1763 2002-07-01 Roger Sayle <roger@eyesopen.com>
1764
1765 * java/decl.c (builtin_function): Accept additional parameter.
1766 (java_init_decl_processing): Pass an additional NULL_TREE
1767 argument to builtin_function.
1768
1769 2002-06-29 T.J. Mather <tjmather@maxmind.com>
1770
1771 * gcj.texi: Fixed gcj invocation example so that it compiles.
1772
1773 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1774
1775 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
1776 * parse.y (mark_parser_ctxt): Likewise.
1777 (check_modifiers, declare_local_variables): Avoid incorrect
1778 hardcoded constant 10.
1779
1780 * lex.c (java_read_char): Avoid "comparison is always true"
1781 warning.
1782
1783 2002-06-25 Andreas Schwab <schwab@suse.de>
1784
1785 * expr.c (JSR): Avoid undefined operation on PC.
1786
1787 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1788
1789 * decl.c (clear_binding_level): Const-ify.
1790
1791 2002-06-13 Akim Demaille <akim@epita.fr>
1792
1793 * parse.y (class_declaration, interface_declaration): Make sure
1794 all their rules have an action, in order to avoid meaningless `$$
1795 = $1' and their type clashes.
1796
1797 2002-06-11 Tom Tromey <tromey@redhat.com>
1798
1799 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
1800 * parse-scan.y (statement_without_trailing_substatement): Added
1801 assert_statement.
1802 (assert_statement): New rule.
1803 * java-tree.h (struct lang_type) [assertions]: New field.
1804 (TYPE_USES_ASSERTIONS): New macro.
1805 (CLASS_USES_ASSERTIONS): Likewise.
1806 (FIELD_SYNTHETIC): New define.
1807 * lex.c (java_lval;): Added ASSERT_TK.
1808 * parse.y (ASSERT_TK): Added.
1809 (statement_without_trailing_substatement): Added assert_statement.
1810 (assert_statement): New rule.
1811 (build_assertion): New function.
1812 (maybe_generate_pre_expand_clinit): Create and initialize
1813 $assertionsDisabled.
1814 (lookup_package_type): Removed decl.
1815 * keyword.h: Rebuilt.
1816 * keyword.gperf (assert): New token.
1817
1818 2002-06-10 Akim Demaille <akim@epita.fr>
1819
1820 * parse.y (interface_type_list, class_member_declaration)
1821 (unary_expression_not_plus_minus): Remove duplicate %type.
1822 Whitespace changes.
1823
1824 2002-06-09 Tom Tromey <tromey@redhat.com>
1825
1826 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
1827
1828 * parse.y (method_header): Give error message in all cases.
1829 Fixes PR java/6865.
1830
1831 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1832
1833 Don't use RTL inlining. Fix for PR java/6820.
1834 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
1835 (flag_really_inline): New.
1836 (java_decode_option): Set flag_really_inline if -finline-functions
1837 is seen.
1838 (java_post_options): New function. Turn off inlining unless
1839 flag_really_inline is set.
1840
1841 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1842
1843 * gjavah.c (throwable_p): Accept argument as either a classname or
1844 signature fragment. Create null-terminated classname string for super
1845 when calling itself recursively.
1846 (decode_signature_piece): Skip first character from class name
1847 signature when calling throwable_p.
1848
1849 2002-06-08 H.J. Lu (hjl@gnu.org)
1850
1851 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
1852
1853 2002-06-04 Tom Tromey <tromey@redhat.com>
1854
1855 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
1856
1857 2002-06-04 Michael Koch <konqueror@gmx.de>
1858
1859 * gcj.texi (Input Options): Fixed typo.
1860
1861 2002-06-04 Zack Weinberg <zack@codesourcery.com>
1862
1863 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
1864 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
1865 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
1866 and all now-pointless local variables. Rename other local
1867 variables to reflect their not being handles.
1868
1869 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
1870 #if JCF_USE_STDIO blocks.
1871
1872 * parse.y: Add missing semicolon at end of rule.
1873
1874 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
1875
1876 * check-init.c (attach_initialized_static_class): Delete, unused.
1877 * parse.y: Use htab_t instead of struct hashtable, update
1878 all uses.
1879 * java-tree.h: Include hashtab.h instead of hash.h.
1880 (struct lang_decl_func): Use htab_t, set up for gengtype.
1881 (struct init_test_hash_entry): Delete.
1882 (struct treetreehash_entry): New.
1883 (java_treetreehash_find): New
1884 (java_treetreehash_new): New prototype.
1885 (java_treetreehash_create): New prototype.
1886 (java_mark_tree): Delete prototype.
1887 (java_hash_hash_tree_node): Delete prototype.
1888 (java_hash_compare_tree_node): Delete prototype.
1889 (attach_initialized_static_class): Delete prototype.
1890 * expr.c (build_class_init): Update to use java_treetreehash
1891 functions.
1892 (java_expand_expr): Update to use htab_t.
1893 (emit_init_test_initialization): Likewise.
1894 * decl.c (java_mark_tree): Delete.
1895 * class.c (init_test_hash_newfunc): Delete.
1896 (java_hash_hash_tree_node): Delete.
1897 (java_hash_compare_tree_node): Delete.
1898 (add_method_1): Update to use java_treetreehash functions.
1899 (JAVA_TREEHASHHASH_H): New macro.
1900 (java_treetreehash_hash): New function.
1901 (java_treetreehash_compare): New function.
1902 (java_treetreehash_find): New function.
1903 (java_treetreehash_new): New function.
1904 (java_treetreehash_create): New function.
1905 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
1906
1907 * Make-lang.in (java/parse.o): Depend on debug.h.
1908 * java-tree.h (struct lang_identifier): Use gengtype.
1909 (union lang_tree_node): New.
1910 (struct lang_decl_func): Use gengtype.
1911 (struct lang_decl_var): Likewise.
1912 (struct lang_decl): Likewise.
1913 * parse.y: Include debug.h.
1914 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
1915
1916 * lang.c (struct language_function): New dummy structure.
1917
1918 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
1919 descriminator for DECL_LANG_SPECIFIC.
1920 (struct lang_decl_func): Rename from struct lang_decl.
1921 (enum lang_decl_desc): New.
1922 (struct lang_decl): Make it a union. Update all the accessor macros.
1923 (struct lang_type): Use gengtype.
1924 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
1925 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
1926 are now the same size.
1927 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
1928 use discriminator to mark DECL_LANG_SPECIFIC.
1929
1930 * Make-lang.in (gt-java-builtins.h): New rule.
1931 (java/builtins.o): Add dependency on gt-<filename>.h.
1932 * builtins.c: Use gengtype for roots.
1933 (union string_or_tree): Use gengtype.
1934 (struct builtin_record): Use gengtype.
1935 * config-lang.in (gtfiles): Add builtins.c.
1936
1937 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
1938 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
1939 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
1940 gt-java-parse.h, gtype-java.h): Add rules to generate.
1941 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
1942 (class.o): Add dependency on gt-*.h.
1943 (constants.o): Likewise.
1944 (decl.o): Likewise.
1945 (expr.o): Likewise.
1946 (jcf-parse.o): Likewise.
1947 (jcf-write.o): Likewise.
1948 (lang.o): Likewise.
1949 * config-lang.in (gtfiles): New.
1950 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
1951 * constants.c: Replace uses of ggc_add_* with GTY markers.
1952 Include gt-*.h.
1953 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
1954 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
1955 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
1956 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
1957 Include gt-*.h.
1958 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
1959 Include gt-*.h.
1960 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
1961 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
1962 gt-*.h.
1963 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
1964 Include gtype-java.h.
1965
1966 2002-06-02 Tom Tromey <tromey@redhat.com>
1967
1968 Fix for PR java/5913:
1969 * parse.y (patch_binop): Call patch_string on op1.
1970
1971 2002-06-02 Tom Tromey <tromey@redhat.com>
1972
1973 Fix for PR java/1343, PR java/6336:
1974 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
1975 formatting. Changed return type.
1976 (anonymous_class_counter): Moved to top of file.
1977 (maybe_make_nested_class_name): Append number to class name for
1978 function-local classes.
1979
1980 2002-05-28 Zack Weinberg <zack@codesourcery.com>
1981
1982 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
1983 * Make-lang.in: Update dependency lists.
1984
1985 2002-05-18 Mark Mitchell <mark@codesourcery.com>
1986
1987 * gjavah.c (throwable_p): Do not free the name of the class after
1988 passing it to find_class.
1989 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
1990 * jcf-io.c (dirent.h): Include it.
1991 (fnmatch.h): Likewise.
1992 (compare_path): New function.
1993 (java_or_class_file): Likewise.
1994 (memoized_dirlist_entry): New type.
1995 (memoized_dirlist_lookup_eq): New function.
1996 (memoized_dirlists): New variable.
1997 (caching_stat): New function.
1998 (memoized_class_lookup_eq): New function.
1999 (memoized_class_lookups): Likewise.
2000 (find_class): Use memoized_class_lookups and caching_stat.
2001 * jcf.h (JCF_USE_SCANDIR): Define.
2002 * parse.y (java_expand_classes): Write the class files in reverse
2003 order.
2004
2005 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2006
2007 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
2008
2009 2002-05-13 Mark Mitchell <mark@codesourcery.com>
2010
2011 * jcf-write.c (write_classfile): Unlink the temporary file if it
2012 cannot be renamed. Use concat to build up the name of the
2013 temporary file.
2014
2015 2002-05-08 Mark Mitchell <mark@codesourcery.com>
2016
2017 * jcf-write.c (write_classfile): Write the file to a
2018 temporary file and then rename it.
2019
2020 2002-05-07 Tom Tromey <tromey@redhat.com>
2021
2022 * gjavah.c (throwable_p): Use xstrdup, not strdup.
2023
2024 Fix for PR java/1200:
2025 * gjavah.c (throwable_p): New function.
2026 (decode_signature_piece): Use it. A `WeakReference' isn't the
2027 same as a `jweak'.
2028 Include hashtab.h.
2029 (gcjh_streq): New function.
2030
2031 2002-05-07 Andreas Jaeger <aj@suse.de>
2032
2033 * parse.y (finish_for_loop): Fix if statement.
2034
2035 2002-05-06 Tom Tromey <tromey@redhat.com>
2036
2037 Fix for PR java/5941:
2038 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
2039 loop update expression.
2040 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
2041 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2042
2043 2002-05-04 Mark Wielaard <mark@klomp.org>
2044
2045 For PR java/6519:
2046 * parse.y (build_string_concatenation): Return just op1 only when op2
2047 is null and op1 is a STRING_CST, otherwise always construct a
2048 StringBuffer.
2049
2050 2002-04-27 Tom Tromey <tromey@redhat.com>
2051
2052 For PR java/6382:
2053 * parse.y (string_convert_int_cst): New function.
2054 (merge_string_cste): Use it.
2055
2056 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
2057
2058 * java-tree.h (java_parse_file): Update.
2059 (java_set_yydebug): Remove.
2060 * jcf-parse.c (yydebug): Remove.
2061 (java_set_yydebug): Die.
2062 (java_parse_file): Update.
2063 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2064
2065 2002-04-24 Tom Tromey <tromey@redhat.com>
2066
2067 For PR java/6425:
2068 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
2069 EXPR_WFL_QUALIFICATION of qual_wfl.
2070
2071 2002-04-23 Per Bothner <per@bothner.com>
2072
2073 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
2074 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
2075 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
2076
2077 2002-04-23 Tom Tromey <tromey@redhat.com>
2078
2079 For PR java/6314:
2080 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
2081 recognize `-fcompile-resource='.
2082 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
2083 a bit.
2084
2085 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
2086
2087 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
2088 paths. Fixes PR java/2791.
2089
2090 2002-04-19 Andrew Haley <aph@redhat.com>
2091
2092 * jcf-write.c (push_long_const): lo, hi: New variables.
2093 Use rshift_double to extract the high part of a 64-bit long.
2094 Use WORD_TO_INT to extract the low part.
2095
2096 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
2097 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
2098 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
2099
2100 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
2101
2102 * typeck.c (incomplete_type_error): Remove.
2103
2104 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2105
2106 * class.c (make_class_data): Set DECL_ALIGN on static class data,
2107 for hash synchronization.
2108 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
2109 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
2110 class_type_node.
2111
2112 2002-04-16 Mark Wielaard <mark@klomp.org>
2113
2114 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
2115 negative zero.
2116
2117 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2118
2119 Fix for PR java/6294:
2120 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
2121 interfaces.
2122
2123 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2124
2125 Fix for PR java/6085:
2126 * parse.y (patch_method_invocation): Always use build_access_to_thisn
2127 to get enclosing "this" argument for inner-class constructor
2128 invocation. Pass correct arguments to build_access_to_thisn.
2129
2130 2002-04-10 Andreas Jaeger <aj@suse.de>
2131
2132 * gcj.texi (Input Options): Fix extdirs patch.
2133
2134 2002-04-10 Anthony Green <green@redhat.com>
2135
2136 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
2137
2138 2002-04-09 Anthony Green <green@redhat.com>
2139
2140 * gcj.texi (Input Options): Add --extdirs documentation.
2141 * jcf-dump.c (OPT_extdirs): New macro.
2142 (options): Add extdirs option.
2143 (help): Describe --extdirs.
2144 (main): Handle OPT_extdirs.
2145 * gjavah.c (OPT_extdirs): New macro.
2146 (options): Add extdirs option.
2147 (help): Describe --extdirs.
2148 (main): Handle OPT_extdirs.
2149 * jcf-path.c (jcf_path_init): Add extdirs support.
2150 (jcf_path_extdirs_arg): New function.
2151 (extensions): New variable to hold extensions path entries.
2152 * jvspec.c: Remove -fextdirs= when compiling main().
2153 * lang.c (java_decode_option): Handle -fextdirs=.
2154 * jcf.h (jcf_path_extdirs_arg): Declare new function.
2155 * Make-lang.in: Compile jcf-path with version info for use in
2156 identifying the appropriate libgcj.jar.
2157
2158 2002-04-08 Tom Tromey <tromey@redhat.com>
2159
2160 For PR libgcj/5303:
2161 * .cvsignore: Added rmic.1 and rmiregistry.1.
2162 * gcj.texi (Top): Link to new nodes.
2163 (Invoking rmic): New node.
2164 (Invoking rmiregistry): Likewise.
2165 * Make-lang.in (java.generated-manpages): Added rmic.1 and
2166 rmiregistry.1.
2167 (java.maintainer-clean): Likewise.
2168 ($(srcdir)/java/rmic.1): New target.
2169 ($(srcdir)/java/rmiregistry.1): Likewise.
2170 (java.install-man): Handle rmic.1 and rmiregistry.1.
2171
2172 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2173
2174 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
2175 Add note about handling uncaught exceptions. Add an exception handler
2176 to example.
2177
2178 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2179
2180 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
2181 after using it to patch CALL_EXPR.
2182
2183 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2184
2185 * gcj.texi (Invocation): Document CNI invocation API.
2186
2187 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
2188
2189 * expr.c (truthvalue_conversion): Rename. Update.
2190 (expand_compare): Update.
2191 * java-tree.h (java_truthvalue_conversion): New.
2192 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
2193
2194 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
2195
2196 * java-tree.h (java_mark_addressable): New.
2197 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
2198 * typeck.c (mark_addressable): Rename, update.
2199
2200 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
2201
2202 * expr.c (build_java_binop): Update.
2203 * java-tree.h (java_signed_type, java_unsigned_type,
2204 java_signed_or_unsigned_type): Update.
2205 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
2206 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
2207 * parse.y (patch_binop): Update.
2208 * typeck.c (signed_or_unsigned_type, unsigned_type,
2209 signed_type): Update.
2210
2211 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
2212
2213 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
2214 (java_dummy_print): Remove.
2215 (lang_print_error): Rename. Exit early if inhibiting output.
2216 (inhibit_error_printing_function): New.
2217 (java_init): Don't set hook.
2218 (lang_init_source): Use new boolean.
2219
2220 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
2221
2222 * parse.y (do_resolve_class): Fix infinite recursion.
2223
2224 2002-03-29 Tom Tromey <tromey@redhat.com>
2225
2226 * parse.y (check_inner_circular_reference): Ignore incomplete
2227 types.
2228
2229 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
2230
2231 * Make-lang.in (builtins.o): Update.
2232 * boehm.c (get_boehm_type_descriptor): Update.
2233 * builtins.c: Include langhooks.h.
2234 * decl.c (java_init_decl_processing): Update.
2235 * java-tree.h (java_type_for_mode, java_type_for_size): New.
2236 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
2237 Redefine.
2238 * typeck.c (type_for_mode, type_for_size): Update.
2239
2240 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
2241
2242 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
2243
2244 2002-03-28 Tom Tromey <tromey@redhat.com>
2245
2246 * except.c (expand_end_java_handler): If the handler type is NULL,
2247 use java.lang.Throwable. Fixes PR java/5986.
2248
2249 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
2250
2251 Fix for PR java/4715:
2252 * jcf-parse.c (parse_source_file_3): New function.
2253 (read_class): Call it.
2254 (java_parse_file): Likewise.
2255
2256 2002-03-28 Jan Hubicka <jh@suse.cz>
2257
2258 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
2259
2260 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2261
2262 * parse.y (resolve_package): Initialize "decl".
2263 (lookup_package_type): Remove unused function.
2264
2265 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2266
2267 Fix for PR java/5993:
2268 * parse.y (resolve_package): Return the decl if resolution was
2269 successful. Don't special case "java.lang" and "java.lang.reflect"
2270 packages. Set type_name to the merged identifier.
2271 (resolved_qualified_expression_name): Print error using "name" if
2272 resolve_package returns NULL_TREE.
2273
2274 2002-03-27 Tom Tromey <tromey@redhat.com>
2275
2276 * expr.c (expand_invoke): Don't generate null pointer check if
2277 we're calling <init>.
2278
2279 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
2280
2281 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
2282 fix prototype.
2283 * java-tree.h (java_lang_expand_expr): Similarly.
2284 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
2285 (java_init): Don't set hook.
2286
2287 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2288
2289 Fix for PR java/5850:
2290 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
2291 context if field was not found in the current scope.
2292 * expr.c (lookup_field): Don't look in enclosing contexts.
2293
2294 2002-03-26 Tom Tromey <tromey@redhat.com>
2295
2296 Fix for PR java/5942:
2297 * parse.y (init_src_parse): Added sanity check.
2298 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
2299 elements, not 11.
2300
2301 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
2302
2303 * decl.c (lang_mark_tree): Rename java_mark_tree.
2304 * java-tree.h (java_mark_tree): New.
2305 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2306
2307 2002-03-25 Zack Weinberg <zack@codesourcery.com>
2308
2309 * lex.c: Change java_perform_atof to take normal parameters
2310 instead of a pointer to a parameter block. Call it directly
2311 from java_lex.
2312
2313 2002-03-22 Mark Wielaard <mark@klomp.org>
2314
2315 Fix for PR java/5368:
2316 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
2317 when printing error message.
2318
2319 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
2320
2321 * decl.c (maybe_build_cleanup): Remove.
2322
2323 2002-03-22 Tom Tromey <tromey@redhat.com>
2324
2325 Andrew Haley <aph@cambridge.redhat.com>
2326
2327 * expr.c (build_field_ref): Don't build a check if the field is a
2328 member of `this'.
2329
2330 2002-03-21 Eric Blake <ebb9@email.byu.edu>
2331
2332 Fix for PR java/6026:
2333 * lex.c (java_lex): Fix parsing of consecutive floats.
2334
2335 2002-03-21 Tom Tromey <tromey@redhat.com>
2336
2337 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
2338 class.
2339
2340 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
2341
2342 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
2343 insert_block, getdecls, kept_level_p, global_bindings_p): New.
2344
2345 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
2346
2347 * gcj.texi: @code{gcj} becomes @command{gcj}.
2348 @code{gcc} becomes @command{gcc}.
2349 GcjRaw changed to gnu.gcc.RawData.
2350
2351 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
2352
2353 * decl.c (start_java_method): Use new hook.
2354 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
2355 (java_init): Remove old hook.
2356
2357 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
2358
2359 * builtins.c (define_builtin): Do nothing if `type' is null.
2360 Fixes PR java/5876.
2361
2362 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2363
2364 * parse.y (parser_check_super_interface): Fix error message
2365 grammar/order.
2366
2367 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2368
2369 * jcf-parse.c (get_constant): Delete unused variables.
2370
2371 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
2372
2373 * java-tree.h (java_parse_file): New.
2374 * jcf-parse.c (yyparse): Rename java_parse_file.
2375 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2376
2377 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2378
2379 * parse.y (craft_constructor): Return the constructor decl.
2380 (java_expand_classes): Update comments.
2381 (lookup_method_invoke): Call fix_constructors immediately for
2382 anonymous class. Fixes PR java/5935.
2383
2384 2002-03-15 Anthony Green <green@redhat.com>
2385
2386 * jcf-parse.c (yyparse): Don't emit class registration
2387 constructor when compiling resource files.
2388
2389 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2390
2391 * lang.c (java_tree_code_type, java_tree_code_length,
2392 tree_code_name): Delete.
2393 (tree_code_type, tree_code_length, tree_code_name): Define.
2394 (java_init): Don't try to copy into the various tree_code
2395 arrays.
2396
2397 2002-03-12 Tom Tromey <tromey@redhat.com>
2398
2399 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
2400 UTF-8, not UCS-2. Fixes PR java/5923.
2401
2402 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
2403 a call_expr wrapped in a convert. Fixes PR java/5848.
2404
2405 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2406
2407 * jcf-write.c (write_classfile): Improve error strings.
2408
2409 2002-03-11 Eric Blake <ebb9@email.byu.edu>
2410
2411 * lex.c: Adjust comments to GNU standards.
2412
2413 2002-03-11 Eric Blake <ebb9@email.byu.edu>
2414
2415 Fix for PR java/5902:
2416 * lex.c (java_lex): Fix parsing of literals.
2417
2418 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2419
2420 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
2421 to prevent it getting evaluated twice in the store checking case.
2422 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
2423 examining OBJECT.
2424
2425 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2426
2427 * decl.c (java_init_decl_processing): Make sure class_type_node
2428 alignment is not less than 64 bits if hash synchronization is enabled.
2429
2430 2002-03-08 Per Bothner <per@bothner.com>
2431
2432 * parse.y (java_complete_lhs): Check if patch_assignment
2433 returned an error-mark.
2434
2435 * parse.y (try_builtin_assignconv): Don't special-case zero.
2436
2437 2002-03-08 Per Bothner <per@bothner.com>
2438
2439 Fix for PR java/5812.
2440 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
2441 here instead of in JSR macro. Likewise with load_type_state call.
2442 Do the latter on if the return_pc has been verified (the jsr returns).
2443 (JSR): Now just call build_java_jsr.
2444
2445 2002-03-07 Jeff Sturm <jsturm@one-point.com>
2446
2447 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
2448 (java.install-common): Link native driver to
2449 JAVA_TARGET_INSTALL_NAME.
2450
2451 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
2452
2453 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
2454 * builtins.c(sin_builtin): Likewise
2455 * builtins.c(sqrt_builtin): Likewise
2456
2457 2002-03-03 Zack Weinberg <zack@codesourcery.com>
2458
2459 * java/expr.c, java/jcf-parse.c, java/lex.c:
2460 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
2461 REAL_ARITHMETIC blocks unconditional. Delete some further
2462 #ifdef blocks predicated on REAL_ARITHMETIC.
2463
2464 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2465
2466 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
2467 explicit sizeof/sizeof.
2468 * decl.c (java_init_decl_processing): Likewise.
2469 * jcf-parse.c (init_jcf_parse): Likewise.
2470 * parse.y (init_src_parse): Likewise.
2471
2472 2002-03-02 Per Bothner <per@bothner.com>
2473
2474 Make --CLASSPATH by a synonym for --classpath and -classpath.
2475 Implement --bootclasspath.
2476 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
2477 (classpath_l): Remove.
2478 (jcf_path_CLASSPATH_arg): Remove.
2479 (jcf_path_bootclasspath_arg): New function.
2480 (jcf_path_seal): Simplify accordingly.
2481
2482 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
2483 (jcf_path_CLASSPATH): Remove declaration.
2484 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
2485 (lang_specific_driver): Translate -bootclasspath.
2486 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
2487 * lang.c (decode_lang_options): Do jcf_path_init first.
2488 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
2489 * gjavah.c: Also handle --bootclasspath.
2490 Handle --CLASSPATH as a synonum for --classpath.
2491 * jcf-dump.c: Likewise.
2492
2493 "." is not part of system path, but is the default for --classpath.
2494 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
2495 (jcf_path_seal): Add "." if no CLASSPATH specified.
2496
2497 * gcj.texi: Document changes.
2498
2499 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2500
2501 * expr.c (build_java_arraystore_check): Fix formatting.
2502
2503 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
2504
2505 Fix for PR java/5758, java/5632:
2506 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
2507 inner-class separator too.
2508 * parse.y (do_resolve_class): New local `decl_result.'
2509 Progressively build a name for what can have been loaded.
2510
2511 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2512
2513 * expr.c (java_array_data_offset): Removed function.
2514 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
2515 (build_java_array_length_access): Obtain "length" value using a
2516 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
2517 (build_java_arrayaccess): Correct comment. Access "data" using a
2518 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
2519 (build_java_arraystore_check): New function.
2520 (expand_java_arraystore): Use build_java_arraystore_check.
2521 * parse.y (patch_assignment): Simplify code to insert a store check
2522 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
2523 * check-init.c (check_init): Update to reflect that an array length
2524 access is now a COMPONENT_REF.
2525 * gcj.texi (Code Generation): Improve documentation of
2526 -fno-bounds-check. Add documentation for -fno-store-check.
2527 * java-tree.h (flag_store_check): Declare.
2528 (build_java_arraystore_check): Declare.
2529 * lang.c (flag_store_check): Initialize to 1.
2530 (lang_f_options): Add store-check option.
2531 * jvspec.c: Don't pass store-check option to jvgenmain.
2532 * lang-options.h: Add help string for -fno-store-check.
2533
2534 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
2535
2536 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
2537 * java-tree.h (java_dup_lang_specific_decl): New.
2538 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2539
2540 2002-02-27 Zack Weinberg <zack@codesourcery.com>
2541
2542 * builtins.c, decl.c: Delete traditional-mode-related code
2543 copied from the C front end but not used, or used only to
2544 permit the compiler to link.
2545
2546 2002-02-22 Tom Tromey <tromey@redhat.com>
2547
2548 Fix for PR java/2369:
2549 * jvspec.c (verify_class_name): New function.
2550 (lang_specific_driver): Call it.
2551 (JAVA_START_CHAR_P): New macro.
2552 (JAVA_PART_CHAR_P): Likewise.
2553
2554 2002-02-22 Per Bothner <per@bothner.com>
2555
2556 * class.c: Change vtable to be more compatible with g++ v3 abi.
2557 (get_dispatch_table): Prepend offset-to-top (always 0) and
2558 type_info pointer (currently unimplemented hence NULL) to vtable.
2559 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
2560 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
2561 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
2562 (build_dtable_decl): Add declarations for new fields.
2563
2564 2002-02-20 Per Bothner <per@bothner.com>
2565
2566 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
2567 to finit$ (otherwise generate_bytecode_insns drops it). However, we
2568 don't need to set it on the COMPOUND_EXPR - the caller does that.
2569
2570 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
2571
2572 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
2573 `--CLASSPATH' becomes `--classpath.'
2574 * gjavah.c: Likewise.
2575 * jcf-dump.c: Likewise.
2576 * lang-options.h: Likewise.
2577 * lang.c: Likewise.
2578 * jcf-path.c: Updated comment.
2579 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
2580 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
2581 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
2582 (jcf_path_CLASSPATH_arg): Ditto.
2583 (classpath_u): Updated leading comment.
2584
2585 2002-02-20 Per Bothner <per@bothner.com>
2586
2587 * builtins.c (check_for_builtin): New function.
2588 (build_call_or_builtin): Remove.
2589 * java-tree.h: Update accordingly.
2590 * expr.c (expand_invoke): Use build + check_for_builtin instead
2591 of build_call_or_builtin.
2592 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
2593 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
2594 flag (which had caused jcf-write to incorrectly emit invokevirtual).
2595
2596 2002-02-17 Tom Tromey <tromey@redhat.com>
2597
2598 * java-tree.h (TYPE_STRICTFP): New macro.
2599 (struct lang_type) [strictfp]: New field.
2600 (CLASS_STRICTFP): New macro.
2601 (METHOD_STRICTFP): New macro.
2602 (struct lang_decl) [strictfp]: New field.
2603 * parse.y (method_header): Disallow strictfp constructor or
2604 abstract method.
2605 (STRICT_TK): Move before MODIFIER_TK.
2606 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
2607 (METHOD_MODIFIERS): Likewise.
2608 (INTERFACE_MODIFIERS): Likewise.
2609 * jcf-write.c (get_access_flags): Likewise.
2610 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
2611 (add_method_1): Likewise.
2612 (get_access_flags_from_decl): Likewise.
2613 * jcf-dump.c (print_access_flags): Print in standard order. Also,
2614 recognize strictfp flag.
2615 * jcf.h (ACC_STRICT): New define.
2616
2617 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
2618
2619 * class.c(build_utf8_ref): Move declaration of decl_size
2620
2621 2002-02-07 Tom Tromey <tromey@redhat.com>
2622
2623 * gcj.texi (Input Options): --CLASSPATH does not suppress system
2624 path.
2625
2626 2002-02-04 Anthony Green <green@redhat.com>
2627
2628 * class.c (build_utf8_ref): Put UTF-8 constants into merged
2629 sections if available.
2630
2631 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2632
2633 * parse.y (java_expand_classes): Fix typo in static field loop.
2634
2635 2002-02-02 Richard Henderson <rth@redhat.com>
2636
2637 * class.c (add_field): Mark static fields external.
2638 (build_class_ref): Remove redundant set.
2639 * parse.y (java_expand_classes): Mark static fields of classes
2640 to be compiled as local.
2641 * jcf-parse.c (parse_class_file): Likewise.
2642
2643 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
2644
2645 * gcj.texi (About CNI): New node.
2646
2647 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
2648
2649 PR java/5080
2650 * jcf-parse.c : Check for HAVE_LOCALE_H before using
2651 setlocale() with LC_CTYPE as a parameter.
2652 * jv-scan.c: Same.
2653
2654 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
2655
2656 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
2657 Follow GNU Coding Standards for --version.
2658
2659 2002-01-28 Tom Tromey <tromey@redhat.com>
2660
2661 * expr.c (build_jni_stub): Ensure storage for `meth' is
2662 generated.
2663 * parse.y (java_complete_expand_methods): Set
2664 current_function_decl before building JNI stub.
2665
2666 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
2667
2668 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
2669 BUILT_IN_SQRTF.
2670
2671 2002-01-22 Tom Tromey <tromey@redhat.com>
2672
2673 * decl.c (java_init_decl_processing): Use add_predefined_file.
2674 Predefine RawData.java.
2675 (predef_filenames): Removed.
2676 (java_init_decl_processing): Don't register predef_filenames.
2677 * jcf-parse.c (add_predefined_file): New function.
2678 (predefined_filename_p): Rewrote.
2679 (predefined_filename_p): No longer static.
2680 * decl.c (java_init_decl_processing): Call initialize_builtins.
2681 * Make-lang.in (JAVA_OBJS): Added builtins.o.
2682 (java/builtins.o): New target.
2683 * builtins.c: New file.
2684 * parse.y (patch_invoke): Use build_call_or_builtin.
2685 * java-tree.h (build_call_or_builtin): Declare.
2686 (initialize_builtins): Declare.
2687 (java_set_exception_lang_code): Removed unused declaration.
2688 (PREDEF_FILENAMES_SIZE): Removed.
2689 (java_tree_index): Added JTI_PREDEF_FILENAMES.
2690 (predef_filenames): New define.
2691 (add_predefined_file): Declare.
2692 (predefined_filename_p): Declare.
2693 * expr.c (expand_invoke): Use build_call_or_builtin.
2694
2695 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2696
2697 * parse.y (patch_switch_statement): Fix format specifier.
2698
2699 2002-01-16 Tom Tromey <tromey@redhat.com>
2700
2701 More for PR java/5365:
2702 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
2703 default.
2704 (process_file): Generate include for
2705 java.lang.UnsupportedOperationExceptions.
2706
2707 2002-01-15 Andreas Jaeger <aj@suse.de>
2708
2709 * .cvsignore: Add man pages.
2710
2711 2002-01-15 Tom Tromey <tromey@redhat.com>
2712
2713 Fix for PR java/5365:
2714 * gjavah.c (process_file): Turn class name into a file name.
2715
2716 2002-01-14 Matthias Klose <doko@debian.org>
2717
2718 * gcj.texi: Fix whitespace and formatting errors in the
2719 synopsis of the man pages. Update copyright.
2720
2721 2002-01-14 Tom Tromey <tromey@redhat.com>
2722
2723 For PR libgcj/5303:
2724 * Make-lang.in (java.install-man): Handle jv-convert man page.
2725 (java.generated-manpages): Added jv-convert.1.
2726 (java.uninstall): Remove jv-convert.1.
2727 (java.maintainer-clean): Likewise.
2728 ($(srcdir)/java/jv-convert.1): New target.
2729 * gcj.texi (Top): Link to jv-convert node.
2730 (Individual utilities): Likewise.
2731 (Invoking jv-convert): New node.
2732
2733 2001-01-10 Jeff Sturm <jsturm@one-point.com>
2734 Martin Kahlert <martin.kahlert@infineon.com>
2735
2736 * jcf-parse.c (get_constant): Don't swap lo/hi for big
2737 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
2738
2739 2002-01-03 Graham Stott <grahams@redhat.com>
2740
2741 * class.c (compile_resource_file): Update copyright date.
2742 Constify filename parameter.
2743 (java-tree.h): Update copyright date.
2744 (compile_resource_file): Constify filename parameter.
2745
2746 2002-01-03 Graham Stott <grahams@redhat.com>
2747
2748 * gcc/jcf-parse.c: Update copyright date.
2749 (yyparse): Constify resource_filename.
2750
2751 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2752
2753 * parse.y (src_parse_roots): Don't needlessly zero init.
2754
2755 2001-12-31 Tom Tromey <tromey@redhat.com>
2756
2757 * parse.y (dump_java_tree): New function.
2758 (source_end_java_method): Call it.
2759 (end_class_declaration): Likewise.
2760 * lang.c (java_decode_option): Call dump_switch_p.
2761
2762 2001-12-28 Tom Tromey <tromey@redhat.com>
2763
2764 * gen-table.pl: Don't process characters after \uffff. Added
2765 comment pointing to input file.
2766
2767 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2768
2769 * gen-table.pl: Const-ify output. Document the location of a
2770 suitable unicode input file.
2771
2772 * chartables.h: Regenerate.
2773
2774 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2775
2776 * chartables.h: Const-ify.
2777 * gjavah.c (options): Likewise.
2778 * jcf-dump.c (options): Likewise.
2779 * jv-scan.c (options): Likewise.
2780 * lex.c (java_start_char_p, java_part_char_p): Likewise.
2781 * parse.y (binop_lookup): Likewise.
2782
2783 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2784
2785 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
2786 the static arrays that are output.
2787 * jvspec.c (jvgenmain_spec): Make static.
2788 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
2789 * keyword.h: Regenerate.
2790 * lang.c (string_option, process_option_with_no, lang_f_options,
2791 lang_W_options): Const-ify.
2792 * lex.c (java_lex): Likewise.
2793
2794 2001-12-21 Richard Henderson <rth@redhat.com>
2795
2796 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
2797 (get_boehm_type_descriptor): ... here. Arrange for the
2798 TREE_TYPE to get set properly.
2799
2800 2001-12-21 Richard Henderson <rth@redhat.com>
2801
2802 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
2803 only if the target requires collect2.
2804
2805 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
2806
2807 2001-12-20 Tom Tromey <tromey@redhat.com>
2808
2809 For PR java/4509:
2810 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
2811 CAN_COMPLETE_NORMALLY for the node.
2812 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
2813 generate code for second branch if first branch can't complete
2814 normally.
2815 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
2816 the loop head if the loop body can't complete normally.
2817
2818 2001-12-20 Tom Tromey <tromey@redhat.com>
2819
2820 For PR java/4766:
2821 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
2822 case where `finally' clause can't complete normally.
2823
2824 2001-12-20 Tom Tromey <tromey@redhat.com>
2825
2826 Fixes PR java/5057:
2827 * parse.y (analyze_clinit_body): Added this_class parameter.
2828 Check for more cases where we must keep <clinit>.
2829 (maybe_yank_clinit): Cleaned up flow control.
2830
2831 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2832
2833 * decl.c (java_init_decl_processing): Don't initialize
2834 finit_leg_identifier_node.
2835 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
2836 (finit_leg_identifier_node): Remove.
2837 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
2838
2839 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2840
2841 * mangle.c (mangle_member_name): Don't special-case for
2842 NO_DOLLAR_IN_LABEL.
2843 * mangle_name.c (unicode_mangling_length): Likewise.
2844 (append_unicode_mangled_name): Likewise.
2845 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
2846 code.
2847
2848 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2849
2850 * expr.c (build_java_array_length_access): Don't force null pointer
2851 check unless flag_check_references is set.
2852
2853 2001-12-20 Tom Tromey <tromey@redhat.com>
2854
2855 Fix for PR java/3417:
2856 * parse.y (patch_assignment): Added special processing for
2857 `return'.
2858 (patch_return): Don't convert booleans to integers, and don't
2859 special-case `null'.
2860
2861 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
2862
2863 * config-lang.in (diff_excludes): Remove.
2864
2865 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
2866
2867 * gcj.texi: Update link to GCC manual.
2868
2869 2001-12-17 Tom Tromey <tromey@redhat.com>
2870
2871 * parse.y (link_nested_class_to_enclosing): Removed useless
2872 statement.
2873
2874 2001-12-16 Tom Tromey <tromey@redhat.com>
2875
2876 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
2877 Fixes PR java/5088.
2878
2879 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
2880
2881 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
2882 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
2883 spelling errors.
2884
2885 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2886
2887 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
2888
2889 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2890
2891 * decl.c (java_init_decl_processing): Build otable_type correctly.
2892 otable_decl is an otable_type.
2893
2894 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
2895
2896 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
2897 otable_type, otable_ptr_type, method_symbol_type,
2898 method_symbols_array_type, method_symbols_array_ptr_type): New
2899 field/global tree definitions.
2900 (flag_indirect_dispatch): New flag.
2901 * decl.c (java_init_decl_processing): Initialize new otable and
2902 otable_syms type nodes and decls. Add new field "index" to
2903 method_type_node.
2904 * class.c (build_method_symbols_entry): New function.
2905 (make_method_value): Set "index" to to method's vtable index for
2906 virtual methods when indirect-dispatch is not used.
2907 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
2908 and set vtable_method_count to -1. Set otable and otable_syms field
2909 if indirect-dispatch is used and there was something to put in them.
2910 (build_method_symbols_entry): New function.
2911 (emit_offset_symbol_table): New function.
2912 * expr.c (get_offset_table_index): New function.
2913 (build_invokevirtual): Build array reference to otable at the index
2914 returned by get_offset_table_index, and use the result as the vtable
2915 offset.
2916 (build_invokeinterface): Similar.
2917 * jcf-parse.c (yyparse): If indirect-dispatch, call
2918 emit_offset_symbol_table at the end of compilation, after all classes
2919 have been generated.
2920 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
2921 * lang.c (flag_indirect_dispatch): Define.
2922 (lang_f_options): Add indirect-dispatch flag.
2923
2924 2001-12-14 Matthias Klose <doko@debian.org>
2925
2926 * gcj.texi: Markup for man page generation. Document missing
2927 options printed by <tool> --help.
2928 Terminate description of gij's -ms option with a dot.
2929 * Make-lang.in ($(srcdir)/java/*.1): New targets.
2930 (java.generated-manpages java.install-man, java.uninstall,
2931 java-maintainer-clean) Updated.
2932
2933 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
2934
2935 * class.c (get_dispatch_table): Fix java vtable layout
2936 for TARGET_VTABLE_USES_DESCRIPTORS.
2937 * decl.c (java_init_decl_processing): Initialize
2938 alloc_no_finalizer_node, finalize_identifier_node.
2939 * expr.c (class_has_finalize_method): New function.
2940 (expand_java_NEW): Generate calls for finalizer-free allocation.
2941 (build_invokevirtual): Fix java vtable layout for
2942 TARGET_VTABLE_USES_DESCRIPTORS.
2943 * java-tree.h (enum java_tree_index): New entries:
2944 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
2945 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
2946 (class_has_finalize_method): declare.
2947 (HAS_FINALIZER_P): New macro.
2948 * parse.y (patch_invoke): Generate calls for finalizer-free
2949 allocation.
2950
2951 2001-12-12 Matthias Klose <doko@debian.org>
2952
2953 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
2954 whitespace at end of line.
2955
2956 2001-12-11 Tom Tromey <tromey@redhat.com>
2957
2958 * lex.c (java_init_lex): Define wfl_to_string as
2959 gnu.gcj.runtime.StringBuffer unless generating bytecode.
2960
2961 2001-12-11 Jeff Sturm <jsturm@one-point.com>
2962
2963 * class.c (make_method_value): Use null_pointer_node to
2964 represent empty exception table.
2965
2966 2001-12-10 Tom Tromey <tromey@redhat.com>
2967
2968 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
2969
2970 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
2971
2972 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
2973
2974 2001-12-09 Per Bothner <per@bothner.com>
2975
2976 * check-init.c (current_switch_has_default): New static field.
2977 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
2978 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
2979 DEFAULT_EXPR seen, simulate a default alternative that copies state.
2980
2981 2001-12-09 Tom Tromey <tromey@redhat.com>
2982
2983 * check-init.c (check_init): Don't allow pre- or post- increment
2984 or decrement of final variable.
2985 (final_assign_error): Minor error message rewording.
2986
2987 2001-12-08 Tom Tromey <tromey@redhat.com>
2988
2989 * java-tree.h: Fixed typo.
2990
2991 * gjavah.c (decompile_method): Don't decompile to `return this'
2992 for static methods.
2993
2994 * gjavah.c (cxx_keywords): Re-sorted.
2995 * lex.c (cxx_keywords): Re-sorted.
2996
2997 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
2998 else.
2999
3000 * gjavah.c (print_namelet): Clear subnamelets.
3001 (HANDLE_METHOD): Set `method_printed' earlier.
3002
3003 2001-12-07 Tom Tromey <tromey@redhat.com>
3004
3005 * lang.c (lang_f_options): Added
3006 optimize-static-class-initialization.
3007 (java_decode_option): Removed special case.
3008
3009 2001-12-07 Per Bothner <per@bothner.com>
3010
3011 * check-init.c (check_init): Fix typo freeing memory twice.
3012
3013 2001-12-05 Per Bothner <per@bothner.com>
3014
3015 Restore support for static class initialization optimization.
3016 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
3017 * check-init.c (check_int): At end of BLOCK handle initialization
3018 blocks, which used to be done in java_complete_expand_method but did
3019 not handle the case where check_for_initialization might allocate
3020 more than a word of bits.
3021 * decl.c (lang_make_tree): The smic field is now a tree.
3022 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
3023 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
3024
3025 * parse.y (emit_test_initialization): Combine hash_lookup calls.
3026
3027 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
3028 Change from a hash table to a list.
3029 (struct_lang_decl): Change field 'smic' to match.
3030 * class.c (add_method_1): Initialize
3031 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
3032 * parse.y (adjust_init_test_initialization): Removed - inlined into -
3033 (java_expand_method_bodies): -here, since 'smic' is now a list.
3034 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
3035
3036 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
3037
3038 * class.c (java_hash_compare_tree_node): Fix casts.
3039
3040 2001-12-04 Per Bothner <per@bothner.com>
3041
3042 * check-init.c: Handle definite unassignment to finals in addition
3043 to definite assignment.
3044 (loop_current_locals): New field.
3045 (num_current_locals, int start_current_locals, num_current_words):
3046 Make static.
3047 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
3048 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
3049 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
3050 (get_variable_decl, check_final_reassigned): New functions.
3051 (check_init, check_bool_init): Modify as needed for checking finals.
3052 (check_for_initialization): Take extra parameter and return void.
3053 Do extra start-up logic to check final fields for assignment.
3054 * parse.y (check_static_final_variable_assignment_flag,
3055 reset_static_final_variable_assignment_flag, check_final_assignment,
3056 check_final_variable_local_assignment_flag,
3057 reset_final_variable_indirect_assignment_flag,
3058 reset_final_variable_global_assignment_flag): Remove functions.
3059 (java_complete_expand_methods, outer_field_access_fix,
3060 patch_assignment): Remove no-longer used logic.
3061 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
3062 * parse.y (register_fields, java_complete_tree): Update accordingly.
3063
3064 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
3065 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
3066 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
3067
3068 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
3069
3070 * java-tree.h (DECL FINAL): New bit-field.
3071 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
3072 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
3073 (DECL_INIT_CALLS_THIS): New macro.
3074 (struct lang_decl): New bit-field init_calls_this.
3075 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
3076 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
3077 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
3078 use it for both local variables and final fields.
3079 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
3080 and local_final.
3081 (struct lang_type): Remove hfv bit-field.
3082 (check_for_initialization): Change to return void.
3083
3084 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
3085 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
3086 * check-init.c (final_assign_error): New helper function.
3087 (check_final_reassigned, check_init): Use it.
3088 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
3089
3090 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
3091 bit-fields to unsigned.
3092
3093 2001-12-03 Per Bothner <per@bothner.com>
3094
3095 * parse.y (patch_binop): Minor constant folding.
3096
3097 * parse.y (build_current_thisn): Shorter 'buffer'.
3098
3099 2001-12-03 Per Bothner <per@bothner.com>
3100
3101 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
3102 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
3103 * jcf-write.c (generate_bytecode_insns): Remove support for
3104 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
3105 * check-init.c (check_init): Likewise.
3106
3107 2001-12-03 Per Bothner <per@bothner.com>
3108
3109 * verify.c (subroutine_nesting): New function.
3110 (verify_jvm_instructions): Use it to fix logic for checking that
3111 we're done with the current subroutine.
3112
3113 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
3114 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
3115
3116 2001-12-03 Per Bothner <per@bothner.com>
3117
3118 * jcf.h: Fix obvious typo in comment.
3119 * typeck.c (build_null_signature): Add comment.
3120
3121 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
3122
3123 * expr.c: Remove leading capital from diagnostic messages, as
3124 per GNU coding standards.
3125 * jcf-io.c: Similarly.
3126 * jcf-parse.c: Similarly.
3127 * jv-scan.c: Similarly.
3128 * jvspec.c: Similarly.
3129 * mangle.c: Similarly.
3130
3131 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
3132 Alexandre Petit-Bianco <apbianco@redhat.com>
3133
3134 * expr.c (build_java_arrayaccess): Call save_expr on array for
3135 correct evaluation order, modified comment, fixed indentation.
3136 * parse.y: (patch_assignment): Correctly extract the array base
3137 from the tree generate by build_java_arrayaccess, added comments.
3138 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
3139 Fixes PR java/3096, PR java/3803, PR java/3965.
3140
3141 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
3142
3143 * expr.c (expand_byte_code): Remove trailing periods from messages.
3144 * jcf-parse.c (load_class, jcf_parse): Similarly.
3145 * jcf-write.c (generate_classfile): Similarly.
3146 * lex.c (java_lex): Similarly.
3147
3148 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3149
3150 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
3151
3152 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
3153
3154 * Make-lang.in (java.generated-manpages): New dummy target.
3155
3156 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3157
3158 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3159 ASM_FINAL_SPEC.
3160 (lang_specific_pre_link): Use set_input to set input_filename.
3161 Append `main' here.
3162 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3163 (main): Fix definition.
3164 Strip `main' from classname.
3165 Fixes PR java/227.
3166
3167 2001-11-18 Roger Sayle <roger@eyesopen.com>
3168
3169 * parse.h (java_expand_switch): Remove old prototype.
3170
3171 2001-11-18 Tom Tromey <tromey@redhat.com>
3172
3173 Fix for PR java/1401:
3174 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
3175 arg0 is null.
3176 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
3177 correctly.
3178
3179 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
3180
3181 * lang.c (finish_parse): Rename to java_finish.
3182 (LANG_HOOKS_FINISH, java_finish): New.
3183
3184 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
3185
3186 * decl.c (init_decl_processing): Rename java_init_decl_processing.
3187 * java-tree.h: New prototype.
3188 * lang.c (java_init): Update prototype. Combine with old init_parse.
3189
3190 2001-11-13 Tom Tromey <tromey@redhat.com>
3191
3192 * gjavah.c (method_signature): New global.
3193 (HANDLE_METHOD): Set it.
3194 (decompile_return_statement): New function.
3195 (decompile_method): Use it.
3196 (print_method_info): Removed `synth' argument.
3197
3198 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3199
3200 * java-tree.h (java_set_yydebug): New.
3201 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
3202 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
3203 (print_lang_decl, print_lang_type, print_lang_identifier,
3204 print_lang_statistics, lang_print_xnode): Remove.
3205
3206 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
3207
3208 * jcf-parse.c (init_lex): Remove.
3209 * lang.c (language_string, lang_identify): Remove.
3210 (struct lang_hooks): Constify.
3211 (LANG_HOOKS_NAME): Override.
3212 (init_parse): Update.
3213
3214 2001-11-08 Andreas Franck <afranck@gmx.de>
3215
3216 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
3217 program_transform_name the way suggested by autoconf.
3218 (java.install-common): Also transform auxiliary program names with
3219 program_transform_name.
3220
3221 2001-11-08 Tom Tromey <tromey@cygnus.com>
3222
3223 * parse.y (trap_overflow_corner_case): New rule.
3224 (unary_expression): Use it.
3225 * lex.c (java_init_lex): Don't set minus_seen.
3226 (yylex): Don't use minus_seen. Communicate overflow to parser for
3227 it to handle.
3228 (error_if_numeric_overflow): New function.
3229 * parse.h (minus_seen): Removed field.
3230 (JAVA_RADIX10_FLAG): New define.
3231
3232 2001-11-07 Tom Tromey <tromey@redhat.com>
3233
3234 Patch for PR java/1414:
3235 * parse.y (case_label_list): New global.
3236 (goal): Register case_label_list with GC.
3237 (java_complete_lhs): Save new case on case_label_list.
3238 (patch_switch_statement): Check for duplicate case labels.
3239
3240 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
3241
3242 * parse.y (patch_assignment): Removed unused third argument.
3243 (java_complete_lhs): Removed unused third argument to patch_assignment.
3244
3245 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
3246
3247 * lang.c: Include langhooks-def.h.
3248 * Make-lang.in: Update.
3249
3250 2001-10-31 Zack Weinberg <zack@codesourcery.com>
3251
3252 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3253
3254 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3255
3256 * mangle.c (find_compression_record_match): Don't match compression
3257 records for package name elements unless they occur at the start of
3258 the name. Fix for PR java/4717.
3259
3260 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3261
3262 * expr.c (expand_java_field_op): Don't special-case references to
3263 java.lang.PRIMTYPE.TYPE.
3264 (build_primtype_type_ref): Removed.
3265 * java-tree.h (build_primtype_type_ref): Remove prototype.
3266 * parse.y (maybe_build_primttype_type_ref): Removed.
3267 (complete_function_arguments): Don't special-case references to
3268 java.lang.PRIMTYPE.TYPE.
3269 (patch_assignment): Likewise.
3270 (array_constructor_check_entry): Likewise.
3271
3272 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
3273
3274 * mangle.c (static tree compression_table): Fixed leading comment.
3275 * parse.h (struct parser_ctxt): Fixed field comment.
3276 * parse.y (check_pkg_class_access): New prototype, fixed leading
3277 comment, new parameter used to emit error only if passed as true.
3278 (parse_check_super): Pass extra argument to check_pkg_class_access.
3279 (do_resolve_class): Likewise.
3280 (process_imports): Likewise.
3281 (read_import_dir): Fixed indentation.
3282 (find_in_imports_on_demand): New local class_type_name. Local
3283 node_to_use deleted. while loop changed into for loop. Report
3284 multiple definition only for accessible classes. Improved error
3285 message.
3286 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
3287 assigned to parameter list, fixed indentation. while loop changed
3288 into for loop, restore TREE_CHAIN on local `tem' before the next
3289 iteration.
3290
3291 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3292
3293 * lang.c (lang_get_alias_set): Deleted.
3294
3295 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3296
3297 * gjavah.c (jni_print_char): Fix thinko in last change.
3298
3299 * gjavah.c (jni_print_char, decode_signature_piece): Use
3300 safe-ctype macros and/or fold extra calls into fewer ones.
3301 * lex.c (java_read_unicode, java_lex): Likewise.
3302 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
3303 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
3304 * mangle_name.c (append_unicode_mangled_name,
3305 unicode_mangling_length): Likewise.
3306
3307 2001-10-17 Richard Henderson <rth@redhat.com>
3308
3309 * Make-lang.in (java/lang.o): Depend on langhooks.h.
3310
3311 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
3312
3313 * lang.c (langhooks.h): Included.
3314 (LANG_HOOKS_INIT): Redefined.
3315 (LANG_HOOKS_INIT_OPTIONS): Likewise.
3316 (LANG_HOOKS_DECODE_OPTION): Likewise.
3317 (struct lang_hooks lang_hooks): New initialization.
3318
3319 2001-10-11 Per Bothner <per@bothner.com>
3320
3321 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
3322 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
3323 The former is simpler, and jcf-write.c handles it better.
3324 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
3325 or WITH_CLEANUP_EXPR.
3326 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
3327 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
3328
3329 * parse.y (patch_if_else_statement): If the condition is constant,
3330 optimize away the test.
3331
3332 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3333
3334 * parse.y (patch_cast): Call patch_string on the first operand of
3335 the incoming node, update it if necessary. Fixes PR java/4510.
3336
3337 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
3338
3339 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
3340 when name qualifier matches a package name.
3341
3342 2001-10-08 Tom Tromey <tromey@redhat.com>
3343
3344 Fix for PR java/4489:
3345 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
3346 force a new label when computing `body_block'.
3347
3348 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3349
3350 * jcf-io.c (format_uint): Const-ify.
3351 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
3352 * lex.c (java_get_line_col): Likewise.
3353 * parse.y (build_incdec): Likewise.
3354
3355 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
3356
3357 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
3358 a NULL enclosing context if appropriate. Fixes PR java/4466.
3359
3360 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
3361
3362 * parse.y (patch_assignment): Use lvalue's original TYPE when
3363 building the final COMPOUND_EXPR.
3364 (try_reference_assignconv): Fixed leading comment.
3365
3366 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
3367
3368 * parse.y (check_final_variable_indirect_assignment): For
3369 COMPOUND_EXPR, return only if finals were found initialized
3370 properly, if not, keep on checking.
3371 (check_final_variable_global_assignment_flag): New local
3372 error_found, set when appropriate and used to decide whether to
3373 report uninitialized finals. Fixed typo in comment.
3374
3375 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
3376
3377 * decl.c (init_decl_processing): Fixed typo in predef_filenames
3378 last three initializations. Fixes PR java/4360.
3379
3380 2001-09-21 Richard Henderson <rth@redhat.com>
3381
3382 * class.c (get_dispatch_table): Handle function descriptors.
3383 (build_dtable_decl): Likewise.
3384 * expr.c (build_invokevirtual): Likewise.
3385
3386 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
3387
3388 * parse.y (patch_method_invocation): Build class initialization
3389 when static finals are used to qualify method invocation.
3390 Fixes PR java/4366.
3391
3392 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
3393
3394 * parse.h: (WFL_STRIP_BRACKET): Re-written using
3395 build_type_name_from_array_name.
3396 (STRING_STRIP_BRACKETS): New macro.
3397 * parse.y (build_type_name_from_array_name): New function.
3398 (array_creation_expression:): Accumulate []s instead of [s.
3399 (cast_expression:): Accumulate []s instead of [s after cast type
3400 name.
3401 (build_array_from_name): Local string deleted, use
3402 build_type_name_from_array_name.
3403 (build_unresolved_array_type): Accumulate []s instead of [s after
3404 type name.
3405 (register_fields): Fixed comment.
3406 (resolve_class): Local name, base deleted, new locals tname and
3407 array_dims. Use build_type_name_from_array_name. Use array_dims to
3408 build array type.
3409 (purify_type_name): Use STRING_STRIP_BRACKETS.
3410
3411 2001-09-18 Andreas Jaeger <aj@suse.de>
3412
3413 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
3414 * jv-scan.c: Likewise.
3415
3416 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
3417
3418 * parse.y (patch_method_invocation): Inner class creation context
3419 check not enforced within constructors. Fixes PR java/1873.
3420
3421 2001-09-16 Tom Tromey <tromey@redhat.com>
3422
3423 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
3424 NOTE_PUSH for single-case push. Fixes PR java/4189.
3425
3426 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
3427
3428 * java-tree.h (TYPE_IMPORT_LIST): New macro.
3429 (TYPE_IMPORT_DEMAND_LIST): Likewise.
3430 (struct lang_type): New fields import_list and import_demand_list.
3431 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
3432 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
3433 (do_resolve_class): New local saved_enclosing_type, initialized,
3434 passed as parameter to find_in_imports and find_in_imports_on_demand.
3435 (find_in_imports): Added paramater enclosing_type, use its
3436 TYPE_IMPORT_LIST when applicable.
3437 (find_in_imports_on_demand): Added parameter enclosing_type, use
3438 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
3439 declaration and initialization.
3440 (fold_constant_for_init): Switch/restore current_class to the
3441 appropriate context.
3442
3443 2001-09-13 Mark Mitchell <mark@codesourcery.com>
3444
3445 * verify.c (verify_jvm_instructions): Fix typo.
3446
3447 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3448
3449 * expr.c (expand_invoke): Const-ification.
3450 * parse.y (patch_method_invocation): Likewise.
3451
3452 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3453
3454 * gjavah.c (cxx_keywords): Const-ification.
3455 * keyword.gperf (java_keyword): Likewise.
3456 * lang.c (java_tree_code_name): Likewise.
3457 * lex.c (cxx_keywords): Likewise.
3458 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
3459
3460 2001-09-11 Richard Henderson <rth@redhat.com>
3461
3462 * parse.h (ctxp_for_generation): Mark extern.
3463
3464 2001-09-10 Richard Henderson <rth@redhat.com>
3465
3466 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
3467
3468 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
3469
3470 * typeck.c (java_array_type_length, build_prim_array_type):
3471 Represent empty arrays by NULL index.
3472
3473 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
3474
3475 * java-tree.h (compile_resource_file): Grouped with other prototypes.
3476 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
3477
3478 2001-09-06 Anthony Green <green@redhat.com>
3479
3480 * class.c (O_BINARY): Define if necessary.
3481 (registerResource_libfunc): Declare.
3482 (init_class_processing): Initilize registerResource_libfunc.
3483 (compile_resource_file): New function.
3484 * java-tree.h (resource_name): Declare.
3485 (compile_resource_file): Declare.
3486 * jcf-parse.c (yyparse): Handle compiling java resource files.
3487 * lang.c (java_decode_option): Handle -fcompile-resource option.
3488 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
3489 resource files.
3490 * gcj.texi (Code Generation): Add documentation for -R flag.
3491
3492 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
3493
3494 * jcf-write.c (generate_classfile): Issue an error in case of
3495 field/initial value mismatch.
3496 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
3497 being initialized and we're generating bytecode.
3498 (java_complete_lhs): In MODIFY_EXPR section: added comments,
3499 set DECL_INITIAL properly when appropriate.
3500 Fixes PR java/4230
3501 Fixes PR java/4204
3502
3503 2001-09-01 Per Bothner <per@bothner.com>
3504
3505 * parse.y (maybe_yank_clinit): A field without an initializer is not
3506 relevant. All initializers except static final and constant require
3507 <clinit>, regardless of flag_emit_class_files.
3508
3509 2001-08-31 Per Bothner <per@bothner.com>
3510
3511 * class.c (set_constant_value): When not emitting class files, then a
3512 String ConstantValue is a utf8const_ptr_type.
3513
3514 2001-08-30 Per Bothner <per@bothner.com>
3515
3516 * jcf-write.c (generate_classfile): Check that field is primitive
3517 or string before emitting ConstantValue attribute.
3518
3519 2001-08-30 Per Bothner <per@bothner.com>
3520
3521 * parse.y (resolve_qualified_expression_name): If creating a
3522 COMPOUND_EXPR, set it's type correctly.
3523
3524 2001-08-30 Per Bothner <per@bothner.com>
3525
3526 * jcf-io.c (open_class): Set filename field.
3527
3528 * jcf-parse,c (parse_class_file): Set current_function_decl
3529 for better error message when Code attribute is missing.
3530
3531 * lang.c (put_decl_node, lang_print_error): Re-arrange for
3532 better diagnostics, especially for constructors.
3533
3534 2001-08-30 Per Bothner <per@bothner.com>
3535
3536 * jcf-write.c (generate_classfile): Don't write ConstantValue
3537 attribute if field is not final, for compatibility with jdk.
3538
3539 * jcf-write.c (generate_classfile): Convert ConstantValue values
3540 to correct type. Work-around for front-end bug.
3541 * class.c (set_constant_value): Error if constant has wrong type.
3542
3543 2001-08-30 Per Bothner <per@bothner.com>
3544
3545 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
3546 "Double" are printed at verbosity 1.
3547
3548 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
3549
3550 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
3551
3552 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
3553
3554 * parse.y (patch_assignment): Don't verify final re-assignment here.
3555 (java_complete_lhs): Verify assignments to finals calling
3556 patch_assignment. Verify re-assignments to finals before calling
3557 patch_assignment.
3558
3559 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
3560
3561 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
3562 Fixes PR java/1413
3563
3564 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
3565
3566 * lex.c (java_lex): new local found_hex_digits. Set and then used
3567 in test to reject invalid hexadecimal numbers.
3568 * parse.y (java_complete_tree): Prevent unwanted cast with
3569 initialized floating point finals.
3570 (patch_binop): Emit a warning when detecting a division by zero,
3571 mark result not constant, don't simplify non integer division.
3572
3573 2001-08-28 Per Bothner <per@bothner.com>
3574
3575 * jcf-write.c (generate_bytecode_insns): For increments and
3576 decrements just recurse to push constant. Improvement on Mark's patch.
3577
3578 2001-08-28 Mark Mitchell <mark@codesourcery.com>
3579
3580 * jcf-write.c (generate_bytecode_insns): Generate an integer to
3581 real conversion for increments and decrements of reals.
3582
3583 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3584
3585 * parse.y (resolve_qualified_expression_name): Handle unresolved
3586 qualified expressions, prevent numerical qualifiers, fixed typo.
3587 Fixes PR java/4141
3588
3589 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
3590
3591 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
3592 don't report anything but deprecated class when marked so. Handle
3593 VAR_DECL.
3594 (patch_method_invocation): Check deprecation on methods and types.
3595 (patch_binop): code becomes an enum tree_code, added default: to
3596 switch to handle that. Detect division by zero, try to fold and
3597 return before using a subroutine.
3598
3599 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
3600
3601 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
3602 file smaller than 4 bytes.
3603 * parse.y (check_inner_circular_reference): New function.
3604 (check_circular_reference): Likewise.
3605 (array_initializer:): Accept {,}.
3606 (java_check_circular_reference): Rewritten using
3607 check_circular_reference and check_inner_circular_reference.
3608 (java_complete_expand_method): Unconditionally save and restore
3609 the unpurged exception list.
3610 (build_dot_class_method_invocation): Unmangle signature parameter.
3611
3612 2001-08-21 Tom Tromey <tromey@redhat.com>
3613
3614 * decl.c (init_decl_processing): Add `throws' field to method
3615 descriptor.
3616 * class.c (make_method_value): Compute `throws' field for method.
3617
3618 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
3619
3620 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
3621 circularity is detected.
3622 (ctors_unchecked_throws_clause_p): Fixed leading comment.
3623
3624 2001-08-17 Richard Henderson <rth@redhat.com>
3625
3626 * class.c (emit_register_classes): Add align parameter to
3627 call to assemble_integer.
3628
3629 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
3630
3631 * jcf-parse.c (load_class): New locals saved and class_loaded. If
3632 loading a class_or_name fails, try considering an innerclass name
3633 and load the enclosing context.
3634 * parse.y (resolve_inner_class): New function.
3635 (find_as_inner_class): Added leading comment.
3636 (register_incomplete_type): Keep the current context as enclosing
3637 context for JDEP_FIELD dependencies.
3638 (do_resolve_class): Locals new_class_decl and super initialized to
3639 NULL. Call resolve_inner_class, explore the enclosing context
3640 superclass if necessary.
3641 Fixes PR java/4007
3642
3643 2001-08-16 Tom Tromey <tromey@redhat.com>
3644
3645 * jcf-dump.c (main): Updated for change to jcf_path_seal.
3646 * gjavah.c (main): Updated for change to jcf_path_seal.
3647 * lang.c (version_flag): New global.
3648 (java_decode_option): Recognize `-version'.
3649 (java_init): Update for change to jcf_path_seal.
3650 * jcf.h (jcf_path_seal): Added `print' argument.
3651 * jcf-path.c (jcf_path_seal): Added `print' argument.
3652
3653 2001-08-13 Zack Weinberg <zackw@panix.com>
3654
3655 * Make-lang.in (java/decl.o): Update dependencies.
3656 * decl.c: Include libfuncs.h, don't include toplev.h.
3657
3658 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
3659
3660 * decl.c (init_decl_processing): exception_type_node,
3661 class_not_found_type_node, and no_class_def_found_type_node
3662 initialized. predef_filenames augmented accordingly.
3663 instinit_identifier_node initialized.
3664 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
3665 * java-tree.h (enum java_tree_index): New entries
3666 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
3667 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
3668 (exception_type_node): New macro.
3669 (class_not_found_type_node): Likewise.
3670 (no_class_def_found_type_node): Likewise.
3671 (instinit_identifier_node): Likewise.
3672 (PREDEF_FILENAMES_SIZE): Adjusted.
3673 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
3674 (struct lang_type): Fixed typo in bitfield name.
3675 (DECL_INSTINIT_P): New macro.
3676 (ID_INSTINIT_P): Likewise.
3677 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
3678 attribute.
3679 * parse.y (encapsulate_with_try_catch): New function.
3680 (generate_instinit): Likewise.
3681 (build_instinit_invocation): Likewise.
3682 (ctors_unchecked_throws_clause_p): Likewise.
3683 (add_instance_initializer): Deleted.
3684 (build_instance_initializer): Likewise.
3685 (in_instance_initializer): Likewise.
3686 (check_method_redefinition): instinit$ not to be verified.
3687 (java_complete_expand_methods): Generate instinit$, simplified code.
3688 (build_dot_class_method): Eliminated unnecessary locals. Use
3689 encapsulate_with_try_catch, removed unnecessary code.
3690 (fix_constructors): New local iii. Use build_instinit_invocation.
3691 (patch_method_invocation): Added comment.
3692 (maybe_use_access_method): Don't consider instinit$.
3693 (find_applicable_accessible_methods_list): Shorten the search for
3694 instinit$ too.
3695 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
3696 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
3697 (patch_throw_statement): Likewise. Fixed typo.
3698
3699 2001-08-12 David Edelsohn <edelsohn@gnu.org>
3700
3701 Revert:
3702 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3703 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3704 ASM_FINAL_SPEC.
3705 (lang_specific_pre_link): Use set_input to set input_filename.
3706 Append `main' here.
3707 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3708 (main): Fix definition.
3709 Strip `main' from classname.
3710 Fixes PR java/227.
3711
3712 2001-08-11 Zack Weinberg <zackw@panix.com>
3713
3714 * lex.h: Don't include setjmp.h. Don't define
3715 SET_FLOAT_HANDLER or prototype set_float_handler.
3716
3717 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3718
3719 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
3720 `poplevel' in the right order.
3721
3722 2001-08-09 Richard Henderson <rth@redhat.com>
3723
3724 * Make-lang.in (class.o): Depend on TARGET_H.
3725 * class.c (emit_register_classes): Use target hooks instead of
3726 assemble_constructor and assemble_destructor.
3727
3728 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
3729
3730 * check-init.c (flags.h): Include
3731 (check_init): Don't report uninitialized static class
3732 initialization flags, don't free bit index when doing static class
3733 initialization optimization.
3734 (check_for_initialization): Return type changed to `unsigned int.'
3735 (attach_initialized_static_class): New function.
3736 * class.c (add_method_1): Create the initialized static class
3737 table if necessary.
3738 (finish_class): Always emit deferred inline methods.
3739 * decl.c (emit_init_test_initialization): Moved to expr.c
3740 (complete_start_java_method): Don't traverse
3741 DECL_FUNCTION_INIT_TEST_TABLE.
3742 (lang_mark_tree): Mark hash tables in function decls.
3743 * expr.c (emit_init_test_initialization): Moved from decl.c.
3744 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
3745 initialization flag, set DECL_CONTEXT and
3746 LOCAL_CLASS_INITIALIZATION_FLAG.
3747 (java_lang_expand_expr): Emit initialization code for static class
3748 initialized flags when entering block, if necessary.
3749 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
3750 * java-tree.h (flag_optimize_sci): New global variable declaration.
3751 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
3752 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
3753 (LOCAL_FINAL_P): Fixed typo in comment.
3754 (FINAL_VARIABLE_P): Likewise.
3755 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
3756 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
3757 (struct lang_decl): New fields `ict', `smic' and `cif.'
3758 (check_for_initialization): New returned value for global.
3759 (attach_initialized_static_class): New global function.
3760 (STATIC_CLASS_INIT_OPT_P): New macro.
3761 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
3762 * lang.c (java_decode_option): Handle
3763 `-fno-optimize-static-class-initialization'
3764 * parse.y (start_complete_expand_method): New function.
3765 (java_expand_method_bodies): Likewise.
3766 (attach_init_test_initialization_flags): Likewise.
3767 (adjust_init_test_initialization): Likewise.
3768 (emit_test_initialization): Likewise.
3769 (java_complete_expand_methods): Nullify abstract and native method
3770 bodies.
3771 (java_complete_expand_method): New locals `fbody', `block_body'
3772 and `exception_copy.' Reorganized: directly return on empty method
3773 bodies, call `start_complete_expand_method', remember definitely
3774 initialized static class in function, don't expand method bodies.
3775 (java_expand_classes): Call `java_expand_method_bodies' before
3776 `finish_class' when compiling to native.
3777 (resolve_expression_name): Use `orig' after building outer class
3778 field access.
3779 (patch_invoke): Remember static method invocations.
3780
3781 2001-08-06 Richard Henderson <rth@redhat.com>
3782
3783 * class.c (emit_register_classes): Pass a symbol_ref and priority
3784 to assemble_constructor.
3785
3786 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
3787
3788 * java-tree.h (all_class_filename): New macro.
3789 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
3790 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
3791 newly created IDENTIFIER_NODE to `all_class_filename.'
3792
3793 2001-08-01 Jeff Sturm <jsturm@one-point.com>
3794
3795 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
3796 Use ggc_add_tree_root to register roots.
3797
3798 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
3799
3800 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
3801 second operand calling check_init.
3802 * decl.c (complete_start_java_method): Swaped second and third
3803 arguments while creating WITH_CLEANUP_EXPR node.
3804 * jcf-write.c (generate_bytecode_insns): Use second operand
3805 instead of third when handling WITH_CLEANUP_EXPR.
3806 * parse.y (java_complete_lhs): Expand second operand of
3807 WITH_CLEANUP_EXPR nodes.
3808 (patch_synchronized_statement): Swaped second and third arguments
3809 while creating WITH_CLEANUP_EXPR node.
3810
3811 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
3812
3813 * parse.y (create_interface): Avoid cyclic inheritance report when
3814 syntax error encountered during class definition.
3815 Fixes PR java/2956
3816
3817 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3818
3819 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
3820 ASM_FINAL_SPEC.
3821 (lang_specific_pre_link): Use set_input to set input_filename.
3822 Append `main' here.
3823 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
3824 (main): Fix definition.
3825 Strip `main' from classname.
3826 Fixes PR java/227.
3827
3828 2001-07-18 Tom Tromey <tromey@redhat.com>
3829
3830 For PR java/2812:
3831 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
3832 * lex.c (java_new_lexer): Use ICONV_CONST.
3833 (java_read_char): Likewise.
3834 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
3835 (jv-scan$(exeext)): Likewise.
3836
3837 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
3838
3839 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
3840 * parse.y (check_class_interface_creation): Allow `private' if the
3841 enclosing is not an interface.
3842 (create_interface): Interface tagged public if the enclosing
3843 context is an interface.
3844 (create_class): Class tagged public if the enclosing context
3845 is an interface.
3846 Fixes PR java/2959
3847
3848 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
3849
3850 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
3851 Fixes PR java/2665
3852
3853 2001-07-14 Tim Josling <tej@melbpc.org.au>
3854
3855 * check-init.c (check_init): Remove references to EXPON_EXPR.
3856
3857 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
3858
3859 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
3860 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
3861 Fixes PR java/3602
3862
3863 2001-07-13 Tom Tromey <tromey@redhat.com>
3864
3865 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
3866 invocation.
3867
3868 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
3869
3870 * parse.y (patch_method_invocation): Don't override primary if one
3871 is already provided, but let this$<n> be built. Fixed comment.
3872
3873 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
3874
3875 * parse.y (empty_statement:): Report empty statement error only
3876 when found at class declaration level.
3877 Fixes PR java/3635
3878
3879 2001-07-12 Tom Tromey <tromey@redhat.com>
3880
3881 * expr.c (expand_load_internal): New function.
3882 (LOAD_INTERNAL): Use it.
3883
3884 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
3885
3886 * parse.y (verify_constructor_super): Compare anonymous class ctor
3887 args with `valid_method_invocation_conversion_p.'
3888 Fixes PR java/3285
3889
3890 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
3891
3892 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
3893 `-fsyntax-only.' Fixes PR java/3248
3894
3895 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
3896
3897 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
3898
3899 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
3900
3901 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
3902 current function is static. Fixes PR java/1970
3903
3904 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3905
3906 * parse.y (patch_method_invocation): Add enclosing context to ctor
3907 calls if necessary. Fixes PR java/2953
3908
3909 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
3910
3911 * parse.y (resolve_package): Abort if qualified expression member
3912 isn't right.
3913 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
3914 Fixes PR java/1391
3915
3916 2001-07-07 Zack Weinberg <zackw@stanford.edu>
3917
3918 * verify.c: Don't use // comments.
3919
3920 2001-07-05 Tom Tromey <tromey@redhat.com>
3921
3922 * lang.c (flag_assume_compiled): Removed.
3923 * java-tree.h (flag_assume_compiled): Removed.
3924 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
3925 -fhash-synchronization, -fuse-divide-subroutine,
3926 -fcheck-references, -femit-class-file, -femit-class-files,
3927 -fassume-compiled. Updated --encoding information. Changed
3928 -foutput-class-dir to `-d'.
3929
3930 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
3931
3932 * jcf-parse.c (parse_class_file): Add lineno parameter to
3933 debug_start_source_file call.
3934
3935 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
3936
3937 * gcj.texi: Use gpl.texi.
3938 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
3939 dependencies and use doc/include in search path.
3940
3941 2001-07-03 Jeff Sturm <jsturm@one-point.com>
3942
3943 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
3944 `this'. If so, don't build instance initializers.
3945
3946 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
3947
3948 * parse.y (resolve_expression_name): Improved error message for
3949 inner class cases. Fixes PR java/1958
3950
3951 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
3952
3953 * lang.c: #include diagnostic.h
3954 (lang_print_error): Add a `diagnostic_context *' parameter.
3955 (java_dummy_print): Likewise.
3956 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
3957
3958 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3959
3960 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
3961 * jcf.h (typedef struct JCF): New bitfield `finished.'
3962 (JCF_FINISH): Set `finished.'
3963 (JCF_ZERO): Reset `finished.'
3964 Fixes PR java/2633
3965
3966 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3967
3968 * parse.y (class_body_declaration:): Don't install empty instance
3969 initializers.
3970 Fixes PR java/1314
3971
3972 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3973
3974 * class.c (set_super_info): Call `set_class_decl_access_flags.'
3975 (set_class_decl_access_flags): New function.
3976 * java-tree.h (set_class_decl_access_flags): New prototype.
3977 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
3978 (parse_class_file): New local `decl_max_locals.' Take wide types
3979 into account to compute DECL_MAX_LOCALS.
3980 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
3981 imports on demand.
3982
3983 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
3984
3985 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
3986
3987 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
3988
3989 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
3990 * parse.y (do_resolve_class): Moved comments out to leading comment
3991 section. Removed local `start', New local `_ht' and
3992 `circularity_hash.' Record `enclosing' in hash table and search
3993 it to detect circularity. Use `enclosing' as an argument to
3994 `lookup_cl.' Free the hash table when done.
3995
3996 2001-06-19 Tom Tromey <tromey@redhat.com>
3997
3998 * lex.c (java_read_char): Disallow invalid and overlong
3999 sequences. Fixes PR java/2319.
4000
4001 2001-06-05 Jeff Sturm <jsturm@one-point.com>
4002
4003 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
4004
4005 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
4006
4007 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
4008 arguments accordingly.
4009
4010 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
4011
4012 * gcj.texi: Move contents to just after title page.
4013
4014 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
4015
4016 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
4017 builtin type.
4018 (patch_incomplete_class_ref): Build the class ref, build the class
4019 init if necessary, complete the tree.
4020 Fixes PR java/2605
4021
4022 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
4023
4024 * parse.y (lookup_field_wrapper): Test `name' code.
4025 (resolve_qualified_expression_name): Test `qual_wfl' code.
4026 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
4027 handle `qual_wfl' by code.
4028 (maybe_build_primttype_type_ref): Test `wfl' code.
4029
4030 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4031
4032 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
4033 fdl.texi.
4034 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
4035 the dvi file in the java directory.
4036
4037 2001-05-25 Sam TH <sam@uchicago.edu>
4038
4039 * gen-table.pl javaop.h jcf.h lex.h,
4040 parse.h: Fix header include guards.
4041
4042 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
4043
4044 * jv-scan.c (version): Update copyright year.
4045
4046 2001-05-21 Per Bothner <per@bothner.com>
4047
4048 * jcf-parse.c (read_class): If class is from .class or .zip file
4049 and it's already been read, don't push/pop parser context.
4050
4051 2001-05-18 Per Bothner <per@bothner.com>
4052
4053 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
4054 command line so the jvgenmain-generated main program comes first.
4055
4056 2001-05-15 Tom Tromey <tromey@redhat.com>
4057
4058 * class.c (build_utf8_ref): Don't generate identifier based on
4059 utf8const contents.
4060
4061 2001-05-12 Richard Henderson <rth@redhat.com>
4062
4063 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
4064 * expr.c (java_lang_expand_expr): Expand it.
4065 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
4066 calling build_exception_object_ref.
4067 * parse.y (catch_clause_parameter): Likewise.
4068 (build_dot_class_method): Likewise.
4069 (try_reference_assignconv): Likewise.
4070 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
4071 * jcf-write.c (generate_bytecode_insns): Likewise.
4072
4073 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
4074
4075 * parse.y (build_unresolved_array_type): Set
4076 EXPR_WFL_QUALIFICATION on the newly created wfl.
4077 Fixes PR java/2538. Fixes PR java/2535.
4078
4079 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
4080
4081 * parse.y (fix_constructors): Removed unnecessary assignment to
4082 local. Moved assignment to `this$<n>', fixed comments and
4083 indentation.
4084 (build_wfl_wrap): Fixed indentation.
4085 Fixes PR java/2598, java/2579 and java/2658.
4086
4087 2001-05-03 Mo DeJong <mdejong@redhat.com>
4088
4089 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4090 check for byte swap.
4091
4092 2000-05-02 Jeff Sturm <jsturm@one-point.com>
4093
4094 * expr.c (build_class_init): Move MODIFY_EXPR
4095 outside of COND_EXPR. Remove variable `call'.
4096
4097 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4098
4099 * decl.c: NULL_PTR -> NULL.
4100 * jcf-write.c: Likewise.
4101
4102 2001-05-01 Tom Tromey <tromey@redhat.com>
4103
4104 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
4105 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
4106 * gcj.texi: Updated copyright text. Include fdl.texi.
4107 (Top): Link to new node.
4108
4109 2001-05-01 Per Bothner <per@bothner.com>
4110
4111 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
4112
4113 2001-05-01 Per Bothner <per@bothner.com>
4114
4115 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
4116 import_list contains the name, not the TREE_PURPOSE.
4117
4118 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4119
4120 * jcf-io.c (read_zip_member): Cast to long in comparison with
4121 signed value.
4122
4123 * jvspec.c (lang_specific_driver): Initialize variables.
4124
4125 * mangle.c (find_compression_record_match): Likewise.
4126
4127 * typeck.c (build_null_signature): Provide static prototype. Mark
4128 parameter with ATTRIBUTE_UNUSED.
4129
4130 * verify.c (verify_jvm_instructions): Initialize variable.
4131
4132 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4133
4134 * parse.y (do_resolve_class): Check for cyclic inheritance during
4135 inner class resolution.
4136
4137 2001-04-27 Per Bothner <per@bothner.com>
4138
4139 * parse.y (java_expand_classes): Don't change ctxp_for_generation
4140 while iterating, since that could cause gc to lose stuff.
4141
4142 2001-04-26 Per Bothner <per@bothner.com>
4143
4144 Fix method search wrt scope of inner classes to match JLS2.
4145 * typeck.c (build_null_signature): New static function.
4146 (has_method): New function. Uses build_null_signature and lookup_do.
4147 * java-tree.h (has_method): New declaration.
4148 * parse.y (find_applicable_accessible_methods_list): Do not search
4149 context of inner classes here.
4150 (patch_method_invocation): Search scope, ie. current and outer clases,
4151 for method matching simple name, to find class.
4152
4153 2001-04-26 Per Bothner <per@bothner.com>
4154
4155 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
4156 Fix thinko: If a single case, use if_icmpeq, not ifeq.
4157
4158 * constants.c (find_methodref_with_class_index): New function.
4159 (find_methodref_index): Use find_methodref_with_class_index.
4160 * java-tree.h (find_methodref_with_class_index): New declaration.
4161 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
4162 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
4163 If context changed from interface to class, don't use invokeinterface.
4164
4165 2001-04-25 Per Bothner <per@bothner.com>
4166
4167 * verify.c (verify_jvm_instructions): For field instructions,
4168 check that field index is valid. For invoke instructions, check that
4169 method index is valid.
4170
4171 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
4172
4173 * config-lang.in (target_libs): Copy from $libgcj_saved.
4174
4175 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
4176
4177 * decl.c (init_decl_processing): Add new class "protectionDomain"
4178 field.
4179 * class.c (make_class_data): Set initial value for "protectionDomain".
4180
4181 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4182
4183 * jvspec.c (lang_specific_driver): Fix memory allocation
4184 deficit, by using concat in lieu of xmalloc/sprintf.
4185
4186 2001-04-20 Per Bothner <per@bothner.com>
4187
4188 Fixes to compile multiple .class files at once.
4189 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
4190 * java-tree.h (CLASS_PARSED_P): New macro.
4191 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
4192 * jcf-parse.c (jcf_parse_source): Inline into read_class.
4193 (read_class): Avoid some code duplication.
4194 Don't call JCF_FINISH for a .class file - might be needed later.
4195 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
4196 rather than CLASS_LOADED_P, since latter implies class laid out.
4197 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
4198 * parse.y: Don't need to set CLASS_LOADED_P for array types.
4199
4200 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4201
4202 * Make-lang.in (java/boehm.o): Depend on toplev.h.
4203
4204 * boehm.c: Include toplev.h.
4205
4206 2001-04-06 Tom Tromey <tromey@redhat.com>
4207 Alexandre Petit-Bianco <apbianco@redhat.com>
4208
4209 Fix for PR gcj/1404 and PR gcj/2332:
4210 * parse.y (build_array_from_name): If we use the type_wfl then
4211 accumulate dimensions from the original type as well.
4212 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
4213
4214 2001-04-06 Tom Tromey <tromey@redhat.com>
4215
4216 * parse.y (analyze_clinit_body): Return true if the second operand
4217 of a METHOD_EXPR is nonzero.
4218
4219 2001-04-06 Tom Tromey <tromey@redhat.com>
4220
4221 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
4222 directory.
4223 ($(srcdir)/java/parse.c): Likewise.
4224
4225 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
4226
4227 * gcj.texi: Use `which-gcj' instead of `which-g77.'
4228 (version-gcc): Initialized.
4229 (which-gcj): Likewise.
4230
4231 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
4232
4233 * java-tree.h (struct lang_decl): New macro
4234 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
4235 * parse.y (build_instance_initializer): New function.
4236 (add_instance_initializer): Use it.
4237 (java_fix_constructors): Set `current_class' before fix pass.
4238 (fix_constructors): Just return if already fixed. Move `super()'
4239 invocation ahead. Use `build_instance_initializer.'
4240 Fixes PR java/1315.
4241
4242 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
4243
4244 * parse.y (resolve_qualified_expression_name): Pass field's
4245 DECL_CONTEXT to `not_accessible_p.'
4246 (not_accessible_p): Changed parameters order in `inherits_from_p'
4247 invocation.
4248
4249 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
4250
4251 * lang-options.h: Add flag_check_references.
4252
4253 2001-04-04 Per Bothner <per@bothner.com>
4254
4255 * java-tree.h (CONSTANT_VALUE_P): New macro.
4256 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
4257 * parse.y (maybe_build_class_init_for_field): New static function.
4258 (resolve_expression_name, resolve_field_access): Use
4259 maybe_build_class_init_for_field instead of build_class_init
4260 This does not do the init if the field is compile-time-constant.
4261 (resolve_field_access): Simplify.
4262
4263 * parse.y (fold_constant_for_init): Merge test into switch.
4264
4265 2001-04-03 Zack Weinberg <zackw@stanford.edu>
4266
4267 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
4268 on gansidecl.h.
4269 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
4270
4271 2001-04-02 Zack Weinberg <zackw@stanford.edu>
4272
4273 * expr.c (pop_type_0): Save the result of the first
4274 lang_printable_name call in a scratch buffer, so it
4275 won't be clobbered by the second call.
4276
4277 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
4278
4279 * parse-scan.y (array_type:): Rewritten.
4280 (type_declaration:): `empty_statement' replaces `SC_TK.'
4281 (class_member_declaration:): `empty statement' added.
4282 (method_body:): Simplified.
4283 (static_initializer:): Likewise.
4284 (primary_no_new_array:): Use `type_literals.'
4285 (type_literals:): New rule.
4286 (dims:): Set and update `bracket_count.'
4287 Fixes PR java/1074. Fixes PR java/2412.
4288
4289 2001-03-28 Hans Boehm <boehm@acm.org>
4290
4291 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
4292 (get_boehm_type_descriptor): Set type on returned value to be a
4293 pointer length integer.
4294
4295 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4296
4297 * expr.c (pop_type_0): Call `concat' rather than building the
4298 string manually.
4299 (pop_type): Add format specifier in call to `error'.
4300
4301 * parse.y (patch_method_invocation): Avoid casting away
4302 const-ness.
4303
4304 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
4305
4306 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
4307
4308 2001-03-28 Richard Henderson <rth@redhat.com>
4309
4310 IA-64 ABI Exception Handling:
4311 * Make-lang.in (except.o): Don't depend on eh-common.h.
4312 * check-init.c (check_init): Handle EXC_PTR_EXPR.
4313 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
4314 [soft_exceptioninfo_call_node]: Remove.
4315 [eh_personality_libfunc, lang_eh_runtime_type]: New.
4316 (end_java_method): No emit_handlers.
4317 * except.c (java_set_exception_lang_code): Remove.
4318 (method_init_exceptions): Don't call it.
4319 (prepare_eh_table_type): No CATCH_ALL_TYPE.
4320 (build_exception_object_ref): New.
4321 (expand_end_java_handler): Update for except.h name changes.
4322 (emit_handlers, expand_resume_after_catch): Remove.
4323 * expr.c (java_lang_expand_expr): Update for except.h name changes.
4324 (process_jvm_instruction): Use build_exception_object_ref.
4325 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
4326 (soft_exceptioninfo_call_node): Remove.
4327 (build_exception_object_ref): Declare.
4328 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
4329 soft_exceptioninfo_call_node. Move processing ...
4330 [EXC_PTR_EXPR]: ... here.
4331 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
4332 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
4333 (source_end_java_method): No java_set_exception_lang_code or
4334 emit_handlers.
4335 (build_dot_class_method): Use build_exception_object_ref.
4336 (try_reference_assignconv): Check EXC_PTR_EXPR not
4337 soft_exceptioninfo_call_node.
4338
4339 2001-03-28 Richard Henderson <rth@redhat.com>
4340
4341 * java-tree.h (throw_node): Define as a single member of
4342 java_global_trees instead of a separate array.
4343 (JTI_THROW_NODE): New.
4344 * decl.c (throw_node): Don't declare.
4345 (init_decl_processing): Init a scalar throw_node.
4346 Don't register it for gc.
4347 * check-init.c (check_init): Reference scalar throw_node.
4348 * expr.c (build_java_athrow): Likewise.
4349 * jcf-write.c (generate_bytecode_insns): Likewise.
4350 * parse.h (BUILD_THROW): Likewise.
4351
4352 2001-03-28 Richard Henderson <rth@redhat.com>
4353
4354 * decl.c (end_java_method): Do not save and restore
4355 flag_non_call_exceptions.
4356 * parse.y (source_end_java_method): Likewise.
4357 * lang.c (flag_exceptions): Don't declare.
4358 (java_init_options): Set flag_non_call_exceptions. Set
4359 flag_exceptions here ...
4360 (java_init): ... not here.
4361
4362 2001-03-27 Richard Henderson <rth@redhat.com>
4363
4364 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
4365 exceptions_via_longjmp.
4366
4367 * lang.c (flag_new_exceptions): Don't declare it.
4368 (java_init_options): Or set it.
4369
4370 2001-03-27 Richard Henderson <rth@redhat.com>
4371
4372 * decl.c (end_java_method): Rename asynchronous_exceptions to
4373 flag_non_call_exceptions.
4374 * parse.y (source_end_java_method): Likewise.
4375
4376 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4377
4378 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
4379
4380 2001-03-26 Mark Mitchell <mark@codesourcery.com>
4381
4382 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
4383
4384 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
4385
4386 * parse.y (find_as_inner_class): Follow current package
4387 indications not to mistakingly load an unrelated class.
4388
4389 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4390
4391 * constants.c (PUTN): Use memcpy, not bcopy.
4392
4393 * lex.c (java_read_char): Use memmove, not bcopy.
4394
4395 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
4396
4397 2001-03-23 Per Bothner <per@bothner.com>
4398
4399 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
4400 macro for better error pin-pointing.
4401 * java-tree.h: Fix typo in comment.
4402
4403 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
4404 Don't include jsr/goto in exception range.
4405 Check if start and end of exception range are the same (also TRY_EXPR).
4406 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
4407 However, do emit the following goto even if try_block is empty.
4408 Defer freeing exception_decl until after the finalizer, to make
4409 sure the local isn't reused in the finalizer. Fixes PR java/1208.
4410
4411 * parse.y (java_complete_lhs): If the try-clause is empty, just
4412 return the finally-clause and vice versa.
4413
4414 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
4415
4416 * gcj.texi (Input Options): documented the check for attribute
4417 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
4418 * java-tree.h (flag_force_classes_archive_check): Declared extern.
4419 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
4420 (jcf_parse): Check for the right classes archive if necessary.
4421 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
4422 (jcf_parse_fields): Fixed indentation.
4423 * jcf-write.c (append_gcj_attribute): New function.
4424 (generate_classfile): Compute the attribute count, invoke
4425 `append_gcj_attribute'.
4426 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
4427 turned into bit-fields. New bit-field `right_zip.'
4428 (JCF_ZERO): Set `right_zip' to zero.
4429 * lang-options.h (-fforce-classes-archive-check): Added flag.
4430 * lang.c (flag_force_classes_archive_check): New flag.
4431 (lang_f_options): New entry `force-classes-archive-check.'
4432 Fixes PR java/1213.
4433
4434 2001-02-07 Andrew Haley <aph@redhat.com>
4435
4436 * gcj.texi (Configure-time Options): Add -fcheck-references.
4437 * expr.c (build_java_indirect_ref): New function.
4438 (java_check_reference): New function.
4439 (build_java_array_length_access): Use build_java_indirect_ref to
4440 check for null references.
4441 (build_java_arrayaccess): Likewise.
4442 (build_get_class): Likewise.
4443 (build_field_ref): Likewise.
4444 (invoke_build_dtable): Likewise.
4445 (build_invokeinterface): Likewise.
4446 * lang.c (lang_f_options): Add flag_check_references.
4447 * jvspec.c (jvgenmain_spec): Add flag_check_references.
4448 * java-tree.h (flag_check_references): New variable.
4449 * lang.c (flag_check_references): Likewise.
4450 * parse.y (patch_invoke): Use java_check_reference.
4451 (patch_assignment): Allow for extra nesting in
4452 _Jv_CheckArrayStore.
4453
4454 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
4455
4456 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
4457 * lex.c (cxx_keywords): Likewise.
4458
4459 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
4460
4461 * parse.y (qualify_ambiguous_name): Broaden `length'
4462 recognition. Help MODIFY_EXPR be resolved as expression names.
4463 Fixes PR java/2066. Fixes PR java/2400.
4464
4465 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
4466
4467 * gjavah.c (process_file): Mark interface definitions with
4468 "__attribute__ ((java_interface))".
4469
4470 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
4471
4472 * class.c (layout_class): Fixed push_super_field's second
4473 argument. Fixes PR java/2333.
4474 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
4475 too early to lay innerclasses out.
4476
4477 2001-03-20 Tom Tromey <tromey@redhat.com>
4478 Alexandre Petit-Bianco <apbianco@redhat.com>
4479
4480 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
4481 inside an array reference. Insertion of the array store check
4482 rewritten. Fixes PR java/2299.
4483
4484 2001-03-20 Tom Tromey <tromey@redhat.com>
4485
4486 * lex.c (java_read_unicode): Only accept leading `u's.
4487
4488 2001-03-20 Tom Tromey <tromey@redhat.com>
4489
4490 * jcf-parse.c (read_class): Initialize `class'.
4491
4492 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
4493
4494 * jcf_parse.c (jcf_parse): Eliminate unused variable.
4495
4496 2001-03-19 Mark Mitchell <mark@codesourcery.com>
4497
4498 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
4499 (layout_class): Likewise.
4500 (layout_class_method): Likewise.
4501 (emit_register_classes): Likewise.
4502 * decl.c (builtin_function): Likewise.
4503 (give_name_to_locals): Likewise.
4504
4505 2001-03-19 Per Bothner <per@bothner.com>
4506
4507 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
4508 before trying to load an inner class.
4509
4510 Fixes to process to command-line .class files in two passes.
4511 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
4512 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
4513 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
4514 * class.c (is_compiled_class): Fix for renamed flag.
4515 * parse.y (maybe_create_class_interface_decl): Likewise.
4516 * jcf-parse.c (yyparse): Also set if compiling .class files.
4517 * jcf-parse.c (read_class); Read current_class.
4518 (jcf_parse): Make static.
4519 (load_inner_classes): New function, with code moved from jcf_parse,
4520 because we need to inner classes after the command-line files are read.
4521 (yyparse): Set finput to NULL when it doesn't need to be closed.
4522 Reduce use of main_jcf (basically only for archive) and
4523 use finput instead of main_jcf->read_state.
4524 Inline jcf_figure_file_type into yyparse.
4525 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
4526 Defer load_inner_classes and parse_class_file to a second pass,
4527 after we've correctly mapped command-line .clas fiels to classes.
4528 (jcf_figure_file_type): Removed.
4529 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
4530 (JCF_ZERO): Also clear zipd field.
4531 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
4532
4533 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
4534
4535 * jcf-parse.c (yyparse): Change ch from char * to char.
4536
4537 2001-03-19 Per Bothner <per@bothner.com>
4538
4539 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
4540 Add constructed filelist-file at end, following -xjava. Thus any .o
4541 and library files are not affected by the -xjava. Also wrap
4542 explicit @FILE with -xjava and -xnone.
4543
4544 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
4545
4546 * class.c (build_static_field_ref): Call make_decl_rtl() after
4547 setting the DECL_EXTERNAL flag.
4548
4549 2001-03-17 Per Bothner <per@bothner.com>
4550
4551 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
4552
4553 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
4554 when result is is needed (target is STACK_TARGET).
4555
4556 * parse.h (JDEP_SOLV): Removed.
4557 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
4558
4559 * parse.y (incomplete_class_list): Removed.
4560 (obtain_incomplete_type): Don't use or set incomplete_class_list.
4561 It doesn't work if resolve_class changes the name of an array type
4562 that is on the list and then someone else looks for the modified name.
4563 Also, seems liable to break when compiling multiple source files at
4564 once. So the simplest is to just remove incomplete_class_list -
4565 it is only a minor space win and it is not even clear it saves time.
4566
4567 * parse.y (resolve_class): Remove unneeded promote_type.
4568
4569 2001-03-15 Per Bothner <per@bothner.com>
4570
4571 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
4572 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
4573 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
4574 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
4575
4576 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
4577 * parse.y (java_expand_classes): Likewise.
4578
4579 * parse.y (expand_start_java_method): Was only called once and had a
4580 misleading name, so inline in caller java_complete_expand_method.
4581 (enter_a_block): Likewise inline in enter_block and remove.
4582
4583 Remove junk from when gcc/java was created (by copying from C/C++).
4584 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
4585 (struct binding_level): Remove fields keep, keep_if_subblocks,
4586 more_cleanups_ok, have_cleanups (which have never been used).
4587 (pushlevel, poplevel): Remove related useless code.
4588
4589 * class.c (make_class_data): The class_dtable_decl (i.e. the
4590 vtable for Class) should be external, except when compiling Class.
4591
4592 * jvspec.c (lang_specific_driver): Fix -C handling.
4593 Check -save-temps to see if temp @FILE should be deleted.
4594 Follow-up to/fix for February 16 patch.
4595
4596 * verify.c (verify_jvm_instructions): Better error msgs for dup.
4597 (type_stack_dup): Remove no-longer neded error check.
4598
4599 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
4600
4601 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
4602 to 'for_pointer'. If this type is for a pointer (argument) mangling,
4603 don't surround the element with 'N..E' if the type name is
4604 unqualified.
4605
4606 2001-03-14 Mark Mitchell <mark@codesourcery.com>
4607
4608 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
4609 DECL_RTL_SET_P, etc.
4610 (make_method_value): Likewise.
4611 (get_dispatch_table): Likewise.
4612
4613 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4614
4615 2001-03-07 Tom Tromey <tromey@redhat.com>
4616
4617 * config-lang.in (lang_requires): Define.
4618
4619 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
4620
4621 * typeck.c (convert): Check flag_unsafe_math_optimizations,
4622 not flag_fast_math.
4623
4624 2001-03-05 Per Bothner <per@bothner.com>
4625
4626 Fix a problem where rest_of_decl_compilation applied to
4627 class_dtable_decl causes problems because it was done too early,
4628 before output file was opened.
4629 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
4630 * class.c (class_dtable_decl): Add macro - element of class_roots.
4631 (make_class_data): Define class_dtable_decl.
4632 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
4633
4634 2001-03-01 Zack Weinberg <zackw@stanford.edu>
4635
4636 * java/class.c, java/decl.c, java/java-tree.h: Replace all
4637 uses of 'boolean' with 'bool'.
4638
4639 2001-03-01 Zack Weinberg <zackw@stanford.edu>
4640
4641 * lang-specs.h: Add zero initializer for cpp_spec field to all
4642 array elements.
4643
4644 2001-02-16 Per Bothner <per@bothner.com>
4645
4646 Handle compiling multiple input files at once, and @FILE syntax.
4647 * gcj.texi: Updated documentation to match.
4648 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
4649 * jcf-parse.c (parse_source_file): Split into ...
4650 (parse_source_file_1): New function - and:
4651 (parse_source_file_2): New function.
4652 (yyparse): On -ffilelist-file, open and scan named file.
4653 On first pass over files, only do parse_source_file_1.
4654 A new second pass calls parse_source_file_2 for each file to compile.
4655 (init_jcf_parse): Call init_src_parse.
4656 * jvspec.c (INDIRECT_FILE_ARG): New flag.
4657 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
4658 as multiple input file combined in one compilation.
4659 * lang-options.h: Add -ffilelist-file
4660 * lang.c (flag_filelist_file): New flag variable.
4661 (lang_f_options): Handle -ffilelist-file.
4662 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
4663 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
4664 gclass_list - use global fields of src_parse_roots instead.
4665 * parse.y (src_parse_roots): New array.
4666 (incomplete_class_list, gclass_list): New macros.
4667 (push_parser_context, java_pop_parser_context,
4668 java_parser_context_resume): Don't fiddle with deleted fields.
4669 (various): Use incomplete_class gclass_list and global macros
4670 instead of parse_ctxt fields - the lists are global.
4671 (init_src_parse): New function.
4672
4673 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4674
4675 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
4676
4677 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
4678
4679 * parse.y (check_inner_class_access): Moved declaration of local
4680 `enclosing_decl_type' to the right location.
4681
4682 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
4683
4684 * parse.y (parser_check_super_interface): Don't call
4685 check_pkg_class_access for an inner interface.
4686 (parser_check_super): Don't call check_pkg_class_access for inner
4687 class.
4688 (do_resolve_class): Simplify enclosing type loop. Don't call
4689 check_pkg_class_access if CL and DECL are not set.
4690 (find_in_imports_on_demand): Set DECL if class_type needed to be
4691 loaded. Don't call check_pkg_class_access for an inner class.
4692 (check_inner_class_access): Rewritten to implement member access
4693 rules as per spec 6.6.1.
4694 (check_pkg_class_access): Handle the empty package correctly.
4695 (in_same_package): New function. Determine if two classes are in the
4696 same package.
4697
4698 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
4699
4700 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
4701 method into array types.
4702 * parse.y (patch_method_invocation): Bypass access check on clone call
4703 to array instance.
4704
4705 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
4706
4707 * expr.c (build_instanceof): Check for arrays when trying fold to
4708 false.
4709
4710 2001-02-15 Jim Meyering <meyering@lucent.com>
4711
4712 * Make-lang.in (java.install-common): Depend on `installdirs'.
4713 (java.install-info): Likewise.
4714
4715 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
4716
4717 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
4718
4719 2001-02-14 Tom Tromey <tromey@redhat.com>
4720 Alexandre Petit-Bianco <apbianco@cygnus.com>
4721
4722 Fix for PR java/1261.
4723 * typeck.c (build_java_array_type): Add public `clone' method to
4724 arrays.
4725 * parse.y (resolve_qualified_expression_name): Use current_class
4726 when checking for inaccessibility.
4727 (patch_method_invocation): Fixed error message when accessibility
4728 denied. Added `from_super' argument.
4729
4730 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
4731
4732 * parse.y (resolve_class): Don't build a fake decl. Use the one
4733 already built.
4734 * typeck.c (build_java_array_type): Build and assign decl to array
4735 type.
4736
4737 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
4738
4739 * parse.y (not_accessible_p): Changed leading comment. Added extra
4740 `where' argument. Use it to enforce protected access rules.
4741 (resolve_qualified_expression_name): Added extra argument to
4742 not_accessible_p.
4743 (patch_method_invocation): Use argument `primary' to provide
4744 not_accessible_p with an extra argument.
4745 (lookup_method_invoke): Added extra argument to not_accessible_p.
4746 (search_applicable_method_list): Likewise.
4747
4748 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
4749
4750 * parse.y (resolve_qualified_expression_name): Try to resolve as
4751 an inner class access only if `decl' is a TYPE_DECL.
4752
4753 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
4754
4755 * decl.c (classdollar_identifier_node): Initialize.
4756 * java-tree.h (enum java_tree_index): New entry
4757 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
4758 (classdollar_identifier_node): New macro.
4759 (ID_CLASSDOLLAR_P): Likewise.
4760 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
4761 (build_dot_class_method_invocation): Likewise.
4762 (find_applicable_accessible_methods_list): `class$' can't be
4763 inherited.
4764
4765 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
4766
4767 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
4768
4769 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4770
4771 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
4772 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
4773 gone.
4774
4775 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4776
4777 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
4778 outside of the `__U' sequence too.
4779 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
4780 sequence too.
4781
4782 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
4783
4784 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
4785
4786 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
4787
4788 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
4789 (JVGENMAIN_OBJS): Likewise.
4790 * java-tree.h (append_gpp_mangled_name): New prototype.
4791 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
4792 Removed cast calling `gcc_add_root.'
4793 * jvgenmain.c (mangle_obstack): New global, initialized.
4794 (main): Use it.
4795 (do_mangle_class): Constify local `ptr.'
4796 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
4797 append_gpp_mangle_name and update `count' if necessary.
4798 Use `mangle_obstack.'
4799 * mangle.c (append_unicode_mangled_name): Removed.
4800 (append_gpp_mangled_name): Likewise.
4801 (unicode_mangling_length): Likewise.
4802 (mangle_member_name): Return type set to `void.'
4803 (mangle_field_decl): Don't append `U' in escaped names.
4804 (mangle_method_decl): Likewise.
4805 (mangle_member_name): Just use `append_gpp_mangled_name.'
4806 * mangle_name.c: New file.
4807
4808 2001-02-07 Per Bothner <per@bothner.com>
4809
4810 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
4811
4812 * check-init.c (check_init): Don't call done_alternative after
4813 processing loop code, as a LOOP_EXPR never terminates normally.
4814
4815 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
4816
4817 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
4818
4819 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4820
4821 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
4822 DECLs.
4823
4824 2001-02-06 Tom Tromey <tromey@redhat.com>
4825
4826 * lex.c (java_new_lexer): Longer error message.
4827
4828 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
4829 Alexandre Petit-Bianco <apbianco@cygnus.com>
4830
4831 * typeck.c (build_prim_array_type): Added leading comment.
4832 (build_java_array_type): Moved locals out of
4833 block. Always create the `data' field, fixed alignment to match
4834 C++.
4835
4836 2001-02-04 Tom Tromey <tromey@redhat.com>
4837
4838 * expr.c (java_lang_expand_expr): Don't bother recomputing
4839 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
4840 Fixes PR java/1866.
4841
4842 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
4843
4844 * parse.y (process_imports): Save the original name of the import
4845 for better error report.
4846
4847 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
4848
4849 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
4850 of macros used when compiling jvspec.c.
4851 * jvspec.c (lang_specific_driver): Link with the shared
4852 libgcc by default.
4853
4854 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4855
4856 * check-init.c (check_init): Call internal_error instead of fatal.
4857 * expr.c (java_lang_expand_expr): Likewise.
4858 * jcf-parse.c (get_constant): Likewise.
4859 * mangle.c (java_mangle_decl): Likewise.
4860 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
4861 (operator_string): Likewise.
4862 * check-init.c (check_init): Call abort instead of fatal.
4863 * class.c (build_class_ref): Likewise.
4864 * constants.c (write_constant_pool): Likewise.
4865 * decl.c (start_java_method): Likewise.
4866 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
4867 (java_stack_dup, encode_newarray_type): Likewise.
4868 (build_java_array_length_access): Likewise.
4869 (build_java_check_indexed_type, expand_java_pushc): Likewise.
4870 (build_java_soft_divmod, build_invokeinterface): Likewise.
4871 * java-tree.h (INNER_CLASS_P): Likewise.
4872 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
4873 (give_name_to_class, get_class_constant): Likewise.
4874 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
4875 (find_constant_index, generate_bytecode_conditional): Likewise.
4876 (generate_bytecode_insns, perform_relocations): Likewise.
4877 * lex.c (java_unget_unicode, java_lex): Likewise.
4878 * mangle.c (mangle_type, mangle_record_type): Likewise.
4879 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
4880 (finish_mangling): Likewise.
4881 * parse.h (MARK_FINAL_PARMS): Likewise.
4882 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
4883 (obtain_incomplete_type, java_complete_class): Likewise.
4884 (java_check_regular_methods, java_complete_expand_method): Likewise.
4885 (cut_identifier_in_qualified, check_deprecation): Likewise.
4886 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
4887 (java_complete_lhs, lookup_name_in_blocks): Likewise.
4888 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
4889 * typeck.c (set_local_type, parse_signature_type): Likewise.
4890 (parse_signature_string, build_java_signature): Likewise;
4891 (set_java_signature): Likewise.
4892 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
4893 * class.c (add_method): Call fatal_error instead of fatal.
4894 (build_static_field_ref): Likewise.
4895 * expr.c (build_known_method_ref, expand_invoke): Likewise.
4896 * jcf-parse.c (get_constant, jcf_parse): Likewise.
4897 * lex.c (java_new_new_lexer): Likewise.
4898 * jv-scan.c (main): Likewise.
4899 (fatal_error): Renamed from fatal.
4900 * jcf-parse.c (yyparse): Call fatal_io_error instead of
4901 pfatal_with_name.
4902 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
4903 (yyparse): Likewise.
4904 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
4905 * lex.c (java_get_line_col): Likewise.
4906 * jcf-parse.c (load_class): Make errors non-fatal.
4907 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
4908
4909 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
4910
4911 * jvgenmain.c (class_mangling_suffix): Remove unused string.
4912 (error): Remove unused function.
4913 (main): Don't use "__attribute__ alias" on generated class symbol.
4914
4915 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
4916
4917 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
4918 argument.
4919 * parse.y (finish_method_declaration): Code accounting for WFLed
4920 method DECL_NAMEs deleted.
4921 (check_abstract_method_definitions): Likewise.
4922 (resolve_type_during_patch): Layout resolved type.
4923 * typeck.c (lookup_do): Removed unused local.
4924
4925 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
4926
4927 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
4928 * decl.c (init_decl_processing): Use integer_minus_one_node, not
4929 integer_negative_one_node.
4930 * expr.c (build_java_binop): Likewise.
4931
4932 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
4933
4934 * zextract.c (read_zip_archive): Read file_offset before writing
4935 zipd and consequently clobbering the header contents.
4936
4937 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4938
4939 * Make-lang.in: Remove all dependencies on defaults.h.
4940 * decl.c: Don't include defaults.h.
4941 * expr.c: Likewise.
4942 * parse.y: Likewise.
4943
4944 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
4945
4946 * ChangeLog (2001-01-21): Fixed typo.
4947 * class.c (layout_class_method): Code accounting for WFLed
4948 method DECL_NAMEs deleted.
4949 * constant.c (find_methodref_index): Likewise.
4950 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
4951 * java-tree.h (DECL_FUNCTION_WFL): New macro.
4952 (struct lang_decl): New field `wfl'.
4953 (java_get_real_method_name): Prototype deleted.
4954 * mangle.c (mangle_method_decl): Code accounting for WFLed
4955 method DECL_NAMEs deleted.
4956 * parse.h (GET_METHOD_NAME): Macro deleted.
4957 * parse.y (reset_method_name): Deleted.
4958 (method_header): Set DECL_FUNCTION_WFL.
4959 (check_abstract_method_header): Code accounting for WFLed method
4960 DECL_NAMEs deleted.
4961 (java_get_real_method_name): Deleted.
4962 (check_method_redefinition): Code accounting for WFLed method
4963 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
4964 (java_check_regular_methods): Likewise.
4965 (java_check_abstract_methods): Likewise.
4966 (java_expand_classes): Don't call `reset_method_name.'
4967 (search_applicable_method_list): Use DECL_NAMEs instead of
4968 GET_METHOD_NAME.
4969 * typeck.c (lookup_do): Code accounting for WFLed method
4970 DECL_NAMEs deleted.
4971
4972 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
4973
4974 * lex.c (java_read_char): Check for EOF from getc first.
4975
4976 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
4977
4978 * class.c (layout_class): Don't lay the superclass out if it's
4979 already being laid out.
4980 * jcf-parse.c (handle_innerclass_attribute): New function.
4981 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
4982 handle_innerclasses_attribute.
4983 (jcf_parse): Don't load an innerclasses if it's already being
4984 laid out.
4985 * jcf-write.c (append_innerclass_attribute_entry): Static
4986 `anonymous_name' and its initialization deleted. `ocii' and `ini'
4987 to be zero for anonymous classes.
4988
4989 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
4990
4991 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
4992 necessary.
4993 * jcf-parse.c (set_source_filename): Use
4994 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
4995
4996 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
4997
4998 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
4999 gets a unique asm name.
5000
5001 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
5002
5003 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
5004 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5005 if necessary.
5006 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
5007 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
5008 * parse.y (lookup_package_type_and_set_next): Deleted.
5009 (resolve_package): Removed unnecessary code.
5010 (find_applicable_accessible_methods_list): `finit$' can't be
5011 inherited.
5012 * verify.c (pop_argument_types): Added missing prototype.
5013
5014 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
5015
5016 * config-lang.in: Disable java by default.
5017
5018 2001-01-23 Tom Tromey <tromey@redhat.com>
5019
5020 * gcj.texi (Copying): New node.
5021 Added copyright information.
5022
5023 2001-01-21 Per Bothner <per@bothner.com>
5024
5025 Various fixes to allow compiling a compressed .jar/.zip archive.
5026 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
5027 (struct ZipFile): Add fields name and next (from ZipFileCache).
5028 (struct ZipDirectory): New field zipf points to owning ZipFile.
5029 * jcf.h (struct ZipDirectory): Add forward declaration.
5030 (struct JCF): Declare zipd field to have type struct ZipDirectory.
5031 Remove seen_in_zip and zip_offset fields.
5032 (JCF_SEEN_IN_ZIP): New macro.
5033 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
5034 * jcf-io.c: Change all ZipFileCache to ZipFile.
5035 (read_zip_member): New function.
5036 (open_in_zip): Call read_zip_member.
5037 * jcf-parse.c (find_in_current_zip): Remove function.
5038 (read_class): Merge in find_in_current_zip functionality.
5039 Call read_zip_member if needed.
5040 (parse_zip_file_entries): Use read_zip_member.
5041 (process_zip_dir): Update for removed and added JCF fields.
5042 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
5043
5044 2001-01-21 Per Bothner <per@bothner.com>
5045
5046 Minor optimization of static ggc roots.
5047 * jcf-parse.c (parse_roots): New static field.
5048 (current_field, current_method, current_file_list): Replace by macros
5049 naming fields of parse_roots.
5050 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
5051 * class.c (class_roots): New static field.
5052 (registered_class, fields_ident, info_ident, class_list):
5053 New macros naming fields of parse_roots.
5054 (build_static_field_ref): Don't register roots here.
5055 (layout_class): Static field list replaced by macro class_list.
5056 (init_class_processing): Call ggc_add_tree_root for 4 roots.
5057 Initialize fields_ident and info_ident here.
5058
5059 2001-01-21 Per Bothner <per@bothner.com>
5060
5061 * jcf-parse.c (ggc_mark_jcf): New function.
5062 (init_jcf_parse): Register current_jcf as ggc root.
5063
5064 2001-01-21 Per Bothner <per@bothner.com>
5065
5066 * lang.c (put_decl_node): Print method's name.
5067
5068 2001-01-21 Per Bothner <per@bothner.com>
5069
5070 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
5071 (verify_jvm_instructions): Use it, for better error messages on loads.
5072
5073 2001-01-21 Per Bothner <per@bothner.com>
5074
5075 * verify.c (merge_type_state): Still may have to merge even if
5076 LABEL_VERIFIED (label).
5077
5078 2001-01-21 Per Bothner <per@bothner.com>
5079
5080 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
5081 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
5082
5083 2001-01-19 Per Bothner <per@bothner.com>
5084
5085 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
5086 if expeting an interface type. Refines Tom's change of 2000-09-12.
5087
5088 2001-01-18 Per Bothner <per@bothner.com>
5089
5090 * gcj.texi (Input Options): Mention .java files.
5091
5092 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5093
5094 * lang-options.h (-Wunsupported-jdk11): Removed.
5095 * lang.c (flag_not_overriding): Deleted.
5096 (flag_static_local_jdk1_1): Likewise.
5097 (lang_W_options): Removed "unsupported-jdk11" entry.
5098 * parse.y (java_check_methods): Removed dead code.
5099
5100 2001-01-17 Tom Tromey <tromey@redhat.com>
5101
5102 Changes suggested by Per Bothner:
5103 * gcj.texi (Input Options): Don't mention input files.
5104 (Code Generation): Updated --main information.
5105 (Invoking jcf-dump): Mention that --javap is incomplete.
5106 From Alexandre Petit-Bianco:
5107 (Warnings): Don't mention -Wunsupported-jdk11.
5108 My stuff:
5109 (Compatibility): Mention JDK 1.2-ness of libraries.
5110 (Resources): Mention resources used when writing gcj.
5111
5112 2001-01-17 Tom Tromey <tromey@redhat.com>
5113
5114 * gcj.texi: New file.
5115 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
5116 (java.info): Depend on gcj.info.
5117 (java/gcj.dvi): New target.
5118 (java.dvi): Depend on gcj.dvi.
5119 (java.install-info): Wrote.
5120
5121 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
5122
5123 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
5124 having called make_decl_rtl.
5125
5126 2001-01-14 Per Bothner <per@bothner.com>
5127
5128 Various patches to emit better messages on verification errors.
5129 * expr.c (push_type_0): Return error indication on stack overflow,
5130 instead of callinfg fatal.
5131 (push_type): Now just call push_type_0 (nd fatal on overflow).
5132 (pop_type_0): Return detailed error message (in a char** argument).
5133 (pop_type): If pop_type_0 fails, print error message.
5134 (pop_argument_types): Moved to verify.c.
5135 * verify.c (pop_argument_types): Moved from expr.c.
5136 Return a (possible) error message, rather than void.
5137 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
5138 (verify_jvm_instruction): Use new macros, improving error messages.
5139 For case OPCODE_astore use object_ptr_type_node.
5140 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
5141 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
5142
5143 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
5144 constant, return body without wrapper. (Improves constant folding.)
5145 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
5146
5147 2001-01-13 Per Bothner <per@bothner.com>
5148
5149 * expr.c (expand_java_field_op): Assigning to a final field outside
5150 an initializer does not violate JVM spec, so should be warning, not
5151 error. (Sun's verifier does not complain - though MicroSoft's does.)
5152
5153 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
5154
5155 * gjavah.c (version), jcf-dump.c (version): Update copyright year
5156 to 2001.
5157
5158 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
5159
5160 * parse.y (resolve_expression_name): Permit instance variables from
5161 enclosing context in super constructor call.
5162 (resolve_qualified_expression_name): Permit enclosing class's qualified
5163 "this" in super constructor call.
5164
5165 2001-01-10 Mark Mitchell <mark@codesourcery.com>
5166
5167 * class.c (build_utf8_ref): Remove last argument in call to
5168 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5169 (build_class_ref): Likewise.
5170 (build_static_field_ref): Likewise.
5171 (get_dispatch_table): Likewise.
5172 (layout_class_method): Likewise.
5173 (emit_register_classes): Likewise.
5174 * constants.c (build_constant_data_ref): Likewise.
5175 * decl.c (builtin_function): Likewise.
5176 (create_primitive_vtable): Likewise.
5177 * expr.c (build_known_method_def): Likewise.
5178 (build_jni_stub): Likewise.
5179 (java_lang_expand_expr): Likewise.
5180
5181 2001-01-10 Tom Tromey <tromey@redhat.com>
5182
5183 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
5184
5185 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
5186
5187 * java-tree.h (lang_printable_name_wls): New prototype.
5188 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
5189 rather than `current_class' to print type name. Don't prepend type
5190 names when printing constructor names.
5191 (lang_printable_name_wls): New function.
5192 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
5193 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
5194 * parse.y (patch_method_invocation): Message tuned for constructors.
5195 (not_accessible_p): Grant `private' access from within
5196 enclosing contexts.
5197
5198 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
5199
5200 All files with updated copyright when applicable.
5201 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
5202 * class.c (mangle_class_field): Function removed.
5203 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
5204 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
5205 (build_class_ref): Call `java_mangle_class_field' instead of
5206 `mangle_class_field.'
5207 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
5208 (layout_class): Call `java_mangle_decl' instead of
5209 `mangle_static_field.'
5210 (cxx_keywords): Initialized static array moved to `lex.c.'
5211 (layout_class_method): Changed leading comment. Simplified to
5212 call `java_mangle_decl.' Local `ptr' moved in for loop body.
5213 * decl.c (lang_mark_tree): Mark field `package_list.'
5214 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
5215 (struct lang_type): New field `package_list.'
5216 (unicode_mangling_length): Prototype removed.
5217 (append_gpp_mangled_name, append_gpp_mangled_classtype,
5218 emit_unicode_mangled_name): Likewise.
5219 (cxx_keyword_p): New prototype.
5220 (java_mangle_decl, java_mangle_class_field,
5221 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
5222 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
5223 `build_expr_wfl.'
5224 * jvgenmain.c (main_method_prefix): Global variable removed.
5225 (main_method_suffix): Likewise.
5226 (do_mangle_classname): New function.
5227 (main): Call it. Format changed to accommodate new mangling scheme.
5228 * lex.c: (utf8_cmp): Conditionally prototyped.
5229 (cxx_keywords): Moved from class.c, conditionally defined.
5230 (utf8_cmp, cxx_keyword_p): Likewise.
5231 * mangle.c (obstack.h, ggc.h): Included.
5232 (mangle_field_decl): New function.
5233 (mangle_method_decl, mangle_type, mangle_pointer_type,
5234 mangle_array_type, mangle_record_type,
5235 find_compression_pointer_match, find_compression_array_match,
5236 find_compression_record_match,
5237 find_compression_array_template_match, set_type_package_list,
5238 entry_match_pointer_p, emit_compression_string, init_mangling,
5239 finish_mangling, compression_table_add, mangle_member_name): Likewise.
5240 (mangle_obstack): New global.
5241 (MANGLE_RAW_STRING): New macro.
5242 (unicode_mangling_length): Turned static.
5243 (append_unicode_mangled_name): Renamed from
5244 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
5245 replaces `obstack', removed from the parameter list.
5246 (append_gpp_mangled_name): Turned static. `mangle_obstack'
5247 replaces parameter `obstack', removed from the parameter list. Call
5248 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
5249 (append_gpp_mangled_classtype): Removed.
5250 (compression_table, compression_next): New static variables.
5251 * parse.y (temporary_obstack): Extern declaration removed.
5252
5253 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
5254
5255 * parse.y (patch_binop): Compute missing type in error situations.
5256
5257 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
5258
5259 * class.c (make_class_data): Push initial value for "arrayclass".
5260 * decl.c (init_decl_processing): Add new class field "arrayclass".
5261
5262 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
5263
5264 From patha@softlab.ericsson.se:
5265 * parse.y (switch_label): Use build, not build1, to construct
5266 DEFAULT_EXPR.
5267
5268 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
5269
5270 * lang.c (lang_decode_option): Change -MA to -MP.
5271 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
5272 Update to new prototype; do quote targets.
5273 (jcf_dependency_write): Update.
5274
5275 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
5276
5277 Shorten primitive array allocation path:
5278 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
5279 to create new primitive arrays.
5280 * expr.c (build_newarray): If generating native code, call
5281 soft_newarray_node with a reference to the primitive TYPE identifier
5282 instead of type_value.
5283
5284 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
5285
5286 Fix for PRs gcj/312 and gcj/253:
5287 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
5288 dest if they arn't already.
5289 * class.c (layout_class): Call maybe_layout_super_class on
5290 superinterfaces also, but only if compiling from bytecode.
5291
5292 Fix for PR gcj/373:
5293 * parse.y (create_class): Set ACC_STATIC if class is declared in an
5294 interface.
5295
5296 2000-12-15 Tom Tromey <tromey@redhat.com>
5297
5298 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
5299 set.
5300
5301 2000-12-14 Andrew Haley <aph@redhat.com>
5302
5303 * boehm.c (mark_reference_fields): Change test to correctly detect
5304 bitmap overflow.
5305
5306 2000-12-15 Andreas Jaeger <aj@suse.de>
5307
5308 * config-lang.in (lang_dirs): Added.
5309
5310 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
5311
5312 * parse.y (end_artificial_method_body): Fixed undefined behavior.
5313 Credits go to rth for finding it.
5314
5315 2000-12-13 Mike Stump <mrs@wrs.com>
5316
5317 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
5318
5319 2000-11-07 Tom Tromey <tromey@cygnus.com>
5320
5321 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
5322 * lex.c (java_ignorable_control_p): Removed.
5323 (java_letter_or_digit_p): Removed.
5324 (java_start_char_p): New function.
5325 (java_read_char): Return `int', not `unicode_t'. Changed
5326 callers.
5327 (java_read_unicode): Likewise.
5328 (java_read_unicode_collapsing_terminators): Likewise.
5329 (java_get_unicode): Likewise.
5330 (java_new_lexer): Initialize hit_eof.
5331 (java_parse_end_comment): Take `int' argument.
5332 (java_parse_doc_section): Likewise.
5333 (java_parse_escape_sequence): Don't allow backlash-newline.
5334 Return `int'.
5335 * lex.h (JAVA_DIGIT_P): Removed.
5336 (_JAVA_LETTER_OR_DIGIT_P): Removed.
5337 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
5338 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
5339 (JAVA_PART_CHAR_P): New macro.
5340 (UEOF): Now -1.
5341 (JAVA_CHAR_ERROR): Now -2.
5342 (java_lexer): New field `hit_eof'.
5343 * chartables.h: New file.
5344 * gen-table.pl: new file.
5345
5346 2000-11-20 Tom Tromey <tromey@cygnus.com>
5347 Alexandre Petit-Bianco <apbianco@cygnus.com>
5348
5349 * parse.y (java_complete_lhs): Only allow compound assignment of
5350 reference type if type is String.
5351
5352 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
5353
5354 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
5355 jcf-path.c: Likewise.
5356
5357 2000-12-09 Anthony Green <green@redhat.com>
5358
5359 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
5360 filestart and filename_length as int values.
5361
5362 2000-12-07 Mo DeJong <mdejong@redhat.com>
5363
5364 * jcf-io.c (find_class): Correct the logic that tests to see if a
5365 .java file is newer than its .class file. The compiler was
5366 incorrectly printing a warning when file mod times were equal.
5367
5368 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
5369
5370 * jvgenmain.c: Use ISPRINT not isascii.
5371
5372 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
5373
5374 * parse.y (end_artificial_method_body): Fixed typo.
5375
5376 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
5377
5378 * parse.y (patch_method_invocation): Pick the correct enclosing
5379 context when creating inner class instances.
5380 Fixes gcj/332.
5381
5382 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
5383
5384 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
5385 Update copyright year to 2000.
5386
5387 2000-11-23 Anthony Green <green@redhat.com>
5388
5389 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
5390 Move current_file_list out of yyparse and make it static.
5391
5392 * expr.c: Declare quick_stack and tree_list_free_list as static
5393 (init_expr_processing): Register quick_stack and
5394 tree_list_free_list roots.
5395
5396 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
5397
5398 * parse.y (build_outer_field_access): New local `decl_ctx', use
5399 it. Check for field's context and current class immediate outer
5400 context inheritance.
5401 (outer_field_access_p): Consider fields inherited from the last
5402 enclosing context.
5403 (build_access_to_thisn): Stop at the last enclosing context if
5404 necessary.
5405 Fixes gcj/367.
5406
5407 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
5408
5409 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
5410
5411 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
5412
5413 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
5414 scratch buffer.
5415
5416 2000-11-20 Tom Tromey <tromey@cygnus.com>
5417
5418 * jv-scan.c (help): Document --complexity.
5419 (options): Added --complexity.
5420 (flag_complexity): New global.
5421 (main): Call `report'.
5422 * parse-scan.y (complexity): New global.
5423 (if_then_statement, if_then_else_statement,
5424 if_then_else_statement_nsi, switch_block_statement_group,
5425 while_expression, do_statement, for_begin, continue_statement,
5426 throw_statement, catch_clause, finally, method_invocation,
5427 conditional_and_expression, conditional_or_expression,
5428 conditional_expression): Update complexity.
5429 (reset_report): Reset complexity.
5430 (report): New function.
5431
5432 2000-11-20 Tom Tromey <tromey@cygnus.com>
5433
5434 * lex.c (yylex): Added STRICT_TK case.
5435 * parse.y (STRICT_TK): Added.
5436 * parse-scan.y (STRICT_TK): Added.
5437 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
5438 `;'. Use 4, not 3, with -k option. Correctly rename resulting
5439 file.
5440 * keyword.h: Rebuilt.
5441 * keyword.gperf (strictfp): Added.
5442
5443 2000-11-20 Tom Tromey <tromey@cygnus.com>
5444
5445 * lex.c (yylex): Recognize floating point constants with leading
5446 0.
5447
5448 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5449
5450 * java-tree.h (cyclic_inheritance_report): Constify.
5451 * parse.y (cyclic_inheritance_report): Likewise.
5452
5453 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
5454
5455 * parse.y (goal): Remove call to ggc_add_string_root.
5456
5457 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
5458
5459 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
5460 Create string in scratch buffer, then pass to build_string.
5461
5462 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
5463
5464 * parse.y (issue_warning_error_from_context): Add
5465 ATTRIBUTE_PRINTF.
5466
5467 2000-11-11 Anthony Green <green@redhat.com>
5468
5469 * jcf-parse.c (process_zip_dir): Add finput parameter.
5470 (jcf_figure_file_type): Call process_zip_dir with appropriate
5471 argument.
5472
5473 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5474
5475 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
5476 * jcf-parse.c (jcf_figure_file_type): Likewise.
5477
5478 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
5479
5480 * parse.y (create_new_parser_context): Use memset () instead of
5481 bzero ().
5482
5483 2000-11-08 Tom Tromey <tromey@cygnus.com>
5484
5485 * gjavah.c (process_file): Only include gcj/cni.h when generating
5486 CNI stubs.
5487
5488 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
5489
5490 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
5491 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
5492 instead of bzero ().
5493
5494 2000-11-05 Tom Tromey <tromey@cygnus.com>
5495
5496 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
5497 * lex.c (IS_ZERO): New define.
5498 (java_perform_atof): Error on floating point underflow.
5499
5500 2000-11-04 Tom Tromey <tromey@cygnus.com>
5501
5502 * lex.c (java_parse_escape_sequence): Only read two octal
5503 characters if the first one is greater than 3. Don't allow
5504 "octal" numbers to include the digits 8 or 9.
5505
5506 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
5507
5508 * Make-lang.in (java.distdir): Remove.
5509
5510 2000-11-03 Tom Tromey <tromey@cygnus.com>
5511
5512 * Make-lang.in (java.dvi): New target.
5513 Partial fix for PR other/567.
5514
5515 * lang-options.h: Mention -Wout-of-date.
5516 * jcf-dump.c (flag_newer): New global.
5517 * gjavah.c (flag_newer): New global.
5518 * jcf-io.c (find_class): Only warn when flag_newer set.
5519 * lang.c (flag_newer): New global.
5520 (struct string_option): New declaration.
5521 (lang_W_options): New global.
5522 (process_option_with_no): New function.
5523 (lang_decode_option): Use it.
5524
5525 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
5526 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
5527 `$'.
5528
5529 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
5530 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
5531 * lex.c (java_read_unicode): Removed `term_context' argument.
5532 Recognize any number of `u' in `\u'.
5533 (java_read_unicode_collapsing_terminators): New function.
5534 (java_get_unicode): Use it.
5535 (java_lineterminator): Removed.
5536 (yylex): Produce error if character literal is newline or single
5537 quote. Return if eof found in middle of `//' comment. EOF in
5538 `//' comment is only an error if pedantic.
5539 (java_ignorable_control_p): New function.
5540 (java_parse_end_comment): Return if eof found in middle of
5541 comment.
5542 Include flags.h.
5543 * jv-scan.c (pedantic): New global.
5544
5545 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
5546
5547 * parse.y (outer_field_access_p): Inherited fields aren't
5548 consider outer fields.
5549 (maybe_build_thisn_access_method): Use
5550 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
5551 (resolve_expression_name): Trigger an error if a static field
5552 is being accessed as an outer field.
5553
5554 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
5555
5556 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
5557 Fixes gcj/365.
5558
5559 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
5560
5561 * Make-lang.in: Move all build rules here from Makefile.in,
5562 adapt to new context. Wrap all rules that change the current
5563 directory in parentheses. Expunge all references to $(P).
5564 When one command depends on another and they're run all at
5565 once, use && to separate them, not ;. Add OUTPUT_OPTION to
5566 all object-file generation rules. Delete obsolete variables.
5567
5568 * Makefile.in: Delete.
5569 * config-lang.in: Delete outputs= line.
5570
5571 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
5572
5573 * parse.y (patch_method_invocation): NULLify this_arg when already
5574 inserted.
5575 (maybe_use_access_method): Handle call to methods unrelated to the
5576 current class. Fixed comment.
5577 Fixes gcj/361.
5578
5579 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
5580
5581 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
5582 scope.
5583
5584 2000-10-24 Tom Tromey <tromey@cygnus.com>
5585
5586 * lex.c (java_new_lexer): Initialize new fields. Work around
5587 broken iconv() implementations.
5588 (java_read_char): Swap bytes if required. Use fallback decoder if
5589 required.
5590 (byteswap_init, need_byteswap): New globals.
5591 (java_destroy_lexer): Only close iconv handle if it is in use.
5592 * lex.h (java_lexer): New fields read_anything, byte_swap,
5593 use_fallback.
5594 Made out_buffer unsigned.
5595
5596 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
5597
5598 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
5599 where an enclosing context can be set on the jdep.
5600 (do_resolve_class): Fixed identation.
5601
5602 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5603
5604 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
5605
5606 * jcf-reader.c (peek_attribute, skip_attribute): Only define
5607 when requested.
5608
5609 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
5610
5611 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
5612
5613 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5614
5615 * jcf-write.c (OP1): Update `last_bc'.
5616 (struct jcf_block): Fixed indentation and typo in comments. New
5617 field `last_bc'.
5618 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
5619 follows `monitorenter'.
5620 * parse.y (patch_synchronized_statement): New local `tmp'. Call
5621 `patch_string'.
5622 Fixes gcj/232.
5623
5624 2000-10-16 Tom Tromey <tromey@cygnus.com>
5625
5626 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
5627 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
5628 * lang-options.h: Added -MA, -MT, -MF..
5629 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
5630 (DEPEND_TARGET_SET): New macro.
5631 (DEPEND_FILE_ALREADY_SET): Likewise.
5632 (init_parse): Handle new flags.
5633 * jcf.h (jcf_dependency_print_dummies): Declare.
5634 * Make-lang.in (s-java): Added mkdeps.o.
5635 * Makefile.in (BACKEND): Added mkdeps.o.
5636 (../gcjh$(exeext)): Added mkdeps.o.
5637 (../jcf-dump$(exeext)): Added mkdeps.o.
5638 * jcf-depend.c: Include mkdeps.h.
5639 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
5640 add_entry): Removed.
5641 (jcf_dependency_reset): Rewrote.
5642 (dependencies): New global.
5643 (jcf_dependency_set_target): Rewrote.
5644 (jcf_dependency_add_target): Likewise.
5645 (jcf_dependency_add_file): Likewise.
5646 (munge): Removed.
5647 (print_ents): Removed.
5648 (jcf_dependency_write): Rewrote.
5649 (print_dummies): New global.
5650 (jcf_dependency_print_dummies): New function
5651 (jcf_dependency_write): Call deps_dummy_targets if required.
5652
5653 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5654
5655 * gjavah.c (add_class_decl): Removed unused variables `tname',
5656 `tlen' and `name_index'.
5657 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
5658 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
5659 in `wfl_operator' with value.
5660 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
5661 (jcf_figure_file_type): Fixed identation.
5662 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
5663 * parse.y (analyze_clinit_body): New function.
5664 (static_initializer:): Reset `current_static_block'.
5665 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
5666 `wfl_operator' with new value.
5667 (lookup_cl): Use EXPR_WFL_FILENAME.
5668 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
5669 analyze_clinit_body.
5670 (build_outer_field_access): Access to this$<n> built from
5671 current_class, not its outer context.
5672 (build_access_to_thisn): Fixed leading comment. Tidied things up.
5673 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
5674 (patch_method_invocation): Use `is_static_flag' when already
5675 initialized.
5676 (patch_newarray): Removed assignment in ternary operator.
5677
5678 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5679
5680 * except.c (free_eh_ranges): Don't free `whole_range'.
5681
5682 2000-10-15 Anthony Green <green@redhat.com>
5683
5684 * decl.c (init_decl_processing): Call init_class_processing before
5685 anything else.
5686
5687 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
5688
5689 * check-init.c (check_init): Fixed leading comment. Use
5690 LOCAL_FINAL_P.
5691 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5692 (give_name_to_locals): Likewise.
5693 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
5694 fields in lang_decl_var.
5695 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
5696 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
5697 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
5698 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
5699 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
5700 (LOCAL_FINAL): Rewritten.
5701 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
5702 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
5703 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
5704 `init_final' fields.
5705 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
5706 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
5707 (TYPE_HAS_FINAL_VARIABLE): New macro.
5708 (struct lang_type): Added `afv' field.
5709 * parse.y (check_static_final_variable_assignment_flag): New function.
5710 (reset_static_final_variable_assignment_flag): Likewise.
5711 (check_final_variable_local_assignment_flag): Likewise.
5712 (reset_final_variable_local_assignment_flag): Likewise.
5713 (check_final_variable_indirect_assignment): Likewise.
5714 (check_final_variable_global_assignment_flag): Likewise.
5715 (add_inner_class_fields): Use LOCAL_FINAL_P.
5716 (register_fields): Handle local finals and final variables.
5717 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
5718 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5719 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
5720 on local finals.
5721 (java_complete_expand_methods): Loop to set
5722 TYPE_HAS_FINAL_VARIABLE. Call
5723 `reset_final_variable_local_assignment_flag' and
5724 `check_final_variable_local_assignment_flag' accordingly before
5725 and after constructor expansion. Call
5726 `reset_static_final_variable_assignment_flag'
5727 before expanding <clinit> and after call
5728 `check_static_final_variable_assignment_flag' if the
5729 current_class isn't an interface. After all methods have been
5730 expanded, call `check_final_variable_global_assignment_flag' and
5731 `check_static_final_variable_assignment_flag' if the current class
5732 is an interface.
5733 (maybe_yank_clinit): Fixed typo in comment.
5734 (build_outer_field_access_methods): Removed old sanity check. Use
5735 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
5736 Don't create access methods for finals.
5737 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
5738 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
5739 existing DECL_INIT has been processed.
5740 (java_complete_lhs): Likewise.
5741 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
5742 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
5743 logic.
5744 (patch_assignment): Use LOCAL_FINAL_P.
5745 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
5746 DECL_INITIAL is nullified.
5747 Fixes gcj/163.
5748
5749 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5750
5751 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
5752
5753 * Makefile.in (parse.c, parse-scan.c): Likewise.
5754
5755 2000-10-12 Mark Mitchell <mark@codesourcery.com>
5756
5757 * class.c (temporary_obstack): Remove.
5758 (make_class): Don't mess with obstascks.
5759 (push_class): Likewise.
5760 (set_super_info): Likewise.
5761 (add_method_1): Likewise.
5762 (add_method): Likewise.
5763 (add_field): Likewise.
5764 (build_utf8_ref): Likewise.
5765 (build_class_ref): Likewise.
5766 (build_static_field_ref): Likewise.
5767 (finish_class): Likewise.
5768 (push_super_field): Likewise.
5769 (layout_class): Likewise.
5770 (layout_class_methods): Likewise.
5771 (init_class_processing): Likewise.
5772 * constants.c (get_tag_node): Likewise.
5773 (build_constant_data_ref): Likewise.
5774 * decl.c (ggc_p): Remove.
5775 (copy_lang_decl): Use ggc_alloc.
5776 (complete_start_java_method): Don't mess with obstacks.
5777 (start_java_method): Likewise.
5778 (end_java_method): Likewise.
5779 * except.c (link_handler): Use xmalloc.
5780 (free_eh_ranges): New function.
5781 (method_init_exceptions): Use it.
5782 (add_handler): Use xmalloc.
5783 (expand_start_java_handler): Don't mess with obstacks.
5784 (prepare_eh_table_type): Likewise.
5785 (expand_end_java_handler): Likewise.
5786 * expr.c (push_value): Likewise.
5787 (create_label_decl): Likewise.
5788 (build_jni_stub): Likewise.
5789 (java_lang_expand_expr): Likewise.
5790 (note_instructions): Use xrealloc.
5791 (java_push_constant_from_pool): Don't mess with obstacks.
5792 (process_jvm_instruction): Likewise.
5793 * java-tree.h (cyclic_inheritance_report): Remove duplicate
5794 declaration.
5795 * jcf-parse.c (get_constant): Don't mess with obstacks.
5796 (read_class): Likewise.
5797 (jcf_parse): Likewise.
5798 * lex.c (expression_obstack): Remove.
5799 (java_lex): Don't use obstack_free.
5800 * parse.h (exit_java_complete_class): Don't mess with obstacks.
5801 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
5802 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
5803 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
5804 * parse.y (gaol): Add more GC roots.
5805 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
5806 (lookup_field_wrapper): Likewise.
5807 (obtain_incomplete_type): Don't mess with obstacks.
5808 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
5809 macros.
5810 (craft_constructor): Don't mess with obstacks.
5811 (safe_layout_class): Likewise.
5812 (java_complete_class): Likewise.
5813 (source_end_java_method): Likewise.
5814 (build_outer_field_access_methods): Likewise.
5815 (build_outer_method_access_method): Likewise.
5816 (maybe_build_thisn_access_method): Likewise.
5817 (build_dot_class_method_invocation): Likewise.
5818 (java_complete_tree): Likewise.
5819 (java_complete_lhs): Likewise.
5820 (do_merge_string_cste): Likewise.
5821 (patch_string_cst): Likewise.
5822 (array_constructor_check_entry): Likewise.
5823 * typeck.c (build_java_array_type): Likewise.
5824 (parse_signature_string): Likewise.
5825 (build_java_signature): Likewise.
5826
5827 2000-10-12 Tom Tromey <tromey@cygnus.com>
5828
5829 Fix for PR gcj/356:
5830 * gjavah.c (add_class_decl): Don't special-case inner classes.
5831 (add_namelet): Likewise.
5832
5833 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
5834
5835 * java-tree.h: Constify current_encoding.
5836 * lang.c: Constify current_encoding.
5837
5838 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
5839
5840 * jvgenmain.c (class_mangling_suffix): Omit `.'.
5841 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
5842
5843 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
5844
5845 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
5846 patch. Fixes gcj/340.
5847
5848 2000-10-10 Tom Tromey <tromey@cygnus.com>
5849
5850 * lex.c (java_new_lexer): Initialize out_first and out_last
5851 fields.
5852 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
5853
5854 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
5855
5856 * parse.y (pop_current_osb): New function.
5857 (array_type:): Use `dims:', changed actions
5858 accordingly. Suggested by Anthony Green.
5859 (array_creation_expression:): Used pop_current_osb.
5860 (cast_expression:): Likewise.
5861 (search_applicable_method_list): Fixed indentation.
5862
5863 2000-10-08 Anthony Green <green@redhat.com>
5864
5865 * parse.y (array_type_literal): Remove production.
5866 (type_literals): Refer to array_type, not array_type_literal.
5867
5868 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
5869
5870 Patch contributed by Corey Minyard.
5871 * decl.c (check_local_named_variable): New function.
5872 (tree check_local_unnamed_variable): Likewise.
5873 (find_local_variable): Splitted. Call check_local_{un}named_variable.
5874
5875 2000-10-07 Anthony Green <green@redhat.com>
5876
5877 * class.c (layout_class): Handle case where superclass can't be
5878 layed out yet.
5879
5880 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
5881
5882 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
5883 gperf.
5884
5885 2000-10-05 Tom Tromey <tromey@cygnus.com>
5886
5887 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
5888 * jvgenmain.c (class_mangling_prefix): Removed.
5889 (class_mangling_suffix): New global.
5890 (main): Use it.
5891 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
5892 `$'.
5893 (print_method_info): Handle overrides for static and final
5894 methods.
5895 (process_file): Generate declaration for class object field.
5896 * class.c (cxx_keywords): New array.
5897 (utf8_cmp): New function.
5898 (cxx_keyword_p): New function.
5899 (layout_class_method): Mangle C++ keywords by appending `$'.
5900 (mangle_field): New function.
5901 (mangle_class_field): Use mangle_field. Mangle class name as
5902 `class$'.
5903 (mangle_static_field): Use mangle_field.
5904
5905 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
5906
5907 * decl.c (find_local_variable): Removed uncessary type check and
5908 fixed range check typo. From Corey Minyard.
5909
5910 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
5911
5912 * decl.c (give_name_to_locals): New local `code_offset'. Call
5913 `maybe_adjust_start_pc'.
5914 * expr.c (note_instructions): New function.
5915 (expand_byte_code): Don't collect insn starts here.
5916 (peek_opcode_at_pc): New function.
5917 (maybe_adjust_start_pc): Likewise.
5918 * java-tree.h (maybe_adjust_start_pc): Declare.
5919 (note_instructions): Likewise.
5920 * jcf-parse.c (parse_class_file): Call `note_instructions'.
5921
5922 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
5923
5924 * parse.y (field_access:): Fixed indentation.
5925 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
5926
5927 2000-09-07 Tom Tromey <tromey@cygnus.com>
5928
5929 Fix for PR gcj/307:
5930 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
5931 JPRIMITIVE_TYPE_P, for arithmetic operators.
5932 (patch_method_invocation): Indentation fix.
5933 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
5934 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
5935 (do_unary_numeric_promotion): Cleaned up code.
5936 (valid_cast_to_p): Handle boolean correctly.
5937
5938 2000-09-27 Tom Tromey <tromey@cygnus.com>
5939
5940 * lex.c (java_read_unicode): Reset bs_count when finished with
5941 `\u' sequence.
5942
5943 2000-10-01 Mark Mitchell <mark@codesourcery.com>
5944
5945 Convert to GC.
5946 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
5947 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
5948 (typeck.o): Depend on ggc.h.
5949 * class.c (add_method_1): Use GC functions for allocation.
5950 (init_class_processing): Register roots.
5951 * decl.c (ggc_p): Set to 1.
5952 (pending_local_decls): Make it static.
5953 (push_jvm_slot): Use GC functions for allocation.
5954 (init_decl_processing): Register roots.
5955 (give_name_to_locals): Use GC functions for allocation.
5956 (lang_mark_tree): New function.
5957 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
5958 functions for allocation.
5959 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
5960 * lex.c (java_lex): Use build_string, rather than replicating it
5961 inline.
5962 * parse.y (goal): Add more roots.
5963 (mark_parser_ctxt): New function.
5964 * typeck.c: Include ggc.h.
5965
5966 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
5967
5968 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
5969 contains something else than MODIFY_EXPR.
5970
5971 2000-09-23 Mark Mitchell <mark@codesourcery.com>
5972
5973 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
5974 * Makefile.in (parse.o): Depend on ggc.h.
5975 (class.o): Likewise.
5976 (constants.o): Likewise.
5977 (decl.o): Likewise.
5978 (expr.o): Likewise.
5979 (jcf-parse.o): Likewise.
5980 (jcf-write.o): Likewise.
5981 (mangle.o): Likewise.
5982 * class.c: Include ggc.h.
5983 (build_static_field_ref): Register GC roots.
5984 (layout_class): Likewise.
5985 (init_class_processing): Likewise.
5986 * constants.c: Include ggc.h.
5987 (current_constant_pool_data_ref): Remove.
5988 (tag_nodes): Move it to ...
5989 (get_tag_node): ... here. Register GC roots.
5990 * decl.c: Include ggc.h. Remove many global tree definitions.
5991 (throw_node): Define.
5992 (java_global_trees): Likewise.
5993 (predef_filenames): Make the size a constant.
5994 (init_decl_processing): Adjust accordingly.
5995 (init_decl_processing): Call init_jcf_parse. Register GC roots.
5996 * expr.c: Include ggc.h.
5997 (init_expr_processing): Register GC roots.
5998 (build_invokeinterface): Likewise.
5999 * java-tree.h: Replace extern tree declarations with macros.
6000 (java_global_trees): New variable.
6001 (java_tree_index): New enumeration.
6002 (init_jcf_parse): Declare.
6003 * jcf-parse.c: Include ggc.h.
6004 (current_class): Remove declaration.
6005 (main_class): Likewise.
6006 (all_class_list): Likewise.
6007 (predefined_filename_p): Adjust for constant size of
6008 predef_filenames.
6009 (init_jcf_parse): New function.
6010 * jcf-write.c: Include ggc.h.
6011 (generate_classfile): Register GC roots.
6012 (append_synthetic_attribute): Likewise.
6013 (append_innerclass_attribute_entry): Likewise.
6014 * lang.c: Include ggc.h.
6015 (lang_print_error): Register GC roots.
6016 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
6017 with macros.
6018 * parse.y: Include ggc.h.
6019 (wfl_operator): Remove.
6020 (goal): Register GC roots.
6021 (java_pop_parser_context): Adjust for new field names.
6022 (java_parser_context_save_global): Likewse.
6023 (java_parser_context_restore_global): Likewise.
6024 (java_parser_context_suspend): Likewise.
6025 (java_parser_context_resume): Likewise.
6026 (verify_constructor_circularity): Register GC roots.
6027 (lookup_cl): Likewise.
6028 (java_reorder_fields): Likewise.
6029 (build_current_this): Likewise.
6030 (class_in_current_package): Likewise.
6031 (argument_types_convertible): Likewise.
6032 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
6033
6034 2000-09-14 Tom Tromey <tromey@cygnus.com>
6035
6036 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
6037
6038 2000-09-13 Tom Tromey <tromey@cygnus.com>
6039
6040 * jcf-parse.c: Include <locale.h>.
6041 * jv-scan.c: Include <locale.h>.
6042
6043 2000-09-12 Tom Tromey <tromey@cygnus.com>
6044
6045 * expr.c (pop_type_0): Return `Object' if trying to merge two
6046 interface types.
6047 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
6048 interface types; `Object' is always a valid supertype.
6049
6050 2000-09-12 Tom Tromey <tromey@cygnus.com>
6051
6052 Fix for PR gcj/33:
6053 * jv-scan.c (help): Document --encoding.
6054 (options): Added `encoding' entry.
6055 (OPT_ENCODING): New define.
6056 (main): Handle --encoding.
6057 Include <langinfo.h> if nl_langinfo exists.
6058 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
6059 --encoding.
6060 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
6061 (parse_source_file): Correctly call java_init_lex. Added `finput'
6062 argument. Use nl_langinfo to determine default encoding.
6063 * java-tree.h (current_encoding): Declare.
6064 * parse.y (java_parser_context_restore_global): Don't restore
6065 `finput'.
6066 (java_parser_context_save_global): Don't set `finput' field.
6067 (java_pop_parser_context): Don't restore `finput'. Free old lexer
6068 if required.
6069 * lang.c (current_encoding): New global.
6070 (lang_decode_option): Recognize `-fencoding='.
6071 (finish_parse): Don't close finput.
6072 * parse.h (struct parser_ctxt): Removed `finput' and
6073 `unget_utf8_value' fields. Added `lexer' field.
6074 (java_init_lex): Fixed declaration.
6075 * lex.c (java_new_lexer): New function.
6076 (java_destroy_lexer): Likewise.
6077 (java_read_char): Added `lex' argument. Handle iconv case.
6078 (java_read_unicode): Added `lex' argument. Count backslashes in
6079 lexer structure.
6080 (java_init_lex): Added `finput' and `encoding' arguments. Set
6081 `lexer' field in ctxp.
6082 (BAD_UTF8_VALUE): Removed.
6083 (java_lex): Handle seeing UEOF in the middle of a string literal.
6084 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
6085 (java_lexer): New structure.
6086 (UNGETC): Removed.
6087 (GETC): Removed.
6088 (DEFAULT_ENCODING): New define.
6089 (java_destroy_lexer): Declare.
6090
6091 2000-09-12 Tom Tromey <tromey@cygnus.com>
6092
6093 Fix for PR gcj/343:
6094 * lex.c (java_init_lex): Initialize java_io_serializable.
6095 * parse.y (java_io_serializable): New global.
6096 (valid_ref_assignconv_cast_p): An array can be cast to
6097 serializable.
6098
6099 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
6100
6101 * decl.c, expr.c: Include defaults.h if not already included.
6102 Don't define the *_TYPE_SIZE macros.
6103
6104 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
6105
6106 * typeck.c (build_java_array_type): Correct first parameter
6107 in ADJUST_FIELD_ALIGN invocation.
6108
6109 2000-09-06 Tom Tromey <tromey@cygnus.com>
6110
6111 * lang-specs.h: Also recognize `-femit-class-files'.
6112
6113 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6114
6115 * verify.c (merge_types): Load the types to merge if necessary.
6116
6117 2000-09-02 Anthony Green <green@redhat.com>
6118
6119 * jcf-io.c: Include zlib.h.
6120 (open_in_zip): Read compressed class file archives.
6121 * zipfile.h (ZipDirectory): Add uncompressed_size and
6122 compression_method fields.
6123 * zextract.c (read_zip_archive): Collect file compression info.
6124
6125 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
6126
6127 * parse.y (do_resolve_class): Also explore superclasses of
6128 intermediate enclosing contexts when searching for inner classes.
6129
6130 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
6131
6132 * parse.y (variable_declarator_id:): Better error message.
6133 (expression_statement:): Use YYNOT_TWICE.
6134 (cast_expression:): Likewise.
6135 (assignment:): Likewise.
6136
6137 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
6138
6139 * parse.y (do_merge_string_cste): New locals. Create new
6140 STRING_CSTs each time, use memcpy. Fixes gcj/311.
6141
6142 2000-08-07 Hans Boehm <boehm@acm.org>
6143
6144 * boehm.c (mark_reference_fields): Set marking bits for all words in
6145 a multiple-word record.
6146 (get_boehm_type_descriptor): Use the procedure marking descriptor for
6147 java.lang.Class.
6148
6149 2000-08-31 Mike Stump <mrs@wrs.com>
6150
6151 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
6152 jcf-dump$(exeext)): Make parallel safe.
6153
6154 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6155
6156 * jcf-parse.c (set_source_filename): Constify a char *.
6157 * jcf-write.c (append_innerclasses_attribute,
6158 make_class_file_name): Constify a char *. Don't recycle a
6159 variable for an unrelated purpose.
6160 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
6161 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
6162
6163 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
6164
6165 * expr.c (can_widen_reference_to): Fixed indentation.
6166 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
6167 * parse.y: `finit$' replaces `$finit$' in comments.
6168 (try_builtin_assignconv): Fixed leading comment.
6169
6170 2000-08-25 Greg McGary <greg@mcgary.org>
6171
6172 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
6173
6174 2000-08-24 Greg McGary <greg@mcgary.org>
6175
6176 * lang.c (lang_decode_option): Use ARRAY_SIZE.
6177 * parse.y (BINOP_LOOKUP): Likewise.
6178
6179 2000-08-22 Andrew Haley <aph@cygnus.com>
6180
6181 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
6182 sign extending. Fixes gcj/321.
6183 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
6184 combining to make a jlong. Fixes gcj/321.
6185
6186 2000-08-21 Nix <nix@esperi.demon.co.uk>
6187
6188 * lang-specs.h: Do not process -o or run the assembler if
6189 -fsyntax-only.
6190
6191 2000-08-16 Andrew Haley <aph@cygnus.com>
6192
6193 * typeck.c (build_java_array_type): Rewrite code to do array
6194 alignment. Take into account back-end macros when aligning array
6195 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
6196 user to set alignment. Fixes gcj/252 and 160.
6197
6198 2000-08-09 Tom Tromey <tromey@cygnus.com>
6199
6200 * parse.y (check_abstract_method_definitions): Now return `int'.
6201 Check implemented interfaces. Fixes PR gcj/305.
6202
6203 * parse.y (patch_switch_statement): Disallow `long' in switch
6204 expressions. Fixes PR gcj/310.
6205
6206 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6207
6208 * decl.c (finit_leg_identifier_node): New global.
6209 (init_decl_processing): Use `finit$' to initialize
6210 finit_identifier_node. Use `$finit$' to initialize
6211 finit_leg_identifier_node.
6212 * expr.c (expand_java_field_op): Use ID_FINIT_P.
6213 * java-tree.h (finit_identifier_node): Changed attached comment.
6214 (finit_leg_identifier_node): New declaration.
6215 (ID_FINIT_P): Take finit_identifier_node and
6216 finit_leg_identifier_node into account. This is a backward
6217 compatibility hack.
6218
6219 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
6220
6221 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
6222 Jan 6 2000 patch.
6223 (generate_bytecode_insns): Check `nargs' before emitting it.
6224 * verify.c (merge_type_state): Fixed typo.
6225 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
6226 generate_bytecode_{conditional,insns}.
6227
6228 2000-08-13 Anthony Green <green@redhat.com>
6229
6230 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
6231 for -pg builds).
6232
6233 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6234
6235 * class.c (maybe_layout_super_class): Fixed indentation.
6236 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
6237 (java_check_methods): New function declaration.
6238 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
6239 instead of `str_ptr'.
6240 * jcf-write.c (generate_bytecode_insns): Emit number the of args
6241 of a `invokeinterface' at the right time.
6242 * parse.h (WFL_STRIP_BRACKET): New macro.
6243 (SET_TYPE_FOR_RESOLUTION): Use it.
6244 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
6245 (check_class_interface_creation): Don't check for cross package
6246 innerclass name clashes.
6247 (method_header): Behave properly if MDECL is `error_mark_node'.
6248 (method_declarator): Return `error_mark_node' if bogus current
6249 class.
6250 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
6251 (resolve_and_layout): New local `decl_type', set and used. Call
6252 java_check_methods.
6253 (java_check_methods): New method.
6254 (java_layout_classes): Use it.
6255 (resolve_qualified_expression_name): No EH check necessary in
6256 access$<n>.
6257 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
6258 `case' statement.
6259 (patch_assignment): Set DECL_INITIAL on integral final local.
6260
6261 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6262
6263 * java-tree.h (flag_extraneous_semicolon): New extern.
6264 * lang-options.h: (-Wextraneous-semicolon): New option.
6265 * lang.c (flag_redundant): Fixed typo in leading comment.
6266 (flag_extraneous_semicolon): New global.
6267 (lang_decode_option): Set `flag_extraneous_semicolon' when
6268 -Wall. Decode `-Wextraneous-semicolon'.
6269 * parse.y (type_declaration:): Removed `SC_TK' hack, added
6270 `empty_statement' rule.
6271 (class_body_declaration): Likewise.
6272 (method_body:): Accept `;' as a method body.
6273 (static_initializer:): Removed `SC_TK' hack.
6274 (constructor_block_end:): Likewise.
6275 (empty_statement:): Report deprecated empty declaration. Fixes
6276 gcj/295
6277
6278 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6279
6280 * parse.y (build_dot_class_method_invocation): Changed parameter
6281 name to `type'. Build signature from `type' and convert it to a
6282 STRING_CST if it's an array.
6283 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
6284 to use `ref_type' directly.
6285
6286 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
6287
6288 * lang-options.h: Added a comma after the last element to avoid
6289 syntax errors when other languages define additional options.
6290
6291 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
6292
6293 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
6294 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
6295 (jc1): Link with $(BACKEND).
6296 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
6297
6298 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
6299
6300 * jvspec.c: Adjust type of second argument to
6301 lang_specific_driver, and update code as necessary.
6302
6303 * class.c (build_dtable_decl): Initialize dummy.
6304
6305 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6306
6307 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
6308 method bodies not to rule out discarding `<clinit>'; don't use
6309 <clinit> to initialize static fields with constant initializers.
6310
6311 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6312
6313 * gjavah.c (print_method_info): Added `synth' parameter. Skip
6314 synthetic methods.
6315 (method_synthetic): New global.
6316 (HANDLE_METHOD): Recognize synthetic method and tell
6317 `print_method_info' about it.
6318 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
6319 processing a synthetic method.
6320 * jcf-reader.c (skip_attribute): New function.
6321 ( skip_attribute): Likewise.
6322
6323 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6324
6325 * parse.y (build_outer_field_access): Fixed comments.
6326 (fix_constructors): Emit the initialization of this$<n> before
6327 calling $finit$.
6328 (resolve_qualified_expression_name): Build an access to `decl' if
6329 necessary.
6330
6331 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
6332
6333 * parse-scan.y (curent_class): Non longer const.
6334 (inner_qualifier, inner_qualifier_length): Deleted.
6335 (current_class_length): New global.
6336 (bracket_count): Fixed typo in leading comment.
6337 (anonymous_count): New global.
6338 (class_instance_creation_expression:): Handle anonymous classes.
6339 (anonymous_class_creation:): New rule.
6340 (push_class_context): Rewritten.
6341 (pop_class_context): Likewise.
6342 (INNER_QUALIFIER): Macro deleted.
6343 (report_class_declaration): call `push_class_context' when
6344 entering the function. `fprintf' format modified not to use
6345 INNER_QUALIFIER.
6346 (report_class_declaration): Assign `package_name' and
6347 `current_class' to NULL separately.
6348
6349 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
6350
6351 * expr.c (build_invokeinterface): Call layout_class_methods on
6352 target interface.
6353
6354 2000-07-27 Tom Tromey <tromey@cygnus.com>
6355 Anthony Green <green@cygnus.com>
6356 Alexandre Petit-Bianco <apbianco@cygnus.com>
6357
6358 * class.c (make_class_data): Create vtable for abstract classes.
6359 (get_dispatch_table): Changed to cope with abstract classes.
6360
6361 2000-07-27 Tom Tromey <tromey@cygnus.com>
6362
6363 * parse.y (patch_method_invocation): Don't reverse the argument
6364 list when dealing with anonymous class constructors. Fixed typo in
6365 comment.
6366
6367 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6368
6369 * parse.y (build_alias_initializer_parameter_list): Reverse
6370 crafted list when building aliases for anonymous class
6371 constructors.
6372
6373 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6374
6375 * parse.y (jdep_resolve_class): Don't bother checking potential
6376 innerclass access if `decl' is NULL.
6377 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
6378 WFL.
6379
6380 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6381
6382 * parse.c: Remove (again.)
6383
6384 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6385
6386 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
6387 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
6388 outside the `if' statement, alias to innerclass removed, `decl'
6389 used to mark the class complete.
6390
6391 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
6392
6393 * parse.y (simple_name:): Fixed typo in error message.
6394
6395 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
6396
6397 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
6398 or its first operand can be error marks.
6399
6400 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6401
6402 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
6403 * parse.y (method_header): Likewise.
6404
6405 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6406
6407 * parse.y (process_imports): Consider that one might be trying to
6408 import an innerclass. Fixes gcj/254
6409
6410 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6411
6412 * parse.y (find_as_inner_class): Handle the case where the
6413 enclosing context of an innerclass has been loaded as bytecode.
6414
6415 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6416
6417 * parse.y (simple_name:): Reject `$' in type names.
6418 (resolve_type_during_patch): Use `type' as a second
6419 argument to resolve_no_layout. Fixes gcj/257.
6420
6421 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
6422
6423 * parse.y (find_most_specific_methods_list): Select the only
6424 non-abstract method even if max has been set.
6425 Fixes gcj/285, gcj/298.
6426
6427 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
6428
6429 * lang-specs.h: Added %(jc1) to java compiler options.
6430
6431 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
6432
6433 * .cvsignore: New file.
6434
6435 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6436
6437 * parse.y (not_accessible_p): Access granted to innerclasses
6438 (indirectly) extending the reference type. Fixes gcj/249.
6439
6440 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6441
6442 * parse.y (patch_method_invocation): Fixed comment.
6443 (maybe_use_access_method): Build this$<n>s to the context of the
6444 target method, or a type that extends it. Fixes gcj/242.
6445
6446 2000-07-13 Mark Mitchell <mark@codesourcery.com>
6447
6448 * parse.c: Remove.
6449
6450 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6451
6452 * parse.y (fold_constant_for_init): Avoid bullish conversion.
6453
6454 2000-07-13 Tom Tromey <tromey@cygnus.com>
6455
6456 * lang-specs.h: Added %{I*}.
6457
6458 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
6459
6460 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
6461
6462 2000-07-12 Mark Mitchell <mark@codesourcery.com>
6463
6464 * parse-scan.c: Remove.
6465
6466 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6467
6468 * class.c (set_super_info): Handled protected inner classes.
6469 (common_enclosing_context_p): Bail early if arguments aren't both
6470 inner classes.
6471 (get_access_flags_from_decl): Handle private and protected inner
6472 classes.
6473 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
6474 (CLASS_PROTECTED): Likewise.
6475 (struct lang_type): New bitfield `poic'.
6476 * parse.y (jdep_resolve_class): Call check_inner_class_access on
6477 inner classes only.
6478 (check_inner_class_access): Renamed arguments, added
6479 comments. Handles protected inner classes (fixes gcj/225)
6480 (not_accessible_p): Fixed comments. Avoid handling inner classes.
6481
6482 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6483
6484 * parse.y (resolve_qualified_expression_name): Verify qualified
6485 access to `this'. Fixes gcj/239.
6486
6487 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6488
6489 * jcf-write.c (generate_classfile): Don't install ConstantValue
6490 for null pointers.
6491
6492 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6493
6494 * parse.y (resolve_qualified_expression_name): Handle inner class
6495 access. Fixes gcj/256.
6496
6497 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6498
6499 * jcf-write.c (generate_classfile): Properly install the
6500 ConstantValue attribute and the initial value constant pool index
6501 on string constants.
6502 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
6503 class files.
6504
6505 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6506
6507 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
6508 construct.
6509 * parse.y (find_as_inner_class): Fixed typo.
6510 (do_resolve_class): Explore enclosing contexts when searching for
6511 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
6512 (check_inner_class_access): Check `decl' which can be null in case
6513 of previous errors.
6514
6515 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6516
6517 * java-tree.h (java_debug_context): Declared `extern'.
6518 (safe_layout_class): Likewise.
6519 * parse.y (resolve_field_access): Field must be `static' in order
6520 to be replaced by its initial value. Added comments.
6521 (find_applicable_accessible_methods_list): Fixed typo.
6522 (find_most_specific_methods_list): Methods found in innerclasses
6523 take over methods founds in the enclosing contexts.
6524 (java_complete_tree): Loosen restrictions on the type of DECLs
6525 that can be replaced by their initialization values.
6526 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
6527
6528 2000-07-05 Tom Tromey <tromey@cygnus.com>
6529
6530 * Make-lang.in (PARSE_DIR): New macro.
6531 (PARSE_RELDIR): Likewise.
6532 (PARSE_C): Likewise.
6533 (PARSE_SCAN_C): Likewise.
6534 ($(PARSE_C)): New target.
6535 ($(PARSE_SCAN_C)): Likewise.
6536 (SET_BISON): New macro.
6537 (BISONFLAGS): Likewise.
6538 (JAVABISONFLAGS): Likewise.
6539
6540 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
6541
6542 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
6543 argument on the first pass for CNI as well as JNI.
6544 (print_method_info): Set up method name on the first pass only.
6545
6546 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6547
6548 * parse.y (parser_qualified_classname): Removed parameter
6549 `is_static'.
6550 (create_interface): Removed first passed parameter to
6551 parser_qualified_classname.
6552 (create_class): Likewise. Don't install alias on static
6553 innerclasses. Fixes gcj/275.
6554
6555 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6556
6557 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
6558 debugable statement with empty_stmt_node. Fixes gcj/272
6559
6560 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6561
6562 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
6563 gcj/271.
6564
6565 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
6566
6567 * jcf-write.c (push_long_const): Appropriately cast short negative
6568 constant to jword.
6569
6570 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
6571
6572 * parse.y (verify_constructor_super): Use loop variable
6573 `m_arg_type' initialized with `mdecl_arg_type'.
6574
6575 2000-06-29 Tom Tromey <tromey@cygnus.com>
6576
6577 * parse.y (resolve_field_access): Handle case where `type_found'
6578 is NULL.
6579
6580 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6581
6582 * expr.c (lookup_field): The same field can be found through two
6583 different interface. Don't declare it ambiguous in that case.
6584
6585 2000-06-27 Tom Tromey <tromey@cygnus.com>
6586
6587 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
6588 follows \r, then unget it at a lower level.
6589
6590 2000-06-26 Tom Tromey <tromey@cygnus.com>
6591
6592 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
6593 java_complete_tree.
6594
6595 2000-06-25 Tom Tromey <tromey@cygnus.com>
6596
6597 * parse.y (for_statement): Wrap expression in a WFL if it is a
6598 constant. For PR gcj/268.
6599
6600 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6601
6602 * parse.y (do_resolve_class): Minor optimiztion in the package
6603 list search. Removed unnecessary test and return statement.
6604 (valid_ref_assignconv_cast_p): Order of arguments to
6605 enclosing_context_p fixed.
6606
6607 2000-06-24 Tom Tromey <tromey@cygnus.com>
6608
6609 * expr.c (lookup_field): Print error and return error_mark_node if
6610 field reference is ambiguous.
6611
6612 * parse.y (check_abstract_method_definitions): Also check if
6613 `other_method' is abstract.
6614
6615 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
6616
6617 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
6618 classes.
6619 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
6620 (struct lang_type): New field `pic'.
6621 (CLASS_PRIVATE): New macro.
6622 * parse.y (check_inner_class_access): New function.
6623 (jdep_resolve_class): Call it.
6624
6625 2000-06-23 Tom Tromey <tromey@cygnus.com>
6626
6627 * parse.y (patch_incomplete_class_ref): Initialize the returned
6628 class. For PR gcj/260.
6629
6630 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
6631
6632 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
6633
6634 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6635
6636 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
6637 Java specific checks.
6638 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
6639 screened by DECL_P.
6640 * java-tree.def (CASE_EXPR): Marked 'e'.
6641 (DEFAULT_EXPR): Likewise.
6642 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
6643 screened by DECL_P.
6644 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
6645 Java specific checks.
6646 (generate_bytecode_insns): Test try_block for BLOCK before using
6647 BLOCK_EXPR_BODY.
6648 * parse.y (build_wfl_wrap): Added `location' argument. Set
6649 EXPR_WFL_LINECOL accordingly.
6650 (dim_expr:): Wrap constants with WFLs.
6651 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
6652 (resolve_package): Check for `stmt' not being a BLOCK before
6653 building a debuggable statement with it.
6654 (make_qualified_primary): Added extra parameter to build_wfl_wrap
6655 invocation.
6656 (resolve_field_access): Make sure `decl' is a DECL before treating
6657 it as such.
6658 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
6659 IDENTIFIER_NODE before treating it as such.
6660 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
6661 treating it as such.
6662 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
6663 to be applied only on non array types.
6664
6665 2000-06-16 Per Bothner <per@bothner.com>
6666
6667 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
6668 define in terms of DECL_RESULT, as that fails when --enable-checking.
6669
6670 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6671
6672 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
6673 types the same in comparison.
6674 (CHECK_OP): Add static prototype.
6675
6676 2000-06-13 Jakub Jelinek <jakub@redhat.com>
6677
6678 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
6679 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
6680 * parse.c: Rebuilt.
6681
6682 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6683
6684 * decl.c (create_primitive_vtable): Prototype.
6685
6686 * jcf-write.c (generate_bytecode_insns): Initialize variable
6687 `saved_context'.
6688
6689 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
6690
6691 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
6692
6693 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
6694 to track searched classes, and do not search the same class more than
6695 once. Call find_applicable_accessible_methods_list on immediate
6696 superclass, instead of search_applicable_method_list on all ancestors.
6697 Fix for PR gcj/238.
6698
6699 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
6700
6701 * parse.y (register_fields): Permit static fields in inner classes
6702 if they are final. Fix for PR gcj/255.
6703
6704 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6705
6706 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
6707 * parse.y (find_in_imports): Returned type changed to void,
6708 leading comment fixed.
6709 (register_package): New function.
6710 (qualify_and_find): Likewise.
6711 (package_declaration:): Use `register_package'.
6712 (single_type_import_declaration:): Removed local variable
6713 `node'. Added missing `;' for consistency.
6714 (type_import_on_demand_declaration:): Use `chainon' to link new
6715 entries.
6716 (lookup_field_wrapper): Lookup local variables defined in outer
6717 contexts first.
6718 (java_complete_class): Don't reverse the list of imported on demand.
6719 (do_resolve_class): Reorganized. Removed local variable
6720 `original_name'. Call `qualify_and_find' with the current package
6721 name, invoke `find_in_imports_on_demand' right after. Call
6722 `qualify_and_find' with the packages we've seen so far. Fixed
6723 operations numbering in comments.
6724 (java_expand_class): Don't reverse `package_list'.
6725 (find_most_specific_methods_list): New local variables `abstract'
6726 and `candidates'. Use them to pick the right method.
6727
6728 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
6729
6730 * parse.y (check_modifiers_consistency): Don't subtract out
6731 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
6732
6733 2000-06-04 Philipp Thomas <pthomas@suse.de>
6734
6735 * Makefile.in (INTLLIBS): New.
6736 (LIBS): Add above.
6737 (DEPLIBS): Ditto.
6738
6739 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6740
6741 * class.c (get_dispatch_table): Build the vtable dummy entry list
6742 element with a null purpose. Fixed leading comment.
6743 (build_dtable_decl): Build an accurate dtable type when appropriate
6744 and use it.
6745
6746 2000-06-02 Richard Henderson <rth@cygnus.com>
6747
6748 * lang.c (lang_get_alias_set): New.
6749
6750 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
6751
6752 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
6753 before using it as the accessed field.
6754
6755 2000-05-31 Tom Tromey <tromey@cygnus.com>
6756
6757 * java-tree.h (boolean_array_vtable, byte_array_vtable,
6758 char_array_vtable, short_array_vtable, int_array_vtable,
6759 long_array_vtable, float_array_vtable, double_array_vtable):
6760 Declare.
6761 * expr.c (get_primitive_array_vtable): New function.
6762 (create_primitive_vtable): New function.
6763 (java_lang_expand_expr): Enable code to statically generate
6764 arrays.
6765 * decl.c (init_decl_processing): Create primitive vtables.
6766 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
6767 short_array_vtable, int_array_vtable, long_array_vtable,
6768 float_array_vtable, double_array_vtable): Define.
6769
6770 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
6771
6772 * java/parse.y (find_applicable_accessible_methods_list):
6773 Don't add an uninitialized value to the list.
6774
6775 2000-05-25 Tom Tromey <tromey@cygnus.com>
6776
6777 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
6778 when trying to see if field's class should be initialized. Always
6779 initialize field's declaring class, not qualified class.
6780 For PR gcj/162.
6781
6782 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
6783 `wfl_operator', to maybe_build_primttype_type_ref.
6784 Fixes PR gcj/235.
6785
6786 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
6787
6788 * parse.y (patch_method_invocation): Don't try to lookup methods
6789 in primitive types.
6790
6791 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6792
6793 * parse.y (resolve_field_access): Call the appropriate <clinit>
6794 before accessing the length of a static array. Craft a decl for
6795 the field while its time. Fixes PR gcj/129.
6796
6797 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6798
6799 * parse.y (resolve_package): Correctly set `*next' (was off by
6800 one.)
6801 (resolve_qualified_expression_name): Fixed comment.
6802
6803 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6804
6805 * jcf-parse.c (jcf_parse_source): Reset current_class and
6806 current_function_decl to NULL before parsing a new file.
6807
6808 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6809
6810 * parse.y (block_end:): If the collected block doesn't feature a
6811 statement, insert an empty statement.
6812
6813 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6814
6815 * parse.y (maybe_yank_clinit): New function.
6816 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
6817 end of the list of methods belonging to a class.
6818 (java_complete_expand_method): Check whether <clinit> is really
6819 necessary and expand it accordingly.
6820
6821 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6822
6823 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
6824 processed by the method's switch statement.
6825
6826 2000-05-19 Tom Tromey <tromey@cygnus.com>
6827
6828 * java-tree.h: Added init state enum.
6829 * decl.c (emit_init_test_initialization): Initialize class
6830 initialization check variable by looking at class' state.
6831
6832 2000-05-19 Tom Tromey <tromey@cygnus.com>
6833
6834 * java-tree.h (build_instanceof): Declare.
6835 (build_get_class): Declare.
6836 * parse.y (patch_binop): Use build_instanceof.
6837 * expr.c (build_instanceof): New function. If class is final,
6838 don't make a function call.
6839 (expand_java_INSTANCEOF): Use it.
6840 (build_get_class): New function.
6841
6842 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
6843
6844 * jcf-write.c (generate_classfile): Scan the source_file for
6845 slashes with the right pointer variable.
6846
6847 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
6848
6849 * lang.c (lang_decode_option): Update -Wunused flags by calling
6850 set_Wunused.
6851 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
6852
6853 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
6854
6855 * check_init.c (check_init): Constify local char *.
6856 * class.c (push_class): Constify local char *.
6857 * java_tree.h: Update prototypes.
6858 * jcf-io.c (open_class): Constify filename parameter and
6859 return value.
6860 (find_class): Remove redundant string copy. Cast return from
6861 open_class.
6862 * jcf-parse.c (read_class, parse_class_file, yyparse):
6863 Constify local char *.
6864 * jcf-write.c (generate_bytecode_insns, generate_classfile):
6865 Constify local char *.
6866 * jcf.h (JCF): Constify filename and classname.
6867 (JCF_FINISH): Cast args to FREE to char * when appropriate.
6868 * lang.c (init_parse): Constify parameter and return value.
6869 * lex.c (java_get_line_col): Constify filename parameter.
6870 * parse.h: Constify parser_ctxt.filename. Update prototypes.
6871 * parse.y (java_parser_context_suspend,
6872 issue_warning_error_from_context, safe_layout_class): Constify
6873 local char *.
6874 * parse.c: Regenerate.
6875
6876 2000-05-08 Tom Tromey <tromey@cygnus.com>
6877
6878 * expr.c (build_jni_stub): Cache the result of
6879 _Jv_LookupJNIMethod.
6880
6881 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6882
6883 * decl.c (predef_filenames_size): Now 7.
6884 (predef_filenames): New seventh entry.
6885
6886 2000-05-04 Tom Tromey <tromey@cygnus.com>
6887
6888 * boehm.c (mark_reference_fields): Don't mark RawData fields.
6889 Keep track of when we've seen a reference field after a
6890 non-reference field.
6891 (get_boehm_type_descriptor): Handle case where we see
6892 non-reference fields but no trailing reference field.
6893 * decl.c (rawdata_ptr_type_node): Define.
6894 (init_decl_processing): Initialize rawdata_ptr_type_node.
6895 * java-tree.h (rawdata_ptr_type_node): Declare.
6896
6897 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6898
6899 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
6900 specifiers in calls to fprintf.
6901
6902 2000-05-03 Andrew Haley <aph@cygnus.com>
6903
6904 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
6905
6906 * javaop.h (WORD_TO_INT): New function.
6907 (IMMEDIATE_s4): Use WORD_TO_INT.
6908 * jcf.h (JPOOL_INT): Ditto.
6909
6910 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
6911 separator.
6912
6913 2000-04-19 Tom Tromey <tromey@cygnus.com>
6914
6915 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
6916 on native function.
6917 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
6918 JNI methods.
6919 * expr.c (build_jni_stub): New function.
6920 * lang-specs.h: -fjni and -femit-class-file are incompatible.
6921 * parse.c: Rebuilt.
6922 * parse.y (java_complete_expand_methods): Expand a native method
6923 and call build_jni_stub if -fjni given.
6924 * lang-options.h: Document -fjni.
6925 * lang.c (flag_jni): New global.
6926 (lang_f_options): Added `jni' entry.
6927 * java-tree.h (soft_lookupjnimethod_node,
6928 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
6929 Declare.
6930 (flag_jni): Declare.
6931 (build_jni_stub): Declare.
6932 (struct lang_decl): Added `native' flag.
6933 (METHOD_NATIVE): Redefined to use `native' field of lang specific
6934 structure.
6935 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
6936 soft_jnipopsystemframe_node): New globals.
6937 (init_decl_processing): Set them. _Jv_InitClass only takes one
6938 argument.
6939
6940 * java-tree.def: Put into `C' mode.
6941
6942 2000-04-27 Tom Tromey <tromey@cygnus.com>
6943
6944 Fix for PR gcj/2:
6945 * expr.c (expand_invoke): Generate check to see if object pointer
6946 is null in nonvirtual invocation case.
6947 * java-tree.h (soft_nullpointer_node): Declare.
6948 * decl.c (soft_nullpointer_node): New global.
6949 (init_decl_processing): Initialize soft_nullpointer_node.
6950 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
6951 or `private' methods.
6952 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
6953
6954 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
6955
6956 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
6957 from <clinit>
6958
6959 2000-04-26 Tom Tromey <tromey@cygnus.com>
6960
6961 * zextract.c (find_zip_file_start): New function.
6962 (read_zip_archive): Use it.
6963
6964 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6965
6966 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
6967
6968 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6969
6970 * class.c (common_enclosing_context_p): New function.
6971 * java-tree.h (common_enclosing_context_p): Added prototype.
6972 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
6973 classes sharing an outer context with the current instance.
6974 * parse.y (build_access_to_thisn): Fixed leading comment.
6975 (verify_constructor_super): New local `supper_inner'. Skip
6976 enclosing context argument in the case of inner class constructors.
6977 (patch_method_invocation): Insert proper context as second
6978 parameter to pure inner class constructor super invocations.
6979
6980 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6981
6982 * parse.y (end_class_declaration): Reset the interface number
6983 counter.
6984
6985 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6986
6987 * parse.y (source_start_java_method): Deleted unnecessary code.
6988 (patch_method_invocation): Fixed comment.
6989
6990 2000-04-24 Robert Lipe <robertlipe@usa.net>
6991
6992 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
6993
6994 2000-04-23 Tom Tromey <tromey@cygnus.com>
6995
6996 * boehm.c (mark_reference_fields): Use int_byte_position.
6997
6998 2000-04-22 Tom Tromey <tromey@cygnus.com>
6999
7000 * boehm.c (mark_reference_fields): Only call byte_position on
7001 non-static fields.
7002
7003 2000-04-22 Tom Tromey <tromey@cygnus.com>
7004
7005 * boehm.c (mark_reference_fields): Added `last_view_index'
7006 argument. Use DECL_FIELD_OFFSET to determine field's offset.
7007
7008 2000-04-20 Mo DeJong <mdejong@cygnus.com>
7009
7010 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
7011 * parse.y (check_class_interface_creation): Fixed comments. Select
7012 permitted modifiers for (inner) interfaces. Changed error message
7013 to report rejected modifiers used with local classes.
7014
7015 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7016
7017 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
7018 of directly inherited type considered in scope.
7019 * parse.y (do_resolve_class): Search inherited classes for inner
7020 classes.
7021
7022 2000-04-20 Tom Tromey <tromey@cygnus.com>
7023
7024 * parse.y (not_accessible_p): Use member's class, not current
7025 class, when doing inheritance check for protected reference.
7026 Fixes PR gcj/124.
7027
7028 2000-04-20 Jason Schroeder <shrode@subnature.com>
7029
7030 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
7031
7032 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7033
7034 * parse.y (lookup_field_wrapper): Search for final local aliases.
7035 (resolve_expression_name): Let lookup_field_wrapper search for
7036 final local aliases. Force the value of `name' if one is found.
7037 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
7038 an expression name. Fixed comments.
7039
7040 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
7041
7042 * parse.y (yyerror): `msg' can be null, don't use it in that case.
7043
7044 2000-04-19 Tom Tromey <tromey@cygnus.com>
7045
7046 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
7047
7048 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
7049
7050 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
7051
7052 2000-04-18 Tom Tromey <tromey@cygnus.com>
7053
7054 PR gcj/211:
7055 * gjavah.c (utf8_cmp): Changed return value.
7056 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
7057 result.
7058 (cxx_keywords): New global.
7059 (get_field_name): Handle new result of cxx_keyword_subst.
7060 (print_method_info): Likewise.
7061
7062 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
7063
7064 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
7065 with a newline, for CNI.
7066 (print_stub_or_jni): Print a space or newline before method name for
7067 CNI as well as JNI.
7068 (print_cxx_classname): Don't write leading "::" in CNI stub method.
7069 (process_file): Include gcj/cni.h if generating CNI stubs.
7070
7071 2000-04-16 Tom Tromey <tromey@cygnus.com>
7072
7073 * gjavah.c (decompile_method): Use print_field_name.
7074 Fixes PR gcj/205.
7075
7076 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
7077
7078 * parse.y (java_expand_classes): Reverse the package list once.
7079 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
7080 reduction.
7081 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
7082 the `==' and `!=' operators.
7083
7084 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7085
7086 * jcf-write.c (generate_bytecode_insns): At invocation time,
7087 always relate an interface method to the type of its selector.
7088
7089 2000-04-05 Tom Tromey <tromey@cygnus.com>
7090
7091 Fix for PR gcj/2:
7092 * expr.c (expand_invoke): Generate check to see if object pointer
7093 is null in nonvirtual invocation case.
7094 * java-tree.h (soft_nullpointer_node): Declare.
7095 * decl.c (soft_nullpointer_node): New global.
7096 (init_decl_processing): Initialize soft_nullpointer_node.
7097 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
7098 or `private' methods.
7099 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
7100
7101 2000-04-05 Tom Tromey <tromey@cygnus.com>
7102
7103 Fix for PR gcj/140:
7104 * parse.y (check_final_assignment): Recognize assignments to the
7105 `length' field of an array when generating class files.
7106
7107 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7108
7109 * class.c (decl_hash): Prototype removed.
7110 (decl_compare): Likewise.
7111
7112 2000-04-05 Tom Tromey <tromey@cygnus.com>
7113
7114 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
7115 * parse.y (check_modifiers_consistency): Check for final/volatile
7116 clash. Fixes PR gcj/164.
7117
7118 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
7119
7120 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
7121 made global.
7122 (java_hash_compare_tree_node): Renamed from `decl_compare, made
7123 global.
7124 (add_method_1): Use `java_hash_hash_tree_node' and
7125 `java_hash_compare_tree_node'.
7126 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
7127 (java_hash_compare_tree_node): Likewise.
7128 * parse.y (find_applicable_accessible_methods_list): Create,
7129 delete and use a hash table to remember already searched interfaces.
7130
7131 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
7132
7133 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
7134 with latest entry.
7135
7136 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7137
7138 * boehm.c (mark_reference_fields, set_bit): Prototype.
7139 (set_bit): Un-ANSI-fy definition.
7140
7141 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
7142 Prototype.
7143
7144 * decl.c (emit_init_test_initialization): Likewise.
7145
7146 * gjavah.c (jni_print_char): Likewise.
7147
7148 * parse.y (create_new_parser_context): Likewise.
7149
7150 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
7151
7152 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
7153 patch missing hunk. Fixed indentation.
7154
7155 2000-03-30 Tom Tromey <tromey@cygnus.com>
7156
7157 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
7158 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
7159
7160 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
7161
7162 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
7163 when negative *before* using it as an array index.
7164 * ChangeLog: Fixed typo.
7165
7166 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
7167
7168 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
7169 to 0 when it reaches -1.
7170
7171 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
7172
7173 * jcf-parse.c (get_constant): Properly cast `num' during the
7174 invocation of `add_double'.
7175 * jcf-write.c (push_long_const): Properly cast `lo' before
7176 comparing it to short bounds.
7177 * parse-scan.y (interface_declaration:): Rule re-arrange so that
7178 `interface_body:' is reduced after the current interface is
7179 pushed.
7180
7181 2000-03-26 Tom Tromey <tromey@cygnus.com>
7182
7183 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
7184 Java-specific `-f' option.
7185
7186 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7187
7188 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
7189 Adjust order of making types.
7190 Make bitsize_*_node values.
7191
7192 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7193
7194 * class.c (make_field_value): Use byte_position.
7195 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
7196 (java_array_data_offset): Likewise.
7197 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
7198 bzero call.
7199
7200 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
7201
7202 * parse.y (check_abstract_method_definitions): New local
7203 `end_type_reached'. Make sure we also consider `end_type'.
7204 (java_check_abstract_method_definitions): Make sure we eventually
7205 consider `java.lang.Object'.
7206 (maybe_use_access_method): Don't use access method if not in the
7207 context of a pure inner class or if the method's context is right.
7208 (find_applicable_accessible_methods_list): New static flag
7209 `object_done'. Don't search abstract classes as interfaces. Fixed
7210 indentation. Fixed the `java.lang.Object' only search. Search
7211 class interface(s) first, then fully search enclosing contexts.
7212 (find_most_specific_methods_list): Pick the closest candidate when
7213 they're all abstract.
7214
7215 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7216
7217 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
7218 properly initialize `finished_label'. Don't emit gotos for empty
7219 try statements.
7220
7221 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7222
7223 * except.c (emit_handlers): Clear catch_clauses_last.
7224
7225 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7226
7227 * parse.y (check_method_types_complete): New function.
7228 (create_class): Reset anonymous class counter only when seeing an
7229 non inner classe.
7230 (java_complete_class): JDEP_METHOD: Don't recompute signature
7231 if incomplete.
7232
7233 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7234
7235 * class.c (build_static_ref): Fixed indentation in comment.
7236 * java-tree.def (TRY_EXPR): Fixed typo in name.
7237 (CLASS_LITERAL): Likewise.
7238 * java-tree.h: (TYPE_DOT_CLASS): New macro.
7239 (struct lang_type): New field `dot_class'.
7240 * jcf-write.c (generate_bytecode_insns): Fixed error message.
7241 (generate_classfile): Method `class$' is synthetic.
7242 * parse.y (build_do_class_method): New function.
7243 (build_dot_class_method_invocation): Likewise.
7244 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
7245 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
7246 (qualify_ambiguous_name): Likewise.
7247 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
7248 (build_try_statement): Fixed leading comment.
7249
7250 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7251
7252 * class.c (make_field_value): Properly handle sizes.
7253 (get_dispatch_vector): Use tree_low_cst and host_integerp.
7254 (layout_class_method): Count using trees.
7255 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
7256 * expr.c (java_array_data_offset): Use int_bit_position.
7257 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
7258 (build_invokevirtual): Use tree_low_cst and do computations with trees.
7259
7260 2000-03-16 Tom Tromey <tromey@cygnus.com>
7261
7262 * lang.c (flag_hash_synchronization): New global.
7263 (lang_f_options): Added `hash-synchronization'.
7264 * lang-options.h: Mention -fhash-synchronization.
7265 * java-tree.h (flag_hash_synchronization): Declare.
7266 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
7267 hash table synchronization is disabled.
7268 * decl.c (init_decl_processing): Only push `sync_info' value when
7269 hash table synchronization is disabled.
7270 * class.c (make_class_data): Only push `sync_info' field when hash
7271 table synchronization is disabled. Removed dead code.
7272
7273 2000-03-16 Tom Tromey <tromey@cygnus.com>
7274
7275 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
7276
7277 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7278
7279 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
7280 classes.
7281 * parse.y (patch_method_invocation): Handle anonymous classes
7282 creation in static context.
7283
7284 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7285
7286 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
7287 * parse.y (resolve_qualified_expression_name): Use it.
7288 (patch_method_invocation): Likewise.
7289
7290 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7291
7292 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
7293 depending on the type of dependency which dictates what the
7294 current class is.
7295 (unresolved_type_p): Resolved types limited to the current class.
7296
7297 2000-03-15 Tom Tromey <tromey@cygnus.com>
7298
7299 * decl.c (init_decl_processing): Set type of `sync_info' to be
7300 pointer to Object.
7301
7302 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
7303 Correctly compute bit number for current slot. Zero `high' and
7304 `low' in DS_LENGTH case. Don't skip inherited fields. Use
7305 mark_reference_fields.
7306 (mark_reference_fields): New function.
7307
7308 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
7309
7310 * parse.y (register_incomplete_type): Fixed initialization of
7311 JDEP_ENCLOSING.
7312
7313 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
7314
7315 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
7316 static globals.
7317 (push_class_context, pop_class_context): New function.
7318 (class_body:): Call pop_class_context.
7319 (interface_body:): Likewise.
7320 (INNER_QUALIFIER): New macro.
7321 (report_class_declaration): Changed output format and use
7322 INNER_QUALIFIER. Call push_class_context.
7323
7324 2000-02-14 Andrew Haley <aph@cygnus.com>
7325
7326 * check-init.c (check_init): Add new cases for unary and binary
7327 tree nodes.
7328
7329 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7330
7331 * parse.y (resolve_package): Set `next' once a type name has been
7332 progressively discovered.
7333 (resolve_qualified_expression_name): Propagate resolution only if
7334 there are remaining qualifiers. Take into account `q' might have
7335 been cleared after re-qualification.
7336 * parse.y (patch_method_invocation): New local `resolved'.
7337 Section dealing with qualified expression rewritten to use
7338 resolve_field_access.
7339
7340 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
7341
7342 * parse.h (PUSH_CPC): Fixed indentation.
7343 (DEBUG_CPC): New macro.
7344 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
7345 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
7346 * parse.y (class_body_declaration:): Use
7347 SET_CPC_INSTANCE_INITIALIZER_STMT.
7348 (method_declaration:): Check for null current_function_decl.
7349 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
7350 (java_parser_context_pop_initialized_field): Better handling of
7351 empty lists.
7352 (maybe_make_nested_class_name): Mark nested class name as
7353 qualified when necessary.
7354 (end_class_declaration): Don't call java_parse_context_resume when
7355 one or more error occurred.
7356 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
7357 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
7358 SET_CPC_INITIALIZER_STMT.
7359 (method_header): Check for inner classes declaring static methods.
7360 (resolve_qualified_expression_name): Handle situation where `this'
7361 is implied.
7362
7363 2000-03-13 Hans Boehm <boehm@acm.org>
7364
7365 * typeck.c (build_prim_array_type): Correctly set the high word too.
7366
7367 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
7368
7369 * parse.y (java_complete_expand_methods): Leave <clinit> out of
7370 ordinary methods.
7371 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
7372 list of methods for interfaces.
7373
7374 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7375
7376 * parse.y (qualify_ambiguous_name): Properly handle expressions
7377 using `null'.
7378
7379 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7380
7381 * parse.y (check_final_assignment): Extended to process
7382 COMPOUND_EXPR.
7383 (patch_assignment): Have check_final_assignment called only once.
7384
7385 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7386
7387 * java-tree.h (IS_INIT_CHECKED): New flag.
7388 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
7389 * parse.y (patch_string): Call force_evaluation_order on the
7390 completed string concatenation tree.
7391 * expr.c (force_evaluation_order): Call force_evaluation_order on
7392 function's arguments too.
7393
7394 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7395
7396 * decl.c (emit_init_test_initialization): Mark KEY as unused.
7397 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7398 (build_anewarray): Likewise.
7399 * parse.y (patch_newarray): Likewise.
7400 * parse.c: Regenerated.
7401
7402 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
7403
7404 * decl.c (init_decl_processing): Added new class fields `depth',
7405 `ancestors', and `idt' to class_type_node. Use
7406 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
7407 * class.c (make_class_data): Push initial values for new fields.
7408 * java-tree.h: Updated prototype for `build_invokeinterface'.
7409 * expr.c (build_invokeinterface): Changed parameters to accept
7410 `method' tree. Calculate index of `method' in its declaring
7411 interface. Build call to _Jv_LookupInterfaceMethodIdx.
7412 (expand_invoke): Call `build_invokeinterface' with new parameters.
7413 * parse.y (patch_invoke): Call `build_invokeinterface' with new
7414 parameters.
7415
7416 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
7417
7418 * typeck.c (lookup_do): Search superinterfaces first
7419 when looking up an interface method. From Godmar Back
7420 <gback@cs.utah.edu>
7421
7422 2000-03-06 Tom Tromey <tromey@cygnus.com>
7423
7424 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
7425
7426 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
7427
7428 * java-tree.h (lookup_argument_method2): Declared.
7429 (safe_layout_class): Prototype moved from parse.h.
7430 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
7431 * parse.y (java_check_regular_methods): Local `super_class' gone.
7432 Call lookup_argument_method2 instead of lookup_argument_method.
7433 Perform modifier match for methods found declared in implemented
7434 interfaces. Fixed indentation problem. Overriding/hiding error
7435 report to take place only for methods found in classes.
7436 * typeck.c (lookup_argument_method): Changed leading
7437 comment. Re-written by calling lookup_do.
7438 (lookup_argument_method2): New function.
7439 (lookup_java_method): Re-written by calling lookup_do.
7440 (lookup_do): New function.
7441
7442 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
7443
7444 * check-init.c (check_init): Removed dead code. Handle (blank)
7445 final variables.
7446 * parse.y (declare_local_variables): New local `final_p', set it
7447 and use it to initialize LOCAL_FINAL.
7448 (check_final_assignment): Only check FIELD_DECLs.
7449
7450 2000-02-17 Tom Tromey <tromey@cygnus.com>
7451
7452 * Makefile.in (JAVA_OBJS): Added boehm.o.
7453 (boehm.o): New target.
7454 * Make-lang.in (JAVA_SRCS): Added boehm.c.
7455 * java-tree.h (flag_use_boehm_gc): Declare.
7456 (get_boehm_type_descriptor): Declare.
7457 * lang.c (lang_f_options): Added `use-boehm-gc'.
7458 (flag_use_boehm_gc): New global.
7459 * lang-options.h: Added -fuse-boehm-gc.
7460 * boehm.c: New file.
7461 * class.c (get_dispatch_table): If class uses a Boehm type
7462 descriptor, put it in the vtable.
7463 (make_class_data): Removed dead code.
7464
7465 2000-03-03 Per Bothner <per@bothner.com>
7466
7467 * decl.c (init_decl_processing): Initialize sizetype properly.
7468
7469 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7470
7471 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
7472 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
7473 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7474 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
7475 (jcf_parse): New local `current'. Load innerclasses seen in outer
7476 context being processed.
7477 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7478 * jcf-write.c (append_innerclasses_attribute): New function.
7479 (append_innerclasses_attribute_entry): Likewise.
7480 (get_access_flags): Handle static classes. Set anonymous and local
7481 classes to be private.
7482 (generate_classfile): Attribute count adjusted. Call
7483 append_innerclasses_attribute.
7484 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
7485 PURE_INNER_CLASS_TYPE_P.
7486 * parse.y (parser_qualified_classname): New parameter `is_static',
7487 produce non qualified name accordingly.
7488 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
7489 (create_interface): Added argument to parser_qualified_classname.
7490 (create_class): Added argument to parser_qualified_classname. Setup
7491 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
7492 (add_inner_class_fields): Fixed indentation.
7493 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
7494 (method_declarator): Fixed typo in comment.
7495 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
7496 (build_current_thisn): Likewise.
7497 (patch_method_invocation): Likewise.
7498
7499 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
7500
7501 * decl.c (current_function_decl): Move to toplev.c.
7502
7503 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7504
7505 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
7506 (DECL_BIT_INDEX): Use underlying representation.
7507 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
7508
7509 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7510
7511 * expr.c (build_java_ret): Pass proper type to size_binop.
7512
7513 2000-02-25 Anthony Green <green@cygnus.com>
7514
7515 * expr.c (build_class_init): Mark the decl to be ignored by
7516 check_init.
7517 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
7518 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
7519 * class.c (init_test_hash_newfunc): New function.
7520 (decl_hash): New function.
7521 (decl_compare): New function.
7522 * decl.c (emit_init_test_initialization): New function.
7523 (complete_start_java_method): Traverse the init test hashtable,
7524 calling emit_init_test_initialization.
7525 (always_initialize_class_p): Define.
7526 * expr.c (build_class_init): Use initialization tests when
7527 emitting class initialization code.
7528 (always_initialize_class_p): Declare.
7529 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
7530 1.
7531 * java-tree.h: Include hash.h.
7532 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
7533 (struct lang_decl): Add init_test_table field.
7534 (init_test_hash_entry): Define.
7535
7536 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7537
7538 * gjavah.c (main): Avoid using `argi' to report unimplemented
7539 options.
7540
7541 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7542
7543 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
7544 initialize locals to avoid warnings. Local `exception_type' moved
7545 into if statement.
7546
7547 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
7548
7549 * parse.y (resolve_expression_name): Use `orig' as a second
7550 argument to resolve_field_access.
7551 (resolve_field_access): Removed unnecessary code when dealing with
7552 static fields.
7553
7554 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
7555
7556 * class.c (push_super_field): Don't push the field twice.
7557 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
7558 * parse.h (java_reorder_fields): Prototyped.
7559 * parse.y (java_reorder_fields): New function.
7560 (java_layout_class): Simplified not to worry about re-ordering.
7561
7562 2000-02-23 Tom Tromey <tromey@cygnus.com>
7563
7564 * gjavah.c (print_name): In JNI case, correctly quote string.
7565 (print_method_info): Don't handle overrides in JNI mode.
7566
7567 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
7568
7569 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
7570 value type set to `boolean_type_node'.
7571
7572 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
7573
7574 * jcf-dump.c (main): Test for correct condition after
7575 output file creation.
7576
7577 2000-02-19 Anthony Green <green@cygnus.com>
7578
7579 * jcf-depend.c (add_entry): Fix test for first list entry.
7580
7581 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7582
7583 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
7584 * constants.c (build_constants_constructor): Likewise.
7585
7586 2000-02-19 Anthony Green <green@cygnus.com>
7587
7588 * jcf-depend.c (add_entry): Add entries to the end of the list.
7589
7590 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
7591
7592 * decl.c (INT_TYPE_SIZE): Define if necessary.
7593 (expand_java_return): Handle the case of a native integer smaller
7594 than a JVM integer.
7595
7596 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
7597
7598 * gjavah.c (help): Use GCCBUGURL.
7599 * jv-scan.c (help): Likewise.
7600 * jcf-dump.c (help): Likewise.
7601
7602 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7603
7604 * jcf-write.c (generate_bytecode_insns): Don't generate empty
7605 `finally' clauses.
7606
7607 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
7608
7609 * jcf-parse.c (load_class): Call `fatal' if no file containing
7610 the target class are found.
7611
7612 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
7613
7614 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
7615 lex.c, lex.h, and PARSE_H to...
7616 (parse.o, parse-scan.o): ...here, respectively.
7617
7618 * lex.c: Split out code that may trigger SIGFPE from yylex()
7619 to its own function.
7620 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
7621
7622 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7623
7624 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
7625
7626 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
7627
7628 * parse.y (outer_field_access_p): Stop in time when outer contexts
7629 are exhausted.
7630 (resolve_qualified_expression_name): Properly qualify *everything*
7631 after a package.type to be resoled as expression names.
7632 (find_applicable_accessible_methods_list): Save/restore `class' to
7633 isolate it from a possible outer context search.
7634
7635 2000-02-15 Tom Tromey <tromey@cygnus.com>
7636
7637 * gjavah.c (jni_print_char): New function.
7638 (print_full_cxx_name): Use it.
7639 (decode_signature_piece): Likewise.
7640 (print_cxx_classname): Likewise.
7641
7642 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7643
7644 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
7645 version.o.
7646 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
7647
7648 * gjavah.c: Include version.h.
7649
7650 * jcf-dump.c: Likewise.
7651
7652 * jv-scan.c: Likewise.
7653
7654 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
7655
7656 * parse.y (outer_field_access_fix): First parameter now a tree
7657 node. Check for assignment to final. First argument to
7658 build_outer_field_access_fix modified to accommodate prototype.
7659 (build_outer_field_access): Don't check for assignment to final
7660 here.
7661 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
7662 possibly returned by outer_field_access_fix. Changed
7663 outer_field_access_fix's first argument.
7664 (check_final_assignment): $finit$'s context is OK.
7665 (patch_unaryop): Use node instead of its line/column value when
7666 calling outer_field_access_fix.
7667
7668 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
7669
7670 * parse.y (interface_declaration:): No longer tagged
7671 <node>. Re-installed default action.
7672 (class_member_declaration:): Handle inner interfaces.
7673 (interface_member_declaration): Handle inner interfaces and
7674 classes.
7675 (create_interface): Push error if one seen. Suspend parsing
7676 context when processing an inner interface.
7677 (register_fields): Inner class static field limitations not to
7678 apply to inner interfaces.
7679
7680 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7681
7682 * jcf-parse.c (load_class): Update `java_error_count' when a
7683 class' file can't be found.
7684 (parse.y): Avoid (byte)code generation when errors seen.
7685
7686 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7687
7688 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
7689 decodes a valid node.
7690 (patch_binop): Handle TRUNC_DIV_EXPR.
7691
7692 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7693
7694 * parse.y (resolve_package): New local `acc'. Try to progressively
7695 build and guess a package and type name.
7696
7697 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
7698
7699 * parse.y (find_applicable_accessible_methods_list): Load and
7700 layout the search class if necessary.
7701 (java_complete_tree): Keep to original type of the folded initial
7702 value.
7703
7704 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
7705
7706 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
7707 Generate error message if circularity is detected. New static
7708 local `list'.
7709 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
7710 * jcf-write.c (generate_bytecode_insns): Very simply handle
7711 SAVE_EXPR.
7712 * parse.y (java_check_circular_reference): Use
7713 `cyclic_inheritance_report' during report, if necessary.
7714 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
7715 walking NEW_ARRAY_INIT twice.
7716
7717 2000-02-09 Tom Tromey <tromey@cygnus.com>
7718
7719 * parse.y (check_class_interface_creation): Allow inner classes to
7720 be `private' or `protected', check modifiers' consistency. Prevent
7721 block local classes from bearing any modifiers.
7722
7723 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7724
7725 * except.c (check_start_handlers): Re-add prototype lost in last
7726 patch.
7727 (maybe_start_try): Remove excess argument to `check_start_handlers'.
7728
7729 2000-02-09 Andrew Haley <aph@cygnus.com>
7730
7731 * decl.c (clear_binding_level): Remove excess initializer.
7732 (maybe_poplevels): Remove unused variable.
7733 (force_poplevels): Ditto.
7734 (struct binding_level): Add comment.
7735
7736 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
7737
7738 * jcf-write.c (generate_classfile): Don't consider
7739 pre-initialization with reference value (use <clinit> instead.)
7740 * parse.y (java_fix_constructors): No generated constructor for
7741 interfaces.
7742 (build_outer_field_access): Removed debug message.
7743 (outer_field_expanded_access_p): Adapted to bytecode generation.
7744 (build_outer_field_access_method): Use fix_method_argument_names.
7745 (build_outer_method_access_method): Fixed indentation. Added
7746 comment. Handle access method generation for static and also void
7747 methods.
7748 (build_access_to_thisn): Inserted debug message.
7749 (maybe_build_thisn_access_method): Use fix_method_argument_names.
7750 (resolve_qualified_expression_name): Fixed comment.
7751 (not_accessible_p): Adapted to bytecode generation. Added comment.
7752 (patch_method_invocation): Added comment.
7753 (maybe_use_access_method): Fixed leading comment. Handle static
7754 methods.
7755 (java_complete_lhs): Don't shortcut handling of initialized upon
7756 declaration String type static fields when generating bytecode.
7757 (patch_unaryop): Handle outer field access when generating
7758 bytecode.
7759
7760 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
7761
7762 * java-tree.h (FIELD_THISN): New macro.
7763 * jcf-write.c (append_synthetic_attribute): New function.
7764 (generate_classfile): Set "Synthetic" attribute on this$<n>,
7765 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
7766 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
7767 this$<n> fields.
7768 (build_outer_field_access): Turned on access functions usage and
7769 generation when compiling to bytecode.
7770 (maybe_use_access_method): Likewise.
7771
7772 2000-01-25 Andrew Haley <aph@cygnus.com>
7773
7774 * java-except.h (struct eh_range): Add `expanded' field.
7775 (maybe_start_try): Add end_pc arg.
7776 (maybe_end_try): Ditto.
7777 * java-tree.h (force_poplevels): new function.
7778 * expr.c (expand_byte_code): Don't call maybe_start_try or
7779 maybe_end_try.
7780 * except.c (add_handler): Reset expanded.
7781 (expand_start_java_handler): Set expanded.
7782 (check_start_handlers): Don't expand a start handler that's
7783 already been expanded.
7784 (maybe_start_try): Add end_pc arg. Only expand a handler which
7785 ends after end_pc.
7786 (expand_end_java_handler): call force_poplevels.
7787 (force_poplevels): new function.
7788 * decl.c (binding_level): Add start_pc of binding level.
7789 (maybe_pushlevels): Call maybe_start_try when pushing binding
7790 levels.
7791 (maybe_poplevels): Call maybe_end_try when popping binding levels.
7792 (LARGEST_PC): Define.
7793 (clear_binding_level): Use LARGEST_PC.
7794
7795 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
7796 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
7797 (binding_depth, is_class_level, current_pc): new variables.
7798 (struct binding_level): ditto.
7799 (indent): new function.
7800 (push_jvm_slot): add debugging info.
7801 (maybe_pushlevels): ditto.
7802 (maybe_poplevels): ditto.
7803 (pushlevel): ditto.
7804 (poplevel): ditto.
7805 (start_java_method): ditto.
7806 (give_name_to_locals): comment only.
7807 * except.c (binding_depth, is_class_level, current_pc):
7808 new variables.
7809 (expand_start_java_handler): add debugging info.
7810 (expand_end_java_handler): ditto.
7811
7812 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7813
7814 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
7815 (print_name_for_stub_or_jni, process_file): Constify a char*.
7816
7817 2000-02-03 Tom Tromey <tromey@cygnus.com>
7818
7819 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
7820
7821 2000-01-31 Scott Bambrough <scottb@netwinder.org>
7822
7823 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
7824 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
7825 defined to be 1.
7826
7827 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
7828
7829 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
7830 * java-tree.h (TYPE_II_STMT_LIST): New macro.
7831 (struct lang_type): New field `ii_block'.
7832 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
7833 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
7834 * parse.h (struct parser_ctxt): New field `instance_initializers'.
7835 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
7836 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
7837 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
7838 macros.
7839 * parse.y (add_instance_initializer): New function.
7840 (in_instance_initializer): New static global.
7841 (class_body_declaration:): Link instance initializer block.
7842 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
7843 (array_creation_expression:): Remove unused local.
7844 (java_parser_context_push_initialized_field): Fixed leading
7845 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
7846 CPC_INSTANCE_INITIALIZER_LIST.
7847 (java_parser_context_pop_initialized_field): Likewise.
7848 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
7849 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
7850 CPC_INITIALIZER_STMT.
7851 (fix_constructors): New local `class_type'. Use it. Call
7852 add_instance_initializer.
7853 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
7854 (patch_return): Forbid return in instance initializers.
7855 (patch_throw_statement): Enforce exception handling in the context
7856 of instance initializers.
7857
7858 2000-02-03 Tom Tromey <tromey@cygnus.com>
7859
7860 * Make-lang.in (java.mostlyclean): Remove executables in
7861 `mostlyclean'.
7862
7863 2000-01-31 Scott Bambrough <scottb@netwinder.org>
7864
7865 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
7866 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
7867 (java_float_finite): Convert to use union Word from javaop.h.
7868 (java_double_finite): Convert to use union DWord from javaop.h.
7869
7870 2000-02-02 Tom Tromey <tromey@cygnus.com>
7871
7872 * gjavah.c (options): Added `jni' entry.
7873 (help): Document -jni.
7874 (flag_jni): New global.
7875 (process_file): Handle JNI output. Don't print text from
7876 -prepend, -add, etc, when generating stubs. Only remove `.class'
7877 suffix if it actually exists.
7878 (main): Create a `.c' file when run with `--jni --stubs'. Create
7879 correct output file name with `--jni'.
7880 (print_include): Mangle header name differently in JNI case.
7881 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
7882 method list.
7883 (print_method_info): Handle JNI case. Put signature info into
7884 method name. Handle case when STREAM is NULL.
7885 (print_name_for_stub_or_jni): New function.
7886 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
7887 (print_cxx_classname): Handle JNI.
7888 (print_full_cxx_name): Likewise.
7889 (decode_signature_piece): Likewise.
7890 (overloaded_jni_method_exists_p): New function.
7891 (struct method_name): Added `signature' and `sig_length' fields.
7892 (HANDLE_END_FIELD): Do nothing in JNI mode.
7893
7894 2000-02-02 Tom Tromey <tromey@cygnus.com>
7895
7896 * jv-scan.c: Include version.c, <getopt.h>.
7897 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
7898 (options): New array.
7899 (usage): New function.
7900 (version): New function.
7901 (main): Use getopt_long to parse command line.
7902 * jcf-dump.c: Include version.c, <getopt.h>.
7903 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
7904 OPT_JAVAP): New macros.
7905 (options): New array.
7906 (usage): Return `void'. Changed message.
7907 (help): New function.
7908 (version): New function.
7909 (main): Use getopt_long_only to parse command line.
7910 * gjavah.c: Include <getopt.h>.
7911 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
7912 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
7913 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
7914 (options): New array.
7915 (java_no_argument): Removed.
7916 (help): Updated with missing options.
7917 (main): Use getopt_long_only to parse command line.
7918 (usage): Changed message.
7919
7920 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7921
7922 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
7923 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
7924 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
7925 * parse.y (array_creation_expression:): Handle anonymous arrays.
7926 (build_array_from_name): Don't set `ret_name' if null.
7927 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
7928 (qualify_ambiguous_name): Likewise.
7929 (java_complete_expand_class): Likewise.
7930
7931 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
7932
7933 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
7934 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
7935 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
7936 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
7937 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
7938 AIPL_FUNCTION_COMPLETED_INVOCATION.
7939 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
7940 AIPL_FUNCTION_INVOCATION_READY.
7941 (AIPL_FUNCTION_DECLARATION): New enum entry.
7942 * parse.y (reorder_static_initialized): New function.
7943 (java_parser_context_pop_initialized_field): Use it.
7944 (add_inner_class_fields): Use
7945 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
7946 augmented. Install marker after last alias initializer, if any.
7947 (generate_finit): Fixed typo. Don't try to retain only the used
7948 fields.
7949 (method_header): Compute and set DECL_FUNCTION_NAP.
7950 (method_declarator): Fixed comment. Insert alias initializer in
7951 parameter list.
7952 (build_alias_initializer_parameter_list): Fixed leading
7953 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
7954 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
7955 (java_complete_expand_class): Code to retain only used aliases
7956 removed.
7957 (java_complete_expand_methods): New local `first_decl'. Generate
7958 $finit$ first, then expand the constructors, regular methods and
7959 <clinit>.
7960 (java_complete_expand_method): Don't report error on missing
7961 return statement if previously detected bogus.
7962 (fix_constructors): Don't patch constructor parameters list.
7963 (patch_method_invocation): Use new AIPL enum values. Reverse
7964 alias initializer list for anonymous classes.
7965
7966 2000-01-30 Anthony Green <green@redhat.com>
7967
7968 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
7969 determine how many stack slots to pop.
7970
7971 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
7972
7973 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
7974 error handling/recovery.
7975 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
7976
7977 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
7978
7979 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
7980 FIELD_LOCAL_ALIAS_USED): New macros.
7981 (DECL_FUNCTION_NAP): New macro.
7982 (struct lang_decl): New field `nap'.
7983 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
7984 (struct lang_type): New fields `finit_stmt_list' and
7985 `clinit_stmt_list'.
7986 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
7987 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
7988 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
7989 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
7990 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
7991 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
7992 (BUILD_THROW): Macro line separator re-indented.
7993 * parse.y (end_class_declaration): New function.
7994 (maybe_generate_pre_expand_clinit): New name for
7995 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
7996 pre-expand static fields.
7997 (maybe_generate_clinit): Function deleted.
7998 (check_for_static_method_reference): Prototype's parameter list
7999 indented.
8000 (generate_finit): New name for maybe_generate_finit. Changed
8001 leading comment. Function rewritten to use
8002 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
8003 (build_alias_initializer_parameter_list): New function.
8004 (java_parser_context_pop_initialized_field): Likewise.
8005 (add_inner_class_fields): Likewise.
8006 (type_declaration:): Call end_class_declaration.
8007 (class_member_declaration:): Likewise.
8008 (formal_parameter_list:): Fixed typos.
8009 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
8010 element. Improved error handling.
8011 (block_statement:): Call end_class_declaration.
8012 (anonymous_class_creation:): Likewise.
8013 (create_anonymous_class): Fixed comments.
8014 (create_class): Call add_inner_class_fields.
8015 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
8016 (method_header): Use MARK_FINAL_PARMS.
8017 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
8018 (method_declarator): Propagate final argument flag.
8019 (craft_constructor): New local `artificial'. Call
8020 build_alias_initializer_parameter_list. Use
8021 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
8022 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
8023 necessary.
8024 (complete_expand_class): Get rid of unused outer context local
8025 alias fields.
8026 (java_complete_expand_methods): Fixed leading
8027 comment. Generate/pre-expand <clinit> first. Changed method
8028 expansion order to regular, $finit$, constructors, <clinit>.
8029 (java_complete_expand_method): Set current_function_decl.
8030 (fix_constructors): Fix constructor parameter list to account for
8031 outer context local alias initializers.
8032 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8033 (resolve_expression_name): Lookup outer context local aliases. New
8034 local `access', use it.
8035 (patch_method_invocation): Patch inner class ctor invocation with
8036 outer context local aliases initialization values. $finit$
8037 invocation patching now includes things generated with
8038 build_alias_initializer_parameter_list.
8039 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
8040 (build_super_invocation): Likewise.
8041 (patch_assignment): Changed comment.
8042
8043 2000-01-27 Andrew Haley <aph@cygnus.com>
8044
8045 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
8046 (emit_if): Ditto.
8047 (emit_jsr): Ditto.
8048
8049 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8050
8051 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
8052 concatenation.
8053 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
8054
8055 * parse.y (register_fields): Don't pass a format specifier to
8056 OBSOLETE_MODIFIER_WARNING.
8057 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
8058 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
8059 specifier.
8060 (check_modifiers): Change function into a macro.
8061 (check_class_interface_creation): Pass a literal format string.
8062
8063 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8064
8065 * buffer.h: PROTO -> PARAMS.
8066 * check-init.c: Likewise.
8067 * class.c: Likewise.
8068 * constants.c: Likewise.
8069 * convert.h: Likewise.
8070 * decl.c: Likewise.
8071 * except.c: Likewise.
8072 * expr.c: Likewise.
8073 * gjavah.c: Likewise.
8074 * java-except.h: Likewise.
8075 * java-tree.h: Likewise.
8076 * jcf-depend.c: Likewise.
8077 * jcf-dump.c: Likewise.
8078 * jcf-parse.c: Likewise.
8079 * jcf-path.c: Likewise.
8080 * jcf-reader.c: Likewise.
8081 * jcf-write.c: Likewise.
8082 * jcf.h: Likewise.
8083 * jv-scan.c: Likewise.
8084 * jvgenmain.c: Likewise.
8085 * jvspec.c: Likewise.
8086 * lang.c: Likewise.
8087 * lex.c: Likewise.
8088 * lex.h: Likewise.
8089 * parse-scan.y: Likewise.
8090 * parse.h: Likewise.
8091 * parse.y: Likewise.
8092 * typeck.c: Likewise.
8093 * verify.c: Likewise.
8094 * xref.c: Likewise.
8095 * xref.h: Likewise.
8096 * zextract.c: Likewise.
8097 * zipfile.h: Likewise.
8098
8099 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
8100
8101 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8102 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
8103 * constants.c (build_constant_data_ref): Check for cached
8104 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
8105 in TYPE_CPOOL_DATE_REF.
8106 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
8107 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
8108 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
8109 (LOCAL_FINAL): New macro.
8110 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
8111 constant pool -- don't try to reuse.
8112 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
8113 TYPE_LANG_SPECIFIC.
8114 (find_in_current_zip): Use TYPE_JCF.
8115 * parse.h (java_check_final): Prototype removed.
8116 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
8117 (maybe_create_class_interface_decl,
8118 check_class_interface_creation): Likewise.
8119 (java_expand_finals): Function removed.
8120 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
8121 (block_statement:): Fixed comment.
8122 (anonymous_class_creation:): Likewise.
8123 (check_class_interface_creation): Reversed Jan 12, 2000 extra
8124 argument patch.
8125 (check_class_interface_creation): Loosened error report on (inner)
8126 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
8127 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
8128 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
8129 argument patch.
8130 (create_interface): Likewise.
8131 (anonymous_class_counter): New static global.
8132 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
8133 patch. Fixed comments.
8134 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
8135 anonymous_class_counter when declaring a toplevel class.
8136 (craft_constructor): Fixed constructor name when handling
8137 anonymous classes. Anonymous class constructors to feature hidden
8138 this$<n> parameter.
8139 (java_fix_constructors): Added comment.
8140 (java_check_final): Function removed.
8141 (java_complete_expand_methods): Fixed comment. Don't generate
8142 class data, save its outgoing constant pool instead.
8143 (verify_constructor_super): Skip anonymous class constructor
8144 hidden this$<n> parameter.
8145 (java_expand_classes): New local `saved_ctxp'. Removed call to
8146 java_expand_finals and java_check_final. Expand anonymous class
8147 constructors. Generate class data.
8148 (build_super_invocation): Skip anonymous class hidden this$<n>
8149 parameter.
8150 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
8151 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
8152 (set_java_signature): Likewise.
8153
8154 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
8155
8156 * gjavah.c: Delete ACC_VISIBILITY define.
8157 * jcf.h: Add ACC_VISIBILITY define.
8158 * parse.y: final: rule tagged <value>.
8159 (java_check_regular_methods): Use ACC_VISIBILITY define for
8160 default package access check.
8161 (local_variable_declaration_statement): Use final: rule.
8162
8163 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
8164
8165 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
8166 (final:): New rule.
8167
8168 2000-01-17 Tom Tromey <tromey@cygnus.com>
8169
8170 * gjavah.c (print_field_info): Allow non-static final fields.
8171
8172 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8173
8174 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
8175 * parse.y (patch_anonymous_class): New function.
8176 (create_anonymous_class): Register incomplete type when the
8177 class/interface to extends/implement isn't known yet.
8178 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
8179 (verify_constructor_super): Tuned error message.
8180
8181 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8182
8183 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
8184 (ANONYMOUS_CLASS_P): New macro.
8185 (TYPE_SIGNATURE, TYPE_JCF): New macros.
8186 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
8187 * parse.y (create_class): Added leading argument.
8188 (maybe_create_class_interface_decl,
8189 check_class_interface_creation): Likewise.
8190 (craft_constructor): New function.
8191 (verify_constructor_super): Added argument in prototype.
8192 (class_declaration:): Inserted leading argument.
8193 (for_begin:): Use FOR_LOOP_P.
8194 (anonymous_class_creation): Create WFL of the anonymous class to
8195 instantiate. Call build_new_invocation. Added comments.
8196 (check_class_interface_creation): Handle parameter `anonymous' in
8197 verbose mode class creation announce.
8198 (link_nested_class_to_enclosing): Exclude anonymous classes.
8199 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
8200 anonymous class, even though they appear to have an enclosing
8201 context.
8202 (create_interface): Pass extra argument to
8203 check_class_interface_creation.
8204 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
8205 (create_class): Call check_class_interface_creation and
8206 maybe_create_class_interface_decl with extra new argument. Don't
8207 add private this$<n> to anonymous classes.
8208 (method_declarator): Insert hidden this$<n> to anonymous class
8209 constructors.
8210 (java_fix_constructors): Deleted code creating default
8211 constructor. Call craft_constructor instead.
8212 (java_check_regular_methods): Set `saw_constructor' to 1 for
8213 anonymous classes.
8214 (fix_constructors): Pass extra argument to verify_constructor_super.
8215 (verify_constructor_super): New local `sdecl', use it. Search for
8216 matching constructor (possibly featuring arguments) in super
8217 class.
8218 (lookup_method_invoke): Craft constructor according to arguments
8219 list when dealing with anonymous class constructors.
8220 (build_super_invocation): Pass arguments to anonymous class super
8221 constructors.
8222 (search_loop): Use FOR_LOOP_P.
8223 (labeled_block_contains_loop_p): Likewise.
8224
8225 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
8226
8227 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
8228 (enclosing_context_p): New function.
8229 (get_access_flags_from_decl): Handle CLASS_STATIC.
8230 (maybe_layout_super_class): Extra first argument passed to
8231 do_resolve_class.
8232 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
8233 ID_INIT_P.
8234 * decl.c (access0_identifier_node): New global.
8235 (init_decl_processing): access0_identifier_node initialized.
8236 (pushdecl): Set DECL_CONTEXT only on non type decls.
8237 * expr.c (lookup_field): Lookup inner class fields in enclosing
8238 contexts.
8239 (expand_invoke): Use ID_INIT_P.
8240 (expand_java_field_op): Use DECL_CLINIT_P.
8241 * java-tree.def (CLASS_LITERAL): New tree code.
8242 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
8243 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
8244 (struct lang_decl): New field `inner_access'.
8245 (enclosing_context_p): Prototyped.
8246 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
8247 ID_CLINIT_P): New macros.
8248 (CLASS_STATIC): New macro.
8249 (CLASS_ACCESS0_GENERATED_P): New macro.
8250 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
8251 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
8252 INNER_CLASS_P): New macros.
8253 (DECL_INNER_CLASS_LIST): New macro.
8254 * jcf-parse.c (yyparse): Avoid the use of ANSI string
8255 concatenation.
8256 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
8257 the shift value to int. Fixed typo in comment.
8258 * lex.c (inst_id, wpv_id): Initialize.
8259 * mangle.c (unicode_mangling_length): Take `$' into account.
8260 * parse.h (DRECOVER, RECOVER): Terminate properly.
8261 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
8262 (typedef struct _jdep): New field `enclosing'.
8263 (JDEP_ENCLOSING): New macro.
8264 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
8265 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
8266 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
8267 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
8268 GET_ENCLOSING_CPC_CONTEXT): New macros.
8269 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
8270 (do_resolve_class): Added extra argument in prototype.
8271 * parse.y (resolve_class): Added extra argument in prototype.
8272 (maybe_create_class_interface_decl): Likewise.
8273 (maybe_use_access_method, build_wfl_wrap): New functions.
8274 (java_complete_expand_classes, java_complete_expand_class):
8275 Likewise.
8276 (java_parser_context_push_initialized_field,
8277 java_parser_context_suspend, java_parser_context_resume):
8278 Likewise.
8279 (maybe_make_nested_class_name, make_nested_class_name,
8280 set_nested_class_simple_name_value,
8281 link_nested_class_to_enclosing, find_as_inner_class,
8282 find_as_inner_class_do, check_inner_class_redefinition,
8283 build_thisn_assign, build_current_thisn, build_access_to_thisn,
8284 maybe_build_thisn_access_method, build_outer_field_access,
8285 build_outer_field_access_methods, build_outer_field_access_expr,
8286 build_outer_method_access_method, build_new_access_id,
8287 build_outer_field_access_method, outer_field_access_p,
8288 outer_field_expanded_access_p, outer_field_access_fix,
8289 build_incomplete_class_ref, patch_incomplete_class_ref,
8290 create_anonymous_class): Likewise.
8291 (inst_id, wpv_id): New static global variables.
8292 (synchronized:): New rule, tagged <node>.
8293 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
8294 rules.
8295 (anonymous_class_creation:): New rule, tagged <node>.
8296 (NEW_TK): Tagged <node>.
8297 (type_literals, array_type_literal): New rules, tagged <node>.
8298 (class_declaration:): Removed action when reducing by class_body:
8299 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
8300 using GET_CPC in sub-rules.
8301 (class_member_declaration): Handle inner classes.
8302 (method_declaration): When reducing method_header:, reset
8303 current_function_decl when appropriate.
8304 (method_declarator:): Set the number of formal parameter to 0 for
8305 method declared without arguments.
8306 (constructor_declarator:): Likewise.
8307 (static_initializer:): List of elements kept in a list.
8308 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
8309 use of the keyword `static' for type declarations.
8310 (block_statement:): Handle inner class declarations.
8311 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
8312 type qualified `this'.
8313 (class_instance_creation_expression): Use anonymous_class_creation:
8314 to handle inner class instances creation. Handle qualified `new'.
8315 (something_dot_new): Added appropriate actions.
8316 (create_new_parser_context): New function.
8317 (java_push_parser_context, java_parser_context_save_global,
8318 java_parser_context_suspend): Use create_new_parser_context.
8319 (check_modifiers): Changed leading comment.
8320 (check_class_interface_creation): Handle interclasses.
8321 (add_superinterfaces): Fixed comment.
8322 (create_interface): Build qualified name from the raw_name instead
8323 of its matching WFL. Push the initialized fields list. raw_name added
8324 as an extra argument to maybe_create_class_interface_decl.
8325 (create_class): Build qualified name from the raw_name instead of
8326 its matching WFL. Removed assignment to current_parsed_class_un.
8327 Call PUSH_ERROR before returning an error. Suspend the current
8328 parser context when processing an inner class. Push the
8329 initialized fields list. raw_name added as an extra argument to
8330 maybe_create_class_interface_decl. Add the private this$<n>
8331 field.
8332 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
8333 (register_fields): Get the class type from GET_CPC and handle
8334 previous errors. Added code to handle the creation of static
8335 fields in inner classes. Initialized fields initialization
8336 statements kept in a list of lists.
8337 (maybe_generate_finit): Initialized fields initialization
8338 statements kept in a list of lists. Use GET_CPC.
8339 (maybe_generate_clinit): Likewise.
8340 (method_header): Use GET_CPC and GET_CPC_UN.
8341 (parser_qualified_classname): Handle inner classes.
8342 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
8343 (java_fix_constructors): Hide pointer to enclosing context
8344 instance in constructor list when dealing with inner classes.
8345 (jdep_resolve_class): Call resolve_class with extra first argument
8346 JDEP_ENCLOSING.
8347 (resolve_class): Add enclosing context as a first extra argument
8348 to do_resolve_class.
8349 (do_resolve_class): Call find_as_inner_class. Handle WFLs
8350 properly.
8351 (resolve_no_layout): Extra argument added to resolve_class
8352 invocation.
8353 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
8354 (java_get_real_method_name): Use GET_CPC_UN.
8355 (check_abstract_method_definitions): Use DECL_CLINIT_P.
8356 (java_check_abstract_methods): Handle static method declared in
8357 inner classes by an error.
8358 (java_check_regular_methods): Use DECL_CLINIT_P.
8359 (source_start_java_method): Also set DECL_MAX_LOCALS.
8360 (create_artificial_method): Call java_parser_context_save_global
8361 and java_parser_context_restore_global instead of saving/restoring
8362 the context by hand.
8363 (expand_start_java_method): Improved verbose mode message.
8364 (java_complete_expand_methods): Fixed leading comment. Use
8365 DECL_CLINIT_P.
8366 (fix_constructors): Added assignment to this$<n> if necessary.
8367 (java_expand_classes): Call java_complete_expand_classes instead
8368 of java_complete_expand_methods.
8369 (make_qualified_primary): Simplified.
8370 (merge_qualified_name): Optimized for missing left or right parts.
8371 (resolve_expression_name): Handle access to outer class fields from
8372 interclasses.
8373 (resolve_qualified_expression_name): New macro
8374 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
8375 classes. Report error on non appropriate qualification of
8376 `new'. Handle qualified `this'.
8377 (not_accessible_p): Allow access to outer class private fields from
8378 inner classes.
8379 (patch_method_invocation): Handle method invocations through
8380 access methods and inner class constructor invocations.
8381 (find_applicable_accessible_methods_list): Search enclosing
8382 contexts of an inner class.
8383 (search_applicable_methods_list): Fixed typo.
8384 (argument_types_convertible): Handle inner class constructors'
8385 hidden outer context reference argument.
8386 (qualify_ambiguous_name): Handle qualified `this'.
8387 (java_complete_lhs): Handle use of field accessed through
8388 artificial access methods in various cases of assignments. Handle
8389 CLASS_LITERAL node.
8390 (check_final_assignment): Use DECL_CLINIT_P.
8391 (valid_ref_assignconv_cast_p): Handle the destination being an
8392 enclosing context of the source.
8393 (patch_unaryop): Handle use of field accessed through artificial
8394 access methods.
8395 (patch_return): Use DECL_CLINIT_P.
8396 (patch_throw_statement): Use DECL_CLINIT_P.
8397 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
8398 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
8399 ID_INIT_P.
8400
8401 2000-01-16 Anthony Green <green@cygnus.com>
8402
8403 * parse.y (build_string_concatenation): Only use
8404 StringBuffer(String) shortcut if String arg is constant.
8405
8406 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
8407
8408 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
8409 the shift value to int. Fixed typo in comment.
8410
8411 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
8412
8413 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
8414 * jcf-write.c: Likewise.
8415 * parse.y: Likewise.
8416 * parse.c: Regenerate.
8417
8418 2000-01-09 Anthony Green <green@cygnus.com>
8419
8420 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
8421 bytecodes in the correct order.
8422
8423 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8424
8425 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
8426
8427 2000-01-06 Anthony Green <green@cygnus.com>
8428
8429 * expr.c (java_lang_expand_expr): Switch to permanent obstack
8430 before building constant array decl.
8431
8432 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
8433
8434 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
8435 method invocation and typo in conditional expression.
8436 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
8437 the appropriate NOTE_POP.
8438 * parse.y (patch_binop): Shift value mask to feature the right
8439 type.
8440
8441 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8442
8443 * class.c (assume_compiled, assume_compiled_node): Add static
8444 prototype.
8445 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
8446
8447 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
8448
8449 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
8450
8451 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
8452 to `__modifier' to avoid stringifying it.
8453
8454 * parse.y (verify_constructor_circularity): Don't call a variadic
8455 function with a non-literal format string.
8456 (java_check_abstract_methods): Move unreachable code inside
8457 `continue' statement.
8458 (lookup_method_invoke): Call xstrdup, not strdup.
8459
8460 * expr.c (expand_java_field_op): Avoid the use of ANSI string
8461 concatenation.
8462
8463 * jcf-parse.c (yyparse): Likewise.
8464
8465 * jv-scan.c (main): Likewise.
8466
8467 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8468
8469 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
8470 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
8471 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
8472 concatenation.
8473
8474 * parse.y (synchronized, variable_redefinition_error,
8475 check_class_interface_creation, create_interface, create_class,
8476 method_header, finish_method_declaration,
8477 check_modifiers_consistency, method_declarator,
8478 complete_class_report_errors, check_abstract_method_definitions,
8479 java_check_regular_methods, check_throws_clauses,
8480 java_check_abstract_methods, read_import_dir,
8481 check_pkg_class_access, declare_local_variables, fix_constructors,
8482 cut_identifier_in_qualified, resolve_expression_name,
8483 resolve_qualified_expression_name, patch_method_invocation,
8484 java_complete_lhs, patch_assignment, try_builtin_assignconv,
8485 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
8486 patch_exit_expr, patch_exit_expr, patch_switch_statement,
8487 patch_try_statement, patch_synchronized_statement,
8488 patch_throw_statement, check_thrown_exceptions,
8489 patch_conditional_expr): Likewise.
8490
8491 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8492
8493 * Makefile.in (LIBDEPS): Added gcc's errors.o
8494 (../jcf-dump$(exeext):): Link with gcc's errors.o
8495 (../gcjh$(exeext):): Likewise.
8496 * expr.c (expand_java_NEW): Layout the entire target type instead of
8497 laying out its methods only.
8498 (lookup_field): Layout the class after having loaded it.
8499 * java-tree.h (java_debug_context): Declared.
8500 * jcf-io.c (toplev.h): Included.
8501 (find_class): Removed assignment to jcf's outofsynch
8502 field. Force source file to be read if newer than its matching
8503 class file. Tweaked debug messages.
8504 * jcf-parse.c (jcf_out_of_synch): Deleted.
8505 (read_class): Call to jcf_out_of_synch removed.
8506 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
8507 (jcf_out_of_synch): Prototype deleted.
8508 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
8509 `deprecated' and `class_err': integer turned into bit-fields.
8510 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
8511 * parse.y (package_list): New global.
8512 (package_declaration:): Record newly parsed package name.
8513 (extra_ctxp_pushed_p): Static global deleted.
8514 (java_parser_context_save_global): Create buffer context for the
8515 purpose of saving globals, if necessary.
8516 (java_parser_context_restore_global): Pop context pushed for the
8517 purpose of saving globals, if necessary.
8518 (java_debug_context_do): New prototype and function.
8519 (java_debug_context): Likewise.
8520 (do_resolve_class): Use already parsed package names to qualify
8521 and lookup class candidate.
8522 (java_pre_expand_clinit): Removed unnecessary local variable.
8523
8524 1999-12-17 Tom Tromey <tromey@cygnus.com>
8525
8526 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
8527 fixes PR gcj/119.
8528 (process_file): Use `\n\' at end of each line in string.
8529
8530 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
8531
8532 * expr.c (expand_invoke): Layout the loaded class before
8533 attempting to use it.
8534 (expand_java_field_op): Allow final field assignments to take
8535 place in $finit$.
8536 * typeck.c (convert): Return error_mark_node if expr is null.
8537
8538 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8539
8540 * class.c (class_depth): Return -1 if the class doesn't load
8541 properly.
8542 * expr.c (can_widen_reference_to): Check for errors during depth
8543 computation and return 0 accordingly.
8544 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
8545 create default constructors and add an other error check.
8546 * parse.h (java_fix_constructors): Prototyped.
8547 * parse.y (java_pre_expand_clinit): Likewise.
8548 (build_super_invocation): Re-prototyped to feature one argument.
8549 (java_check_circular_reference): Directly use `current'.
8550 (java_fix_constructors): New function.
8551 (java_check_regular_methods): Don't create default constructors
8552 here, but abort if none were found.
8553 (java_complete_expand_methods): Pre-process <clinit> calling
8554 java_pre_expand_clinit.
8555 (java_pre_expand_clinit): New function.
8556 (fix_constructors): build_super_invocation invoked with the
8557 current method declaration as an argument.
8558 (build_super_invocation): Use the context of the processed method
8559 decl argument instead of current_class.
8560 * typeck.c (lookup_java_method): Take WFLs in method names into
8561 account.
8562
8563 1999-12-14 Per Bothner <per@bothner.com>
8564
8565 * class.c (make_class_data): flag_keep_inline_functions to keep
8566 private methods in the method array.
8567
8568 1999-12-15 Anthony Green <green@cygnus.com>
8569
8570 * check-init.c (check_init): Take into account both types of
8571 `throw's when checking for uninitialized variables.
8572
8573 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8574
8575 * parse.y (java_complete_lhs): Force conversion of array
8576 dimensions to int_type_node, that's what runtime's ABI expects.
8577
8578 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8579
8580 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
8581 operand of a WFL, until the Java front-end gets fixed with regard
8582 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
8583
8584 1999-12-10 Andrew Haley <aph@cygnus.com>
8585
8586 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
8587 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
8588 expr.c (build_java_athrow): Add support for sjlj-exceptions.
8589 java-tree.h: Ditto.
8590 jcf-write.c: Ditto.
8591
8592 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
8593
8594 * expr.c (java_lang_expand_expr): Switch to permanent obstack
8595 before calling expand_eh_region_start and expand_start_all_catch.
8596 * except.c (expand_start_java_handler): Switch to permanent
8597 obstack before calling expand_eh_region_start.
8598 (expand_end_java_handler): Switch to permanent obstack before
8599 calling expand_start_all_catch.
8600
8601 1999-12-5 Anthony Green <green@cygnus.com>
8602
8603 * decl.c (init_decl_processing): Mark throw_node as a noreturn
8604 function with side effects.
8605 (init_decl_processing): Mark all memory allocating DECLs with
8606 DECL_IS_MALLOC.
8607
8608 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8609
8610 * except.c (expand_end_java_handler): Call
8611 expand_resume_after_catch and end_catch_handler.
8612
8613 1999-11-30 Anthony Green <green@cygnus.com>
8614
8615 * verify.c (verify_jvm_instructions): Create new return label
8616 chain if non existent (don't rely on the verified state of the jsr
8617 target.)
8618
8619 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
8620
8621 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
8622 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
8623
8624 * parse.y (patch_assignment): Removed bogus final class test on
8625 lhs when checking on whether to emit an ArrayStoreException runtime
8626 check.
8627 * expr.c (expand_java_arraystore): Likewise.
8628
8629 1999-11-28 Anthony Green <green@cygnus.com>
8630
8631 * decl.c (find_local_variable): Reuse single slot decls when
8632 appropriate.
8633
8634 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
8635
8636 * jcf-parse.c (saw_java_source): Global variable removed.
8637 (read_class): Don't use `saw_java_source'. Added extra braces.
8638 (yyparse): Code setting `saw_java_source' removed.
8639
8640 1999-11-24 Mark Mitchell <mark@codesourcery.com>
8641
8642 * except.c (emit_handlers): Zero catch_clauses after emitting them.
8643
8644 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
8645
8646 * verify.c (merge_type_state): Non verified subroutines being
8647 considered more than once to trigger passive type merge.
8648
8649 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
8650
8651 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
8652 in case of error. Error message tuned.
8653
8654 1999-11-21 Anthony Green <green@cygnus.com>
8655
8656 * constants.c (find_methodref_index): Unwrap method names before
8657 inserting them in the constant pool.
8658
8659 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
8660
8661 * class.c (assume_compiled_node): New typedef.
8662 (assume_compiled_tree): New static data.
8663 (find_assume_compiled_node): New function.
8664 (add_assume_compiled): New function.
8665 (assume_compiled): New function.
8666 * class.c (make_class_data): Use assume_compiled.
8667 (is_compiled_class): Use assume_compiled.
8668
8669 * java-tree.h (add_assume_compiled): Declare.
8670
8671 * lang.c (lang_decode_option): Parse new options.
8672
8673 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
8674
8675 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
8676 int_type_node: that's what `_Jv_AllocObject' expects.
8677
8678 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8679
8680 * parse.y (lookup_method_invoke): Use lang_printable_name to
8681 reliably build the type name during error report. Fixes PR gcj/97.
8682
8683 1999-11-09 Tom Tromey <tromey@cygnus.com>
8684
8685 * jcf-path.c: Include <sys/stat.h>.
8686 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
8687 (DIR_UP): New macro.
8688
8689 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8690
8691 * parse.y (source_end_java_method): Resume permanent allocation,
8692 reversing Apr 27 1998 patch.
8693 (patch_string_cst): Pop obstacks after having pushed the permanent
8694 ones.
8695
8696 1999-11-05 Tom Tromey <tromey@cygnus.com>
8697
8698 * class.c (finish_class): Emit inlined methods if any native
8699 methods exist in the class. Fixes PR gcj/85.
8700
8701 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
8702
8703 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
8704 (qualify_ambiguous_name): Likewise.
8705
8706 1999-11-03 Godmar Back <gback@cs.utah.edu>
8707
8708 * typeck.c: (lookup_java_method): search all inherited
8709 interfaces when looking up interface method.
8710
8711 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8712
8713 * parse.y (method_header:): Issue error message for rule `type
8714 error'.
8715 (synchronized:): Error report when not using synchronized.
8716
8717 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
8718
8719 * parse.y (resolve_qualified_expression_name): Prevent `this' from
8720 being used before the superclass constructor has been called.
8721 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
8722 instead of `CALL_THIS_CONSTRUCTOR_P'.
8723
8724 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
8725
8726 * check-init.c: Fix typo in comment.
8727
8728 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8729
8730 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
8731 and final method.
8732
8733 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8734
8735 * parse.y (expression_statement:): Call function to report
8736 improper invocation of a constructor.
8737 (parse_ctor_invocation_error): New function.
8738
8739 1999-10-26 Mark Mitchell <mark@codesourcery.com>
8740
8741 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
8742 remember_end_note.
8743
8744 1999-10-21 Tom Tromey <tromey@cygnus.com>
8745
8746 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
8747 in generated `main'.
8748
8749 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
8750
8751 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
8752 (qualify_ambiguous_name): Likewise.
8753
8754 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
8755
8756 * parse.y (java_complete_tree): fold_constant_for_init to work on
8757 permanent_obstack.
8758 (java_complete_lhs): Likewise.
8759 (array_constructor_check_entry): Complete an initializer element
8760 on permanent_obstack.
8761
8762 1999-10-19 Tom Tromey <tromey@cygnus.com>
8763
8764 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
8765 From Mike Moreton <mike@pillim.demon.co.uk>.
8766
8767 1999-10-15 Greg McGary <gkm@gnu.org>
8768
8769 * java-tree.h (flag_bounds_check): Remove extern decl.
8770 * lang.c (flag_bounds_check): Remove global variable.
8771 (lang_f_options): Remove "bounds-check" entry.
8772 (lang_init_options): Default flag_bounds_check to "on".
8773
8774 1999-10-14 Tom Tromey <tromey@cygnus.com>
8775
8776 * jvgenmain.c (usage): New function.
8777 (main): Use it. Also, handle `-D' options.
8778 * jvspec.c (lang_specific_driver): Recognize -D.
8779 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
8780
8781 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
8782
8783 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8784
8785 * jcf-dump.c (print_constant, disassemble_method): Don't call a
8786 variadic function with a non-literal format string.
8787
8788 * parse-scan.y (report_main_declaration): Likewise.
8789
8790 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
8791
8792 * parse.y (read_import_dir, patch_assignment, patch_binop,
8793 patch_array_ref): Likewise.
8794
8795 * typeck.c (build_java_array_type): Likewise.
8796
8797 * verify.c (verify_jvm_instructions): Likewise.
8798
8799 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
8800
8801 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
8802
8803 1999-10-07 Anthony Green <green@cygnus.com>
8804
8805 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
8806 where CHECK_PUT may fail for valid reasons.
8807
8808 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
8809 UNSAFE_PUTN): New macros.
8810
8811 1999-10-04 Tom Tromey <tromey@cygnus.com>
8812
8813 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
8814 well. Fixes Java PR gcj/59.
8815 * parse-scan.y (yyerror): Report errors.
8816
8817 1999-09-24 Glenn Chambers <GChambers@provsol.com>
8818
8819 * decl.c (insert_block): Remove unconditional `abort'.
8820
8821 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
8822
8823 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
8824 FUNCTION_CODE now of type int. All callers changed.
8825 Set the builtin's DECL_BUILT_IN_CLASS.
8826
8827 1999-09-23 Tom Tromey <tromey@cygnus.com>
8828
8829 * jvspec.c (lang_specific_driver): Don't read spec file if
8830 -fsyntax-only given.
8831
8832 1999-09-22 Tom Tromey <tromey@cygnus.com>
8833
8834 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
8835
8836 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
8837 (WORDS_TO_LONG): Likewise.
8838 (WORDS_TO_DOUBLE): Likewise.
8839
8840 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8841
8842 * jcf-write.c (RELOCATION_VALUE_0): New macro.
8843 (RELOCATION_VALUE_1): Likewise.
8844 (emit_iinc, emit_reloc, push_constant1, push_constant2,
8845 push_in_const, push_long_const): Prototyped.
8846 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
8847 (push_constant2): Likewise.
8848 (push_int_const): Cast find_constant1's integer arguments to `jword'.
8849 (find_constant_wide): Cast find_constant2's integer arguments to
8850 `jword'.
8851 (find_constant_index): Cast find_constant2's and find_constant2's
8852 integer arguments to `jword'.
8853 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
8854 (emit_switch_reloc): Use RELOCATION_VALUE_0.
8855 (emit_if): Use RELOCATION_VALUE_1.
8856 (emit_goto): Likewise.
8857 (emit_jsr): Likewise.
8858 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
8859 argument to push_long_const to HOST_WIDE_INT.
8860
8861 1999-09-15 Andreas Schwab <schwab@suse.de>
8862
8863 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
8864
8865 1999-09-20 Nick Clifton <nickc@cygnus.com>
8866
8867 * lang.c (lang_decode_option): Extend comment.
8868
8869 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
8870
8871 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
8872 instead of fndecl.
8873
8874 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8875
8876 * gjavah.c (get_field_name, print_method_info, print_include,
8877 add_namelet): Use xmalloc, not malloc.
8878
8879 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
8880 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
8881 NULL pointer.
8882
8883 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
8884
8885 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
8886
8887 * jcf-path.c (add_entry): Likewise.
8888
8889 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
8890
8891 * jv-scan.c (xmalloc): Remove definition.
8892
8893 * jvgenmain.c (xmalloc): Likewise.
8894
8895 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
8896
8897 * lex.c (java_store_unicode): Use xrealloc, not realloc.
8898
8899 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
8900 concat, not xmalloc/sprintf.
8901 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
8902 (xstrdup): Remove definition.
8903
8904 * parse.y (duplicate_declaration_error_p,
8905 constructor_circularity_msg, verify_constructor_circularity,
8906 check_abstract_method_definitions, java_check_regular_methods,
8907 java_check_abstract_methods, patch_method_invocation,
8908 check_for_static_method_reference, patch_assignment, patch_binop,
8909 patch_cast, array_constructor_check_entry, patch_return,
8910 patch_conditional_expr): Use xstrdup, not strdup.
8911
8912 * zextract.c (ALLOC): Use xmalloc, not malloc.
8913
8914 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8915
8916 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
8917
8918 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
8919 (do_spec, lang_specific_pre_link, lang_specific_driver,
8920 input_filename, input_filename_length): Don't declare.
8921 (main_class_name, jvgenmain_spec, lang_specific_driver):
8922 Constify a char*.
8923 (lang_specific_driver): All calls to the function pointer
8924 parameter now explicitly call `fatal'.
8925
8926 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8927
8928 * parse.y (find_applicable_accessible_methods_list): Search
8929 abstract classes as interfaces.
8930
8931 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8932
8933 * class.c (finish_class): We're now outside a valid method
8934 declaration. Tell the rest of gcc so.
8935
8936 1999-09-08 Bruce Korb autogen@linuxbox.com
8937
8938 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
8939
8940 1999-09-07 Tom Tromey <tromey@cygnus.com>
8941
8942 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
8943 java-array.h.
8944 (decode_signature_piece): Don't emit "::" in JArray<>.
8945 (print_namelet): Only print trailing `;' when printing a class.
8946
8947 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
8948
8949 * java-tree.h: Delete declarations for all tree nodes now moved to
8950 global_trees.
8951 * decl.c: Delete their definitions.
8952
8953 1999-09-04 Mark Mitchell <mark@codesourcery.com>
8954
8955 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
8956 * Makefile.in (OBJS): Add ggc-callbacks.o.
8957 (OBJDEPS): Likewise.
8958
8959 1999-09-03 Tom Tromey <tromey@cygnus.com>
8960
8961 * parse.y (strip_out_static_field_access_decl): Return operand if
8962 it satisfies JDECL_P.
8963
8964 1999-09-02 Tom Tromey <tromey@cygnus.com>
8965
8966 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
8967 Handle nested arrays, like `[[I'.
8968
8969 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8970
8971 * class.c (finish_class): Remove unused parameter, all callers
8972 changed.
8973
8974 * expr.c (build_java_athrow): Change return type to void.
8975 (java_lang_expand_expr): Make sure each case in switch returns a
8976 value.
8977
8978 * java-tree.h (finish_class): Fix prototype to take void args.
8979
8980 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
8981 (main): Issue return from main, not exit.
8982
8983 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
8984
8985 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
8986
8987 * jv-scan.c (main): Issue return from main, not exit.
8988
8989 * parse.y (check_abstract_method_definitions,
8990 java_check_abstract_method_definitions): Add static prototypes.
8991 (java_complete_expand_methods): Fix call to `finish_class'.
8992
8993 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
8994 and `prevpc'.
8995
8996 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8997
8998 * lang.c (language_string): Constify.
8999
9000 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9001
9002 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
9003 Remove hacks for stuff which comes from libiberty.
9004
9005 * Make-lang.in: Likewise.
9006
9007 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
9008
9009 * Makefile.in (xref.o): Depend on xref.c explicitly.
9010
9011 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9012
9013 * java-tree.h (lang_printable_name): Constify a char*.
9014
9015 * lang.c (lang_printable_name): Likewise.
9016
9017 1999-08-27 Jeffrey A Law (law@cygnus.com)
9018
9019 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
9020 comments in C code.
9021
9022 1999-08-26 Tom Tromey <tromey@cygnus.com>
9023
9024 * gjavah.c (print_cxx_classname): Print "::" before qualified
9025 name.
9026
9027 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
9028
9029 * parse.y (lookup_cl): Changed leading comment. Now does its best
9030 to set the column number.
9031 (qualify_ambiguous_name): Take WFL wrappers into account.
9032
9033 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
9034
9035 * verify.c (verify_jvm_instructions): Don't check instruction
9036 validity beyond end of method.
9037
9038 1999-08-25 Tom Tromey <tromey@cygnus.com>
9039
9040 * jvspec.c (lang_specific_driver): Correctly handle --help again.
9041
9042 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9043
9044 * gjavah.c (print_name, print_base_classname, utf8_cmp,
9045 cxx_keyword_subst, generate_access, name_is_method_p,
9046 get_field_name, print_field_name, super_class_name, print_include,
9047 decode_signature_piece, print_class_decls, usage, help,
9048 java_no_argument, version, add_namelet, print_namelet): Add static
9049 prototype.
9050 (print_base_classname, utf8_cmp, cxx_keyword_subst,
9051 name_is_method_p): Constify a char*.
9052 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
9053 Provide a final else clause in an if-else-if.
9054 (print_field_info): Add missing final arg in function call to
9055 `print_field_name'.
9056 (print_method_info, decompile_method, decode_signature_piece,
9057 print_c_decl, print_full_cxx_name, print_stub,
9058 print_mangled_classname, super_class_name, print_include,
9059 add_namelet, add_class_decl, print_class_decls, process_file,
9060 help): Constify a char*.
9061
9062 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
9063 push_int_const, find_constant_wide, find_constant_index,
9064 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
9065 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
9066 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
9067 emit_if, emit_goto, emit_jsr, call_cleanups,
9068 make_class_file_name): Add static prototypes.
9069 (generate_bytecode_return, generate_bytecode_insns): Pass a
9070 NULL_PTR, not a NULL_TREE.
9071
9072 * jv-scan.c: Include "jcf.h".
9073 (main): Declare using DEFUN macro.
9074
9075 * jvspec.c (find_spec_file, lang_specific_pre_link,
9076 lang_specific_driver): Add prototypes.
9077 (find_spec_file): Constify a char*.
9078
9079 * keyword.gperf (hash, java_keyword): Add prototypes.
9080
9081 * lang.c (lang_print_error): Add static prototype.
9082 (lang_init): Prefer memcpy over bcopy to avoid casts.
9083
9084 * lex.c (yylex): Add static prototype.
9085
9086 * parse-scan.y: Include "lex.c" earlier.
9087
9088 * parse.h: Remove redundant declaration for `yylex'.
9089
9090 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
9091 labeled_block_contains_loop_p): Add static prototypes.
9092 (not_accessible_p): Make static to match prototype.
9093
9094 * verify.c (start_pc_cmp): Don't needlessly cast away const.
9095
9096 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9097
9098 * parse.y (check_method_redefinition): Changed leading comment.
9099 (check_abstract_method_definitions): New function.
9100 (java_check_abstract_method_definitions): New function.
9101 (java_check_regular_methods): Call it.
9102 (verify_constructor_super): Fixed indentation.
9103 (lookup_method_invoke): Likewise.
9104
9105 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9106
9107 * parse.y (method_header): Return a null pointer if the current
9108 class node is null.
9109 (finish_method_declaration): Return if the current function decl
9110 is null.
9111 (source_start_java_method): Likewise.
9112 (java_method_add_stmt): Likewise.
9113
9114 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9115
9116 * class.c (emit_register_class): Removed unnecessary call to
9117 start_sequence.
9118 * parse.y (labeled_block_contains_loop_p): Removed unused local
9119 variable.
9120
9121 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9122
9123 * parse.y (java_refold): Added prototype.
9124
9125 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9126
9127 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
9128 (java_stabilize_reference): Removed unnecessary `else'.
9129 (java_complete_lhs): Set flag to remember boolean. Call
9130 java_refold. Added comments.
9131 (java_decl_equiv): New function.
9132 (binop_compound_p): Likewise.
9133 (java_refold): Likewise.
9134 (patch_unaryop): Striped static field access assigned to decl and
9135 op. Changed promotion scheme for ++/-- operators.
9136 (search_loop): New function.
9137 (labeled_block_contains_loop_p): Likewise.
9138 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
9139 comment.
9140 (patch_bc_statement): Call search_loop. Fixed comment.
9141
9142 1999-08-14 Anthony Green <green@cygnus.com>
9143
9144 * expr.c (java_lang_expand_expr): Mark static array data as
9145 referenced.
9146
9147 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9148
9149 * jvgenmain.c (main): NUL-terminate name_obstack.
9150
9151 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9152
9153 * check-init.c (check_bool2_init, done_alternative): Add static
9154 prototypes.
9155
9156 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
9157 (add_method, build_utf8_ref, build_class_ref,
9158 append_gpp_mangled_type, layout_class_method): Constify a char*.
9159
9160 * decl.c (push_promoted_type, make_binding_level): Add static
9161 prototypes.
9162 (push_promoted_type, pushdecl): Constify a char*.
9163
9164 * except.c (find_handler_in_range, link_handler,
9165 check_start_handlers): Add static prototypes.
9166
9167 * expr.c (process_jvm_instruction): Constify a char*.
9168
9169 * gjavah.c (main): Constify a char*.
9170
9171 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
9172 Constify a char*.
9173
9174 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
9175 static prototypes.
9176 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
9177 munge, print_ents): Constify a char*.
9178
9179 * jcf-dump.c (disassemble_method): Constify a char*.
9180 (print_constant_pool, print_exception_table): Add static prototypes.
9181 (print_constant, print_exception_table, main, disassemble_method):
9182 Constify a char*.
9183
9184 * jcf-io.c (find_classfile, find_class): Likewise.
9185
9186 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
9187 (set_source_filename, predefined_filename_p): Add static prototypes.
9188 (set_source_filename, get_constant, get_class_constant,
9189 find_in_current_zip): Constify a char*.
9190
9191 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
9192 static prototypes.
9193 (add_entry, add_path, jcf_path_classpath_arg,
9194 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
9195
9196 * jcf-reader.c (get_attribute, jcf_parse_preamble,
9197 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
9198 jcf_parse_one_method, jcf_parse_methods,
9199 jcf_parse_final_attributes): Add static prototypes.
9200 (get_attribute): Constify a char*.
9201
9202 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
9203 jcf_dependency_add_target, jcf_path_classpath_arg,
9204 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
9205
9206 * jv-scan.c (main): Constify a char*.
9207 (gcc_obstack_init): Add prototype arguments.
9208
9209 * jvgenmain.c (gcc_obstack_init): Likewise.
9210 (main): Constify a char*.
9211
9212 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
9213 static prototypes.
9214 (put_decl_string, lang_print_error): Constify a char*.
9215 (lang_init): Remove redundant extern prototype.
9216
9217 * mangle.c (emit_unicode_mangled_name): Constify a char*.
9218
9219 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
9220 Add static prototypes.
9221 (get_type_from_signature): Constify a char*.
9222
9223 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
9224 Add static prototypes.
9225 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
9226 (verify_jvm_instructions): Constify a char*.
9227
9228 * xref.c (xref_flag_value): Likewise.
9229
9230 * xref.h (xref_flag_value): Likewise.
9231
9232 * zextract.c (makeword, makelong): Add static prototypes.
9233 (makeword, makelong): Constify a uch*.
9234
9235 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9236
9237 * lang.c (java_dummy_print): Constify a char*.
9238 (lang_print_error): Likewise.
9239 (lang_init): Remove redundant prototype for `print_error_function'.
9240 (lang_init_source): Likewise.
9241 (lang_identify): Constify a char*.
9242
9243 1999-08-09 Tom Tromey <tromey@cygnus.com>
9244
9245 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
9246 (WORDS_TO_LONG): Likewise.
9247 (WORDS_TO_DOUBLE): Likewise.
9248
9249 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9250
9251 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
9252
9253 * expr.c (java_stack_pop, java_array_data_offset,
9254 build_java_throw_out_of_bounds_exception, case_identity,
9255 build_java_check_indexed_type): Add static prototypes.
9256 (linenumber_table, expand_invoke, expand_java_field_op,
9257 build_primtype_type_ref, expand_byte_code): Constify a char*.
9258
9259 * java-tree.h (build_primtype_type_ref, linenumber_table):
9260 Constify a char*.
9261 (java_lang_expand_expr): Add prototype.
9262
9263 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
9264 `java_lang_expand_expr'.
9265
9266 * lex.c (java_lex_error): Constify a char*.
9267 (java_get_unicode, java_read_char, java_allocate_new_line,
9268 java_unget_unicode, java_sneak_unicode): Prototype.
9269
9270 * parse-scan.y (current_class, package_name, method_declarator,
9271 report_class_declaration, yyerror): Constify a char*.
9272
9273 * parse.h (java_report_errors): Prototype.
9274 (yyerror): Constify a char*.
9275
9276 * parse.y (classitf_redefinition_error, check_modifiers,
9277 parse_jdk1_1_error, lookup_package_type,
9278 lookup_package_type_and_set_next, get_printable_method_name,
9279 purify_type_name): Constify a char*.
9280 (build_super_invocation, maybe_generate_finit,
9281 verify_constructor_super, parser_add_interface,
9282 add_superinterfaces, jdep_resolve_class, note_possible_classname,
9283 java_complete_expand_methods, java_expand_finals,
9284 cut_identifier_in_qualified, java_stabilize_reference,
9285 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
9286 merge_string_cste): Prototype.
9287 (single_type_import_declaration, yyerror,
9288 variable_redefinition_error, build_array_from_name,
9289 build_unresolved_array_type, check_class_interface_creation,
9290 resolve_class, complete_class_report_errors,
9291 note_possible_classname, read_import_dir,
9292 find_in_imports_on_demand, resolve_package, fix_constructors,
9293 check_deprecation, lookup_method_invoke,
9294 maybe_build_primttype_type_ref, array_constructor_check_entry):
9295 Constify a char*.
9296 (java_complete_expand_methods, java_expand_finals): Make static.
9297 (convert_narrow): Remove static prototype.
9298
9299 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
9300
9301 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
9302
9303 1999-08-02 Richard Henderson <rth@cygnus.com>
9304
9305 * decl.c: Include defaults.h instead of expr.h.
9306 * parse.y: Likewise.
9307
9308 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
9309
9310 * java/decl.c (start_java_method): Change all uses of
9311 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
9312 Ensure expr.h is included.
9313 * java/expr.c (pop_arguments): Ditto.
9314 * java/parse.y (expand_start_java_method): Ditto.
9315
9316 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9317
9318 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
9319
9320 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
9321
9322 * decl.c: Include "function.h".
9323 * except.c: Likewise.
9324 * parse.y: Likewise.
9325 * Makefile.in: Update dependencies.
9326
9327 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9328
9329 * expr.c (build_java_soft_divmod): Provide a default case in switch.
9330 (java_lang_expand_expr): Mark parameters `target', `tmode' and
9331 `modifier' with ATTRIBUTE_UNUSED.
9332
9333 * gjavah.c (process_file): Add braces around ambiguous `else'.
9334
9335 * jcf-dump.c (print_access_flags, localvar_free): Change return
9336 type to void.
9337
9338 * parse.y (java_complete_expand_method): Initialize variable
9339 `exception_copy'.
9340 (resolve_qualified_expression_name): Likewise for `field_decl'.
9341 (patch_method_invocation): Likewise for `class_to_search'.
9342 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
9343 (patch_assignment): Likewise for `lhs_type'.
9344
9345 * verify.c (verify_jvm_instructions): Remove unused variable
9346 `caller'.
9347
9348 1999-07-25 Richard Henderson <rth@cygnus.com>
9349
9350 * decl.c (va_list_type_node): New.
9351
9352 1999-07-25 Anthony Green <green@cygnus.com>
9353
9354 * gjavah.c (print_stub): New function.
9355 (METHOD_IS_NATIVE): New macro.
9356 (print_mangled_classname): Make static.
9357 (HANDLE_END_FIELD): Don't emit fields during stub generation.
9358 (process_file): Perform stub generation.
9359 (HANDLE_METHOD): Don't emit class decls during stub
9360 generation.
9361 (HANDLE_END_METHOD): Take into account stub generation.
9362 (print_method_info): Handle stub generation.
9363 (print_stub): New function.
9364 (print_cxx_classname): Make signature consistant with others.
9365 (help): Describe -stubs option.
9366 (main): Create stub file.
9367 (version): Use version.c.
9368 (print_full_cxx_name): New function.
9369 (print_c_decl): Use print_full_cxx_name.
9370
9371 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9372
9373 * check-init.c (check_init): Handle MAX_EXPR.
9374
9375 1999-07-15 Andrew Haley <aph@cygnus.com>
9376
9377 * lang.c (flag_use_divide_subroutine): New variable.
9378 * typeck.c: (convert_ieee_real_to_integer): Bounds check
9379 fp-to-integer conversion.
9380 (convert): Call convert_ieee_real_to_integer when flag_fast_math
9381 is not set.
9382
9383 * expr.c (build_java_soft_divmod): New function.
9384 (build_java_binop): Call build_java_soft_divmod if
9385 flag_use_divide_subroutine is set.
9386 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
9387 soft_lrem_node: new builtin functions.
9388 (init_decl_processing) Initialize the new builtins.
9389 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
9390 soft_lrem_node: new builtin functions.
9391 (build_java_soft_divmod): New function.
9392 * parse.y: Call build_java_soft_divmod if
9393 flag_use_divide_subroutine is set.
9394 * parse.c: Rebuilt.
9395
9396 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
9397 a --specs= arg) even if not linking.
9398 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
9399 -fuse-divide-subroutine
9400
9401 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
9402
9403 * parse.y (resolve_and_layout): Check methods only once.
9404 (resolve_qualified_expression_name): Verify thrown exceptions
9405 compatibility.
9406 (check_thrown_exceptions): Reject exceptions thrown in
9407 initializer. Error message tuned.
9408
9409 1999-07-14 Andrew Haley <aph@cygnus.com>
9410
9411 * expr.c (expand_expr): Do not return the last statement in a
9412 block as the block's value.
9413
9414 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
9415
9416 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
9417 CALL_EXPR, to avoid order of evaluation changes.
9418
9419 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
9420
9421 * parse.y (qualify_ambiguous_name): Do not use
9422 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
9423
9424 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
9425
9426 * check-init.c (check_init): Handle MAX_EXPR.
9427 * expr.c (force_evaluation_order): Force method call arguments to
9428 be evaluated in left-to-right order.
9429 * parse.y (qualify_ambiguous_name): Loop again to qualify
9430 NEW_ARRAY_EXPR properly.
9431
9432 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
9433
9434 * parse.y (patch_invoke): Resolve unresolved invoked method
9435 returned type.
9436 (qualify_ambiguous_name): STRING_CST to qualify expression for
9437 type name resolution.
9438
9439 1999-06-24 Andrew Haley <aph@cygnus.com>
9440
9441 * class.c (finish_class): Whenever a deferred method is
9442 output, rescan the list of methods to see if a new candidate for
9443 output can be found.
9444
9445 1999-06-28 Tom Tromey <tromey@cygnus.com>
9446
9447 * jvspec.c (lang_specific_driver): Recognize --help.
9448
9449 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9450
9451 * parse.y (resolve_package): Fixed bogus return statement.
9452 (patch_method_invocation): Resolve method invocation beginning with
9453 a package name qualifier.
9454
9455 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9456
9457 * Make-lang.in (java.stage1): Depend on stage1-start.
9458 (java.stage2): Likewise for stage2-start.
9459 (java.stage3): Likewise for stage3-start.
9460 (java.stage4): Likewise for stage4-start.
9461
9462 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9463
9464 * parse.y (java_complete_lhs): When doing cross referencing, don't
9465 try to keep file location on a WFL expanded as a CALL_EXPR.
9466
9467 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
9468
9469 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
9470 compiling to class file a void method with an empty method body.
9471 As a side effect, the bytecode backend will generate the
9472 appropriate `return' instruction.
9473
9474 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9475
9476 * parse.y (lookup_package_type_and_set_next): New function prototype.
9477 (resolve_package): Search current and imported packages.
9478 (lookup_package_type_and_set_next): New function.
9479
9480 1999-06-22 Andrew Haley <aph@cygnus.com>
9481
9482 * verify.c (verify_jvm_instructions): Check for pending blocks
9483 before invalid PC test and opcode switch, not after.
9484
9485 1999-06-21 Andrew Haley <aph@cygnus.com>
9486
9487 * except.c (find_handler_in_range): The upper limit for exception
9488 ranges is exclusive, not inclusive: (start <= pc < end).
9489 (link_handler): find child pointer which points to outer by
9490 searching sibling list: previous code incorrectly assumed that
9491 outer->outer->first_child must point to outer.
9492 * verify.c (verify_jvm_instructions): FIXME added to code for
9493 `athrow'.
9494 (verify_jvm_instructions): Do not assume that the last block
9495 processed in a subroutine is a block which ends with a `ret'
9496 instruction. With some control flows it is possible that the last
9497 block ends with an `athrow'.
9498
9499 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9500
9501 * parse.y (qualify_ambiguous_name): Reorganized the post
9502 evaluation of non WFL leading expression nodes.
9503
9504 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
9505
9506 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
9507 CONVERT_EXPR.
9508
9509 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9510
9511 * parse.y (qualify_ambiguous_name): Handle qualified expression
9512 beginning with a STRING_CST.
9513
9514 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
9515
9516 * parse.y (register_fields): Set DECL_INITIAL on both
9517 pre-initialized static and public fields.
9518 (resolve_field_access): Static field access expressions to always
9519 use pointer types.
9520 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
9521 qualification. CONVERT_EXPR to be resolved as an expression name.
9522 (java_complete_lhs): Identify and access qualified final
9523 initialized field in switch statement case expression.
9524 (fold_constant_for_init): Pre-initialized field decl constant to
9525 be folded.
9526
9527 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9528
9529 * parse.y (note_possible_classname): Mark returned node with
9530 QUALIFIED_P only if the original class name contained a '/'.
9531
9532 1999-06-05 Anthony Green <green@cygnus.com>
9533
9534 * Make-lang.in (gcjh): More parallel build fixes.
9535
9536 1999-06-03 Mike Stump <mrs@wrs.com>
9537
9538 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
9539
9540 1999-06-02 Anthony Green <green@cygnus.com>
9541
9542 * except.c (link_handler): Chain exception handlers in order.
9543
9544 1999-06-02 Anthony Green <green@cygnus.com>
9545
9546 * expr.c (expand_byte_code): Fill unreachable bytecode regions
9547 with nops and process as usual in order to always set correct EH
9548 ranges. Emit detailed warnings about unreachable bytecodes.
9549
9550 1999-06-02 Anthony Green <green@cygnus.com>
9551
9552 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
9553 constant.
9554
9555 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9556
9557 * parse.y (lookup_field_wrapper): Unified returned value to NULL
9558 or the searched field decl.
9559
9560 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
9561
9562 * parse.y (fold_constant_for_init): Convert numerical constant
9563 values to the type of the assigned field.
9564
9565 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
9566
9567 * expr.c (lookup_field): Relaxed the test on class loading error
9568 detection.
9569 * parse.y (fold_constant_for_init): Enabeled old code.
9570
9571 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
9572
9573 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
9574 decide the validity of the cast of a java.lang.Cloneable reference
9575 to an array.
9576 (patch_conditional_expr): Fixed first argument passed to
9577 binary_numeric_promotion.
9578
9579 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
9580
9581 * parse.y (qualify_ambiguous_name): Take into account that a
9582 CONVERT_EXPR might specify a type as a WFL.
9583
9584 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9585
9586 * parse.y (patch_assignment): Save the rhs before using it as an
9587 argument to _Jv_CheckArrayStore.
9588
9589 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
9590
9591 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
9592
9593 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9594
9595 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
9596 floating point literal only when the exponent indicator has been
9597 parsed.
9598
9599 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
9600
9601 * parse.y (formal_parameter:): Construct argument tree list
9602 element even if a yet unsupported final parameter was encountered.
9603
9604 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
9605
9606 * parse.y (finish_method_declaration): Issue errors for native or
9607 abstract methods declared with a method body, as well as for non
9608 native or non abstract methods with no method body.
9609
9610 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9611
9612 * class.c (build_utf8_ref): Initialize variable `field'.
9613
9614 * decl.c (init_decl_processing): Initialize variable `field'.
9615
9616 * expr.c (build_known_method_ref): Mark parameters `method_type',
9617 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
9618 (process_jvm_instruction): Likewise for parameter `length'.
9619
9620 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
9621 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
9622 ATTRIBUTE_UNUSED.
9623
9624 * parse.y (maybe_generate_clinit): Remove unused variable
9625 `has_non_primitive_fields'.
9626 (find_in_imports_on_demand): Initialize variables `node_to_use'
9627 and `cl'.
9628 (patch_binop): Likewise for variable `prom_type'.
9629 (patch_unaryop): Likewise for variable `prom_type'.
9630
9631 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
9632
9633 * xref.c (xref_table): Add missing initializer.
9634
9635 1999-05-14 Tom Tromey <tromey@cygnus.com>
9636
9637 * java-except.h (struct eh_range): Removed unused `next' member.
9638 * verify.c (verify_jvm_instructions): Call check_nested_ranges
9639 after adding all exception handlers. Sort exception ranges in
9640 order of start PC.
9641 (struct pc_index): New structure.
9642 (start_pc_cmp): New function.
9643 * except.c (add_handler): Return `void'. Don't call link_handler;
9644 instead construct an ordinary linked list and do range
9645 coalescing.
9646 (check_nested_ranges): New function.
9647 (link_handler): Changed interface to allow merging of eh_ranges.
9648 Split overlapping ranges. Return `void'.
9649
9650 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9651
9652 * parse.y (constructor_block_end:): New rule, tagged <node>.
9653 (constructor_body:): Use `constructor_block_end' instead of
9654 `block_end'.
9655
9656 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9657
9658 * parse.y (statement_nsi:): Pop `for' statement block.
9659 (java_complete_lhs): Labeled blocks containing no statement are
9660 marked as completing normally.
9661
9662 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9663
9664 * xref.c (xref_set_current_fp): New function, defined.
9665 * xref.h (xref_set_current_fp): New function, prototyped.
9666
9667 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
9668
9669 * check-init.c (check_init): Take into account that
9670 LABELED_BLOCK_STMT can be empty.
9671
9672 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9673
9674 * parse.y (java_check_regular_methods): Warning check on not
9675 overriding methods with default access in other packages does not
9676 apply to `<clinit>'.
9677 (java_complete_lhs): If block body is an empty_stmt_node, replace
9678 it by NULL_TREE. This prevents gcc from generating an irrelevant
9679 warning.
9680
9681 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9682
9683 * check-init.c (check_init): Removed code accepting to see things
9684 falling through default:, when doing xrefs.
9685 * java-tree.h (do_not_fold): New global variable, declared.
9686 * parse.y (do_not_fold): New global variable, defined.
9687 (java_complete_expand_method): Set `do_not_fold' to the value of
9688 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
9689 and reinstall them after them have been purged; do not check for
9690 initializations; do not issue missing return errors.
9691 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
9692 when doing xrefs.
9693 (patch_binop): Skip the fold part when doing xrefs.
9694 (build_string_concatenation): Skip the concatenation part when
9695 doing xrefs.
9696 (patch_synchronized_statement): Do not generate a try-finally when
9697 doing xrefs.
9698 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
9699 and keep the location where the throw was seen.
9700 * typeck.c (convert): When `do_not_fold' is set, do not attempt
9701 any treatment on the converted node an simply return a NOP_EXPR of
9702 the targeted type.
9703 * xref.c (xref_get_data): New function, defined.
9704 * xref.h (xref_get_data): New function, declared.
9705 (XREF_GET_DATA): Use xref_get_data.
9706
9707 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9708
9709 * gjavah.c (print_include): Cast the result of `strlen' to int
9710 when comparing against a signed value.
9711 (add_namelet): Likewise.
9712
9713 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9714
9715 * expr.c (expand_invoke): Mark parameter `nargs' with
9716 ATTRIBUTE_UNUSED.
9717 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
9718
9719 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
9720 ATTRIBUTE_UNUSED.
9721
9722 * jcf-reader.c (get_attribute): Cast a value to long
9723 when comparing against a signed expression. Likewise.
9724
9725 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
9726 HOST_BITS_PER_CHAR.
9727
9728 1999-05-11 Andrew Haley <aph@cygnus.com>
9729
9730 * parse.y (source_end_java_method): If the current method contains
9731 any exception handlers, force asynchronous_exceptions: this is
9732 necessary because signal handlers in libjava may throw exceptions.
9733 * decl.c (end_java_method): Ditto.
9734
9735 1999-05-11 Tom Tromey <tromey@cygnus.com>
9736
9737 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
9738 flags.
9739 * jvspec.c (THREAD_NAME): Removed.
9740 (GC_NAME): Likewise.
9741 (MATHLIB): Likewise.
9742 (WITHLIBC): Likewise.
9743 (GCLIB): Likewise.
9744 (THREADLIB): Likewise.
9745 (MATH_LIBRARY): Likewise.
9746 (lang_specific_driver): Don't add `-l' options to command line.
9747 Instead, add a single --specs option. Recognize `-L' options and
9748 use them to search for spec file.
9749 (find_spec_file): New function.
9750 (SPEC_FILE): New define.
9751
9752 1999-05-11 Dave Brolley <brolley@cygnus.com>
9753
9754 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
9755 cpplib-enabled build.
9756
9757 1999-05-05 Per Bothner <bothner@cygnus.com>
9758
9759 * class.c (make_field_value): DECL_INITIAL may be a string literal;
9760 temporarily zero it while calling rest_of_decl_compilation.
9761
9762 * java-tree.h (string_ptr_type_node): Add declaration.
9763 * decl.c: Define and initialize string_ptr_type_node.
9764 * parse.y (patch_string_cst): Use string_ptr_type_node.
9765
9766 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
9767 * parse.y (for_statement): Now unconditionally exit_block.
9768 (finish_labeled_statement): No longer exit_block if for-loop.
9769 (patch_loop_statement): Check harder if the loop is already labeled.
9770
9771 * parse.y (patch_initialized_static_field): Removed function.
9772 (maybe_generate_clinit): Removed special handling for interfaces.
9773 (java_complete_expand_methods): Do a preliminary java_complete_tree
9774 on <clinit> to determine if it can be removed.
9775 (java_complete_expand_method): Remove special handling for <clinit>.
9776 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
9777 optimize if we get back empty_stmt_node.
9778 For MODIFY_EXPR, re-do checking of static initializers.
9779 (fold_constant_for_init): Don't return immediate if VAR_DECL.
9780 For VAR_DECL, pass correct context.
9781
9782 * verify.c (verify_jvm_instructions): Better error messages.
9783
9784 1999-05-03 Tom Tromey <tromey@cygnus.com>
9785
9786 * parse-scan.y (interface_declaration): Call
9787 report_class_declaration for interfaces.
9788
9789 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
9790
9791 * Makefile.in: Remove -v from bison command lines.
9792
9793 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
9794
9795 * check-init.c (check_init): Exclude a case of error when doing
9796 xrefs.
9797 * class.c (layout_class_method): Don't generate the error message
9798 twice when compiling from source.
9799 * lang-options.h: Added `-Wredundant-modifers' and
9800 `-Wunusupported-jdk11' flags and help text.
9801 * lang.c (lang_decode_option): Added support for
9802 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
9803 flag_static_local_jdk11 and flag_redundant set accordingly.
9804 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
9805 * parse.h (EXPR_WFL_ADD_COL): New macro.
9806 (DECL_END_SOURCE_LINE): Likewise.
9807 (DECL_INHERITED_SOURCE_LINE): Likewise.
9808 * parse.y (static_ref_err): New function, prototyped.
9809 (CCB_TK): Now tagged <operator>.
9810 (class_body:): Remember the location of the closing '}' of a class
9811 definition when doing xrefs.
9812 (block:): Likewise.
9813 (block_end:): Likewise.
9814 (create_class): Remember the location of the inherited class
9815 identifier when doing xrefs.
9816 (register_fields): Added test on first operand of `init' before
9817 testing it TREE_CODE.
9818 (method_header): Store the location of the class identifier in the
9819 class decl when doing xrefs.
9820 (finish_method_declaration): Don't combine first/last method line
9821 when doing xref.
9822 (java_check_regular_methods): Warning check on not overriding
9823 methods with default access on other packages move before check on
9824 static methods. Initialization of `aflags' also moved up.
9825 (resolve_expression_name): Call static_ref_err to report the error.
9826 (static_ref_err): New function, implemented.
9827 (resolve_field_access): Returned simplified static field access
9828 when doing xrefs.
9829 (resolve_qualified_expression_name): Check for illegal use of
9830 static fields in a non static context. Call static_ref_err to
9831 report error in various places.
9832 (java_complete_tree): Do not fold initialized static fields when
9833 doing xrefs.
9834 (java_complete_lhs): Likewise.
9835
9836 1999-04-29 Anthony Green <green@cygnus.com>
9837
9838 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
9839 create internal labels.
9840 (lookup_label): Ditto.
9841
9842 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
9843
9844 * class.c (layout_class_method): Generate <clinit>'s rtl for
9845 interfaces.
9846 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
9847 for interfaces' <clinit>.
9848 * expr.c (lookup_field): Search for fields in interfaces.
9849 (expand_invoke): Fixed indentation.
9850 (expand_java_field_op): Likewise. Use IS_CLINIT.
9851 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
9852 (IS_CLINIT): New macro.
9853 * parse.y (type_declaration:): Call maybe_generate_clinit after an
9854 interface was parsed.
9855 (maybe_generate_clinit): Don't generate if the current class is an
9856 interface with only fields of primitive types.
9857 (reset_method_name): Use IS_CLINIT.
9858 (java_complete_expand_method): Expand <clinit> when it exists for
9859 interfaces. Use IS_CLINIT.
9860 (resolve_expression_name): Use DECL_CONTEXT instead of
9861 current_class to build static field references.
9862 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
9863 ARRAY_REF when doing xreferencing.
9864 (check_final_assignment): Fixed typo in leading comment. Use
9865 IS_CLINIT.
9866 (patch_array_ref): Don't fully expand array references when
9867 xreferencing.
9868 (patch_return): Use IS_CLINIT.
9869 (patch_throw_statement): Likewise.
9870
9871 1999-04-22 Tom Tromey <tromey@cygnus.com>
9872
9873 * Make-lang.in (JAVA_SRCS): Added check-init.c.
9874
9875 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
9876
9877 * decl.c (predef_filenames, predef_filenames_size): New globals
9878 (init_decl_processing): predef_filenames and predef_filenames_size
9879 initialized.
9880 * java-tree.h (predef_filenames, predef_filenames_size): Declared
9881 extern.
9882 * jcf-parse.c (predefined_filename_p): New function.
9883 (yyparse): Check that files on the command line are specified only
9884 once and issue a warning otherwise.
9885 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
9886 * parse.y (source_end_java_method): Nullify NOP method bodies, to
9887 avoid a gcc warning with -W -Wall turned on.
9888 (java_expand_classes): Abort if errors were encountered.
9889 (java_complete_lhs): If the cross reference flag is set, wrap
9890 field DECL node around a WFL when resolving expression name.
9891
9892 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
9893
9894 * lang.c (lang_decode_option): Fixed returned value when parsing
9895 `-fxref=...' and `-Wall'.
9896 * parse.y (source_end_java_method): Do not generate code when
9897 flag_emit_xref is set.
9898 (resolve_expression_name): Do not build static field access when
9899 flag_emit_xref is set.
9900 (resolve_field_access): No special treatment on `length' when
9901 flag_emit_xref is set. Do not build qualified static field access
9902 when flag_emit_xref is set.
9903 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
9904 when flag_emit_xref is set.
9905 (patch_assignment): Do not generate array store runtime check when
9906 flag_emit_xref is set.
9907 * xref.c (xref_flag_value): Fixed function declaration
9908 indentation.
9909 (xset_set_data): New function.
9910 * xref.h (xref_set_data): Added prototype for new function.
9911 (typedef struct xref_flag_table): New field data.
9912 (XREF_GET_DATA): New macro.
9913
9914 1999-04-19 Tom Tromey <tromey@cygnus.com>
9915
9916 * xref.h (enum): Removed trailing comma.
9917
9918 * parse.y (resolve_qualified_expression_name): Added missing
9919 `break'.
9920
9921 1999-04-15 Anthony Green <green@cygnus.com>
9922
9923 * gjavah.c: New prototypes for java_float_finite and
9924 java_double_finite.
9925
9926 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
9927
9928 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
9929 references.
9930
9931 1999-04-06 Jeffrey A Law (law@cygnus.com)
9932
9933 * Makefile.in (TREE_H): Add tree-check.h.
9934 (RTL_H): Add genrtl.h.
9935
9936 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
9937
9938 * parse.y (patch_assignment): Added ArrayStoreException runtime
9939 check.
9940
9941 1999-04-06 Per Bothner <bothner@cygnus.com>
9942
9943 * expr.c (pop_type_0): New function.
9944 (pop_type): Use pop_type_0.
9945 * java-tree.h (pop_type_0): New declaration.
9946 * verify.c (verify_jvm_instructions): Check return instructions.
9947
9948 * parse.y (patch_binop): Don't fold if non-constant and emiting
9949 class files.
9950
9951 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9952
9953 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
9954
9955 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
9956 (main_jcf): Don't define.
9957 (process_file): Don't set `main_jcf'.
9958
9959 * java-tree.h (main_jcf): Don't declare.
9960
9961 * jcf-parse.c (main_jcf): Add static definition.
9962
9963 * lang.c (main_jcf): Don't define.
9964
9965 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9966
9967 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
9968
9969 * decl.c (copy_lang_decl): Likewise for `bcopy'.
9970
9971 * jcf-depend.c: Include "config.h", not <config.h>.
9972
9973 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
9974 `bcopy' to PTR.
9975
9976 * jcf-path.c: Include "config.h", not <config.h>.
9977
9978 * lex.c: Don't include various system header files.
9979 (java_init_lex): Cast the argument of `bzero' to PTR
9980
9981 * parse-scan.y (java_push_parser_context): Likewise.
9982
9983 * parse.y (java_push_parser_context): Likewise.
9984 (patch_bc_statement): Match format specifier to variable argument.
9985
9986 * xref.c: Don't include <stdio.h>.
9987
9988 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
9989
9990 * parse.y (struct parser_ctxt *ctxp): Now global.
9991 (declare_local_variables): Use WFL compound value for the
9992 declaration source line value, when doing cross-referencing.
9993
9994 1999-03-31 Tom Tromey <tromey@cygnus.com>
9995
9996 * gjavah.c (print_field_info): Allow constants of other types.
9997 (print_include): Generate include when new name is proper prefix
9998 of already printed name.
9999 (add_namelet): Likewise.
10000 (cxx_keyword_subst): New function.
10001 (print_method_info): Use it.
10002 (print_field_name): New function.
10003 (get_field_name): New function.
10004 (print_field_info): Use get_field_name and print_field_name.
10005
10006 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10007
10008 * Makefile.in (keyword.h): Generate using gperf language 'C', not
10009 'KR-C', so gperf uses the `const' keyword on strings.
10010
10011 * keyword.gperf (java_keyword): Const-ify a char*.
10012
10013 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10014
10015 * parse.y (patch_bc_statement): Fixed identation and a bogus
10016 `printf' format.
10017
10018 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10019
10020 * parse.y (patch_assignment): Allow static variables in other
10021 classes to be assigned.
10022
10023 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10024
10025 * class.c (maybe_add_interface): Remove unused variable
10026 `interface_binfo'.
10027 (make_class_data): Use = for assignment, not ==. Likewise.
10028 (emit_register_classes): Remove unused variable `decl'.
10029
10030 * lex.c: Fix comment so as not to contain an embedded `/*'.
10031
10032 * verify.c (verify_jvm_instructions): Remove unused variable
10033 `self_type'.
10034
10035 1999-03-27 Per Bothner <bothner@cygnus.com>
10036
10037 * parse.y (complete_loop_body): Rename to finish_loop_body.
10038 (complete_labeled_statement): Rename to finish_labeled_statement.
10039 (complete_for_loop): Rename to finish_for_loop.
10040 (complete_method_declaration): Rename to finish_method_declaration.
10041
10042 * java-tree.h (continue_identifier_node): New global node.
10043 * decl.c: Define and initialize continue_identifier_node.
10044 * parse.y (generate_labeled_block): Remove - no longer needed.
10045 (build_loop_body): Use continue_identifier_node for continue block.
10046 (finish_labeled_statement): Also do pop_labeled_block actions.
10047 (java_complete_lhs): POP_LOOP even if error.
10048 (build_labeled_block): Special handling for continue_identifier_node.
10049 (patch_loop_statement): Re-organize.
10050 (patch_bc_statement): Re-write.
10051
10052 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
10053
10054 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
10055 using a WFL compound value.
10056 * parse.y (xref.h): Include.
10057 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
10058 WFL compound value.
10059 (register_fields): Set WFL compound value to lineno if doing
10060 xrefs.
10061 (java_complete_expand_method): Call expand_xref if flag_emit_xref
10062 is set.
10063 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
10064 * xref.h (expand_xref): Prototype renamed from xref_generate.
10065
10066 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
10067
10068 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
10069 (GET_CURRENT_BLOCK): New macro.
10070 * parse.y (current_static_block): New global variable.
10071 (method_body:): Define action.
10072 (complete_method_declaration): Set current_function_decl to NULL
10073 when work on the current method is done.
10074 (declare_local_variables): Use GET_CURRENT_BLOCK.
10075 (java_method_add_stmt): Likewise.
10076 (java_complete_expand_method): Disable the use of `this' when
10077 expanding <clinit>.
10078 (enter_a_block): If no current method exist, use
10079 current_static_block to link static initializer blocks.
10080 (exit_block): Rewritten to use current_static_block when no current
10081 method decl exists.
10082 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
10083 (patch_return): Forbid the use of `return' in static initializers.
10084 (patch_throw_statement): Fixed indentation. Issue specific error
10085 for uncaught thrown checked exception in static initializer
10086 blocks. Removed FIXME.
10087
10088 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
10089
10090 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
10091 Link gcj from gcc.o.
10092
10093 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10094
10095 * parse.y (find_applicable_accessible_methods_list): When dealing
10096 with interface: ensure that a given interface or java.lang.Object
10097 are searched only once.
10098
10099 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10100
10101 * gjavah.c (print_c_decl): Remove unused argument `flags'.
10102
10103 * jcf-dump.c (print_access_flags): Add braces around if-else.
10104
10105 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
10106 COMBINE_INPUTS.
10107
10108 * lex.c (build_wfl_node): Add static prototype.
10109
10110 * lex.h (build_wfl_node): Remove static prototype.
10111
10112 * parse.y: Include lex.c early enough to declare everything needed.
10113 Ensure calls to `build_wfl_node' pass the proper arguments.
10114 (create_class): Remove unused variable `super_decl'.
10115 (get_printable_method_name): Initialize variable `name'.
10116
10117 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10118
10119 * Changelog: Fixed 1999-03-22 typos.
10120 * lang.c (lang_decode_option): Fixed typo in error string in the
10121 XARG section.
10122
10123 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10124
10125 * Makefile.in (JAVA_OBJS): Added entry xref.o.
10126 (xref.o): New rule.
10127 * java-tree.h (flag_emit_xref): Declared extern.
10128 * lang.c (xref.h): Included.
10129 (flag_emit_xref): New global variable.
10130 (lang_decode_option): Added support for -fxref.
10131 * xref.c: Created.
10132 * xref.h: Likewise.
10133
10134 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
10135
10136 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
10137 linked with.
10138
10139 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10140
10141 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
10142 $(srcdir)/../system.h and $(JAVA_TREE_H).
10143 (jcf-io.o): Depend on $(JAVA_TREE_H).
10144 (mangle.o): Likewise.
10145
10146 * check-init.c (check_cond_init): Add static prototype.
10147
10148 * class.c (build_java_method_type, hashUtf8String,
10149 make_field_value, get_dispatch_vector, get_dispatch_table,
10150 append_gpp_mangled_type, mangle_static_field): Likewise.
10151 (strLengthUtf8): Hide unused definition.
10152 (hashUtf8String): Const-ify.
10153 (make_field_value): Un-ANSI-fy.
10154
10155 * constants.c: Move inclusion of jcf.h above java-tree.h.
10156 (set_constant_entry, find_class_or_string_constant,
10157 find_name_and_type_constant, get_tag_node,
10158 build_constant_data_ref): Add static prototype.
10159
10160 * decl.c (push_jvm_slot, builtin_function,
10161 lookup_name_current_level): Likewise.
10162 (builtin_function): Const-ify.
10163
10164 * except.c (expand_start_java_handler, expand_end_java_handler):
10165 Add static prototype.
10166
10167 * expr.c (flush_quick_stack, push_value, pop_value,
10168 java_stack_swap, java_stack_dup, build_java_athrow,
10169 build_java_jsr, build_java_ret, expand_java_multianewarray,
10170 expand_java_arraystore, expand_java_arrayload,
10171 expand_java_array_length, build_java_monitor, expand_java_pushc,
10172 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
10173 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
10174 expand_compare, expand_test, expand_cond, expand_java_goto,
10175 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
10176 expand_java_field_op, java_push_constant_from_pool): Likewise.
10177
10178 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
10179 (build_java_arraynull_check): Mark parameters `node' and `type'
10180 with ATTRIBUTE_UNUSED.
10181 (note_label): Likewise for parameter `current_pc'.
10182 (expand_java_call, expand_java_ret): Hide unused definition.
10183
10184 * java-tree.h (make_class, build_constants_constructor,
10185 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
10186 init_outgoing_cpool, register_class, emit_register_classes,
10187 java_layout_seen_class_methods): Prototype.
10188 (unicode_mangling_length): Const-ify.
10189 (append_gpp_mangled_name, append_gpp_mangled_classtype,
10190 emit_unicode_mangled_name, format_int, format_uint,
10191 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
10192 jcf_print_utf8_replace, open_class): Prototype.
10193
10194 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
10195 <stdio.h>. Include tree.h/java-tree.h.
10196 (utf8_equal_string usage, process_class): Add static prototype.
10197 (open_class): Don't prototype this here.
10198 (utf8_equal_string): Match arguments to format specifiers.
10199 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
10200 TABLE_SWITCH, disassemble_method): Likewise.
10201
10202 * jcf-io.c: Include tree.h/java-tree.h.
10203 (open_class, find_classfile, jcf_print_utf8,
10204 jcf_print_utf8_replace): Const-ify.
10205
10206 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
10207 parse_class_file): Add static prototype.
10208 (find_in_current_zip): Match definition to existing static
10209 prototype.
10210
10211 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
10212 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
10213 finish_jcf_block, define_jcf_label, get_jcf_label_here,
10214 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
10215 write_chunks, adjust_typed_op, generate_bytecode_conditional,
10216 generate_bytecode_return, perform_relocations, init_jcf_state,
10217 init_jcf_method, release_jcf_state, generate_classfile):
10218 Add static prototype.
10219 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
10220 (make_class_file_name): Const-ify.
10221
10222 * jcf.h (find_classfile): Const-ify.
10223
10224 * jv-scan.c (reset_report): Remove prototype.
10225
10226 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
10227 (error): Rewrite to allow varargs.
10228
10229 * lang.c (lang_f_options): Const-ify.
10230
10231 * lex.c (java_parse_escape_sequence): Add static prototype.
10232 (java_allocate_new_line): Match definition to existing static
10233 prototype.
10234
10235 * mangle.c Include tree.h/java-tree.h.
10236 (unicode_mangling_length, emit_unicode_mangled_name,
10237 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
10238
10239 * parse.h (jdep_code): Remove trailing comma in enumeration.
10240 (java_get_line_col): Move prototype outside of !JC1_LITE test.
10241 (reset_report): Add prototype.
10242
10243 * verify.c (push_pending_label, merge_types): Add static
10244 prototypes.
10245
10246 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
10247
10248 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
10249
10250 * parse.y (find_applicable_accessible_methods_list): Extend the
10251 search to superinterfaces when relevant.
10252 (search_applicable_methods_list): New function.
10253
10254 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10255
10256 * class.c (unmangle_classname): Implemented stricter testing
10257 before setting the QUALIFIED_P flag on an identifier.
10258
10259 1999-03-16 Per Bothner <bothner@cygnus.com>
10260
10261 * parse.y (java_complete_lhs): Call force_evaluation_order
10262 after patch_newarray.
10263 (patch_binop): Don't call fold if there are side effects.
10264
10265 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
10266
10267 * parse.y (java_stabilize_reference): Use save_expr instead of
10268 building a SAVE_EXPR node.
10269 (java_complete_lhs): Patch the resulting string of the `+='
10270 operator (if necessary) and complete the RHS after having built
10271 the cast.
10272
10273 1999-03-15 Per Bothner <bothner@cygnus.com>
10274
10275 * class.c (make_class): Don't set CLASS_P here (because
10276 this function is also called by build_java_array_type).
10277 (push_class): Set CLASS_P here instead.
10278 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
10279
10280 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
10281 context. If the context is class, perfer "super" over "synchronized".
10282 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
10283
10284 * parse.y (create_class): Don't call parser_check_super here;
10285 it is not robust. Always wait until later.
10286
10287 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
10288 match what JDK 1.2 does), but don't set ACC_PUBLIC.
10289
10290 1999-03-13 Per Bothner <bothner@cygnus.com>
10291
10292 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
10293 * lex.h (UNGETC): Change misleading macro.
10294
10295 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10296
10297 * parse.y (java_stabilize_reference): Return NODE when patching a
10298 COMPOUND_EXPR.
10299 (java_complete_lhs): Put parenthesis around truth values.
10300
10301 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
10302
10303 * class.c (layout_class_method): Don't make rtl for interface
10304 methods.
10305 * parse.h (GET_TYPE_NAME): New macro.
10306 * parse.y (if_then_statement:): Fixed indentation.
10307 (if_then_else_statement:): Likewise.
10308 (for_statement:): Fixed spacing.
10309 (try_statement:): Fixed indentation.
10310 (create_interface): Don't force interfaces to be abstract.
10311 (method_header): Abstract methods are OK in interfaces.
10312 (declare_local_variables): Fixed typo in comment.
10313 (java_complete_expand_method): Fixed indentation.
10314 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
10315 non accessible fields.
10316 (java_stabilize_reference): New function.
10317 (java_complete_lhs): Fixed indentation. Use
10318 java_stabilize_reference in compound assignment. Insert the
10319 cast. If not processing `+' fix string constants before processing
10320 binop.
10321
10322 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10323
10324 * constants.c (find_class_or_string_constant): Cast variable `j'
10325 to a `jword' when comparing against one.
10326
10327 * expr.c (java_lang_expand_expr): Remove unused variables
10328 `has_finally_p' and `op0'.
10329
10330 * gjavah.c (print_field_info): Cast a value to jint when comparing
10331 against one. Likewise for a jlong.
10332 (add_namelet): Likewise cast a `sizeof' to an int when comparing
10333 against a signed quantity.
10334
10335 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
10336 (print_signature): Don't needlessly dereference variable `str'
10337
10338 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
10339 `max_locals' with ATTRIBUTE_UNUSED.
10340 (jcf_parse_class): Likewise for variable `index'.
10341
10342 * parse.h (reverse_jdep_list): Remove static prototype.
10343
10344 * parse.y (build_jump_to_finally): Remove prototype and definition.
10345 (reverse_jdep_list): Add static prototype.
10346
10347 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
10348 `assignment' and `expr_decl'.
10349
10350 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
10351
10352 1999-03-12 Andrew Haley <aph@cygnus.com>
10353
10354 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
10355 we'll need a directory separator and a null character.
10356
10357 1999-03-10 Per Bothner <bothner@cygnus.com>
10358
10359 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
10360
10361 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
10362
10363 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
10364 interfaces.
10365
10366 1999-03-05 Per Bothner <bothner@cygnus.com>
10367
10368 * lex.c (java_parse_end_comment): Take extra parameter (next char).
10369
10370 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
10371
10372 * class.c (layout_class_method): A static method in a base class
10373 is never overridden, so treat it like it doesn't exist.
10374 However, do complain about private non-static method overriding
10375 public static method.
10376
10377 * parse.y: Don't set unused INITIALIZED_P flag.
10378 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
10379
10380 * parse.y (find_expr_with_wfl): Optimize tail-calls.
10381 (build_array_from_name): Re-order &index[string] to &string[index].
10382
10383 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
10384 error_mark (it might catch more errors, but it is more likely to lose).
10385
10386 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10387
10388 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
10389 (parse-scan.o): Depend on toplev.h.
10390
10391 * class.c (make_method_value): Add prototype. Make it static.
10392 Remove unused second argument, caller changed.
10393
10394 * expr.c (java_lang_expand_expr): Remove unused variable
10395 `return_label'.
10396
10397 * java-tree.h: Don't prototype find_in_current_zip.
10398 Add prototypes for verify_constant_pool, start_java_method,
10399 end_java_method, give_name_to_locals, expand_byte_code,
10400 open_in_zip, set_constant_value, find_constant1, find_constant2,
10401 find_utf8_constant, find_string_constant, find_class_constant,
10402 find_fieldref_index, find_methodref_index, write_constant_pool,
10403 count_constant_pool_bytes and encode_newarray_type.
10404
10405 * jcf-dump.c: Remove unused variable `LONG_temp'.
10406
10407 * jcf-parse.c: Include parse.h.
10408 (jcf_parse_source): Remove unused parameter, all callers changed.
10409 (jcf_figure_file_type): Add static prototype.
10410 (find_in_current_zip): Likewise. Also remove unused parameter,
10411 all callers changed.
10412 (read_class): Initialize variable `saved_pos'.
10413
10414 * jcf-reader.c (jcf_parse_preamble): Mark variables
10415 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
10416
10417 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
10418 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
10419 (java_parse_doc_section): Initialize variable `seen_star'.
10420 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
10421 (java_lex_error): Mark parameters `msg' and `forward' with
10422 ATTRIBUTE_UNUSED.
10423 (java_get_line_col): Mark parameters `filename' and `line' with
10424 ATTRIBUTE_UNUSED.
10425
10426 * parse-scan.y: Include toplev.h.
10427 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
10428
10429 * parse.h: use `struct JCF', not plain `JCF'.
10430 (java_parser_context_save_global, java_expand_classes
10431 java_parser_context_restore_global, java_parse): Add prototypes.
10432
10433 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
10434 `node'.
10435
10436 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
10437
10438 * check-init.c (check_init): COPYN takes word count, not bit count.
10439
10440 1999-02-26 Per Bothner <bothner@cygnus.com>
10441
10442 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
10443 explicit build_decl. (Avoids crash in reload when optimizing.)
10444
10445 1999-02-25 Per Bothner <bothner@cygnus.com>
10446
10447 * decl.c (complete_start_java_method): Handle synchronized method
10448 even when compiling from bytecode.
10449
10450 1999-02-26 Tom Tromey <tromey@cygnus.com>
10451
10452 * gjavah.c (add_class_decl): Only generate `#include' if outer
10453 class is not the name of the class we are processing. Correctly
10454 append `.h' in #include.
10455 (process_file): Clean up newlines around generated `#include's.
10456 (decode_signature_piece): Correctly handle inner classes.
10457 (struct include): New structure.
10458 (all_includes): New global.
10459 (print_include): New function.
10460 (add_class_decl): Use it.
10461 (process_file): Likewise.
10462 (add_class_decl): Generate include for java-array.h if array
10463 seen.
10464 (process_file): Don't generate java-array.h include.
10465
10466 * gjavah.c (add_namelet): Check for standard package names here.
10467 (add_class_decl): Don't check for standard package names here.
10468
10469 1999-02-25 Tom Tromey <tromey@cygnus.com>
10470
10471 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
10472 When reading a zip file, only use strncmp if both strings are
10473 bigger than the buffer length. Initialize `k' when looping
10474 through zip file.
10475
10476 1999-02-24 Tom Tromey <tromey@cygnus.com>
10477
10478 * gjavah.c (struct namelet): New structure.
10479 (add_namelet): New function.
10480 (print_namelet): New function.
10481 (print_class_decls): Use add_namelet and print_namelet to generate
10482 namespaces and not classes.
10483 (method_printed): New global.
10484 (HANDLE_END_METHOD): Examine method_printed.
10485 (print_method_info): Set method_printed when required. Print
10486 error if function to be ignored is marked virtual. Handle $finit$
10487 method.
10488 (METHOD_IS_FINAL): New macro.
10489 (print_field_info): Use it.
10490 (HANDLE_METHOD): Clear method_printed.
10491 (method_pass): New global.
10492 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
10493 (process_file): Do two passes over both fields and methods.
10494 (HANDLE_METHOD): Examine method_pass.
10495 (root): New global.
10496 (add_class_decl): New function.
10497 (print_class_decls): Don't scan over entire constant pool.
10498
10499 1999-02-23 Tom Tromey <tromey@cygnus.com>
10500
10501 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
10502 disable linking in that case.
10503
10504 1999-02-20 Tom Tromey <tromey@cygnus.com>
10505
10506 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
10507 not 0x1f.
10508
10509 1999-02-21 Per Bothner <bothner@cygnus.com>
10510
10511 * decl.c (build_result_decl), java-tree.h: New method.
10512 (complete_start_java_method): Handle synchronized methods.
10513 Don't build DECL_RESULT here. (Ordering dependency problem.)
10514 (start_java_method): Call build_result_decl here instead ...
10515 * parse.y (java_complete_expand_method): ... and here.
10516 (expand_start_java_method): Don't call complete_start_java_method here.
10517 (java_complete_expand_method): Call it here instead.
10518 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
10519 * java-tree.h: ... here.
10520
10521 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
10522 * parse.y (java_complete_lhs): Don't call force_evaluation_order
10523 for ARRAY_REF - it doesn't work when array bounds are checked.
10524 (patch_array_ref): Handle it here instead.
10525
10526 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
10527
10528 1999-02-19 Per Bothner <bothner@cygnus.com>
10529
10530 Force left-to-right evaluation of binary operations etc.
10531 * expr.c (force_evaluation_order), java-tree.h: New function.
10532 * parse.y (java_complete_lhs): Pass binary operations, procedure
10533 calls, and ARRAY_REFs to force_evaluation_order.
10534 (various): Set TREE_SIDE_EFFECTS more carefully.
10535
10536 Tolerate random (non-UTF8) encoding in comments without complaining.
10537 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
10538 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
10539
10540 * parse.y (resolve_qualified_expression_name): Handle error_mark.
10541 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
10542
10543 * parse.y (java_complete_lhs): Ignore an empty statement in a
10544 COMPOUND_EXPR. Don't complain about empty statement after return.
10545
10546 1999-02-19 Per Bothner <bothner@cygnus.com>
10547
10548 * parse.y (obtain_incomplete_type): Don't wrap unknown types
10549 in TREE_LIST - just chain the POINTER_TYPEs together.
10550 (resolve_class): If type already resolved, return decl.
10551 After resolving, update TREE_TYPE(class_type), and name (if array).
10552 * parse.h (do_resolve_class), parse.y: Make non-static.
10553 * class.c (maybe_layout_super_class): Take this_class argument.
10554 Do do_resolve_class if necessary.
10555 (layout_class, layout_class_methods): Adjust calls appropriately.
10556 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
10557 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
10558 * typeck.c (build_java_array_type): Don't call layout_class.
10559
10560 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10561
10562 * parse.y (check_pkg_class_access): Allow private class access
10563 within the same package.
10564 (strip_out_static_field_access_decl): New function.
10565 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
10566 operator argument before testing its nature.
10567
10568 1999-02-03 Per Bothner <bothner@cygnus.com>
10569
10570 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
10571 (TRY_EXPR): Simplify - it no longer has a finally clause.
10572 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
10573 Simpler handling of TRY_EXPR, which no longer has a finally clause.
10574 * expr.c (java_lang_expand_expr): Likewise.
10575 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
10576 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
10577 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
10578 (build_try_statement): Remove finally parameter and handling.
10579 (build_try_finally_statement): New function.
10580 (patch_try_statement): No longer need to support finally clause.
10581 (try_statement): Update grammar action rules.
10582 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
10583 Simpler handling of TRY_EXPR, which no longer has a finally clause.
10584
10585 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
10586
10587 * jcf-parse.c (get_constant): Add braces around computation of 'd'
10588 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
10589
10590 1999-02-17 Andrew Haley <aph@cygnus.com>
10591
10592 * class.c (build_utf8_ref): Back out broken patch which was
10593 intended to to output signatures using '.' as a separator.
10594
10595 * class.c (make_class_data): Output signatures using '.' as a
10596 separator, rather than '/'.
10597 (mangled_classname): Likewise.
10598 (make_field_value): Likewise.
10599 (make_method_value): Likewise.
10600 * constants.c (alloc_class_constant): Likewise.
10601 * expr.c (build_invokeinterface): Likewise.
10602
10603 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
10604
10605 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
10606 of an ancient workaround.
10607
10608 1999-02-10 Jeffrey A Law (law@cygnus.com)
10609
10610 * jvspec.c (xmalloc): Kill the prototype. It does not belong
10611 here anymore.
10612
10613 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
10614
10615 * lex.c (yylex): Encode \0 as UTF8.
10616
10617 1999-02-10 Tom Tromey <tromey@cygnus.com>
10618
10619 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
10620 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
10621 (libgcj_zip): Renamed.
10622 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
10623 LIBJAVA_ZIP_FILE.
10624 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
10625
10626 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
10627 (GC_NAME): Renamed -lgc to -lgcjgc.
10628
10629 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10630
10631 * lex.c (java_lang_cloneable): Initialize.
10632 * parse.y (java_lang_cloneable): New static variable.
10633 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
10634 doing one more qualification round.
10635 (valid_ref_assignconv_cast_p): Reject null source or
10636 destination. Allow an array to be cast into java.lang.Cloneable.
10637 (patch_cast): Swapped two first arguments to first call to
10638 valid_ref_assignconv_cast_p.
10639
10640 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10641
10642 * parse.h: DECL_P renamed JDECL_P.
10643 * parse.y: DECL_P replaced by JDECL_P.
10644 (build_array_from_name): Always use pointer's type.
10645 (patch_bc_statement): Extra code to search continue target in a
10646 for loop. Fixed comments. Continue target is current loop when
10647 unlabeled.
10648
10649 1999-02-05 Andrew Haley <aph@cygnus.com>
10650
10651 * class.c (make_class_data): The superclass of an interface should
10652 be null, not class Object.
10653
10654 * lex.c (java_lex): Sign extend hex literals.
10655
10656 1999-02-04 Andrew Haley <aph@cygnus.com>
10657
10658 * class.c (build_utf8_ref): Output signatures using '.' as a
10659 separator, rather than '/'.
10660 (make_class_data): Likewise.
10661
10662 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
10663
10664 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
10665 mkstemp.o. Get them from libiberty now.
10666
10667 1999-02-02 Jeffrey A Law (law@cygnus.com)
10668
10669 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
10670
10671 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10672
10673 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
10674 from libiberty.h
10675
10676 1999-02-02 Per Bothner <bothner@cygnus.com>
10677
10678 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
10679 * jcf-write.c (generate_bytecode_return): New function.
10680 (generate_bytecode_insns): Use it, for RETURN_EXPR.
10681
10682 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
10683 generate special [fd]const_[01] instructions.
10684
10685 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
10686
10687 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
10688 handling OPCODE_lookupswitch or OPCODE_tableswitch.
10689
10690 1999-02-01 Per Bothner <bothner@cygnus.com>
10691
10692 * parse.y (patch_method_invocation): Handle calling static methods,
10693 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
10694
10695 * parse.y (java_complete_lhs): Don't complain about unreachable
10696 exit condition in a do-while statement.
10697
10698 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10699
10700 * lex.c (java_read_char): Fixed utf8 decoding.
10701 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
10702 range.
10703 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
10704 comments. Local variable `all_primitive' is gone. Broadened
10705 acceptance of `0' to floating point targets. `long' can now be
10706 widened to `double' or `float'.
10707 (valid_method_invocation_conversion_p): Added leading
10708 comment. Fixed tabulation.
10709 (build_string_concatenation): Optimize out left or right empty
10710 string constants.
10711
10712 1999-01-28 Per Bothner <bothner@cygnus.com>
10713
10714 * jcf-write.c (localvar_alloc): Only emit entry for
10715 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
10716 (generate_bytecode_insns): Only call put_linenumber if
10717 debug_info_level > DINFO_LEVEL_NONE.
10718 * jvspec.c (lang_specific_driver): If no -O* or -g* option
10719 is specified, add -g1 (for compatibility wih javac).
10720
10721 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
10722
10723 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
10724 gjavah.o, check-init.o, jv-scan.o
10725
10726 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10727
10728 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
10729
10730 * gjavah.c: Include config.h and system.h.
10731
10732 * javaop.h (inline): Don't define, its handled by system.h.
10733 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
10734 from `inline' to `static inline'.
10735
10736 * jcf.h (inline): Don't define, its handled by system.h.
10737
10738 * lex.c (inline): Likewise.
10739
10740 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
10741
10742 * lang-specs.h: Map -Qn to -fno-ident.
10743
10744 1999-01-29 Richard Henderson <rth@cygnus.com>
10745
10746 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
10747
10748 1999-01-29 Tom Tromey <tromey@cygnus.com>
10749
10750 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
10751 then cast it to Object before calling `append' method.
10752
10753 1999-01-28 Per Bothner <bothner@cygnus.com>
10754
10755 * check-init.c (check_bool2_init, check_bool_init, check_init):
10756 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
10757 * jcf-write.c (generate_bytecode_insns): Likewise.
10758
10759 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
10760
10761 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
10762 * parse.y (patch_cast): Allow a boolean to be cast into a
10763 boolean.
10764
10765 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
10766
10767 * parse.y: (class_declaration:): Fixed indentation.
10768 (class_member_declaration:): Extra `;' after field declaration now
10769 accepted.
10770 (interface_declaration:): Removed debug messages in error reports.
10771 (patch_binop): Nodes created and returned inherit the orignal
10772 node's COMPOUND_ASSIGN_P flag value.
10773 (patch_cast): Fix cast from char to floating point.
10774
10775 1999-01-25 Andrew Haley <aph@cygnus.com>
10776
10777 * except.c, java-except.h (expand_resume_after_catch): new
10778 function.
10779 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
10780 to branch back to main flow of control after a catch block.
10781
10782 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10783
10784 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
10785 $(srcdir)/../system.h.
10786 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
10787 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
10788 (jcf-write.o): Likewise.
10789 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10790 (mangle.o): Depend on $(srcdir)/../toplev.h.
10791 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10792 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
10793
10794 * class.c: Include output.h and parse.h.
10795 (mangled_classname): Add the `const' keyword to a char*.
10796 (find_named_method): Hide unused function definition.
10797 (build_utf8_ref): Change type of variable `c' to unsigned char.
10798 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
10799 (build_class_ref): Add the `const' keyword to a char*.
10800 (layout_class_method): Remove unused variable `buf'.
10801
10802 * decl.c (find_local_variable): Remove unused variable `rtl'.
10803 (pushdecl): Likewise for variables `different_binding_level' and
10804 `oldglobal'.
10805 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
10806 (maybe_build_cleanup): Likewise for parameter `decl'.
10807
10808 * except.c (expand_start_java_handler): Mark parameter `range'
10809 with ATTRIBUTE_UNUSED.
10810
10811 * expr.c: Include except.h.
10812 (pop_type): Remove unused variable `i'.
10813 (pop_value): Likewise for variables `n_words' and `i'.
10814 (expand_java_arrayload): Likewise for variable `convert'.
10815 (java_lang_expand_expr): Likewise for variables `op0', `type',
10816 `mode', `unsignedp', `node' and `elements'.
10817 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
10818 `eh_ranges'.
10819 (process_jvm_instruction): Add a `const' qualifier to a char*.
10820
10821 * gjavah.c (output_directory): Add the `const' keyword to a char*.
10822 (temp_directory): Likewise.
10823 (print_c_decl): Likewise.
10824 (print_method_info): Likewise.
10825 (decode_signature_piece): Likewise.
10826 (print_mangled_classname): Likewise.
10827
10828 * java-except.h: Provide prototypes for maybe_start_try,
10829 maybe_end_try and add_handler.
10830
10831 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
10832 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
10833 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
10834 init_expr_processing, push_super_field, init_class_processing,
10835 can_widen_reference_to, class_depth, verify_jvm_instructions,
10836 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
10837 set_local_type, merge_type_state, push_type, load_type_state,
10838 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
10839 emit_unicode_mangled_name): Add prototypes.
10840
10841 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
10842 (print_signature_type): Use ISDIGIT, not isdigit.
10843 (print_signature): Remove unused variable `j'.
10844
10845 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
10846 int when comparing against one.
10847
10848 * jcf-parse.c: Include toplev.h.
10849
10850 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
10851 (localvar_free): Remove unused variable `i'.
10852 (generate_bytecode_conditional): Likewise for variable `kind'.
10853
10854 * jv-scan.c: Include config.h and system.h. Remove redundant
10855 OS header and gansidecl.h includes.
10856 (warning): Add the `const' keyword to a char*. Also add
10857 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
10858 __STDC__, when determining whether to use ANSI-isms.
10859 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
10860 (xmalloc): Don't redundantly prototype here.
10861 (main): Remove unused parameter `envp'. Also fix the arguments
10862 passed to function `fatal' to match the format specifier.
10863
10864 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
10865
10866 * mangle.c: Include toplev.h.
10867 (emit_unicode_mangled_name): Declare parameter `len'.
10868
10869 * parse.y (parse_warning_context): Add the `const' keyword to a
10870 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
10871 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
10872 (issue_warning_error_from_context): Add the `const' keyword to
10873 a char*.
10874 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
10875 not `__STDC__' for whether to use ANSI-isms.
10876
10877 * typeck.c (incomplete_type_error): Mark parameters `value' and
10878 `type' with ATTRIBUTE_UNUSED.
10879 (parse_signature_type): Use ISDIGIT, not isdigit.
10880
10881 * verify.c (check_pending_block): Add the `const' keyword to a char*.
10882 (verify_jvm_instructions): Likewise. Remove unused variables
10883 `field_name' and `default_val'.
10884
10885 * zextract.c: Include config.h and system.h. Remove redundant
10886 OS header includes.
10887
10888 * zipfile.h: Prototype `read_zip_archive'.
10889
10890 1999-01-21 Andrew Haley <aph@cygnus.com>
10891
10892 * typeck.c (convert): Allow conversions to void type: some
10893 optimizations in gcc do this.
10894
10895 1999-01-21 Andrew Haley <aph@cygnus.com>
10896
10897 * typeck.c (convert_ieee_real_to_integer): New function.
10898 (convert): When not using fast-math and using hardware fp, convert
10899 an IEEE NaN to zero.
10900
10901 1999-01-18 Andrew Haley <aph@cygnus.com>
10902
10903 * parse.y (patch_binop): Do a type conversion from signed to
10904 unsigned and then back to signed when a ">>>" is found.
10905
10906 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10907
10908 * java-tree.h: (check_for_initialization): Added prototype.
10909 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
10910 * parse.y (do_resolve_class): Removed unused locals.
10911 (read_import_dir): Likewise.
10912 (resolve_qualified_expression_name): Array creation
10913 expressions are valid primary expressions.
10914 (qualify_ambiguous_name): Likewise.
10915 (patch_synchronized_statement): Removed unused local.
10916
10917 1999-01-17 Jeffrey A Law (law@cygnus.com)
10918
10919 * Makefile.in (zextract.o): Add dependencies.
10920
10921 * Makefile.in: Do not put ^Ls at the start of a line.
10922
10923 1999-01-15 Per Bothner <bothner@cygnus.com>
10924
10925 * expr.c (process_jvm_instruction): Coerce to correct Throwable
10926 sub-type the result of the call that gets the exception value.
10927
10928 * parse.y (java_complete_expand_methods): If flags_syntax_only,
10929 don't call finish_class.
10930
10931 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
10932 clear found before continuing.
10933
10934 * verify.c (verify_jvm_instructions): On an array load, allow
10935 and handle top of stack to be TYPE_NULL.
10936
10937 * gjavah.c (generate_access): Translate Java package private or
10938 protected access to C++ public, but with a comment.
10939
10940 1999-01-13 Andrew Haley <aph@cygnus.com>
10941
10942 * expr.c (generate_name): Name prefix changed to avoid clashes
10943 with assembler temp labels.
10944
10945 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
10946 MODIFY_EXPR. Without this, code for the assignment may not be
10947 generated at all and the synchronized statement will read an
10948 uninitialized variable.
10949
10950 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10951
10952 * class.c (maybe_layout_super_class): Fixed returned value.
10953 * lex.c: Added 1999 to the copyright.
10954 (java_init_lex): Initialize java_lang_imported.
10955 * lex.h: Added 1999 to the copyright.
10956 * parse.h: Added 1999 to the copyright.
10957 (REGISTER_IMPORT): Fixed typo in trailing macro.
10958 (CURRENT_OSB): New macro.
10959 (struct parser_ctxt): New fields osb_depth, osb_limit.
10960 * parse.y (java_lang_id): New global variable.
10961 (type_import_on_demand_declaration): Don't import java.lang.* twice.
10962 (array_creation_expression:): Use CURRENT_OSB.
10963 (dims:): Uses a stack to keep track of array dimensions.
10964 (cast_expression:): Use CURRENT_OSB.
10965 (find_expr_with_wfl): Return NULL if node found doesn't meet the
10966 conditions.
10967 (register_fields): Fixed typos in comment.
10968 (check_method_redefinition): Fixed comment indentation.
10969 (java_check_regular_methods): Set saved found wfl to NULL after
10970 having reinstalled it in the previously found DECL_NAME.
10971
10972 1999-01-10 Richard Henderson <rth@cygnus.com>
10973
10974 * gjavah.c (java_float_finite): Use a union to do type punning.
10975 (java_double_finite): Likewise.
10976
10977 1999-01-09 Per Bothner <bothner@cygnus.com>
10978
10979 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
10980 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
10981 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
10982 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
10983 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
10984 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
10985
10986 1999-01-08 Per Bothner <bothner@cygnus.com>
10987
10988 * check-init.c (check_init): If compiling to native, we don't
10989 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
10990
10991 1999-01-08 Tom Tromey <tromey@cygnus.com>
10992
10993 * parse-scan.y (variable_declarator_id): Set or increment
10994 bracket_count.
10995 (bracket_count): New global.
10996 (formal_parameter): Handle case where bracket pairs trail variable
10997 declarator id.
10998
10999 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
11000
11001 * jcf-parse.c (yyparse): variable len changed from a char to an
11002 int to prevent overflow.
11003
11004 1999-01-06 Per Bothner <bothner@cygnus.com>
11005
11006 * java-tree.h: Declare read_class.
11007 * jcf-parse.c (read_class): New function.
11008 (load_class): Now just call read_class.
11009
11010 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
11011 * jcf-parse.c (parse_source_file): Declare save_error_count,
11012 which is needed by java_parse_abort_on_error macro,
11013 * parse.y (java_layout_classes, java_expand_classes): Likewise.
11014
11015 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
11016 constructor, if initializing a static field.
11017 (patch_new_array_init): Set TREE_CONSTANT if it is.
11018 * expr.c (java_lang_expand_expr): For a static array constructor
11019 of primitive elements, allocate the array itself statically.
11020 Disabled until we can set the vtable field statically.
11021
11022 * check-init.c: New file. Checks for definite assignment.
11023 * Makefile.in (JAVA_OBJS): Add check-init.o.
11024 * parse.y (java_complete_expand_method): Call check_for_initialization.
11025 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
11026
11027 1999-01-06 Graham <grahams@rcp.co.uk>
11028
11029 * parse.y : include system.h instead of including
11030 standard headers directly with the exception of <dirent.h>.
11031
11032 1999-01-06 Per Bothner <bothner@cygnus.com>
11033
11034 * lex.h: Moved static function declarations to lex.c,
11035 to shut up some -Wall warnings.
11036 * lex.c: Static function declarations moved here.
11037 * jcf-dump.c: Small fixes to shut up -Wall warnings.
11038
11039 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11040
11041 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
11042
11043 1998-12-22 Per Bothner <bothner@cygnus.com>
11044
11045 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
11046 * verify.c (verify_jvm_instructions): Fix off-by-one error.
11047
11048 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
11049 (localvar_alloc): Change return type to void,
11050 (emit_unop): Remove unused variable size.
11051
11052 * jcf-write.c (struct jcf_block): Add new union.
11053 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
11054 (call_cleanups): New functions.
11055 (struct jcf_partial): New fields num_finalizers and return_value_decl.
11056 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
11057 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
11058 * lang.c (lang_init): Call using_eh_for_cleanups.
11059 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
11060 completing operands to patch_synchronized_statement.
11061 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
11062 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
11063 WITH_CLEANUP_EXPR instead of TRY_EXPR.
11064
11065 1998-12-20 John F. Carr <jfc@mit.edu>
11066
11067 * Make-lang.in: Comment out control-Ls; they upset some makes.
11068
11069 1998-12-18 Tom Tromey <tromey@cygnus.com>
11070
11071 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
11072 consistently.
11073
11074 1998-12-17 Tom Tromey <tromey@cygnus.com>
11075
11076 * parse.y (DIR_SEPARATOR): New define.
11077 (check_class_interface_creation): Use it.
11078
11079 * parse-scan.y (report_main_declaration): Recognize
11080 `java.lang.String' in argument to main.
11081
11082 1998-12-16 Per Bothner <bothner@cygnus.com>
11083
11084 * parse.y (create_interface): Remove bogus test.
11085
11086 1998-12-16 Per Bothner <bothner@cygnus.com>
11087
11088 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
11089 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
11090
11091 1998-12-16 Tom Tromey <tromey@cygnus.com>
11092
11093 * parse-scan.y (qualified_name): Use correct sprintf format.
11094
11095 1998-12-15 Tom Tromey <tromey@cygnus.com>
11096
11097 * gjavah.c (print_field_info): Changed how most negative number is
11098 printed.
11099
11100 1998-12-14 Per Bothner <bothner@cygnus.com>
11101
11102 * parse.y (fold_constant_for_init): New function.
11103 (resolve_expression_name): Don't replace static final
11104 constant-initialized fields by its value.
11105 (java_complete_lhs): New. Same as java_complete_tree, except does
11106 not replace static final constant-initialized fields by their values.
11107 (register_fields): If there is an initializer, set DECL_INITIAL and
11108 MODIFY_EXPR_FROM_INITIALIZATION_P.
11109 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
11110 Only call patch_initialized_static_field if
11111 MODIFY_EXPR_FROM_INITIALIZATION_P.
11112 (patch_initialized_static_field): If not valid constant, clear
11113 DECL_INITIAL.
11114
11115 * parse.y (lookup_field_wrapper): Fix thinko.
11116
11117 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
11118 set and restore global lineno.
11119
11120 1998-12-14 Tom Tromey <tromey@cygnus.com>
11121
11122 * gjavah.c (print_field_info): If value to print is the smallest
11123 value of its size, then print as hex to avoid later warnings from
11124 C++ compiler.
11125
11126 1998-12-14 Tom Tromey <tromey@cygnus.com>
11127
11128 * gjavah.c (decompile_method): Decompile `return null'.
11129 (process_file): Generate `#pragma interface'.
11130 (method_declared): New global.
11131 (print_method_info): Set it.
11132 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
11133 (print_method_info): Handle abstract methods.
11134
11135 1998-12-13 Per Bothner <bothner@cygnus.com>
11136
11137 * parse.y (patch_method_invocation): If class_decl is null
11138 (e.g. an array type), use original type.
11139
11140 * parse.y (check_thrown_exceptions): Temporary hack to suppress
11141 errors about uncaught exception from clone (of array, specifically).
11142
11143 1998-12-13 Tom Tromey <tromey@cygnus.com>
11144
11145 * gjavah.c (decompile_method): Handle all types of `return'
11146 opcode. Decompile `return this' and `return'.
11147 (method_access): New global.
11148 (print_method_info): Set it.
11149 (decompile_method): Don't decompile a synchronized method.
11150
11151 1998-12-13 Tom Tromey <tromey@cygnus.com>
11152
11153 * jcf-reader.c (jcf_parse_one_method): Recognize
11154 HANDLE_END_METHOD.
11155 * gjavah.c (HANDLE_END_METHOD): New macro.
11156 (HANDLE_CODE_ATTRIBUTE): New macro.
11157 (decompile_method): New function.
11158 (print_method_info): Don't print `;\n' at end of function decl.
11159 Include java-opcodes.h.
11160 (decompiled): New global.
11161
11162 1998-12-12 Per Bothner <bothner@cygnus.com>
11163
11164 * class.c (build_class_ref): Handle PRIMTYPE.class if
11165 flag_emit_class_files.
11166 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
11167 if flag_emit_class_files.
11168 * parse.y (java_complete_tree): Pre-liminary support for
11169 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
11170
11171 * parse.y (patch_synchronized_statement): Don't call monitorexit
11172 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
11173
11174 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
11175
11176 * zipfile.h (opendir_in_zip): New declaration.
11177 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
11178 (opendir_in_zip): New function, using code from open_in_zip.
11179 (open_in_zip): Call opendir_in_zip.
11180 (find_class): Remove no-longer-used do_class_file parameter,
11181 but add source_ok parameter. Change logic so if we find a .java file,
11182 we don't look for .class in later classpath emtries.
11183 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
11184 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
11185 * gjavah.c: Update call to find_class.
11186 * jcf-dump.c: Likewise.
11187
11188 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
11189 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
11190 nothing if body is empty_stmt_node.
11191 Various little fixes so SP gets correctly adjusted.
11192 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
11193 For CALL_EXPR, test if static first.
11194 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
11195 such as the ones we create for Object and Class.
11196 Set and restore current_function_decl.
11197 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
11198 (note_possible_classname): New function.
11199 (read_import_entry): Removed. Merged with read_import_dir.
11200 (read_import_dir): Don't call find_class - that only gives us
11201 the first classpath entry having the needed package.
11202 Use the struct buffer data structure from buffer.h.
11203 (read_import_dir, find_in_imports_on_demand): The remembered
11204 class names now use '.' (not '/') as package separator.
11205
11206 * parse.y (java_complete_expand_methods): Call write_classfile
11207 here, and not in java_expand_classes (which only gets first class).
11208
11209 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
11210
11211 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
11212 (register_fields): If a static fields has an initializer, just
11213 chain it on ctxp->static_initialized, and handle later.
11214 (java_complete_expand_methods): Force <clinit> first.
11215 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
11216 - it's already been completed.
11217 (patch_initialized_static_field): New function.
11218 (java_complete_field): Call it.
11219
11220 1998-12-12 Per Bothner <bothner@cygnus.com>
11221
11222 * expr.c (encode_newarray_type, build_new_array): New functions.
11223 * java-tree.h: Declare build_new_array.
11224 * jcf-write.c (patch_newarray): Use build_new_array.
11225
11226 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
11227 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
11228
11229 * parse.y (patch_new_array_init): Re-organize.
11230 Now is passed the actual array (pointer) type of the value.
11231 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
11232 (patch_array_constructor): Removed - merged into patch_new_array_init.
11233 (java_complete_tree): Update patch_new_array_init.
11234
11235 * jcf-write.c (find_constant_index): New function.
11236 (generate_bytecode_insns): Use find_constant_index.
11237 (generate_classfile): Use find_constant_index for ConstantValue.
11238
11239 1998-12-11 Tom Tromey <tromey@cygnus.com>
11240
11241 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
11242 * decl.c (init_decl_processing): Renamed dtable -> vtable.
11243 * class.c (make_class_data): Renamed dtable -> vtable, and
11244 dtable_method_count -> vtable_method_count.
11245
11246 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11247
11248 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
11249 global variables, initialized.
11250 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
11251 Declared new global variables.
11252 * lex.c (java_lex): Return long_zero_node, float_zero_node,
11253 double_zero_node, integer_zero_node upon direct matching.
11254 * parse.y (purify_type_name): Added function prototype.
11255 (duplicate_declaration_error_p): Consider new_type as potentially
11256 being a incomplete type. Use purify_type_name on type string.
11257 (method_header): saved_type: unused variable removed. Don't figure
11258 return type if method name is invalid.
11259 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
11260 processed by patch_unaryop.
11261 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
11262 increment/decrement node into its original type after binary
11263 numeric promotion on its operands.
11264
11265 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11266
11267 * parse.y (array_initializer:): Array init operand is NULL_TREE
11268 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
11269 now an error. Fixed indentation problems.
11270 (patch_string): Handle error_mark_node as an argument.
11271 (patch_new_array_init): Fixed indentation problems.
11272 (array_constructor_check_entry): Removed check on null wfl_value.
11273 Return an error if wfl_value's walk returns an error.
11274
11275 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11276
11277 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
11278 * lex.c (java_lex): Remember column position before advancing one
11279 token. Retain location information on OCB_TK.
11280 * lex.h (typedef struct java_lc): Added new field.
11281 * parse.h (GET_SKIP_TYPE): New macro.
11282 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
11283 * parse.y (build_new_array_init, patch_new_array_init,
11284 patch_array_constructor, maybe_build_array_element_wfl,
11285 array_constructor_check_entry): New function prototypes.
11286 (switch_block:): Tagged <node>.
11287 (OCB_TK): Tagged <operator>.
11288 (array_initializer:): Installed actions.
11289 (variable_initializer): Build location information on element if
11290 necessary.
11291 (switch_statement:): Fixed indentation typo.
11292 (switch_block:): Redefined default action.
11293 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
11294 (patch_assignment): Removed duplicate code.
11295 (maybe_build_array_element_wfl, build_new_array_init,
11296 patch_new_array_init, patch_array_constructor,
11297 array_constructor_check_entry): New functions.
11298
11299 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11300
11301 * parse.y (array_initializer): Tagged <node>.
11302 (variable_initializer:): Use default rule.
11303 (array_initializer:): Defined actions.
11304 (variable_initializers:): Likewise.
11305 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
11306 non-static field accesses.
11307 (patch_invoke): Fixed indentation typo.
11308 (java_complete_tree): Likewise.
11309 (build_labeled_block): Changed leading comment. Generate an error
11310 in case of duplicate loop labels.
11311 (patch_conditional_expr): Patch results of string concatenation
11312 operations.
11313
11314 1998-12-06 Per Bothner <bothner@cygnus.com>
11315
11316 * constants.c (find_methodref_index): When the class is an interface,
11317 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
11318
11319 * decl.c (finit_identifier_node): Use "$finit$", rather than
11320 "<finit>" (which Sun's verifier rejects).
11321 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
11322 (generate_field_initialization_code): Removed.
11323 (fix_constructors) Don't add call to $finit$ here (wrong order).
11324 (patch_method_invocation): Add $finit$ call here.
11325
11326 * java-tree.h (CALL_USING_SUPER): New macro.
11327 * parse.y (patch_invoke): Remove im local variable.
11328 (patch_method_invocation, patch_invoke): Don't pass super parameter.
11329 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
11330 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
11331
11332 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
11333
11334 * parse.y (java_complete_tree): Don't complain about unreachable
11335 statement if it is empty_stmt_node.
11336
11337 * jcf-write.c (find_constant_wide): New function.
11338 (push_long_const): Use find_constant_wide.
11339
11340 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
11341 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
11342 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
11343 Emit invokeinterface when calling an interface method.
11344 Emit invokespecial also when calling super or private methods.
11345
11346 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
11347
11348 1998-12-06 Per Bothner <bothner@cygnus.com>
11349
11350 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
11351
11352 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
11353
11354 * java-tree.h (java_layout_seen_class_methods): New function
11355 prototype.
11356 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
11357 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
11358 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
11359 * parse.y (method_declarator:): Defined action.
11360 (issue_warning_error_from_context): input_filename saved, set to
11361 the appropriate value and restored after java_error is called.
11362 (build_unresolved_array_type): Fixed comment.
11363 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
11364 (method_header): Deal with return type the same way type are
11365 handled for fields and method's parameters and local variables
11366 types are handled.
11367 (check_method_redefinition): Removed extra CR.
11368 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
11369 (java_layout_seen_class_methods): New function.
11370 (java_layout_classes): Call java_layout_seen_class_methods.
11371
11372 1998-12-03 Per Bothner <bothner@cygnus.com>
11373
11374 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
11375
11376 1998-12-03 Per Bothner <bothner@cygnus.com>
11377
11378 * jcf-dump.c (main): Fix error message.
11379 * jcf-path.c (add_entry): Style fix.
11380
11381 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
11382
11383 * class.c (layout_class_method): Call build_java_argument_signature
11384 on constructors too.
11385 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
11386 (patch_method_invocation): Define a primary when resolving an
11387 expression name. Augmented comment on code checking illegal `this'
11388 usage. Loosened it test by accepting NEW_CLASS_EXPR.
11389
11390 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11391
11392 * class.c (layout_class_method): Don't report error on non-static
11393 overriding static if the method is private.
11394 * java-tree.h (finish_class): Prototype added.
11395 * lex.c (java_get_line_col): Handle col argument -2 value.
11396 * parse.h: All static method declarations moved to parse.y.
11397 * parse.y: Now contains all static method declarations previously
11398 found in parse.h.
11399 (find_expr_with_wfl, missing_return_error,
11400 unreachable_stmt_error): New functions.
11401 (java_get_real_method_name): Identify constructors bearing class
11402 names in source code compiled classes only.
11403 (java_complete_expand_methods): Call missing_return_error.
11404 (invocation_mode): Private methods invoked as static methods.
11405 (java_complete_tree): Call unreachable_stmt_error.
11406
11407 1998-12-01 Tom Tromey <tromey@cygnus.com>
11408
11409 * Makefile.in (+target): Removed.
11410 (+xmake_file): Likewise.
11411 (+tmake_file): Likewise.
11412 (.NOEXPORT): Removed duplicate.
11413
11414 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11415
11416 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
11417
11418 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
11419
11420 * jvgenmain.c: Remove the xmalloc prototype, we get it from
11421 libiberty.h. Provide an xmalloc definition.
11422
11423 * jvspec.c: Remove the xmalloc prototype.
11424
11425 * parse-scan.y: Include config.h and system.h. Don't include
11426 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
11427 Provide an xstrdup definition.
11428
11429 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
11430
11431 * jcf-path.c (add_entry): Recognize ".jar" too.
11432 * lang-specs.h: Likewise.
11433
11434 1998-11-26 Per Bothner <bothner@cygnus.com>
11435
11436 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
11437 soft_monitorenter_node, soft_monitorexit_node, throw_node.
11438
11439 * jcf-write.c (generate_bytecode_insns):
11440 Handle pre/post-increment/decrement of long.
11441
11442 * jcf-write.c (generate_bytecode_insns):
11443 Handle missing exception handler (finally for synchronized).
11444
11445 1998-11-25 Per Bothner <bothner@cygnus.com>
11446
11447 * java-tree.h (end_params_node): Declare global.
11448 * decl.c (end_params_node): New global.
11449 (init_decl_processing, start_java_method): Use end_params_node for
11450 end of list of parameter types. Follows correct gcc conventions.
11451 * expr.c (pop_argument_types, pop_arguments): Likewise.
11452 * lang.c (put_decl_node): Likewise.
11453 * typeck.c (various places): Likewise.
11454 * class.y (various places): Likewise.
11455 * parse.y (various places): Likewise.
11456
11457 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
11458 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
11459
11460 * class.c: Add #include flags.h, remove no-longer needed declaration.
11461
11462 * class.c (layout_class_method): Remove commented-out code, re-format.
11463 Don't add vtable entry (or index) for private methods.
11464 * expr.c (expand_invoke): A private method is implicitly final.
11465 * class.c (make_class_data): If inlining or optimizing,
11466 skip private methods.
11467
11468 * class.c (finish_class): New function. Calls existing methods,
11469 but alls emits deferred inline functions.
11470 * jcf-parse.c (parse_class_file): Call finish_class.
11471 * parse.y (java_complete_expand_methods): Likewise.
11472
11473 * expr.c (build_java_binop): Explicit default, to silence -Wall.
11474
11475 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
11476
11477 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
11478
11479 * jcf-write.c (generate_bytecode_conditional): Fix typo.
11480
11481 1998-11-24 Per Bothner <bothner@cygnus.com>
11482
11483 * (generate_classfile): Always write class access flag with
11484 ACC_SUPER set.
11485
11486 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11487
11488 * class.c (maybe_layout_super_class): New function.
11489 (layout_class): Reorganized. Loop on class methods dispatched into
11490 a new function. Call maybe_layout_super_class.
11491 (layout_class_methods, layout_class_method): New functions.
11492 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
11493 class.
11494 (expand_invoke): Likewise.
11495 * java-tree.h (all_class_list): New global variable declared.
11496 (layout_class_methods, layout_class_method): New function
11497 prototypes.
11498 (LAYOUT_SEEN_CLASS_METHODS): New macro.
11499 * jcf-parse.c (all_class_list): New global variable.
11500 (load_class): Extended what class_or_name can be. Use parser
11501 context mechanism to save globals before calling jcf_parse.
11502 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
11503 is set on the file name.
11504 (jcf_parse): Layout class methods when Object is loaded, otherwise
11505 record class in all_class_list for delayed method layout.
11506 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
11507 * lang.c (put_decl_node): Decode <init> into the decl context
11508 class name.
11509 * lex.c (java_allocate_new_line): Use xmalloc.
11510 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
11511 pointers, not TREE_LIST elements.
11512 (struct parser_ctxt): Fixed comment indentations, added comments
11513 and reordered some fields.
11514 (java_check_methods): Function prototype removed.
11515 * parse.y (java_push_parser_context): Use xmalloc.
11516 (java_parser_context_restore_global): Pop extra pushed ctxp only
11517 when there's nothing next.
11518 (maybe_create_class_interface_decl): Fixed comment, add new
11519 created class decl to all_class_list.
11520 (method_header): Use GET_REAL_TYPE on argument's types.
11521 (method_declarator): Use GET_REAL_TYPE, change type to the real
11522 type in TREE_LIST dependency node. Build argument list with the
11523 real type.
11524 (create_jdep_list): Use xmalloc. Removed allocation error message.
11525 (obtain_incomplete_type): Fixed leading comment. Broadened
11526 incoming argument meaning.
11527 (register_incomplete_type): Use xmalloc. Removed allocation error
11528 message.
11529 (safe_layout_class): Fixed leading comment.
11530 (jdep_resolve_class): Reversed if statement condition and switch
11531 if and else bodies.
11532 (resolve_and_layout): Fixed leading comment. Broadened incoming
11533 argument meaning.
11534 (complete_class_report_errors): New local variable name, for
11535 clarity. purify_type_name used for all error cases.
11536 (java_get_real_method_name): Stricter check on constructors.
11537 (java_check_regular_methods): Reverse methods list only if not
11538 already laid out. Layout artificial constructor.
11539 (java_check_methods): Deleted.
11540 (source_start_java_method): Obtain incomplete type for patchable
11541 method arguments.
11542 (java_layout_classes): Fixed leading comment. Use
11543 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
11544 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
11545 before returning. Fixed comments.
11546 (java_expand_classes): Check for errors up front.
11547 (patch_method_invocation): Class to search is resolved and laid
11548 out.
11549
11550 1998-11-24 Per Bothner <bothner@cygnus.com>
11551
11552 * expr.c (java_lang_expand_expr): Add missing emit_queue.
11553
11554 * javaop.h (int8): Removed - not used.
11555 (jbyte): Redefine portably with correct signedness.
11556
11557 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
11558
11559 * jcf-write.c (generate_bytecode_insns): Fix typo
11560 OPCODE_getstatic to OPCODE_getfield.
11561
11562 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
11563 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
11564 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
11565
11566 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11567
11568 * jcf-parse.c (jcf_parse_source): Function returned type is
11569 void. Added prototype.
11570 (jcf_parse): Function returned type is void.
11571 (yyparse): Remove call to fclose on the last parsed file.
11572
11573 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
11574
11575 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11576
11577 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
11578 (layout_class): Cope with methods featuring WFL in decl names.
11579 * decl.c (unqualified_object_id_node): New global variable,
11580 initialized.
11581 (build_decl_no_layout): Removed.
11582 * expr.c (build_primtype_type_ref): Handle Double.
11583 (java_lang_expand_expr): Fixed indentations.
11584 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
11585 (flag_wall, flag_redundant, flag_not_overriding,
11586 flag_static_local_jdk1_1, unqualified_object_id_node): Global
11587 variable declarations.
11588 (build_decl_no_layout): Removed prototype.
11589 (java_get_real_method_name): Added prototype.
11590 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
11591 (java_parse_abort_on_error): Macro now just returns.
11592 * jcf-parse.c (jcf_parse_source): Check fclose returned
11593 value. Call emit_register_classes if java_report_errors returns
11594 zero.
11595 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
11596 flag_static_local_jdk1_1): New integer flags.
11597 (lang_decode_option): New flags set here.
11598 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
11599 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
11600 the flag_redundant variable.
11601 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
11602 when parsing java.lang.Object class.
11603 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
11604 NULL_TREE to build.
11605 (resolve_qualified_expression_name): Fixed indentation.
11606 (patch_array_ref): Changed prototype.
11607 (not_initialized_as_it_should_p): Prototype removed.
11608 (java_report_errors): Added function prototype.
11609 * parse.y (formal_parameter:): Changed error message for not yet
11610 supported final parameters.
11611 (class_type_list:): Set both PURPOSE and VALUE of created
11612 TREE_LIST to be class_type.
11613 (primary_no_new_array:): Handle class literals on primitive types.
11614 (parse_warning_context): Reinstalled correct force_error and
11615 do_warning flags setups.
11616 (java_report_errors): Changed prototype. Return java_error_count
11617 value.
11618 (variable_redefinition_error): Consider treating variable type as
11619 a fake pointer.
11620 (create_interface): Warn about redundant abstract modifier if
11621 flag_redundant is set. Changed error message.
11622 (lookup_field_wrapper): Save/restore globals before/after looking
11623 up field.
11624 (duplicate_declaration_error_p): Consider treating declaration
11625 type as a fake pointer.
11626 (register_fields): Extract real type from dependency node. Check
11627 for duplicate field declaration after type adjustment. Use
11628 DECL_INITIAL to store static final initialized values.
11629 (method_header): Extract real function type from dependency node.
11630 (check_abstract_method_header): Use GET_METHOD_NAME.
11631 (obtain_incomplete_type): Layout fake pointer type.
11632 (safe_layout_class): Don't try to check for methods before layout.
11633 (java_complete_class): Don't check for correct throws clause
11634 elements inheritance here.
11635 (resolve_and_layout): Broadened name parameter meaning.
11636 (reset_method_name): Use GET_METHOD_NAME.
11637 (java_get_real_method_name): New function.
11638 (java_check_regular_methods): Don't check methods in
11639 java.lang.Object. Verify lineage of throws clause elements. Use
11640 flag_no_overriding in warning report.
11641 (check_throws_clauses): Don't check if class was from
11642 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
11643 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
11644 (declare_local_variables): Use flag_static_local_jdk1_1 to report
11645 warning on unsupported final local variables. Use build_decl
11646 instead of build_decl_no_layout. Get real local variable type from
11647 dependency node.
11648 (source_start_java_method): Get real parameter type from
11649 dependency node. Call build_decl instead of build_decl_no_layout.
11650 (java_layout_classes): Reverse tree and layout type and class as
11651 required. Mark class as loaded when done.
11652 (resolve_field_access): Fixed indentation. Restricted condition
11653 leading to static field access code generation. Set field_type
11654 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
11655 (resolve_qualified_expression_name): Initialize type_found to
11656 null. Handle static field resolved during qualification. Fixed
11657 layout on non primitive field decl types.
11658 (not_accessible_p): Fixed typo in comment.
11659 (patch_method_invocation): Resolve and layout class to search from
11660 type.
11661 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
11662 layout non primitive type, if necessary. Make method node only to
11663 report errors.
11664 (find_applicable_accessible_methods_list): Consider WFL'ed method
11665 decl names. Fixed indentation.
11666 (argument_types_convertible): Resolve and layout target type if
11667 necessary.
11668 (java_complete_tree): Fixed indentation problems. Rewrote
11669 CALL_EXPR thrown exceptions check. Re-installed further processing
11670 of the assignment in certain cases.
11671 (patch_assignment): Call maybe_build_primttype_type_ref to perform
11672 inlining on class literals.
11673 (valid_builtin_assignconv_identity_widening_p): Cope with constant
11674 0 literal.
11675 (valid_method_invocation_conversion_p): Likewise.
11676 (patch_string): Temporary disable forbidden use of `this' in
11677 explicit constructor invocations when doing string concatenation
11678 within their scope.
11679 (patch_unaryop): Added comment. Reinstalled code to disable
11680 further check on assignment operation with cast expression RHS.
11681 (patch_switch_statement): Fixed indentation.
11682 (build_try_statement): Call build_decl instead of
11683 build_decl_no_layout.
11684 (patch_synchronized_statement): Likewise.
11685 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
11686 IS_UNCHECKED_EXPRESSION_P.
11687 (check_thrown_exceptions_do): Changed leading comment. Resolve and
11688 layout argument exception type.
11689 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
11690 of IS_UNCHECKED_EXPRESSION_P.
11691
11692 1998-11-18 Anthony Green <green@cygnus.com>
11693
11694 * jcf-parse.c (yyparse): Open class file in binary mode.
11695
11696 1998-11-15 Per Bothner <bothner@cygnus.com>
11697
11698 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
11699
11700 * jcf-write.c (perform_relocations): Move check out one loop.
11701
11702 1998-11-15 Anthony Green <green@hoser.cygnus.com>
11703
11704 * Make-lang.in: Fix reference to srcdir.
11705 * jv-scan.c: Add missing xmalloc prototype.
11706 * jvgenmain.c: Ditto.
11707
11708 1998-11-15 Per Bothner <bothner@cygnus.com>
11709
11710 * decl.c (error_mark_node), java-tree.h: New global.
11711 * parse.y: Use empty_stmt_node instead of size_zero_node.
11712 (build_if_else_statement): If missing else, use empty_stmt_node.
11713
11714 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
11715 (java_complete_expand_method): Complain if return is missing.
11716 (java_check_regular_methods): Comment out incorrect error check.
11717 (not_accessible_p): Fix incorrect handling of protected methods.
11718 (patch_method_invocation): Pass correct context to not_accessible_p.
11719 (find_applicable_accessible_methods_list): Likewise.
11720 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
11721 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
11722 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
11723 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
11724
11725 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
11726 (push_int_const): Remove reundant NOTE_PUSH.
11727 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
11728 (- case SWITCH_EXPR): Fix code generation bug.
11729 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
11730 (generate_classfile): More robust for abstract methods.
11731
11732 1998-11-15 Anthony Green <green@cygnus.com>
11733
11734 * Makefile.in: jv-scan and jvgenmain all require libiberty.
11735 * Make-lang.in: Ditto.
11736
11737 * jv-scan.c: Remove xmalloc and xstrdup definitions.
11738 * jvgenmain: Ditto.
11739
11740 1998-11-15 Per Bothner <bothner@cygnus.com>
11741
11742 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
11743
11744 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
11745
11746 1998-11-14 Per Bothner <bothner@cygnus.com>
11747
11748 Allow uses of interface types to verify. This is not really
11749 type-safe, but it matches what Sun does, and is OK as long as
11750 there are appropriate run-time checks.
11751 * verify.c (merge_types): If merging two interface types,
11752 just set the result to java.lang.Object.
11753 * expr.c (pop_type): Any interface is matches by java.lang.Object.
11754
11755 1998-11-13 Tom Tromey <tromey@cygnus.com>
11756
11757 * gjavah.c (main): Handle --output-class-directory argument.
11758 * jvspec.c (lang_specific_driver): Translate `-d' into
11759 -foutput-class-dir.
11760 * jcf.h (jcf_write_base_directory): Declare.
11761 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
11762 * lang-options.h: Mention -foutput-class-dir.
11763 * jcf-write.c (jcf_write_base_directory): New global.
11764 (make_class_file_name): Put generated .class file into `-d'
11765 directory, or into source directory if -d not given. Function now
11766 static.
11767 (write_classfile): Free class file name. Handle case where class
11768 file name is NULL.
11769 (DIR_SEPARATOR): New macro.
11770 Include <sys/stat.h>
11771
11772 * Makefile.in (prefix): New macro.
11773
11774 1998-11-12 Per Bothner <bothner@cygnus.com>
11775
11776 * parse.y (patch_invoke): Do less if flag_emit_class_files.
11777 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
11778 here (done in patch_invoke instead).
11779 (case_identity): Moved here from parse.y.
11780
11781 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
11782 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
11783 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
11784 so they can be efficiently scanned without recursion.
11785 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
11786 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
11787 in BLOCK iteratively, rather than recursively.
11788
11789 * parse.y (do_unary_numeric_promotion): New function.
11790 (patch_unaryop, patch_binop, patch_array_ref): Use it.
11791
11792 * parse.y (patch_newarray): Various fixes.
11793
11794 Re-do handling of switch statements (for proper block scoping).
11795 * parse.y: Add just a single block for the enture switch block,
11796 but don't create any "case blocks".
11797 (group_of_labels): Rmeoved unneeded non-terminal.
11798 CASE_EXPR and DEFAULT_EXPR are added to current block.
11799 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
11800 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
11801 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
11802 * parse.y (wfl_operator, print_int_node): Make non-static.
11803 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
11804 as part of recursive scan of block.
11805 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
11806 (patch_switch_statement): Most tests move dinto java_complete_tree.
11807
11808 * parse.y: Make various production be non-typed (void).
11809 * parse.y (parse_error): Merged into issue_warning_error_from_context.
11810 * parse.y (add_stmt_to_compound): Don't create/change extra node.
11811 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
11812
11813 * jcf-write.c (struct jcf_handler): New type.
11814 (struct jcf_switch_state): New type.
11815 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
11816 (alloc_handler, emit_unop, emit_reloc): New functions.
11817 (adjust_typed_op): Add extra parameter ("max type" offset).
11818 (emit_switch_reloc, emit_case-reloc): New function.
11819 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
11820 (generate_bytecode_insns): Support REAL_CST, switch statements,
11821 exception handling, method calls, object/array creation, and more.
11822
11823 * class.c: Remove some unused variables.
11824 * constants.c (find_string_constant): New function.
11825 (count_constant_pool_bytes): Fix to correctly handle wide constants.
11826 * decl.c (complete_start_java_method): Don't _Jv_InitClass
11827 if flag_emit_class_files.
11828
11829 1998-11-12 Tom Tromey <tromey@cygnus.com>
11830
11831 * jcf-io.c (find_class): Added explanatory comment.
11832
11833 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
11834 trailing slash to `.zip' entries.
11835
11836 * jvspec.c (lang_specific_driver): Correctly handle case where
11837 GC_NAME not defined.
11838
11839 1998-11-11 Tom Tromey <tromey@cygnus.com>
11840
11841 * jvspec.c (GC_NAME): New define.
11842 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
11843 if required.
11844 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
11845
11846 1998-11-11 Per Bothner <bothner@cygnus.com>
11847
11848 * jcf-dump.c (TABLE_SWITCH): Fix typos.
11849
11850 1998-11-11 Tom Tromey <tromey@cygnus.com>
11851
11852 * jcf-dump.c (main): Correctly recognize `--'-style long options.
11853
11854 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11855
11856 * class.c (is_compiled_class): Call safe_layout_class for class
11857 compiled from source.
11858 * conver.h (convert_to_integer, convert_to_real,
11859 convert_to_pointer): Added prototypes.
11860 * decl.c (init_decl_processing): Non longer push the decls of
11861 `methodtable', `constants', `Class', `Field', `dispatchTable'
11862 `jexception' and `Method'.
11863 * expr.c (build_invokeinterface): New function.
11864 (expand_invoke): static variable CLASS_IDENT now in
11865 build_invokeinterface. Use build_invokeinterface.
11866 (expand_java_field_op): Moved code to inline
11867 java.lang.PRIMTYPE.TYPE into a function.
11868 (build_primtype_type_ref): New function.
11869 * java-tree.def (INSTANCEOF_EXPR): New tree code.
11870 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
11871 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
11872 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
11873 (DECL_LOCAL_STATIC_VALUE): New macro.
11874 (build_invokeinterface, build_primtype_type_ref): New function
11875 prototypes.
11876 (java_parse_abort_on_error): Macro rewritten.
11877 * jcf-parse.c (current_method): Add comment to declaration.
11878 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
11879 Function prototypes fixed.
11880 (jcf_parse_source): push/pop parser context. save/restore global.
11881 (parse_source_file): Fixed leading comment. Now take a
11882 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
11883 classes and pop the parser context anymore.
11884 (yyparse): Push parser context, save globals, parse the source
11885 file, restore globals and pop the parser context when processing a
11886 source file.
11887 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
11888 * lex.c (java_parse_doc_section): New function.
11889 (java_lex): Call java_parse_doc_section when appropriate. Build an
11890 operator around INSTANCEOF_TK.
11891 * lex.h (java_lineterminator, java_sprint_unicode,
11892 java_unicode_2_utf8, java_lex_error, java_store_unicode):
11893 Prototypes rewritten.
11894 (java_parse_escape_sequence, java_letter_or_digit_p,
11895 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
11896 java_read_unicode, java_store_unicode, java_read_char,
11897 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
11898 Added function prototypes.
11899 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
11900 define.
11901 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
11902 New macros
11903 (struct parser_ctxt): New fields: deprecated,
11904 current_parsed_class_un, gclass_list.
11905 (fix_method_argument_names, issue_warning_error_from_context,
11906 resolve_package, lookup_package_type): New function prototypes.
11907 (resolve_expression_name): Fixed function prototype.
11908 (find_applicable_accessible_methods_list): Fixed indentation, added
11909 extra argument in prototype.
11910 (check_final_assignment, build_null_of_type, check_deprecation,
11911 check_method_redefinition, reset_method_name,
11912 java_check_regular_methods, java_check_abstract_methods,
11913 maybe_build_primttype_type_ref): New function prototype.
11914 * parse.y (conver.h): Include.
11915 (INSTANCEOF_TK): Tagged <operator>.
11916 (single_type_import_declaration): Use REGISTER_IMPORT macro.
11917 (relational_expression:): Build binop for instanceof.
11918 (java_push_parser_context): Remember ctxp->gclass_list across
11919 contexts.
11920 (java_pop_parser_context): Simply return if no context
11921 exists. Remember gclass_list across contexts.
11922 (issue_warning_error_from_context): New function.
11923 (parse_error_context): Don't setup ctxp->elc here. Call
11924 issue_warning_error_from_context instead.
11925 (parse_warning_context): Likewise.
11926 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
11927 setup. Link new class/interface to ctxp->gclass_list.
11928 (add_superinterfaces): Register interface as incomplete if not
11929 loaded.
11930 (create_class): Remember class unqualified name in
11931 ctxp->current_parsed_class_un. Check class deprecation.
11932 (register_fields): Check field deprecation. Remember static final
11933 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
11934 processing INIT.
11935 (method_header): New local variable ORIG_ARG. Use unqualified
11936 current class name for check on constructor errors. Promote return
11937 type if of record type. Argument list fix moved in
11938 fix_method_argument_names, called here. Check method deprecation.
11939 (fix_method_argument_names): New function.
11940 (method_declarator): Promote record typed arguments.
11941 (safe_layout_class): Check class methods before layout.
11942 (java_complete_class): Compute field layout when patched.
11943 (do_resolve_class): Try to load class after having it renamed
11944 after the package name.
11945 (get_printable_method_name): Use DECL_CONTEXT.
11946 (reset_method_name): New function.
11947 (check_method_redefinition): Use reset_method_name.
11948 (java_check_regular_methods): New local variable
11949 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
11950 names for error report. Check for compile-time error when method
11951 found has default (package) access.
11952 (java_check_abstract_methods): Now takes an interface DECL node as
11953 an argument. Also reinstall real name on unchecked
11954 overriding/hiding methods for error report.
11955 (java_check_methods): Fixed leading comment. Get classes to verify
11956 from ctxp->gclass_list. Use CHECK_METHODS macro and set
11957 CLASS_METHOD_CHECKED_P on class verification.
11958 (lookup_java_method2): Get real method name if necessary.
11959 (find_in_imports): Don't check package class access here.
11960 (resolve_package, lookup_package_type): New functions.
11961 (java_layout_classes): Fixed leading comment. Take classes to be
11962 laid out from ctxp->gclass_list.
11963 (java_complete_expand_methods): Don't expand native and abstract
11964 methods.
11965 (java_expand_classes): New function.
11966 (resolve_expression_name): Use additional argument ORIG. Retrieve
11967 values of static final field of primitive types.
11968 (resolve_field_access): Handles static final field of promotive
11969 type.
11970 (resolve_qualified_expression_name): Handle STRING_CST as
11971 primaries and package name resolution. Check deprecation on found
11972 decls. Set where_found and type_found on non static field resolved
11973 during qualification. Layout non primitive field decl types.
11974 (check_deprecation): New function.
11975 (maybe_access_field): Simplified.
11976 (patch_method_invocation_stmt): Local variable CLASS_TYPE
11977 removed. Reverse method's argument when primary is a type. Don't
11978 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
11979 instead. Include abstract class in the list of class searchable
11980 for constructors. Use DECL_CONTEXT of found method for access
11981 checks. Check method deprecation.
11982 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
11983 converting arguments. Handle INVOKE_INTERFACE.
11984 (lookup_method_invoke): Search constructor using existing
11985 infrastructure (don't rely on lookup_java_constructor anymore).
11986 (find_applicable_accessible_methods_list): Extra argument flag
11987 LC. Now include constructor in the search.
11988 (qualify_ambiguous_name): Conditional expression are primaries.
11989 (not_initialized_as_it_should_p): static final are always
11990 initialized.
11991 (java_complete_tree): Pass extra NULL argument to
11992 resolve_expression_name. Stricter test to carry on patching
11993 assignments. New case for INSTANCEOF_EXPR.
11994 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
11995 (check_final_assignment, maybe_build_primttype_type_ref): New
11996 functions.
11997 (patch_assignment): Detect resolved static finals and carry normal
11998 assignment error check on them. Inline PRIMTYPE.TYPE read access.
11999 (try_builtin_assignconv): Access constant 0 on all primitive
12000 types.
12001 (valid_builtin_assignconv_identity_widening_p): Accept identical
12002 types. Accept all promoted type on int type.
12003 (valid_ref_assignconv_cast_p): Accept a null pointer to be
12004 assigned to a reference.
12005 (valid_method_invocation_conversion_p): Accept to check null
12006 pointers.
12007 (build_binop): Merge declaration and initialization of local
12008 variable BINOP.
12009 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
12010 numeric types. Improved validity test for qualify operators on
12011 references.
12012 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
12013 and PREINCREMENT_EXPR. Also detect resolved static finals of a
12014 primitive type and issue the appropriate error message.
12015 (resolve_type_during_patch): Mark class loaded when resolved.
12016 (patch_cast): Allow null to be cased to reference types.
12017 (build_null_of_type): New function.
12018 (patch_array_ref): Handle array on references correctly.
12019 (patch_return): Removed unused local variable MODIFY. Force
12020 boolean to be returned as integers. Allows null to be returned by
12021 a function returning a reference.
12022 * typeck.c (convert_to_integer, convert_to_real,
12023 convert_to_pointer): Prototypes moved to convert.h
12024 (lookup_argument_method): Use method real name, if necessary.
12025
12026 1998-10-30 Tom Tromey <tromey@cygnus.com>
12027
12028 * class.c (build_class_ref): Changed name of primitive classes to
12029 start with `_Jv_'.
12030
12031 * class.c (make_class_data): Renamed fields: nmethods to
12032 method_count, method_count to dtable_method_count. Always set
12033 `state' field to 0.
12034 * decl.c (init_decl_processing): Likewise.
12035
12036 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12037
12038 * class.c (layout_class): Don't mangle <finit>, produce
12039 __finit<class> instead. Don't verify artificial methods.
12040 * decl.c (finit_identifier_node): New declared global.
12041 (init_decl_processing): finit_identifier_node initialized.
12042 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
12043 * java-tree.h (finit_identifier_node): Declared as extern.
12044 (struct lang_decl): New field called_constructor.
12045 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
12046 (CLASS_HAS_FINIT_P): New macro.
12047 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
12048 explicit constructor invocation.
12049 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
12050 CALL_SUPER_CONSTRUCTOR_P): New macros.
12051 (write_classfile): Added prototype.
12052 * jcf-parse.c (jcf_parse_source): Parse and remember for
12053 generation if the file was seen on the command line.
12054 (parse_source_file): Don't write the class file here.
12055 (yyparse): Loop on files rewritten. Set current_jcf.
12056 (parse_zip_file_entries): Parse class file only if it was found.
12057 * lang.c (init_parse): Don't open command line provided filename
12058 here.
12059 (lang_parse): Don't set main_jcf anymore.
12060 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
12061 (JCONSTRUCTOR_CHECK): New macro.
12062 (JBSC_TYPE_P): New macro.
12063 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
12064 (COMPLETE_CHECK_OP_2): New macro.
12065 (struct parse_ctxt): New field explicit_constructor_p.
12066 (check_class_interface_creation): Fixed prototype indentation.
12067 (patch_method_invocation_stmt): Prototype reflects added argument.
12068 (patch_invoke): Likewise.
12069 (complete_method_declaration, build_super_invocation,
12070 verify_constructor_circularity,
12071 build_this_super_qualified_invocation, get_printable_method_name,
12072 patch_conditional_expr, maybe_generate_finit, fix_constructors,
12073 verify_constructor_super, create_artificial_method,
12074 start_artificial_method_body, end_artificial_method_body,
12075 generate_field_initialization_code): New function prototypes.
12076 * parse.y: Fixed leading comment
12077 (constructor_header:, constructor_body:, block_end:): Rules tagged
12078 <node>.
12079 (type_declaration:): Call maybe_generate_finit.
12080 (method_declaration:): Action for method_body: placed in new
12081 function complete_method_declaration, called here.
12082 (constructor_declaration:): Defined actions. Removed leading
12083 FIXME.
12084 (constructor_header:): New rule with action.
12085 (constructor_body:): Rule rewritten using block_begin: and
12086 block_end:. Defined actions.
12087 (constructor_declarator:, explicit_constructor_invocation:):
12088 Defined actions.
12089 (block:): Use new rules block_begin: block_end:.
12090 (block_begin:, block_end:): New rules and actions.
12091 (block_statements:): Fixed error message for explicit
12092 constructors.
12093 (method_invocation:): Call build_this_super_qualified_invocation
12094 if primary is `this' or `super' was seen.
12095 (conditional_expression:): Action defined.
12096 (extra_ctxp_pushed_p): New static global flag.
12097 (java_parser_context_save_global): Create parser context if
12098 necessary. Use extra_ctxp_pushed_p to remember it.
12099 (java_parser_context_restore_global): Pop extra parser context if
12100 one exists.
12101 (build_array_from_name): Array on primitive types are marked
12102 loaded.
12103 (register_fields): Restore new name in field initializer
12104 expression if type was altered. Non static fields initialized upon
12105 declaration marked initialized.
12106 (maybe_generate_finit): New function.
12107 (maybe_generate_clinit): Use create_artificial_method,
12108 start_artificial_method_body, end_artificial_method_body. Generate
12109 debug info for enclosed initialization statements.
12110 (method_header): Fixed leading comment. Check constructor
12111 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
12112 accordingly.
12113 (complete_method_declaration, constructor_circularity_msg,
12114 verify_constructor_circularity): New functions.
12115 (get_printable_method_name): New function.
12116 (check_method_redefinition): Don't rename <finit> methods. Fix
12117 declared constructor names. Error message for
12118 constructors modified.
12119 (java_check_regular_methods): Local variable seen_constructor
12120 renamed saw_constructor. Skip verification on constructors. Create
12121 default constructor with create_artificial_method.
12122 (java_check_methods): Removed unnecessary empty line.
12123 (create_artificial_method, start_artificial_method_body,
12124 end_artificial_method_body): New functions.
12125 (java_layout_classes): Changed leading comment. Reverse fields
12126 list if necessary. Always layout java.lang.Object if being
12127 defined.
12128 (java_complete_expand_methods): Verify constructor circularity.
12129 (java_complete_expand_method): Call fix_constructor on
12130 constructors. Local variable no_ac_found removed. Restore
12131 bindings if method body expansion failed.
12132 (fix_constructors, verify_constructor_super,
12133 generate_field_initialization_code): New function.
12134 (java_expand_classes): Fixed leading comment. Write class file
12135 here.
12136 (resolve_expression_name): Check for illegal instance variable
12137 usage within the argument scope of an explicit constructor
12138 invocation.
12139 (resolve_qualified_expression_name): Pass extra from_super flag
12140 when invoking patch_method_invocation_stmt. New case for
12141 conditional expression when used as a primary. Check for error
12142 when acquiring super.
12143 (patch_method_invocation_stmt): Added extra argument super. New
12144 local variable is_static_flag. Set class_to_search according to
12145 the nature of the constructor invocation. Don't add `this'
12146 argument when expanding NEW_CLASS_EXPR. Check for illegal method
12147 invocation within the argument scope of explicit constructor
12148 invocation. Set is_static according to is_static_flag. Provide
12149 extra `super' argument to patch_invoke invocation.
12150 (patch_invoke): New argument from_super. Loop on arguments
12151 indentation fixed. Pass from_super to invocation_mode. New switch
12152 case INVOKE_SUPER. Fixed error message in switch default case.
12153 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
12154 value.
12155 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
12156 (lookup_method_invoke): Fixed prototypes in candidates list. Error
12157 message takes constructors into account.
12158 (find_applicable_accessible_methods_list): Fixed indentation.
12159 (qualify_ambiguous_name): Take explicit constructor invocation
12160 into account. Deal with a conditional expression as a primary to
12161 a method call.
12162 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
12163 case. Added extra argument to patch_method_invocation_stmt.
12164 Register calls made to explicit constructor `this'. Don't call
12165 save_expr in ARRAY_REF case when emitting class files. Check for
12166 illegal use of this when expanding explicit constructor invocation
12167 arguments.
12168 (complete_function_arguments): Set and reset parser context
12169 explicit_constructor_p field value when appropriate.
12170 (build_super_invocation, build_this_super_qualified_invocation):
12171 New functions.
12172 (patch_assignment): Fixed typo.
12173 (patch_unaryop): Check on final fields occurs only when a decl
12174 exits.
12175 (patch_return): Take constructors into account.
12176 (patch_conditional_expr): New function.
12177 * typeck.c (build_java_signature): Removed unnecessary empty line.
12178
12179 1998-10-28 Jeffrey A Law (law@cygnus.com)
12180
12181 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
12182
12183 1998-10-28 Tom Tromey <tromey@cygnus.com>
12184
12185 * decl.c (init_decl_processing): Renamed fields.
12186 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
12187 interface_len, msize fields.
12188
12189 * class.c (make_class_data): Removed subclass_head and
12190 subclass_next fields.
12191 * decl.c (init_decl_processing): Removed subclass_head and
12192 subclass_next fields.
12193
12194 1998-10-28 Jeffrey A Law (law@cygnus.com)
12195
12196 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
12197 * mangle.c (emit_unicode_mangled_name): Similarly.
12198
12199 1998-10-26 Nick Clifton <nickc@cygnus.com>
12200
12201 * jcf-parse.c (get_constant): Place braces around code to compute
12202 'd' when REAL_ARITHMETIC is not defined.
12203
12204 1998-10-25 H.J. Lu (hjl@gnu.org)
12205
12206 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
12207 dependency.
12208
12209 1998-10-23 Tom Tromey <tromey@cygnus.com>
12210
12211 * lang-specs.h: `.zip' files are input to jc1.
12212
12213 1998-10-22 Per Bothner <bothner@cygnus.com>
12214
12215 * jvspecs.c: Add (but don't enable) support for combining multiple
12216 .class and .java input filenames to a single jc1 invocation.
12217 Add support for -C flag (copile to .class files).
12218 Translate -classpath and -CLASSPATH arguments.
12219 * lang-specs.h: Don't set %2 spec.
12220
12221 1998-10-22 Tom Tromey <tromey@cygnus.com>
12222
12223 * jcf-path.c (add_entry): Don't add trailing separator if entry is
12224 a .zip file.
12225 (add_path): Don't add trailing separator to non-empty path
12226 elements.
12227
12228 * lang.c (lang_decode_option): Check for -fclasspath and
12229 -fCLASSPATH before examining other `-f' options.
12230
12231 * java-tree.h (finalize_identifier_node): Don't declare.
12232 * class.c (make_class_data): Don't push "final" field.
12233 * decl.c (init_decl_processing): Don't push "final" field.
12234 (finalize_identifier_node): Removed.
12235 (init_decl_processing): Don't set finalize_identifier_node.
12236
12237 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
12238
12239 1998-10-11 Anthony Green <green@cygnus.com>
12240
12241 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
12242 (JV_SCAN_SOURCES): New macro.
12243 (JCF_DUMP_SOURCES): Likewise.
12244 (jcf-dump$(exeext)): New target.
12245 (jv-scan$(exeext)): New target.
12246
12247 1998-10-22 Tom Tromey <tromey@cygnus.com>
12248
12249 * Makefile.in (LEX): Removed.
12250 (LEXFLAGS): Likewise.
12251 (SET_BISON): New macro.
12252 (BISON): Removed.
12253 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
12254 spurious diffs in parse.c.
12255 ($(PARSE_SCAN_C)): Likewise.
12256 (PARSE_DIR): New macro.
12257 (PARSE_C): Use it.
12258 (PARSE_SCAN_C): Likewise.
12259 (PARSE_RELDIR): New macro.
12260
12261 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
12262
12263 * jcf-io.c (find_class): Use saw_java_source to determine when to
12264 look for `.java' file.
12265 * jcf-parse.c (saw_java_source): New global.
12266 (yyparse): Set it if `.java' file seen.
12267
12268 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
12269 (GCJH_SOURCES): Likewise.
12270 * Makefile.in (datadir): New macro.
12271 (libjava_zip): Likewise.
12272 (JAVA_OBJS): Added jcf-path.o.
12273 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
12274 (../gcjh$(exeext)): Likewise.
12275 (jcf-path.o): New target.
12276 * java-tree.h (fix_classpath): Removed decl.
12277 * jcf-parse.c (fix_classpath): Removed.
12278 (load_class): Don't call fix_classpath.
12279 * parse.y (read_import_dir): Don't call fix_classpath.
12280 * lex.h: Don't mention classpath.
12281 * lex.c (java_init_lex): Don't initialize classpath.
12282 * jcf-io.c (classpath): Removed global.
12283 (find_class): Use jcf_path iteration functions. Correctly search
12284 class path for .java file.
12285 (open_in_zip): New argument `is_system'.
12286 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
12287 classpath-related options.
12288 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
12289 and -I.
12290 (lang_init): Call jcf_path_init.
12291 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
12292 * lang-specs.h: Handle -I. Minor cleanup to -M options.
12293 Correctly put braces around second string in each entry.
12294 * gjavah.c (main): Call jcf_path_init. Recognize all the new
12295 classpath-related options.
12296 (help): Updated for new options.
12297 * jcf.h: Declare functions from jcf-path.c. Don't mention
12298 `classpath' global.
12299 * jcf-path.c: New file.
12300
12301 * jcf-depend.c: Include jcf.h.
12302
12303 * jcf-write.c (localvar_alloc): Returns `void'.
12304 (localvar_free): Removed unused variable.
12305
12306 * lang.c (OBJECT_SUFFIX): Define if not already defined.
12307 (init_parse): Use OBJECT_SUFFIX, not ".o".
12308
12309 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12310
12311 * class.c (emit_register_classes): Renamed from
12312 emit_register_class.
12313 * java-tree.h (emit_register_classes): Prototype renamed from
12314 emit_register_class.
12315 * jcf-parse.c (yyparse): Call emit_register_classes once before
12316 returning.
12317 * parse.y (java_expand_classes): No longer register classes.
12318
12319 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12320
12321 * class.c (is_compiled_class): New local variable
12322 seen_in_zip. Identify classes found in currently compiled source
12323 file(s).
12324 * decl.c (complete_start_java_method): Fixed typo.
12325 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
12326 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
12327 (CLASS_P): Moved around.
12328 (java_parse_abort_on_error): Macro moved from jcf-parse.c
12329 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
12330 java-parse.h
12331 (jcf_parse_source): Changed leading comment. Removed unnecessary
12332 fclose and CLASS_FROM_SOURCE_P marking.
12333 (parse_source_file): New local variables remember_for_generation
12334 and filename. Mark parsed file name identifier node. Removed block
12335 executed when parse_only was null. Set remember_for_generation.
12336 Use it as an argument to java_pop_parser_context.
12337 (yyparse): New local variables several_files, list, next node and
12338 current_file_list. Split ampersand separated file names into
12339 current_file_list. Iterate through the list and parse accordingly.
12340 * parse.h (java_pop_parser_context): New function prototype.
12341 * parse.y (ctxp_for_generation): New static global variable.
12342 (java_pop_parser_context): New argument generate. Link popped ctxp
12343 to ctxp_for_generation list accordingly.
12344 (java_complete_expand_methods): Fixed indentation.
12345 (java_expand_classes): New function.
12346
12347 1998-10-17 Per Bothner <bothner@cygnus.com>
12348
12349 * Makefile.in: Link with libiberty.a instead of memmove.o.
12350
12351 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
12352
12353 * lex.c (setjmp.h): No longer included.
12354 * lex.h (setjmp.h): Included.
12355 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
12356 (duplicate_declaration_error_p): Renamed from
12357 duplicate_declaration_error.
12358 (build_array_from_name): New function prototype.
12359 * parse.y (setjmp.h): No longer included.
12360 (variable_declarator_id): Define action.
12361 (build_array_from_name): New function.
12362 (duplicate_declaration_error_p): Renamed from
12363 duplicate_declaration_error. Fixed leading comment.
12364 (register_fields): Main `for' loop reorganized. Uses
12365 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
12366 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
12367 build_array_from_name.
12368 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
12369 types.
12370 (read_import_dir): Don't try to skip `.' and `..'.
12371 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
12372 build_array_from_name. Main `for' loop reorganized.
12373 (resolve_qualified_expression_name): When building access to a
12374 field, use the type where the field was found, not its own type.
12375 (maybe_access_field): Use field DECL_CONTEXT if the type where the
12376 field was found is null.
12377 (qualify_ambiguous_name): Sweep through all successive array
12378 dimensions.
12379
12380 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12381
12382 * java-tree.h (pop_labeled_block, lang_printable_name,
12383 maybe_add_interface, set_super_info, get_access_flags_from_decl,
12384 interface_of_p, inherits_from_p, fix_classpath,
12385 complete_start_java_method, emit_handlers, init_outgoing_cpool,
12386 make_class_data, register_class, alloc_name_constant): New
12387 function prototypes.
12388 * lang.c (lang_decode_option): Set argc argument unused. Fixed
12389 indentation. Added cast to remove warning.
12390 (lang_printable_name): Set v argument unused.
12391 (lang_print_error): Added argument to lang_printable_name call.
12392 (java_dummy_print, print_lang_decl, print_lang_type,
12393 print_lang_identifier, lang_print_xnode): All argument marked
12394 unused.
12395 * lex.c (java_unget_unicode): Removed unnecessary argument.
12396 (java_allocate_new_line): Unused local variable is gone.
12397 (java_read_char): Added parenthesis in expressions to remove
12398 warnings. Added final return statement.
12399 (java_read_unicode): Added parenthesis in expression to remove
12400 warning.
12401 (java_parse_end_comment): Fixed java_unget_unicode invocation.
12402 (java_parse_escape_sequence): Likewise.
12403 (java_lex): Unused local variables are gone. Fixed
12404 java_unget_unicode invocation.
12405 * lex.h (set_float_handler): Prototype added when JC1_LITE not
12406 defined.
12407 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
12408 lang_printable_name invocation in macro.
12409 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
12410 Likewise.
12411 (duplicate_declaration_error): Suppressed unused argument in
12412 prototype.
12413 (identical_subpath_p): Function declaration is gone.
12414 (patch_invoke): Suppressed unused argument in prototype.
12415 (patch_cast, build_labeled_block, check_thrown_exceptions):
12416 Likewise.
12417 * parse.y (setjmp.h): Included
12418 (toplev.h): Likewise.
12419 (field_declaration:): Suppressed unused local
12420 (label_decl:): Fixed build_labeled_block invocation.
12421 (java_pop_parser_context): Put extra parenthesis around assignment
12422 in if.
12423 (yyerror): Suppressed unused local variables.
12424 (variable_redefinition_error): Fixed lang_printable_name
12425 invocation.
12426 (create_interface): Suppressed unused local variables.
12427 (create_class): Likewise.
12428 (duplicate_declaration_error): Suppressed unused argument. Fixed
12429 lang_printable_name invocation.
12430 (register_fields): Suppressed unused local variable. Fixed
12431 duplicate_declaration_error invocation.
12432 (method_header): Suppressed unused local variable.
12433 (method_declarator, parser_check_super): Likewise.
12434 (java_complete_class): Suppressed unused local variable. Fixed
12435 fatal error message.
12436 (complete_class_report_errors): Added default: in switch.
12437 (java_check_regular_methods): Fixed lang_printable_name
12438 invocations.
12439 (check_throws_clauses): Likewise.
12440 (java_check_abstract_methods): Suppressed unused local
12441 variable. Fixed lang_printable_name invocation.
12442 (read_import_entry): Added supplemental return statement.
12443 (read_import_dir): Suppressed unused local variables.
12444 (check_pkg_class_access, declare_local_variables): Likewise.
12445 (source_start_java_method): Suppressed unused extern variable
12446 declarations
12447 (expand_start_java_method): Suppressed unused extern and local
12448 variable declarations.
12449 (java_complete_expand_methods): Likewise.
12450 (java_complete_expand_method): Suppressed unused local variables.
12451 (make_qualified_name): Likewise.
12452 (resolve_qualified_expression_name): Added default: in
12453 switch. Fixed lang_printable_name invocation.
12454 (class_instance_creation_expression): Added parenthesis around
12455 expressions.
12456 (patch_method_invocation_stmt): Fixed lang_printable_name and
12457 patch_invoke invocations.
12458 (check_for_static_method_reference): Fixed lang_printable_name
12459 invocation.
12460 (patch_invoke): Suppressed unused arguments and local variables.
12461 (lookup_method_invoke): Suppressed unused local variables.
12462 (qualify_ambiguous_name): Added default: in switch.
12463 (identical_subpath_p): Function removed.
12464 (patch_assignment): Suppressed unused local variables. Suppressed
12465 unnecessary if statement. Fixed lang_printable_name invocations.
12466 (try_builtin_assignconv): Fixed lang_printable_name invocations.
12467 (valid_ref_assignconv_cast_p): Parenthesis around
12468 expression. Suppressed unused local variables.
12469 (build_binop): Suppressed unused local variables. fixed
12470 lang_printable_name invocations.
12471 (string_constant_concatenation): Suppressed unused local
12472 variables.
12473 (patch_unaryop): Fixed lang_printable_name invocation.
12474 (patch_cast): Suppressed unnecessary argument. Fixed
12475 lang_printable_name invocation.
12476 (patch_array_ref): Fixed lang_printable_name invocation.
12477 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
12478 (build_labeled_block): Suppressed unused argument.
12479 (generate_labeled_block): Fixed build_labeled_block invocation.
12480 (build_loop_body): Suppressed unused local variables.
12481 (patch_loop_statement): Likewise.
12482 (patch_exit): Fixed lang_printable_name invocation.
12483 (patch_switch_statement): Likewise.
12484 (case_identity): First argument marked unused.
12485 (patch_try_statement): Fixed lang_printable_name invocations.
12486 (patch_synchronized_statement, patch_throw_statement): Likewise.
12487 (check_thrown_exceptions): Fixed check_thrown_exceptions and
12488 lang_printable_name invocations.
12489 (check_thrown_exceptions_do): Suppressed unused argument.
12490
12491 1998-10-14 Tom Tromey <tromey@cygnus.com>
12492
12493 * jcf-write.c (write_classfile): Add output class file as target.
12494 * lang-options.h: Added -MD, -MMD, -M, and -MM.
12495 * jcf.h: Added declarations for dependency-tracking functions.
12496 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
12497 * lang.c (lang_decode_option): Recognize -MD and -MMD.
12498 (finish_parse): Call jcf_dependency_write.
12499 (dependency_tracking): New global.
12500 (DEPEND_SET_FILE): New define.
12501 (DEPEND_ENABLE): New define.
12502 (init_parse): Enable dependency tracking if required.
12503 Include "flags.h".
12504 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
12505 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
12506 (../gcjh$(exeext)): Likewise.
12507 (jcf-depend.o): New target.
12508 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
12509 (GCJH_SOURCES): Likewise.
12510 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
12511 dep_name argument.
12512 (find_classfile): Added dep_name argument.
12513 (find_class): Compute name of dependency.
12514 (open_in_zip): Call jcf_dependency_add_file.
12515 * gjavah.c (output_file): No longer global.
12516 (usage): Don't mention "gjavah".
12517 (help): Likewise.
12518 (java_no_argument): Likewise.
12519 (version): Likewise.
12520 (main): Recognize and handle -M family of options.
12521 (print_mangled_classname): Return is void.
12522 (process_file): Handle case where output is suppressed.
12523 (HANDLE_END_FIELD): Likewise.
12524 (HANDLE_METHOD): Likewise.
12525 * jcf-depend.c: New file.
12526
12527 1998-10-13 Jeffrey A Law (law@cygnus.com)
12528
12529 * java-tree.def: Add missing newline at EOF.
12530
12531 1998-10-13 Tom Tromey <tromey@cygnus.com>
12532
12533 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
12534 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
12535 function.
12536 Include <config.h> and "system.h".
12537 (disassemble_method): Undefine RET to avoid clash with
12538 config/i386/i386.h.
12539
12540 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12541
12542 * decl.c (runtime_exception_type_node, error_exception_type_node):
12543 New global variables.
12544 (init_decl_processing): Initialized.
12545 * expr.c (java_lang_expand_expr): Set caught exception type to
12546 null if catch handler argument doesn't exit.
12547 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
12548 tree codes.
12549 * java-tree.h (runtime_exception_type_node,
12550 error_exception_type_node): Global variables declared.
12551 (DECL_FUNCTION_THROWS): New macro.
12552 (DECL_FUNCTION_BODY): Modified comment.
12553 (DECL_SPECIFIC_COUNT): Likewise.
12554 (struct lang_decl): New field throws_list.
12555 (IS_UNCHECKED_EXPRESSION_P): New macro.
12556 * lex.c (java_lex): Generate location information for THROW_TK.
12557 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
12558 EXCEPTIONS_P): New macros.
12559 (enum jdep_code): New value JDEP_EXCEPTION.
12560 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
12561 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
12562 PATCH_METHOD_RETURN_ERROR): New macros.
12563 (patch_method_invocation_stmt): Added new argument to prototype.
12564 (patch_synchronized_statement, patch_throw_statement,
12565 check_thrown_exceptions, check_thrown_exceptions_do,
12566 purge_unchecked_exceptions, check_throws_clauses): New function
12567 prototypes.
12568 * parse.y Fixed typo in keyword section.
12569 (throw:): Rule tagged <node>.
12570 (THROW_TK): Keyword tagged <operator>.
12571 (method_header:): Last argument to call to method_header passed
12572 from throws: rule.
12573 (throws:, class_type_list:, throw_statement:,
12574 synchronized_statement:, synchronized:): Defined actions.
12575 (method_header): New local variable current. Register exceptions
12576 from throws clause.
12577 (java_complete_tree): Complete and verify exceptions from throws
12578 clause.
12579 (complete_class_report_errors): Error message on exceptions not
12580 found
12581 (java_check_regular_methods): Fixed typo. Shortcut on private
12582 overriding methods. Changed error message on method
12583 redefinition. Check for throws clause compatibility.
12584 (check_throws_clauses): New function.
12585 (java_check_abstract_methods): Use DECL_NAME for wfl or current
12586 method. Changed error message on method redefinition.
12587 (currently_caught_type_list): New static variable.
12588 (java_complete_expand_methods): Purge unchecked exceptions from
12589 throws clause list. Call PUSH_EXCEPTIONS before walk and
12590 POP_EXCEPTIONS after.
12591 (resolve_qualified_expression_name): Pass new argument as NULL to
12592 patch_method_invocation_stmt.
12593 (patch_method_invocation_stmt): New argument ref_decl. Invoke
12594 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
12595 argument list when appropriate. Use new argument if non null to
12596 store selected method decl.
12597 (patch_invoke): Convert if necessary args of builtin types before
12598 forming CALL_EXPR. Argument list no longer reversed here.
12599 (invocation_mode): Treat final methods as static methods.
12600 (java_complete_tree): New cases for THROW_EXPR: and
12601 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
12602 function call.
12603 (complete_function_arguments): No more RECORD_TYPE
12604 conversion. Function parameter nodes no longer saved.
12605 (valid_ref_assignconv_cast_p): Avoid handling null type.
12606 (patch_binop): Fixed null constant reference handling.
12607 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
12608 BUILD_THROW macros.
12609 (patch_try_statement): Fixed comments. Record caught types in
12610 list, push the list, expand try block and pop the list.
12611 (patch_synchronized_statement, patch_throw_statement,
12612 check_thrown_exceptions, check_thrown_exceptions_do,
12613 purge_unchecked_exceptions): New functions.
12614 * typeck.c (lookup_argument_method): Allow WFL in place of method
12615 DECL_NAME during method definition check
12616
12617 1998-10-09 Tom Tromey <tromey@cygnus.com>
12618
12619 * gjavah.c (decode_signature_piece): New function.
12620 (print_c_decl): Use it. Added `name_override' argument.
12621 (print_method_info): Use name_override argument to print_c_decl.
12622 (seen_fields): Removed.
12623 (print_field_info): Don't update seen_fields.
12624 (struct method_name): New structure.
12625 (method_name_list): New global.
12626 (print_method_info): Add new method to list of methods.
12627 (name_is_method_p): New function.
12628 (print_field_info): If field name has same name as method, then
12629 change field name.
12630 (process_file): Parse methods before fields.
12631 (field_pass): New global.
12632 (HANDLE_END_FIELD): Take field_pass into account.
12633
12634 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12635
12636 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
12637 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
12638
12639 1998-10-03 Anthony Green <green@cygnus.com>
12640
12641 * jvspec.c: Fix bug in jvgenmain_spec patch.
12642
12643 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12644
12645 * Makefile.in (lang.o:): Install dependency on java-tree.def.
12646 * decl.c (soft_exceptioninfo_call_node): New global variable.
12647 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
12648 takes extra integer argument. soft_exceptioninfo_call_node
12649 initialized.
12650 * except.c (java_set_exception_lang_code): New function
12651 (method_init_exceptions): Called here.
12652 (prepare_eh_table_type): New function.
12653 (expand_end_java_handler): Called here.
12654 * expr.c (build_java_throw_out_of_bounds_exception): Now features
12655 one argument. Modified generation of call to
12656 soft_badarrayindex_node to use new argument.
12657 (build_java_arrayaccess): Pass faulty index value to
12658 build_java_throw_out_of_bounds_exception.
12659 (generate_name): New function.
12660 (java_lang_expand_expr): New local variables node, current,
12661 has_finally_p. Expand TRY_EXPR node.
12662 (process_jvm_instruction): Replace top of the stack with thrown
12663 object reference when entering exception handler.
12664 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
12665 specific tree codes.
12666 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
12667 global.
12668 (DECL_SPECIFIC_COUNT): New macro.
12669 (prepare_eh_table_type, java_set_exception_lang_code,
12670 generate_name): New function declarations.
12671 (match_java_method): Declaration deleted.
12672 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
12673 macros.
12674 * lex.c (TRY_TK, CATCH_TK): Generate location information.
12675 * parse.h (redefinition_error, refine_accessible_methods_list,
12676 can_cast_to_p): Function declaration removed.
12677 (classitf_redefinition_error, variable_redefinition_error,
12678 parse_jdk1_1_error, find_applicable_accessible_methods_list,
12679 find_most_specific_methods_list, argument_types_convertible,
12680 enter_a_block, valid_builtin_assignconv_identity_widening_p,
12681 valid_cast_to_p, valid_method_invocation_conversion_p,
12682 try_reference_assignconv, add_stmt_to_compound,
12683 build_jump_to_finally, build_tree_list, patch_try_statement,
12684 java_get_catch_block): New function declarations.
12685 * parse.y (string_buffer_type): Global variable deleted.
12686 (group_of_labels, catches, catch_clause, catch_clause_parameter,
12687 finally): Rules tagged <node>.
12688 (TRY_TK, CATCH_TK): Token tagged <operator>.
12689 (class_body_declaration:, class_member_declaration:,
12690 formal_parameter:, explicit_constructor_invocation:,
12691 interface_member_declaration:, constant_declaration:,
12692 primary_no_new_array:, class_instance_creation_expression:,
12693 array_creation_expression:): Issue error on unsuported JDK1.1
12694 features.
12695 (try_statement:, catches:, finally:): Define actions.
12696 (catch_clause_parameter): New rule.
12697 (catch_clause:): Use new rule catch_clause_parameter.
12698 (parse_jdk1_1_error): New function.
12699 (redefinition_error): Renamed classitf_redefinition_error.
12700 (variable_redefinition_error): New function.
12701 (check_class_interface_creation): Call
12702 classitf_redefinition_error.
12703 (java_complete_tree): Added error message on JDEP_TYPE: case.
12704 (complete_class_report_errors): Fixed indentation.
12705 (declare_local_variables): Call variable_redefinition_error.
12706 (source_end_java_method): Call java_set_exception_lang_code and
12707 emit_handlers where appropriate.
12708 (java_method_add_stmt): Call add_stmt_to_block.
12709 (add_stmt_to_block): New function.
12710 (lookup_method_invoke): Fixed outside comment. new local variable
12711 candicates. Call find_applicable_accessible_methods_list and
12712 find_most_specific_methods_list when searching for a
12713 method. Modified error report to list possible candidates when
12714 applicable.
12715 (find_applicable_accessible_methods_list,
12716 find_most_specific_methods_list, argument_types_convertible): New
12717 function.
12718 (refine_accessible_methods_list): Function deleted.
12719 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
12720 expr (if applicable) before calling patch_array_ref.
12721 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
12722 (enter_block): Fixed comment.
12723 (enter_a_block): New function.
12724 (patch_assignment): Reorganized. Call try_reference_assignconv for
12725 references. Call valid_cast_to_p instead of can_cast_to_p.
12726 (try_reference_assignconv,
12727 valid_builtin_assignconv_identity_widening_p): New functions.
12728 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
12729 (valid_cast_to_p, valid_method_invocation_conversion_p): New
12730 functions.
12731 (build_string_concatenation): Don't resolve StringBuffer.
12732 (patch_cast): Fixed inverted arguments.
12733 (patch_array_ref): Code to save array expr deleted. Call
12734 valid_cast_to_p instead of can_cast_to_p.
12735 (generate_labeled_block): Call generate_name.
12736 (build_jump_to_finally, build_try_statement, java_get_catch_block,
12737 patch_try_statement): New functions.
12738 * typeck.c (match_java_method): Function deleted.
12739
12740 1998-10-02 Anthony Green <green@cygnus.com>
12741
12742 * jvspec.c: jvgenmain_spec uses different temporary file names.
12743
12744 1998-10-02 Anthony Green <green@cygnus.com>
12745
12746 * jvspec.c (lang_specific_driver): Fail if user specifies
12747 --main= when not linking.
12748
12749 1998-09-28 Tom Tromey <tromey@cygnus.com>
12750
12751 * class.c (make_class_data): Push value for `thread' field.
12752 * decl.c (init_decl_processing): Added `thread' field to class.
12753
12754 * class.c (add_field): Always make static fields externally
12755 visible.
12756
12757 1998-09-26 Anthony Green <green@cygnus.com>
12758
12759 * expr.c (build_java_athrow,
12760 build_java_throw_out_of_bounds_exception, expand_invoke,
12761 build_newarray, expand_java_multianewarray, build_java_monitor):
12762 Update comments to reflect _Jv_* function names.
12763
12764 1998-09-25 Per Bothner <bothner@cygnus.com>
12765
12766 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
12767 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
12768 * parse.y (expand_start_java_method): Likewise.
12769
12770 1998-09-24 Per Bothner <bothner@cygnus.com>
12771
12772 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
12773
12774 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
12775 (add_field): No longer need to convert from RECORD_TYPE to pointer,
12776 * expr.c: Remove no-longer-needed calls to promote_type.
12777 * decl.c (give_name_to_locals): Liekwise.
12778 * jcf-parse.c (get_class_constant): Compensate for new signatures.
12779 * parse.y: Add/remove promote_type calls as appropriate.
12780 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
12781 (parse_signature_string): Likewise.
12782 (build_java_array_type): Fix for now signature convenions.
12783
12784 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
12785
12786 1998-09-23 Tom Tromey <tromey@cygnus.com>
12787
12788 * class.c (init_class_processing): libjava function renamed to
12789 _Jv_RegisterClass.
12790
12791 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12792
12793 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
12794 * java-tree.def: Fixed DEFTREECODE third argument.
12795 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
12796 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
12797 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
12798 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
12799 JAVA_THIS_EXPR): Now replaced by tree code definitions.
12800 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
12801 * lang.c (java_tree_code_type, java_tree_code_length,
12802 java_tree_code_name): New arrays.
12803 (lang_init): Append Java tree node definitions to Gcc ones.
12804 * lex.c (expression_obstack): Declared as extern when JC1_LITE
12805 defined.
12806 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
12807 wfl_to_string.
12808 (java_lex): Allow declaration of empty string constants. Retain
12809 location information on CASE_TK and DEFAULT_TK.
12810 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
12811 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
12812 Modified to be more robust.
12813 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
12814 (build_new_invocation, try_builtin_assignconv,
12815 patch_switch_statement, string_constant_concatenation,
12816 build_string_concatenation, patch_string_cst, patch_string,
12817 java_expand_switch): New function declarations.
12818 * parse.y: Rules related to switch and EH tagged <node>.
12819 (label_id): Set to NULL_TREE
12820 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
12821 tree nodes.
12822 (this_or_super:): Fixed indentation.
12823 (statement:, statement_nsi:, statement_without_trailing_substatement:,
12824 statement_expression:): Removed call to RULE on all sub-rules.
12825 (switch_expression:, switch_labels:): New rules.
12826 (switch_statement:, switch_block:, switch_block_statement_groups:,
12827 switch_block_statement_group:, switch_labels:, switch_label:):
12828 Defined actions.
12829 (throw_statement:, synchronized_statement:, try_statement:):
12830 Defined temporary actions.
12831 (class_instance_creation_expression:): Call
12832 build_new_invocation. Fixed indentation.
12833 (field_access): Fixed indentation.
12834 (method_invocation): Likewise.
12835 (make_qualified_primary): Use THIS_EXPR.
12836 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
12837 resolving from SUPER, set *type_found.
12838 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
12839 (java_complete_tree): Removed unused local variable `location'. Case
12840 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
12841 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
12842 on MODIFY_EXPR: and all binary operator tree code cases. Removed
12843 STRING_CST: case. default: checks for patchable strings.
12844 (complete_function_arguments): Transform string constant or
12845 crafted StringBuffer if necessary.
12846 (build_method_invocation): Fixed comments.
12847 (build_new_invocation): New function.
12848 (patch_assignment): Call try_builtin_assignconv to figure a valid
12849 assignment conversion between builtin types.
12850 (try_builtin_assignconv): New function.
12851 (build_binop): Use URSHIFT_EXPR directly to call build.
12852 (operator_string): Use UNARY_PLUS_EXPR.
12853 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
12854 operator.
12855 (do_merge_string_cste, merge_string_cste,
12856 string_constant_concatenation, build_string_concatenation,
12857 patch_string, patch_string_cst): New function.
12858 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
12859 (patch_unaryop): Likewise. New test of valid ++/-- operands.
12860 (build_newarray_node): Use NEW_ARRAY_EXPR.
12861 (build_this): Use THIS_EXPR.
12862 (build_return): Enable debug information on return statement.
12863 (build_if_else_statement): Likewise.
12864 (complete_labeled_statement): Fixed related comment.
12865 (build_loop_body): Fixed comment.
12866 (build_bc_statement): Enable debug information on break/continue
12867 statements.
12868 (patch_bc_statement): Fixed typos. Handle SWITCH statement
12869 context.
12870 (patch_switch_statement, case_identity, java_expand_switch): New
12871 functions.
12872
12873 1998-09-21 Per Bothner <bothner@cygnus.com>
12874
12875 * buffer.h (BUFFER_INIT): New macro.
12876 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
12877 Pass (struct jcf_partial *state) to most functions.
12878 (jcf_block, jcf_relocation): New types.
12879 Support labels, branches, conditionals, loops.
12880
12881 1998-09-21 Tom Tromey <tromey@cygnus.com>
12882
12883 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
12884
12885 1998-09-21 Per Bothner <bothner@cygnus.com>
12886
12887 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
12888 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
12889 not integer_type_node (INT_TYPE_SIZ bits).
12890
12891 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
12892
12893 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
12894 * jcf-dump.c (print_exception_table): New function.
12895 (disassemble_method): Better handling of wide instructions.
12896 Make more robust for bad input.
12897
12898 1998-09-30 Jeffrey A Law (law@cygnus.com)
12899
12900 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
12901 FreeBSD.
12902
12903 1998-09-17 Jeffrey A Law (law@cygnus.com)
12904
12905 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
12906
12907 1998-09-17 Tom Tromey <tromey@cygnus.com>
12908
12909 * Makefile.in ($(PARSE_H)): Removed target.
12910
12911 1998-09-17 Jeffrey A Law (law@cygnus.com)
12912
12913 * Makefile.in (JAVA_OBJS): Add memmove.o
12914 (memmove.o): New target & rules.
12915
12916 1998-09-15 Tom Tromey <tromey@cygnus.com>
12917
12918 * expr.c (expand_invoke): Don't generate a call to the class init
12919 code.
12920
12921 1998-09-14 Jeffrey A Law (law@cygnus.com)
12922
12923 * Makefile.in: Add many missing dependencies.
12924 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
12925 as appropriate.
12926 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
12927 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
12928
12929 1998-09-11 Per Bothner <bothner@cygnus.com>
12930
12931 * decl.c (complete_start_java_method): If method is static (and
12932 not private) call _Jv_InitClass.
12933 * expr.c (expand_invoke): Don't call build_class_init.
12934
12935 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
12936
12937 1998-09-10 Jeffrey A Law (law@cygnus.com)
12938
12939 * Make-lang.in (GCJ): Define before using.
12940
12941 1998-09-09 Jeffrey A Law (law@cygnus.com)
12942
12943 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
12944 losing due to namespace pollution in GNU getopt.h
12945
12946 1998-09-09 Tom Tromey <tromey@cygnus.com>
12947
12948 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
12949 (java.all.cross): Likewise.
12950 (java.rest.encap): Likewise.
12951
12952 1998-09-08 Jeffrey A Law (law@cygnus.com)
12953
12954 * gjavah.c (print_class_decls): Fix thinko in arglist
12955 * jcv-io.c (find_classfile): Similarly.
12956
12957 1998-09-07 Jeffrey A Law (law@cygnus.com)
12958
12959 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
12960
12961 1998-09-05 Tom Tromey <tromey@cygnus.com>
12962
12963 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
12964 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
12965 * Makefile.in (PARSE_C): New macro.
12966 (PARSE_H): Likewise.
12967 (PARSE_SCAN_C): Likewise.
12968 ($(PARSE_C)): Target renamed from parse.c.
12969 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
12970 (clean): Remove parse-scan.c as well.
12971 (parse.o): Depend on $(PARSE_C).
12972
12973 1998-09-05 Anthony Green <green@cygnus.com>
12974
12975 * README, license.terms: Removed.
12976
12977 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
12978 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
12979 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
12980 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
12981 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
12982 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
12983 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
12984 and Java trademark attribution.
12985
12986 1998-09-04 Tom Tromey <tromey@cygnus.com>
12987
12988 * Makefile.in: Use gcjh, not gjavah.
12989 * config-lang.in (stagestuff): Use gcjh, not gjavah.
12990 * Make-lang.in: Changed gjavah to gcjh everywhere.
12991
12992 1998-09-03 Per Bothner <bothner@cygnus.com>
12993
12994 * gjavah.c: Support new -prepend -add -append flags.
12995 (print_method_info): Method is not virtual if class is final.
12996
12997 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12998
12999 * jv-scan.c: Fixed copyright assignment.
13000 * keyword.gperf: Likewise.
13001 * keyword.h: Likewise.
13002 * lex.c: Fixed copyright assignment.
13003 (java_lex): Push unicode back when parsing '<'.
13004 * lex.h: Fixed copyright assignment.
13005 * parse-scan.y: Likewise.
13006 * parse.h: Fixed copyright assignment.
13007 (build_debugable_stmt, complete_for_loop): New function prototypes.
13008 * parse.y: Fixed copyright assignment.
13009 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
13010 size_zero_node when completing a loop with no exit condition.
13011 (for_statement_nsi:): Define action.
13012 (for_init:, for_update:): Return size_zero_node when empty.
13013 (declare_local_variables): Call build_debugable_stmt.
13014 (build_debugable_stmt): New function.
13015 (build_loop_body): Build debugable statement around loop
13016 condition part.
13017 (complete_loop_body): Take into account the debugable statement
13018 around the EXIT_EXPR.
13019 (complete_loop_body): New function.
13020 (patch_exit_expr): Fixed condition inversion.
13021
13022 1998-09-02 Tom Tromey <tromey@cygnus.com>
13023
13024 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
13025 name of thread define.
13026 * jvspec.c (THREAD_NAME): New macro.
13027 (GCLIB): Likewise.
13028 (THREADLIB): Likewise.
13029 (lang_specific_driver): Recognize attempt to link with thread
13030 library or gc library. Recognize -ljava on command line so it
13031 isn't linked against more than once.
13032
13033 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13034
13035 * parse-scan.y (report_main_declaration): Name of the class
13036 containing `main' can be a qualified name.
13037
13038 1998-08-31 Tom Tromey <tromey@cygnus.com>
13039
13040 * config-lang.in: Changed gjavac to gjc everywhere.
13041 * Make-lang.in: Changed gjavac to gjc everywhere.
13042
13043 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13044
13045 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
13046 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
13047 and install the files.
13048 * Makefile.in (JAVA_OBJS_LITE): New variable.
13049 (compiler:): Now include jv-scan as a dependency.
13050 (../jv-scan$(exeext), parse-scan.c): New targets.
13051 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
13052 * config-lang.in (compilers): Removed gcj, gjavah from the list.
13053 * jcf-parse.c (parse_source_file): Call java_layout_classes and
13054 check for errors even if parse_only.
13055 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
13056 defined.
13057 (yylex): New function. Uses java_lex body.
13058 (java_lex): Removed commented out statement. Remove local variable
13059 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
13060 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
13061 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
13062 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
13063 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
13064 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
13065 where appropriate.
13066 (java_lex_error): Empty if JC1_LITE is defined.
13067 (java_get_line_col): Return 0 if JC1_LITE is defined.
13068 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
13069 SET_MODIFIER_CTX): Moved into the section containing the macros
13070 conditionally defined by JC1_LITE.
13071 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
13072 argument if JC1_LITE is defined.
13073 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
13074 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
13075 is defined.
13076 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
13077 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
13078 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
13079 to different values according to JC1_LITE.
13080 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
13081 declared if JC1_LITE set.
13082 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
13083 defined if JC1_LITE not set.
13084 (struct parser_ctx): Reorganized and skip the jc1 front end part
13085 if JC1_LITE set.
13086 (java_layout_classes): New function definition.
13087 (java_push_parser_context, java_init_lex, yyparse, yylex,
13088 yyerror): Prototype always declared. All other static function
13089 prototypes declared only if JC1_LITE is not set.
13090 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
13091 declared in parse.h.
13092 (java_layout_classes): New function.
13093 (java_complete_expand_methods): No longer layout the class here.
13094 * parse-scan.y: New file.
13095 * jv-scan.c: New file.
13096
13097 1998-08-25 Tom Tromey <tromey@cygnus.com>
13098
13099 * gjavah.c (main): Handle -friend option.
13100 (friend_specs): New global.
13101 (generate_access): Handle friend_specs.
13102 (process_file): Likewise.
13103 (MAX_FRIENDS): New macro.
13104 (friend_count): New global.
13105 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
13106 Changed all callers.
13107
13108 1998-08-24 Per Bothner <bothner@cygnus.com>
13109
13110 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
13111 (main): Handle processing all the entries of a named .zip archive.
13112 * jcf-io.c (jcf_trim_old_input): New function.
13113 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
13114
13115 1998-08-24 Per Bothner <bothner@cygnus.com>
13116
13117 * lang.c (flag_assume_compiled): Make default be on.
13118
13119 1998-08-21 Per Bothner <bothner@cygnus.com>
13120
13121 * jcf-dump.c: Add bunches of flags to control output more.
13122 (process_class): New function; support printing more than one class.
13123 (main): Support new --print-main and --javap flags.
13124 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
13125 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
13126
13127 1998-08-20 Per Bothner <bothner@cygnus.com>
13128
13129 Change mangling of dispatch table to match C++ vtable (w/thunks).
13130 * class.c (build_dtable_decl), java-tree.h: New function.
13131 (make_class_data): Call it.
13132 * decl.c (init_decl_processing): Likewise.
13133
13134 1998-08-19 Warren Levy <warrenl@cygnus.com>
13135
13136 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
13137 soft_anewarray; adjust args passed.
13138 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
13139 match _Jv_NewObjectArray.
13140
13141 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
13142
13143 * decl.c (push_labeled_block, pop_labeled_block): New functions.
13144 * expr.c (loopup_label): Call create_label_decl.
13145 (create_label_decl): New function.
13146 (java_lang_expand_expr): Call expand_start_bindings with argument
13147 set to zero.
13148 * java-tree.h Added space after PROTO in function declarations
13149 when necessary.
13150 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
13151 (create_label_decl, push_labeled_block): New function
13152 declarations.
13153 * lex.c (label_id): Initialize.
13154 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
13155 switch.
13156 * parse.h Added space after PROTO in function declarations when
13157 necessary.
13158 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
13159 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
13160 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
13161 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
13162 macros.
13163 (struct parser_ctxt): New fields current_loop,
13164 current_labeled_block.
13165 (build_if_else_statement, patch_if_else_statement,
13166 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
13167 generate_labeled_block, complete_labeled_statement,
13168 build_bc_statement, patch_bc_statement, patch_loop_statement,
13169 build_new_loop, build_loop_body, complete_loop_body): New function
13170 declarations.
13171 * parse.y (java_warning_count): New global variable.
13172 (label_id): New static variable.
13173 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
13174 (block:): Return size_zero_node when block is empty.
13175 (empty_statement:): Return size_zero_node.
13176 (statement:): Implement supplemental action when for_statement: is
13177 reduced.
13178 (label_decl:): New rule.
13179 (labeled_statement:): Rewritten using label_decl. Actions
13180 implemented.
13181 (labeled_statement_nsi:): Likewise.
13182 (if_then_statement): Actions implemented.
13183 (while_expression): New rule.
13184 (while_statement:): Rewritten using while_expression. Actions
13185 implemented.
13186 (while_statement_nsi:): Likewise.
13187 (do_statement_begin:): New rule.
13188 (do_statement:): Rewritten using do_statement_begin. Actions
13189 implemented.
13190 (for_statement:): Rewritten using for_begin. Actions implemented.
13191 (for_statement_nsi:): Likewise.
13192 (for_header:, for_begin:): New rules.
13193 (for_init:): Actions implemented.
13194 (statement_expression_list:, break_statement:,
13195 continue_statement:): Likewise.
13196 (yyerror): Count number of issued warning(s).
13197 (java_report_errors): Report error(s) and/or warning(s).
13198 (java_complete_class): Use build_java_argument_signature to
13199 recompute completed method signature.
13200 (java_check_regular_methods): New locals method_wfl and aflags.
13201 Use method_wfl instead of lookup_cl during error reports. Fixed
13202 indentation and modified some error messages. Use
13203 lang_printable_name in method instead of the DECL_NAME. New code
13204 to issue warnings on methods not overriding corresponding methods
13205 private to a different package.
13206 (java_method_add_stmt): Call add_stmt_to_compound.
13207 (add_stmt_to_compound): New function.
13208 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
13209 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
13210 (build_if_else_statement, patch_if_else_statement,
13211 build_labeled_block, generate_labeled_block,
13212 complete_labeled_statement, build_new_loop, build_loop_body,
13213 complete_loop_body, patch_loop_statement, build_bc_statement,
13214 patch_bc_statement, patch_exit_expr): New functions.
13215 * typeck.c (build_java_signature): Build argument signature before
13216 enclosing it in between parenthesis.
13217
13218 1998-08-17 Warren Levy <warrenl@cygnus.com>
13219
13220 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
13221 (JAVA_OBJS): Added reminder comment
13222
13223 1998-08-13 Nick Clifton <nickc@cygnus.com>
13224
13225 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
13226 be interpreted as a long long.
13227
13228 1998-08-13 Warren Levy <warrenl@cygnus.com>
13229
13230 * decl.c (init_decl_processing): Use _Jv_InitClass, not
13231 soft_initialise_class. Use _Jv_NewMultiArray, not
13232 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
13233 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
13234 _Jv_CheckArrayStore, not soft_checkarraystore. Use
13235 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
13236
13237 1998-08-12 Per Bothner <bothner@cygnus.com>
13238
13239 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
13240 length_identifier_node): New global tree node constants.
13241 * parse.y (kw_super, kw_this, kw_length): Removed globals.
13242 Replace uses by super_identifier_node etc.
13243 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
13244
13245 * parse.y (resolve_field_access): Don't special-case ".length" if
13246 flag_emit_class_files.
13247 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
13248 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
13249 and ARRAY.length.
13250
13251 1998-08-11 Per Bothner <bothner@cygnus.com>
13252
13253 * decl.c (init_decl_processing): Remove unused method_type_node fields.
13254 * class.c (make_method_value): Remove init for removed fields.
13255
13256 * class.c (layout_class): Use build_java_argument_signature.
13257 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
13258
13259 * typeck.c (push_java_argument_signature): Removed. Merged into ...
13260 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
13261 (build_java_signature): Don't use push_java_argument_signature.
13262
13263 * typeck.c (lookup_argument_method): New function.
13264 * parse.y (java_check_regular_methods): Use lookup_argument_method
13265 instead of lookup_java_method2 followed by lookup_java_method.
13266
13267 * parse.y (check_method_redefinition): Minor optimization.
13268
13269 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
13270 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
13271
13272 1998-08-10 Tom Tromey <tromey@cygnus.com>
13273
13274 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
13275 c-pragma.o.
13276
13277 * gjavah.c (java_float_finite): Use K&R-style definition.
13278 (java_double_finite): Likewise.
13279 (generate_access): Now returns void. Changed all callers.
13280 (last_access_generated): Removed.
13281 (process_file): Only make a single pass over the .class file.
13282
13283 1998-07-29 Per Bothner <bothner@cygnus.com>
13284
13285 * class.c (get_dispatch_table): Add extra dummy vtable entry,
13286 for compatibility for G++ (with -fvtable-thunks).
13287 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
13288
13289 * gjavah.c (process_file): Use public inheritance for super-class.
13290
13291 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13292
13293 * lex.c (java_init_lex): Initialize ctxp->package.
13294 * parse.h (struct parser_ctxt): package and package_len replaced
13295 by tree package, an identifier node. Field method_decl_list is
13296 gone. Fixed comments.
13297 (lookup_field_wrapper, merge_qualified_name, not_accessible,
13298 class_in_current_package): New function prototypes.
13299 * parse.y (array_type:): Set class loaded flag on primitive type
13300 arrays.
13301 (package_declaration:): Assign ctxp->package to the
13302 identifier node.
13303 (method_invocation:): Handle invocation of method qualified by
13304 `super'.
13305 (single_type_import_declaration:): Removed ambiguity check.
13306 (java_pop_parser_context): New local variable `next'. Reset and
13307 set IMPORT_CLASSFILE_NAME flags on current and previous import
13308 list.
13309 (java_accstring_lookup): Use new local macro COPY_RETURN.
13310 (lookup_field_wrapper): New function.
13311 (parser_qualified_classname): Use merge_qualified_name.
13312 (parser_check_super_interface): Broaden error message.
13313 (do_resolve_class): Check for qualified class name in the current
13314 compilation unit if appropriate.
13315 (process_imports): Check for already defined classes.
13316 (check_pkg_class_access): Got rid of call to
13317 get_access_flags_from_decl.
13318 (java_complete_expand_methods): Call safe_layout_class based on
13319 the current class size.
13320 (make_qualified_primary): Build a WFL qualification on primary if
13321 none exists.
13322 (merge_qualified_name): New function.
13323 (make_qualified_name): Use merge_qualified_name.
13324 (resolve_expression_name): Use safe_lookup_field.
13325 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
13326 (resolve_qualified_expression_name): Likewise. Check on resolved
13327 element accessibility.
13328 (not_accessible_p, class_in_current_package): New functions.
13329 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
13330 (patch_method_invocation_stmt): Merged common pieces. Check
13331 accessibility of invoked method.
13332 (check_for_static_method_reference): Add returned type in error
13333 message.
13334 (invocation_mode): Get rid of bogus check on PRIVATE methods.
13335 (refine_accessible_methods_list): Merged two conditions in test.
13336 (java_complete_class): Sanity check on stabilize_ref gone.
13337 * zextract.c (read_zip_archive): Cast lseek second argument to long.
13338
13339 1998-07-28 Per Bothner <bothner@cygnus.com>
13340
13341 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
13342
13343 1998-07-24 Tom Tromey <tromey@cygnus.com>
13344
13345 * gjavah.c (F_NAN): Removed.
13346 (F_NAN_MASK): New macro.
13347 (F_POSITIVE_INFINITY): Removed.
13348 (F_NEGATIVE_INFINITY): Likewise.
13349 (java_float_finite): Rewrote.
13350 (D_NAN_MASK): Renamed.
13351 (java_double_finite): Rewrote.
13352 (D_POSITIVE_INFINITY): Removed.
13353 (D_NEGATIVE_INFINITY): Likewise.
13354
13355 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
13356 If verbose, print underlying representation of value in hex.
13357
13358 1998-07-24 Per Bothner <bothner@cygnus.com>
13359
13360 * buffer.h, buffer.c: New files.
13361 * Makefile.in (JAVA_OBJS): Add buffer.o.
13362
13363 Support locals variables and writing their debug entries to .class.
13364 * jcf-write.c: Simplify some by user new buffer type.
13365 (vode_buffer_grow): Removed.
13366 (struct localvar_info): New type.
13367 (localsvars, localvartable): New buffers.
13368 (localvar_alloc, localvar_free): New functions.
13369 (generate_bytecode_insns): Handle local variables.
13370 (generate_classfile): Write LocalVariableTable attribute.
13371
13372 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13373
13374 * jcf-io.c (open_in_zip): Check the zipfile magic number.
13375 * zipfile.h (ZIPMAGIC): New macro.
13376
13377 1998-07-24 Tom Tromey <tromey@cygnus.com>
13378
13379 * Makefile.in (gjavah.o): Updated dependencies.
13380 (jcf-dump.o): Likewise.
13381 (all.indirect): Use ../gjavah.
13382 (../gjavah$(exeext)): Likewise.
13383 (clean): Don't remove gjavah.
13384 (clean): Remove parse.c, not java/parse.c.
13385 * Make-lang.in (java): Added gjavah.
13386 (gjavah$(exeext)): New target.
13387 (GJAVAH_SOURCES): New macro.
13388 (java.all.build): Added gjavah.
13389 (java.all.cross): Likewise.
13390 (java.rest.encap): Likewise.
13391 * config-lang.in (compilers, stagestuff): Added gjavah.
13392
13393 1998-07-23 Tom Tromey <tromey@cygnus.com>
13394
13395 * gjavah.c (java_float_finite): New function.
13396 (java_double_finite): Likewise.
13397 (F_POSITIVE_INFINITY): New macro.
13398 (F_NEGATIVE_INFINITY): Likewise.
13399 (F_NAN): Likewise.
13400 (D_POSITIVE_INFINITY): Likewise.
13401 (D_NEGATIVE_INFINITY): Likewise.
13402 (D_NAN): Likewise.
13403 (print_field_info): Use java_float_finite and java_double_finite.
13404
13405 1998-07-23 Per Bothner <bothner@cygnus.com>
13406
13407 * parse.y (method_header): Name "this" implicit argument.
13408
13409 1998-07-22 Per Bothner <bothner@cygnus.com>
13410
13411 * jcf-write.c: Write out LineNumberTable attribute in .class file.
13412 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
13413 (put_linenumber): New function.
13414 (generate_bytecode_insns, generate_classfile): Write line numbers.
13415
13416 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13417
13418 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
13419 (lookup_name, build_known_method_ref, build_class_init,
13420 build_invokevirtual, invoke_build_dtable, match_java_method,
13421 build_field_ref, pushdecl_force_head, build_java_binop,
13422 binary_numeric_promotion, build_decl_no_layout,
13423 build_java_arrayaccess, build_newarray, build_anewarray,
13424 build_java_array_length_access, build_java_arraynull_check): New
13425 extern function prototypes.
13426 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13427 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
13428 java-tree.h.
13429 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
13430 to NULL
13431 * jcf.h (jcf_out_of_synch): New extern function prototype.
13432 * parse.h: Static/global function implemented in parse.y
13433 prototyped and declarations moved at the end of the file.
13434 (DECL_P): Check that the argument isn't null.
13435 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
13436 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
13437 (QUAL_DECL_TYPE): New macro.
13438 (PARAMS): Macro definition removed.
13439 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
13440 (return_statement:): Call build_return.
13441 (field_access:): Call make_qualified_primary in sub rule.
13442 (method_invocation:): Build method invocation and call
13443 make_qualified_primary when processing primaries.
13444 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
13445 get_type_from_signature.
13446 (java_check_regular_method): Extra integer 0 argument when calling
13447 lookup_java_method2.
13448 (lookup_java_interface_method2): Extra method DECL argument when
13449 calling lookup_java_interface_method2.
13450 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
13451 COMPOUND_EXPR node.
13452 (java_complete_expand_method): Layout current class iff not
13453 already done. Don't process interface's methods.
13454 (java_complete_expand_method): Use super class only if it
13455 exists. Use current class otherwise.
13456 (make_qualified_primary): New function.
13457 (resolve_expression_name): Process qualified expression or
13458 expression from primary the same way.
13459 (resolve_expression_name): Two last arguments to
13460 resolve_field_access are now NULL_TREEs.
13461 (resolve_field_access): New variable is_static. Local field must
13462 be DECLs. is_static computed on field DECLs only. Append code in
13463 where_found to the field access if necessary. Use QUAL_DECL_TYPE
13464 to initialize field_type.
13465 (resolve_qualified_expression_name): New local variable,
13466 previous_call_static and is_static. Handle primaries with function
13467 calls, casts, array references and `this'. `super' now handled as
13468 `(super_class)this'. Use is_static to clarify boolean expressions.
13469 Added code to handle case where a proper handle is required to
13470 access a field. Use QUAL_DECL_TYPE where applicable.
13471 (maybe_access_field): New function.
13472 (patch_method_invocation_stmt): New arguments primary, where,
13473 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
13474 deleted. Use `where' as a type to search from if specified. Check
13475 for static method reference where forbidden. Append primary or
13476 current_this to the argument list if not calling constructor nor
13477 static methods.
13478 (check_for_static_method_reference): New function.
13479 (patch_invoke): Layout the class on which new is done if
13480 necessary.
13481 (lookup_method_invoke): Changed format to report errors on
13482 methods.
13483 (qualify_ambiguous_name): New local variable this_found. Now
13484 handle things from primaries. Method call are considered
13485 expression names.
13486 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
13487 changed into NULLs.
13488 (not_initialized_as_it_should_p): Comply with the new DECL_P.
13489 (java_complete_tree): New case fo RETURN_EXPR. Process function
13490 call arguments in separate function.
13491 (complete_function_arguments): New function.
13492 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
13493 anymore.
13494 (patch_assignment): Take the return function slot into account as
13495 a RHS. Distinguish assignment from a return.
13496 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
13497 when checking methods in interfaces.
13498 (resolve_type_during_patch): NULL argument to unresolve_type_p
13499 instead of NULL_TREE.
13500 (patch_newarray): Fixed typo in comment.
13501 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
13502 (build_return, patch_return): New functions.
13503 * typeck.c (lookup_java_constructor): Fixed typo in comment.
13504
13505 1998-07-21 Per Bothner <bothner@cygnus.com>
13506
13507 * constants.c (find_name_and_type_constant, find_fieldref_index,
13508 find_methodref_index): New methods.
13509 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
13510 just return given method. Also, rename to build_known_method_ref.
13511 (expand_invoke): Rename call to build_invoke_non_interface.
13512 * java-tree.h, parse.h: Update prototype.
13513 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
13514 (such as expand_expr_stmt) if flag_emit_class_files.
13515 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
13516 STACK_TARGET, IGNORE_TARGET): New macros.
13517 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
13518 (generate_bytecode_insn): New function to generate method's bytecode.
13519 (generate_classfile): Node generate Code attribute for a method.
13520 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
13521 push_long_const, field_op, adjust_typed_op, maybe_wide):
13522 New functions used by generate_bytecode_insn.
13523
13524 * typeck.c (signature_include_return): Remove variable.
13525 (push_java_argument_signature, build_java_argument_signature): New.
13526 (build_java_signature): Use push_java_argument_signature.
13527 * parse.y: Use build_java_argument_signature instead of fiddling
13528 with signature_include_return.
13529
13530 1998-07-17 Tom Tromey <tromey@cygnus.com>
13531
13532 * gjavah.c (print_c_decl): Always generate JArray<>* for array
13533 types.
13534
13535 * Makefile.in (all.indirect): Added gjavah$(exeext).
13536 (gjavah$(exeext)): Added $(exeext).
13537 (clean): Likewise.
13538
13539 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13540
13541 * class.c (layout_class): Call to java_layout_parsed_class replace
13542 by safe_layout_class.
13543 * expr.c (build_java_array_length_access): Removed static storage
13544 class in the function definition.
13545 (build_java_arraynull_check): Likewise.
13546 Also fixed typos in two comments.
13547 * lex.c (java_init_lex): Initialize static global kw_length.
13548 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
13549 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
13550 java_lex_error.
13551 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
13552 * parse.h (resolve_no_layout): New static function declaration.
13553 (get_identifier_in_static): Declaration removed.
13554 (java_layout_parsed_class): Function name declaration changed to
13555 safe_layout_class.
13556 (build_newarray_node, patch_newarray, resolve_type_during_patch,
13557 not_initialized_as_it_should_p, build_this): New static function
13558 declarations.
13559 (pushdecl_force_head, build_java_binop, int_fits_type_p,
13560 binary_numeric_promotion, stabilize_reference,
13561 build_decl_no_layout, build_java_arrayaccess): Extern function
13562 declarations moved into their own section.
13563 (build_newarray, build_anewarray, build_java_array_length_access,
13564 build_java_arraynull_check): New extern function declarations.
13565 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
13566 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
13567 fake tree codes.
13568 (CALL_CONSTRUCTOR_P): New macro.
13569 * parse.y (kw_length): New static global tree node.
13570 (return_statement): Tagged <node>.
13571 (RETURN_TK): Tagged <operator>.
13572 (variable_declarator_id:): Build variable declaration with an
13573 empty initialization value if a syntax error was found in the
13574 initialization part of the variable declaration.
13575 (statement_without_trailing_substatement:): return_statement: now
13576 uses the default rule.
13577 (return_statement:): Temporarily fixed to return NULL_TREE.
13578 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
13579 (class_instance_creation_expression:): Class creation rules now
13580 call build_method_invocation upon reduction.
13581 (array_creation_expression:): Rules call build_newarray_node upon
13582 reduction.
13583 (dim_exprs:): Build a list of dimension expressions.
13584 (dim_expr:): Store location of the OSB_TK in the dimension
13585 expression node.
13586 (method_invocation:): Added a new error rule.
13587 (build_unresolved_array_type): WFL argument may also be an array
13588 on a primitive type. Name of the argument changed to reflect this.
13589 (method_declarator): Insert argument type at the beginning of the
13590 argument type list and later reverse the list.
13591 (unresolved_type_p): Argument 'returned' may be optionally
13592 NULL_TREE.
13593 (java_layout_class_from_source): Function renamed
13594 safe_layout_class.
13595 (resolve_and_layout): Now call resolve_no_layout and
13596 safe_layout_class.
13597 (resolve_no_layout): New function.
13598 (purify_type_name): New function.
13599 (complete_class_report_errors): Call purify_type_name during error
13600 report on a type not found.
13601 (process_imports): error_found local variable doesn't need to be
13602 initialized to zero.
13603 (declare_local_variables): New local type_wfl. Fixed typo in error
13604 message. type_wfl assigned to unresolved type and used to register
13605 incomplete type. Build a WFL around the variable initialization
13606 statement so that debug info can be generated on it.
13607 (source_start_java_method): Reverse argument list after they've
13608 been processed.
13609 (current_this): New static global variable.
13610 (java_complete_expand_methods): Set current_this when appropriate.
13611 (resolve_expression_name): Build correct static and non static
13612 field access bearing a simple name.
13613 (resolve_field_access): Resolve the length field of arrays. Handle
13614 f.m() cases.
13615 (patch_method_invocation_stmt): Set the type of the method
13616 invocation to error_mark_node. This value is later overridden by a
13617 valid type, if any. Don't handle qualified constructor invocation
13618 as qualified method invocation. Call lookup_method_invoke with its
13619 new flag. It's no longer necessary to access the selected method
13620 as the value of a tree list. Handle constructor invocation.
13621 (patch_invoke): Reverse argument list when invoking non interface
13622 methods. Insert call to new as the first argument of the
13623 constructor.
13624 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
13625 defined within a final class. Return INVOKE_STATIC if the invoked
13626 method is a constructor.
13627 (lookup_method_invoke): New lc argument is a flag to indicate a
13628 constructor lookup. Now handle constructor lookup. Choose the most
13629 specific method in case several were matching the invocation
13630 requirements. Return a method decl instead of a tree list featuring
13631 one single method decl element.
13632 (refine_accessible_methods_list): New lc flag argument to
13633 indicate that a constructor is being looked up.
13634 (not_initialized_as_it_should_p): New function.
13635 (java_complete_tree): Now process fake tree codes
13636 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
13637 save_expr on resolved function call arguments. Case on
13638 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
13639 (patch_assignment): LHS can be a field access expression. When
13640 dealing with reference, lhs_type is the promoted type of the
13641 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
13642 applicable.
13643 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
13644 (patch_binop): Use not_initialized_as_it_should_p where
13645 applicable.
13646 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
13647 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
13648 where applicable.
13649 (resolve_type_during_patch): New function.
13650 (patch_cast): Call resolve_type_during_patch to resolve type and
13651 report error accordingly.
13652 (patch_array_ref): Use not_initialized_as_it_should_p where
13653 applicable. Array base expression is saved before being
13654 used. Promote the type of an array elements if it contains non
13655 builtin types.
13656 (build_newarray_node, patch_newarray, build_this): New functions.
13657
13658 1998-07-16 Tom Tromey <tromey@cygnus.com>
13659
13660 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
13661 increment it in `for' statement.
13662 (print_field_info): If number is inf or nan, don't print it.
13663 (print_method_info): If method name is `delete', just ignore it.
13664 (print_c_decl): Special-case jstringArray.
13665
13666 * gjavah.c (help): New function.
13667 (no_argument): New function.
13668 (usage): Changed text.
13669 (main): Rewrote argument handling. Now handles -v, --help,
13670 --version.
13671 (version): New function.
13672 (found_error): New global.
13673 (main): Return found_error.
13674 (generate_access): Set found_error.
13675 (print_c_decl): Likewise.
13676
13677 1998-07-15 Tom Tromey <tromey@cygnus.com>
13678
13679 * gjavah.c (print_c_decl): Don't print "," when examining field.
13680 Skip type name when looking at "[L" types.
13681 (process_file): Now static.
13682 (generate_access): Now returns int.
13683 (last_access_generated): New global.
13684 (process_file): Clear last_access_generated; make multiple passes
13685 over the class.
13686 (print_field_info): Just return if generate_access returns true.
13687 (print_method_info): Likewise. Also, allow <init> functions to
13688 pass through.
13689 (print_c_decl): Added is_init argument. Print constructors
13690 properly.
13691 (print_cxx_classname): Use UTF8_GET to extract characters from
13692 string.
13693 (print_base_classname): New function.
13694 (print_class_decls): New function.
13695 (process_file): Use it.
13696 (utf8_cmp): New function.
13697
13698 1998-07-13 Nick Clifton <nickc@cygnus.com>
13699
13700 * lang-options.h: Format changed to match changes in gcc/toplev.c
13701 to implement a --help option.
13702
13703 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
13704
13705 * decl.c (init_decl_processing): Revert change to dtable_type.
13706
13707 1998-07-09 Per Bothner <bothner@cygnus.com>
13708
13709 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
13710
13711 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
13712
13713 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
13714
13715 * lang.c (lang_init): Default flag_exceptions to 1, without
13716 checking to see if it's 2 first.
13717
13718 1998-07-08 Jeffrey A Law (law@cygnus.com)
13719
13720 * constants.c: Include "system.h".
13721 * decl.c: Likewise.
13722 * lang.c (flag_new_exceptions): Get via extern now.
13723 (lang_init_options): New functions. Turn on flag_new_exceptions.
13724
13725 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13726
13727 * lex.c (java_lex): Return 0 when we see an invalid character in
13728 the input.
13729
13730 * lex.c (java_read_char): Specify extra argument when calling
13731 java_lex_error.
13732 (java_read_unicode, java_parse_end_comment,
13733 java_parse_escape_sequence): Likewise,
13734 (java_lex): Specify extra argument when calling
13735 java_lex_error. Test that IDs are beginning with a legal character
13736 for IDs. Handle invalid characters with an error message and a
13737 call to java_lex_error.
13738 (java_lex_error): Adjust column position by new argument
13739 `forward'. Issue an error even if in the middle of reporting an
13740 other error.
13741
13742 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
13743
13744 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
13745 we don't explicitly put a null pointer when we're copying it.
13746
13747 1998-07-07 Tom Tromey <tromey@cygnus.com>
13748
13749 * gjavah.c (print_cxx_classname): New function.
13750 (super_class_name): Likewise.
13751 (print_super_fields): Removed.
13752 (in_super): Removed.
13753 (print_field_info): Never generate #defines.
13754 (print_c_decl): Changed generated types to match JNI. No longer
13755 print class name before method name.
13756 (print_method_info): Print "static" before static methods.
13757 Print "virtual" before non-final methods.
13758 (usage): Use exit(1), not exit(-1).
13759 (main): Likewise.
13760 (print_field_info): Use %.17g to print a double.
13761 (last_access): New globals.
13762 (process_file): Initialize last_access.
13763 (usage): Now static.
13764 (ACC_VISIBILITY): New define.
13765 (generate_access): New function.
13766 (print_field_info): Call it.
13767 (print_method_info): Likewise. Also, generate information for all
13768 methods, not just native methods. Return void.
13769 (print_c_decl): Return void.
13770 (print_field_info): Return void.
13771
13772 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13773
13774 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
13775 processing the jc1 grammar file. Prefix bison functions and
13776 variables with java_.
13777 (parse.c): Dependencies on parse.h and lex.h
13778 * expr.c (build_java_arrayaccess): Function now global.
13779 * java-tree.h: Comment reorganized to carry on previous
13780 classification effort.
13781 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
13782 RESOLVE_TYPE_NAME_P): New flags on WFLs.
13783 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
13784 java_parse (new prefix java_ generated by bison).
13785 (java_layout_parsed_class, java_register_parsed_class): Function
13786 call removed.
13787 (yyparse): Removed unnecessary call to init_outgoing_cpool.
13788 * lex.c (static tree wfl_op): Variable deleted.
13789 (java_init_lex): Initialize kw_super and kw_this. Initialize more
13790 ctxp fields to NULL_TREE.
13791 (java_lex): No longer create WFL for operators. Filename caching
13792 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
13793 created as STRING_CST and later expanded. Removed extra argument
13794 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
13795 and SUPER.
13796 (build_wfl_node): Removed code in comments.
13797 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
13798 store token and location data in the current bison token.
13799 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
13800 static/extern function declaration at the beginning of the file.
13801 (struct qualification): Data structure definition deleted.
13802 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
13803 (qualify_ambiguous_name): Function declaration modified. Function
13804 now returns nothing.
13805 (build_array_ref, patch_array_ref, make_qualified_name,
13806 resolve_qualified_expression_name, maybe_generate_clinit,
13807 resolve_field_access): New static function declarations.
13808 (build_java_arrayaccess): New extern function declaration.
13809 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
13810 (CALL_EXPR_PRIMARY): Macro deleted.
13811 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
13812 (struct parser_ctxt): Field initialized_final
13813 removed. non_static_initialized, static_initialized: New fields.
13814 * parse.y (static tree kw_super, static tree kw_this): New global
13815 static.
13816 (%union): tree wfl field of operator member replaced by int
13817 location. WFLs are non longer created for operators.
13818 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
13819 (qualified_name:): Now calls make_qualified_name to build the
13820 identifier.
13821 (type_declaration:): Consider generating <clinit> when class
13822 parsing completed.
13823 (variable_declarator:): Directly build an assignment node when the
13824 variable is initialized when declared.
13825 (this_or_super:): Build a WFL and set current location when THIS
13826 or SUPER are parsed.
13827 (expression_statement:): Wrap statement around a WFL.
13828 (primary_no_new_array:): Fixed typo. Changed value returned by
13829 THIS_TK because of its new type (temporary).
13830 (dim_exprs:): Temporary fix because of OSB_TK's new type.
13831 (field_access:): Build qualified name with SUPER.
13832 (method_invocation:): Fixed returned value because of SUPER's new
13833 type.
13834 (array_access:): Use OSB_TK location information.
13835 (post_increment_expression:, post_decrement_expression:,
13836 unary_expression:, pre_increment_expression:,
13837 pre_decrement_expression:, unary_expression_not_plus_minus:,
13838 cast_expression:, multiplicative_expression:,
13839 additive_expression:, shift_expression:, relational_expression:,
13840 equality_expression:, and_expression:, exclusive_or_expression:,
13841 inclusive_or_expression:, conditional_and_expression:,
13842 conditional_or_expression:, assignment:): Use new location/token
13843 information available on operators.
13844 (create_class): Set super_decl_type to NULL_TREE when processing
13845 java.lang.Object.
13846 (register_fields): Field initialization is now a MODIFY_EXPR
13847 node. Chain initialization code to the matching lists (according
13848 the the field declaration modifiers).
13849 (maybe_generate_clinit): New function.
13850 (method_header): Don't set method's DECL_NAME to a WFL when adding
13851 methods to java.lang.Object.
13852 (resolve_and_layout): Now can return NULL_TREE if the type
13853 resolution fails. Otherwise, return the class DECL instead of its
13854 TYPE.
13855 (check_method_redefinition): Don't patch method DECL_NAME if it
13856 belongs to java.lang.Object.
13857 (process_imports): Simply assign error_found to the value returned
13858 by check_pkg_class_access.
13859 (declare_local_variables): Don't use their init statements (if
13860 any) when parsing error were previously found. Reuse MODIFY_EXPR
13861 build during parsing as an init statement.
13862 (java_method_add_stmt): Now return the current method body.
13863 (java_layout_parsed_class, java_register_parsed_class): Functions
13864 removed.
13865 (java_complete_expand_methods): Initialize the constant pool on a
13866 per class basis. Layout the classes before expanding their method
13867 bodies. Don't try expand artificial constructor code if error were
13868 found. Make the classes data and register them if no error were
13869 found.
13870 (java_complete_expand_method): Retrieve an artificial constructor
13871 argument list before entering its body. Assign the top block to
13872 the artificial constructor function body and set types of declared
13873 blocks and compound statements to void. Walk method body if not an
13874 artificial constructor.
13875 (make_qualified_name, cut_identifier_in_qualified): New functions.
13876 (resolve_expression_name): Fixed comments. Save/restore the
13877 current class CLASS_LOADED_P flag value. Build non qualified
13878 static field access and handle qualified expression names.
13879 (resolve_field_access, resolve_qualified_expression_name): New
13880 functions.
13881 (patch_method_invocation_stmt): Use the new expression resolution
13882 scheme, calling resolve_field_access when the function call is
13883 resolved as an expression.
13884 (qualify_ambiguous_name): Function rewritten to work on qualified
13885 expression produced by make_qualified_name.
13886 (java_complete_tree): Promote type when function's argument are
13887 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
13888 the assignment to discover further errors if RHS is a expression
13889 name that fails to evaluate. Declare LHS initialized even though
13890 the assignment failed. Don't use the location variable and removed
13891 extra argument in patch function calls. Now handle the ARRAY_REF
13892 case and build internal string representation when STRING_CSTs are
13893 walked.
13894 (build_method_invocation): Don't wrap function call around a WFL.
13895 (build_assignment): Likewise. Use the operator location
13896 information.
13897 (patch_assignment): Handle array access LHSs. Handle error
13898 provenance, resulting in a better error report.
13899 (build_binop): Use op_location from operator as binop location
13900 information.
13901 (build_unaryop, build_incdec, build_cast): Likewise.
13902 (patch_binop): Extract location information from the node. Fixed
13903 typo in error message.
13904 (patch_unary_op): Extract location information from the node.
13905 (build_array_ref, patch_array_ref): New functions.
13906
13907 1998-07-01 Tom Tromey <tromey@cygnus.com>
13908
13909 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
13910 match _Jv_IsInstanceOf.
13911 * decl.c (init_decl_processing): Use _Jv_NewArray, not
13912 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
13913
13914 1998-06-30 Tom Tromey <tromey@cygnus.com>
13915
13916 * decl.c (init_decl_processing): Functions are now named
13917 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
13918
13919 1998-06-29 Per Bothner <bothner@cygnus.com>
13920
13921 * java-tree.h (load_class): Add prototype.
13922 * class.c (is_compiled_class): Add missing arg to load_class.
13923 * expr.c (expand_java_NEW): Call load_class.
13924 * parse.y (process_import): Removed bogus use of void return value.
13925
13926 1998-06-25 Per Bothner <bothner@cygnus.com>
13927
13928 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
13929 Function name is "_Jv_Throw" instead of "soft_athrow".
13930 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
13931 Function name is "_Jv_AllocObject" instead of "soft_new".
13932 Takes an extra parameter (object size).
13933 * expr.c: Update calls.
13934
13935 1998-06-24 Per Bothner <bothner@cygnus.com>
13936
13937 * lex.c (java_get_line_col): Handle end-of-file.
13938 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
13939
13940 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
13941
13942 * lang.c (lang_init): Make -fexceptions the default.
13943 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
13944 exception handling is not turned on.
13945
13946 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
13947
13948 * lang.c (flag_new_exceptions): Make this this default.
13949 * decl.c (end_java_method): Call emit_handlers.
13950 * except.c (method_init_exceptions): Set language code and version.
13951 (expand_start_java_handler): Enable exception, and call
13952 expand_eh_region_start.
13953 (expand_end_java_handler): Enable exception, and set up catch blocks.
13954 (emit_handlers): New routine to generate the saved handlers.
13955 * java-except.h (emit_handlers): Add prototype.
13956
13957 1998-06-12 Per Bothner <bothner@cygnus.com>
13958
13959 We used to have three different representations of the constant pool:
13960 the CPool structure, the tree_constant_pool, and the constructures
13961 used to build the Class object (which may need class and string
13962 constants) in compiled code. None were appropriate for compiling
13963 to .class files, so I did a major overhaul.
13964
13965 First, the tree_constant_pool array was removed. Things were
13966 modified to the CPool structure in the JCF could be used.
13967 Second, a "capacity" field was added to the CPool, and functions
13968 written to search for a matching constant, adding one if not found.
13969 The code that generated the Class object was changed to use a CPool.
13970 The actual TREE_LISTs used to build the CONSTRUCTORs used for
13971 the static Class object are now only in build_constants_constructor.
13972 Finally, I wrote code which can generate a .class file (including its
13973 constant pool) from the RECORD_TYPE of a class. This is a big step
13974 on the way to compiling Java source into .class files.
13975
13976 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
13977 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
13978
13979 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
13980 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
13981 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
13982 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
13983 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
13984 (lang_type): Removed constant_pool field.
13985 * jcf.h (CPool): Renamed size to count. Added field capacity.
13986 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
13987 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
13988 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
13989
13990 * constants.c (current_constant_pool_tags, current_constant_pool_data,
13991 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
13992 * constants.c (build_constants_constructor): Use new outgoing_cpool.
13993 (set_constant_entry, find_constant1, find_constant2,
13994 find_class_constant, count_constant_pool_bytes, write_constant_pool,
13995 find_utf8_constant, find_class_or_string_constant): New functions.
13996
13997 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
13998 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
13999 (give_name_to_class, get_class_constant): Likewise.
14000 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
14001 (get_name_and_type_constant, get_ref_constant): Removed.
14002 * parse.h (parser_ctxt): Remove field tree_constant_pool.
14003 * parse.y: Don't save/restore tree_constant_pool.
14004 * verify.c (verify_jvm_instructions): Update for new approach.
14005 * expr.c (expand_invoke, expand_java_field_op): Likewise.
14006
14007 * lang-options.h: Added -femit-class-file, -femit-class-files.
14008 * lang.c (flag_emit_class_files), java-tree.h: New flag.
14009 (lang_f_options): Added "emit-class-file(s)".
14010
14011 * expr.c (build_java_arrayaccess): Generate more efficient array
14012 bounds checking, by using unsigned compare.
14013
14014 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
14015
14016 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14017
14018 * parse.h: New comment on the handling of unresolved type
14019 identifiers. JDEPs are now part of the jdep_code enum.
14020 (typedef struct jdep): Now use enum jdep_code or int, depending on
14021 availability. Both are narrowed down to an 8 bits bitfield.
14022 (CALL_EXPR_PRIMARY): Fixed comment.
14023
14024 1998-06-10 Tom Tromey <tromey@cygnus.com>
14025
14026 * Make-lang.in (java): Added gjavac and jvgenmain.
14027 (java.start.encap): Depend on gjavac.
14028 (java.rest.encap): Depend on jvgenmain.
14029
14030 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
14031 (JAVA_CROSS_NAME): Likewise.
14032 (java.all.build): Depend on jvgenmain and gjavac.
14033 (java.all.cross): Depend on jvgenmain and gjavac-cross.
14034 (jvgenmain$(exeext)): New target.
14035 (java.install-common): Wrote.
14036 * config-lang.in (compilers, stagestuff): Added gjavac and
14037 jvgenmain.
14038
14039 1998-06-10 Dave Brolley <brolley@cygnus.com>
14040
14041 * lang.c (lang_decode_option): New argc/argv interface.
14042
14043 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14044
14045 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
14046 * decl.c (build_decl_no_layout): New function.
14047 * expr.c (java_lang_expand_expr): Layout declarations found in
14048 blocks before they're pushed.
14049 * jcf-parse.c (load_class): Save current line when parsing class
14050 file.
14051 (parse_source_file): Register class before expanding their
14052 methods.
14053 * lang.c (put_decl_node): Produce `null' when `void *' is
14054 processed.
14055 * lex.c (static tree wfl_op): New static global, for error report
14056 on casts.
14057 (java_init_lex): wfl_operator and wfl_op initialized
14058 here. Filename caching added for wfl_op. Return wfl_op when `(' is
14059 parsed.
14060 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
14061 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
14062 build_unresolved_array_type): New static function definitions.
14063 (build_decl_no_layout): New extern function declared.
14064 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
14065 faulty modifier exists.
14066 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
14067 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
14068 (UNARY_PLUS_EXPR): New fake operator.
14069 (struct parser_ctxt): New field osb_number.
14070 * parse.y (static tree wfl_operator): New static WFL for operator
14071 bound error messages.
14072 (DECR_TK, INCR_TK): Moved.
14073 (OP_TK): Tagged <operator>.
14074 (array_type:): Now call build_unresolved_array_type.
14075 (dim_expr:): Count the number of '[' seen.
14076 (post_increment_expression, post_decrement_expression,
14077 pre_increment_expression, pre_decrement_expression,
14078 unary_expression_not_plus_minus, unary_expression:): Actions are
14079 now building the corresponding unary expressions.
14080 (cast_expression:): Actions are now building cast expressions.
14081 (build_unresolved_array_type): New function.
14082 (create_interface): Reset the number of declared interfaces.
14083 (create_class): Likewise.
14084 (method_header): Methods declared within the scope of an interface
14085 are now implicitly set public and abstract.
14086 (java_complete_class): Variable's and parameter's type are patched
14087 with a promoted type.
14088 (declare_local_variables): Resolved non builtin types are promoted
14089 before being used to build a variable decl. Removed type patch
14090 posted on variable initialization statement.
14091 (source_start_java_method): Use build_decl_no_layout to build the
14092 decl of a parameter of incomplete type.
14093 (java_register_parsed_class): Process interfaces too. Call
14094 rest_of_decl_compilation on each processed class declarations.
14095 (java_complete_expand_methods): Don't attempt to expand things in
14096 interfaces.
14097 (java_complete_tree): Process CONVERT_EXPR, even though it always
14098 has a type. Propagate error_mark_node to node's type too. Promote
14099 method's call argument type and return error_mark_node if
14100 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
14101 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
14102 handle unary operator nodes.
14103 (build_assignment): Added comment.
14104 (print_int_node): New function.
14105 (patch_assignment): New second argument. New error handling. Use
14106 print_int_node. Handle references. Use can_cast_to_p to issue
14107 different error message according to the context and check upon
14108 the initialization of the RHS.
14109 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
14110 (operator_string): Handle more operators.
14111 (patch_binop): No longer use a function static
14112 wfl_operator. Improved error message on shift distance.
14113 (build_unaryop, build_incdec, build_cast, patch_unaryop,
14114 patch_cast): New functions.
14115
14116 1998-06-05 Per Bothner <bothner@cygnus.com>
14117
14118 * jvspec.c: New file.
14119 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
14120
14121 * java-tree.h (identifier_subst): Add declaration.
14122
14123 1998-06-04 Tom Tromey <tromey@cygnus.com>
14124
14125 * jvgenmain.c (main): Generate call to JvRunMain.
14126
14127 * class.c (make_class_data): Push value for "sync_info" field.
14128 * decl.c (init_decl_processing): Push "sync_info" field.
14129
14130 1998-06-03 Per Bothner <bothner@cygnus.com>
14131
14132 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
14133 Java (source) name, not signature.
14134 Set TYPE_ALIGN to (at least) that of element_type.
14135
14136 1998-06-02 Per Bothner <bothner@cygnus.com>
14137
14138 * class.c: Moved classname-mangling-rekated code to ...
14139 * mangle.c: ... this new file.
14140 * jvgenmain.c: New program (needs mangle.c) to generate main program.
14141 * Makefile.in: Update for above changes.
14142
14143 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14144
14145 * expr.c (truthvalue_conversion): Convert integer and floating
14146 point value to their truth value.
14147 * lex.c (java_lex): Handle the `null' literal.
14148 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
14149 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14150 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
14151 New macros.
14152
14153 * parse.y: Reorganization/documentation on token declaration.
14154 (binop_lookup[]): New added new tree codes.
14155 (relational_expression): Build corresponding binary operators.
14156 (equality_expression, conditional_and_expression,
14157 conditional_or_expression): Likewise.
14158 (java_complete_class): Fix crash in debug message.
14159 (java_complete_tree): Check initialization of method call
14160 arguments. Further bogus node evaluation to detect more error
14161 during assignments. Handles more binary operators.
14162 (patch_assignment): Use DECL_P.
14163 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
14164 code.
14165 (operator_string): Handle more case. Compacted source.
14166 (patch_binop): Changed function comment. Checking for
14167 uninitialized first operand takes the compound assignment into
14168 account and uses DECL_P. Checking for uninitialized second operand
14169 delayed to routine's end. Use macros to issue type bound error
14170 messages and issue messages on both operands if their types are
14171 different. Force fixed type into node. Handle all binary
14172 operators.
14173
14174 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14175
14176 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
14177 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
14178 build operator node and return tokens.
14179 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
14180 * parse.h (java_complete_tree): Changed returned type in prototype.
14181 (build_method_invocation, build_assignment, patch_assignment,
14182 patch_binop): New static function declarations.
14183 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
14184 BUILD_EXPR_WFL): New macros.
14185 * parse.y (enum tree_code binop_lookup[]): New static for token to
14186 TREE_CODE lookup.
14187 (%union): Parser union has new sub-structure `operator'.
14188 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
14189 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
14190 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
14191 ASSIGN_ANY_TK): Tokens tagged `operator'.
14192 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
14193 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
14194 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
14195 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
14196 (assignment_operator:): Rule tagged `operator'.
14197 (expression_statement:): Re-installed default rule.
14198 (method_invocation:): Sub rules call build_method_invocation.
14199 (postfix_expression:): Don't attempt to resolve name here. Just
14200 return an ID.
14201 (multiplicative_expression:): Sub-rules build corresponding binop
14202 expression node.
14203 (additive_expression:, shift_expression:, and_expression:,
14204 exclusive_or_expression:, inclusive_or_expression:): Likewise.
14205 (assignment:): Sub rule invoke build_assignment.
14206 (assignment_operator:): Default rules on sub rules.
14207 (force_error): Added documentation on this variable.
14208 (declare_local_variables): Build initialization calling
14209 build_assignment.
14210 (expand_start_java_method): Removed unused rtx declaration. Mark
14211 arguments as already initialized.
14212 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
14213 (java_complete_expand_methods): Don't process next method if
14214 completion of the previous one triggered errors.
14215 (java_complete_expand_method): Call source_end_java_method if no
14216 error were found during completion.
14217 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
14218 locals declaratilon. Handle names found within a class. Return
14219 error_mark_node when things aren't found.
14220 (patch_method_invocation_stmt): Return error_mark_node on failures.
14221 (patch_invoke): Removed unused local. Return the correct node.
14222 (java_complete_tree): Now returns a value. The BLOCK section binds
14223 local identifiers and the type of a BLOCK is now void. Assign the
14224 result of operand completion on COMPOUND_EXPR. Assign the
14225 encapsulated node of a WFL to the result of its completion, except
14226 when the node is an identifier. Now handle MODIFY_EXPR and several
14227 binary operators. Return error_mark_node on errors.
14228 (build_method_invocation, build_assignment, patch_assignment,
14229 build_binop, operator_string, patch_binop): New functions.
14230 * typeck.c (binary_numeric_promotion): New function.
14231
14232 1998-05-21 Per Bothner <bothner@cygnus.com>
14233
14234 * class.c (identifier_subst): New convenience wrapper for ident_subst.
14235 Replace most uses of ident_subst by identifier_subst.
14236
14237 * class.c (push_class_static_dummy_field): Removed function.
14238 (build_class_ref): Find Class object decl by looking up "CNAME.class",
14239 instead of looking got "class" static field. Create that decl here.
14240 (class_identifier_node): Removed; no longer needed.
14241 (init_class_processing): Don't init class_identifier_node.
14242 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
14243 Do nreverse 0 times (instead of twice) for Object and Class.
14244 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
14245
14246 1998-05-20 Per Bothner <bothner@cygnus.com>
14247
14248 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
14249 while initializing linenumber_count and linenumber_table.
14250 Do it before init_function_start (which calls emit_line_note).
14251 * expr.c (expand_byte_code): Don't need to clear lineno here.
14252
14253 1998-05-18 Tom Tromey <tromey@cygnus.com>
14254
14255 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
14256 then mangle number as _N_.
14257
14258 * class.c (mangle_class_field): New function.
14259 (build_class_ref): Set assembler name of class reference using
14260 mangle_class_field.
14261 (push_class_static_dummy_field): Likewise.
14262
14263 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
14264
14265 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
14266 of assigning to TREE_CODE. The latter method exploits a feature
14267 of GCC that is not ANSI compliant.
14268
14269 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14270
14271 * decl.c (pushdecl_force_head): New function.
14272 (pushlevel): Removed conditional printf.
14273 (complete_start_java_method): Don't enter local variable scope if
14274 function is compiled from source code.
14275 * expr.c: parse.h now included
14276 (java_lang_expand_expr): New function.
14277 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
14278 printf. Terminate buffer when doing directories.
14279 * jcf-parse.c (parse_source_file): Call lang_init_source before
14280 parsing and before code generation.
14281 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
14282 use printf if the macro is defined.
14283 * lang.c (lang_init): Install lang_expand_expr hook on
14284 java_lang_expand_expr.
14285 (java_dummy_print): New function.
14286 (lang_init_source): New function.
14287 * lex.c (java_lex): Remember location of an opening brace at the
14288 second nesting level.
14289 (java_is_eol): Unget character seen after a CR if it is EOF.
14290 * parse.h: Now includes lex.h
14291 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
14292 printf if the macro is defined.
14293 (expand_start_java_method, build_expr_block, enter_block,
14294 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
14295 New static function declarations.
14296 (pushdecl_force_head): New extern function declaration.
14297 (INCOMPLETE_TYPE_P): New macro.
14298 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
14299 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
14300 BLOCK_EXPR_ORIGIN): New macros.
14301 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
14302 DECL_SOURCE_LINE_LAST): New macros.
14303 (struct parser_ctxt): Removed field current_method_decl, redundant
14304 with the field current_function_decl. Added fields
14305 first_ccb_indent1 and pending_block.
14306 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
14307 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
14308 tagged <node>
14309 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
14310 (compilation_unit:): Cosmetic on sub rule.
14311 (type_declaration:): Cosmetic on sub rules. Added an error rule.
14312 (variable_initializer:): Installed default rule on expression:.
14313 (method_declaration:): method_header: starts a new
14314 method. method_body: installs the function body, absorbs blocks
14315 emitted for temporary variable scopings, pops function's body block
14316 and merges function's last statement lineno in DECL_SOURCE_LINE.
14317 (method_body:): Installed default rules.
14318 (block:): Call enter_block when an opening brace is seen. Absorb
14319 scoping blocks and call exit_block when a closing brace is seen.
14320 (block_statement:): Cosmetic changes.
14321 (method_invocation:): Create WFL around CALL_EXPR node.
14322 (patch_stage): Added comment around definition.
14323 (method_header): Try to use first_ccb_indent1 as the first line of
14324 the method, so BP debug info are emitted at the first opening
14325 brace of the function. If the function has no body, use the
14326 location of the function's name. Override currently defined method
14327 name with the matching WFL so we can point redefinition errors
14328 using the location where the function's name was declared.
14329 (check_abstract_method_header): Interprets DECL_NAME as an
14330 identifier or as a WFL, accordingly.
14331 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
14332 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
14333 location and name information out of it and reinstall DECL_NAME to
14334 its original identifier node value.
14335 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
14336 function's source code).
14337 (read_import_dir): Test the value returned by find_class and issue
14338 a fatal accordingly.
14339 (declare_local_variables): Push a new block for the scope of the
14340 new variable(s) if code has been already generated at that nesting
14341 level. Pinpoint redefinition errors using the variable id
14342 WFLs. Generate initialization code if necessary. If the variable
14343 type is incomplete, register a patch on its decl.
14344 (source_start_java_method): Rewritten. Define a new block for the
14345 function's parameters. Build parameter decl out of function's
14346 arguments and register them for a patch if their types are
14347 incomplete.
14348 (expand_start_java_method): Includes the part of
14349 source_start_java_method that was pushing the parameter decls and
14350 completing the method start code.
14351 (source_end_java_method): Removed call the expand_end_bindings and
14352 poplevel (already taken care of). Reinstall function's arguments
14353 and get function's last line of code before calling
14354 expand_function_end.
14355 (java_method_add_stmt): New comment before the function's
14356 code. Complement the second operand of the current COMPOUND_EXPR
14357 if necessary.
14358 (java_complete_expand_methods): Don't generate debug info on line
14359 zero when expanding a generated constructor.
14360 (java_complete_expand_method): Set start and end line numbers for
14361 a artificially generated constructor to one and manually call
14362 enter_block and exit_block when defining it. For all methods:
14363 expand function's start calling the new expand_start_java_method
14364 and invoke java_complete_tree on the effective method's body, if
14365 any.
14366 (resolve_expression_name): Now use lookup_name_in_blocks to search
14367 local variable decls and print out an error when variables are
14368 undefined.
14369 (patch_method_invocation_stmt): Inserted comment before the
14370 function's code.
14371 (lookup_method_invoke): Chain method's arguments using chainon
14372 with the current arg list as a second argument. Inserted missing
14373 IDENTIFIER_POINTER when reporting an error on methods not found.
14374 (refine_accessible_methods_list): Don't retain constructors.
14375 (patch_arguments): Function removed.
14376 (java_complete_tree): Inserted comment before the function's
14377 code. New case for BLOCKs. Moved the WFL case a bit
14378 further. Complete function's arguments.
14379 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
14380 maybe_absorb_scoping_blocks): New functions.
14381
14382 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14383
14384 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
14385 previously set.
14386 * jcf-parse.c (parse_source_file, java_error_count): New forward
14387 and extern declarations.
14388 (java_parse_abort_on_error): Macro moved.
14389 (jcf_parse_source): fatal called if fopen fails. Now calls
14390 parse_source_file.
14391 (parse_source_file): New parse_only parameter. Reflects the
14392 elimination of the second pass.
14393 (yyparse): parse_source_file called with argument set to 0.
14394 * jcf.h (JCF_ZERO): Sets java_source to zero.
14395 * lex.c (java_init_lex): pass argument is gone. Function modified
14396 to be called once during the analysis of a file.
14397 (java_unget_unicode): Fixed typo in fatal message.
14398 (java_get_line_col): Likewise.
14399 (java_lval): Likewise. String literals no longer built during
14400 second pass.
14401 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
14402 account.
14403 * parse.h (MODIFIER_WFL): New macro.
14404 (parse_check_super, parser_check_super_interface): Now return int.
14405 (parser_chain_incomplete_item, not_builtin_p,
14406 complete_method_decl): Declarations removed.
14407 (build_method_invocation_stmt, build_invoke): Renamed using the
14408 `patch' instead of `build'
14409 (register-incomplete_type, obtain_incomplete_type,
14410 java_complete_tree, java_complete_expand_method,
14411 unresolved_type_p, create_jdep_list): New function declarations.
14412 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
14413 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
14414 (jdep): New typedef on new struct _jdep.
14415 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
14416 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
14417 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
14418 JDEP_RESOLVED_P): New macros.
14419 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
14420 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
14421 JDEP_VARIABLE): New enum values and jdep kinds.
14422 (jdeplist): New typedef on struct _jdeplist.
14423 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
14424 macros.
14425 (CALL_EXPR_PRIMARY): New macro.
14426 (struct parser_ctxt): Fields java_pass, current_method_decl,
14427 method_decl_list deleted. New field jdeplist.
14428 (INCOMPLETE_P): Macro deleted.
14429 * parse.y (single_type_import_declaration:): Removed pass switch.
14430 (type_import_on_demand_declaration): Likewise.
14431 (field_declaration:): Removed pass switch on all sub rules.
14432 (class_declaration:): Call the complete_class_decl removed on
14433 class_body rules.
14434 (method_declaration:): Removed second pass switch. No longer chain
14435 methods decl when method_header reduced.
14436 (method_header:): Sub rules no longer depend on pass switch.
14437 (method_declarator:): Likewise.
14438 (method_body:): Likewise.
14439 (abstract_method_declaration:): Likewise.
14440 (block_statement:): Likewise.
14441 (local_variable_declaration:): Likewise.
14442 (argument_list:): Likewise.
14443 (method_invocation:): Likewise. Call to build_method_invocation_stmt
14444 removed. Partial CLASS_EXPR tree node built instead.
14445 (postfix_expression:): Removed pass switch on all sub rules.
14446 (java_pop_parser_context): Free classd_list content.
14447 (yyerror): Call obstrack_grow0 to finalize error message.
14448 (check_class_interface_creation): Comment modified to reflect new
14449 returned value meaning. Removed second pass switch. Return 1 if an
14450 error was found, 0 otherwise. Adjust pointer on filename if a
14451 leading path separator was found.
14452 (maybe_create_class_interface_decl): Removed first pass switch
14453 when linking the class decl to the class_list. Install a new
14454 jdep_list for the class.
14455 (add_superinterfaces): List of unresolved interfaces is
14456 gone. Unresolved interfaces are directly added to the current
14457 dependencies list.
14458 (create_interface): Second pass shortcut removed.
14459 ctpx->modifier_ctx access through MODIFIER_WFL.
14460 (create_class): Second pass shortcut removed. Call to
14461 register_incomplete_type replaces the call to
14462 parser_chain_incomplete_item.
14463 (complete_class_decl): Function removed.
14464 (duplicate_declaration_error): New way of retrieving redeclared
14465 item type.
14466 (register_fields): Call to lookup_modifier_cl replaced by
14467 MODIFIER_WFL. New way of handling unresolved type, using
14468 unresolved_type_p and obtain_incomplete_type.
14469 register_incomplete_type replaces call to parser_chain_incomplete_item.
14470 (patch_stage): New static global variable.
14471 (method_header): New way of handling unresolved type, using
14472 unresolved_type_p and obtain_incomplete_type. patch_stage used to
14473 indicates that the method decl needs to be patched.
14474 (check_abstract_method_header): Call to lookup_modifier_cl
14475 replaced by MODIFIER_WFL.
14476 (method_declarator): Incomplete argument type are registered
14477 calling register_incomplete_type. Patch on the declared method is
14478 issued in that case.
14479 (unresolved_type_p): New function.
14480 (parser_check_super_interface): New comment to reflect function's
14481 modified returned type (int). Function and has a new argument
14482 this_wfl. Call to parse_error_context uses this_wfl instead of
14483 relying on lookup_cl.
14484 (parser_check_super): Comment reflects function's new returned
14485 type (int). Function returns nonzero value on error.
14486 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
14487 register_incomplete_type, jdep_resolve_class): New functions to
14488 handle incomplete types in declarations.
14489 (java_complete_class): Rewritten to work with the new incomplete
14490 type handling scheme.
14491 (complete_class_report_errors): Likewise.
14492 (complete_method_decl): Removed: it jobs is now handled by
14493 java_complete_class.
14494 (do_resolve_class): Class loaded in not already loaded and not
14495 found in Java source code.
14496 (java_check_regular_methods, java_check_abstract_methods): Don't
14497 call complete_method_decl anymore.
14498 (lookup_modifier_cl, not_builtin_p): Functions deleted.
14499 (read_import_dir): Got rid of the pass number dependency.
14500 (declare_local_variables): New handling of unresolved types (patch
14501 issued).
14502 (source_start_java_method): New parameter level. Function called
14503 with level set to 1 when argument types are potentially
14504 unresolved. Called to complete the job with level set to 2 once
14505 types are complete.
14506 (source_end_java_method): Call to permanent_allocation
14507 removed. Waiting to be replaced by a more suitable obstack
14508 management.
14509 (java_complete_expand_methods, java_complete_expand_method,
14510 java_expand_finals): New functions.
14511 (build_method_invocation_stmt): Renamed
14512 patch_method_invocation_stmt. Extracts function call expression
14513 (wfl) and arguments (args) from CALL_EXPR tree operands.
14514 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
14515 call. Patch the function and argument operand of the CALL_EXPR
14516 tree argument.
14517 (patch_argument, java_complete_tree): New functions.
14518
14519 1998-04-20 Per Bothner <bothner@cygnus.com>
14520
14521 Recover from missing fields and methods (i.e. error instead of fatal).
14522 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
14523 * expr.c (expand_invoke): Recover from missing method.
14524 (expand_java_field_op): Recover from missing field.
14525 Inline references to java.lang.{Integer,Char,...}.TYPE.
14526 * typeck.c (get_type_from_signature), java-tree.h: New function.
14527 * class.c (add_method): Use get_type_from_signature.
14528 (build_class_ref): Handle a class that was not found.
14529 * typeck.c (convert): Handle conversion to pointers (for convenience).
14530 * verify.c (verify_jvm_instructions): Use get_type_from_signature
14531 instead of lookup_field to handle missing fields.
14532
14533 * jcf-parse.c (process_zip_dir): Set java_source.
14534
14535 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
14536
14537 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
14538
14539 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14540
14541 * jcf-parse.c (load_class): Don't change input_filename before
14542 calling jcf_parse_source (but still do it before calling
14543 jcf_parse).
14544 (jcf_parse_source): Assign input_filename after having saved the
14545 parser context.
14546 * lex.c (java_init_lex): Chain a WFL node to the import on demand
14547 list. ctxp->modifier_ctx zeroed according to its new
14548 definition. ctxp->filename initialized. Removed
14549 JAVA_MODIFIER_CTX_UNMARK.
14550 (java_unget_unicode): Update the character based column position.
14551 (java_allocate_new_line): ref_count not used anymore. Always free
14552 ctxp->p_line. Initialize c_line->char_col to 0.
14553 (java_get_unicode): Update the character based column position.
14554 (java_lex): Use ctxp->elc to store current position in source
14555 file, at the beginning of the parsed token. Set modifier_ctx entry
14556 corresponding to the parse modifier to a WFL node. Return a WFL
14557 node when an identifier is parsed.
14558 (java_lex_error): Now uses ctxp->elc to store current position in
14559 source.
14560 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
14561 * lex.h (build_wfl_node): New function definitions.
14562 (struct java_line): ref_count and next fields are gone. New field
14563 char_col.
14564 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
14565 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
14566 (JAVA_COLUMN_DELTA): New macro.
14567 (java_lc): New typedef on new struct _java_lc.
14568 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
14569 (parse_error_context, parse_warning_context): Changed prototypes.
14570 (java_get_line_col): Added as an available global function.
14571 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
14572 (IC_DECL): Replaced by macro IC_TYPE
14573 (DEPEND_WFL): New macro.
14574 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
14575 wrong modifier.
14576 (exit_java_complete_class): Removed a commented out statement.
14577 (struct parser_ctxt): Added comments on fields. modifier_ctx is
14578 now an array of tree nodes. Deleted fields line_list and
14579 e_line. New field elc, to replace e_line.
14580 * parse.y (array_type:): Build WFL node.
14581 (qualified_name:): Build a single WFL node out of two. Retain
14582 the location information of the first node in the resulting node.
14583 (package_declaration:): Use package name as a WFL node
14584 (single_type_import_declaration:): Use imported name as a WFL node.
14585 (type_import_on_demand_declaration:): Use root of the imported
14586 packages as a WFL node.
14587 (field_declaration:): Removed unused local variable cl.
14588 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
14589 (yyerror): New static elc. Removed static error_line, error_pos.
14590 New local code_from_source. Save ctxp->elc into elc at the first
14591 pass. Call java_get_line_col to get a string of the line where
14592 the error occurred.
14593 (debug_line): Removed static function.
14594 (parse_error_context, parse_warning_context): Parameter cl is now
14595 a WFL node. Use its value to initialize ctxp->elc.
14596 (redefinition_error): Parameter cl is now a WFL node.
14597 (parse_add_interface): New parameter wfl. No longer call
14598 lookup_cl, use wfl instead.
14599 (check_class_interface_creation): Parameter cl is now a WFL node.
14600 (maybe_create_class_interface_decl): Likewise.
14601 (add_superinterfaces): New function.
14602 (create_interface): Removed local cl, node, super_decl,
14603 super_decl_type. Function now uses id as a WFL node. Better
14604 warning/error report on obsolete or forbidden mix of
14605 modifiers. Now calls add_superinterfaces to register interfaces.
14606 (create_class): Removed local cl, node. Local variable id is used
14607 as a WFL node. Better error report on forbidden modifier
14608 mix. Uses add_superinterfaces to register interfaces.
14609 (find_field): Argument cl is now a WFL node. Now store the WFL
14610 node of a fields that needs to be checked for their
14611 initialization.
14612 (method_header): Local variable node non longer used. Local
14613 variable id replaces cl.
14614 (check_modifiers_consistency): Local variable cl is now a WFL
14615 node.
14616 (method_declarator): Local variable cl replaced by parameter id.
14617 (parser_qualified_name): Now uses parameter name as a WFL node.
14618 (parser_check_super_interface): New parameter wfl, for achieve
14619 greater accuracy during error reports.
14620 (parser_chain_incomplete_item): New parameter named location. Used,
14621 along the decl, to construct the incomplete item node.
14622 (java_complete_class): resolve_class now uses WFL node extracted
14623 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
14624 where appropriate.
14625 (complete_method_decl): Unresolved function's argument types are WFL.
14626 (resolve_class): Parameter cl is now a WFL node.
14627 (resolve_and_layout): Likewise.
14628 (do_resolve_class): Likewise. Try first to use cl and then do the
14629 lookup on the decl when calling check_pkg_class_access.
14630 (complete_class_report_errors): Use IC_TYPE in place of
14631 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
14632 instead of doing a lookup over the decl.
14633 (java_check_final): Use WFL info from field tree list.
14634 (lookup_cl): Rewritten and returns a statically defined WFL node.
14635 (lookup_modifier_cl): Now uses information from WFL nodes.
14636 (process_imports): Likewise.
14637 (read_import_dir): name and cl arguments replaced by a single WFL
14638 node. Function modified accordingly.
14639 (find_in_imports_on_demand): Now uses WFL node.
14640 (check_pkg_class_access): cl argument is now a WFL node.
14641 (declare_local_variables): Fixed to use WFL nodes.
14642 (resolve_expression_name): Likewise.
14643 (build_method_invocation_stmt): name_combo argument renamed
14644 wfl. Function modified to use WFL nodes.
14645 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
14646 (lookup_method_invoke): cl is now a WFL node. Added missing
14647 IDENTIFIER_POINTER to class type decl name.
14648
14649 1998-04-14 Dave Brolley <brolley@cygnus.com>
14650
14651 * lang.c (init_parse): Now returns char* containing the filename.
14652
14653 1998-04-10 Per Bothner <bothner@cygnus.com>
14654
14655 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
14656
14657 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
14658 * class.c (make_class_data): If flag_assume_compiled, initial class
14659 state is CSTATE_PREPARED; make superclass and interfaces direct
14660 references, rather than constant pool indexes.
14661
14662 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14663
14664 * parser.y: Include flags.h. Removed debug variable pl.
14665 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
14666 (block:): Likewise.
14667 (labeled_statement_nsi:): Generate debug info when reducing
14668 expression_statement:.
14669 (check_pkg_class_access): get_access_flags_from_decl invocation
14670 fixed for new CLASS_* flags location.
14671 (source_end_java_method): Save/restore parser context when
14672 entering/leaving this routine. Restore lineno to its right value
14673 before calling expand_end_bindings.
14674 (build_method_invocation_stmt): build_invoke called with the
14675 current line information.
14676 (build_invoke): New argument cl. Wrap the function call around a
14677 wfl node.
14678 (refine_accessible_methods_list): Changed comment, removed
14679 unnecessary code.
14680 * parse.h: Fixed typo in comments.
14681 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
14682 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
14683 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
14684 parser_ccb_indent.
14685 * lex.c (java_lex): Record the last closing curly bracket of a
14686 function.
14687 * jcf-parse.c (jcf_parse_source): Now calls
14688 java_check_methods. Clarified comment, fixed typo.
14689
14690 1998-04-09 Dave Brolley <brolley@cygnus.com>
14691
14692 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
14693 (finish_parse): Expose for non USE_CPPLIB builds.
14694
14695 1998-04-08 Jeffrey A Law (law@cygnus.com)
14696
14697 * lang.c (lang_print_xnode): New function.
14698
14699 1998-04-03 Per Bothner <bothner@cygnus.com>
14700
14701 * decl.c (class_dtable_decl), java-tree.h: New tree node.
14702 * class.c (get_dispatch_vector, get_dispatch_table): New functions
14703 used to build a class's dispatch table.
14704 (make_class_data): Generate dispatch table if flag_assume_compiled.
14705 Set dtable of class object to address of class_dtable_decl.
14706
14707 * decl.c (int_decl_processing): Make soft_badarrayindex_node
14708 be volatile and have side effects - generates better code.
14709
14710 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
14711 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
14712
14713 * expr.c (expand_invoke): If class is final, method is
14714 effectively final, so can call it directly.
14715
14716 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
14717
14718 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
14719
14720 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14721
14722 * parse.y (build_method_invocation_stmt): Removed extra argument
14723 to build_invoke.
14724
14725 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14726
14727 * expr.c (dtable_indent): Now static global.
14728 (expand_invoke): Now call invoke_build_dtable and
14729 build_invokevirtual.
14730 (invoke_build_dtable, build_invokevirtual): New functions.
14731 * jcf-io.c (find_class): Defer issuing a warning by setting
14732 jcf->outofsynch to 1.
14733 * jcf-parse.c (jcf_out_of_synch): New function.
14734 (load_class): Test this_jcf.outofsynch flag and call
14735 jcf_out_of_synch accordingly.
14736 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
14737 comment indentation.
14738 * lex.c (java_get_unicode): Fixed code indentation.
14739 (java_lex): Create string literal. Fixed typo. Removed several
14740 premature obstack_free.
14741 * parse.h: New enums for name resolution and invocation mode.
14742 (struct qualification): New data structure.
14743 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
14744 (do_resolve_class, build_method_invocation_stmt,
14745 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
14746 debug_line, identical_subpath_p, invocation_mode,
14747 refine_accessible_methods_list, build_invoke,
14748 lookup_method_invoke): New functions declared.
14749 (build_invokevirtual, invoke_build_dtable, match_java_method,
14750 build_field_ref, jcf_out_of_synch): New references to external
14751 functions.
14752 (struct parse_ctxt): Removed artificial_constructor field.
14753 * parse.y: (array_type:): Type defined for this rule.
14754 (class_type:): Installed default rule for interface_type:.
14755 (array_type:): Now build Java array type.
14756 (qualified_name:): Now use obstack_grow0.
14757 (method_declaration:): Skip the artificial constructor added to
14758 the list, if any.
14759 (abstract_method_declaration:): Execute the code only during pass 1.
14760 (block:): Installed default rule in block_statements:.
14761 (block_statement:): Add the statement to the method during pass 2.
14762 (statement_expression): Installed default rule for
14763 method_invocation:.
14764 (argument_list:): Added code to build the argument list.
14765 (method_invocation:): Added call to create the method invocation
14766 node.
14767 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
14768 (debug_line): New function for debug.
14769 (complete_class_decl): No longer do something during pass 1.
14770 (method_header): Use BUILD_PTR_FROM_NAME.
14771 (parser_qualified_classname): Use obstack_grow0. Removed bogus
14772 obstack_free.
14773 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
14774 function's main comment.
14775 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
14776 classes.
14777 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
14778 (resolve_class): Now works with arrays.
14779 (do_resolve_class, resolve_and_layout): New functions.
14780 (java_check_regular_methods): Reverse method list before and after
14781 having processed it. No longer set ctxp->artificial_constructor.
14782 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
14783 accordingly. Fixed typo in issued error message. Now use
14784 obstack_grow0.
14785 (find_in_imports_on_demand): Now use obstack_grow0.
14786 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
14787 (source_end_java_method): Call expand_expr_stmt instead of
14788 expand_expr. Calls it before calling expand_function_end.
14789 (java_method_add_stmt): Do nothing if errors were found during
14790 parsing.
14791 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
14792 (build_method_invocation_stmt, build_invoke, invocation_mode,
14793 lookup_method_invoke, refine_accessible_methods_list,
14794 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
14795 New functions.
14796 * typeck.c (build_java_signature): Properly end method signature
14797 if return type skipped.
14798 (match_java_method): New function.
14799
14800 1998-03-16 Per Bothner <bothner@cygnus.com>
14801
14802 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
14803
14804 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14805
14806 * expr.c (build_invoke_non_interface): New function.
14807 (methods_ident, ncode_ident): Now static globals.
14808 (expand_invoke): Use build_invoke_non_interface.
14809 * java-tree.h (struct lang_decl): New field function_decl_body.
14810 (DECL_FUNCTION_BODY): New macro.
14811 * jcf-parse.c (jcf_parse_source): Deeper check before setting
14812 CLASS_FROM_SOURCE_P.
14813 (parse_source_file): Fixed typos. Call java_layout_parsed_class
14814 before starting pass 2. Call to java_generate_parsed_class replaced
14815 by java_register_parsed_class.
14816 * lex.c: Fixed typo in header. Some line width related formating.
14817 * lex.h: Some line width related formating.
14818 * parse.h (source_end_java_method, resolve_expression_name,
14819 complete_class_decl, maybe_create_class_interface_decl,
14820 check_class_interface_creation): New static function declarations.
14821 (java_layout_parsed_class, java_method_add_stmt): New function
14822 declarations.
14823 (struct parser_ctxt): Field mark_class_generate removed. New
14824 fields class_list and artificial_constructor.
14825 * parse.y: Fixed typo in header.
14826 (class_declaration:): Call complete_class_decl when class body
14827 parsed.
14828 (method_declaration:): Call source_end_java_method in pass 2 when
14829 the method body is defined.
14830 (postfix_expression:): Do expression name resolution on sub-rule
14831 name during pass 2.
14832 (create_class, create_interface): Merged common pieces.
14833 (check_class_interface_creation, maybe_create_class_interface_decl):
14834 New functions.
14835 (complete_class_decl): New function.
14836 (register_fields): Fixed line width related typo.
14837 (method_header): Correctly skip first argument when fixing
14838 argument line. Changed the loop.
14839 (java_check_circular_reference): Now use ctxp->class_list.
14840 (java_complete_class): Removed start/stop marking.
14841 (java_check_regular_methods): Now takes a class decl as an
14842 argument. Add default constructor if none were encountered.
14843 (java_check_methods): Now use ctxp->class_list. Changed call to
14844 java_check_regular_methods.
14845 (source_start_java_method): Set DECL_ARG_TYPE for each function
14846 arguments.
14847 (source_end_java_method, java_method_add_stmt): New functions.
14848 (java_generate_parsed_class): No longer exists.
14849 (java_layout_parsed_class, java_register_parsed_class): New functions.
14850 (resolve_expression_name): New function.
14851
14852 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
14853
14854 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
14855 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
14856 until pass initializations are done. Call read_import_dir with
14857 pass set to 0.
14858 * parse.h: (lookup_modifier_cl): New function declared.
14859 (INTERFACE_FIELD_MODIFIERS): New macro.
14860 (OBSOLETE_MODIFIER_WARNING): New macro.
14861 * parse.y: (register_fields): Class type and current field name in
14862 local variables. Check modifier(s) if adding field(s) to an interface.
14863 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
14864 and report errors using the faulty modifier line context.
14865 (lookup_modifier_cl): New function.
14866 (read_import_dir): Detect and report default import processing
14867 failure.
14868
14869 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
14870
14871 Add a pair of -fassume-compiled/-fno-assume-compiled options.
14872 * class.c (is_compiled_class): Return 1 after making sure it
14873 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
14874 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
14875 * java-tree.h (flag_assume_compiled): Add decl.
14876 * lang.c (lang_f_options): Add the flag.
14877 (flag_assume_compiled): Add decl, default to 0.
14878
14879 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14880
14881 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
14882 (is_compiled_class): Likewise.
14883 (layout_class): Likewise.
14884 (layout_class): Detect and lay out classes defined in source code.
14885 (interface_of_p, add_interface_do, may_add_interface): New
14886 function.
14887 (add_interface): Now use add_interface_do.
14888 (add_method_1): New function.
14889 (add_method): Now use add_method_1.
14890 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
14891 (complete_start_java_method): New function.
14892 (start_java_mehod): Now call complete_start_java_method.
14893 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
14894 (expand_invoke): Likewise and fixed typo.
14895 *gjava.c: (print_super_field): Use new argument to find_class
14896 DO_CLASS_FILE.
14897 (main): Likewise.
14898 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
14899 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
14900 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
14901 IDENTIFIER_NODE.
14902 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
14903 (add_method_1, push_class): New prototypes.
14904 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
14905 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
14906 directory where the class was found.
14907 (find_class): New argument DO_CLASS_FILE. Function find_class
14908 modified accordingly.
14909 *jcf-parse.c: (fix_class_path): New function.
14910 (load_class): Use new VERBOSE argument. load_class now finds and
14911 loads/parses .class/.java files. Save read_state of current_jcf
14912 if necessary.
14913 (java_parser_abort_on_error): New macro.
14914 (jcf_parse_source, parse_source_file): New function.
14915 (jcf_parse): Fixed typo.
14916 (yyparse): Call parse_source_file () only.
14917 (process_zip_dir): Fixed typo, fix zdir->filename_length when
14918 writing the real class name back in the zip directory entry.
14919 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
14920 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
14921 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
14922 (find_class): Prototype fixed.
14923 *lex.c: Added 1998 time stamp.
14924 Removed all static global variables, moved into the parser
14925 context data structure.. Now include unistd.h if SEEK_SET not
14926 defined.
14927 (java_init_lex): Rewritten.
14928 (java_sneak_unicode): Modified current unicode access in current line.
14929 (java_unget_unicode): Likewise.
14930 (java_allocate_new_line): New allocation management.
14931 (java_read_char): Modified access and storage of unget_utf8_value.
14932 New way of processing current unicode.
14933 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
14934 (java_get_unicode): Now use the parser context.
14935 (java_lineterminator): Likewise.
14936 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
14937 of the reentrant parser implementation. Function now use the
14938 parser context data structure and java_lval. Fixed production of
14939 the float and double constant "out of range" error message. Fixed
14940 obstack use. Return integer value when hitting a modifier. Now
14941 return type for TRUE, FALSE and other predefined types. Return
14942 identifier as a TREE_LIST list containing the current line context
14943 as the TREE_VALUE sub-node.
14944 (java_unicode_2_utf8): Fixed typo in declaration.
14945 (java_lex_error): Now use the parser context data structure.
14946 *lex.h: Added 1998 time stamp.
14947 (struct java_line): New fields ref_count and next.
14948 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
14949 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
14950 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
14951 *parse.h: Added 1998 time stamp.
14952 (java_parse_source_file): Renamed from parse_source_file.
14953 (YYERROR_NOW, YYNOT_TWICE): Fixed.
14954 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
14955 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
14956 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
14957 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
14958 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
14959 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
14960 (struct parser_ctxt): New data structure to keep the parser context.
14961 *parse.y: Added 1998 time stamp, got rid of static global variables.
14962 (java_error_count, ctxp): New global variables.
14963 (%union): New value field.
14964 (numeric_type, integral_type): Rules removed.
14965 (primitive_type): Rule defined to handle integral, float, double and
14966 boolean types.
14967 (qualified_name, package_declaration,
14968 single_type_import_declaration, type_import_on_demand_declaration,
14969 modifiers, class_declaration, super, interfaces,
14970 interface_type_list, class_body, field_declaration,
14971 field_declaration, variable_declarators, variable_declarator,
14972 variable_declarator_id, method_declaration, method_header,
14973 formal_parameter_list, formal_parameter, method_body, block,
14974 static, interface_declaration, extends_interfaces,
14975 abstract_method_declaration, local_variable_declarators): Rules now
14976 define actions.
14977 (force_error, do_warning): New global statics.
14978 (push_parser_context, parser_context_save_global,
14979 parser_context_restore_global, pop_parser_context): New functions.
14980 (yyerror): Now uses the global parser context. Fixed use of obstack.
14981 (parse_error, parse_error_context, parse_warning_context,
14982 java_accstring_lookup, redefinition_error, check_modifiers,
14983 parser_add_interface, create_interface, create_class, find_field,
14984 duplicate_declaration_error, register_fields, method_header,
14985 check_modifiers_consistency, check_abstract_method_header,
14986 method_declarator, parser_qualified_classname,
14987 parser_check_super_interface, parser_check_super,
14988 parser_chain_incomplete_item, java_check_circular_reference,
14989 layout_class_from_source, java_complete_class,
14990 complete_method_decl, resolve_class, complete_class_report_errors,
14991 java_check_final, check_method_redefinition,
14992 java_check_regular_methods, java_check_abstract_methods,
14993 java_check_methods, lookup_java_interface_method2,
14994 lookup_java_method2, lookup_cl, find_name_in_single_imports,
14995 process_imports, find_in_imports, read_import_entry,
14996 read_import_dir, find_in_imports_on_demand,
14997 check_pkg_class_access, not_builtin_p, declare_local_variables,
14998 source_start_java_method, java_generate_parsed_class): New
14999 functions.
15000 *typeck.c: (signature_include_return): New global variable.
15001 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
15002 to add the function returned type in the signature.
15003
15004 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
15005
15006 * jcf-io.c (open_in_zip): Use strncmp and LEN.
15007
15008 1998-01-29 Dave Brolley <brolley@cygnus.com>
15009
15010 * Make-lang.in (java.info): Added.
15011 (java.install-info): Added
15012
15013 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
15014
15015 * Makefile.in (clean): Also remove java/parse.c.
15016
15017 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
15018
15019 Add a pair of -fbounds-check/-fno-bounds-check options.
15020 * lang.c (lang_decode_option): Add code to grok arguments.
15021 (flag_bounds_check): Add decl.
15022 (lang_f_options): New array w/ the option in it.
15023 * java-tree.h (flag_bounds_check): Add decl.
15024 * lang-options.h: New file.
15025 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
15026 of a static macro value.
15027 (JAVA_ARRAY_EXCEPTION): Delete macro.
15028
15029 1998-01-23 Per Bothner <bothner@cygnus.com>
15030
15031 * typeck.c (build_java_array_type): Fix two bugs in previous change.
15032 * expr.c (build_anewarray): Add missing promote_type.
15033
15034 1998-01-22 Per Bothner <bothner@cygnus.com>
15035
15036 Add array types with known length to optimize bounds checking.
15037 * typeck.c (build_java_array_type): Take length parameter.
15038 (java_array_type_length, build_prim_array_type): New functions.
15039 * java-tree.h: Update for new functions.
15040 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
15041 * class.c: Use build_prim_array_type.
15042 * expr.c (can_widen_reference_to): Handle known-length array types.
15043 (verify_jvm_instructions): Keep track of integer push instructions
15044 followed by newarray/anewarray, so we can build known-length arrays.
15045 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
15046 (java_array_data_offset): New function.
15047 (build_java_array_length_access): New function. Optimize if constant.
15048 (build_java_arrayaccess): Constant fold bounds check.
15049 (expand_java_newarray, expand_java_anewarray): Replaced by ...
15050 (build_newarray, build_anewarray): New functions.
15051 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
15052 * verify.c (merge_types): Handle known-lengh array types.
15053
15054 1998-01-19 Per Bothner <bothner@cygnus.com>
15055
15056 * expr.c (expand_byte_code): Fix performace bug, which caused
15057 searching linenumber_table to be linear rather than constant.
15058
15059 1997-12-12 Per Bothner <bothner@cygnus.com>
15060
15061 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
15062
15063 * decl.c, java-tree.h (soft_fmod_node): New global.
15064 * decl.c (init_decl_processing): Define __builtin_fmod.
15065 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
15066 using __builtin_fmod.
15067
15068 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
15069
15070 * keyword.h: New file, output of keyword.gperf as processed by
15071 gperf.
15072 * lex.c (java_lex_init): Initialize java_error_flag.
15073 * parse.c (YYERROR_NOW): Uses java_error_flag.
15074 * parse.y: New static java_error_flag. Useless definition of
15075 buffer_error gone.
15076 * parse.y (java_error): Portable error recovery using
15077 java_error_flag (not yet completely tuned).
15078
15079 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
15080
15081 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
15082
15083 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
15084
15085 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
15086 (parse.c, lex.c, keyword.h): New rules for Java source code
15087 front-end.
15088 * parse.c: Renamed into jcf-parse.c.
15089 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
15090 * keyword.gperf: New file, Java keywords.
15091 * parse.y: New file, Java language grammar.
15092 * parse.h: New file, Java language grammar definitions.
15093 * lex.c: New file, Java language lexer.
15094 * lex.h: New file, Java language lexer definitions.
15095
15096 1997-12-03 Per Bothner <bothner@cygnus.com>
15097
15098 * decl.c (clinit_identifier_node), java-tree.h: New global.
15099 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
15100 * verify.c (verify_jvm_instructions): Inline use of removed macros.
15101 * expr.c (expand_java_field_op): Check for invalid assignment
15102 to final field.
15103
15104 * jcf-reader.c (get_attribute): Test for wrong attribute length.
15105
15106 1997-10-27 Per Bothner <bothner@cygnus.com>
15107
15108 * verify.c (verify_jvm_instructions): When processing a handler,
15109 attempt to set the current_subr to the right value.
15110 (More complicated code combines Sep 17 and Oct 22 versions.)
15111
15112 1997-10-24 Per Bothner <bothner@cygnus.com>
15113
15114 * class.c (push_class): Figure out (guess) name of source file.
15115 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
15116 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
15117 (parse_class_file): Change return type from int to void.
15118 Call debug_start_source_file/debug_end_source_file.
15119
15120 * expr.c (build_java_binop): Fix masking 2nd operand.
15121 * decl.c (init_decl_processing): Set sizetype first.
15122
15123 1997-10-22 Per Bothner <bothner@cygnus.com>
15124
15125 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
15126 (Revert Sep 17 change.)
15127
15128 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15129
15130 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
15131 .class extension in their name and fix thing so we don't process
15132 them parse_zip_file_entries().
15133 (parse_zip_file_entries): Cleaned unused local variables.
15134
15135 1997-10-20 Per Bothner <bothner@cygnus.com>
15136
15137 * expr.c (can_widen_reference_to): Allows equal array element types.
15138 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
15139 * jcf-dump.c (RET): Get (and print) index.
15140
15141 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
15142 Promote element type to POINTER_TYPE.
15143
15144 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15145
15146 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
15147 find_in_current_zip, jcf_figure_file_type): Moved from
15148 jcf-reader.c to parse.c.
15149 * zextract.c: (read_zip_archive): takes file_comment_length possible
15150 field into account.
15151
15152 1997-10-20 Per Bothner <bothner@cygnus.com>
15153
15154 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
15155
15156 * verify.c (merge_types): Handle array types even better ...
15157
15158 1997-10-17 Per Bothner <bothner@cygnus.com>
15159
15160 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
15161
15162 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
15163 * class.c (make_class_data): Don't build fields_decl if no fields.
15164 When building fields_decl, skip if DECL_ARTIFICIAL.
15165
15166 * expr.c (java_stack_swap): Update stack_type_map.
15167 * verify.c (merge_types): Handle array types better.
15168
15169 1997-10-15 Per Bothner <bothner@cygnus.com>
15170
15171 * class.c (add_field): Don't promote short integral fields to
15172 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
15173 * expr.c (push_value): Promote and convert short integral values.
15174
15175 * decl.c, java-tree.h (integer_two_node): New constant node.
15176 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
15177
15178 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
15179
15180 * class.c (append_gpp_mangled_type): Use function argument
15181 unpromoted type to generate mangled name.
15182
15183 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
15184
15185 * constants.c (build_constant_data_ref): Now uses current_class
15186 instead of main_class.
15187 (build_constants_constructor): Now uses current_class instead of
15188 main_class.
15189 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
15190 of the global variable SeepZipFiles done here.
15191 * zextract.c (read_zip_archive): extra_field optional field taken
15192 into account while computing the position of the class file in the
15193 archive.
15194 * verify.c (verify_jvm_instructions): Use current_jcf to search
15195 the constant pool.
15196 * parse.c (load_class): First search for the class to load in the
15197 current zip file. Saves current_jcf (restored before returning
15198 from that function). Don't call JCF_FINISH in the class was found
15199 in the current ZIP file.
15200 (jcf_parse): If the class was found in the current ZIP file, save
15201 its tree_constant_pool (for later reuse).
15202 (parse_class_file): New function. Process each method defined in
15203 the current class and record the class as to be later registered.
15204 (yyparse): Rewritten. Figure the type of the current file and switch
15205 accordingly.
15206 * lang.c: New global variable current_jcf.
15207 (lang_init): Removed compiling_from_source test (done later, in
15208 yyparse). Removed call the jcf_parse ().
15209 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
15210 (typedef struct JCF): New fields seen_in_zip (to mark a class found
15211 in the current ZIP file) and zip_offset (offset to the class data in
15212 the current zip file).
15213 * jcf-reader.c: zipfile.h included.
15214 localToFile: New ZipFileCache static global variable
15215 (parse_zip_file_entries): New function. Browse the current ZIP
15216 file directory and process each class found.
15217 (process_zip_dir): New function. Register each class found in the
15218 ZIP file directory. The class aren't parsed but a valid JCF is
15219 link to each of them.
15220 (find_in_current_zip): New function. Search for a class in the
15221 current ZIP file directory. If found, prepare the class so that it
15222 can be loaded.
15223 (jcf_figure_file_type): New function. Examine the file structure
15224 to figure a class file, a ZIP file. If none of these categories are
15225 matched, a source file is assumed.
15226 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
15227 SeenZipFile: New global variable.
15228 (open_in_zip): Use zipmember's length to accelerate the search for
15229 a member. If zipmember was NULL and zip file successfully read,
15230 return 0.
15231 * java-tree.h: New global variable current_jcf declared. Added
15232 declaration for current_constant_pool_tags, current_constant_pool_data,
15233 current_constant_pool_length, current_constant_pool_data_ref.
15234 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
15235 store the JCF of classes seen in a zip file) and tree *constant_pool
15236 (to save a loaded class constant pool). current_class declared here.
15237 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
15238 retrieve method_ref_constant.
15239 (PUSHC): java_push_constant_from_pool now uses current_jcf.
15240 (OBJECT): get_class_constant now uses current_jcf.
15241 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
15242 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
15243 (expand_invoke): Now uses current_class instead of main_class
15244 (build_class_init): Now uses current_class instead of main_class
15245 * class.c: New static global variable registered_class.
15246 (register_class): New function.
15247 (emit_register_class): Modified to use registered_class instead of
15248 main_class
15249 (is_compiled_class): Now take into account class seen in the archive.
15250
15251 1997-10-06 Per Bothner <bothner@cygnus.com>
15252
15253 * except.h: Renamed to: java-except.h.
15254 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
15255 * except.c: Add semi-working (commented out) implementation.
15256
15257 * expr.c (expand_iinc): Add needed flush_quick_stack.
15258 * parse.c (set_source_filename): New function.
15259 (give_name_to_class): Set input_filename from package.classname.java.
15260
15261 * jcf-io.c (find_class): Don't look first in ".".
15262
15263 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15264
15265 * zextract.c (read_zip_archive): Now takes into account the
15266 extra_field field.
15267 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
15268
15269 1997-09-20 Per Bothner <bothner@cygnus.com>
15270
15271 * constants.c, java-tree.h (build_internal_class_name): New function.
15272 (alloc_class_constant): Re-implement using build_internal_class_name.
15273 * class.c (make_class_data): Likewise.
15274 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
15275
15276 1997-09-17 Per Bothner <bothner@cygnus.com>
15277
15278 * verify.c (verify_jvm_instructions): Temporarily set current_subr
15279 to NULL before pushing an exception handler target.
15280
15281 * expr.c (flush_quick_stack): Save from low stack indexes to high.
15282 (java_stack_swap, java_stack_dup): Re-write to be safe from
15283 clobbering registers.
15284 (build_class_init): New function.
15285
15286 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15287
15288 * typeck.c (build_java_array_type): Temporary use
15289 permanent_obstack to create the array 'length' field.
15290 * expr.c (lookup_label): Temporay use permanent_obstack to create
15291 label if not found.
15292 * class.c (push_super_field): Tempory use permanent_obstack.
15293
15294 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
15295
15296 * typeck.c (type_for_mode): Now handles double_type_node and
15297 float_type_node.
15298 * verify.c (verify_jvm_instructions): The instruction following
15299 the wide bytecode is checked. OPCODE_ret added to the list of
15300 wide.
15301
15302 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15303
15304 * class.c (make_class): Temporary use permanent_obstack. Set the
15305 class CLASS_P field to 1.
15306 (push_class): Temporary use permanent_obstack.
15307 (set_super_info): Temporary use permanent_obstack.
15308 (add_method): Temporary use permanent_obstack, set
15309 METHOD_TRANSIENT().
15310 (add_field): Temporary use permanent_obstack. Sets
15311 FIELD_VOLATILE() and FIELD_TRANSIENT().
15312 (build_class_ref): Temporary use permanent_obstack if the class
15313 isn't compiled.
15314 (build_static_field_ref): Temporary use permanent_obstack when
15315 creating field's rtl.
15316 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
15317 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
15318 and fields. Function finalized, as far as flag handling.
15319 (push_class_static_dummy_field): Temporary use permanent_obstack.
15320 (emit_register_class): Force generation of class registration at
15321 -O3 or deeper.
15322 * decl.c (end_java_method): Call permanent_allocation() before
15323 returning.
15324 * expr.c (can_widen_reference_to): Added comment to interface
15325 handling, fixed typo.
15326 (lookup_field): Now uses CLASS_P() to correct FIXME
15327 (expand_invoke): Verification on public && !static &&
15328 !abstract moved into soft_lookupinterfacemethod (kaffe).
15329 Use Object class dtable if objectref is an array when expanding
15330 invokeinterface.
15331 (java_push_constant_from_pool): Temporary use permanent_obstack
15332 for CONSTANT_string
15333 * parse.c (get_ref_constant): Temporary use permanent_obstack to
15334 create constant references.
15335 (get_constant): Temporary use permanent_obstack to create constant.
15336 (load_class): Temporary use permanent_obstack to load class.
15337 (jcf_parse): Temporary use permanent_obstack to perform class
15338 layout.
15339 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
15340 (build_java_signature): Temporary use permanent_obstack.
15341 * verify.c: (verify_jvm_instruction): removed unnecessary verification
15342 on ACC_SUPER flag.
15343 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
15344 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
15345 (CLASS_P): Defined
15346
15347 1997-09-11 Per Bothner <bothner@cygnus.com>
15348
15349 * class.c (append_gpp_mangled_type): Fix typo.
15350 (emit_register_class): Use main_class to get class object, rather
15351 than looking for no-longer-existing static decl starting with _CL.
15352 * typeck.c (parse_signature_type): Promote array element type
15353 if it is a RECORD_TYPE.
15354
15355 1997-09-10 Per Bothner <bothner@cygnus.com>
15356
15357 * class.c (push_class_static_dummy_field): New function.
15358 (mangle_static_field): New. Do G++-style mangling of static fields.
15359 (layout_class): Mandle static fields here, not in add_field.
15360 (build_class_ref): The class object is now a dummy static field.
15361 * decl.c (find_local_variable): Look for best, instead of first match.
15362 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
15363 (build_java_athrow): Don't check here if exception is Throwable.
15364 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
15365 (TYPE_USED): Removed. No longer used ...
15366 * parse.c (jcf_parse): Call push_class_static_dummy_field.
15367 * verify.c (push_pending_label): New function.
15368 (push_pending_block): Renamed to check_pending_block.
15369 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
15370 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
15371 re-checking possible handlers) after a store (less wasted work).
15372 Check for null handler (finally) before calling add_handler.
15373 Various changes to (finally?) correctly handle try/finally.
15374
15375 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
15376
15377 * class.c: Include stdio.h.
15378
15379 1997-09-04 Per Bothner <bothner@cygnus.com>
15380
15381 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
15382 to make sure class is initialized before static/special invoke.
15383
15384 * verify.c (verify_jvm_instructions): On a store instruction,
15385 call find_local_variable to force pre-allocation of decl and rtx.
15386 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
15387
15388 1997-09-03 Per Bothner <bothner@cygnus.com>
15389
15390 * class.c (build_class_ref): Strip off "promoted_" if need be.
15391 (make_field_value): Call build_java_signature when needed.
15392 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
15393 * expr.c (build_java_athrow): Don't push_value of exception.
15394 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
15395 match specification of [fd]cmp[lg] for NaNs.
15396 (expand_byte_code): Add support for exception handler ranges.
15397 * except.c: Add skeleton for EH code-generation.
15398 * verify.c (merge_types): Treat all promoted integral types as equal.
15399 * constants.c (build_constants_constructor): To force creation of
15400 current_constant_pool_data_ref, call build_constant_data_ref.
15401
15402 * javaop.def (lload): Fix typo.
15403 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
15404
15405 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
15406
15407 * parse.c: Don't include function.h.
15408
15409 1997-08-27 Per Bothner <bothner@cygnus.com>
15410
15411 * except.[ch]: New files.
15412 * Makefile.in (JAVA_OBJS): Add except.o
15413 * expr.c: Temporary warning about unimplemented exceptions.
15414 * verify.c: Verify exception handlers.
15415
15416 * jcf-dump.c (disassemble_method): Print exception table.
15417
15418 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15419
15420 * expr.c (verify_jvm_instructions): Started a thorough
15421 verification of invoke* bytecodes.
15422 (expand_byte_code): flush quick stack if PC is the target of a
15423 branch. and undef RET (conflicting with config/i386/i386.h).
15424 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
15425 used.
15426 (expand_invoke): Now handles invokeinterface and do more
15427 verification according to the bytecode.
15428 (lookup_field): Don't try to load the class if processing
15429 dtable_type.
15430 (can_widen_reference_to): Now handles interfaces.
15431 * decl.c (init_decl_processing): New global variable
15432 soft_lookupinterfacemethod_node, declared in java-tree.h.
15433 Call set_super_info on string_type_node.
15434 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
15435 defined.
15436 * class.c (set_super_info): Fills the CLASS_* flags according to
15437 access_flags.
15438 (get_access_flags_from_decl): Handles all class flags.
15439
15440 1997-08-26 Per Bothner <bothner@cygnus.com>
15441
15442 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
15443 * parse.c (yyparse): Check for abstract method, and missing code.
15444 * expr.c (expand_byte_code): Change interface.
15445 * lang.c (put_decl_node): Print promoted types prettier.
15446 * verify.c (verify_jvm_instruction): Change interface.
15447 Partial support for scanning exception table.
15448 For load instructions, handle promoted integral types.
15449
15450 1997-08-21 Per Bothner <bothner@cygnus.com>
15451
15452 * verify.c: New file, with contents moved from expr.c.
15453 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
15454 * typeck.c (is_array_type_p): Moved here from expr.c.
15455 * java-tree.h: Add some now-needed function declarations.
15456 * Makefile.in (JAVA_OBJS): Added verify.o.
15457
15458 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
15459
15460 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
15461 METHOD_ABSTRACT flag.
15462
15463 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
15464 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
15465 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
15466
15467 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
15468 variables.
15469 (start_java_method): Hook for SYNCHRONIZED methods.
15470
15471 * expr.c (build_java_jsr, build_java_ret): New functions
15472 (JSR,PRE): New macros
15473 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
15474 (verify_jvm_instructions): tableswitch, lookupswitch,
15475 monitorenter, monitorexit, goto_w: verified.
15476 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
15477 (build_java_monitor): New function.
15478 (MONITOR_OPERATION): Modified to call build_java_monitor()
15479 (verify_jvm_instructions): Started a thorough verification of
15480 invoke* bytecodes.
15481
15482 1997-08-19 Per Bothner <bothner@cygnus.com>
15483
15484 Support verification of jsr/ret subroutines (used for try/finally).
15485 * decl.c (return_address_type_node): New type node.
15486 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
15487 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
15488 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
15489 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
15490 TYPE_USED): New macros for special types in type_map.
15491
15492 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
15493 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
15494 BCODE_JUMP_TARGET.
15495 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
15496
15497 * expr.c (can_widen_reference_to): New function.
15498 (pop_type): Use it.
15499 (merge_type_state): Support handling start of subroutine.
15500 (push_pending_block): Return char* error message, instead of calling
15501 fatal on an error. Also handle subroutines.
15502 (verify_jvm_instructions): Handle errors from push_poending_block.
15503 Support jsr and ret instructions.
15504
15505 1997-08-19 Per Bothner <bothner@cygnus.com>
15506
15507 * jcf-io.c (find_classfile): Fix thinko.
15508 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
15509
15510 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
15511
15512 * Makefile.in (BISON): Remove.
15513
15514 1997-08-07 Per Bothner <bothner@cygnus.com>
15515
15516 * Makefile.in: Convert to autoconf.
15517 * config-lang.in (outputs): Added java/Makefile.
15518
15519 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
15520 Rename cc1java to jc1.
15521
15522 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
15523 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
15524
15525 * class.c (class_depth): Do load_class if needed.
15526
15527 Mostly better verification.
15528 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
15529 (init_decl_processing): Change return type of soft_checkcast.
15530 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
15531 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
15532 lang_print_error): New functions.
15533 (lang_init): Set global hook print_error_function to lang_print_error.
15534 * expr.c: In the type_map ptr_type_node is only used for null now.
15535 (pop_type, merge_types): Hence ptr_type_node matches any reference.
15536 (merge_types): Dererence pointer to record types before comparing.
15537 (decode_newarray_type, merge_types): On error just return NULL.
15538 (build_java_binop): Add preliminary implementation (with warning)
15539 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
15540 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
15541 (expand_compare, expand_java_goto, expand_java_call): Don't
15542 push_pending_block, since that only makes sense when verifying.
15543 (merge_type_state): Different return codes.
15544 (push_pending_block): A block may need to be verified more than once.
15545 (expand_byte_code): Warn about unused code at code generation time.
15546 (verify_jvm_instruction): Changed logic, since code may need to be
15547 re-verified if type-state has changed. Also, better error handling.
15548 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
15549 Improve newarray, anewarray, ?aload, athrow,
15550 * java-tree.h (LABEL_CHANGED): New macro.
15551
15552 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
15553
15554 * decl.c (soft_athrow_node): New global variable initialized.
15555 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
15556 * typeck.c (convert): Added support for REAL_TYPE.
15557 (convert_to_char): New function.
15558 (convert): Handle CHAR_TYPE.
15559 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
15560 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
15561 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
15562 promoted type.
15563 (verify_jvm_instructions): Added break a the end of bogus unop: label.
15564 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
15565 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
15566 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
15567 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
15568 to Use The Right Things.
15569 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
15570 compatible with INT. BOOLEAN is made equivalent to BYTE.
15571 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
15572 OPCODE_ifnonnull): Now supported.
15573 (build_java_athrow): New function.
15574
15575 1997-08-04 Per Bothner <bothner@cygnus.com>
15576
15577 Rename method name <init> to match G++ (and fix mangling).
15578 * class.c (layout_class): Replace method name of <init> by class name.
15579 (make_method_value): Do inverse renaming of constructor from <init>.
15580 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
15581 * typeck.c (lookup_java_constructor): New function.
15582 * expr.c (expand_invoke): If method_name is <init>, call
15583 lookup_java_constructor to find constructor.
15584
15585 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
15586
15587 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
15588
15589 * parse.c (get_class_constant): Modified to handle array "classes"
15590 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
15591 wide type.
15592 (convert): Modified to handle real type.
15593 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
15594 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
15595 variables declared.
15596 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
15597 soft_multianewarray, soft_newarray_node, soft_throw_node): New
15598 global variables initialized.
15599 (find_local_variable): Handles the case of a pointer
15600 (end_java_method): Restore the use of one more scope
15601 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
15602 build_java_array_length_access, expand_java_arrayload,
15603 expand_java_arraystore, expand_java_array_length,
15604 expand_java_multianewarray, expand_java_anewarray,
15605 build_java_check_indexed_type, is_array_type_p,
15606 build_java_throw_out_of_bound_exception): New functions.
15607 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
15608 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
15609 OPCODE_<t>aload): Implemented code for verification.
15610 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
15611 ARRAY_NEW_MULTI): Macro defined.
15612 (CONVERT): Modified to invoke convert().
15613 (case OPCODE_aload2): Fixed index typo from 2 to 1.
15614
15615 1997-07-31 Per Bothner <bothner@cygnus.com>
15616
15617 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
15618 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
15619 (make_class_data): Field name needs '/' as package prefix.
15620 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
15621
15622 1997-07-25 Per Bothner <bothner@cygnus.com>
15623
15624 Implement debug information for local variables.
15625 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
15626 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
15627 DECL_LOCAL_SLOT_CHAIN): New macros.
15628 (struct lang_decl_var): New type.
15629 * parse.c (give_name_to_locals): Move to decl.c.
15630 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
15631 (start_java_method): Re-write parameter handling.
15632 (pending_local_decls): New global variable.
15633 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
15634 (find_local_variable): Accept pc so we can skips decls not in range.
15635 (struct binding_level): Add end_pc field.
15636 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
15637 (various): Change so current pc gets passed to find_local_variable.
15638
15639 * decl.c (init_decl_processing): Re-arrange fields in
15640 class_type_node and and method_type_node to match kaffe 0.9.1.
15641 * class.c (make_method_value, make_class_data): Update
15642 initializations to match.
15643
15644 1997-07-16 Per Bothner <bothner@cygnus.com>
15645
15646 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
15647 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
15648 (push_super_field): New function.
15649 (make_class_data): Handle inheritance of class static initializer.
15650 (layout_class): New name mangling.
15651 * constants.c (build_constant_data_ref): Init type of data array
15652 to a one-element array.
15653 (build_constants_constructor): Set DECL_SIZE from complete array type.
15654 * decl.c: Rename class_type, object_type etc to class_type_node,
15655 object_type_node etc. Make former inherit from latter.
15656 * expr.c (expand_invoke): Add cast of function address.
15657 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
15658 * parse.c (yyparse): Don't call layout_class here.
15659 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
15660
15661 1997-06-14 Per Bothner <bothner@cygnus.com>
15662
15663 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
15664 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
15665 (alloc_class_constant): New.
15666 * expr.c (expand_invoke): Make sure method's class is initialized.
15667 * class.c (interits_from_p, emit_register_class): New functions.
15668 * parse.c (yyparse): Call emit_register_class.
15669
15670 1997-06-09 Per Bothner <bothner@cygnus.com>
15671
15672 * constants.c: New file, to handle constant pool.
15673 * Makefile.in (JAVA_OBJS): Add constants.o.
15674 * decl.c (init_decl_processing): Update, fix, finish various structs.
15675 (pushdecl_top_level): New.
15676 * parse.c (layout_class): Moved to class.c.
15677 * expr.c (java_push_constant_from_pool): New function.
15678 * class.c (build_class_ref): Make work fully
15679 (make_class_data): Emit super-class, constant pool, interface vector.
15680
15681 1997-06-03 Per Bothner <bothner@cygnus.com>
15682
15683 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
15684 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
15685 * class.c (class_depth): New function.
15686 (lookup_named_class): Replaced by new function lookup_class.
15687 * decl.c (object_type_node, string_type_node): New.
15688 Remove various types that we no longer need.
15689 * expr.c (verify_jvm_instructions): New separate verifier pass.
15690 (push_type, pop_type): New functions for verifier.
15691 (type_stack_dup, pop_argument_types, merge_types): Likewise.
15692 (expand_byte_code): Simplify, since we assume already verified.
15693 (expand_invoke): Now mostly works.
15694 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
15695 * lang.c (main_class): Move to parse.c. Don't make_class yet.
15696 * parse.c: Wait to allocate class object until we know its name.
15697 (layout_class): Calculate DECL_VINDEX for each virtual method.
15698 * typeck.c (get_array_type): Rename to ...
15699 (build_java_array_type): ... and provide working implementation.
15700 (build_java_signature): New function - build Java signature of type.
15701 (set_java_signature): New function - cache signature with type.
15702 (lookup_java_method): New function.
15703
15704 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
15705
15706 * class.c (ident_subst): Take extra SUFFIX parameter.
15707 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
15708 (set_constant_value, build_static_field_ref, is_compiled_class): New.
15709 (build_class_ref): Actually implement.
15710 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
15711 * decl.c (builtin_function): New.
15712 (init_decl_processing): Update for current Kaffe. Declare some
15713 builtin Kaffe functions.
15714 * expr.c (build_address_of): New.
15715 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
15716 Renamed (from expand_java_new etc), and added working implementations.
15717 (build_field_ref): Now also handle static fields.
15718 (expand_invoke): Implement invokestatic, and start implement rest.
15719 * java-opcodes.h: Use javaop.def to avoid duplicated list.
15720 * javaop.def: Rename invokevirt -> invokevirtual.
15721 * lang.c (use_handles): Removed.
15722 * parse.c: Add support for ConstantValue attribute.
15723 Handle nested loading of a class. (JPOOL_UTF): New.
15724
15725 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
15726
15727 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
15728
15729 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
15730
15731 * Make-lang.in (java.install-man): New empty rule.
15732 * typeck.c (set_local_type): New function.
15733 * expr.c (STORE_INTERNAL): Call find_local_variable,
15734 not find_stack_slot. Call set_local_type.
15735
15736 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
15737
15738 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
15739 and building RECORD_TYPE CONSTRUCTORs.
15740 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
15741
15742 * lang.c (use_handles): Change the default to 0.
15743 * decl.c: Define and build class_type, field_type, utf8const_type.
15744 * class.c (make_class_data, make_field_value,
15745 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
15746 hashUtf8String, strLengthUtf8, mangled_classname:
15747 Functions to build reflective data structures.
15748 * parse.c (yyparse): Call make_class_data.
15749
15750 * jcf-io.c (open_class, find_classfile): New functions.
15751 * jcf-dump.c: Support reading classfile from explicitly-named
15752 class file (without CLASSPATH searching).
15753
15754 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
15755
15756 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
15757 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
15758 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
15759 (get_constant): Now trivial for CONSTANT_Utf8.
15760
15761 * jcf.h: Make NEW_CPOOL the default.
15762 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
15763
15764 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
15765
15766 New directory.