]> gcc.gnu.org Git - gcc.git/blame - gcc/java/ChangeLog
re PR middle-end/23401 (Gimplifier produces too many temporaries)
[gcc.git] / gcc / java / ChangeLog
CommitLineData
ba4d8f9d
RG
12009-03-31 Richard Guenther <rguenther@suse.de>
2
3 * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
4 the first operand of binary and comaprison expressions.
5
8ce94e44
JM
62009-03-30 Joseph Myers <joseph@codesourcery.com>
7
8 PR rtl-optimization/323
9 * lang.c (java_post_options): Set flag_excess_precision_cmdline.
10 Give an error for -fexcess-precision=standard for processors where
11 the option is significant.
12
9a0f3e86
RW
132009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14
15 * lang.opt: Unify help text for -Wdeprecated.
16
d4f4bc84
JJ
172009-02-03 Jakub Jelinek <jakub@redhat.com>
18
19 * jcf-dump.c (version): Update copyright notice dates.
20
786ce82d
RG
212009-01-16 Richard Guenther <rguenther@suse.de>
22
23 PR tree-optimization/38835
24 PR middle-end/36227
25 * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
26
9ff4a9da 272008-12-05 Sebastian Pop <sebastian.pop@amd.com>
250d2fb5
JJ
28
29 PR bootstrap/38262
30 * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
31
08906bf8
AH
322008-11-04 Andrew Haley <aph@redhat.com>
33
34 PR java/37068
35 * jcf-parse.c (java_emit_static_constructor): Don't call
36 cgraph_build_static_cdtor. Rewrite.
37
7134e605
JJ
382008-10-24 Jakub Jelinek <jakub@redhat.com>
39
40 * Make-lang.in (check-java-subtargets): New target.
41
5773a50f
DE
422008-10-16 David Edelsohn <edelsohn@gnu.org>
43
44 PR target/35483
45 * Make-lang.in (class.o): Depend on $(TM_P_H).
46 (expr.o): Same.
47 * class.c: Include tm_p.h.
48 * expr.c: Include tm_p.h.
49
307233c2
AH
502008-10-14 Andrew Haley <aph@redhat.com>
51
52 * constants.c (build_constant_data_ref): Make sure we only build
53 one copy of the decl for the constant pool.
54
8cf08dad
AH
552008-09-22 Andrew Haley <aph@redhat.com>
56
57 * expr.c (rules): Add new rule for
58 gnu.java.lang.VMCPStringBuilder.toString.
59 (rewrite_rule.new_classname): New field.
60 (maybe_rewrite_invocation): Use new_classname field instead of
61 DECL_CONTEXT (*method_p).
62 Allow rewrite_arglist to be NULL.
63
2700cb86
AP
642008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
65
66 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
67 (java_get_callee_fndecl): Kill.
68
0494626a
JH
692008-09-17 Jan Hubicka <jh@suse.cz>
70
71 PR c++/18071
72 * class.c (add_method_1): Do not initialize DECL_INLINE.
73 (make_local_function_alias): Likewise.
74 * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
75 * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
76
3fb1916b
RG
772008-09-09 Richard Guenther <rguenther@suse.de>
78
79 * decl.c (build_result_decl): Remove no longer applicable
80 promotion.
81
bbdcb943
DD
822008-09-05 David Daney <ddaney@avtrex.com>
83
84 * gcj.texi (-freduced-reflection): Clarify option's restrictions.
85
c7c63407
DD
862008-08-21 David Daney <ddaney@avtrex.com>
87
88 * class.c (make_class_data): Don't add field_index when
89 flag_reduced_reflection set.
90
b8972354
UW
912008-08-12 Ulrich Weigand <uweigand@de.ibm.com>
92
93 * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
94
e73f7547
MLI
952008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
96
97 PR 28875
98 * lang.c (java_handle_option): Replace set_Wunused with
99 warn_unused.
100
70b1e376
RW
1012008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
102
103 * gcj.texi: Update copyright years. Do not list GPL as
104 Invariant Section.
105
ef5b0e6e
JJ
1062008-07-29 Jakub Jelinek <jakub@redhat.com>
107
8452fee7
JJ
108 * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
109 from ctype's sizes.
110
ef5b0e6e
JJ
111 * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
112 alignment.
113
e90acd93
JH
1142008-07-29 Jan Hubicka <jh@suse.cz>
115
116 * lang.c (java_post_options): Remove handling of flag_no_inline.
117
726a989a
RB
1182008-07-28 Richard Guenther <rguenther@suse.de>
119
120 Merge from gimple-tuples-branch.
121
122 2008-07-18 Richard Guenther <rguenther@suse.de>
123
124 * expr.c: Include tree-iterator.h.
125 * Make-lang.in (expr.o): Add tree-iterator.h dependency.
126
127 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
128
129 * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
130 * expr.c: Same.
131
132 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
133
134 * java-gimplify.c (java_gimplify_expr): Same.
135 (java_gimplify_modify_expr): Same.
136 * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
137
138 2008-05-02 Diego Novillo <dnovillo@google.com>
139
140 * expr.c (build_java_throw_out_of_bounds_exception): Fix
141 mixed declarations and code.
142
143 2008-05-02 Doug Kwan <dougkwan@google.com>
144
145 * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
146 _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
147
148 2008-02-19 Diego Novillo <dnovillo@google.com>
149
150 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
151
152 * java-gimplify.c (java_gimplify_self_mod_expr): Change
153 gimple_seq arguments to gimple_seq *. Update all users.
154
155 2007-11-26 Aldy Hernandez <aldyh@redhat.com>
156
157 * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
158 sequences.
159 (java_gimplify_self_mod_expr): Same.
160 * java-tree.h (java_gimplify_expr): Make pre_p and post_p
161 sequences.
162
7e8b322a
JH
1632008-07-24 Jan Hubicka <jh@suse.cz>
164
165 * java/decl.c: Include cgraph.h
166 (end_java_method): Remove non-unit-at-a-time code.
167 (java_mark_decl_local): Likewise; sanity check that we don't touch
168 finalized nodes.
169
f73c3e7c
JH
1702008-07-15 Jan Hubicka <jh@suse.cz>
171
172 * lang.c (java_init_options): Enable unit-at-a-time by default.
173
e63ea00c
RW
1742008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
175
176 * Make-lang.in (jvspec.o): Fix dependencies.
177
73fd898b
TT
1782008-07-06 Tom Tromey <tromey@redhat.com>
179
180 * Make-lang.in (java/parse.o-warn): Remove.
181 (java/jcf-io.o-warn): Remove.
182
dcef3dac
TT
1832008-07-05 Tom Tromey <tromey@redhat.com>
184
185 * jcf-io.c: Don't include fnmatch.h. Don't use JCF_USE_SCANDIR.
186 (compare_path): Remove.
187 (java_or_class_file): Likewise.
188 (memoized_dirlist_entry): Likewise.
189 (memoized_dirlist_hash): Likewise.
190 (memoized_dirlist_lookup_eq): Likewise.
191 (memoized_dirlists): Likewise.
192 (caching_stat): Likewise.
193 (find_class): Use stat.
194 * jcf.h (JCF_USE_SCANDIR): Remove.
195
c9db365d
JS
1962008-06-30 Joshua Sumali <jsumali@redhat.com>
197
198 * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
199 doc/rebuild-gcj-db.1
200 (java.uninstall): Likewise.
201 (java.maintainer-clean): Likewise.
202 (aot-compile.pod): New rule.
203 (rebuild-gcj-db.pod): New rule.
204 (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
205 * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
206
572e5ae3
KG
2072008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
208
209 * Make-lang.in (java/jcf-io.o-warn): New.
210
f02a84d9
TT
2112008-06-24 Tom Tromey <tromey@redhat.com>
212
213 * jcf-path.c (jcf_path_init): Don't name variable 'try'.
214 * expr.c (add_type_assertion): Rename argument.
215 (build_java_arrayaccess): Don't name variable 'throw'.
216 (ARRAY_NEW_MULTI): Don't name variable 'class'.
217 * jcf-io.c (find_class): Don't name variable 'class'.
218 * mangle.c (compression_table_add): Don't name variable 'new'.
219 * constants.c (cpool_for_class): Rename argument.
220 (alloc_constant_fieldref): Likewise.
221 * jcf-parse.c (handle_innerclass_attribute): Don't name variable
222 'class'.
223 (read_class): Likewise.
224 (parse_zip_file_entries): Likewise.
225 (process_zip_dir): Likewise.
226 * decl.c (java_mark_class_local): Rename argument.
227 * class.c (GEN_TABLE): Use type_name, not typename.
228 (gen_indirect_dispatch_tables): Likewise.
229 (add_field): Rename argument.
230 (is_compiled_class): Likewise.
231 (safe_layout_class): Likewise.
232 (emit_assertion_table): Likewise.
233 * typeck.c (has_method): Rename argument.
234
e1e4cdc4
KG
2352008-06-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
236
237 * class.c (ident_subst, mangled_classname, unmangle_classname,
238 gen_indirect_dispatch_tables, add_method_1,
239 build_fieldref_cache_entry, make_local_function_alias,
240 layout_class, java_treetreehash_find, java_treetreehash_new,
241 split_qualified_name): Fix for -Wc++-compat.
242 * constants.c (set_constant_entry, cpool_for_class): Likewise.
243 * decl.c (make_binding_level, java_dup_lang_specific_decl,
244 start_java_method): Likewise.
245 * except.c (prepare_eh_table_type): Likewise.
246 * expr.c (type_assertion_hash, note_instructions): Likewise.
247 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
248 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
249 * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
250 Likewise.
251 * jcf-parse.c (reverse, java_read_sourcefilenames,
252 annotation_grow, rewrite_reflection_indexes, java_parse_file,
253 process_zip_dir): Likewise.
254 * jcf-path.c (add_entry, add_path, jcf_path_init,
255 jcf_path_extdirs_arg): Likewise.
256 * jcf-reader.c (jcf_parse_constant_pool): Likewise.
257 * jvgenmain.c (do_mangle_classname): Likewise.
258 * lang.c (put_decl_string): Likewise.
259 * verify-impl.c (make_state_copy, make_state, add_new_state):
260 Likewise.
261
6ccde948
RW
2622008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
263
264 * gcj.texi: Expand TABs, remove whitespace from blank lines.
265
25e8b6ce
TT
2662008-06-14 Tom Tromey <tromey@redhat.com>
267
268 PR java/36247:
269 * class.c (build_class_ref): Initialize this_classdollar when
270 needed.
271
163792bc
AH
2722008-05-23 Andrew Haley <aph@redhat.com>
273
274 * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
275 pathname of source file.
276
8beaca66
AL
2772008-05-12 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
278
279 * jcf-dump.c (print_constant): Use
280 HOST_LONG_LONG_FORMAT.
281
becfd6e5
KZ
2822008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
283
284 * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
285 DECL_PURE_P.
286
51eed280
PB
2872008-04-23 Paolo Bonzini <bonzini@gnu.org>
288
289 * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
290 (build_classdollar_field): Don't set TREE_INVARIANT.
291 (get_dispatch_table): Don't set TREE_INVARIANT.
292 (make_class_data): Don't set TREE_INVARIANT.
293 (build_symbol_entry): Don't set TREE_INVARIANT.
294 (emit_symbol_table): Don't set TREE_INVARIANT.
295 * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
296 (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
297 * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
298 * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
299
6cba282a
TT
3002008-04-03 Tom Tromey <tromey@redhat.com>
301
302 * Make-lang.in (java_OBJS): New variable.
303
9ff420f1
PB
3042008-04-03 Paolo Bonzini <bonzini@gnu.org>
305
306 * java-tree.h (insert_block): Kill.
307 * decl.c (insert_block): Kill.
308
7f9766e4
JM
3092008-04-01 Joseph Myers <joseph@codesourcery.com>
310
311 * gcj.texi: Include gpl_v3.texi instead of gpl.texi
312 * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
313 gpl.texi.
314
e980df8e
TT
3152008-03-27 Tom Tromey <tromey@redhat.com>
316
317 * Make-lang.in: Revert automatic dependency patch.
318
2fe3178b
TT
3192008-03-25 Tom Tromey <tromey@redhat.com>
320
321 * Make-lang.in: Removed most explicit .o targets.
322 (java/jvspec.o): Reduce to variable setting. Moved to java/.
323 ($(GCJ)$(exeext)): Update.
324 (JAVA_OBJS): New variable.
325 (JCFDUMP_OBJS): Reformat.
326 (java_OBJS): New variable.
327 (java/jvspec.o-warn): Update.
328 (java/parse.o-warn): Remove.
329 (JAVA_TREE_H): Remove.
330 (java/jcf-io.o): Reduce to variable setting.
331 (ALL_CPPFLAGS): Likewise.
332
4b700ab0
PB
3332008-03-12 Paolo Bonzini <bonzini@gnu.org>
334
335 * mangle.c (java_mangle_decl): Remove dead check.
336
30e257e5
PB
3372008-03-11 Paolo Bonzini <bonzini@gnu.org>
338
339 * jcf-parse.c (java_parse_file): Assert binding levels are
340 left in order.
341 * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
342 Delete.
343
0e5997c0
JJ
3442008-03-02 Jakub Jelinek <jakub@redhat.com>
345
346 * jcf-dump.c (version): Update copyright notice dates.
347
0a5fe110
TT
3482008-02-29 Tom Tromey <tromey@redhat.com>
349
350 * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
351 method.
352 * java-tree.h (struct lang_decl_func): Remove obsolete comment.
353
2d593c86
TT
3542008-02-26 Tom Tromey <tromey@redhat.com>
355
356 * lang.c (java_post_options): Remove conditional.
357 * expr.c (expand_byte_code): Remove old location code.
358 * jcf-parse.c (set_source_filename): Remove old location code.
359 (give_name_to_class): Likewise.
360 (jcf_parse): Likewise.
361 (duplicate_class_warning): Likewise.
362 (parse_class_file): Likewise.
363 (java_parse_file): Likewise.
364 * decl.c (finish_method): Remove old location code.
365 * class.c (push_class): Remove old location code.
366
72fb133f
KG
3672008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
368
369 PR other/35107
370 * Make-lang.in (jc1): Add $(GMPLIBS).
371
3e603aef
DD
3722008-01-23 David Daney <ddaney@avtrex.com>
373
374 * class.c (hide) Rename to...
375 (java_hide_decl) ... this throughout, and make public.
376 * resource.c (Jr_count): Remove.
377 (compile_resource_data): Call java_mangle_resource_name to generate
378 decl name. Make resource decl public and hidden.
379 * mangle.c (java_mangle_resource_name): New function.
380 * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
381 functions.
382
578c21cb
AH
3832008-01-04 Andrew Haley <aph@redhat.com>
384
385 PR java/17779
386 * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
387 C90.
388
5e96e6c0
AH
3892008-01-03 Andrew Haley <aph@redhat.com>
390
391 PR java/17779
392 * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
393 we're about to re-layout the type.
394
ef833d3d
AO
3952007-12-20 Alexandre Oliva <aoliva@redhat.com>
396
397 * lang.c (java_classify_record): Don't return
398 RECORD_IS_INTERFACE for now.
399
0741e2af
AH
4002007-12-18 Andrew Haley <aph@redhat.com>
401
402 PR java/27643
403 * jcf-parse.c (java_parse_file): Remove call to
404 java_mark_class_local.
405 (parse_class_file): Reinstate call to java_mark_class_local here.
406 * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
407 already set, call java_mangle_decl() and make_decl_rtl() to
408 rewrite its name as a hidden alias.
409
394d9fe7
AO
4102007-12-15 Alexandre Oliva <aoliva@redhat.com>
411
412 PR debug/7081
413 * lang.c (java_classify_record): New.
414 (LANG_HOOKS_CLASSIFY_RECORD): Override.
415
182e0d71
AK
4162007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
417
418 PR 34081/C++
419 * decl.c (finish_method): Pass 'false' for the new
420 allocate_struct_function parameter.
421
6e0b7c70
AO
4222007-11-26 Alexandre Oliva <aoliva@redhat.com>
423
424 * expr.c (build_jni_stub): Use the computed jni func type for
425 variable meth.
426
0ab57536
AO
4272007-11-26 Alexandre Oliva <aoliva@redhat.com>
428
429 * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
430
3bb839da
AO
4312007-11-26 Alexandre Oliva <aoliva@redhat.com>
432
433 * expr.c (type_assertion_hash): Hash type uids rather than
434 tree pointers.
435
af246415
DD
4362007-11-17 David Daney <ddaney@avtrex.com>
437 Andrew Haley <aph@redhat.com>
438
439 * constants.c (build_constants_constructor): Use POINTER_SIZE
440 insead of BITS_PER_WORD in big-endian work around.
441
4a54716a
TT
4422007-11-07 Tom Tromey <tromey@redhat.com>
443
444 PR java/34019:
445 * gcj.texi (Input Options): Add missing noun.
446
7c4b32bc
TT
4472007-11-02 Tom Tromey <tromey@redhat.com>
448
449 PR java/33765:
450 * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
451 * zipfile.h (ZIPEMPTYMAGIC): New define.
452
cff75efa
TT
4532007-11-01 Tom Tromey <tromey@redhat.com>
454
455 * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
456 (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
457 (java/jcf-io.o): Depend on zipfile.h.
458
13d71644
RG
4592007-10-17 Richard Guenther <rguenther@suse.de>
460
461 * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
462 dependencies.
463
6d2c26de
AH
4642007-10-03 Andrew Haley <aph@redhat.com>
465
466 PR java/33639
467 * class.c (mangled_classname): Detect and replace illegal
468 characters in assembly language symbols.
469 (gen_indirect_dispatch_tables): Call mangled_classname() on
470 the type.
471
c94ed7a1
JJ
4722007-09-27 Jakub Jelinek <jakub@redhat.com>
473
474 * lang.c (java_print_error_function): Add third argument.
475
8a0c568f
TT
4762007-09-15 Tom Tromey <tromey@redhat.com>
477
478 * java-tree.h (struct lang_decl_func) <function_decl_body>:
479 Remove.
480 <init_final>: Likewise.
481 * lang.c (java_dump_tree): Update.
482 * java-tree.h (DECL_FUNCTION_BODY): Remove.
483
e89d6010
JH
4842007-09-11 Jan Hubicka <jh@suse.cz>
485
486 * decl.c (java_expand_body): Kill.
487 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
488
ae582cbf
TT
4892007-09-06 Tom Tromey <tromey@redhat.com>
490
491 * jcf-parse.c (parse_class_file): Re-enter the current file.
492
bdeb2c96
RZ
4932007-09-07 Roman Zippel <zippel@linux-m68k.org>
494
af246415 495 * boehm.c (mark_reference_fields): Move misaligned pointer check
bdeb2c96
RZ
496 after JREFERENCE_TYPE_P test
497
dbc293c8
RZ
4982007-09-06 Roman Zippel <zippel@linux-m68k.org>
499
901ddd17
MK
500 * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
501 if pointer is misaligned.
dbc293c8 502
5ffeb913
TT
5032007-09-06 Tom Tromey <tromey@redhat.com>
504
505 * lang.c (java_post_options): Update.
506 * jcf-parse.c (set_source_filename): Update.
507 (give_name_to_class): Update.
508 (jcf_parse): Update.
509 (duplicate_class_warning): Update.
510 (parse_class_file): Update.
511 (java_parse_file): Update.
512 * expr.c (expand_byte_code): Update.
513
db2960f4
SL
5142007-09-05 Sandra Loosemore <sandra@codesourcery.com>
515
516 * decl.c (finish_method): Use set_cfun.
517
29741d6a
AH
5182007-09-04 Andrew Haley <aph@redhat.com>
519
520 * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
521 when using the ARM EABI.
522
72c65674
DJ
5232007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
524
525 * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
526
b1d5455a
KG
5272007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
528
529 * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
530 CONST_CAST.
531 * jcf.h (JCF_FINISH): Likewise.
532
e1c2b159
TT
5332007-08-28 Tom Tromey <tromey@redhat.com>
534
535 * Make-lang.in (java.tags): Don't tag '*.y' files.
536
58f9752a
KG
5372007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
538
539 * lang.c (java_decl_ok_for_sibcall): Likewise.
540
2f41c1d6
PB
5412007-08-21 Paul Brook <paul@codesourcery.com>
542 Nathan Sidwell <nathan@codesourcery.com>
543 Mark Mitchell <mark@codesourcery.com>
544 Joseph Myers <joseph@codesourcery.com>
545
546 * jcf-dump.c (version): Use pkgversion_string. Update copyright
547 date.
548
14588106
RG
5492007-08-20 Richard Guenther <rguenther@suse.de>
550
551 * lang.c (java_tree_inlining_walk_subtrees): Remove.
552 (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
553
279e32c9
TT
5542007-08-17 Tom Tromey <tromey@redhat.com>
555
556 * typeck.c (find_method_in_interfaces): Update.
557 * jcf-parse.c (load_class): Update.
558 * java-gimplify.c (java_gimplify_component_ref): Removed.
559 (java_gimplify_modify_expr): Update. Removed pre_p and post_p
560 arguments.
561 (java_gimplify_expr): Update.
562 * decl.c (java_init_decl_processing): Update.
563 * class.c (set_constant_value): Update.
564 (make_class_data): Update.
565 (finish_class): Update.
566 (build_static_field_ref): Update.
567 (is_compiled_class): Update.
568 (maybe_layout_super_class): Update.
569 (layout_class): Update.
570 (layout_class_method): Update.
571 * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
572 (lang_decl_var) <am, final_iud, cif>: Removed fields.
573 (lang_decl_func) <init_calls_this>: Removed field.
574 (lang_type) <dot_class, verify_method>: Removed fields.
575 (FIELD_NESTED_ACCESS): Removed.
576 (FIELD_NESTED_ACCESS_P): Removed.
577 (DECL_FIELD_FINAL_IUD): Removed.
578 (DECL_LOCAL_FINAL_IUD): Removed
579 (LOCAL_FINAL_P): Removed.
580 (FINAL_VARIABLE_P): Removed.
581 (CLASS_FINAL_VARIABLE_P): Removed.
582 (DECL_BIT_INDEX): Removed.
583 (DECL_INIT_CALLS_THIS): Removed.
584 (FIELD_LOCAL_ALIAS): Removed.
585 (FIELD_LOCAL_ALIAS_USED): Removed.
586 (FIELD_THISN): Removed.
587 (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
588 (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
589 (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
590 (TYPE_DOT_CLASS): Removed.
591 (TYPE_VERIFY_METHOD): Removed.
592 (ID_CLASSDOLLAR_P): Removed.
593 (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
594 Removed.
595 (classdollar_identifier_node): Removed.
596 (TYPE_UNKNOWN): Removed.
597 (CLASS_FROM_SOURCE_P): Removed.
598 * expr.c (build_jni_stub): Update.
599 (force_evaluation_order): Update.
600 (build_java_empty_stmt): Update.
601 (build_class_init): Update.
602 (java_stack_swap): Update.
603 (build_jni_stub): Update.
604
3d4e2766
TT
6052007-08-17 Tom Tromey <tromey@redhat.com>
606
607 * java-tree.h (LABEL_TYPE_STATE): Removed.
608 (load_type_state): Removed.
609 (LABEL_PC): Removed.
610 (LABEL_VERIFIED): Removed.
611 (type_states): Declare.
612 * expr.c (type_states): New global.
613 (load_type_state): Now static. Use type_states. Changed
614 argument.
615 (lookup_label): Don't set LABEL_PC.
616 (expand_byte_code): Don't use LABEL_VERIFIED.
617 (note_instructions): Initialize type_states.
618 * verify-glue.c (vfy_note_stack_depth): Rewrote.
619 (vfy_note_stack_type): Use type_states.
620 (vfy_note_local_type): Likewise.
621
68a57691
KG
6222007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
623
624 * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
625 * jcf.h (JCF_FINISH): Likewise.
626
8328d52a
NC
6272007-07-31 Nick Clifton <nickc@redhat.com>
628
629 * java-gimplify.c: Change copyright header to refer to version 3
630 of the GNU General Public License and to point readers at the
631 COPYING3 file and the FSF's license web page.
632 * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
633 decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
634 resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
635 javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
636 jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
637 verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
638 parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
639
4f588890
KG
6402007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
641
642 * jcf-io.c (find_class): Fix -Wcast-qual warnings.
643
fa233e34
KG
6442007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
645
646 * lang.c (java_get_callee_fndecl): Constify.
647
0b740634
KG
6482007-07-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
649
650 * mangle.c (set_type_package_list): Constify.
651 * verify-glue.c (vfy_make_string): Delete.
652 * verify.h (vfy_make_string): Likewise.
653
41f701ba
TT
6542007-07-26 Tom Tromey <tromey@redhat.com>
655
656 * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
657 (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
658 EXIT_BLOCK_LABELED_BLOCK): Likewise.
659 * lang.c (java_tree_inlining_walk_subtrees): Update.
660 (java_dump_tree): Likewise.
661 * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
662 Remove.
663 * decl.c (push_labeled_block, pop_labeled_block): Remove.
664 * java-gimplify.c (java_gimplify_labeled_block_expr,
665 java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
666 (java_gimplify_expr): Update.
667
741ac903
KG
6682007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
669
670 * class.c (java_treetreehash_hash, java_treetreehash_compare):
671 Constify.
672 * expr.c (type_assertion_eq): Likewise.
673 * jcf-io.c (compare_path): Likewise.
674 * jcf-parse.c (cmpstringp): Likewise.
675 * verify-impl.c (get_one_type, compute_argument_types,
676 compute_return_type): Likewise.
677
c1331fd4
RO
6782007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
679
680 PR target/32462
681 PR libgcj/32465
682 * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
683
176be57b
RG
6842007-07-12 Richard Guenther <rguenther@suse.de>
685
686 * expr.c (expand_java_return): RETURN_EXPR has void type.
687 (build_jni_stub): Likewise. Use a comparison against zero
688 for null-pointer test in COND_EXPR.
689 (build_field_ref): Build POINTER_PLUS_EXPR with correct
690 type. Convert result instead.
691 (build_invokevirtual): Likewise.
692
837edd5f
GK
6932007-07-09 Geoffrey Keating <geoffk@apple.com>
694
695 PR 32617
696 * lang.c (java_init): Remove setting of force_align_functions_log.
697 * class.c (add_method_1): Set DECL_ALIGN of non-static method
698 to cope with ptrmemfunc_vbit_in_pfn.
699
e980a729
DD
7002007-07-03 David Daney <ddaney@avtrex.com>
701
702 * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to
703 include path.
704 (doc/gcj.dvi): Same.
705 (doc/gcj.pdf): Same.
706 (java/index.html): Same.
707
5be014d5
AP
7082007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
709
710 * class.c (make_class_data): Build the index in sizetype.
711 Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
712 adding to a pointer type.
713 (build_symbol_entry): Likewise.
714 * expr.c (build_java_arrayaccess): Likewise.
715 (build_field_ref): Likewise.
716 (build_known_method_ref): Likewise.
717 (build_invokevirtual): Likewise.
718 * except.c (build_exception_object_ref): Do a
719 NEGATIVE and then a POINTER_PLUS_EXPR instead
720 of a MINUS_EXPR.
721
719bb4e3 7222007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
b0464c88
RE
723
724 * typeck.c (java_signed_type): Remove.
725 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
726 * java-tree.h (java_signed_type): Remove.
727
8d5b1b67
GK
7282007-05-18 Geoffrey Keating <geoffk@apple.com>
729
730 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
731 (print_constant): Likewise.
732
719bb4e3 7332007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
ca5ba2a3
RAE
734
735 * expr.c (build_java_binop): Use unsigned_type_for instead of
736 java_unsigned_type.
737 * java-tree.h (java_unsigned_type): Remove.
738 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
739 * typeck.c (java_unsigned_type): Remove.
740
3d95caa4
AP
7412007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
742
743 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
744 instead of checking GIMPLE_STMT_P in chain_next.
745
b00d7439
CW
7462007-04-06 Colin Walters <walters@redhat.com>
747
748 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
749 * jcf-io.c (open_class): Copy 'filename'.
750
696fbee7
AH
7512007-04-03 Andrew Haley <aph@redhat.com>
752
753 * jvgenmain.c (main): Change main to use class$, not class$$.
754 (do_mangle_classname): Likewise.
755 * class.c (hide): New function.
756 (add_field): Hide everything that shouldn't be visible outside a
757 DSO.
758 (build_static_class_ref): Likewise.
759 (build_classdollar_field): Likewise.
760 (make_class_data): Likewise.
761 (layout_class_method): Likewise.
762 * expr.c (special_method_p): New function.
763
764 * class.c (push_class): Don't bogusly guess the source filename.
765 * jcf-parse.c (give_name_to_class): Don't set input_location from
766 DECL_ARTIFICIAL decls.
767
719bb4e3 7682007-03-30 Rafael Ávila de Espíndola <espindola@google.com>
47ecd38d
RAE
769
770 * typeck.c (java_signed_or_unsigned_type): Removed.
771 (java_signed_type): use get_signed_or_unsigned_type instead of
772 java_signed_or_unsigned_type.
773 (java_unsigned_type): Ditto.
774 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
775 * java-tree.h (java_signed_or_unsigned_type): Removed.
776
d2bbc952
TT
7772007-03-26 Tom Tromey <tromey@redhat.com>
778
779 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
780 (java.maintainer-clean): Likewise.
781 (java.install-man): Likewise.
782 (.INTERMEDIATE): Removed grmiregistry.pod.
783 (grmiregistry.pod): Removed.
784 * gcj.texi (Invoking gcjh): Removed.
785 (Invoking gjnih): Likewise.
786 (Invoking grmiregistry): Likewise.
787 (direntry): Updated.
788 (Top): Likewise.
789 (which-gcj): Removed.
790
ba3e26e8
BM
7912007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
792
793 * Make-lang.in: Add install-pdf target as copied from
794 automake v1.10 rules.
795
a62f2020
BM
7962007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
797
798 * gcj.texi: Standardize title page.
799
165a0dc3
KH
8002007-02-18 Kazu Hirata <kazu@codesourcery.com>
801
802 * class.c: Fix a comment typo.
803
5039610b
SL
8042007-02-15 Sandra Loosemore <sandra@codesourcery.com>
805 Brooks Moses <brooks.moses@codesourcery.com>
806 Lee Millward <lee.millward@codesourcery.com>
807
808 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
809 of build3.
810 (BUILD_MONITOR_EXIT): Likewise.
811
812 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
813 (java_gimplify_modify_expr): Likewise.
814
815 * class.c (cache_this_class_ref): Use build_call_expr.
816 (build_static_field_ref): Likewise.
817 (emit_indirect_register_classes): Likewise.
818 (emit_register_classes): Likewise.
819
820 * resource.c (write_resource_constructor): Use build_call_expr.
821
822 * builtins.c (builtin_creator_function): Change interpretation of
823 the second parameter to be the whole CALL_EXPR instead of the arglist.
824 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
825 (min_builtin): Likewise.
826 (abs_builtin): Likewise.
827 (java_build_function_call_expr): Likewise.
828 (convert_real): Likewise.
829 (UNMARSHAL3): Likewise.
830 (UNMARSHAL4): Likewise.
831 (UNMARSHAL5): Likewise.
832 (build_arglist_for_builtin): Delete. Fix callers to use
833 build_call_expr instead.
834 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
835 accessors.
836 (compareAndSwapInt_builtin): Likewise.
837 (compareAndSwapLong_builtin): Likewise.
838 (compareAndSwapObject_builtin): Likewise.
839 (putVolatile_builtin): Likewise.
840 (getVolatile_builtin): Likewise.
841 (VMSupportsCS8_builtin): Likewise.
842 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
843 instead of arglist.
844
845 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
846 (build_java_throw_out_of_bounds_exception): Likewise.
847 (java_check_reference): Likewise.
848 (build_java_arraystore_check): Likewise.
849 (build_newarray): Likewise.
850 (build_anewarray): Likewise.
851 (expand_java_multinewarray): Use build_call_list instead of build3.
852 (build_java_monitor): Use build_call_nary instead of build3.
853 (java_create_object): Likewise.
854 (expand_java_NEW): Likewise.
855 (build_instanceof): Likewise.
856 (expand_java_CHECKCAST): Likewise.
857 (build_java_soft_divmod): Likewise.
858 (build_java_binop): Likewise.
859 (build_field_ref): Likewise.
860 (build_class_init): Likewise.
861 (rewrite_arglist_getcaller): Use build_call_expr.
862 (build_invokeinterface): Use build_call_nary instead of build3.
863 (expand_invoke): Use build_call_list instead of build3.
864 (build_jni_stub): Use build_call_nary, build_call_list, or
865 build_call_expr instead of build3.
866 (expand_java_field_op): Use build_call_expr instead of build3.
867 (force_evaluation_order): Use new CALL_EXPR accessors.
868
869 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
870
7f40378f
DD
8712007-02-15 David Daney <ddaney@avtrex.com>
872
873 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
874 (java.maintainer-clean):Add gc-analyze.1.
875 (.INTERMEDIATE): Add gc-analyze.pod.
876 (gc-analyze.pod): New rule.
877 (java.install-man): Install gc-analyze.1
878 * gcj.texi: Add new section for the gc-analyze program.
879
56c9f04b
AH
8802007-02-07 Andrew Haley <aph@redhat.com>
881
882 * class.c (uncache_this_class_ref): New.
883 * expr.c (build_jni_stub): Initialize the class.
884 (expand_byte_code): Call uncache_this_class_ref after generating
885 code.
886
ca20820e
TT
8872007-02-06 Tom Tromey <tromey@redhat.com>
888
889 PR java/30714:
890 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
891
5041541e
KH
8922007-02-03 Kazu Hirata <kazu@codesourcery.com>
893
894 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
895
b4e18eee
AH
8962007-02-02 Andrew Haley <aph@redhat.com>
897
898 * expr.c (expand_byte_code): Call cache_this_class_ref() and
899 cache_cpool_data_ref().
900 Set TYPE_CPOOL_DATA_REF.
901 (cache_cpool_data_ref): New function.
902 * constants.c (build_ref_from_constant_pool): Remove special-case
903 code for flag_indirect_classes.
904 (build_constant_data_ref): Move special-case code for
905 flag_indirect_classes here from build_ref_from_constant_pool.
906 * decl.c (finish_method): Move class initialization from here to
907 cache_this_class_ref.
908 * class.c (cache_this_class_ref): New function.
909 (build_class_ref): Use this_classdollar for the ouput class.
910
4969f3ea
DD
9112007-02-02 David Daney <ddaney@avtrex.com>
912
913 * class.c (is_compiled_class): Move check to avoid reloading
914 current class.
915 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
916 already set.
917
2a97d6b2
AH
9182007-02-01 Andrew Haley <aph@redhat.com>
919
920 PR java/30641
921 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
922
61a89891
KH
9232007-01-31 Kazu Hirata <kazu@codesourcery.com>
924
925 * class.c, jcf-parse.c: Fix comment typos.
926
e4cf973d
TT
9272007-01-30 Tom Tromey <tromey@redhat.com>
928
929 * gcj.texi (Strings): Fix documentation for JvNewString.
930
13a89f0a
RW
9312007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
932
933 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
934 typos.
935
a661f85e
BE
9362007-01-30 Ben Elliston <bje@au.ibm.com>
937
938 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
939
a1c06277
TT
9402007-01-29 Tom Tromey <tromey@redhat.com>
941
942 PR java/30607:
943 * jvspec.c (lang_specific_driver): Handle separate -I argument.
944 * lang.opt (-I): Add 'Separate'.
945
2631dfdd
AH
9462007-01-29 Andrew Haley <aph@redhat.com>
947
948 * class.c (add_method_1): Mark fndecl as external unless we are
949 compiling it into this object file.
950
c863b570
AH
9512007-01-24 Andrew Haley <aph@redhat.com>
952
953 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
954 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
955
9562007-01-22 Andrew Haley <aph@redhat.com>
957
958 * builtins.c (VMSupportsCS8_builtin): New function.
959
a5abc980
AP
9602007-01-23 Andrew Pinski <pinskia@gmail.com>
961
962 PR java/30454
963 * jcf-io.c (opendir_in_zip): Close the file
964 and free zipf before returning after an error.
965
80a3dc41
TT
9662007-01-16 Tom Tromey <tromey@redhat.com>
967
968 * java-tree.def: Added copyright header.
969
b7e89938
TT
9702007-01-15 Tom Tromey <tromey@redhat.com>
971
972 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
973 case.
974 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
975 Removed case.
976 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
977 (EXPR_WFL_NODE): Likewise.
978 (EXPR_WFL_LINECOL): Likewise.
979 (EXPR_WFL_FILENAME): Likewise.
980 (EXPR_WFL_LINENO): Likewise.
981 (build_expr_wfl, expr_add_location): Don't declare.
982 (build_unknown_wfl): Removed.
983 (EXPR_WFL_FILENAME_NODE): Removed.
984 (EXPR_WFL_COLNO): Removed.
985 (EXPR_WFL_SET_LINECOL): Removed.
986 (DECL_FUNCTION_WFL): Removed.
987 (DECL_FIELD_FINAL_WFL): Removed.
988 (struct lang_decl_func) <wfl>: Removed field.
989 <called_constructor>: Likewise.
990 <inner_access>: Likewise.
991 (struct lang_decl_var) <wfl>: Removed field.
992 (DECL_CONSTRUCTOR_CALLS): Removed.
993 (DECL_FUNCTION_ACCESS_DECL): Likewise.
994 (DECL_FUNCTION_INNER_ACCESS): Likewise.
995 (DECL_SPECIFIC_COUNT): Likewise.
996 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
997 * expr.c (build_expr_wfl): Removed.
998 (expr_add_location): Likewise.
999
6ef795d2
TT
10002007-01-12 Tom Tromey <tromey@redhat.com>
1001
1002 * jcf-dump.c (main): Updated call to find_class.
1003 * lang.c (java_init): Removed dead code.
1004 * jcf-parse.c (read_class): Don't use java_source field. Removed
1005 dead code.
1006 (parse_zip_file_entries): Don't use java_source field.
1007 (process_zip_dir): Likewise.
1008 (jcf_parse): Removed dead code.
1009 (java_parse_file): Likewise.
1010 (read_class): Updated call to find_class.
1011 * jcf-io.c (find_class): Don't use java_source field. Removed
1012 'source_ok' argument, .java logic.
1013 * jcf.h (JCF) <java_source>: Removed field.
1014 (JCF_ZERO): Updated. (find_class): Updated.
1015 * decl.c: Removed dead code.
1016 * class.c: Removed dead code.
1017
6e63e240
TT
10182007-01-11 Tom Tromey <tromey@redhat.com>
1019
1020 * typeck.c (convert): Don't use flag_emit_class_files.
1021 * lang.c (java_post_options): Don't use flag_emit_class_files.
1022 (java_handle_option): Don't use flag_extraneous_semicolon or
1023 flag_redundant.
1024 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1025 flag_emit_class_files.
1026 (load_class): Likewise.
1027 * java-tree.h (flag_emit_class_files): Don't declare.
1028 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1029 (flag_extraneous_semicolon): Don't declare.
1030 (flag_not_overriding): Likewise.
1031 (flag_static_local_jdk1_1): Likewise.
1032 (flag_redundant): Likewise.
1033 * expr.c (build_newarray): Don't use flag_emit_class_files.
1034 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1035 flag_emit_class_files.
1036 (build_class_ref): Likewise.
1037 * builtins.c (check_for_builtin): Don't use
1038 flag_emit_class_files.
1039
08f0e79e
TT
10402007-01-10 Tom Tromey <tromey@redhat.com>
1041
1042 * lang.c (java_can_use_bit_fields_p): Removed.
1043 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1044
97b8365c
TT
10452007-01-09 Andrew Haley <aph@redhat.com>
1046
1047 * expr.c (build_java_arrayaccess): Rewrite to generate array
1048 access in canonical form.
1049 (expand_java_arraystore): Use build_fold_addr_expr() on address of
1050 array access.
1051
10522007-01-03 Andrew Haley <aph@redhat.com>
1053
1054 PR java/28754
1055 * expr.c (expand_java_field_op): If we're initializing a field's
1056 declaring interface we should not also initialize the class
1057 context in which it was referenced.
1058
10592007-01-02 Tom Tromey <tromey@redhat.com>
1060
1061 * java-tree.h (compiling_from_source, current_encoding,
1062 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1063 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1064 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1065 JTI_WFL_OPERATOR): Removed
1066 (finit_identifier_node, instinit_identifier_node,
1067 length_identifier_node, super_identifier_node,
1068 continue_identifier_node, access0_identifier_node, wfl_operator):
1069 Removed.
1070 (cyclic_inheritance_report,
1071 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1072 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1073 DECL_FIXED_CONSTRUCTOR_P): Removed.
1074 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1075 Removed.
1076 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1077 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1078 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1079 import_list, import_demand_list>: Removed.
1080 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1081 cxx_keyword_p): Removed.
1082 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1083 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1084 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1085 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1086 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1087 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1088 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1089 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1090 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1091 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1092 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1093 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1094 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1095 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1096 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1097 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1098 java_parse_abort_on_error, extract_field_decl): Removed.
1099 (finput): Declare.
1100 * lang.c: (compiling_from_source, current_encoding): Removed.
1101 (java_handle_option): Ignore -fencoding.
1102 * parse.h: Don't include lex.h.
1103 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1104 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1105 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1106 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1107 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1108 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1109 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1110 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1111 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1112 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1113 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1114 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1115 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1116 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1117 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1118 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1119 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1120 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1121 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1122 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1123 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1124 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1125 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1126 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1127 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1128 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1129 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1130 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1131 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1132 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1133 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1134 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1135 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1136 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1137 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1138 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1139 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1140 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1141 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1142 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1143 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1144 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1145 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1146 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1147 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1148 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1149 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1150 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1151 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1152 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1153 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1154 SET_CPC_STATIC_INITIALIZER_STMT,
1155 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1156 java_complete_class, java_check_circular_reference,
1157 java_fix_constructors, java_layout_classes, java_reorder_fields,
1158 java_method_add_stmt, java_get_line_col, reset_report,
1159 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1160 java_finish_classes, ctxp, ctxp_for_generation,
1161 ctxp_for_generation_last): Removed.
1162 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1163 * mangle.c (utf8_cmp): New function.
1164 (cxx_keywords): New global.
1165 (cxx_keyword_p): New function.
1166 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1167 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1168 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1169 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1170 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1171 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1172 * Make-lang.in (java.srcextra): Do nothing.
1173 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1174 (JAVA_OBJS): Don't mention deleted files.
1175 (java.mostlyclean): Likewise.
1176 (java.clean): Likewise.
1177 (JAVA_LEX_C): Removed.
1178 (buffer.o, check-init.o, parse.o): Remove unused targets.
1179 (typeck.o): Updated.
1180 * jcf-parse.c (read_class): Comment out unused code.
1181 (java_layout_seen_class_methods): New function.
1182 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1183 Removed.
1184 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
1185 (init_jcf_parse): Removed.
1186 * config-lang.in (gtfiles): Remove deleted files.
1187 * decl.c (java_init_decl_processing): Don't initialize
1188 finit_identifier_node, instinit_identifier_node,
1189 length_identifier_node, super_identifier_node,
1190 continue_identifier_node, access0_identifier_node. Don't call
1191 init_jcf_parse.
1192 * class.c (cyclic_inheritance_report): New global.
1193 (add_method_1): Don't use
1194 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1195 (maybe_layout_super_class): Comment out code.
1196 (safe_layout_class): New function.
1197 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1198 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1199 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1200 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1201 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1202 (java_gimplify_case_expr): Removed.
1203 (java_gimplify_default_expr): Likewise.
1204 (java_gimplify_new_array_init): Likewise.
1205 * parse.y: Removed.
1206 * keyword.gperf, keyword.h: Removed.
1207 * chartables.h: Removed.
1208 * check-init.c: Removed.
1209 * buffer.c, buffer.h: Removed.
1210 * convert.h: Removed.
1211 * gen-table.pl: Removed.
1212 * lex.c, lex.h: Removed.
1213
12142007-01-02 Andrew Haley <aph@redhat.com>
1215
1216 * expr.c (expand_java_arraystore): Make sure we perform a bounds
1217 check at runtime before we perform a type check.
1218
12192006-12-19 Andrew Haley <aph@redhat.com>
1220
1221 * decl.c: Bump minor BC ABI version.
1222
12232006-12-13 Gary Benson <gbenson@redhat.com>
1224
1225 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1226
12272006-12-12 Tom Tromey <tromey@redhat.com>
1228
1229 * lang-specs.h: Pass -M options to jc1.
1230 * jcf-depend.c (jcf_dependency_add_file): Don't emit
1231 dependencies.
1232
12332006-12-07 Mohan Embar <gnustuff@thisiscool.com>
1234
1235 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1236
12372006-12-06 Mohan Embar <gnustuff@thisiscool.com>
1238
1239 * lang-specs.h: Pass '%U'-based options as separate arguments.
1240
12412006-12-05 Tom Tromey <tromey@redhat.com>
1242
1243 PR java/29495:
1244 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1245 classes as well.
1246 * class.c (add_field): Handle ACC_SYNTHETIC.
1247 (add_method_1): Likewise. Handle bridge and varargs.
1248 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1249 annotation.
1250 (set_class_decl_access_flags): Handle synthetic and annotation.
1251 * java-tree.h (METHOD_BRIDGE): New macro.
1252 (METHOD_VARARGS): Likewise.
1253 (TYPE_SYNTHETIC): Likewise.
1254 (TYPE_ANNOTATION): Likewise.
1255 (lang_type): New fields 'synthetic' and 'annotation'.
1256 (lang_decl_func): New fields 'varargs' and 'bridge'.
1257
12582006-12-04 Andrew Haley <aph@redhat.com>
1259
1260 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1261 there's no map.
1262
12632006-11-29 Gary Benson <gbenson@redhat.com>
1264
1265 * expr.c (rewrite_arglist_getcaller): Reorder.
1266
12672006-11-29 Andrew Haley <aph@redhat.com>
1268
1269 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1270 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1271
12722006-11-23 Andrew Haley <aph@redhat.com>
1273
1274 * expr.c (rewrite_arglist_getcaller): New.
1275 (rewrite_arglist_getclass): Fix indentation.
1276 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
1277 gnu.classpath.VMStackWalker.getCallingClassLoader().
1278 * builtins.c (initialize_builtins): Remove duplicate def'n of
1279 __sync_synchronize.
1280 Add __builtin_return_address.
1281
12822006-11-22 Andrew Haley <aph@redhat.com>
1283
1284 * jcf-reader.c (get_attribute): Mark attr_type unused.
1285
1286 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1287
2ac7cbb5
RG
12882007-01-08 Richard Guenther <rguenther@suse.de>
1289
1290 * lex.c (do_java_lex): Use build_int_cst_wide_type.
1291 * jcf-parse.c (get_constant): Likewise.
1292
8a4a83ed
JH
12932006-11-12 Jan Hubicka <jh@suse.cz>
1294
1295 * resource.c (compile_resource_data): Update for new varpool names.
1296 * java/class.c (build_utf8_ref): Likewise.
1297
8a492e2c
DD
12982006-11-12 David Daney <ddaney@avtrex.com>
1299
1300 PR java/29805
1301 * typeck.c (build_java_array_type): Increase buffer sizes.
1302
f9f770a8
RG
13032006-11-11 Richard Guenther <rguenther@suse.de>
1304
1305 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1306 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1307
97b8365c
TT
13082006-11-06 Andrew Haley <aph@redhat.com>
1309
1310 * java-tree.h (CONSTANT_LazyFlag): New.
1311 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1312 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1313 reflection_data.
1314 (handle_constant): Return 0 for dummy cpool entries.
1315 Handle constants of kind Class.
1316 Handle constants of kind NameAndType.
1317 (handle_enclosingmethod_attribute): New.
1318 (handle_signature_attribute): New.
1319 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1320 (HANDLE_SIGNATURE_ATTRIBUTE): New.
1321 (handle_constant): Use unmangle_classname()rather than calling
1322 identifier_subst() directly.
1323
13242006-11-02 Andrew Haley <aph@redhat.com>
1325
1326 * java-tree.h (FIELD_ENUM): New.
1327 (lang_decl_var.field_enum): New.
1328 (lang_type.enum_class): New.
1329 (CLASS_ENUM): New.
1330 * class.c (set_class_decl_access_flags): Handle enum types.
1331 (add_field): Handle enum fields.
1332 (get_access_flags_from_decl): Likewise.
1333
1334 * class.c (make_class_data): Put reflection_data into rodata.
1335
13362006-11-01 Andrew Haley <aph@redhat.com>
1337
1338 * jcf-parse.c (field_offsets, bit_obstack): New variables.
1339 (jcf_parse): Write end marker to annotation_data.
1340 (java_parse_file): Create field_offsets bitmap. Destroy it.
1341 (annotation_grow, annotation_rewrite_byte)
1342 (annotation_rewrite_short, annotation_rewrite_int)
1343 (annotation_read_short, annotation_write_byte)
1344 (annotation_write_short, annotation_write_int)
1345 (handle_long_constant, handle_constant, handle_element_value)
1346 (handle_annotation, handle_annotations)
1347 (handle_annotation_attribute, rewrite_reflection_indexes)
1348 (handle_member_annotations, handle_parameter_annotations)
1349 (handle_default_annotation): New functions.
1350 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
1351 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
1352 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
1353 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
1354 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1355 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
1356 (TYPE_REFLECTION_DATA): New.
1357 (TYPE_REFLECTION_DATASIZE): New.
1358 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1359 an enum.
1360 * jcf-reader.c (get_attribute): Pass field/method index and
1361 attribute type to get_attribute().
1362 * constants.c (find_class_or_string_constant): Make nonstatic.
1363 (cpool_for_class): Likewise.
1364 (build_constants_constructor): Separate string and scalar types.
1365 * class.c (make_class_data): Generate field_indexes permutation.
1366 Pass it to rewrite_reflection_indexes().
1367 (make_class_data): Generate constructor for reflection_data field.
1368
13692006-10-20 Tom Tromey <tromey@redhat.com>
1370
1371 * gcj.texi (Top): Don't mention jv-scan.
1372 (Invoking gcj): Likewise.
1373 (Invoking gcjh): Likewise.
1374 (Invoking gjnih): Likewise.
1375 (Invoking gij): Likewise.
1376 (Invoking gcj-dbtool): Likewise.
1377 (Invoking jv-scan): Removed.
1378 * parse-scan.y: Removed.
1379 * jv-scan.c: Removed.
1380 * config-lang.in (stagestuff): Don't mention jv-scan.
1381 * Make-lang.in (java): Removed jv-scan.
1382 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1383 (JVSCAN_OBJS): Removed.
1384 (jv-scan$(exeext)): Likewise.
1385 (JAVA_MANFILES): Removed jv-scan.1.
1386 (java.uninstall): Don't mention jv-scan.
1387 (java.mostlyclean): Likewise.
1388 (java.maintainer-clean): Likewise.
1389 (.INTERMEDIATE): Likewise.
1390 (java/jv-scan.o): Removed.
1391 (jv-scan.pod): Likewise.
1392 (java.srcextra): Don't mention parse-scan.c.
1393 (java.mostlyclean): Likewise.
1394 (java/parse-scan.c): Removed.
1395 (java/parse-scan.o-warn): Removed.
1396 (java/parse-scan.o): Removed.
1397
13982006-10-20 Tom Tromey <tromey@redhat.com>
1399
1400 * lang.c (java_handle_option): Don't use
1401 jcf_write_base_directory.
1402 * jcf.h (jcf_write_base_directory): Removed.
1403 * parse.y (java_expand_classes): Don't call write_classfile.
1404 * config-lang.in (gtfiles): Removed jcf-write.c.
1405 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1406 (java/jcf-write.o): Removed.
1407 * jcf-parse.c (parse_class_file): Don't call write_classfile.
1408 * java-tree.h (write_classfile): Removed declaration.
1409 * jcf-write.c: Removed.
1410
14112006-10-20 Tom Tromey <tromey@redhat.com>
1412
1413 * Make-lang.in (java): Removed gjnih, gcjh.
1414 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1415 (GCJH_OBJS): Removed.
1416 (GJNIH_OBJS): Likewise.
1417 (gjnih$(exeext)): Likewise.
1418 (gcjh$(exeext)): Likewise.
1419 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1420 (java.install-common): Don't special case gcjh.
1421 (java.uninstall): Don't mention gcjh, gjnih.
1422 (java.mostlyclean): Likewise.
1423 (java.maintainer-clean): Likewise.
1424 (.INTERMEDIATE): Likewise.
1425 (gcjh.pod): Removed.
1426 (gjnih.pod): Likewise.
1427 (GCJH_TARGET_INSTALL_NAME): Removed.
1428 (java/gjavah-jni.o): Removed.
1429 (java/gjavah.o): Likewise.
1430 * config-lang.in (stagestuff): Removed gjnih, gcjh.
1431 * gjavah.c: Removed.
1432
14332006-10-17 Tom Tromey <tromey@redhat.com>
1434
1435 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1436 "string" case.
1437
14382006-10-17 Tom Tromey <tromey@redhat.com>
1439
1440 * jvgenmain.c (main): Handle -findirect-dispatch.
1441 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1442 jvgenmain.
1443
14442006-10-06 Andrew Haley <aph@redhat.com>
1445
1446 * builtins.c (compareAndSwapInt_builtin): Check that we really do
1447 have a compare_and_swap builtin.
1448 (compareAndSwapLong_builtin): Likewise.
1449 (compareAndSwapObject_builtin): Likewise.
1450
14512006-10-04 Andrew Haley <aph@redhat.com>
1452
1453 * builtins.c (java_builtins): Add compareAndSwapInt,
1454 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1455 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1456 putObjectVolatile, getObjectVolatile, getIntVolatile,
1457 getLongVolatile, getLong.
1458 (UNMARSHAL3): New macro.
1459 (UNMARSHAL4): Likewise.
1460 (UNMARSHAL5): Likewise.
1461 (build_arglist_for_builtin): New function.
1462 (build_addr_sum, build_check_this): New functions.
1463 (putObject_builtin. compareAndSwapInt_builtin,
1464 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1465 putVolatile_builtin, getVolatile_builtin): New builtins.
1466
14672006-06-08 Andrew Haley <aph@redhat.com>
1468
1469 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1470 get_symbol_table_index().
1471 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1472 private method.
1473 (build_known_method_ref): New arg: special. Pass it to
1474 get_symbol_table_index.
1475 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1476 the method list.
1477 (build_invokevirtual): New arg: special. Pass it to
1478 get_symbol_table_index.
1479 (expand_invoke): New variable: special.
1480 Pass it to maybe_rewrite_invocation().
1481 Pass it to build_known_method_ref().
1482 * class.c (build_symbol_entry): Add new arg: special. Use it to
1483 build the symbol table conbstructor.
1484 (emit_symbol_table): Extract SPECIAL from the method list and pass
1485 it to build_symbol_entry().
1486 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1487 special accordingly.
1488
14892006-09-08 Andrew Haley <aph@redhat.com>
1490
1491 * class.c (layout_class_method): Use build_java_signature, not
1492 build_java_argument_signature. Use lookup_java_method, not
1493 lookup_argument_method.
1494
14952006-08-16 Jakub Jelinek <jakub@redhat.com>
1496 Bryce McKinlay <bryce@mckinlay.net.nz>
1497
1498 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1499
15002006-07-18 Tom Tromey <tromey@redhat.com>
1501
1502 * lang.opt: Added missing -W options.
1503
15042006-07-12 Tom Tromey <tromey@redhat.com>
1505
1506 PR java/28329:
1507 * lang-specs.h: Pass '%U'-based options as separate arguments.
1508 Use -faux-classpath.
1509 * lang.c (java_handle_option): Handle OPT_faux_classpath.
1510 * lang.opt (faux-classpath): New option.
1511
15122006-07-07 Tom Tromey <tromey@redhat.com>
1513
1514 * class.c (make_class_data): Set value for reflection_data field.
1515 * decl.c (java_init_decl_processing): Add reflection_data field.
1516
15172006-07-07 Tom Tromey <tromey@redhat.com>
1518
1519 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1520 earlier.
1521 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1522
15232006-07-07 Andrew Haley <aph@redhat.com>
1524
1525 * jcf-parse.c (set_source_filename): Don't check for
1526 CLASS_FROM_CURRENTLY_COMPILED_P.
1527 Remove // comments.
1528
15292006-07-07 Andrew Haley <aph@redhat.com>
1530
1531 * java-tree.h (java_read_sourcefilenames): Declare.
1532 * lang.c (java_handle_option): Call java_read_sourcefilenames().
1533 * lang.opt (fsource-filename): New opt.
1534 * lang-specs.h: Add -fsource-filename.
1535 * jcf-parse.c (num_files, filenames): New variables.
1536 (reverse, cmpstringp, java_read_sourcefilenames,
1537 find_sourcefile): New.
1538 (set_source_filename): Call find_sourcefile to find the real name
1539 of a source file.
1540
15412006-06-27 Tom Tromey <tromey@redhat.com>
1542
1543 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1544 Signature, LocalVariableTypeTable, annotation attributes.
1545 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1546 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1547 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1548 (HANDLE_METHOD): Likewise.
1549 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1550 (print_annotation): New function.
1551 (print_element_value): Likewise.
1552 (indent): Likewise.
1553 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1554 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1555 (print_parameter_annotations): New function.
1556 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1557 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1558 Likewise.
1559 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1560 (print_annotations): New function.
1561
15622006-06-23 Tom Tromey <tromey@redhat.com>
1563
1564 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
1565 emitting class files, always use 1.5.
1566 * gcj.texi (Input Options): Document -fsource.
1567 (Code Generation): Document -ftarget.
1568
15692006-06-21 Tom Tromey <tromey@redhat.com>
1570
1571 PR java/28089:
1572 * expr.c (expand_java_field_op): Initialize field's declaring
1573 class.
1574
15752006-06-20 Tom Tromey <tromey@redhat.com>
1576
1577 * expr.c (push_value): Always flush quick stack.
1578
15792006-06-19 Tom Tromey <tromey@redhat.com>
1580
1581 * expr.c (push_value): Also flush quick stack if value is a
1582 component_ref.
1583
15842006-06-19 Tom Tromey <tromey@redhat.com>
1585
1586 * expr.c (push_value): Flush quick stack if value has side
1587 effects.
1588
15892006-06-13 Tom Tromey <tromey@redhat.com>
1590
1591 * class.c (is_compiled_class): Explicitly check for current
1592 class.
1593
15942006-06-09 Tom Tromey <tromey@redhat.com>
1595
1596 * gjavah.c (decompile_method): Don't decompile a static field
1597 accessor method.
1598
15992006-06-06 Tom Tromey <tromey@redhat.com>
1600
1601 * lang-specs.h <jc1>: Add .jar file to command line if
1602 -fsaw-java-file. Also, remove -ffilelist-file in this case.
1603
16042006-06-05 Tom Tromey <tromey@redhat.com>
1605
1606 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1607 synthetic, enum, annotation.
1608 * jcf.h (ACC_BRIDGE): New macro.
1609 (ACC_VARARGS): Likewise.
1610 (ACC_SYNTHETIC): Likewise.
1611 (ACC_ENUM): Likewise.
1612 (ACC_ANNOTATION): Likewise.
1613
16142006-06-04 Tom Tromey <tromey@redhat.com>
1615
1616 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1617 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1618 and -ftarget.
1619 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
1620 when needed. Handle classpath-setting.
1621 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1622 * lang-specs.h: Rewrote.
1623
16242006-06-04 Tom Tromey <tromey@redhat.com>
1625
1626 * jcf-io.c (find_class): Set source_ok to 0.
1627 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1628 (parse_class_file): Don't call java_mark_class_local.
1629 (java_parse_file): Skip .java files. Call java_mark_class_local
1630 before lowering any code.
1631 (parse_zip_file_entries): Don't call duplicate_class_warning
1632 here.
1633 (process_zip_dir): ... call it here.
1634 * class.c (add_field): Don't mark field external if it is being
1635 compiled into this object.
1636 (make_class_data): Handle situation where class_dtable_decl is
1637 created before Class is compiled.
1638 (is_compiled_class): Don't assume files in zip are compiled into
1639 this object.
1640 (layout_class_method): Don't mark method external if it is being
1641 compiled into this object.
1642
16432006-06-04 Tom Tromey <tromey@redhat.com>
1644
1645 * jcf-path.c (jcf_path_compute): New function.
1646 * jcf.h (jcf_path_compute): Declare.
1647
719bb4e3 16482006-10-23 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
c79efc4d
RÁE
1649
1650 * decl.c: Include langhooks.h.
1651 (builtin_function): Remove.
1652 (java_init_decl_processing): Replace calls to builtin_function
1653 with add_builtin_function.
1654 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1655 (java/decl.o): Depend on langhooks.h.
1656 * java-tree.h (builtin_function): Remove.
1657
b5422ad7
BM
16582006-10-10 Brooks Moses <bmoses@stanford.edu>
1659
1660 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1661
ff682191
TT
16622006-09-12 Tom Tromey <tromey@redhat.com>
1663
1664 * expr.c (push_value): Always flush quick stack.
1665
f8248aaa
TT
16662006-09-12 Tom Tromey <tromey@redhat.com>
1667
1668 PR java/29013:
1669 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1670 the push of the called method's return result.
1671
ed08fcf6
TT
16722006-09-12 Tom Tromey <tromey@redhat.com>
1673
1674 * jvspec.c (lang_specific_driver): Read spec file even if
1675 -fsyntax-only.
1676
4b943588
TT
16772006-09-12 Tom Tromey <tromey@redhat.com>
1678
1679 PR java/28754:
1680 * expr.c (expand_java_field_op): Initialize field's declaring
1681 interface if necessary.
1682
91da2e7c
TT
16832006-09-12 Tom Tromey <tromey@redhat.com>
1684
1685 PR java/28892:
1686 * expr.c (expand_java_field_op): No error for assignments not in
1687 class initializer or constructor.
1688
182ee260
AH
16892006-08-22 Andrew Haley <aph@redhat.com>
1690
1691 * decl.c (java_add_stmt): Give the statement list a type.
1692
97c074fd
JJ
16932006-08-16 Jakub Jelinek <jakub@redhat.com>
1694 Bryce McKinlay <bryce@mckinlay.net.nz>
1695
1696 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1697
b576b3a7
SM
16982006-08-10 Simon Martin <simartin@users.sourceforge.net>
1699
1700 PR java/8923
1701 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1702 or '--' is used with a constant operand.
1703 (java_complete_lhs): When processing a '++' or '--' expression,
1704 don't call java_complete_tree but java_complete_lhs, so that a
1705 static final variable operand is never replaced by its value. This
1706 avoids an ICE later on.
1707 (patch_unaryop): Fixed typo in comment.
1708
48779194
VR
17092006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1710
1711 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1712
0ed431d4
BM
17132006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1714
1715 * builtins.c (check_for_builtin): If a builtin could result in a
1716 direct call being generated, don't use it if flag_indirect_dispatch
1717 is set.
1718
17192006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1720
1721 * gcj.texi (Invocation): Corrections for Invocation API example.
1722
8a71d22b
AH
17232006-07-04 Andrew Haley <aph@redhat.com>
1724
1725 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1726 entry.
1727
6de5f432
AH
17282006-06-21 Andrew Haley <aph@redhat.com>
1729
1730 * java-tree.h (update_aliases): Remove
1731 * expr.c (expand_iinc): Remove call to update_aliases().
1732 (STORE_INTERNAL): Likewise.
1733 * decl.c (update_aliases, initialize_local_variable)
1734 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1735
fe4e7c65
AH
17362006-06-19 Andrew Haley <aph@redhat.com>
1737
5f86874e
AP
1738 PR java/1305
1739 PR java/27908
fe4e7c65
AH
1740 * expr.c (java_modify_addr_for_volatile): New function.
1741 (expand_java_field_op): Handle volatile fields.
1742 * java-gimplify.c (java_gimplify_component_ref): Call
1743 java_modify_addr_for_volatile to give the field_ref the correct
1744 volatile type.
1745 (java_gimplify_modify_expr): Likewise.
1746 * java-tree.h (java_modify_addr_for_volatile): New decl.
1747
7348b1fd
KB
17482006-06-17 Karl Berry <karl@gnu.org>
1749
1750 * gcj.texi (@dircategory): Use "Software development" instead
1751 of "Programming", following the Free Software Directory.
1752
e046c56e
AH
17532006-06-16 Andrew Haley <aph@redhat.com>
1754
1755 * class.c (make_class_data): When using flag_indirect_classes,
1756 don't initialize the vtable of Class instances.
1757
572f9e47
AH
17582006-06-09 Andrew Haley <aph@redhat.com>
1759
1760 PR java/1305
1761 PR java/27908
1762 * builtins.c (initialize_builtins): Add __sync_synchronize().
1763 * class.c (add_field): Mark volatile fields.
1764 * java-gimplify.c (java_gimplify_expr): Call new functions to
1765 handle self-modifying exprs and COMPONENT_REFs.
1766 (java_gimplify_component_ref): New.
1767 (java_gimplify_modify_expr): Add handling for volatiles.
1768
be9a52f8
TT
17692006-06-08 Tom Tromey <tromey@redhat.com>
1770
1771 * gcj.texi (libgcj Runtime Properties): Document
1772 gnu.gcj.user.realname.
1773
313ab5ee
AH
17742006-06-08 Andrew Haley <aph@redhat.com>
1775
1776 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1777 get_symbol_table_index().
1778 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1779 private method.
1780 (build_known_method_ref): New arg: special. Pass it to
1781 get_symbol_table_index.
1782 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1783 the method list.
1784 (build_invokevirtual): New arg: special. Pass it to
1785 get_symbol_table_index.
1786 (expand_invoke): New variable: special.
1787 Pass it to maybe_rewrite_invocation().
1788 Pass it to build_known_method_ref().
1789 * class.c (build_symbol_entry): Add new arg: special. Use it to
1790 build the symbol table conbstructor.
1791 (emit_symbol_table): Extract SPECIAL from the method list and pass
1792 it to build_symbol_entry().
1793 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1794 special accordingly.
1795
696dad4b
DD
17962006-06-06 David Daney <ddaney@avtrex.com>
1797
1798 * gcj.texi (libgcj Runtime Properties): Document
1799 gnu.gcj.runtime.NameFinder.show_raw and
1800 gnu.gcj.runtime.NameFinder.remove_unknown.
1801
c02174ab
TT
18022006-06-06 Tom Tromey <tromey@redhat.com>
1803
1804 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1805 synthetic, enum, annotation.
1806 * jcf.h (ACC_BRIDGE): New macro.
1807 (ACC_VARARGS): Likewise.
1808 (ACC_SYNTHETIC): Likewise.
1809 (ACC_ENUM): Likewise.
1810 (ACC_ANNOTATION): Likewise.
1811
22482f74
MS
18122006-06-06 Mike Stump <mrs@apple.com>
1813
1814 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1815 installing during build.
1816
99d2ea7e
TF
18172006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
1818
1819 * gcj.texi (Extensions): Document the new gcj-dbtool-based
1820 classname-to-library resolution mechanism.
1821 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1822 mechanism deprecated.
1823 (libgcj Runtime Properties): Document
1824 gnu.gcj.runtime.VMClassLoader.library_control's new default.
1825
a6404080
JJ
18262006-05-29 Jakub Jelinek <jakub@redhat.com>
1827
1828 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1829 bit wide type.
1830 (jword): Define to uint64 on 64-bit arches.
1831 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1832
375277f6
KH
18332006-05-28 Kazu Hirata <kazu@codesourcery.com>
1834
1835 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1836 typos.
1837
153d08d5
TT
18382006-05-26 Tom Tromey <tromey@redhat.com>
1839
1840 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1841 * verify-glue.c (vfy_class_type): New function.
1842 * verify-impl.c (check_constant): Allow 'ldc class'.
1843 * verify.h (vfy_class_type): Declare.
1844
b713aa3a
AH
18452006-05-25 Andrew Haley <aph@redhat.com>
1846
1847 PR java/27756
1848 * decl.c (maybe_pushlevels): When variable ranges are non-nested
1849 update all lifetimes, not just the first one.
1850
740dfbde
TT
18512006-05-24 Tom Tromey <tromey@redhat.com>
1852
1853 * java-tree.h: Fixed flag documentation.
1854
5aca4c41
TT
18552006-05-24 Tom Tromey <tromey@redhat.com>
1856
1857 PR libgcj/27729:
1858 * jcf.h (ACC_INVISIBLE): Changed value.
1859
5eecfc4d
AH
18602006-05-24 Andrew Haley <aph@redhat.com>
1861
cc07b2db 1862 PR java/27754
5eecfc4d
AH
1863 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1864 COMPOUND_EXPR.
1865
8dc3f290
L
18662006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1867
1868 * lang.opt (femit-class-file): Remove VarExists.
1869
6420fb77
TT
18702006-05-16 Tom Tromey <tromey@redhat.com>
1871
1872 * verify-impl.c (verify_instructions_0) <op_return>: Special case
1873 for Object.<init>.
1874
14c7833c
L
18752006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1876
1877 PR driver/26885
1878 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1879 $(GCC_OBJS).
1880
05b44921
L
18812006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1882
1883 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1884 (java/expr.o): Replace target.h with $(TARGET_H).
1885 (java/parse.o): Likewise.
1886
e080b30b
AH
18872006-05-10 Andrew Haley <aph@redhat.com>
1888
1889 * class.c (emit_indirect_register_classes): Fix comment.
1890
b1138221
TT
18912006-05-04 Tom Tromey <tromey@redhat.com>
1892
1893 * java-tree.h (uses_jv_markobj_p): Declare.
1894 * class.c (uses_jv_markobj_p): Removed.
1895 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1896 (get_boehm_type_descriptor): Use it.
1897 (uses_jv_markobj_p): Moved from class.c. Return bool.
1898
532f41fa
TT
18992006-05-04 Tom Tromey <tromey@redhat.com>
1900
1901 * java-tree.def (THIS_EXPR): Now a tcc_expression.
1902
b2ed63b4
AH
19032006-05-04 Andrew Haley <aph@redhat.com>
1904
1905 * class.c (make_field_value): Always build_address_of fdecl if
1906 there is an initializer.
1907
19082006-05-03 Andrew Haley <aph@redhat.com>
1909
1910 PR libgcj/27352
1911 * expr.c (maybe_rewrite_invocation): New function.
1912 (rewrite_arglist_getclass): Likewise.
1913 (rules): New.
1914 (expand_invoke): Call maybe_rewrite_invocation.
1915 * parse.y (patch_invoke): Likewise.
1916 * java-tree.h: (maybe_rewrite_invocation): New function.
1917
621ae65d
AH
19182006-04-21 Andrew Haley <aph@redhat.com>
1919
1920 * lang.c (java_init): Handle flag_indirect_classes.
1921 * jvgenmain.c: Use "class$$" instead of "class$".
1922 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1923 DECLs.
1924 (mangle_class_field): Special case "class$$" as well as "class$".
1925 * constants.c (build_ref_from_constant_pool): If
1926 flag_indirect_classes, generate a ref into the heap.
1927 * decl.c (constants_field_decl_node,
1928 constants_data_field_decl_node): New.
1929 * class.c (build_static_class_ref): New.
1930 (build_classdollar_field): Factor out from build_class_ref().
1931 (make_field_value): Handle static fields in heap.
1932 (make_class_data): Make sure we get a static ref to class.
1933 Make class initializer const if flag_indirect_classes.
1934 (register_class): Build a class_ref for initialization if
1935 flag_indirect_classes.
1936 (emit_indirect_register_classes): New.
1937
f48c58e8
KH
19382006-04-08 Kazu Hirata <kazu@codesourcery.com>
1939
1940 * expr.c, gjavah.c: Fix comment typos.
1941
e4724785
AH
19422006-04-03 Andrew Haley <aph@redhat.com>
1943
1944 PR java/26858
1945 * expr.c (build_field_ref): Don't check the field offset if
1946 flag_syntax_only.
1947
e6b7893e
AH
19482006-03-30 Andrew Haley <aph@redhat.com>
1949
1950 PR java/26858
1951 * lang.c (java_attribute_table): New.
1952 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1953 * expr.c (build_field_ref): Add a null pointer check for all
1954 fields of offset > 4k. Don't do so for accesses via the this
1955 pointer, which we know can never be null.
1956 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1957 methods nonnull.
1958
ad3a7ce3
CD
19592006-03-30 Carlos O'Donell <carlos@codesourcery.com>
1960
1961 * Make-lang.in: Rename docdir to gcc_docdir.
1962
1549c4e5
TT
19632006-03-30 Tom Tromey <tromey@redhat.com>
1964
1965 PR java/26042:
1966 * parse.y (java_reorder_fields): Reset superclass field's size as
1967 well.
1968
531e214a
TT
19692006-03-28 Tom Tromey <tromey@redhat.com>
1970
1971 PR java/26390:
1972 * parse.y (find_most_specific_methods_list): Added 'class'
1973 argument.
1974 (lookup_method_invoke): Updated.
1975
b32d6f93
TT
19762006-03-15 Tom Tromey <tromey@redhat.com>
1977
1978 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1979 non-static method calls.
1980
a9e317ed
DD
19812006-03-15 David Daney <ddaney@avtrex.com>
1982
1983 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1984 declaration.
1985
dba370a8
DD
19862006-03-15 David Daney <ddaney@avtrex.com>
1987
1988 * lang.opt (-freduced-reflection): New option.
1989 * lang.c (java_post_options): Generate an error if
1990 -freduced-reflection used with -fjni or -findirect-dispatch.
1991 * java-tree.h (flag_reduced_reflection): Declare new variable.
1992 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1993 if bitmap overflows and flag_reduced_reflection set.
1994 * class.c (uses_jv_markobj_p): New function.
1995 (make_class_data): Moved generation of vtable to before
1996 reflection data, generate less reflection data if
1997 flag_reduced_reflection set.
1998 * gcj.texi: Document -freduced-reflection.
1999
88200a8d
TT
20002006-03-15 Tom Tromey <tromey@redhat.com>
2001
492edb3a 2002 PR java/26638:
88200a8d
TT
2003 * class.c (get_interface_method_index): Don't put <clinit> into
2004 interface table.
2005
2afd35b3
TT
20062006-03-15 Tom Tromey <tromey@redhat.com>
2007
2008 * parse.y (analyze_clinit_body): Ignore empty statements.
2009
d6c122f7
DD
20102006-03-08 David Daney <ddaney@avtrex.com>
2011
2012 * gcj.texi: Document -static-libgcj option.
2013
b9e6e588
AH
20142006-02-20 Andrew Haley <aph@redhat.com>
2015
2016 * jcf-parse.c (parse_class_file): Set input_location from
2017 current_class.
2018
517f4918
AH
20192006-02-15 Andrew Haley <aph@redhat.com>
2020
2021 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2022 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2023 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2024
58e0c554
AH
20252006-02-09 Andrew Haley <aph@redhat.com>
2026
2027 PR java/26192
2028 * expr.c (expand_invoke): Allow methods in arrays to be resolved
2029 in their superclass.
2030
2031 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2032 array types.
2033
855dd2bc
TT
20342006-02-08 Tom Tromey <tromey@redhat.com>
2035
2036 PR java/22578:
2037 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2038 * builtins.c (convert_real): New function.
2039 (java_builtins): Handle Float.intBitsToFloat,
2040 Float.floatToRawIntBits, Double.longBitsToDouble,
2041 Double.doubleToRawLongBits.
2042
0920886f
AH
20432006-02-07 Andrew Haley <aph@redhat.com>
2044
2045 * expr.c (expand_invoke): (BC mode.) If we find a method in a
2046 class other than the one in which we expected to find it, ignore
2047 the result.
2048
2049 PR java/25535
2050 * constants.c (build_constants_constructor): move initializer into
7135d758 2051 first halfword on a 64-bit big-endian machine.
5f86874e 2052
05d8200d
TT
20532006-02-04 Tom Tromey <tromey@redhat.com>
2054
2055 PR java/25676:
2056 * builtins.c (max_builtin): Skip floating point 'max'.
2057 (min_builtin): Skip floating point 'min'.
2058 (check_for_builtin): Never return NULL_TREE.
2059
fb579387
TT
20602006-02-04 Tom Tromey <tromey@redhat.com>
2061
2062 PR java/26097:
2063 * expr.c (push_type): Avoid side effect in gcc_assert.
2064
5460aa9c
RS
20652006-02-04 Roger Sayle <roger@eyesopen.com>
2066
2067 * decl.c (java_init_decl_processing): Create char_type_node as a
2068 regular INTEGER_TYPE node.
2069 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2070 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2071 test for char_type_node and promoted_char_type_node as special
2072 instances of INTEGER_TYPE tree codes.
2073 (promote_type,build_java_signature): Likewise.
2074 * jcf-write.c (adjust_typed_op): Likewise.
2075 * mangle.c (mangle_type): Likewise.
2076 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2077 * parse.h (JINTEGRAL_TYPE_P): Likewise.
2078
74a88f62
AT
20792006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
2080
2081 * expr.c (java_stack_swap): Revert gcc_assert patch.
2082
ab184b2a
BE
20832006-02-03 Ben Elliston <bje@au.ibm.com>
2084
2085 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2086 * typeck.c: Likewise.
2087 * verify-impl.c: Likewise.
2088 * class.c: Likewise.
2089 * decl.c: Likewise.
2090 * jcf-parse.c: Likewise.
2091 * constants.c: Likewise.
2092 * check-init.c: Likewise.
2093 * jcf-write.c: Likewise.
2094 * verify-glue.c: Likewise.
2095 * mangle.c: Likewise.
2096 * expr.c: Likewise.
2097 * lang.c: Likewise.
2098 * boehm.c: Likewise.
2099
46fd0f8c
JH
21002006-02-01 Jan Hubicka <jh@suse.cz>
2101
2102 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2103 * lang.c (java_init_options): Set no_unit_at_a_time_default.
2104
6bb862cc
AH
21052006-01-30 Andrew Haley <aph@redhat.com>
2106
2107 PR java/21428
2108 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2109
a6d6c2c0
JM
21102006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2111
2112 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2113 Update copyright notice dates.
2114
719bb4e3 21152006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
4c360e1f 2116
874be9d3 2117 * jvspec.c (lang_specific_spec_functions): Remove.
4c360e1f 2118
facb553f
TT
21192006-01-06 Tom Tromey <tromey@redhat.com>
2120
2121 * gcj.texi (Arrays): Added more documentation for
2122 JvNewObjectArray.
2123 (Primitive types): Correct information about primitive classes.
2124 (Reference types): New node.
2125 (Index): New node.
2126
2eefc773
AO
21272005-12-16 Alexandre Oliva <aoliva@redhat.com>
2128
2129 * jcf-parse.c (set_source_filename): Set the decl source location
2130 even when returning early.
2131
86bcd3a2
TT
21322005-12-15 Tom Tromey <tromey@redhat.com>
2133 Andrew Haley <aph@redhat.com>
2134
2135 PR java/25429
2136 * parse.y (resolve_expression_name): Don't generate accessor
2137 methods for constant fields.
2138
65260edb
AH
21392005-12-13 Andrew Haley <aph@redhat.com>
2140
2141 PR java/25366
2142 PR java/25368
2143 * class.c (maybe_layout_super_class): Update current_class before
2144 calling do_resolve_class.
2145
74daec8c
L
21462005-12-12 H.J. Lu <hongjiu.lu@intel.com>
2147
2148 PR java/25330
2149 * jcf-write.c (write_classfile): Use PID in temporary class
2150 file. Save/restore errno when reporting error.
2151
92aed1cb
TL
21522005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
2153
2154 PR java/9861
2155 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2156 to bare_function_type and including the return type
2157 * builtins.c (initialize_builtins) : Change builtin mangled name
2158 constants to conform to new mangling scheme
2159
e0038845
AH
21602005-12-08 Andrew Haley <aph@redhat.com>
2161
ccd83be5 2162 PR libgcj/25265
e0038845
AH
2163 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2164 (soft_abstractmethod_node): New.
2165 * expr.c (build_field_ref): Add in-line check for missing field.
2166 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2167
719bb4e3 21682005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
bd97af06
RÁE
2169
2170 * Make-lang.in (java.all.build, java.install-normal): Remove.
2171
719bb4e3 21722005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2f4d2d18
AM
2173
2174 * Make-lang.in: Remove all dependencies on s-gtype, except for
2175 gt-java-parse.h.
2176
d6b5193b
RS
21772005-12-07 Richard Sandiford <richard@codesourcery.com>
2178
2179 * class.c (build_utf8_ref, emit_register_classes): Use
2180 switch_to_section and get_section.
2181
53bbb42e
TT
21822005-12-06 Tom Tromey <tromey@redhat.com>
2183
2184 PR java/25283:
2185 * parse.y (patch_new_array_init): Revert previous patch.
2186 (lookup_method_invoke): Use size-less array type when creating an
2187 anonymous constructor.
2188
45c76dbb
TT
21892005-12-05 Tom Tromey <tromey@redhat.com>
2190
2191 * parse.y (patch_new_array_init): Don't set length on array.
2192
1c00c223
RG
21932005-12-02 Richard Guenther <rguenther@suse.de>
2194
2195 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2196 buildN instead of build.
2197 * class.c (finish_class): Likewise.
2198 * expr.c (java_create_object): Likewise.
2199
3141ed0f
TT
22002005-11-28 Tom Tromey <tromey@redhat.com>
2201
2202 PR java/18278:
2203 * expr.c (build_jni_stub): Unwrap the return value.
2204 * java-tree.h (soft_unwrapjni_node): New define.
2205 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2206 * decl.c (java_init_decl_processing): Initialize
2207 soft_unwrapjni_node.
2208
409f11d5
BM
22092005-11-24 Bryce McKinlay <mckinlay@redhat.com>
2210
5f86874e 2211 * gcj.texi (gij options): Add -Xss documentation.
409f11d5 2212
1c57e876
WM
22132005-11-08 Wil Mahan <wmahan@gmail.com>
2214
2215 PR java/23617
2216 * zextract.c (read_zip_archive): Fix out of memory error when
2217 reading jar files with zip-style comments.
2218
e263bc93
TL
22192005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
2220
2221 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2222 formats.
2223 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2224
a93770ef
NS
22252005-10-12 Nathan Sidwell <nathan@codesourcery.com>
2226 Wil Mahan <wmahan@gmail.com>
2227
2228 PR java/23620
2229 * class.c (make_class): Create empty binfo here.
2230 (set_super_info): Only create binfo if we have superclasses.
2231
9f1dfd16
RM
22322005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
2233
2234 PR java/24127
2235 * parse.y (method_header): Make the result of the rule a NULL_TREE
2236 when a parsing error occurs.
2237
07f08799
TT
22382005-09-29 Tom Tromey <tromey@redhat.com>
2239
2240 PR java/24120:
2241 * jcf-io.c (memoized_dirlist_hash): New function.
2242 (caching_stat): Use it.
2243
1b70949a
RM
22442005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
2245
2246 PR java/21418
2247 * class.c (inherits_from_p): Try to lay out super class
2248 if it is not already laid out.
2249 (maybe_layout_super_class): Handle the case where SUPER_CLASS
2250 is a NULL_TREE.
2251
c298ec4e
JM
22522005-09-18 James A. Morrison <phython@gcc.gnu.org>
2253
2254 * builtins.c (max_builtin, min_builtin, abs_builtin,
2255 java_build_function_call_expr): Use fold_buildN.
2256 * class.c (layout_class_method): Likewise.
2257 * expr.c (java_truthvalue_conversion, build_java_jsr,
2258 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2259 build_java_binop, build_field_ref, expand_compare,
2260 build_known_method_ref, build_invokevirtual,
2261 process_jvm_instruction): Likewise.
2262 * parse.y (patch_binop, patch_exit_expr): Likewise.
2263 * typeck.c (convert_ieee_real_to_integer): Likewise.
2264 (convert): Don't call fold after convert_ieee_real_to_integer.
2265
c629e611
BM
22662005-09-14 Bryce McKinlay <mckinlay@redhat.com>
2267
2268 PR java/23891
2269 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2270 the newly created type. Set import lists here, not in create_class.
2271 (jdep_resolve_class): Set current_class.
2272 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
2273 the current package context, not ctxp->package.
2274 (cicp_cache): Removed.
2275 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2276 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2277 * java-tree.h (TYPE_PACKAGE): New macro.
2278 (struct lang_type): New member 'package'.
2279
8f096083
AH
22802005-09-09 Andrew Haley <aph@redhat.com>
2281
2282 PR libgcj/23182
2283 * expr.c (pop_type_0): If the expected type is object or ptr
2284 (i.e. void*), return the type of the object we just popped from
2285 the stack.
2286
3e248b83
AP
22872005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
2288
2289 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2290 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2291
cd64dc98
KH
22922005-09-06 Kazu Hirata <kazu@codesourcery.com>
2293
2294 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2295 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2296 typos. Follow spelling conventions.
2297
75d1a485
RM
22982005-09-05 Ranjit Mathew <rmathew@hotmail.com>
2299
2300 PR java/23431
2301 * typeck.c (lookup_do): Look up interfaces for the original class,
2302 not the base class.
2303 * parse.y (java_check_regular_methods): Fix diagnostic message for
2304 more restrictive overriding of a method from an interface.
2305
97b51fd0
TT
23062005-08-16 Tom Tromey <tromey@redhat.com>
2307
2308 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2309 class' initial state.
2310
17b45622
RM
23112005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2312
2313 PR java/22113
2314 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2315 `literal_token' for large numeric input tokens.
2316
3881a11b
RM
23172005-08-16 Ranjit Mathew <rmathew@hotmail.com>
2318
2319 PR java/19870
2320 * parse.y (nested_field_access_p): Rename to nested_member_access_p
2321 and expand to handle method accesses across nested classes.
2322 (build_outer_method_access_method): Rename to
2323 build_nested_method_access_method. Minor adjustments to comments.
2324 (resolve_expression_name): Use the newly-renamed
2325 nested_member_access_p method.
2326 (resolve_qualified_expression_name): Likewise.
2327 (patch_method_invocation): Also consider static methods for access
2328 method generation. Minor adjustments to comments.
2329 (maybe_use_access_method): Use the more general
2330 nested_memeber_access_p to determine access across nested class
2331 boundaries. Allow THIS_ARG to be NULL (for static methods).
2332
33173fd4
TT
23332005-08-15 Tom Tromey <tromey@redhat.com>
2334
2335 PR java/23300.
2336 * expr.c (build_field_ref): Don't generate otable reference when
2337 DECL_FIELD_OFFSET is 0.
2338 * class.c (maybe_layout_super_class): Pass outer class to
2339 do_resolve_class.
2340
4e5c1f10
TT
23412005-08-15 Tom Tromey <tromey@redhat.com>
2342
2343 * java-tree.h (LABEL_IN_SUBR): Removed.
2344 (LABEL_IN_SUBR): Likewise.
2345 (LABEL_IS_SUBR_START): Likewise.
2346 (LABEL_SUBR_START): Likewise.
2347 (LABEL_SUBR_CONTEXT): Likewise.
2348 (LABEL_CHANGED): Likewise.
2349 (LABEL_RETURN_LABEL): Likewise.
2350 (LABEL_RETURN_TYPE_STATE): Likewise.
2351 (LABEL_RETURN_LABELS): Likewise.
2352 (RETURN_MAP_ADJUSTED): Likewise.
2353 (LABEL_PENDING_CHAIN): Likewise.
2354
65e8066b
TT
23552005-08-15 Tom Tromey <tromey@redhat.com>
2356
2357 * Make-lang.in (JAVA_OBJS): Removed verify.o
2358 (java/verify.o): Removed.
2359 * verify.c: Removed.
2360 * lang.c (flag_new_verifier): Removed.
2361 (java_post_options): Updated.
2362 * java-tree.h (flag_new_verifier): Removed.
2363 (verify_jvm_instructions): Removed.
2364 * expr.c (pop_type_0): Assume flag_new_verifier is true.
2365 (build_java_check_indexed_type): Likewise.
2366 (expand_java_arraystore): Likewise.
2367 (expand_java_arrayload): Likewise.
2368 (pop_arguments): Likewise.
2369 (expand_byte_code): Likewise.
2370 (process_jvm_instruction): Likewise.
2371
74b002ba
AH
23722005-08-10 Andrew Haley <aph@redhat.com>
2373
2374 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2375 type mismatches to make legal GIMPLE.
2376
23772005-08-10 Robin Green <greenrd@greenrd.org>
2378
2379 PR java/23230:
2380 * parse.y (maybe_use_access_method): Generalize check from
2381 java.lang.Object to any superclass of current_class
2382
063fb392
NS
23832005-08-08 Nathan Sidwell <nathan@codesourcery.com>
2384
2385 * class.c (build_class_ref): Wrap the primary class type in a
2386 NOP_EXPR.
2387 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2388 primary class type from the NOP_EXPR in which it was placed.
2389
baa92306
DN
23902005-07-28 Diego Novillo <dnovillo@redhat.com>
2391
2392 * expr.c (expand_load_internal): Fix missing parens in
2393 predicate.
2394
0d9f15f1 23952005-07-28 Andrew Haley <aph@redhat.com>
c6e5d1af
AH
2396
2397 * expr.c (expand_load_internal): Convert to destination type.
2398
32cafd73
MH
23992005-07-22 Manfred Hollstein <mh@suse.com>
2400
2401 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2402 (check_constant): Likewise.
2403 (check_wide_constant): Likewise.
2404
4038c495
GB
24052005-07-20 Giovanni Bajo <giovannibajo@libero.it>
2406
2407 Make CONSTRUCTOR use VEC to store initializers.
2408 * check-init.c (check_init): Update to cope with VEC in
2409 CONSTRUCTOR_ELTS.
2410 * class.c (make_field_value, make_method_value, get_dispatch_table,
2411 make_class_data, emit_symbol_table, emit_catch_table,
2412 emit_assertion_table): Use build_constructor_from_list instead of
2413 build_constructor.
2414 * constants.c (build_constants_constructor): Likewise.
2415 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2416 VEC in CONSTRUCTOR_ELTS.
2417 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2418 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2419 of a TREE_LIST.
2420 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2421 CONSTRUCTOR_ELTS.
2422 * parse.y (build_new_array_init): Use build_constructor_from_list
2423 instead of build_constructor.
2424 (patch_new_array_init): Update to cope with VEC in
2425 CONSTRUCTOR_ELTS.
2426 (array_constructor_check_entry): Likewise.
2427
de227b23
TT
24282005-07-12 Tom Tromey <tromey@redhat.com>
2429
2430 * jvspec.c (lang_specific_driver): Put filelist_filename first on
2431 command line.
2432
309ca98d
TT
24332005-07-12 Tom Tromey <tromey@redhat.com>
2434
2435 PR java/19674:
2436 * parse-scan.y (interface_member_declaration): Added
2437 empty_statement.
2438
820cc88f
DB
24392005-07-08 Daniel Berlin <dberlin@dberlin.org>
2440
2441 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2442 (LABEL_PENDING_CHAIN): Ditto.
2443 (LABEL_PC): Ditto.
2444 (DECL_BIT_INDEX): Ditto.
2445
cb14ee6a
BM
24462005-07-07 Bryce McKinlay <mckinlay@redhat.com>
2447
2448 PR java/18119
2449 * parse.y (inner_class_accessible): New function. Logic moved from
2450 check_inner_class_access.
2451 (check_inner_class_access): Use inner_class_accessible.
2452 (resolve_inner_class): Simplify arguments. Create circularity hash
2453 here. Keep looking for classes if we found one that was inaccessible.
2454 Return the inaccessible class only if there is no other match.
2455 (do_resolve_class): Update for new resolve_inner_class arguments.
2456 Don't create circularity_hash here.
2457
ca12deb4
BM
24582005-07-07 Bryce McKinlay <mckinlay@redhat.com>
2459
5f86874e 2460 PR java/21045
ca12deb4
BM
2461 * parse.y (add_exception_to_throws): New function.
2462 (purge_unchecked_exceptions): Removed.
2463 (get_constructor_super): Renamed from verify_constructor_super. Now
2464 returns the super constructor after verification.
2465 (java_complete_expand_method): Don't use purge_unchecked_exceptions
2466 or save/restore the exception list.
2467 (check_thrown_exceptions): Add uncaught exceptions in anonymous
2468 class initializers and constructors to the throws clause of the method.
2469
b226520a
BM
24702005-07-05 Bryce McKinlay <mckinlay@redhat.com>
2471
5f86874e
AP
2472 PR java/19674
2473 * parse.y (interface_member_declaration): Allow empty statements in
2474 interface declarations.
b226520a 2475
ef330312
PB
24762005-07-05 Paolo Bonzini <bonzini@gnu.org>
2477
2478 * Makefile.in (parse.o): Adjust dependencies.
2479 * parse.y: Include tree-dump.h.
2480
dee15844
JM
24812005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2482
2483 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
2484 flag for quoting.
2485
200bbdce
AP
24862005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
2487
2488 * parse.y (issue_warning_error_from_context): Call
2489 pp_output_formatted_text to be able to get the buffer.
2490
24912005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
8ce2456a
AP
2492
2493 * parse.y (issue_warning_error_from_context): Update for the
2494 renaming of pp_format_text to pp_format.
2495
617a1b71
PB
24962005-06-28 Paul Brook <paul@codesourcery.com>
2497
2498 * decl.c (java_init_decl_processing): Call
2499 default_init_unwind_resume_libfunc.
2500
4ebe7d93
TT
25012005-06-27 Tom Tromey <tromey@redhat.com>
2502
2503 PR java/21540, PR java/13788:
2504 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2505 fold_constant_for_init.
2506 (patch_binop): Added 'folding' argument. Updated all callers.
2507 (patch_unaryop) <NOP_EXPR>: New case.
2508 (fold_constant_for_init) <NOP_EXPR>: Likewise.
2509 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2510
6e0fbdd9
JH
25112005-06-25 Jan Hubicka <jh@suse.cz>
2512
2513 * builtins.c (define_builtin): Accept new flags parameter.
2514 (initialize_builtins): Mark the builtins const and nothrow accordingly.
2515
f12c30a8
KC
25162005-06-25 Kelley Cook <kcook@gcc.gnu.org>
2517
2518 * all files: Update FSF address in copyright headers.
2519
aca02b7e
TT
25202005-06-24 Tom Tromey <tromey@redhat.com>
2521
2522 * verify-impl.c (verify_instructions_0): Correctly handle
2523 situation where PC falls off end.
2524
c0f6dc94
BM
25252005-06-23 Bryce McKinlay <mckinlay@redhat.com>
2526
2527 PR java/20697
2528 * parse.y (find_most_specific_methods_list): Remove special case for
2529 inner classes.
2530
fbb4c46b
TT
25312005-06-15 Tom Tromey <tromey@redhat.com>
2532
2533 PR libgcj/21906:
2534 * class.c (make_method_value): Use soft_abstractmethod_node for
2535 abstract method.
2536 * java-tree.h (soft_abstractmethod_node): New define.
2537 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2538 * decl.c (java_init_decl_processing): Initialize
2539 soft_abstractmethod_node.
2540
7bfb5ccc
GK
25412005-06-13 Geoffrey Keating <geoffk@apple.com>
2542
2543 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2544
885beb81
PB
25452005-06-13 Per Bothner <per@bothner.com>
2546
2547 * expr.c (int highest_label_pc_this_method,
2548 start_label_pc_this_method): New globals.
2549 (lookup_label): Add start_label_pc_this_method to pc for label, and
2550 update highest_label_pc_this_method. This prevents conflicts between
2551 labels from different methods.
2552 * java-tree.h: Declare new globals.
2553 * jcf-parse.c (parse_class_file): If needed bump
2554 start_label_pc_this_method and reset highest_label_pc_this_method.
2555
924b2450
TT
25562005-06-13 Tom Tromey <tromey@redhat.com>
2557
2558 PR java/21844:
2559 * parse.y (nested_field_access_p): Handle case where outer field
2560 is inherited by enclosing class.
2561
d35310e3
PB
25622005-06-12 Per Bothner <per@bothner.com>
2563
2564 * class.c (inherits_from_p): Do load_class if needed.
2565
74118f15
KG
25662005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2567
2568 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2569 * java-tree.h (parse_error_context): Move...
2570 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2571 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2572 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2573
77462a3c
RS
25742005-06-08 Roger Sayle <roger@eyesopen.com>
2575
2576 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2577
4b794eaf
JJ
25782005-06-06 Jakub Jelinek <jakub@redhat.com>
2579
2580 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2581 msgid for argument name.
2582 * gjavah.c (error): Likewise.
2583 * java-tree.h (parse_error_context): Likewise.
2584 * parse.y (parse_error_context, parse_warning_context,
2585 issue_warning_error_from_context): Likewise.
2586
4267db98
TT
25872005-06-01 Tom Tromey <tromey@redhat.com>
2588
2589 PR java/21722:
2590 * class.c (build_static_field_ref): Don't fold constant fields if
2591 current class is from a .class file and we're using indirect
2592 dispatch.
2593
4c714dd4
KG
25942005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2595
2596 * java/verify-glue.c: Don't include errors.h and include toplev.h.
2597 * java/Make-lang.in: Updates dependencies.
2598
38c9d142
RM
25992005-05-26 Ranjit Mathew <rmathew@hotmail.com>
2600
2601 PR java/19870.
2602 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2603 NESTED_FIELD_ACCESS_IDENTIFIER_P.
2604 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2605 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2606 * jcf-write.c (generate_classfile): Use
2607 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2608 OUTER_FIELD_ACCESS_IDENTIFIER_P.
2609 * parse.y (build_outer_field_access): Rename to
2610 build_nested_field_access. Support static fields and outer-to-inner
2611 class accesses.
2612 (outer_field_access_p): Rename to nested_field_access_p. Support
2613 static fields and generalise to outer-to-inner class and sibling
2614 inner class accesses.
2615 (outer_field_expanded_access_p): Rename to
2616 nested_field_expanded_access_p and support static fields.
2617 (outer_field_access_fix): Rename to nested_field_access_fix and
2618 support static fields.
2619 (build_outer_field_access_expr): Rename to
2620 build_nested_field_access_expr and support static fields.
2621 (build_outer_field_access_methods): Rename to
2622 build_nested_field_access_methods and support static fields. For
2623 static fields, generate accessors without class instance parameters.
2624 (build_outer_field_access_method): Rename to
2625 build_nested_field_access_method and support static fields.
2626 (build_outer_method_access_method): Use
2627 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2628 OUTER_FIELD_ACCESS_IDENTIFIER_P.
2629 (resolve_expression_name): Consider static field accesses across
2630 nested classes.
2631 (resolve_qualified_expression_name): Likewise.
2632 (java_complete_lhs): Use nested_field_access_fix instead of
2633 outer_field_access_fix.
2634 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2635 Use nested_field_expanded_access_p instead of
2636 outer_field_expanded_access_p. Use nested_field_access_fix instead
2637 of outer_field_access_fix.
2638 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2639 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2640
a04323f4
BM
26412005-05-26 Bryce McKinlay <mckinlay@redhat.com>
2642
2643 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
2644 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2645 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2646 MINOR_BINARYCOMPAT_ABI_VERSION): New.
2647 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2648 (parse_version): Calculate version ID using new method. Use bit-flags
2649 for flag_indirect_dispatch and flag_bootstrap_classes.
2650
6de33afa
RH
26512005-05-25 Richard Henderson <rth@redhat.com>
2652
2653 PR libgcj/21692
2654 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2655 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2656 DECL_CONTEXT; avoid pushdecl_top_level.
2657 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2658 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2659 (layout_class_method): Likewise.
2660 * decl.c (java_mark_cni_decl_local): New.
2661 (java_mark_class_local): Use it.
2662 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2663 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2664 (struct lang_decl_func): Add local_cni;
2665 (struct lang_decl_var): Add class_field, vtable.
2666 (java_mangle_decl): Declare.
2667 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2668 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2669 (mangle_obstack_1): New.
2670 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
2671 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
2672 lhd_set_decl_assembler_name for things that don't need mangling.
2673 (mangle_class_field): Rename from java_mangle_class_field, make
2674 static, don't call init_mangling or finish_mangling.
2675 (mangle_vtable): Similarly.
2676 (mangle_local_cni_method_decl): New.
2677 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
2678 gcc_assert, and MANGLE_RAW_STRING.
2679 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2680
5c498b10
DD
26812005-05-25 DJ Delorie <dj@redhat.com>
2682
2683 * class.c (set_constant_value): Move warning control from if() to
2684 warning(OPT_*).
2685
e0f391dd
RH
26862005-05-24 Richard Henderson <rth@redhat.com>
2687
2688 * builtins.c (define_builtin): Don't call make_decl_rtl.
2689 * constants.c (build_constant_data_ref): Likewise.
2690 * class.c (build_utf8_ref): Likewise.
2691 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2692 (get_dispatch_table, layout_class_method): Likewise.
2693 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2694 by hand.
2695 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2696 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2697 to determine if we need a non-zero address.
2698 * decl.c (builtin_function): Don't call make_decl_rtl.
2699 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2700 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2701 * resource.c (compile_resource_data): Likewise.
2702 * parse.y (resolve_field_access): Re-word comment to avoid
2703 building DECL_RTL.
2704
8cfb12bf
RH
27052005-05-24 Richard Henderson <rth@redhat.com>
2706
2707 * class.c (registered_class): Take it out of class_roots; turn into
2708 a vec of trees.
2709 (register_class): Make static. Don't duplicate decl node. Use
2710 VEC_safe_push.
2711 (emit_register_classes): Use VEC_iterate. Use output_constant
2712 instead of assemble_integer. Don't call mark_decl_referenced
2713 directly.
2714 * java-tree.h (register_class): Remove decl.
2715
6fb09909
PB
27162005-05-19 Paolo Bonzini <bonzini@gnu.org>
2717
2718 PR java/17845
2719
2720 * parse.y (register_package, package_list): Remove.
2721 (package_declaration): Do not call register_package.
2722 (do_resolve_class): Do not use package_list.
2723
d7f35e48
GP
27242005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
2725
2726 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2727 unused variable.
2728
b4220f64
TT
27292005-05-15 Tom Tromey <tromey@redhat.com>
2730
2731 PR java/21519:
2732 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2733 NOTE_PUSH.
2734
f5ea88a3
BM
27352005-05-12 Aaron Luchko <aluchko@redhat.com>
2736
8cfb12bf 2737 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
f5ea88a3 2738
cca1655e
TT
27392005-05-11 Tom Tromey <tromey@redhat.com>
2740
2741 * gcj.texi (Code Generation): Document -fbootstrap-classes.
2742 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2743 (parse_version): Use it.
2744 * lang.opt (-fbootstrap-classes): New option.
2745
27e928ed
PB
27462005-05-10 Paolo Bonzini <bonzini@gnu.org>
2747
2748 PR java/21436
2749 * class.c (maybe_layout_super_class): Look for imports in this_class.
2750 * parse.h (ctxp_for_generation_last): New.
2751 (do_resolve_class): Add a parameter.
2752 * parse.y (ctxp_for_generation_last): New.
2753 (java_pop_parser_context): Add at end of list.
2754 (find_in_imports, find_in_imports_on_demand): Look in ctxp
2755 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2756 the given type are NULL.
2757 (do_resolve_class): Look into the imports of the new second parameter.
2758 Adjust recursive calls.
2759 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2760 calls to do_resolve_class.
2761 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2762 (java_complete_class): Do not do that here.
2763
d8be0aab
TF
27642005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
2765
2766 PR java/20309
2767 * Make-lang.in (java): Add gjnih.
2768 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2769 (GJNIH_OBJS): New variable.
2770 (gjnih$(exeext)): New target.
2771 (JAVA_MANFILES): Add gjnih.1.
2772 (java.uninstall): Add gjnih.1.
2773 (java.mostlyclean): Add gjnih.
2774 (java.maintainer-clean): Add gjnih.1.
2775 (java/gjavah-jni.o): New target.
2776 (.INTERMEDIATE): Add gjnih.pod.
2777 (gjnih.pod): New target.
2778 * config-lang.in (stagestuff): Add gjnih.
2779 * gcj.texi (Top): Add gjnih node.
2780 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2781 -bootclasspath options.
2782 (Invoking gjnih): New node.
2783 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2784 (TOOLNAME): New macro.
2785 (error): Replace hard-coded gcjh with TOOLNAME.
2786 (process_file): Likewise.
2787 (usage): Likewise.
2788 (version): Likewise.
2789 (help): Likewise. Add help output for -force, -old, -trace and -J
2790 options.
2791 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2792 (options): Add force, old, trace and J fields.
2793 (main): Handle -force, -old, -trace and -J options.
2794
a67aa338
TT
27952005-05-03 Tom Tromey <tromey@redhat.com>
2796
2797 PR java/21245:
2798 * gjavah.c (main): Unlink output file on error.
2799
f384d658
KH
28002005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2801
2802 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2803 copyright.
2804
22e8617b
TT
28052005-04-29 Tom Tromey <tromey@redhat.com>
2806
2807 * expr.c (build_jni_stub): Updated for change to build_block.
2808
5e4b794a
AP
28092005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
2810
2811 * expr.c (force_evaluation_order): Declare 'saved' earlier.
2812
2c80f015
AH
28132005-04-28 Andrew Haley <aph@redhat.com>
2814
2815 PR java/19285
2816 * java-tree.h (soft_resolvepoolentry_node): New.
2817 (alloc_constant_fieldref): Declare.
2818 * expr.c (expand_java_field_op): Don't call class_init for
2819 accesses to static fields with indirect dispatch.
2820 * builtins.c (initialize_builtins): Add "__builtin_expect".
2821 * decl.c (soft_resolvepoolentry_node): New variable.
2822 (java_init_decl_processing): Create a decl for
2823 "_Jv_ResolvePoolEntry".
2824 * class.c (build_fieldref_cache_entry): New function.
2825 (build_static_field_ref): Rewrite for indirect dispatch.
2826 * constants.c (find_name_and_type_constant_tree): New function.
2827 (alloc_constant_fieldref): Likewise.
2828 (build_constants_constructor): Handle CONSTANT_Fieldref and
2829 CONSTANT_NameAndType.
2830
2831 PR java/21115
2832 * expr.c (force_evaluation_order): Convert outgoing args smaller
2833 than integer.
2834
b40c360d
BM
28352005-04-27 Bryce McKinlay <mckinlay@redhat.com>
2836
2837 * gcj.texi (libgcj Runtime Properties): Remove obsolete
2838 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
2839 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2840
2653bb0c
KG
28412005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2842
2843 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2844 to `unlock_stream' with `unlock_std_streams'.
2845
58a690ae
JJ
28462005-04-25 Jakub Jelinek <jakub@redhat.com>
2847
2848 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2849 instead of just expr.h.
2850
98a3dad4
KG
28512005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2852
2853 * gjavah.c (main): Unlock the stdio streams.
2854 * jcf-dump.c (main): Likewise.
2855 * jv-scan.c (main): Likewise.
2856 * jvgenmain.c (main): Likewise.
2857
d4ee4d25
DD
28582005-04-23 DJ Delorie <dj@redhat.com>
2859
2860 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2861 parse.y: Adjust warning() callers.
2862
55f96367
BM
28632005-04-21 Bryce McKinlay <mckinlay@redhat.com>
2864
2865 * gcj.texi (Object fields): Change "Integer" to "Int" in example
2866 contructor.
2867
fcda2002
BM
28682005-04-20 Bryce McKinlay <mckinlay@redhat.com>
2869
2870 * gcj.texi: Fix typos and bogus example.
2871
9be3f9b1
KH
28722005-04-19 Kazu Hirata <kazu@cs.umass.edu>
2873
2874 * except.c: Fix a comment typo.
2875
61e72330
JB
28762005-04-19 Julian Brown <julian@codesourcery.com>
2877
2878 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2879 indirect dispatch with PIC.
2880
d393cb72
AH
28812005-04-18 Andrew Haley <aph@redhat.com>
2882
2883 * java-except.h (struct eh_range.handler): Remove unused field.
2884 (handle_nested_ranges): Remove function declaration.
2885 (sanity_check_exception_range): Add function declaration.
2886 * verify.c (verify_jvm_instructions): Remove call to
2887 handle_nested_ranges.
2888 * verify-glue.c (verify_jvm_instructions_new): Call
2889 sanity_check_exception_range.
2890 * except.c (link_handler, eh_range_freelist, link_handler,
2891 handle_nested_ranges): Remove.
2892 (add_handler): Rewrite.
2893 (sanity_check_exception_range): New function.
2894 (print_ranges): New function.
2895
e22a7bcf
JB
28962005-04-13 Julian Brown <julian@codesourcery.com>
2897
2898 * decl.c (finish_method): Give methods once-only linkage.
2899
0b026622
RS
29002005-04-11 Richard Sandiford <rsandifo@redhat.com>
2901
2902 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2903
d502f210
KG
29042005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2905
2906 * java-tree.h: Don't use PARAMS().
2907
e87047c6
PB
29082005-04-07 Per Bothner <per@bothner.com>
2909
2910 * class.c (push_class): By default, suppress debug output.
2911 (finish_class): Enable debug output for classes we're emitting.
2912
53b42091
AH
29132005-04-07 Andrew Haley <aph@redhat.com>
2914
2915 * gcj.texi: Correct gcj-dbtool instructions.
2916
df044388
KH
29172005-04-04 Kazu Hirata <kazu@cs.umass.edu>
2918
2919 * gcj.texi: Fix a typo.
2920 * lang.c: Fix a comment typo.
2921
b6121641
TF
29222005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
2923
2924 * gcj.texi (Invoking gij): Add descriptions of new -X options.
2925 Mention recognized-and-ignored compatibility options.
2926 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2927 JvFree.
2928 (About CNI): Add Memory allocation section.
2929
77c10b31
TT
29302005-04-01 Tom Tromey <tromey@redhat.com>
2931
2932 * decl.c (java_init_decl_processing): Fix types of
2933 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2934 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2935 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2936
cd9c7bd2
JH
29372005-03-31 Jan Hubicka <jh@suse.cz>
2938
2939 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2940 * class.c: Include cgraph.h
2941 (make_local_functoin_alias): Mark aslias as needed.
2942 * resource.c: Include cgraph.h
2943 (compile_resource_data): Go via cgraph interface.
2944
15f188a4
ILT
29452005-03-30 Ian Lance Taylor <ian@airs.com>
2946
2947 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2948
2d47d84c
TT
29492005-03-30 Tom Tromey <tromey@redhat.com>
2950
2951 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2952 inner_class_info_index==0 or outer_class_info_index==0.
2953
dc0a6205
TT
29542005-03-29 Tom Tromey <tromey@redhat.com>
2955
2956 * gcj.texi (libgcj Runtime Properties): Document
2957 gnu.gcj.runtime.endorsed.dirs.
2958
206318ea
AG
29592005-03-24 Anthony Green <green@redhat.com>
2960
2961 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2962 'gcj-dbtool -p'.
2963
85c4f26a
TT
29642005-03-23 Tom Tromey <tromey@redhat.com>
2965
2966 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2967 (parse_version): Use it.
2968
d101034c
JM
29692005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2970
2971 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2972
6726a1f5
AH
29732005-03-18 Andrew Haley <aph@redhat.com>
2974
2975 PR java/20522
2976 * decl.c (update_aliases): Don't update variables that are about
2977 to die.
2978 (maybe_poplevels): Add comment.
2979
3af57c70
BM
29802005-03-17 Bryce McKinlay <mckinlay@redhat.com>
2981
2982 PR java/20502
2983 * jcf-parse.c (duplicate_class_warning): New function.
2984 (java_parse_file): Call duplicate_class_warning if
2985 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2986 (parse_zip_file_entries): Likewise. Also set
2987 CLASS_FROM_CURRENTLY_COMPILED_P.
2988
d8e97847
AH
29892005-03-16 Andrew Haley <aph@redhat.com>
2990
2991 * expr.c (expand_java_arrayload): Don't generate a
2992 NullPointerException based on the type of the node.
2993 (build_java_array_length_access): Likewise.
2994
a1286ef5
ZW
29952005-03-15 Zack Weinberg <zack@codesourcery.com>
2996
2997 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2998
558b8548
TT
29992005-03-11 Tom Tromey <tromey@redhat.com>
3000
3001 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3002 (libgcj Runtime Properties): Document the default .db.
3003
2743ba1c
RM
30042005-03-10 Ranjit Mathew <rmathew@hotmail.com>
3005
3006 PR java/20312
3007 * parse.y (checks_throws_clauses): Check exceptions list even when
3008 the base class does not come from a source file being compiled.
3009 (java_complete_lhs): Remove unused variable 'wfl'.
3010
9e1af876
RM
30112005-03-09 Ranjit Mathew <rmathew@hotmail.com>
3012
3013 PR java/20338
a1286ef5 3014 * decl.c (finish_method): Emit _Jv_InitClass for private static
9e1af876 3015 methods inside inner classes as well.
2a6464a6 3016
9e1af876 30172005-03-08 Julian Brown <julian@codesourcery.com>
2a6464a6
JB
3018 * Revert patch from 2005-03-08 for causing bootstrap failure on
3019 ppc-darwin.
3020
9148ab01
JB
30212005-03-08 Julian Brown <julian@codesourcery.com>
3022
3023 * decl.c (finish_method): Give methods once-only linkage.
3024
b1e11d1e
BM
30252005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3026
a1286ef5 3027 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
b1e11d1e 3028
a2da2c9a
BM
30292005-03-07 Bryce McKinlay <mckinlay@redhat.com>
3030
3031 * verify-glue.c (vfy_is_assignable_from): Perform static check using
3032 can_widen_reference_to if the C++ ABI is in use.
3033 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3034 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3035 type_isresolved, init_state, set_pc, state_get_pc,
3036 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3037 (verify_fail): Report the current PC from the verifier context.
3038 (free_state): Remove #if 0 block to enable this function.
3039 (free_verifier_context): Call free_state on state_list iterator
3040 values before freeing them.
3041 * expr.c (pop_type_0): Pop correct type for error message when stack
3042 contains a multi-word type.
3043
30442005-03-07 Ranjit Mathew <rmathew@hotmail.com>
3045
3046 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3047 for known NULL array length access.
3048
7f8b151b
TT
30492005-03-07 Tom Tromey <tromey@redhat.com>
3050
3051 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3052
1ddc0328
KH
30532005-03-06 Kazu Hirata <kazu@cs.umass.edu>
3054
3055 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3056 typeck.c: Update copyright.
3057
ecf71365
RM
30582005-03-06 Ranjit Mathew <rmathew@hotmail.com>
3059
3060 Remove xref code.
3061 * xref.c, xref.h: Remove file.
3062 * Make-lang.in (java/xref.o): Remove.
3063 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3064 * lang.c (flag_emit_xref): Remove definition.
3065 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3066 * typeck.c (convert): Remove use of do_not_fold.
3067 * parse.y (do_not_fold): Remove definition.
3068 (parser grammar): Remove xref code.
3069 (maybe_create_class_interface_decl, create_class): Likewise.
3070 (register_fields, method_header, finish_method_declaration): Likewise.
3071 (declare_local_variables, source_end_java_method): Likewise.
3072 (java_complete_expand_classes): Do not set do_not_fold.
3073 (java_complete_expand_method): Remove xref code.
3074 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3075 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3076 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3077 (patch_synchronized_statement, patch_throw_statement): Likewise.
3078 (maybe_build_class_init_for_field): Likewise.
3079
3f724eb8
KH
30802005-03-05 Kazu Hirata <kazu@cs.umass.edu>
3081
3082 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3083 instead of IS_NON_TYPE_CODE_CLASS.
3084
7235c300
AH
30852005-03-04 Andrew Haley <aph@redhat.com>
3086
a1286ef5
ZW
3087 PR java/18362
3088 * class.c (set_method_index): Don't set method_index if it is
3089 NULL_TREE.
3090 (layout_class_method): Don't complain about "non-static method foo
3091 overrides static method" in the case of indirect dispatch.
7235c300 3092
cea91480
KG
30932005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3094
3095 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3096 warning.
3097 * Make-lang.in: Don't elide warnings in jcf-io.c.
3098
7cea62b4
PB
30992005-03-01 Per Bothner <per@bothner.com>
3100
3101 PR java/8608
3102 * check-init.c (wfl): Remove static.
3103 (final_assign_error, check_init): Replace calls to parse_error_context
3104 by plain error.
3105 (check_init): Save, set, and restore input_location for each exp.
3106
837491bc
PB
31072005-03-01 Per Bothner <per@bothner.com>
3108
3109 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3110 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3111 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3112
027b7c36
PB
31132005-03-01 Per Bothner <per@bothner.com>
3114
3115 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3116
bc71e4a2
TF
31172005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3118
3119 PR libgcj/16923
3120 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3121 JvVMOption.
3122
84b6a4d2
TT
31232005-02-22 Tom Tromey <tromey@redhat.com>
3124
3125 PR java/20056:
3126 * verify-impl.c (EITHER): New define.
3127 (types_compatible): Handle it.
3128 (check_field_constant): Use it.
3129
1870a43b
TT
31302005-02-18 Tom Tromey <tromey@redhat.com>
3131
e022a6cb
TT
3132 PR java/20056:
3133 * verify-impl.c (types_equal): Fixed test.
3134
1870a43b
TT
3135 PR java/20056:
3136 * verify-glue.c (vfy_class_has_field): New function.
3137 * verify.h (vfy_class_has_field): Declare.
3138 * verify-impl.c (check_field_constant): Added 'putfield'
3139 argument.
3140 (verify_instructions_0): Updated.
3141 (types_equal): New function.
3142
adfec6a6
TT
31432005-02-14 Tom Tromey <tromey@redhat.com>
3144
3145 PR java/19921:
3146 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3147 stack effect of multianewarray.
3148
891df09c
AH
31492005-02-14 Andrew Haley <aph@redhat.com>
3150
3151 PR java/19907
3152 * expr.c (expand_byte_code): Call promote_arguments().
3153 (promote_arguments): New function.
7235c300 3154 * decl.c (check_local_unnamed_variable): Remove special case for
891df09c
AH
3155 new verifier.
3156 (find_local_variable): Promote all boolean types to int
3157 when searching for local variable decls.
a1286ef5 3158
537677ba
KH
31592005-02-12 Kazu Hirata <kazu@cs.umass.edu>
3160
3161 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3162 parse-scan.y: Update copyright.
3163
7b45aab4
PB
31642005-02-11 Per Bothner <per@bothner.com>
3165
3166 PR java/15543
3167 * parse-scan.y (input_location): Remove variable.
3168 (main_input_filename): New - replaces input_filename, which isn't
3169 settable if USE_MAPPED_LOCATION.
3170 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3171 so we don't reference input_location or wfl_operator in that case.
3172 * jv-scan.c (expand_location): Remove - no longer used.
3173 (main): Set main_input_filename rather than input_filename.
3174
c6a912da
RH
31752005-02-09 Richard Henderson <rth@redhat.com>
3176
3177 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3178 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3179
86641a95
MD
31802005-02-08 Marcin Dalecki <martin@dalecki.de>
3181
3182 * expr.c (add_type_assertion): Use the proper enumeration type,
3183 since this is what htab_find_slot() is expecting.
3184
706bb773
JM
31852005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3186
3187 * gcj.texi: Update copyright dates.
3188
f8845935
TT
31892005-02-02 Tom Tromey <tromey@redhat.com>
3190
3191 * gcj.texi (libgcj Runtime Properties): Default library_control
3192 to 'cache'.
3193
55967ba2
RM
31942005-02-02 Ranjit Mathew <rmathew@hotmail.com>
3195
3196 PR java/15543
3197 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3198 (modifiers) when square brackets are present in a declaration for
3199 a final paramter.
3200 * jv-scan.c (main): Set input_filename and input_line.
3201
3d4da704
TT
32022005-02-01 Tom Tromey <tromey@redhat.com>
3203
3204 PR java/19742:
3205 * gjavah.c (get_field_name): Don't override name for JNI header.
3206
8ddd633a
RS
32072005-02-01 Roger Sayle <roger@eyesopen.com>
3208
3209 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3210 of unsigned types using iushr and lushr JVM bytecodes.
3211
55967ba2 32122005-02-01 Ranjit Mathew <rmathew@hotmail.com>
f619dcab
RM
3213
3214 PR java/19738
3215 * gjavah.c (jni_print_float): Do not emit floating-point
3216 initialiser for a static final field.
3217 (jni_print_double): Likewise.
3218
22f8a068
MM
32192005-02-01 Mark Mitchell <mark@codesourcery.com>
3220
3221 Revert:
3222 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3223 * gjavah.c (print_field_info): Mark static data members of
3224 floating-point type with "__extension__".
3225
8c94c75a
MM
32262005-01-31 Mark Mitchell <mark@codesourcery.com>
3227
3228 * gjavah.c (print_field_info): Mark static data members of
3229 floating-point type with "__extension__".
3230
7f75bb83
RM
32312005-02-01 Ranjit Mathew <rmathew@hotmail.com>
3232
3233 PR java/9157
3234 * parse.y (build_string_concatenation): Remove redundant if.
3235 (patch_conditional_expr): Attempt to patch_string() the condition
3236 of a ?: as well, in addition to its other operands.
3237
60b5ee6b
TT
32382005-01-25 Tom Tromey <tromey@redhat.com>
3239
3240 * Make-lang.in (java/java-tree-inline.o): Removed.
3241
c5e72f51 32422005-01-25 Ranjit Mathew <rmathew@hotmail.com>
31fc696c
RM
3243
3244 PR java/19070
3245 * parse.y (patch_binop): Allow comparisons against NULL only
3246 if the other operand is of a reference type.
3247
2a4d0626
TT
32482005-01-24 Tom Tromey <tromey@redhat.com>
3249
3250 * java-tree.h (gcj_abi_version): Declare.
3251 * class.c (make_class_data): Push gcj_abi_version into "next"
3252 field. Renamed field.
3253 * decl.c (gcj_abi_version): New global.
3254 (parse_version): New function.
3255 (java_init_decl_processing): Call it. Renamed 'next' field.
3256 Include version.h.
3257 (GCJ_BINARYCOMPAT_ADDITION): New define.
3258
d5f62555
RS
32592005-01-24 Roger Sayle <roger@eyesopen.com>
3260
3261 PR java/19295
3262 * jcf-write.c (generate_bytecode_insns): Conversions between
3263 integer types of the same precision shouldn't generate widening
3264 or narrowing conversion bytecodes.
3265
6aa9e91a
KH
32662005-01-22 Kazu Hirata <kazu@cs.umass.edu>
3267
3268 * java-except.h, java-tree.h: Remove unused prototypes.
3269
155d49d7
AP
32702005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
3271
3272 PR java/18091:
3273 * jcf-write.c (perform_relocations): Don't call memcpy if source
3274 and destination are the same.
3275
6db1446e
TT
32762005-01-17 Tom Tromey <tromey@redhat.com>
3277
3278 * verify-impl.c (get_short): Sign extend.
3279 (get_int): Likewise.
3280
88910b6a
RM
32812005-01-12 Ranjit Mathew <rmathew@hotmail.com>
3282
3283 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3284 with TYPE_SIZE.
3285
2b816e14
RM
32862005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3287
3288 * verify.c: Revert to the version before the BC-ABI merge.
3289
5bf8aebc
RM
32902005-01-10 Ranjit Mathew <rmathew@hotmail.com>
3291
3292 PR java/19277
3293 * check-init.c (check_init): Take care of references that do not
3294 have an explicit final variable declaration (e.g. array length
3295 access) for pre/post in/de-crement operators.
3296
b927d3a4
MW
32972005-01-08 Mark Wielaard <mark@klomp.org>
3298
3299 * parse.y (process_imports): Allocate (and free) original_name only
3300 when not already defined.
3301 * jcf-parse.c (read_class): Free results of find_class() and
3302 lrealpath().
3303 (java_parse_file): Keep pointer to head of file_list and free when
3304 done. Free result of lrealpath().
3305
b4a49222
TT
33062005-01-05 Tom Tromey <tromey@redhat.com>
3307
3308 * gcj.texi (Standard Properties): java.ext.dirs is now used.
3309
521fce52
AH
33102004-12-20 Andrew Haley <aph@redhat.com>
3311
3312 * typeck.c: Use fold_convert for ints and booleans.
3313
cd5fcd33
AH
33142004-12-17 Andrew Haley <aph@redhat.com>
3315
3316 PR java/18931
3317 * typeck.c (convert): Use a CONVERT_EXPR when converting to
3318 BOOLEAN_TYPE or CHAR_TYPE.
3319 (convert_to_boolean, convert_to_char) : Remove.
3320 * convert.h (convert_to_boolean, convert_to_char) : Remove.
3321 * expr.c (expand_load_internal): Do type conversion if type is not
3322 as required.
a1286ef5 3323
e50e6b88
DS
33242004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
3325
eb536e6b 3326 PR target/18459
e50e6b88
DS
3327 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3328 Update comment.
3329
477c6c35
AH
33302004-12-07 Andrew Haley <aph@redhat.com>
3331
9e6a1ba9 3332 PR java/18811:
477c6c35
AH
3333 * jcf-parse.c (load_class): Remove sanity test for missing inner
3334 class file.
a1286ef5 3335
6e07ee6d
TT
33362004-12-06 Tom Tromey <tromey@redhat.com>
3337
3338 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3339 (java.uninstall): Likewise.
3340 (java.maintainer-clean): Likewise.
3341 (.INTERMEDIATE): Likewise.
3342 (java.install-man): Likewise.
3343 (gcj-dbtool.pod): New target.
3344 * gcj.texi (Code Generation): Document -findirect-dispatch.
3345 (libgcj Runtime Properties): Document
3346 gnu.gcj.precompiled.db.path.
3347 (Top): Link to "Invoking gcj-dbtool".
3348
a58d7453
TT
33492004-12-06 Tom Tromey <tromey@redhat.com>
3350
3351 PR java/14853:
3352 * java-tree.h (extract_field_decl): Declare.
3353 * parse.y (extract_field_decl): Renamed from
3354 strip_out_static_field_access_decl. No longer static.
3355 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3356
c56c2878
TT
33572004-12-03 Tom Tromey <tromey@redhat.com>
3358
3359 * lang.c (flag_new_verifier): Define.
3360 (java_post_options): Set flag_new_verifier if indirect dispatch
3361 is being used.
3362 * lang.opt (fnew-verifier): Removed.
3363
8b45a0d3
TT
33642004-12-03 Tom Tromey <tromey@redhat.com>
3365
3366 PR bootstrap/14614:
3367 * Make-lang.in (java.install-common): Only install transformed
3368 gcjh if gcj-cross exists.
3369
2360c81b
AH
33702004-12-03 Andrew Haley <aph@redhat.com>
3371
3372 PR java/18812
3373 * except.c (link_handler): Patch 'outer' field of siblings of the
3374 range we're demoting.
3375
3381c28f 33762004-12-03 Andrew Haley <aph@redhat.com>
a1286ef5
ZW
3377
3378 PR java/18697
3381c28f
AH
3379 * class.c (layout_class_method): Don't fail to override a method
3380 simply because it has DECL_ARTIFICIAL set.
3381
5c5d79d2
TT
33822004-12-02 Tom Tromey <tromey@redhat.com>
3383
3384 PR java/16675:
3385 * parse.y (craft_constructor): Special case null_pointer_node.
3386
ea7b59ba
TT
33872004-12-02 Tom Tromey <tromey@redhat.com>
3388
3389 PR java/18741:
3390 * java-gimplify.c (java_gimplify_expr): Don't call
3391 SET_EXPR_LOCATION unless wrapped tree is an expression.
3392
ca6b9955
PB
33932004-11-27 Per Bothner <per@bothner.com>
3394
3395 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
3396 Fix fencepost error in 'i', which got executed one too many times.
3397 Also, fold memcpy into explicit loop, as originally intended.
3398 Also, free temporary 'buf' which otherwise leaks.
3399
ad500466
PB
34002004-11-27 Per Bothner <per@bothner.com>
3401
3402 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3403 local static variables if not USE_MAPPED_LOCATION.
3404
0b1214ef
KH
34052004-11-27 Kazu Hirata <kazu@cs.umass.edu>
3406
3407 * class.c, decl.c, expr.c: Fix comment typos.
3408
532815a7
AP
34092004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
3410
3411 PR java/18305
3412 * decl.c (end_java_method): Call
3413 attach_init_test_initialization_flags on all the init_decls.
3414 * parse.y (attach_init_test_initialization_flags): Move to ...
3415 * expr.c (attach_init_test_initialization_flags): here and
3416 support BIND_EXPR also.
3417 * java-tree.h (attach_init_test_initialization_flags): Prototype.
3418 * jcf-parse.c (parse_class_file): Don't disable class init
3419 optimization.
3420
597cdf4f
JM
34212004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3422
3423 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3424 in diagnostics.
3425
eb9744a7
RH
34262004-11-24 Richard Henderson <rth@redhat.com>
3427
3428 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3429 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3430
36739040
TT
34312004-11-24 Tom Tromey <tromey@redhat.com>
3432
6a4877c4
TT
3433 * verify.c (defer_merging): Don't use C++-style comment.
3434 * verify.h (java_opcode): Added java_opcode_end.
3435 * class.c (build_class_ref): Remove C++ comment and old FIXME.
3436
528d9c63
TT
3437 * verify-impl.c (vfy_push_type): Removed bogus "return".
3438 (initialize_stack): Use vfy_alloc and vfy_free.
3439 (verify_instructions_0): Likewise.
3440
36739040
TT
3441 * Merged gcj-abi-2-dev-branch to trunk.
3442
34432004-11-24 Andrew Haley <aph@redhat.com>
3444
3445 * jcf-parse.c (parse_class_file): Set file_start_location.
3446
34472004-11-10 Tom Tromey <tromey@redhat.com>
3448
3449 * class.c (make_field_value): Don't call build_static_field_ref.
3450 (build_static_field_ref): Don't emit direct references when using
3451 indirect dispatch.
3452
3453 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
3454 -verbose:class into man page synopsis.
3455
34562004-11-09 Tom Tromey <tromey@redhat.com>
3457
3458 * expr.c (build_java_arraystore_check): Still generate check if
3459 element type is itself an array.
3460
34612004-11-08 Tom Tromey <tromey@redhat.com>
3462
3463 * java-tree.h (soft_check_assignment_node): Removed.
3464 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3465 * decl.c (java_init_decl_processing): Don't initialize
3466 soft_check_assignment_node.
3467
34682004-11-05 Tom Tromey <tromey@redhat.com>
3469
3470 * class.c (layout_class_methods): Don't add Miranda methods when
3471 using indirect dispatch.
3472
34732004-11-05 Bryce McKinlay <mckinlay@redhat.com>
3474
3475 * class.c (make_class_data): Call emit_assertion_table to set the
3476 'assertion_table' field.
3477 (build_signature_for_libgcj): Move here from expr.c.
3478 (add_assertion_table_entry): New function. Callback for assertion
3479 hashtable traversal.
a1286ef5 3480 (emit_assertion_table): New. Take class argument, and generate
36739040
TT
3481 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3482 * decl.c (init_decl_processing): Define assertion_entry_type record.
3483 Push 'assertion_table' class field instead of 'verify'.
3484 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3485 (type_assertion_hash): Include 'assertion_code' in hash.
3486 (add_type_assertion): Rewritten. Take class and assertion_code
3487 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3488 (can_widen_reference_to): Use new add_type_assertion() arguments.
a1286ef5 3489 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
36739040
TT
3490 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3491 (verify_identifier_node): Removed.
3492 (assertion_entry_type, assertion_table_type): New.
3493 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3494 assertion code definitions.
3495 (struct type_assertion): Add assertion_code. Rename 'source_type' and
3496 'target_type' to 'op1' and 'op2'.
3497 (add_type_assertion): Declare.
3498 (lang_printable_name_wls): Remove unused definition.
3499 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3500 to emit runtime assertion.
3501 (vfy_note_stack_type): Clean up non-C90 declarations.
3502 (vfy_note_local_type): Likewise.
3503 * verify.h (vfy_is_assignable_from): Declare.
3504 * verify-impl.c (is_assignable_from_slow): Remove unused function.
a1286ef5 3505 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
36739040
TT
3506 instead of is_assignable_from_slow().
3507 (types_compatible): Reinstate ref_compatible() call.
3508
35092004-11-04 Tom Tromey <tromey@redhat.com>
3510
3511 * class.c (build_static_field_ref): Reverted previous patch.
3512
3513 * class.c (build_static_field_ref): Don't emit direct references
3514 when using indirect dispatch.
3515
35162004-11-03 Tom Tromey <tromey@redhat.com>
3517
3518 * expr.c (expand_java_arrayload): Set lhs_type_node.
3519 (expand_java_arraystore): Set rhs_type_node.
3520
35212004-11-02 Tom Tromey <tromey@redhat.com>
3522
3523 * jcf-parse.c (compute_class_name): Use filename length from zip
3524 directory, not strlen.
3525
3526 * expr.c (expand_invoke): Mark new interface methods as abstract.
3527
35282004-11-01 Tom Tromey <tromey@redhat.com>
3529
3530 * verify-impl.c (push_jump): Removed check for uninitialized
3531 objects.
3532 (push_exception_jump): Likewise.
3533 (handle_ret_insn): Likewise.
3534 (handle_jsr_insn): Likewise.
3535 (state_check_no_uninitialized_objects): Removed.
3536
3537 * decl.c (check_local_unnamed_variable): Recognize
3538 promoted-to-int parameters when using the new verifier.
3539 * expr.c (expand_java_arraystore): Explicitly request array type
3540 when using new verifier.
3541 (expand_java_arrayload): Likewise.
3542 (invoke_build_dtable): Don't pass object_type_node as
3543 expression argument to build_java_indirect_ref.
3544 (build_java_check_indexed_type): Do nothing.
3545 (build_java_arraystore_check): Handle case where array doesn't
3546 have array type.
3547 (build_java_array_length_access): Likewise.
3548 (expand_invoke): Handle case where interface overrides a method
3549 from Object.
3550 (pop_type_0): Always succeed for reference types.
3551 (process_jvm_instruction): Don't pop a value in a dead
3552 exception handler.
3553 (pop_arguments): Convert arguments to correct types.
3554
35552004-10-29 Andrew Haley <aph@redhat.com>
3556
3557 * jcf-parse.c (give_name_to_class): Remove line that was
3558 incorrectly merged.
3559
35602004-10-29 Andrew Haley <aph@redhat.com>
3561
3562 * jcf-parse.c (set_source_filename): Add code to build new sfname.
3563
35642004-10-20 Andrew Haley <aph@redhat.com>
3565
3566 * decl.c (end_java_method): Don't expand if flag_syntax_only.
3567
35682004-10-26 Tom Tromey <tromey@redhat.com>
3569
3570 * verify.h (vfy_notify_verified): Removed.
3571 * verify-glue.c (vfy_notify_verified): Removed.
3572
35732004-10-26 Tom Tromey <tromey@redhat.com>
3574
3575 * verify-impl.c (debug_print_state): Declare `i' before code.
3576 (merge_types): Modify `t' when it is null_type.
3577
35782004-10-26 Tom Tromey <tromey@redhat.com>
3579
3580 * verify-impl.c (type_print): Renamed from print. Now static and
3581 takes an argument.
3582 (debug_print_state): Use type_print.
3583
35842004-10-25 Tom Tromey <tromey@redhat.com>
3585
3586 * expr.c (build_invokeinterface): Compute correct offset for
3587 index into interface methods.
3588
35892004-10-20 Tom Tromey <tromey@redhat.com>
3590
3591 * java-tree.h (verify_jvm_instructions_new): Declare.
3592
3593 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3594 command line.
3595
3596 * verify-impl.c (verify_instructions): Correctly handle wide
3597 types on the stack.
3598 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3599 (vfy_get_component_type): Strip pointer types.
3600 (vfy_find_class): Use get_type_from_signature. Strip pointer
3601 types.
3602 Include java-except.h.
3603
36042004-10-20 Bryce McKinlay <mckinlay@redhat.com>
3605
a1286ef5 3606 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
36739040
TT
3607 vfy_push_type_t, set_variable, add_new_state, merge_into,
3608 handle_jsr_insn, branch_prepass, check_class_constant,
a1286ef5 3609 check_wide_constant, get_one_type, compute_static_types,
36739040
TT
3610 verify_instructions_0): Clean up C99 declarations after statements.
3611
36122004-10-20 Tom Tromey <tromey@redhat.com>
3613
3614 * verify-impl.c (merge_refs): Compare reference against iterator,
3615 not ref2.
3616
3617 * verify-glue.c (vfy_tag): Mask off resolved flag.
3618
36192004-10-19 Tom Tromey <tromey@redhat.com>
3620
3621 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3622 (init_state_with_stack): Initialize `this_type' in state.
3623 (verify_method): Use debug_print.
3624 * verify-glue.c (vfy_is_primitive): Removed debugging print.
3625 (vfy_note_stack_depth): Reverted last patch.
3626 (vfy_note_stack_type): Note pointer to Object, not Object.
3627 (vfy_note_local_type): Likewise.
3628
3629 * verify.h (vfy_note_instruction_seen): Declare.
3630 * verify-glue.c (verify_jvm_instructions_new): Set
3631 BCODE_EXCEPTION_TARGET on target instruction.
3632 (vfy_note_instruction_seen): New function.
3633 * verify-impl.c (FLAG_INSN_SEEN): New define.
3634 (verify_instructions_0): Set flag on instruction. Save state for
3635 PC=0 later.
3636 (verify_instructions): Call vfy_note_instruction_seen.
3637
3638 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3639 (verify_jvm_instructions_new): Call method_init_exceptions,
3640 add_handler, and handle_nested_ranges.
3641 * verify-impl.c (verify_method): Return 1 on success.
3642 (verify_instructions_0): Save the state at PC=0.
3643
3644 * verify-impl.c (init_type_from_class): Set is_resolved and
3645 ref_next on new ref_intersection.
3646 (init_type_from_string): Likewise.
3647
36482004-10-15 Bryce McKinlay <mckinlay@redhat.com>
3649
3650 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3651 if flag_new_verifier is set.
3652 * java-tree.h (flag_new_verifier): Declare.
3653 * lang.opt (fnew-verifier): New option.
a1286ef5 3654 * verify-impl.c: Work around namespace pollution by undef'ing
36739040
TT
3655 'current_class'.
3656 (struct verifier_context): Make 'bytecode' const.
3657 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3658 (types_compatible): For the BC-ABI, always consider reference types
3659 compatible.
3660 (check_class_constant): Use vfr->current_class.
3661 (check_constant): Likewise.
3662 (check_wide_constant): Likewise.
3663 (check_field_constant): Check for 'L' at start of type name.
3664 (get_one_type): Return pointer instead of type. Set type result in
3665 caller via passed type pointer.
3666 (compute_argument_types): Update to use new get_one_type arguments.
3667 (compute_return_type): Likewise.
3668 (make_verifier_context): New. Allocate and initialize 'vfr'.
3669 (free_verifier_context): New. Free 'vfr' and its contents.
3670 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3671 and free_verifier_context.
3672
36732004-10-15 Tom Tromey <tromey@redhat.com>
3674
3675 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3676 * verify.h (vfy_fail): Fixed formatting.
3677
3678 * verify-impl.c (vfr): Fixed comment formatting.
3679 (collapse_type): New function.
3680 (verify_instructions): Notify compiler about type map.
3681 * verify.h (vfy_note_stack_depth): Updated.
3682 (vfy_note_stack_type): Likewise.
3683 (vfy_note_local_type): Likewise.
3684 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3685 Declare.
3686 * verify-glue.c (vfy_note_stack_depth): Correctly size type
3687 state. Added `method' argument.
3688 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
3689 argument.
3690 (vfy_note_local_type): New function.
3691 (vfy_unsuitable_type): Likewise.
3692 (vfy_return_address_type): Likewise.
3693 (vfy_null_type): Likewise.
3694
3695 * verify.h (VFY_IN_GCC): Removed.
3696 (VFY_WANT_TYPEMAP): Removed.
3697 * verify-impl.c (verify_instructions_0): Removed useless "\".
3698 (struct state) <next>: Uncomment.
3699
37002004-10-13 Bryce McKinlay <mckinlay@redhat.com>
3701
a1286ef5 3702 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
36739040
TT
3703 C-style.
3704
37052004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3706
3707 * Make-lang.in (verify.o): Re-enabled this target.
3708 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3709 (vfy_get_interface): Likewise.
3710 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3711 * verify.h (verify_jvm_instructions_new): Declare.
3712 * verify-impl.c (free_state): Temporarily comment out unused
3713 function.
3714
37152004-10-06 Tom Tromey <tromey@redhat.com>
3716
3717 * java-tree.h (JV_STATE_READ): New enum value.
3718
37192004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3720
3721 * verify.h: New file.
3722
37232004-10-05 Bryce McKinlay <mckinlay@redhat.com>
3724
3725 * verify-impl.c, verify-glue.c, verify.h: New files.
3726 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3727
37282004-09-24 Andrew Haley <aph@redhat.com>
3729
3730 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3731 for a slot if it's of pointer type.
3732
37332004-09-14 Tom Tromey <tromey@redhat.com>
3734
3735 * class.c (make_class_data): Correctly initialize "state" field.
3736 Initialize "engine" field.
3737 * decl.c (java_init_decl_processing): Add "engine" field.
3738
37392004-09-10 Andrew Haley <aph@redhat.com>
3740
3741 PR java/12760
3742 * expr.c (build_invokeinterface): Use fast method for interface
3743 dispatch.
3744 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3745 JTI_ITABLE_PTR_TYPE.
3746 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
3747 (emit_symbol_table): Add new arg, element_size.
3748 * decl.c (java_init_decl_processing): Initialize Class.itable.
3749 * class.c (GEN_TABLE): New macro.
3750 (gen_indirect_dispatch_tables): Use it. Add itable.
3751 (make_class_data): Add new arg for emit_symbol_table().
3752 Emit itable.
3753 (add_miranda_methods): Make sure search_class has been parsed.
3754 (emit_symbol_table): Add new arg, element_size.
3755
37562004-09-06 Andrew Haley <aph@redhat.com>
3757
3758 * verify.c (merge_types): Return Object for all merges of
3759 interfaces.
3760 * expr.c (add_type_assertion): Don't generate assertions when
3761 source type is array of Object.
a1286ef5 3762
36739040
TT
37632004-09-03 Andrew Haley <aph@redhat.com>
3764
3765 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3766
3767 * lang.c (java_post_options): Force flag_verify_invocations if
3768 we're not using indirect dispatch.
3769
3770 * expr.c (pop_type_0): Move test for interfaces before call to
3771 can_widen_reference_to().
3772 (build_signature_for_libgcj): Remove generation of canonical array
3773 type.
3774 (add_type_assertion): Canonicalize both arrays.
3775 Don't assert that type X can be assigned to Object.
3776 Don't assert that type X an be assigned to type X.
3777 Don't assert that Object can be assigned to type X.
3778 (can_widen_reference_to): Warn whenever we generate an assertion.
3779 (process_jvm_instruction): Use throwable_type_node for the type of
3780 an exception class.
3781
37822004-09-01 Andrew Haley <aph@redhat.com>
3783
3784 * decl.c (java_init_decl_processing): Change
3785 verify_identifier_node to "__verify".
3786 * expr.c (add_type_assertion): Use verify_identifier_node for name.
3787 * java-tree.h (verify_identifier_node): Change to "__verify".
3788
3789 * expr.c (build_signature_for_libgcj): New function.
3790 (add_type_assertion): Use it to construct signatures for
3791 source_type and target_type.
3792
37932004-08-27 Andrew Haley <aph@redhat.com>
3794
3795 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3796 (verify_identifier_node): New.
3797 (TYPE_VERIFY_METHOD): New.
3798 (struct type_assertion): New type.
3799 * expr.c (type_assertion_eq): New function.
3800 (type_assertion_hash): New function.
3801 (add_type_assertion): New function.
3802 (can_widen_reference_to): Call add_type_assertion().
3803 * decl.c (java_init_decl_processing): Add verify_identifier_node.
3804 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3805 (finish_class): Output TYPE_VERIFY_METHOD (type).
3806
3807 * decl.c (end_java_method): Nullify unused fields.
3808
38092004-08-17 Andrew Haley <aph@redhat.com>
3810
3811 * verify.c (defer_merging): Quieten.
3812 * jcf-parse.c (load_class): Only try to open a class file if it's
3813 java.lang.Object or if it's part of the current compilation.
3814 Check that the class we just tried to load is the class we just
3815 loaded. Quieten.
3816 (java_parse_file): Set flag_verify_invocations off if we're
3817 compiling from .class.
3818 (parse_zip_file_entries): Abort if we try to read a dummy class.
3819 * expr.c (can_widen_reference_to): Quieten.
3820 (build_invokevirtual): Abort if we try to invokevirtual an
3821 interface.
3822 (expand_invoke): Don't build a non-interface call to an interface.
3823 (build_instanceof): Don't do premature optimization if
3824 flag_verify_invocations is not set.
3825 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3826 from superclass.
3827 (build_static_field_ref): Add correct type conversion for
3828 field_address.
3829 (add_miranda_methods): Disable generation of Miranda methods for
3830 dummy classes.
3831 (layout_class_method): Don't complain about non-static method
3832 overrides static method with dummy classes.
3833
38342004-08-13 Tom Tromey <tromey@redhat.com>
3835
3836 * class.c (build_static_field_ref): Re-enable atable lookups for
3837 static fields.
3838
3839 * parse.y (strip_out_static_field_access_decl): Indentation fix.
3840
38412004-08-11 Tom Tromey <tromey@redhat.com>
3842
3843 * gcj.texi (libgcj Runtime Properties): Document new properties.
3844
38452004-08-06 Andrew Haley <aph@redhat.com>
3846
3847 * jcf-parse.c (load_class): Check that we really have loaded the
3848 class we're looking for.
3849
38502004-07-19 Andrew Haley <aph@redhat.com>
3851
3852 * verify.c (verify_jvm_instructions): Comment change only.
3853
3854 * typeck.c (build_java_array_type): Add size field to array name.
3855
3856 * java-tree.h (LOCAL_SLOT_P): New.
3857 (update_aliases): Add PC argument.
3858 (pushdecl_function_level): New function.
3859
3860 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3861 MODIFY_EXPR, and SAVE_EXPR.
3862 (java_gimplify_modify_expr): New function.
3863
3864 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3865 (expand_iinc): Pass PC to update_aliases().
3866 (STORE_INTERNAL): Likewise.
3867 (process_jvm_instruction): Likewise.
3868
3869 * decl.c (base_decl_map): New variable.
3870 (uniq): New variable.
3871 (update_aliases): Rewrite with more thorough checking.
3872 (debug_variable_p): New function.
3873 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
3874 (check_local_named_variable): Delete whole function.
3875 (initialize_local_variable): New function.
3876 (check_local_unnamed_variable): Add checks and comments.
3877 (find_local_variable): Rewrite.
3878 (java_replace_reference): New function.
3879 (function_binding_level): New variable.
3880 (pushdecl_function_level): New function.
3881 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3882 (maybe_pushlevels): Call pushdecl() on each of the new decls.
3883 (start_java_method): Reset uniq. Create base_decl_map. Set
3884 function_binding_level.
3885 (end_java_method): Null unused fields to save memory.
3886
38872004-06-29 Andrew Haley <aph@redhat.com>
3888
3889 * except.c (expand_start_java_handler): Push a new binding level.
3890 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
3891 register_exception_range() to register where we'll do it.
3892 (expand_end_java_handler): Remove old bogus code. Replace with
3893 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3894 the top of the expression we're curently building.
3895 (maybe_end_try): Delete.
3896 * decl.c (binding_level.exception_range): New field.
3897 (clear_binding_level): Add field exception_range. Reformat.
3898 (poplevel): Call expand_end_java_handler().
3899 (poplevel): Call java_add_stmt only if functionbody is false.
3900 (maybe_poplevels): Don't call maybe_end_try() from here.
3901 (end_java_method): Clear no longer used trees in function decl.
3902 (register_exception_range): New function.
3903 * java-tree.h (register_exception_range, struct eh_range): Declare.
3904
39052004-06-22 Andrew Haley <aph@redhat.com>
3906
3907 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3908 the otable.
3909 * check-init.c (get_variable_decl): Teach check-init about
3910 FIELD_DECLs addressed via the otable.
3911 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3912 CLASS_PARSED_P.
3913
39142004-05-28 Andrew Haley <aph@redhat.com>
3915
3916 * jcf-parse.c (load_class): Don't try to read a class that we've
3917 already read.
3918
3919 * expr.c (build_invokeinterface): Use the old-fashioned way of
3920 doing indirect dispatch: look up interfaces by name.
3921 * java-tree.h (enum java_tree_index): Add
3922 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3923 * decl.c (java_init_decl_processing): Add
3924 soft_lookupinterfacemethodbyname_node.
3925
3926 * gjavah.c (print_method_info): Final methods have vtable entries,
a1286ef5 3927 so gjavah needs to output them.
36739040
TT
3928 * class.c (layout_class_method): Generate vtable entries for final
3929 methods.
3930 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3931 dispatch, even if a method is final.
3932
39332004-05-25 Andrew Haley <aph@redhat.com>
3934
3935 * class.c (build_symbol_entry): Convert the names of constructors
3936 to init_identifier_node when generating an entry for the indirect
3937 dispatch table.
a1286ef5 3938
36739040
TT
3939 * expr.c (build_known_method_ref): Generate indirect calls for
3940 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3941
39422004-05-24 Andrew Haley <aph@redhat.com>
3943
a1286ef5
ZW
3944 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3945 atable element is of the right type.
36739040 3946
a1286ef5
ZW
3947 * class.c (build_static_field_ref): Cast pointer to correct type
3948 for field.
36739040
TT
3949
39502004-04-20 Bryce McKinlay <mckinlay@redhat.com>
3951
3952 * Merged with HEAD as of 20040514. Diff against
3953 gcj-abi-2-merge-20040514.
3954
39552004-04-16 Andrew Haley <aph@redhat.com>
3956
3957 * verify.c (check_pending_block): Disable subroutine checks.
3958 (defer_merging): New function.
3959 (merge_types): If types are dummy, use defer_merging to combine them.
3960 (verify_jvm_instructions): If invocation is invokeinterface and
3961 target is dummy, assume target really is an interface.
3962
3963 * parse.y (patch_invoke): Break out call to java_create_object.
3964
3965 * lang.c (flag_verify_invocations): New.
3966
3967 * jcf-parse.c (load_class): If we've already failed to load a
3968 class, don't try again.
3969 (load_class): If we can't find a .class file, don't fail, but emit
3970 a warning.
3971 (parse_class_file): Don't act on dummy methods.
3972
3973 * java-tree.h (flag_verify_invocations): New.
3974 (TYPE_DUMMY): New.
3975 (lang_type.dummy_class): New field.
3976 (java_create_object): New function.
3977 (METHOD_DUMMY): New.
3978
3979 * expr.c (build_field_ref): Widen field offset.
3980 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3981 that each of its elements is compatible with the one we're
3982 popping.
3983 (pop_type_0): Issue a warning to say that we need to generate a
3984 runtime check.
3985 (java_create_object): New function.
3986 (build_field_ref): Only generate hard refs if we're not using
3987 indirect dispatch.
3988 (expand_java_field_op): If we're using !verify_invocations and we
3989 see a missing field, generate a decl for it.
3990
3991 (expand_invoke): If a class doesn't have the method we seek and
3992 we're using !flag_verify_invocations, generate a decl for the
3993 method now.
3994
3995 (build_known_method_ref): Always use indirect dispatch via the
3996 atable for static methods.
3997
a1286ef5 3998 (expand_java_NEW): Break out object creation into new function,
36739040
TT
3999 java_create_object.
4000
4001 (can_widen_reference_to): Issue a warning to say that we need to
4002 generate a runtime check.
4003
4004 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4005 (make_method_value): Also use index for interfaces.
4006 (make_class_data): Skip dummy field for inherited data.
4007 Don't build method array for dummy methods.
4008 Set size_in_byte to -1 when using inirect dispatch
4009 Don't build a hard class ref if we don't have a hard ref to our
4010 superclass, or if we're using inirect dispatch.
4011 Null out dispatch tables.
4012
4013 (layout_class_method): Don't complain about non-static method
4014 overrides static method is method is artificial.
4015
4016 (build_static_field_ref): Disable atable references to static
4017 fields for the time being.
4018
4019 (layout_class_methods): Check for CLASS_INTERFACE as
4020 well as CLASS_ABSTRACT.
4021
39afeb1a
SB
40222004-11-24 Steven Bosscher <stevenb@suse.de>
4023
4024 * class.c (make_class_data): Don't check flag_inline_functions.
4025 * lang.c (flag_really_inline): Remove unused flag.
4026 (java_handle_option): Don't set it here. Remove special handling
4027 of flag_inline_functions for Java.
4028 (java_init): Don't set flag_inline_trees here. Already done...
4029 (java_post_options): ...here. Don't clear flag_inline_functions.
4030
16df8078
SB
40312004-11-24 Steven Bosscher <stevenb@suse.de>
4032
4033 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4034 (java_gimplify_exit_block_expr): New function.
4035 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4036 LABELED_BLOCK_EXPR.
4037 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4038 (EXIT_BLOCK_EXPR): Likewise.
4039 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4040 (LABELED_BLOCK_BODY): Likewise.
4041 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4042 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4043 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
4044 TREE_OPERAND.
4045 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4046 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4047 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
4048 second operand of EXIT_BLOCK_EXPR.
4049 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4050 TREE_OPERAND.
4051 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4052
37cd02de
BE
40532004-11-23 Ben Elliston <bje@au.ibm.com>
4054
4055 * xref.h (xref_flag_value): Remove.
4056 (xref_set_data, xref_get_data): Likewise.
4057 (xref_set_current_fp): Likewise.
4058 (XREF_NONE): Likewise.
4059 (XREF_GET_DATA): Likewise.
4060 * xref.c (xref_flag_value): Remove.
4061 (xref_set_data, xref_get_data): Likewise.
4062 (xref_set_current_fp): Likewise.
4063
82698cde
BE
40642004-11-23 Ben Elliston <bje@au.ibm.com>
4065
4066 * gjavah.c (output_directory): Make static.
4067 (temp_directory): Likewise.
a1286ef5 4068
35d7f8f4
TT
40692004-11-15 Tom Tromey <tromey@redhat.com>
4070
4071 * decl.c (instn_ptr_type_node): Removed.
4072 (lineNumbers_ptr_type_node): Removed.
4073 (jint_type): Removed.
4074 (jint_ptr_type): Removed.
4075
6571838f
AP
40762004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
4077
4078 PR java/15576
4079 * check-init.c (check_init): Ignore DECL_EXPR.
4080 * expr.c (always_initialize_class_p): Reenable.
4081 (build_class_init): Use a variable to store the decl. Also use
4082 boolean_false_node instead of integer_zero_node.
4083 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4084 to the block.
4085
5e74a4eb
TT
40862004-11-08 Tom Tromey <tromey@redhat.com>
4087
4088 PR java/16843:
4089 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4090 generating a JNI header.
4091 (print_field_info): Handle JNI headers.
4092 (jni_print_float): Likewise.
4093 (jni_print_double): Likewise.
4094
517f199e
AP
40952004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
4096
4097 * decl.c (end_java_method): Remove duplicated code.
4098
d08bf5fa 40992004-11-06 Zack Weinberg <zack@codesourcery.com>
a1286ef5 4100 Gerald Pfeifer <gerald@pfeifer.com>
d08bf5fa
ZW
4101
4102 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4103 as well.
4104
65e9700c
BM
41052004-11-02 Bryce McKinlay <mckinlay@redhat.com>
4106
4107 PR java/17265
a1286ef5 4108 * class.c: Reinstate 2004-08-18 patch.
65e9700c
BM
4109 (make_local_function_alias): Don't create an alias for extern (native)
4110 functions.
4111
e063dbf8
EB
41122004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
4113
4114 PR java/17265
4115 * class.c (make_local_function_alias): Revert 2004-08-18 change.
4116 (make_method_value): Likewise.
4117
d600a3a4
AH
41182004-10-21 Andrew Haley <aph@redhat.com>
4119
4120 PR java/18091:
4121 * jcf-parse.c (set_source_filename): Add code to build new sfname.
4122
41232004-10-20 Andrew Haley <aph@redhat.com>
4124
4125 * decl.c (end_java_method): Don't expand if flag_syntax_only.
4126 Remove duplicated code block.
4127
7e698b2c
SB
41282004-10-18 Steven Bosscher <stevenb@suse.de>
4129
4130 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4131 New rules to work around old Bison warnings.
4132
7cefa0c1
SB
41332004-10-17 Steven Bosscher <stevenb@suse.de>
4134
4135 * class.c (ident_subst): Always alloca buffer.
4136 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4137 opcode after including javaop.def.
4138 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4139 conditional expression that exits, to avoid warnings.
4140 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4141 a user of an extension.
4142 * win32-host.c: Move check down to have non-empty file when
4143 WIN32 is not defined.
4144
4145 * Make-lang.in (java-warn): Add STRICT_WARN.
4146 (java/jcf-io.o-warn): Don't have Werror for this file.
4147 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4148
e86d9e4b
HPN
41492004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
4150
4151 * expr.c (expr_add_location): Move declaration to before all
4152 statements.
4153 * parse.y (java_expand_classes): Ditto.
4154 * lex.c (java_peek_unicode): Ditto.
4155
a1402da3
RM
41562004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4157
4158 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4159 if possible, else convert `foo' to 'foo'.
4160 * class.c: Likewise.
4161 * decl.c: Likewise.
4162 * expr.c: Likewise.
4163 * jcf-io.c: Likewise.
4164 * jcf-parse.c: Likewise.
4165 * lang.c: Likewise.
4166 * lex.c: Likewise.
4167 * parse.h: Likewise.
4168
41692004-10-16 Ranjit Mathew <rmathew@hotmail.com>
4170
4171 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4172 rename parameter 'msg' to 'msgid' in function declaration.
4173 (issue_warning_error_from_context): Likewise.
4174 (yyerror): Rename parameter 'msg' to 'msgid'.
4175 (all over): Use new quoting style for diagnostics.
4176
10a35159
KH
41772004-10-15 Kazu Hirata <kazu@cs.umass.edu>
4178
4179 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4180 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4181 Update copyright.
4182
0c58f841
MA
41832004-10-14 Matt Austern <austern@apple.com>
4184
4185 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4186 pointer_set_t* now.
a1286ef5 4187
38467a0d
TT
41882004-10-13 Tom Tromey <tromey@redhat.com>
4189
4190 PR java/15578:
4191 * lang.opt (--extdirs): Document.
4192 * jvspec.c (lang_specific_driver): Recognize -encoding and
4193 -extdirs.
4194
5a6aa19c
UW
41952004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
4196
4197 * parse.y (issue_warning_error_from_context): Use va_list *
4198 instead of va_list parameter.
4199 (parse_error_context): Update call.
4200 (parse_warning_context): Likewise.
4201
d5706a1e
ZW
42022004-10-05 Zack Weinberg <zack@codesourcery.com>
4203
4204 * parse.y, parse-scan.y: Add list of diagnostic messages to
4205 insulate translation template from version of yacc/bison used
4206 to compile the grammar.
4207
5544148e
RM
42082004-10-05 Ranjit Mathew <rmathew@hotmail.com>
4209
4210 Prepare for %q, %< and %> in diagnostic message strings.
4211 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4212 Name second parameter 'msgid'.
4213 * parse.y: Additionally include pretty-print.h and diagnostic.h.
4214 (issue_warning_error_from_context): Use pretty-printer functions
4215 instead of vsprintf for constructing formatted messages. Rename
4216 parameter 'msg' to 'msgid'.
4217 (parse_error_context): Rename parameter 'msg' to 'msgid'.
4218 (parse_warning_context): Likewise.
4219
5789147f
AH
42202004-10-05 Andrew Haley <aph@redhat.com>
4221
4222 PR java/17779
4223 * jcf-parse.c (parse_zip_file_entries): If a class has a
4224 superclass and a TYPE_SIZE of zero, lay it out.
4225
42262004-09-30 Andrew Haley <aph@redhat.com>
4227
4228 PR java/17733
4229 * jcf-parse.c (compute_class_name): Rewrite.
4230
0f0377f6
JH
42312004-10-01 Jan Hubicka <jh@suse.cz>
4232
4233 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4234
5f90fc47
KH
42352004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4236
4237 * lex.c: Fix a comment typo.
4238
0690a9f4
KH
42392004-10-01 Kazu Hirata <kazu@cs.umass.edu>
4240
4241 * java-tree.h: Fix a comment typo.
4242
9ec819d4
PB
42432004-09-30 Per Bothner <per@bothner.com>
4244
4245 Simplify lexer. Implement --enable-mapped-location support.
4246 * jcf-parse.c (parse_class_file): Use linemap_line_start.
4247 (parse_source_file_1): Pass filename as extra parameter, so we can call
4248 linemap_add and set input_location here, rather than in both callers.
4249 (read_class): Pass copied filename to parse_source_file_1.
4250 Don't initialize wfl_operator - only needed for source compilation.
4251 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
4252 * lex.h: Remove a bunch of debugging macros.
4253 * lex.h (struct_java_line, struct java_error): Remove types.
4254 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
4255 (struct java_lc_s): Remove prev_col field.
4256 (struct java_lexer): New fields next_unicode, next_columns, and
4257 avail_unicode. New position field, and maybe token_start field.
4258 Don't need hit_eof field - use next_unicode == -1 instead.
4259 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
4260 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
4261 * parse.h: Various changes for USE_MAPPED_LOCATION.
4262 (EXPR_WFL_EMIT_LINE_NOTE): XXX
4263 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4264 (struct parser_ctxt): New file_start_location field.
4265 Remove p_line, c_line fields since we no longer save lines.
4266 Remove elc, lineno, and current_jcf fields - no longer used.
4267 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
4268 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4269 source_location and is probably not needed anymore anyway.
4270 Use new expr_add_Location function.
4271 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
4272 (java_pop_parser_context): Minor cleanup.
4273 (java_parser_context_save_global, java_parser_context_restore_global,
4274 java_pop_parser_context): Save/restore input_location as a unit.
4275 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
4276 a source_location instead of a wfl context node.
4277 (check_class_interface_creation): input_filename is not addressable.
4278 (create_artificial_method): Calling java_parser_context_save_global
4279 and java_parser_context_restore_global is overkill. Instead,
4280 temporarily set input_location from class decl.
4281 (java_layout_seen_class_methods): Set input_location from method decl.
4282 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4283 (finish_loop_body): Likewise.
4284 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
4285 (java_sprint_unicode): Take a character, not index in line.
4286 (java_sneak_uncode): Replaced by java_peek_unicode.
4287 (java_unget_unicode): No longer used.
4288 (java_allocate_new_line. java_store_unicode): Removed, since we
4289 no longer remember "lines".
4290 (java_new_lexer): Update for new data structures.
4291 (java_read_char): Move unget_value checking to java_read_unicode.
4292 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4293 efficient functions that are used directly when lexing.
4294 (java_read_unicode_collapsing_terminators): No longer needed.
4295 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4296 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4297 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
4298 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
4299 combine switch branches, and test for common token kinds earlier.
4300 (java_lex_error): Rewrite.
4301 * jv-scan.c (expand_location): New function, copied from tree.c.
4302 (main): Set ctxp->filename instead of setting input_filename directly.
4303
6744f400
PB
43042004-09-30 Per Bothner <per@bothner.com>
4305
4306 More cleanup for --enable-mapped-location.
4307 * class.c (push_class): If USE_MAPPED_LOCATION don't set
4308 input_location here. Instead do it in give_name_to_class.
4309 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4310 * expr.c (expand_byte_code): Call linemap_line_start.
4311 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
4312 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
4313 (expr_add_location): New function, if USE_MAPPED_LOCATION.
4314 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
4315 to USE_MAPPED_LOCATION case.
4316
cb3a1430
PB
4317 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
4318 * jcf-parse.c (java_parse_file): Don't set input_filename.
4319 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4320 Create a list of TRANSLATION_UNIT_DECL.
4321 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
4322 reason is so we can set a DECL_SOURCE_LOCATION for each file.
4323 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4324 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4325 (file_start_location): New static.
4326 (set_source_filename): Avoid extra access to input_filename macro.
4327 Concatenate new name with class's package prefix.
4328 (set_source_filename, give_name_to_class): Update.
4329 (give_name_to_class): Set class's "line 0" input_location here.
4330 (parse_class_file): Set input_location as a unit.
4331
4332 * jcf-parse.c (load_class): Sanity test if missing inner class file.
4333
d68acc04
PB
43342004-09-29 Per Bothner <per@bothner.com>
4335
9ec819d4 4336 * java-tree.h: Redefine some macros and add some declaration
d68acc04
PB
4337 to handle the USE_MAPPED_LOCATION case.
4338 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
4339 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
4340 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4341 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4342
de399303
PB
4343 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4344 * decl.c (finish_method, java_add_stmt): Likewise.
4345 * java-gimplify.c (java-gimplify.c): Likewise.
4346 * jcf-write.c (generate_bytecode_insns): Likewise.
4347 * lang.c (java_post_options): Likewise - call linemap_add.
4348
eab3f38f
AH
43492004-09-29 Andrew Haley <aph@redhat.com>
4350
4351 PR java/17007
4352 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4353 result of TRUNC_MOD_EXPR.
4354 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4355 * decl.c (java_init_decl_processing): Mark
4356 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4357
346c5b01
TT
43582004-09-28 Tom Tromey <tromey@redhat.com>
4359
4360 PR java/15710:
4361 * class.c (add_miranda_methods): Load superinterface if not
4362 already loaded.
4363
1679340f
AH
43642004-09-28 Andrew Haley <aph@redhat.com>
4365
4366 PR java/17586
4367 * jcf-parse.c (load_class): Don't try to read a class that we've
4368 already read.
4369
46d82a27
AH
43702004-09-28 Andrew Haley <aph@redhat.com>
4371
4372 * jcf-parse.c (load_class): Back out previous broken patch.
4373
03ec093d
AH
43742004-09-28 Andrew Haley <aph@redhat.com>
4375
4376 PR java/17586
4377 * jcf-parse.c (load_class): Don't try to read a class that we've
4378 already read.
4379 Check that we really did read the right class.
4380
c1f042f8
TT
43812004-09-25 Tom Tromey <tromey@redhat.com>
4382
4383 PR java/17500:
4384 * parse.y (create_artificial_method): Use add_method_1.
4385
4dd4c751
KH
43862004-09-25 Kazu Hirata <kazu@cs.umass.edu>
4387
4388 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4389 comment typos.
4390 * gcj.texi: Fix typos.
4391
8d481c2e
TT
43922004-09-24 Tom Tromey <tromey@redhat.com>
4393
4394 PR java/15656:
4395 * parse.y (class_instance_creation_expression): Set `$$' to NULL
4396 in error parts of rule.
4397 (unary_expression): Don't call error_if_numeric_overflow when $1
4398 is NULL.
4399
90424847
TT
44002004-09-24 Tom Tromey <tromey@redhat.com>
4401
4402 PR java/16789:
4403 * parse.y (resolve_qualified_expression_name): Set
4404 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4405 * expr.c (force_evaluation_order): Check for empty argument list
4406 after stripping COMPOUND_EXPR.
4407
c5466b25
AH
44082004-09-23 Andrew Haley <aph@redhat.com>
4409
4410 PR java/16927:
4411 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4412 COND_EXPRs.
4413
fd5f23d3
TT
44142004-09-23 Tom Tromey <tromey@redhat.com>
4415
4416 PR java/17329:
4417 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4418 where operand is null.
4419
2fc8ee77
TT
44202004-09-23 Tom Tromey <tromey@redhat.com>
4421
4422 PR java/17380:
4423 * parse.y (not_accessible_p): Allow access to protected members
4424 even when class is not static.
4425
3b620440
KC
44262004-09-22 Kelley Cook <kcook@gcc.gnu.org>
4427
4428 * Make-lang.in: Revert the gcc-none.o change.
4429
0e64e323
NS
44302004-09-22 Nathan Sidwell <nathan@codesourcery.com>
4431
4432 * parse.y (patch_anonymous_class): VEC_space returns true if there
4433 is space.
4434
e72222ac
MA
44352004-09-21 Matt Austern <austern@apple.com>
4436
4437 Fix bootstrap.
4438 * gjavah.c (free_method_name_list): Fix function definition so
4439 it's a proper C prototype.
d5706a1e 4440
b8b639c9
TT
44412004-09-21 Tom Tromey <tromey@redhat.com>
4442
4443 PR java/17575:
4444 * gjavah.c (free_method_name_list): New method.
4445 (main): Call it.
4446
6615c446
JO
44472004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
4448 Zack Weinberg <zack@codesourcery.com>
4449
4450 * java-tree.def: Use tree_code_class enumeration constants
4451 instead of code letters.
4452 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4453 new tree-class enumeration constants.
4454
4a2dd6fe
TT
44552004-09-13 Tom Tromey <tromey@redhat.com>
4456
4457 PR java/17216:
4458 * class.c (layout_class_method): Put synthetic methods into the
4459 vtable.
4460
68a97276
AP
44612004-09-11 Andrew Pinski <apinski@apple.com>
4462
4463 * Make-lang.in (java/ggc-none.c): Change dependency
4464 for ggc.h into $(GGC_H).
4465
af8f35b8
ME
44662004-09-11 Mohan Embar <gnustuff@thisiscool.com>
4467
4468 * Make-lang.in (java/win32-host.o): Add dependency on
4469 coretypes.h.
4470 * win32-host.c: Add includes for coretypes.h, jcf.h
4471
55545aed
ME
44722004-09-11 Mohan Embar <gnustuff@thisiscool.com>
4473
4474 * Make-lang.in (GCJH_OBJS): Change dependency from
4475 ggc-none.o to java/ggc-none.o
4476 (JCFDUMP_OBJS): Likewise.
4477 (java/ggc-none.o): New target.
4478
7d60be94
NS
44792004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4480
4481 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
4482 * class.c (build_utf8_ref, build_static_field_ref,
4483 make_field_value, make_method_value, get_dispatch_table,
4484 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4485 * constants.c (get_tag_node, build_ref_from_constant_pool,
4486 build_constants_constructor): Likewise.
4487 * decl.c (java_init_decl_processing): Likewise.
4488 * expr.c (build_java_array_length_access, build_newarray,
4489 expand_java_multianewarray, expand_java_pushc, expand_iinc,
4490 build_java_binop, build_field_ref, expand_java_add_case,
4491 expand_java_call, build_known_method_ref, build_invokevirtual,
4492 build_invokeinterface, build_jni_stub): Likewise.
4493 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4494 * jcf-parse.c (get_constant): Likewise.
4495 * lex.c (do_java_lex): Likewise.
4496 * parse.y (patch_binop, patch_unaryop, patch_cast,
4497 build_newarray_node, patch_newarray): Likewise.
4498 * resource.c (compile_resource_data): Likewise.
4499 * typeck.c (build_prim_array_type): Likewise.
4500
8c1d6d62
NS
45012004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4502
7d60be94 4503 * decl.c (java_init_decl_processing): Adjust
8c1d6d62
NS
4504 initialize_sizetypes call.
4505
b3d1f5b4
NS
45062004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4507
4508 * jv-scan.c (fancy_abort): Add.
4509
07c6ee1b
NS
45102004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4511
4512 * expr.c (build_java_arrayaccess): Use convert to change
4513 len's type.
4514
97d68565
BM
45152004-08-19 Bryce McKinlay <mckinlay@redhat.com>
4516
4517 * class.c (make_local_function_alias): Allocate extra space for 'L'
4518 in name buffer. Reported by Thomas Neumann.
4519
89b0433e
NS
45202004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4521
4522 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4523 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
4524 * lex.c (do_java_lex): Adjust.
4525 (error_if_numeric_overflow): Likewise.
4526
ecc75a19
AP
45272004-08-18 Andrew Pinski <apinski@apple.com>
4528
89b0433e
NS
4529 * class.c (make_local_function_alias): Only make a new decl if we
4530 support alias attribute on all decls.
ecc75a19 4531
260ba9ce
BM
45322004-08-18 Bryce McKinlay <mckinlay@redhat.com>
4533
4534 * class.c (make_local_function_alias): New function. Create local
4535 alias for public method DECL.
4536 (make_method_value): Use make_local_function_alias.
4537 * parse.y (craft_constructor): Don't special-case anonymous classes.
4538 Always set ctor_name to init_identifier_node.
4539 (lookup_method_invoke): Call layout_class_method when creating
4540 anonymous class constructor.
4541
17ad5b5e
RH
45422004-08-18 Richard Henderson <rth@redhat.com>
4543
4544 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4545 default case. Treat '<' similarly. Update for
4546 is_gimple_formal_tmp_var name change.
4547
1b9deeb4
AH
45482004-08-17 Andrew Haley <aph@redhat.com>
4549
4550 * lang.c (lang_printable_name): Obey verbose flag.
4551 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4552 lang_printable_name().
4553 (verify_constructor_circularity, get_printable_method_name,
4554 check_abstract_method_definitions, java_check_regular_methods,
4555 java_check_abstract_methods, check_inner_class_access,
4556 fix_constructors, patch_method_invocation, patch_return):
4557 Likewise.
4558 * expr.c (pop_type_0): Likewise.
4559
4560 * java-tree.h (lang_printable_name_wls): Delete.
4561
16d85b63
TT
45622004-08-16 Tom Tromey <tromey@redhat.com>
4563
4564 PR java/8473:
4565 * parse.y (primary): Changed for initialized and uninitialized
4566 array creations.
4567 (array_access): Handle array_creation_initialized.
4568 (array_creation_expression): Split into
4569 array_creation_initialized and array_creation_uninitialized.
4570
a20f4d83
AH
45712004-08-16 Andrew Haley <aph@redhat.com>
4572
4573 * jcf-write.c (find_constant_index): Canonicalize NaNs when
4574 generating bytecode.
4575
f699e454
EL
45762004-08-16 Elliot Lee <sopwith@redhat.com>
4577
4578 PR java/9677
4579 * jcf-parse.c (java_parse_file): Handle filenames with embedded
4580 spaces, and quoted filelists.
4581
4a90aeeb
NS
45822004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4583
4584 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4585 * class.c (build_utf8_ref, build_static_field_ref,
4586 make_field_value, make_method_value, get_dispatch_table,
4587 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
6615c446 4588 * constants.c (get_tag_node, build_ref_from_constant_pool,
4a90aeeb
NS
4589 build_constants_constructor): Likewise.
4590 * decl.c (java_init_decl_processing): Likewise.
4591 * expr.c (build_java_array_length_access, build_newarray,
4592 expand_java_multianewarray, expand_java_pushc, expand_iinc,
4593 build_java_binop, build_field_ref, expand_java_add_case,
4594 expand_java_call, build_known_method_ref, build_invokevirtual,
4595 build_invokeinterface, build_jni_stub): Likewise.
4596 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4597 * jcf-parse.c (get_constant): Likewise.
4598 * lex.c (do_java_lex): Likewise.
4599 * parse.y (patch_binop, patch_unaryop, patch_cast,
4600 build_null_of_type, patch_newarray): Likewise.
4601 * resource.c (compile_resource_data): Likewise.
4602 * typeck.c (build_prim_array_type): Likewise.
4603
f97b53df
BM
46042004-08-10 Bryce McKinlay <mckinlay@redhat.com>
4605
4606 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4607 Don't create BLOCK here or call java_gimplify_block.
4608
bbefea96
L
46092004-08-09 H.J. Lu <hongjiu.lu@intel.com>
4610
4611 * java-tree.h (flag_deprecated): Removed.
4612 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4613 * parse.y (check_deprecation): Check warn_deprecated instead of
4614 flag_deprecated.
4615
9ddfe26e
KC
46162004-08-06 Kelley Cook <kcook@gcc.gnu.org>
4617
4618 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4619 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4620 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4621 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4622 flag_force_classes_archive_check, flag_optimize_sci,
4623 flag_indirect_dispatch): Remove explicit declarations.
4624 * lang.opt: Add implicit declare/define/assign. Remove obsolete
4625 final comment.
4626
c34f5b33
MC
46272004-08-05 Michael Chastain <mec.gnu@mindspring.com>
4628
4629 PR bootstrap/14893
4630 * Make-lang.in (java.install-man): Install from either build
4631 tree or source tree, whichever has the file first.
4632
ca7a3bd7
NS
46332004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4634
4635 * jcf-parse.c (get_constant): Adjust force_fit_type call.
4636 * lex.h (SET_LVAL_NODE_TYPE): Remove.
4637 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4638 (do_java_lex): Likewise. Adjust force_fit_type call.
4639
545eacdb
RS
46402004-08-04 Roger Sayle <roger@eyesopen.com>
4641 Andrew Haley <aph@redhat.com>
4642
4643 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4644 checking trees as they're being built.
4645 (convert): Call convert_ieee_real_to_integer if we're
4646 converting a constant, even if we're writing a class file.
4647
899deeca
BM
46482004-08-02 Bryce McKinlay <mckinlay@redhat.com>
4649
4650 PR java/16701
4651 * parse.y (fold_constant_for_init): Call resolve_field_access with
4652 correct current_class context.
4653
dc6d7095
RS
46542004-08-01 Roger Sayle <roger@eyesopen.com>
4655
4656 * decl.c (update_aliases, initialize_local_variable): Replace calls
4657 to build with calls to buildN.
4658 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4659 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4660 * parse.h (BUILD_THROW): Likewise.
4661 * parse.y (switch_expression, synchronized_statement,
4662 catch_clause_parameter, array_creation_expression,
4663 conditional_expression, make_qualified_name,
4664 resolve_qualified_expression_name, patch_method_invocation,
4665 patch_invoke, build_method_invocation, build_new_invocation,
4666 build_assignment, patch_assignment, build_binop, patch_binop,
4667 build_string_concatenation, build_incdec, patch_unaryop,
4668 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4669 patch_return, build_if_else_statement, build_labeled_block,
4670 build_new_loop, build_loop_body, build_bc_statement,
4671 build_assertion, encapsulate_with_try_catch, build_try_statement,
4672 build_try_finally_statement, patch_synchronized_statement,
4673 emit_test_initialization): Likewise, replace build with buildN.
4674
9f63daea
EC
46752004-07-28 Eric Christopher <echristo@redhat.com>
4676
4677 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4678 (java_unsafe_for_reeval): Ditto.
4679
6fd876ac
HPN
46802004-07-26 <hp@bitrange.com>
4681
4682 * parse.y (build_super_invocation): Adjust declaration order to
4683 avoid declaration after statement.
4684
381166d4
BI
46852004-07-25 Bernardo Innocenti <bernie@develer.com>
4686
4687 * decl.c: Rename all identifiers named `class' to `cl'.
4688
b785f485
RH
46892004-07-25 Richard Henderson <rth@redhat.com>
4690
4691 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4692
0e7d217a
MS
46932004-07-23 Mike Stump <mrs@apple.com>
4694
4695 * boehm.c (set_bit): Improve type safety wrt unsignedness.
4696 * gjavah.c (throwable_p, decode_signature_piece,
4697 print_full_cxx_name, print_include, add_namelet, add_class_decl,
4698 process_file): Likewise.
4699 * jcf-dump.c (main): Likewise.
4700 * jcf-io.c (read_zip_member): Likewise.
4701 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4702 give_name_to_class, get_class_constant): Likewise.
4703 * jcf-write.c (find_constant_wide, push_long_const,
4704 generate_classfile): Likewise.
4705 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4706 * parse.y (read_import_dir): Likewise.
4707 * typeck.c (parse_signature_type): Likewise.
4708 * verify.c (verify_jvm_instructions): Likewise.
4709 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4710
ef05818b
TF
47112004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4712
4713 * Make-lang.in: Replace rmic and rmiregistry references with
4714 grmic and grmiregistry.
4715 * gcj.texi: Likewise.
4716
00150bf9
AH
47172004-07-20 Andrew Haley <aph@redhat.com>
4718
4de69546 4719 PR java/16431.
00150bf9
AH
4720 * verify.c (verify_jvm_instructions): Comment change only.
4721
4722 * typeck.c (build_java_array_type): Add size field to array name.
4723
4724 * java-tree.h (LOCAL_SLOT_P): New.
4725 (update_aliases): Add PC argument.
4726 (pushdecl_function_level): New function.
4727
4728 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4729 MODIFY_EXPR, and SAVE_EXPR.
4730 (java_gimplify_modify_expr): New function.
4731
4732 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4733 (expand_iinc): Pass PC to update_aliases().
4734 (STORE_INTERNAL): Likewise.
4735 (process_jvm_instruction): Likewise.
4736
4737 * decl.c (base_decl_map): New variable.
4738 (uniq): New variable.
4739 (update_aliases): Rewrite with more thorough checking.
4740 (debug_variable_p): New function.
4741 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4742 (check_local_named_variable): Delete whole function.
4743 (initialize_local_variable): New function.
4744 (check_local_unnamed_variable): Add checks and comments.
4745 (find_local_variable): Rewrite.
4746 (java_replace_reference): New function.
4747 (function_binding_level): New variable.
4748 (pushdecl_function_level): New function.
4749 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4750 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4751 (start_java_method): Reset uniq. Create base_decl_map. Set
4752 function_binding_level.
4753 (end_java_method): Null unused fields to save memory.
9f63daea 4754
fa743e8c
NS
47552004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4756
4757 * class.c (add_interface_do): Remove.
4758 (set_super_info, interface_of_p, maybe_add_interface,
4759 add_interface, make_class_data, layout_class,
4760 add_miranda_methods): Adjust BINFO accessors and addition.
4761 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4762 accessors.
4763 * jcf-write.c (generate_classfile): Likewise.
4764 * parse.y (patch_anonymous_class, check_inner_circular_reference,
4765 check_circular_reference, java_complete_class,
4766 check_abstract_method_definitions,
4767 java_check_abstract_method_definitions,
4768 check_interface_throws_clauses, java_check_abstract_methods,
4769 lookup_java_interface_method2,
4770 find_applicable_accessible_methods_list): Adjust BINFO accessors
4771 and addition.
4772 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4773
94cdeb1a
RS
47742004-07-18 Roger Sayle <roger@eyesopen.com>
4775
4776 * builtins.c (max_builtin, min_builtin,
4777 java_build_function_call_expr): Replace calls to build with buildN.
4778 * class.c (build_class_ref, build_static_field_ref,
4779 get_dispatch_table, make_class_data, layout_class_method): Likewise.
4780 * constants.c (build_ref_from_constant_pool): Likewise.
4781 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4782 add_stmt_to_compound): Likewise.
4783 * except.c (build_exception_object_ref, expand_end_java_handler):
4784 Likewise.
4785 * java-gimplify.c (java_gimplify_case_expr,
4786 java_gimplify_default_expr, java_gimplify_block,
4787 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4788 * jcf-write.c (generate_bytecode_insns): Likewise.
4789 * typeck.c (convert_ieee_real_to_integer): Likewise.
4790
6e34d3a3
JM
47912004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4792
4793 * java-tree.h (builtin_function): Declare.
4794
165b54c3
SB
47952004-07-16 Steven Bosscher <stevenb@suse.de>
4796
4797 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4798 abuse restore_line_number_status.
4799
35b6fdcf
FCE
48002004-07-15 Frank Ch. Eigler <fche@redhat.com>
4801
4802 g++/15861
4803 * jcf-parse.c (java_emit_static_constructor): Specify default
4804 priority.
4805
1cb6d0da
PB
48062004-07-13 Per Bothner <per@bothner.com>
4807
4808 * java-tree.h (all_class_filename): Remove useless macro.
4809 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
4810 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
4811 * parse.y (java_parser_context_restore_global): Replace
4812 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4813 * jcf-parse.c (read_class, java_parse_file): Likewise.
4814
dd4e1500
BM
48152004-07-12 Bryce McKinlay <mckinlay@redhat.com>
4816
4817 PR java/16474
4818 gjavah.c (print_field_info): Emit constant only if field is static.
4819
247fec6e
RS
48202004-07-11 Roger Sayle <roger@eyesopen.com>
4821
4822 * expr.c (java_truthvalue_conversion, flush_quick_stack,
4823 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4824 build_java_ret, build_java_throw_out_of_bounds_exception,
4825 build_java_array_length_access, java_check_reference,
4826 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4827 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4828 expand_java_arrayload, build_java_monitor, expand_java_return,
4829 expand_load_internal, expand_java_NEW, build_get_class,
4830 build_instanceof, expand_java_CHECKCAST, expand_iinc,
4831 build_java_soft_divmod, build_java_binop, build_field_ref,
4832 expand_compare, expand_java_goto, expand_java_switch,
4833 expand_java_add_case, build_class_init, build_known_method_ref,
4834 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4835 expand_invoke, build_jni_stub, expand_java_field_op,
4836 java_expand_expr, expand_byte_code, STORE_INTERNAL,
4837 force_evaluation_order, emit_init_test_initialization): Convert
4838 calls to "build" into calls to the prefered "buildN" functions.
4839
9dcf6e73
JM
48402004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4841
4842 * java-tree.h (set_block): Remove.
4843 * lang.c (java_clear_binding_stack): New.
4844 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4845 * decl.c (struct binding_level): Remove this_block.
4846 (clear_binding_level): Likewise.
4847 (poplevel): Don't handle this_block.
4848 (set_block): Remove.
4849
9ee226ef
BM
48502004-07-10 Bryce McKinlay <mckinlay@redhat.com>
4851
4852 * class.c (common_enclosing_context_p): Remove statement with no
4853 side-effects.
4854
d3ecb597
BM
48552004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4856
4857 PR java/8618
4858 * parse.y (create_anonymous_class): Remove 'location' argument. Use
4859 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4860 (craft_constructor): Inherit access flags for implicit constructor
4861 from the enclosing class.
4862 (create_class): Fix comment typo.
4863 (resolve_qualified_expression_name): Pass type of qualifier to
4864 not_accessible_p, not the type in which target field was found.
9f63daea
EC
4865 (not_accessible_p): Handle inner classes. Expand protected
4866 qualifier-subtype check to enclosing instances, but don't apply this
d3ecb597
BM
4867 check to static members. Allow protected access to inner classes
4868 of a subtype. Allow private access within common enclosing context.
4869 (build_super_invocation): Get WFL line number info from current
4870 class decl.
4871 (build_incomplete_class_ref): Update for new create_anonymous_class
4872 signature.
4873 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4874 common_enclosing_instance_p.
4875 * class.c (common_enclosing_context_p): New. Determine if types
4876 share a common enclosing context, even across static contexts.
9f63daea 4877 (common_enclosing_instance_p): Renamed from
d3ecb597
BM
4878 common_enclosing_context_p. Determines if types share a common
4879 non-static enclosing instance.
4880 * java-tree.h (common_enclosing_instance_p): Declare.
4881 * jcf-write.c (get_method_access_flags): New. Surpress private flag
4882 for inner class constructors.
4883 (generate_classfile): Use get_method_access_flags.
4884
968d62b5
BM
48852004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4886
4887 * class.c (interface_of_p): Check for null TYPE_BINFO.
4888
85fd2947
NS
48892004-07-09 Nathan Sidwell <nathan@codesourcery.com>
4890
4891 * class.c (make_class): Do not create binfo here.
4892 (set_super_info): Create it here.
4893 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4894
ac45df5d
RH
48952004-07-08 Richard Henderson <rth@redhat.com>
4896
4897 * expr.c (case_identity, get_primitive_array_vtable,
4898 java_expand_expr, emit_init_test_initialization): Remove.
4899 * java-tree.h (java_expand_expr): Remove.
4900 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4901
e0d3408c
PB
49022004-07-07 Per Bothner <per@bothner.com>
4903
5c121a1b
PB
4904 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
4905 get internal error due to mismatched types.
4906
e0d3408c
PB
4907 * gcj.texi (Invoking gij): Document new -verbose:class flag.
4908
45fdd405
PB
4909 * gcj.texi (Linking): New node. Document -lgij usage.
4910
604a3205
NS
49112004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4912
4913 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4914 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4915 * java/class.c (set_super_info, class_depth, interface_of_p,
4916 maybe_add_interface, add_interface, make_class_data,
4917 layout_class, add_miranda_methods): Adjust BINFO macros.
4918 * expr.c (can_widen_reference_to, lookup_field): Likewise.
4919 * jcf-write.c (generate_classfile): Likewise.
4920 * parse.y (patch_anonymous_class,
4921 check_inner_circular_reference, check_circular_reference,
4922 java_complete_class, check_abstract_method_definitions,
4923 java_check_abstract_method_definitions,
4924 check_interface_throws_clauses, java_check_abstract_methods,
4925 lookup_java_interface_method2,
4926 find_applicable_accessible_methods_list): Likewise.
4927 * typeck.c (find_method_in_interface): Likewise.
4928 * verify.c (merge_types): Likewise.
4929
809e3e7f
NS
49302004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4931
4932 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4933 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4934
95b4aca6
NS
49352004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4936
4937 * class.c (make_class): Use make_tree_binfo.
4938 (set_super_info, add_interface_do): Likewise.
4939 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4940
dafa622b
RM
49412004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4942
4943 * verify.c: Correct array element access formatting thinko.
4944
c516c1ff
RM
49452004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4946
4947 * verify.c: Insert a short blurb at the start referring to the JVMS.
4948 (merge_type_state): Remove redundant nested if statement.
4949 (verify_jvm_instructions): Ensure current_subr is initialised to
4950 NULL_TREE.
4951 Minor formatting fixes all over the place.
4952
82c82743
RH
49532004-07-02 Richard Henderson <rth@redhat.com>
4954
4955 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4956
c9b9aa64
RH
49572004-07-01 Richard Henderson <rth@redhat.com>
4958
4959 * class.c (registerClass_libfunc): Remove.
4960 (init_class_processing): Don't set it.
4961 (emit_register_classes): Take list_p parameter. Fill it in
4962 with _Jv_RegisterClass calls.
4963 * decl.c (java_init_decl_processing): Don't call
4964 init_resource_processing.
4965 * jcf-parse.c (java_emit_static_constructor): New.
4966 (java_parse_file): Call it.
4967 * resource.c (registerResource_libfunc): Remove.
4968 (init_resource_processing): Remove.
4969 (write_resource_constructor): Take list_p parameter. Fill it in
4970 with _Jv_RegisterResource calls.
4971 * java-tree.h: Update prototypes.
4972
9c5fdae6
BM
49732004-06-29 Bryce McKinlay <mckinlay@redhat.com>
4974
4975 PR java/1262
4976 * class.c (layout_class_method): Do not override package-private
4977 method if its in a different package.
4978 (split_qualified_name): Move here from parse.y. Rename from
4979 breakdown_qualified. Add comment.
4980 (in_same_package): Move here from parse.y. Add comment.
4981 * java-tree.h (break_down_qualified, in_same_package): Declare.
4982 (in_same_package): Likewise.
4983 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4984 Callers updated.
4985
ba60e475
AH
49862004-06-29 Andrew Haley <aph@redhat.com>
4987
4988 * except.c (expand_start_java_handler): Push a new binding level.
4989 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4990 register_exception_range() to register where we'll do it.
4991 (expand_end_java_handler): Remove old bogus code. Replace with
4992 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4993 the top of the expression we're curently building.
4994 (maybe_end_try): Delete.
4995 * decl.c (binding_level.exception_range): New field.
4996 (clear_binding_level): Add field exception_range. Reformat.
4997 (poplevel): Call expand_end_java_handler().
4998 (poplevel): Call java_add_stmt only if functionbody is false.
4999 (maybe_poplevels): Don't call maybe_end_try() from here.
5000 (end_java_method): Clear no longer used trees in function decl.
5001 (register_exception_range): New function.
5002 * java-tree.h (register_exception_range, struct eh_range): Declare.
5003
a0cc19cb
BM
50042004-06-28 Bryce McKinlay <mckinlay@redhat.com>
5005
5006 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5007
fe0b9fb5
RM
50082004-06-27 Ranjit Mathew <rmathew@hotmail.com>
5009
5010 Formatting fixes.
5011 * expr.c (class_has_finalize_method): Fix method name indentation.
5012 (expand_java_call): Remove K&R style parameter declaration.
5013 (expand_invoke): Fix statement indentation.
5014 (expand_java_field_op): Likewise.
5015 * parse-scan.y: Fix typo.
5016 (reset_report): Fix method name indentation.
5017 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5018 line. Fix typos.
5019 * verify.c (verify_jvm_instructions): Document parameters, insert
5020 page break.
5021 * lang.c (lang_init_source): Fix method name indentation.
5022 * class.c (common_enclosing_context_p): Likewise.
5023 (emit_symbol_table): Fix parameter list indentation.
5024 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5025 parameter declaration.
5026 * constants.c: Fix copyright notice indentation.
5027 * typeck.c (find_method_in_superclasses): Fix parameter list
5028 indentation.
5029 (find_method_in_interfaces): Likewise.
5030 * zextract.c (makelong): Fix method name indentation.
5031
0f6cd83f
BM
50322004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5033
5034 PR java/15715.
5035 * parse.y (create_interface): Set correct access modifiers for
5036 interfaces.
5037 * jcf-write.c (get_classfile_modifiers): New function.
9f63daea 5038 (generate_classfile): Use get_classfile_modifiers, not
0f6cd83f
BM
5039 get_access_flags.
5040
50412004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5042
5043 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5044 dependency to current parser context, not NULL_TREE, for top-level
5045 classes.
5046 (jdep_resolve_class): Enable member access check for all inner
5047 class dependencies.
5048
808fd801
BM
50492004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5050
9f63daea 5051 * parse.y (qualify_and_find): Pass type decl, not identifier, to
808fd801
BM
5052 load_class.
5053
6573a104
BM
50542004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5055
5056 PR java/15734
5057 * expr.c (expand_java_field_op): Ensure that target class for static
5058 field access has been loaded.
5059
ed7f2369
BM
50602004-06-26 Bryce McKinlay <mckinlay@redhat.com>
5061 Ranjit Mathew <rmathew@hotmail.com>
5062
5063 PR java/1207, java/16178
5064 * jcf-parse.c (load_class): Return immediately if passed a type decl
5065 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5066 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5067 before calling load_class.
5068 (qualify_and_find): Likewise.
5069 (find_in_imports_on_demand): Likewise.
5070 (find_applicable_accessible_methods_list): Likewise.
5071
50722004-06-24 Bryce McKinlay <mckinlay@redhat.com>
5073
5074 * parse.y (java_layout_seen_class_methods): Don't call load_class
5075 on class defined by source parser.
5076
d01a8ee0
BM
50772004-06-23 Bryce McKinlay <mckinlay@redhat.com>
5078
5079 * parse.y (set_nested_class_simple_name_value): Removed.
5080 (java_complete_expand_class): Remove calls to
5081 set_nested_class_simple_name_value.
5082
56c5197b 50832004-06-22 Andrew Haley <aph@redhat.com>
6615c446 5084 Ranjit Mathew <rmathew@hotmail.com>
9f63daea 5085
56c5197b
AH
5086 Fixes PR java/16113.
5087 * decl.c (force_poplevels): Remove call to expand_end_bindings.
5088
815c5191
RM
50892004-06-22 Ranjit Mathew <rmathew@hotmail.com>
5090
5091 * parse.y (create_class): Correct diagnostic message about
5092 java.lang.Object extending anything else.
5093
44de5aeb
RK
50942004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5095
5096 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5097 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5098 * constants.c (build_ref_from_constant_pool): Likewise.
5099 * expr.c (build_java_array_length_access): Likewise.
5100 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5101 (invoke_build_dtable, build_invokevirtual): Likewise.
5102 (build_invokeinterface, java_expand_expr): Likewise.
5103 (emit_init_test_initialization): Likewise.
5104 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5105 * parse.y (make_qualifed_name, build_array_ref): Likewise.
9f63daea 5106
979bf9a1
AH
51072004-06-21 Andrew Haley <aph@redhat.com>
5108
5109 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5110 block.
5111
b40410b9
JM
51122004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5113
5114 * jcf.h (struct JCF): Change java_source, right_zip and finished
5115 to unsigned int.
5116 * lex.h (struct java_lexer): Change hit_eof, read_anything,
5117 byte_swap and use_fallback to unsigned int.
5118 * parse.h (struct _jdep): Change flag0 to unsigned int.
5119
cfb6b4b8
RM
51202004-06-17 Ranjit Mathew <rmathew@hotmail.com>
5121
5122 Fixes PR java/13948
5123 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5124 before trying to lay out its methods.
5125 * jcf-parse.c (read_class): Track parsed files using canonical paths
5126 obtained via lrealpath from libiberty.
5127 (java_parse_file): Likewise.
5128 (parse_source_file_1): Rename formal parameter to reflect its
5129 modified purpose. Minor formatting fix.
5130
096f22f4
PB
51312004-06-15 Paolo Bonzini <bonzini@gnu.org>
5132
5133 * class.c (emit_register_classes): Make the function uninlinable,
5134 do not set current_function_cannot_inline.
5135 * resource.c (write_resource_constructor): Do not reset
5136 flag_inline_functions around rest_of_compilation.
9f63daea 5137
c1b69e3c
AP
51382004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
5139
5140 PR java/15769
5141 * expr.c (java_truthvalue_conversion): Handle
5142 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5143 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5144 i.e. return the expression.
5145
a757585a
MA
51462004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
5147
5148 * gjavah.c: Include version.h
5149
1aae9cdc
BM
51502004-05-31 Bryce McKinlay <mckinlay@redhat.com>
5151
5152 * jcf-write.c (generate_bytecode_conditional): Correct handling
5153 of unordered conditionals. Add comment.
5154
edf74484 51552004-05-29 Ranjit Mathew <rmathew@hotmail.com>
6615c446 5156 Per Bothner <per@bothner.com>
edf74484
RM
5157
5158 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5159 local variable was initialised upon declaration.
5160 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5161 variable was final and initialised upon declaration.
5162 * check-init.c (check_final_reassigned): Give error only if a blank
5163 final is not definitely unassigned or if an initialised final is
5164 reassigned.
5165 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5166 assignment expressions. Remove case MODIFY_EXPR, label do_default.
5167 (check_init): Perform initialised-variable-removing-optimisation
5168 only on non-final local variables.
5169
138c4fd4
BM
51702004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5171
9f63daea
EC
5172 * jcf-write.c (generate_bytecode_conditional): Handle binops
5173 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
70c39ccb 5174 and LTGT_EXPR.
138c4fd4
BM
5175 (generate_bytecode_insns): Likewise.
5176
711e3187
BM
51772004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5178
5179 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5f86874e 5180 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
711e3187 5181
ca60dce2
BM
51822004-05-28 Bryce McKinlay <mckinlay@redhat.com>
5183
5184 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5185 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5186
062583ea
BM
51872004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5188
5189 * decl.c (struct binding_level): Add GTY marker. Compile
5190 binding_depth unconditionally.
5191 (current_binding_level, free_binding_level, global_binding_level):
5192 Likewise.
5193 (clear_binding_level): Unconditionally set binding_depth.
5194 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5195
b9d861bc
BM
51962004-05-26 Bryce McKinlay <mckinlay@redhat.com>
5197
5198 * lex.c (java_new_lexer): Set 'encoding'.
5199 (java_read_char): Improve error message for unrecognized characters.
5200 * lex.h (struct java_lexer): New field 'encoding'.
5201
4f4e53dd
PB
52022004-05-23 Paolo Bonzini <bonzini@gnu.org>
5203
5204 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5205
f1865cde
MW
52062004-05-21 Mark Wielaard <mark@klomp.org>
5207
5208 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5209 extern.
5210
20cb64fd
PB
52112004-05-19 Paolo Bonzini <bonzini@gnu.org>
5212
5213 * typeck.c: Remove non-printable character 160.
5214
66ba7273
RM
52152004-05-17 Ranjit Mathew <rmathew@hotmail.com>
5216
5217 * check-init.c: Correct minor typos.
5218
eadf906f
DN
52192004-05-13 Diego Novillo <dnovillo@redhat.com>
5220
5221 * Make-lang.in, expr.c, java-gimplify.c: Rename
5222 tree-simple.[ch] to tree-gimple.[ch].
5223
c9ecc336
RM
52242004-05-14 Ranjit Mathew <rmathew@hotmail.com>
5225
5226 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5227
6de9cd9a
DN
52282004-05-13 Diego Novillo <dnovillo@redhat.com>
5229
5230 Merge from tree-ssa-20020619-branch. See
5231 ChangeLog.tree-ssa for details.
5232
5233 * Make-lang.in, builtins.c, check-init.c, class.c,
5234 constants.c, decl.c, except.c, expr.c, java-except.h,
5235 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5236 lang.c, lang.opt, parse.y, resource.c: Merged.
5237 * java-gimplify.c: New file.
5238
af434fa7
AH
52392004-05-10 Andrew Haley <aph@redhat.com>
5240
5241 * parse.y (create_class): Set TYPE_VFIELD.
5242 * decl.c (java_init_decl_processing): Likewise.
5243
5244 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5245 * class.c (make_method_value): Replace DECL_VINDEX with call to
5246 get_method_index().
5247 (get_dispatch_vector): Likewise.
5248 (layout_class_method): Likewise.
5249 Replace set of DECL_VINDEX with call to set_method_index().
5250 (set_method_index): New function.
5251 (get_method_index): New function.
5252 * java-tree.h (set_method_index): New function decl.
5253 (get_method_index): New function decl.
5254
7cef5027
AP
52552004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
5256
5257 * parse.y (check_pkg_class_access): Add new argument
5258 and use it when cl is NULL to call lookup_cl on it.
5259 (parser_check_super_interface): Do not call lookup_cl.
5260 Pass this_decl to check_pkg_class_access and NULL
5261 instead of lookup_cl.
5262 (parser_check_super): Update for change in
5263 check_pkg_class_access.
5264 (do_resolve_class): Likewise.
5265 (process_imports): Likewise.
5266 (find_in_imports_on_demand): Likewise.
5267 (resolve_qualified_expression_name): Likewise.
5268
8ae6595c
RM
52692004-05-06 Ranjit Mathew <rmathew@hotmail.com>
5270
5271 Fixes PR java/9685, PR java/15073
5272 * parse.y (accessibility_string): New method.
5273 (not_accessible_field_error): Use accessibility_string()
5274 instead of java_accstring_lookup().
5275 (resolve_qualified_expression_name): Check with
5276 check_pkg_class_access() before allowing access using
5277 qualified names.
5278 Fix comment typo.
5279 Use check_pkg_class_access() instead of not_accessible_p()
5280 for unqualified types.
9f63daea 5281 (not_accessible_p): Use DECL_CONTEXT (member) instead of
8ae6595c
RM
5282 REFERENCE for package-private access checking.
5283 (patch_method_invocation): Use accessibility_string() instead
5284 of java_accstring_lookup().
5285
3fb577a5
RM
52862004-04-30 Ranjit Mathew <rmathew@hotmail.com>
5287
5288 Fixes PR java/15133
5289 * gjavah.c (struct method_name): Add member is_native.
5290 (overloaded_jni_method_exists_p): Match candidate method only if
5291 it is native.
5292 (print_method_info): Initialise is_native flag from the method's
5293 access flags.
5294
2d99c042
RS
52952004-04-30 Roger Sayle <roger@eyesopen.com>
5296
5297 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5298 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5299
a95cd5a0
RS
53002004-04-22 Roger Sayle <roger@eyesopen.com>
5301
5302 * resource.c (write_resource_constructor): Guard call to possibly
5303 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5304
f5310108
BM
53052004-04-19 Bryce McKinlay <mckinlay@redhat.com>
5306
5307 * class.c (make_class_data): Add new field aux_info.
9f63daea 5308 * decl.c (java_init_decl_processing): Push type and decl for
f5310108
BM
5309 `aux_info'.
5310
245c3c04
BM
53112004-04-15 Bryce McKinlay <mckinlay@redhat.com>
5312
9f63daea 5313 * expr.c (expand_java_NEW): Don't use size argument for
245c3c04
BM
5314 _Jv_AllocObject calls.
5315 * parse.y (patch_invoke): Likewise.
5316
aeb95628
BM
53172004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5318
5319 * expr.c (build_invokeinterface): Remove unused variables to
5320 fix warnings.
5321
d7afe286
BM
53222004-04-12 Bryce McKinlay <mckinlay@redhat.com>
5323
9f63daea 5324 * class.c (get_interface_method_index): New function. Return dispatch
d7afe286
BM
5325 index for interface method.
5326 (make_method_value): For interface methods, set index field to
5327 iface dispatch index, not DECL_VINDEX.
5328 * expr.c (build_invokeinterface): Use get_interface_method_index.
5329
8df83eae
RK
53302004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5331
5332 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5333
31023ac5
AH
53342004-03-31 Andrew Haley <aph@redhat.com>
5335
5336 PR java/14104
5337 * jcf-io.c (opendir_in_zip): Tidy up error handling.
5338
1431042e
ZW
53392004-03-30 Zack Weinberg <zack@codesourcery.com>
5340
5341 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5342 form of GTY markers.
5343
f6e9619a
MM
53442004-03-25 Marcus Meissner <meissner@suse.de>
5345
5346 PR java/14689:
5347 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5348
986dc4e5
TT
53492004-03-23 Tom Tromey <tromey@redhat.com>
5350
5351 PR java/14315:
5352 * jcf-write.c (make_class_file_name): Don't report if mkdir
5353 failed with EEXIST.
5354
37214c41
TT
53552004-03-23 Tom Tromey <tromey@redhat.com>
5356
5357 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5358
c048d56d
KH
53592004-03-20 Kazu Hirata <kazu@cs.umass.edu>
5360
5361 * class.c, gjavah.c, lang.c: Fix comment typos.
5362 * gcj.texi: Fix typos.
5363
24d82bce
PB
53642004-03-19 Per Bothner <per@bothner.com>
5365
678fccd5
PB
5366 * gcj.texi (Code Generation): Document new flags and assert defaults.
5367
24d82bce
PB
5368 * class.c (assume_compiled_node_struct): Rename type to
5369 class_flag_node_struct, as it is now also used for enable_assertions.
5370 Rename assume_compiled_node typedef. Rename excludep field to value.
5371 (find_assume_compiled_node): Rename function to find_class_flag_node.
5372 Minor optimization - avoid needless strlen.
5373 (add_assume_compiled): Some tweaking and optimization.
5374 Rename and generalize to add_class_flag takem an extra parameter.
5375 (add_assume_compled): New just calls add_class_flag.
5376 (add_enable_assert, enable_assertions): New functions.
5377 (enable_assert_tree): New static.
5378 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5379 * lang.opt (fenable-assertions, fenable-assertions=,
5380 fdisable-assertions, fdisable-assertions=): New options.
5381 * lang.c (java_handle_option): Handle new options.
5382 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
5383 class in an interface - create helper class nested in outer interface.
1431042e 5384 (build_assertion): Short-circuit if enable_assertions is false.
24d82bce 5385
eb34af89
RK
53862004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5387
5388 * java-tree.h: Changes throughout to add checking to macros
5389 and numerous whitespace changes.
5390 (VAR_OR_FIELD_CHECK): New macro.
5391 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5392 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5393
e4b27b12
PB
53942004-03-16 Per Bothner <per@bothner.com>
5395
c4cef86b
PB
5396 * jcf-jump.c (options): New --print-constants option.
5397 * gcj.texi (Invoking jcf-dump): Document --print-constants.
5398
e4b27b12
PB
5399 * jcf-dump.c (flag_print_constant_pool): Default to off.
5400 (print_constant_terse_with_index): New helper function.
5401 (various places): Check flag_print_constant_pool where missing.
5402 (main): If verbose set flag_print_constant_pool.
5403 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
5404
bfb7b172
AH
54052004-03-15 Andrew Haley <aph@redhat.com>
5406
5407 PR java/14581
5408 * parse.y (java_complete_lhs): Check that final variable has an
5409 initializer.
5410
0bb1600a
AH
54112004-03-12 Andrew Haley <aph@redhat.com>
5412
5413 PR java/14551
5414 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5415 conversion.
5416
083474cc
RS
54172004-02-29 Roger Sayle <roger@eyesopen.com>
5418
5419 * jcf-parse.c (java_parse_file): Handle the case that input_filename
5420 is NULL.
5421
202167e7
PB
54222004-02-27 Per Bothner <per@bothner.com>
5423
5424 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
5425 suggestion: Use build_incomplete_class_ref.
6bd5c787 5426 This fixes PR java/13508, java/11714.
202167e7 5427
88462c42
KH
54282004-02-27 Kazu Hirata <kazu@cs.umass.edu>
5429
5430 * java/parse.h: Update copyright.
5431
bddefd4f
AH
54322004-02-26 Andrew Haley <aph@redhat.com>
5433
5434 PR java/14231:
5435 * parse.y (check_interface_throws_clauses): Check for
5436 !METHOD_INVISIBLE (iface_method).
5437 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5438 well as CLASS_ABSTRACT.
1431042e 5439
9980cc4b
PB
54402004-02-25 Per Bothner <per@bothner.com>
5441
5442 * parse.y (build_assertion): If we're in an inner class, create the
5443 class$ helper routine in the outer class.
5444
4221057e
RH
54452004-02-19 Richard Henderson <rth@redhat.com>
5446
5447 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5448
fd1146d4
GK
54492004-02-16 Geoffrey Keating <geoffk@apple.com>
5450
5451 * Make-lang.in (java.install-man): Add extra dependencies.
5452
c7dad005
GK
54532004-02-13 Geoffrey Keating <geoffk@apple.com>
5454
5455 * Make-lang.in: Install man pages under the same names
5456 (possibly transformed) as the program they document.
5457
0237b2dc
JM
54582004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
5459
5460 * gjavah.c: Include "intl.h".
5461 (error): New function.
5462 (main): Call gcc_init_libintl.
5463 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5464 print_stub_or_jni, process_file, main): Use error rather than
5465 fprintf.
5466 (print_method_info, usage, help, version, main): Mark strings for
5467 translation with _. Avoid splitting up sentences. Send
5468 information messages to stdout.
5469 * jcf-dump.c: Include "intl.h".
5470 (main): Call gcc_init_libintl.
5471 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5472 Mark error, usage and version messages for translation with _.
5473 Avoid splitting up sentences.
5474 * jv-scan.c: Include "intl.h".
5475 (fatal_error, warning): Change parameter s to msgid. Translate
5476 messages.
5477 (main): Call gcc_init_libintl.
5478 (usage, help, version): Mark error, usage and version messages for
5479 translation with _. Avoid splitting up sentences.
5480 * jvgenmain.c: Include "intl.h".
5481 (main): Call gcc_init_libintl.
5482 (usage, main): Mark error messages for translation with _.
5483 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5484 JVGENMAIN_OBJS): Add intl.o.
5485 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5486 java/jvgenmain.o): Update dependencies.
5487
e333a618
PB
54882004-02-08 Per Bothner <per@bothner.com>
5489
5490 * parse.y (resolve_qualified_expression_name): In case of inaccessible
5491 class don't use not_accessible_field_error, which can get confused.
5492
02ba6b22
KC
54932004-02-05 Kelley Cook <kcook@gcc.gnu.org>
5494
5495 Make-lang.in (po-generated): Delete.
5496
136e64db
KH
54972004-02-05 Kazu Hirata <kazu@cs.umass.edu>
5498
5499 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5500 Depend on target.h.
5501 * decl.c: Include target.h.
5502 (start_java_method): Replace PROMOTE_PROTOTYPES with
5503 targetm.calls.promote_prototypes.
5504 * expr.c: Include target.h.
5505 (pop_arguments): Replace PROMOTE_PROTOTYPES with
5506 targetm.calls.promote_prototypes.
5507 * parse.y: Include target.h.
5508 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5509 with targetm.calls.promote_prototypes.
5510
e146f815
KH
55112004-02-04 Kazu Hirata <kazu@cs.umass.edu>
5512
5513 * typeck.c: Update copyright.
5514
4e0e4a49
TT
55152004-02-02 Tom Tromey <tromey@redhat.com>
5516
5517 * decl.c (java_init_decl_processing): Remove duplicate
5518 gnu/gcj/RawData.
5519
71cbe2c1
KC
55202004-01-30 Kelley Cook <kcook@gcc.gnu.org>
5521
1431042e 5522 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
71cbe2c1 5523
ae8f0c17
AP
55242004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
5525
5526 * expr.c (build_field_ref): Move variable
5527 definition up.
5528
6d23f07f
AH
55292004-01-28 Andrew Haley <aph@redhat.com>
5530
5531 * expr.c (build_field_ref): Widen field offset.
5532
ea095e9a
AH
55332004-01-27 Andrew Haley <aph@redhat.com>
5534
5535 java/13273
5536 * parse.y (check_interface_throws_clauses): Make sure class_decl
5537 has been loaded.
5538
5238574f
JS
55392004-01-22 Jeff Sturm <jsturm@one-point.com>
5540
5541 PR java/13733
5542 * parse.y (patch_assignment): Don't modify lhs_type for
5543 reference assignments.
5544
a541f69d
KC
55452004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5546
5547 * Make-lang.in: Replace $(docdir) with doc.
5548 (java.info, java.srcinfo, java.man, java.srcman): New rules.
5549 (java.install-man): Revamp rule.
1431042e 5550
e165d61b
KC
55512004-01-20 Kelley Cook <kcook@gcc.gnu.org>
5552
1431042e
ZW
5553 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5554 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
e165d61b
KC
5555 instead of deferred backquote.
5556
cf5da2b9
AP
55572004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
5558
5559 * typeck.c (find_method_in_interfaces): Move variable
5560 definition up.
5561
e081a9c4
AH
55622004-01-16 Andrew Haley <aph@redhat.com>
5563
5564 PR java/13273:
5565 * typeck.c (shallow_find_method): New.
5566 (find_method_in_superclasses): New.
5567 (find_method_in_interfaces): New.
5568 (lookup_do): Rewrite.
5569 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5570
5571 * jcf-parse.c (read_class): Save and restore output_class.
5572 * decl.c (java_expand_body): Set output_class from fndecl.
5573
71e68384
MC
55742004-01-15 Michael Chastain <mec.gnu@mindspring.com>
5575
5576 * class.c (gen_indirect_dispatch_tables): Fix string length
5577 calculations.
5578
03787dfd
KC
55792004-01-15 Kelley Cook <kcook@gcc.gnu.org>
5580
5581 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5582 (java.srcextra): Copy above back to source directory if requested.
5583 (po-generated): Delete reference to $(parsedir).
5584 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5585 Use implicit rule.
5586
4b589eab
JH
55872004-01-14 Jan Hubicka <jh@suse.cz>
5588
5589 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5590 estimation.
5591
0fab64a3
MM
55922004-01-09 Mark Mitchell <mark@codesourcery.com>
5593
5594 * java-tree.h (java_expand_expr): Change prototype.
5595 * expr.c (java_expand_expr): Add alt_rtl parameter.
5596
85194ee9
AH
55972004-01-09 Andrew Haley <aph@redhat.com>
5598
5599 PR java/12755:
5600 * parse.y (java_fix_constructors): Set output_class.
5601 (java_reorder_fields): Likewise.
5602 (java_layout_classes): Likewise.
5603 (java_expand_classes): Generate indirect dispatch tables.
5604 (java_expand_classes): Set output_class.
5605 (java_finish_classes): Likewise.
5606 * lang.c (java_init): Turn on always_initialize_class_p if we're
5607 using indirect dis[atch.
5608 (java_decl_ok_for_sibcall): Use output_class, not current_class.
5609 (java_get_callee_fndecl): Use class local atable.
1431042e 5610 * jcf-parse.c
85194ee9
AH
5611 (always_initialize_class_p): Decl moved to java-tree.h.
5612 (HANDLE_CLASS_INFO): Set output_class.
5613 (read_class): Likewise.
5614 (parse_class_file): Call gen_indirect_dispatch_tables.
5615 (parse_zip_file_entries): Set output_class.
5616 (java_parse_file): Set output_class. Don't emit symbol tables.
5617 * java-tree.h (output_class): New.
5618 Remove global declarations for otable, atable, and ctable.
5619 (always_initialize_class_p): moved here from decl.c.
5620 (DECL_OWNER): New.
5621 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5622 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5623 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5624 (struct lang_type): Add otable_methods, otable_decl,
5625 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5626 ctable_decl, catch_classes, type_to_runtime_map.
5627 * expr.c (build_field_ref): Make otable, atable, and ctable class
5628 local rather than global.
5629 (build_known_method_ref): Likewise.
5630 (build_invokeinterface): Likewise.
5631 (java_expand_expr): Pass runtime type (rather than actual type) to
5632 expand_start_catch.
5633 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5634 this class. Look up each class in that map to delete duplicates.
5635 (expand_end_java_handler): Pass runtime type (rather than actual
5636 type) to expand_start_catch.
5637 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5638 (do_nothing): New.
5639 (java_init_decl_processing): Rearrange things. Remove global
5640 declarations of otable, atable, and ctable.
5641 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5642 (java_expand_body): Set output_class.
5643 * constants.c (build_constant_data_ref): Use output_class, not
5644 current_class.
5645 (alloc_name_constant): Likewise.
5646 * class.c (gen_indirect_dispatch_tables): New.
5647 (build_class_ref): Generate hard reference to superclass, even if
5648 using indirect dispatch.
5649 (build_static_field_ref): Use class local atable.
5650 (make_class_data): Generate hard reference to superclass, even if
5651 using indirect dispatch.
5652 Generate symbolic references to interfaces when using indirect
5653 dispatch.
5654 (make_class_data): Emit otable, atable, and ctable.
5655 Make otable, atable, and ctable class local rather than global.
5656 (emit_catch_table): Make otable, atable, and ctable class local
5657 rather than global.
1431042e 5658
df9fe6e5
AP
56592003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
5660
19a4e5b7
AP
5661 * parse.y (catch_clause_parameter): Fix typo.
5662
df9fe6e5 5663 PR java/13404
1431042e 5664 * parse.y: (catch_clause_parameter): Return early if $3, aka
df9fe6e5
AP
5665 formal_parameter, is null.
5666
3a976c72
KH
56672003-12-20 Kazu Hirata <kazu@cs.umass.edu>
5668
5669 * class.c: Remove uses of "register" specifier in
5670 declarations of arguments and local variables.
5671 * decl.c: Likewise.
5672 * expr.c: Likewise.
5673 * gjavah.c: Likewise.
5674 * jcf-dump.c: Likewise.
5675 * jcf-io.c: Likewise.
5676 * jcf-parse.c: Likewise.
5677 * jcf-write.c: Likewise.
5678 * keyword.h: Likewise.
5679 * parse.y: Likewise.
5680 * typeck.c: Likewise.
5681 * verify.c: Likewise.
5682
439020ec
KC
56832003-12-06 Kelley Cook <kcook@gcc.gnu.org>
5684
5685 * Make-lang.in (GCJ_CROSS_NAME): Delete.
5686 (java.install_common, java.install-man): Adjust for above.
5687 (java.uninstall): Likewise.
5688
02972627
MK
56892003-12-03 Michael Koch <konqueror@gmx.de>
5690
5691 * class.c (make_class_data):
5692 Push field value to 'hack_signers' instead of 'signers'.
5693 * decl.c (java_init_decl_processing):
5694 Push field 'hack_signers' instead of 'signers'.
5695
eb158727
ZW
56962003-12-03 Zack Weinberg <zack@codesourcery.com>
5697
5698 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5699 including iconv.h.
5700
c6a25d3a
RL
57012003-12-03 Ralph Loader <rcl@ihug.co.nz>
5702
5703 PR java/12374:
5704 * parse.y (qualify_ambiguous_name): Remove lots of broken
5705 field access processing - there's no need to do that here,
5706 because we have resolve_field_access. Remove
5707 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5708 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5709 used.
eb158727 5710
50abb28b
JS
57112003-12-01 Jeff Sturm <jsturm@one-point.com>
5712
5713 Fix PR java/13237
5714 * parse.y (java_complete_lhs): Save location prior to patching
5715 CALL_EXPR.
5716
8bc7a740
ME
57172003-11-25 Mohan Embar <gnustuff@thisiscool.com>
5718
50abb28b
JS
5719 PR java/12548
5720 * resource.c (write_resource_constructor): Append
5721 "_resource" to constructor identifier name.
8bc7a740 5722
75182467
JS
57232003-11-25 Jeff Sturm <jsturm@one-point.com>
5724
5725 Fix PR java/13183.
5726 * constants.c (cpool_for_class): New function.
5727 (outgoing_cpool): Remove global variable.
5728 (alloc_name_constant): Use cpool_for_class.
5729 (build_constants_constructor): Likewise.
5730 * decl.c (java_expand_body): Set current_class.
5731 * java-tree.h (outgoing_cpool) Remove declaration.
5732 (init_outgoing_cpool): Likewise.
5733 * jcf-parse.c (init_outgoing_cpool): Remove function.
5734 (parse_class_file): Don't call init_outgoing_cpool.
5735 * parse.y (java_complete_expand_methods): Don't call
5736 init_outgoing_cpool. Don't save outgoing_cpool.
5737 (java_expand_classes): Don't restore outgoing_cpool.
5738 (java_finish_classes): Likewise.
5739
33fe4596
ME
57402003-11-24 Mohan Embar <gnustuff@thisiscool.com>
5741
5742 * Make-lang.in: (java.install-common) Add
5743 symlink for $(target_noncanonical)-gcjh for
5744 native builds.
5745
a03ad584
JM
57462003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5747
5748 * Make-lang.in (java.extraclean): Delete.
5749
49a41726
JM
57502003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5751
5752 * Make-lang.in (check-java): Add.
5753
c2a141a0
JS
57542003-11-19 Jeff Sturm <jsturm@one-point.com>
5755
5756 Fix PR java/13024.
5757 * except.c (prepare_eh_table_type): Allocate variable-sized
5758 buffer `buf' with alloca.
5759
b8ca854a
JS
57602003-11-17 Jeff Sturm <jsturm@one-point.com>
5761
5762 Fix PR java/12857.
5763
5764 decl.c (java_init_decl_processing): Don't initialize
5765 class_not_found_type_node, no_class_def_found_type_node.
5766
5767 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5768 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5769 (class_not_found_type_node, no_class_def_found_type_node):
5770 Don't define.
5771
5772 parse.y (build_dot_class_method_invocation): Add this_class
5773 argument. Qualify method invocations to a different class.
5774 (create_new_parser_context): Initialize saved_data_ctx to 0.
5775 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5776 (build_dot_class_method): Don't load classes. Register
5777 incomplete types.
5778 (build_incomplete_class_ref): Special cases for interfaces
5779 and inner classes. Move build_dot_class_method call to here...
5780 (patch_incomplete_class_ref): ...from here. Pass current_class
5781 to build_dot_class_method_invocation.
5782 (build_assertion): Pass class_type to
5783 build_dot_class_method_invocation.
5784 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5785
a78e4fa7
JS
57862003-11-17 Jeff Sturm <jsturm@one-point.com>
5787
5788 Fix PR java/12739.
5789 * java-tree.h (BLOCK_EMPTY_P): Define.
5790 * parse.y (java_complete_lhs): Check for empty blocks
5791 in TRY_FINALLY_EXPR case.
5792
57932003-11-17 Andrew Haley <aph@redhat.com>
6bbb4ad3
AH
5794
5795 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
eb158727 5796 (struct lang_decl_var:freed): New variable.
6bbb4ad3
AH
5797 * decl.c (poplevel): Mark local vars that have gone out of scope.
5798 (push_jvm_slot): Don't use the RTL of a var that has gone out of
5799 scope.
5800
7d60db05
JM
58012003-11-16 Jason Merrill <jason@redhat.com>
5802
5803 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5804 and TAGS files that include them for each front end.
5805
45c00e22
TT
58062003-11-15 Tom Tromey <tromey@redhat.com>
5807
5808 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5809
1b2b8ee7
JM
58102003-11-12 Jason Merrill <jason@redhat.com>
5811
5812 PR optimization/12547
5813 * lang.c (java_tree_inlining_walk_subtrees): Just walk
5814 BLOCK_EXPR_BODY directly.
5815
7304c6cf
AH
58162003-11-12 Andrew Haley <aph@redhat.com>
5817
0adaa7e4
AH
5818 PR java/11045
5819 * parse.y (fold_constant_for_init): Check that we really do have a
5820 constant.
5821
7304c6cf
AH
5822 PR java/11533
5823 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5824 init_test_decls being inlined.
5825
5826 PR java/12890:
5827 * parse.y (do_resolve_class): Check return value from
5828 breakdown_qualified().
5829
5b84be73
TT
58302003-11-11 Tom Tromey <tromey@redhat.com>
5831
5832 PR java/12915:
5833 * parse.y (merge_string_cste): Handle case where we have a
5834 pointer that happens to be zero, not null_pointer_node.
5835
87a9cbf9
TT
58362003-11-10 Tom Tromey <tromey@redhat.com>
5837
5838 * jcf-parse.c (classify_zip_file): Correctly compare
5839 filename_length against length of manifest file's name.
5840
b9bc3665
TT
58412003-11-08 Tom Tromey <tromey@redhat.com>
5842
5843 PR java/12894:
5844 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5845
4b886873
AH
58462003-11-06 Andrew Haley <aph@redhat.com>
5847
5848 * expr.c (java_stack_swap): Make sure destination stack slots are
5849 of the correct type.
5850
63069342
KC
58512003-11-03 Kelley Cook <kcook@gcc.gnu.org>
5852
5853 * Make-lang.in (dvi): Move targets to $(docobjdir).
5854 (gcj.dvi): Simplify rule and adjust target.
5855 (gcj.info): Simplify rule.
5856 (gcj.pod): New intermediate rule.
5857 (gcjh.pod): Likewise.
5858 (jv-scan.pod): Likewise.
5859 (jcf-dump.pod): Likewise.
5860 (gij.pod): Likewise.
5861 (jv-convert.pod): Likewise.
5862 (rmic.pod): Likewise.
5863 (rmiregistry.pod): Likewise.
5864 (gcj.1): Delete.
5865 (gcjh.1): Delete.
5866 (jv-scan.1): Delete.
5867 (jcf-dump.1): Delete.
5868 (gij.1): Delete.
5869 (jv-convert.1): Delete.
5870 (rmic.1): Delete.
5871 (rmiregistry.1): Delete.
5872
9bcdf735
JS
58732003-11-02 Jeff Sturm <jsturm@one-point.com>
5874
5875 Fixes PR java/12866.
5876 * parse.y (resolve_qualified_expression_name): Move test
5877 for outer field access methods from here...
5878 (check_thrown_exceptions) ...to here.
5879
d6665c33
KC
58802003-11-01 Kelley Cook <kcook@gcc.gnu.org>
5881
5882 * .cvsignore: Delete.
5883
ab212c24
FCE
58842003-10-28 Frank Ch. Eigler <fche@redhat.com>
5885
5886 * verify.c (verify_jvm_instructions): Don't warn about legal
5887 eh binding regions generated for example by jdk 1.4.1.
5888
7b8af2b5
DM
58892003-10-24 David S. Miller <davem@redhat.com>
5890
5891 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5892
90471585
AH
58932003-10-22 Andrew Haley <aph@redhat.com>
5894
5895 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5896 (java_get_callee_fndecl): New.
5897
5898 * jcf-parse.c (java_parse_file): Call emit_catch_table().
5899
5900 * java-tree.h (ctable_decl): New.
5901 (catch_classes): New.
5902 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5903
5904 * decl.c (java_init_decl_processing): Add catch_class_type.
5905 Add ctable_decl.
5906 Add catch_classes field.
5907
5908 * class.c (build_indirect_class_ref): Break out from
5909 build_class_ref.
5910 (make_field_value): Check flag_indirect_dispatch.
5911 (make_class_data): Ditto.
5912 Tidy uses of PUSH_FIELD_VALUE.
5913 Add field catch_classes.
5914 (make_catch_class_record): New.
5915
5916 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5917
ed2f11fa
KH
59182003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5919
5920 * jcf-write.c: Follow spelling conventions.
5921 * parse.y: Likewise.
5922
67264b4f
KH
59232003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5924
5925 * ChangeLog: Fix typos.
5926 * expr.c: Fix comment typos.
5927 * jcf-write.c: Likewise.
5928 * lang.c: Likewise.
5929 * lex.c: Likewise.
5930 * mangle.c: Likewise.
5931 * parse-scan.y: Likewise.
5932 * parse.y: Likewise.
5933
36ae3d8e
TT
59342003-10-22 Tom Tromey <tromey@redhat.com>
5935
5936 * expr.c (expand_byte_code): Only warn about dead bytecode when
5937 extra_warnings is set.
5938
ed2506a4
BM
59392003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
5940
5941 Fix for PR java/12586.
5942 * mangle.c (find_compression_record_match): Don't iterate through
5943 package namespace elements unless they all match compression_table
5944 entries.
5945
036a75ac
KC
59462003-10-20 Kelley Cook <kcook@gcc.gnu.org>
5947
5948 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5949 (generate-manpages): Likewise.
5950 (java.maintainer-clean): Likewise.
5951 (gcj.info): Likewise.
5952 (gcj.1): Likewise.
5953 (gcjh.1): Likewise.
5954 (jv-scan.1): Likewise.
5955 (jcf-dump.1): Likewise.
5956 (gij.1): Likewise.
5957 (jv-convert.1): Likewise.
5958 (rmic.1): Likewise.
5959 (rmiregistry.1): Likewise.
5960 (java.install-man): Likewise.
5961 (parse-scan.o): Move and define complete compile line.
5962 (parse.o): Likewise.
5963 (jcf-tree-inline.o): Move.
5964
97ae108d
MM
59652003-10-20 Mark Mitchell <mark@codesourcery.com>
5966
5967 * Make-lang.in (info): Update dependencies.
5968 (java.install-info): Remove.
5969 ($(srcdir)/java/gcj.info): Replace with ...
5970 ($(docobjdir)/gcj.info): ... this.
5971
43aba518
NN
59722003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
5973
5974 * Make-lang.in: Replace uses of $(target_alias) with
5975 $(target_noncanonical).
5976
ae125b17
TT
59772003-10-09 Tom Tromey <tromey@redhat.com>
5978
5979 * decl.c (java_init_decl_processing): Declare signers field.
5980 * class.c (make_class_data): Set signers field.
5981
1456deaf
JM
59822003-10-09 Jason Merrill <jason@redhat.com>
5983
5984 * parse.y (patch_assignment): Use make_node to create a BLOCK.
5985 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5986 POINTER_TYPE.
5987
62b81e45
MM
59882003-10-06 Mark Mitchell <mark@codesourcery.com>
5989
5990 * Make-lang.in (java.info): Replace with ...
5991 (info): ... this.
5992 (java.dvi): Replace with ...
5993 (dvi): ... this.
5994 (java.generated-manpages): Replace with ...
5995
35222de2
KC
59962003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
5997
5998 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5999
9dfc2ec2
AH
60002003-10-01 Andrew Haley <aph@redhat.com>
6001
6002 * jcf-parse.c (java_parse_file): Write otable and atable.
6003 * java-tree.h (atable_methods): New.
6004 (atable_decl): New.
6005 (atable_syms_decl): New.
6006 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6007 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
eb158727 6008 (symbol_*type): Rename method_symbol* to symbol*type.
9dfc2ec2
AH
6009 (emit_offset_symbol_table): Delete.
6010 (emit_symbol_table): New.
6011 (get_symbol_table_index): New.
6012 (atable_type): New.
6013 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6014 (build_known_method_ref): Likewise.
6015 (get_symbol_table_index): Rename from get_offset_table_index.
6016 Parameterize to allow re-use by differing types of symbol table.
6017 (build_invokevirtual): Pass table to get_offset_table_index.
6018 * decl.c (java_init_decl_processing): Push types and decls for
6019 atable and atable_syyms.
6020 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6021 (make_class_data): Add new fields atable and atable_syms.
6022 (emit_symbol_table): Rename from emit_offset_symbol_table.
6023 Parameterize to allow re-use by different types of symbol table.
6024 (build_symbol_entry): Renamed from build_method_symbols_entry.
eb158727 6025
d186e676
RS
60262003-09-30 Roger Sayle <roger@eyesopen.com>
6027
6028 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6029 semantics for SAVE_EXPR, by caching the result in a temporary.
6030
436fac17
RH
60312003-09-28 Richard Henderson <rth@redhat.com>
6032
6033 * check-init.c (check_init): Save and restore input_location
6034 instead of file and line separately.
6035 * decl.c (java_expand_body): Likewise.
6036 * jcf-write.c (generate_bytecode_insns): Likewise.
6037 * parse.y (safe_layout_class): Likewise.
6038 * jcf-parse.c (read_class, parse_class_file): Likewise.
6039 (java_parse_file): Use %H for warning locator.
6040
37e2180d
RS
60412003-09-28 Roger Sayle <roger@eyesopen.com>
6042
6043 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6044 with void-type branches instead of using a COMPOUND_EXPR.
6045
9220b1ba
JS
60462003-09-28 Jeff Sturm <jsturm@one-point.com>
6047
6048 * decl.c (java_optimize_inline, dump_function): Remove.
6049 * java-tree.h (java_optimize_inline): Remove declaration.
6050 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6051 * parse.y (source_end_java_method, java_expand_classes):
6052 Likewise. Remove dead code.
6053
c67e6e14
RS
60542003-09-27 Roger Sayle <roger@eyesopen.com>
6055
6056 * lang.c (java_init_options): Set flag_evaluation_order.
6057 * expr.c (force_evaluation_order): Don't attempt to force
6058 evaluation order of binary operations using save_expr.
6059 * parse.y (java_complete_lhs): No longer need to call
6060 force_evaluation_order when constructing binary operators.
6061
cd11bdcc
APB
60622003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
6063 Bryce McKinlay <bryce@mckinlay.net.nz>
6064
6065 PR java/1333:
6066 * parse.y (not_accessible_field_error): New function.
6067 (resolve_expression_name): Check field access permissions.
6068 (resolve_qualified_expression_name): Use
6069 not_accessible_field_error.
6070 (resolve_qualified_expression_name): Likewise.
6071
eb9ec0d4
RO
60722003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6073
6074 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6075
87750fef
RS
60762003-09-23 Roger Sayle <roger@eyesopen.com>
6077
6078 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6079 with equal operands without side-effects.
6080
92f6e625
JS
60812003-09-22 Jeff Sturm <jsturm@one-point.com>
6082
6083 * decl.c (java_init_decl_processing): Don't emit otable decls
6084 if flag_indirect_dispatch is not set.
6085
f31686a3
RH
60862003-09-21 Richard Henderson <rth@redhat.com>
6087
eb158727 6088 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
f31686a3
RH
6089 resource.c: Revert.
6090
7e2af53a
RH
60912003-09-21 Richard Henderson <rth@redhat.com>
6092
eb158727 6093 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
7e2af53a
RH
6094 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6095
ddd2d57e
RH
60962003-09-20 Richard Henderson <rth@redhat.com>
6097
eb158727 6098 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
ddd2d57e 6099
96123432
RS
61002003-09-18 Roger Sayle <roger@eyesopen.com>
6101
6102 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6103 * check-init.c (check_init): Likewise.
6104
a490d1be
RS
61052003-09-18 Roger Sayle <roger@eyesopen.com>
6106
6107 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6108
1319e88e
AH
61092003-09-16 Andrew Haley <aph@redhat.com>
6110
6111 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6112
bdc225df
RM
61132003-09-17 Ranjit Mathew <rmathew@hotmail.com>
6114
6115 Fixes PR java/9577
6116 * mangle.c (find_compression_record_match): Skip
6117 over a "6JArray" (the array template mangled string)
6118 IDENTIFIER_NODE.
6119 (mangle_array_type): Correct minor typo.
6120 (atms): Move definition to the beginning.
6121
93634679
BM
61222003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
6123
eb158727 6124 * class.c (add_miranda_methods): Ensure super-interfaces are laid
93634679
BM
6125 out. Fix for PR java/12254.
6126
6b00c969
RH
61272003-09-11 Richard Henderson <rth@redhat.com>
6128
eb158727
ZW
6129 * parse.y (source_end_java_method): Update for new
6130 cgraph_finalize_function argument.
6b00c969 6131
39adabaf
RH
61322003-09-09 Richard Henderson <rth@redhat.com>
6133
eb158727
ZW
6134 * parse.y (source_end_java_method): Update call to
6135 cgraph_finalize_function.
39adabaf 6136
916b57ce
JS
61372003-09-03 Jeff Sturm <jsturm@one-point.com>
6138
6139 * decl.c (java_expand_body): New function.
6140 * expr.c (build_class_init): Set DECL_IGNORED_P.
6141 * java-tree.h (start_complete_expand_method,
6142 java_expand_body): Declare.
6143 * jcf-parse.c (cgraph.h): Include.
6144 (java_parse_file): Handle flag_unit_at_a_time.
6145 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6146 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6147 (java_estimate_num_insns): Use walk_tree_without_duplicates.
6148 (java_start_inlining): New function.
6149 * parse.h (java_finish_classes): Declare.
6150 * parse.y: Include cgraph.h.
6151 (block): Don't special-case empty block production.
6152 (craft_constructor): Set DECL_INLINE.
6153 (source_end_java_method): Handle flag_unit_at_a_time.
6154 Replace inline code with call to java_expand_body.
6155 (start_complete_expand_method): Remove static modifier.
6156 (java_expand_method_bodies): Patch function tree for
6157 class initialization and/or synchronization as needed.
6158 Don't begin RTL expansion yet.
6159 (java_expand_classes): Check flag_unit_at_a_time before
6160 calling finish_class.
6161 (java_finish_classes): New function.
6162 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6163 (patch_assignment): Set DECL_CONTEXT on temporary variable.
6164 (emit_test_initialization): Set DECL_IGNORED_P.
6165
e71d3aae
RS
61662003-09-03 Roger Sayle <roger@eyesopen.com>
6167
6168 * builtins.c (enum builtin_type): Delete unused enumeration.
6169 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6170
ff2865f2
TT
61712003-08-28 Tom Tromey <tromey@redhat.com>
6172
6173 * gcj.texi (Extensions): Document gcjlib URLs.
6174
b7d6f12a
TT
61752003-08-20 Tom Tromey <tromey@redhat.com>
6176
6177 * gcj.texi (Extensions): Added xref.
6178 (libgcj Runtime Properties): Document
6179 gnu.gcj.runtime.VMClassLoader.library_control.
6180
ec00bfc0
AH
61812003-08-20 Andrew Haley <aph@redhat.com>
6182
eb158727
ZW
6183 * except.c (prepare_eh_table_type): Use new encoding for exception
6184 handlers when using -fno-assume-compiled.
ec00bfc0 6185
7f8b4704
TT
61862003-08-13 Tom Tromey <tromey@redhat.com>
6187
6188 * gcj.texi (Invoking gij): Document -X and -?.
6189
d0cf60cc
ME
61902003-08-13 Mohan Embar <gnustuff@thisiscool.com>
6191
6192 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6193 GCJH_OBJS, JCFDUMP_OBJS
6194 * win32-host.c: Removed the unnecessary and broken dependency
6195 on jcf.h
6196
aecf4109
TT
61972003-08-11 Tom Tromey <tromey@redhat.com>
6198
6199 * parse.y (java_check_regular_methods): Typo fixes. Call
6200 check_interface_throws_clauses. Use
6201 check_concrete_throws_clauses.
6202 (check_interface_throws_clauses): New function.
6203 (check_concrete_throws_clauses): New function.
6204 (hack_is_accessible_p): New function.
6205 (find_most_specific_methods_list): Added FIXME.
6206 * typeck.c (lookup_do): Use `flags' argument to decide what to
6207 do. Reimplemented.
6208 (lookup_argument_method_generic): New function.
6209 (lookup_argument_method2): Removed.
6210 * jcf.h (ACC_INVISIBLE): New define.
6211 * jcf-write.c (generate_classfile): Skip invisible methods.
6212 * class.c (add_miranda_methods): New function.
6213 (layout_class_methods): Use it.
6214 (get_access_flags_from_decl): Use ACC_INVISIBLE.
6215 * java-tree.h (METHOD_INVISIBLE): New define.
6216 (lang_decl_func) [invisible]: New field.
6217 (lookup_argument_method_generic): Declare.
6218 (SEARCH_INTERFACE): New define.
6219 (SEARCH_SUPER): Likewise.
6220 (SEARCH_ONLY_INTERFACE): Likewise.
6221 (SEARCH_VISIBLE): Likewise.
6222 (lookup_argument_method2): Removed declaration.
6223
90281aec
TT
62242003-08-05 Tom Tromey <tromey@redhat.com>
6225
6226 Fix for PR java/11600:
6227 * parse.y (java_complete_lhs): See whether we're calling a method
6228 on an array.
6229 (check_thrown_exceptions): Added `is_array_call' argument;
6230 fixed `clone' checking; updated all callers.
6231
b3c3af2f
SB
62322003-08-05 Steven Bosscher <steven@gcc.gnu.org>
6233
6234 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6235
0e046453
TT
62362003-08-03 Tom Tromey <tromey@redhat.com>
6237
6238 * java-tree.h (METHOD_TRANSIENT): Removed.
6239 * decl.c (pushdecl): Removed some dead code.
6240 * class.c (get_access_flags_from_decl): Can't have transient
6241 method.
6242 (add_method_1): Can't have a transient method.
6243
8376cf3d
AJ
62442003-07-28 Andreas Jaeger <aj@suse.de>
6245
6246 * jvspec.c: Convert to ISO C90 prototypes.
6247
b8bae365
NS
62482003-07-25 Nathan Sidwell <nathan@codesourcery.com>
6249
6250 * decl.c (force_poplevels): Fix warning call.
6251
cd475805
GDR
62522003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6253
6254 * expr.c (expand_java_field_op): Don't use xxx_with_decl
6255 (expand_java_field_op): Likewise.
6256 * class.c (layout_class_method): Likewise
6257 (emit_register_classes): Likewise.
6258 * decl.c (pushdecl): Likewise.
6259 (poplevel): Likewise.
6260 (force_poplevels): Likewise.
6261 (give_name_to_locals): Likewise.
6262 * check-init.c (check_for_initialization): Likewise.
6263
de7df9eb
JM
62642003-07-24 Jason Merrill <jason@redhat.com>
6265
6266 * java-tree.h: Move boolean_type_node et al to the back end.
6267
c68b0a84
KG
62682003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6269
6270 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6271 casts.
6272
2cc98056
NB
62732003-07-19 Neil Booth <neil@daikokuya.co.uk>
6274
6275 * lang.opt: Don't show -MD_ and -MDD_.
6276
b2e608ca
NB
62772003-07-18 Neil Booth <neil@daikokuya.co.uk>
6278
6279 * lang-options.h: Remove.
6280 * lang.opt: Add help text.
6281
683b1112
KH
62822003-07-15 Kazu Hirata <kazu@cs.umass.edu>
6283
6284 * expr.c: Remove the last argument to expand_assignment().
6285
602a82f3 62862003-07-09 Jan Hubicka <jh@suse.cz>
084c1779
JH
6287
6288 * java-tree.h (DECL_NUM_STMTS): Rename to...
6289 (DECL_ESTIMATED_INSNS): ... this.
6290 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6291 New static functions.
6292 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6293 * parser.y (add_stmt_to_compound): Do not account statements.
6294
671d6ee7
MW
62952003-07-08 Mark Wielaard <mark@klomp.org>
6296
6297 * gcj.texi: CNI now expands to Compiled Native Interface.
6298
c5ffd36c
RO
62992003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6300
6301 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6302
0cea056b
NS
63032003-07-07 Nathan Sidwell <nathan@codesourcery.com>
6304
6305 * expr.c (expand_byte_code): Adjist emit_line_note call.
6306
cb66e385
NB
63072003-07-06 Neil Booth <neil@daikokuya.co.uk>
6308
6309 * lang.c (java_handle_option): Don't handle filenames.
6310
3dce1408
ZW
63112003-07-02 Zack Weinberg <zack@codesourcery.com>
6312
6313 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6314 DIR_SEPARATOR.
6315 Use FILENAME_CMP.
6316 * jcf-write.c: Don't default-define DIR_SEPARATOR.
6317 * jcf.h: Delete COMPARE_FILENAMES definition.
6318
b86f6cd9
NB
63192003-07-02 Neil Booth <neil@daikokuya.co.uk>
6320
6321 * lang.c (java_init_options): Update prototype.
6322
5b030314
NS
63232003-07-01 Nathan Sidwell <nathan@codesourcery.com>
6324
6325 * decl.c (poplevel): Adjust define_label call.
6326
8ce33230
ZW
63272003-06-27 Zack Weinberg <zack@codesourcery.com>
6328
a6d682a0
ZW
6329 * gjavah.c (flag_jni): Make non-static.
6330 * parse-scan.y (ctxp): Make non-static.
6331
8ce33230
ZW
6332 * class.c (build_method_symbols_entry)
6333 * expr.c (get_offset_table_index)
6334 * jcf-parse.c (jcf_parse):
6335 Mark the definition static, matching the forward declaration.
6336
9eee5e72
NB
63372003-06-26 Neil Booth <neil@daikokuya.co.uk>
6338
6339 * lang.c (java_handle_option): Don't check for missing arguments.
6340
1f9cc6db
NS
63412003-06-20 Nathan Sidwell <nathan@codesourcery.com>
6342
6343 * class.c (push_class): Use a location_t to save place.
6344 (emit_register_classes): Set input_location. Adjust
6345 expand_function_end call.
6346 * resource.c (write_resource_constructor): Likewise.
6347 * decl.c (end_java_method): Adjust expand_function_end call.
6348 * parse.y (source_end_java_method): Likewise.
6349
f3f735eb
RA
63502003-06-17 Robert Abeles <rabeles@archaelogic.com>
6351
6352 * lang.c (java_handle_option): Likewise.
6353
7b086b11
NB
63542003-06-16 Neil Booth <neil@daikokuya.co.uk>
6355
6356 * lang.c (java_handle_option): Special-casing of optional
6357 joined arguments no longer needed.
6358 * lang.opt: Update switches that take optional argument.
6359
be43ab4e
NB
63602003-06-15 Neil Booth <neil@daikokuya.co.uk>
6361
6362 * lang.opt: Declare Java.
6363 * lang.c (java_init_options): Update.
6364
d185d268
NB
63652003-06-15 Neil Booth <neil@daikokuya.co.uk>
6366
6367 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6368
cef67dce
NB
63692003-06-14 Neil Booth <neil@daikokuya.co.uk>
6370
6371 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6372 * lang.c (java_handle_option): -MD and -MMD have an underscore.
6373 * lang.opt: -MD and -MMD have an underscore.
6374
ee6b0296
NS
63752003-06-14 Nathan Sidwell <nathan@codesourcery.com>
6376
6377 * class.c (emit_register_classes): Adjust init_function_start
6378 call.
6379 * decl.c (complete_start_java_method): Likewise.
6380 * resource.c (write_resource_constructor): Likewise.
6381
d7b42618
NB
63822003-06-14 Neil Booth <neil@daikokuya.co.uk>
6383
6384 * Make-lang.in: Update to use options.c and options.h.
6385 * lang.c: Include options.h not j-options.h.
6386 (java_handle_option): Abort on unrecognized option.
6387 (java_init_options): Request Java switches.
6388
7fb26bb0
NB
63892003-06-11 Neil Booth <neil@daikokuya.co.uk>
6390
6391 * Make-lang.in: Handle mostlyclean.
6392
265411b6
TT
63932003-06-11 Tom Tromey <tromey@redhat.com>
6394
4a09cbac
TT
6395 * lang.c (java_handle_option): Update dependency_tracking for
6396 OPT_MF case.
6397
265411b6
TT
6398 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6399 empty argument.
6400
dc952677
AH
64012003-06-10 Andrew Haley <aph@redhat.com>
6402
6403 * resource.c (write_resource_constructor): Use expand_expr to
6404 generate the address of the label attached to a resource.
6405 * Make-lang.in (java/resource.o): Add expr.h
6406
e076f71a
AH
64072003-06-10 Andrew Haley <aph@redhat.com>
6408
6409 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6410 (java_decl_ok_for_sibcall): New.
6411
95ca6d8b
NB
64122003-06-09 Neil Booth <neil@daikokuya.co.uk>
6413
6414 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6415 (java/j-options.c, java/j-options.h): New.
6416 * java-tree.h (resource_name, compile_resource_file,
6417 compile_resource_data): Constify.
6418 * jcf-write.c (jcf_write_base_directory): Similarly.
6419 * jcf.h (jcf_write_base_directory): Similarly.
6420 * lang.c: Include j-options.h.
6421 (cl_options_count, cl_options, string_option, java_decode_option,
6422 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6423 process_option_with_no): Remove.
6424 (resource_name): Constify.
6425 (LANG_HOOKS_HANDLE_OPTION): Override.
6426 (java_handle_option): New.
6427 (java_init): Don't call jcf_path_init.
6428 (java_init_options): Call jcf_path_init.
6429 * lang.opt: New.
6430 * resource.c (compile_resource_data, compile_resource_file): Constify.
6431
36f04556
NS
64322003-06-09 Nathan Sidwell <nathan@codesourcery.com>
6433
6434 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6435 (struct lang_decl_func): Add last_line field.
6436 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6437 DECL_SOURCE_LINE_LAST): Remove.
6438 * parse.y (missing_return_error, finish_method_declaration,
6439 lookup_cl, start_artificial_method_body, source_end_java_method,
6440 start_complete_expand_method): Adjust.
6441
f751e9c2
TT
64422003-06-08 Tom Tromey <tromey@redhat.com>
6443
6444 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6445 fno-assume-compiled.
6446
5f158b44
RS
64472003-06-08 Roger Sayle <roger@eyesopen.com>
6448
6449 * builtins.c (define_builtin_type, builtin_types): Delete.
6450 (define_builtin): Rewritten to take just the built-in code,
6451 the function's name, type and fallback library function name.
6452 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6453 (initialize_builtins): Overhaul to define the GCC builtins
6454 used by gcj manually, providing the Java run-time's
6455 implementations as the fallback library function.
6456
f32c53c2
AG
64572003-06-08 Anthony Green <green@redhat.com>
6458
6459 * parse.y (patch_cast): Fix conversions from floating-point to
6460 integral types.
6461
c8b04b13
NB
64622003-06-08 Neil Booth <neil@daikokuya.co.uk>
6463
6464 * Make-lang.in: Update.
6465 * lang.c: Include opts.h. Define cl_options_count and cl_options.
6466
2772ef3e
NB
64672003-06-07 Neil Booth <neil@daikokuya.co.uk>
6468
6469 * lang.c (java_init_options): Update.
6470
602a82f3 64712003-06-05 Jan Hubicka <jh@suse.cz>
8f231b5d
JH
6472
6473 * Make-lang.in: Add support for stageprofile and stagefeedback
6474
4fa26a60
RS
64752003-05-31 Roger Sayle <roger@eyesopen.com>
6476
6477 * lang.c (java_init_options): Prescribe wrap-around two's
6478 complement arithmetic overflow by setting flag_wrapv.
6479
833e1a77
RS
64802003-05-29 Roger Sayle <roger@eyesopen.com>
6481
6482 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6483 (builtin_record): Add an additional builtin_code field to
6484 record which GCC built-in corresponds to the Java function.
6485 (java_builtins): Add new entries for atan, atan2, exp, log,
6486 pow and tan.
6487 (max_builtin, min_builtin, abs_builtin): Perform constant
6488 folding on the resulting tree.
6489 (java_build_function_call_expr): Likewise, perform constant
6490 folding on the resulting tree.
6491 (initialize_builtins): The NULL creators are now allowed in
6492 the java_builtins table, which is now terminated by an entry
6493 with builtin_code == END_BUILTINS.
6494 (check_for_builtin): Likewise. If the matching creator is
6495 NULL, construct the call using java_build_function_call_expr
6496 directly with the decl for the corresponding builtin_code.
6497
24bcc721
NN
64982003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
6499
6500 * win32-host.c: Normalize copyright boilerplate.
6501
90ff44cf
KG
65022003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6503
6504 * parse.y (print_int_node): Use string concatentation on
6505 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6506 function calls into one.
6507
fa6ef813
ZW
65082003-05-13 Zack Weinberg <zack@codesourcery.com>
6509
6510 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6511 fatal_io_error with calls to fatal_error; add ": %m" to the end of
6512 all the affected error messages.
6513
3bec3c0c
RH
65142003-05-13 Richard Henderson <rth@redhat.com>
6515
6516 * class.c (layout_class_method): Set DECL_EXTERNAL.
6517 * decl.c (java_mark_decl_local, java_mark_class_local): New.
6518 * java-tree.h (java_mark_class_local): Declare.
6519 * jcf-parse.c (parse_class_file): Use it.
6520 * parse.y (java_expand_classes): Likewise.
6521
d4b56320
NS
65222003-05-04 Nathan Sidwell <nathan@codesourcery.com>
6523
6524 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6525 * lex.h: #include input.h.
6526 * jv-scan.c (input_filename): Remove.
6527
73cb3b5a
TT
65282003-05-02 Tom Tromey <tromey@redhat.com>
6529
6530 PR java/10491:
6531 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6532 (handle_inner_classes): New function.
6533
fcc8cecb
TT
65342003-05-01 Tom Tromey <tromey@redhat.com>
6535
6536 PR java/10459:
6537 * parse.y (finish_for_loop): Do nothing if update expression is a
6538 EXPR_WFL_NODE wrapping nothing.
6539 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6540
6060edcb
NS
65412003-05-02 Nathan Sidwell <nathan@codesourcery.com>
6542
6543 * lex.h (input_lineno): Remove declaration.
6544 * parse-scan.y: #include input.h.
6545 (input_filename): Remove declaration.
6546 (input_location): Add definition.
6547 (input_line): Remove definition.
6548
3489e061
NS
65492003-05-01 Nathan Sidwell <nathan@codesourcery.com>
6550
6551 * lex.h (lineno): Rename to ...
6552 (input_line): ... here
6553 * parse-scan.y (lineno): Rename to ...
6554 (input_line): ... here.
6555 (reset_report): Rename lineno to input_line.
6556 * check-init.c (check_init): Likewise.
6557 * class.c (push_class): Likewise.
6558 * decl.c (complete_start_java_method, end_java_method): Likewise.
6559 * expr.c (expand_byte_code): Likewise.
6560 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6561 * jcf-write.c (generate_bytecode_insns): Likewise.
6562 * lex.c (java_init_lex, java_allocate_new_line,
6563 do_java_lex): Likewise.
6564 * parse.h (YYNOT_TWICE): Likewise.
6565 * parse.y (empty_statement, expression_statement,
6566 java_pop_parser_context, java_parser_context_save_global,
6567 yyerror, register_fields, method_header, safe_layout_class,
6568 find_in_imports_on_demand, create_artificial_method,
6569 source_end_java_method, start_complete_expand_method,
6570 build_thisn_assign, java_complete_lhs,
6571 maybe_absorb_scoping_block): Likewise.
6572
ef963bc8
ME
65732003-04-20 Mohan Embar <gnustuff@thisiscool.com>
6574
6575 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6576 '/' when computing java source filename
6577
e6311b9e
TT
65782003-04-13 Tom Tromey <tromey@redhat.com>
6579
6580 * gjavah.c (print_c_decl): Indentation fix.
6581
dcf92453
ZW
65822003-04-12 Zack Weinberg <zack@codesourcery.com>
6583
6584 * class.c (make_field_value, make_method_value, get_dispatch_table)
6585 (make_class_data, emit_offset_symbol_table)
6586 * constants.c (build_constants_constructor)
6587 * java-tree.h (START_RECORD_CONSTRUCTOR)
6588 * parse.y (maybe_build_array_element_wfl):
6589 Use build_constructor.
6590
04a0be36
EB
65912003-04-10 Eric Blake <ebb9@email.byu.edu>
6592
6593 PR java/10253:
6594 * parse.y (string_convert_int_cst): Always use at least one digit
6595 in string conversion. Remove ASCII dependence.
6596 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6597
72f339d2
AH
65982003-03-16 Mohan Embar <gnustuff@thisiscool.com>
6599
6600 * Make-lang.in: added win32-host.c
6601 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6602 resolves to open() on non-Win32 platforms and
6603 Win32-specific jcf_open_exact_case() on Win32
6604 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6605 when trying .java and .class files
6606 * win32-host.c: added to repository. Defines
6607 Win32-specific jcf_open_exact_case()
6608
66092003-04-10 Andrew Haley <aph@redhat.com>
6610
6611 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6612 (maybe_free_localvar): Renamed from localvar_free.
6613 Add new arg, really.
6614 (generate_bytecode_insns): Set new variable, jsrs.
6615 Only free local vars if no jsr insns have been emittted.
6616 Call maybe_free_localvar, not localvar_free.
6617
438f63a8
JM
66182003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
6619
6620 * gcj.texi: Remove @ at start of file.
6621
dcb0eee2
TT
66222003-03-25 Tom Tromey <tromey@redhat.com>
6623
6624 * parse.y (create_interface): Call CHECK_DEPRECATED.
6625
62c9aa5f
ZW
66262003-03-23 Zack Weinberg <zack@codesourcery.com>
6627
6628 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6629
649eaf9b
ZW
66302003-03-21 Zack Weinberg <zack@codesourcery.com>
6631
6632 * javaop.h (jfloat, jdouble): Make them structures mirroring
6633 the bit fields of IEEE float and double respectively.
6634 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6635 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6636 (union Word, union DWord): Delete.
6637 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6638
6639 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6640 D_NAN_MASK): Delete.
6641 (jni_print_float, jni_print_double): New. Generate
6642 hexadecimal floating constants.
6643 (print_field_info): Use jni_print_float/double.
6644
6645 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
6646 finite floating point numbers for output; special case
6647 non-finite floats.
6648
2bd3ecad
NN
66492003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
6650
6651 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6652 Replace 0 and 1 with true and false in return statements.
6653
b25a23bd
TT
66542003-03-19 Tom Tromey <tromey@redhat.com>
6655
6656 * lex.c (do_java_lex): Renamed from java_lex.
6657 (java_lex): New function.
6658 Include timevar.h.
6659
2f29e5e8
TT
66602003-03-13 Tom Tromey <tromey@redhat.com>
6661
6662 * parse.y (resolve_inner_class): Error if qualifier is a primitive
6663 type.
6664
68566610
AH
66652003-03-04 Andrew Haley <aph@redhat.com>
6666
649eaf9b
ZW
6667 * gjavah.c (is_first_data_member): New global variable.
6668 (print_c_decl): If it's the first data member, align it as the
6669 superclass.
6670 (process_file): Set is_first_data_member.
68566610 6671
8b8e6c64
TT
66722003-03-11 Tom Tromey <tromey@redhat.com>
6673
6674 * parse.y (resolve_field_access): Initialize class if field is
6675 found in another static field.
6676 * expr.c (build_class_init): Don't optimize out initialization of
6677 implemented interface.
6678
3d874dea
AH
66792003-03-11 Andrew Haley <aph@redhat.com>
6680
6681 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6682 warning.
6683
630287af
RM
66842003-03-10 Ranjit Mathew <rmathew@hotmail.com>
6685
6686 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6687 and DIR_SEPARATOR_2 for a target.
6688 Correct minor typos.
6689
6690 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6691 and DIR_SEPARATOR_2 for a target into account.
6692
4bfec483
NB
66932003-03-08 Neil Booth <neil@daikokuya.co.uk>
6694
6695 * lang.c (java_init): Update prototype, move code to java_post_options.
6696 (java_post_options): Similarly.
6697
530d4230
RM
66982003-03-05 Ranjit Mathew <rmathew@hotmail.com>
6699
6700 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6701 compare file name components depending on the case-sensitivity
6702 or otherwise of the host file system.
6703
6704 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6705 "strcmp" to compare file name components.
6706 Use IS_DIR_SEPARATOR instead of comparing directly against
6707 DIR_SEPARATOR.
649eaf9b 6708 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
530d4230
RM
6709 comparing directly against DIR_SEPARATOR.
6710
5993642d
TT
67112003-03-04 Tom Tromey <tromey@redhat.com>
6712
6713 * Make-lang.in (java.tags): New target.
6714
08291658
RS
67152003-03-01 Roger Sayle <roger@eyesopen.com>
6716
6717 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6718 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6719
11522327
TT
67202003-03-01 Tom Tromey <tromey@redhat.com>
6721
6722 * parse.y (jdep_resolve_class): Only check deprecation if we found
6723 a decl.
6724
0ea05c0d
TT
67252003-02-28 Tom Tromey <tromey@redhat.com>
6726
6727 PR java/9695:
6728 * class.c (maybe_layout_super_class): Always pass a WFL to
6729 do_resolve_class.
6730 * parse.y (do_resolve_class): Updated comment to explain
6731 parameters.
6732
49b973cb
TT
67332003-02-26 Tom Tromey <tromey@redhat.com>
6734
6735 * jcf-write.c (generate_classfile): Check whether class is
6736 deprecated before writing attribute count.
6737
b052d8ee
RS
67382003-02-25 Roger Sayle <roger@eyesopen.com>
6739
6740 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6741 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
649eaf9b 6742
f94ae540
TT
67432003-02-23 Tom Tromey <tromey@redhat.com>
6744
6745 * lang-options.h: Added -Wdeprecated.
6746 * gcj.texi (Warnings): Document -Wdeprecated.
6747 * java-tree.h (flag_deprecated): Declare.
6748 * lang.c (lang_W_options): Added deprecated.
6749 (flag_deprecated): New global.
6750 * chartables.h: Rebuilt.
6751 * gen-table.pl (process_one): Look at whitespace.
6752 (print_tables): Define LETTER_SPACE, LETTER_MASK.
6753 * parse.h (CLEAR_DEPRECATED): New macro.
6754 (CHECK_DEPRECATED_NO_RESET): New macro.
6755 * jcf-parse.c (handle_deprecated): New function.
6756 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6757 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6758 * parse.y (resolve_type_during_patch): Check deprecation.
6759 (jdep_resolve_class): Likewise.
6760 (process_imports): Likewise.
6761 (resolve_expression_name): Likewise.
6762 (check_deprecation): Strip arrays from decl. Check
6763 flag_deprecated.
6764 (patch_method_invocation): Also check the particular constructor
6765 for deprecation.
6766 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6767 * jcf-write.c (append_deprecated_attribute): New function.
6768 (generate_classfile): Generate deprecated attribute when
6769 appropriate.
6770 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
6771 (java_lex) [case '*']: Simplify logic.
6772 (java_start_char_p): Use LETTER_MASK.
6773 (java_part_char_p): Likewise.
6774 (java_space_char_p): New function.
6775
dbbf88d1
NS
67762003-02-20 Nathan Sidwell <nathan@codesourcery.com>
6777
6778 Change base class access representation.
6779 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6780 (add_interface_do): Likewise.
6781
697ec326
RM
67822003-02-12 Ranjit Mathew <rmathew@hotmail.com>
6783
649eaf9b 6784 * decl.c (java_init_decl_processing): Change
697ec326
RM
6785 soft_lookupjnimethod_node to reflect the change in
6786 signature of _Jv_LookupJNIMethod in libjava/jni.cc
6787 * expr.c (build_jni_stub): Calculate and pass the size
6788 on the stack of the arguments to a JNI function. Use
649eaf9b 6789 new target macro MODIFY_JNI_METHOD_CALL to allow a
697ec326
RM
6790 target to modify the call to a JNI method.
6791
afc432a9
RS
67922003-02-08 Roger Sayle <roger@eyesopen.com>
6793
6794 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6795 instead of basename to avoid compiler warnings on Tru64.
6796
b3a8389d
JM
67972003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
6798
6799 * gcj.texi: Update to GFDL 1.2.
6800
2d7b3505
AH
68012003-01-31 Andrew Haley <aph@redhat.com>
6802
6803 * parse.y (java_expand_classes): Scan the whole class list looking
6804 for access methods that haven't yet been expanded.
6805
7d503466
AB
68062003-01-31 Adrian Bunk <bunk@fs.tum.de>
6807
6808 Fix for java/4269:
6809
6810 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6811 to fix bootstrap on sparc-unknown-netbsdelf1.5.
6812 * jcf-parse.c: Likewise.
6813
36da0e78
MW
68142003-01-31 Mark Wielaard <mark@klomp.org>
6815
6816 * gjavah.c (throwable_p): Allocate 1 more byte for string.
6817
1824b90d
NS
68182003-01-31 Nathan Sidwell <nathan@codesourcery.com>
6819
6820 * class.c (make_class): Use BINFO_ELTS.
6821 (set_super_info): Likewse.
6822 (add_interface_do): Likewise.
6823
7e278bae
TT
68242003-01-30 Tom Tromey <tromey@redhat.com>
6825
6826 * jcf-parse.c (read_class): Update identifier's class value if it
6827 changed during parsing.
6828
65eb9b87
LR
68292003-01-30 Loren James Rittle <ljrittle@acm.org>
6830
6831 * Make-lang.in (po-generated): Find the targets in $(parsedir).
6832 Propagate change to all other rules as required.
6833 (java/parse-scan.o): Add explicit dependency on
6834 $(parsedir)/java/parse-scan.c .
6835
c78f2b91
TT
68362003-01-29 Tom Tromey <tromey@redhat.com>
6837
6838 * parse.y (patch_assignment): Only transform the rhs of an
6839 assignment when compiling to native.
6840
0d42c3c2
TT
68412003-01-28 Tom Tromey <tromey@redhat.com>
6842
6843 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6844
82b22c42
TT
68452003-01-28 Tom Tromey <tromey@redhat.com>
6846
6847 * lex.c (java_lex): Don't include UEOF as part of token.
6848 (java_read_unicode): Error if \u sequence prematurely terminated.
6849
6a807d35
TT
68502003-01-27 Tom Tromey <tromey@redhat.com>
6851
6852 * parse.y (java_check_regular_methods): Check for construct after
6853 checking types in throws clause.
6854
c2c98445
TT
68552003-01-24 Tom Tromey <tromey@redhat.com>
6856
6857 * class.c (build_static_field_ref): Only a String or numeric field
6858 can fold to a constant.
6859
8bef0925
TT
68602003-01-23 Tom Tromey <tromey@redhat.com>
6861
6862 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6863 file name in resource buffer.
6864
1f369e60
TT
68652003-01-23 Tom Tromey <tromey@redhat.com>
6866
6867 * expr.c (build_known_method_ref): Use method's context to find
6868 method table index.
6869
0f0ff6ec
TT
68702003-01-23 Tom Tromey <tromey@redhat.com>
6871
6872 * constants.c (set_constant_entry): Allocated cleared memory.
6873
850ccfae
TT
68742003-01-22 Tom Tromey <tromey@redhat.com>
6875
6876 * java-tree.h: Don't use PARAMS.
6877 * resource.c: Add prototypes for all functions.
6878 (write_resource_constructor): Use `const char *' to avoid
6879 warning.
6880
e00d2127
NN
68812003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
6882
6883 * jcf-parse.c (process_zip_dir): Remove unused variable.
6884
906c7c32
TT
68852003-01-22 Tom Tromey <tromey@redhat.com>
6886
6887 * expr.c (build_invokeinterface): Abort if method's context is not
6888 an interface.
6889
3e895978
TT
68902003-01-22 Tom Tromey <tromey@redhat.com>
6891
6892 * gcj.texi (Input and output files): Mention non-class entries.
6893 * decl.c (java_init_decl_processing): Call
6894 init_resource_processing.
6895 * java-tree.h (compile_resource_data, write_resource_constructor,
6896 compile_resource_file, init_resource_processing): Declare.
6897 * config-lang.in (gtfiles): Added resource.c.
6898 * Make-lang.in (gt-java-resource.h): New target.
6899 (JAVA_OBJS): Added resource.o.
6900 (java/resource.o): New target.
6901 * resource.c: New file.
6902 * class.c (compile_resource_file): Moved to resource.c.
6903 (registerResource_libfunc): Likewise.
6904 (utf8_decl_list): Mark with GTY; now static.
6905 * jcf-parse.c (classify_zip_file): New function.
6906 (parse_zip_file_entries): Use it; compile .properties files.
6907 (process_zip_dir): Use classify_zip_file and compute_class_name.
6908 Don't write class name into zip directory.
6909 (java_parse_file): Call write_resource_constructor.
6910 (compute_class_name): New function.
6911 * jcf-io.c (read_zip_member): Reindented.
6912
5c64ead4
TT
69132003-01-21 Tom Tromey <tromey@redhat.com>
6914
6915 * class.c (supers_all_compiled): New function.
6916 (make_class_data): Use it.
6917
9179646e
TT
69182003-01-21 Tom Tromey <tromey@redhat.com>
6919
6920 * parse.y (method_header): Native method can't be strictfp.
6921 No method can be transient or volatile.
6922
dd859b8a
KG
69232003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6924
6925 Make-lang.in (jvspec.o-warn): Add -Wno-error.
6926
634661fe
KH
69272003-01-18 Kazu Hirata <kazu@cs.umass.edu>
6928
6929 * check-init.c: Fix comment typos.
6930 * class.c: Likewise.
6931 * constants.c: Likewise.
6932 * decl.c: Likewise.
6933 * except.c: Likewise.
6934 * expr.c: Likewise.
6935 * java-except.h: Likewise.
6936 * java-tree.h: Likewise.
6937 * javaop.h: Likewise.
6938 * jcf-dump.c: Likewise.
6939 * jcf-io.c: Likewise.
6940 * jcf-parse.c: Likewise.
6941 * jcf-write.c: Likewise.
6942 * lang.c: Likewise.
6943 * mangle.c: Likewise.
6944 * typeck.c: Likewise.
6945 * verify.c: Likewise.
6946
a1fb4e91
KG
69472003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6948
6949 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6950 * jcf-write.c: Include "tm_p.h".
6951
1faad0fc
KG
69522003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6953
6954 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6955
fc555370
KG
69562003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6957
f981519d
KG
6958 * builtins.c (java_build_function_call_expr): Renamed from
6959 build_function_call_expr. All callers changed.
6960
0334ef47
KG
6961 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6962 * jcf-parse.c: Include tm_p.h.
6963
fc555370
KG
6964 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6965 warning.
6966
d9bbf3f7
TT
69672003-01-14 Tom Tromey <tromey@redhat.com>
6968
6969 * class.c (make_class_data): Check that super is compiled before
6970 building class reference to it.
6971
47411341
AH
69722003-01-14 Andrew Haley <aph@redhat.com>
6973
6974 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
649eaf9b 6975 varargs function -- correct.
47411341 6976
e5c9ced4
AH
69772003-01-14 Andrew Haley <aph@redhat.com>
6978
6979 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6980
50cbc605
AH
69812003-01-14 Andrew Haley <aph@redhat.com>
6982
6983 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6984 varargs function -- correct.
6985
6986 * parse.y (patch_assignment): Copy the rhs of an assignment into a
6987 temporary if the RHS is a reference.
6988
0a2f0c54
KG
69892003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6990
b3504bc1
KG
6991 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6992 * keyword.h: Regenerated.
6993
0a2f0c54
KG
6994 * All Files: Convert to ISO C style function definitions.
6995
43a4a12b
NN
69962003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6997
6998 * parse.y (check_pkg_class_access): ANSIfy definition.
6999
77d3109b
KG
70002003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7001
d12689d2
KG
7002 * decl.c, parse-scan.y, parse.y: Don't cast return value of
7003 xmalloc et al.
7004
77d3109b
KG
7005 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7006
17211ab5
GK
70072003-01-09 Geoffrey Keating <geoffk@apple.com>
7008
7009 Merge from pch-branch:
7010
7011 2002-12-02 Geoffrey Keating <geoffk@apple.com>
7012
7013 * Make-lang.in (java/gjavah.o): Update dependencies.
7014 * gjavah.c: Include ggc.h.
7015
7016 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
7017
7018 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7019 (JCFDUMP_OBJS): Add ggc-none.o.
7020 (java/jcf-dump.o): Depend on GGC_H.
7021 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7022 CPool substructures.
7023 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7024 * jcf-dump.c: Include ggc.h.
7025
7026 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7027
7028 * jcf.h (union cpool_entry): New.
7029 (struct CPool): Use gengtype to mark. Change field 'data' to be
7030 an array of unions.
7031 (struct JCF): Use gengtype to mark.
7032 (CPOOL_UINT): Update for new cpool_entry type.
7033 (CPOOL_USHORT1): Likewise.
7034 (CPOOL_USHORT2): Likewise.
7035 (CPOOL_FINISH): Use GC to free cpool subfields.
7036 * parse.h (struct parser_ctxt): Mark field current_jcf.
7037 * lex.c (java_init_lex): Use GC to allocate struct JCF.
7038 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7039 (main_jcf): Use gengtype to mark.
7040 (ggc_mark_jcf): Delete.
7041 (get_constant): Update for new cpool_entry type.
7042 (give_name_to_class): Likewise.
7043 (get_class_constant): Likewise.
7044 (init_outgoing_cpool): Use GGC to allocate struct CPool.
7045 (java_parse_file): Use GGC to allocate struct JCF.
7046 (init_jcf_parse): Don't call ggc_add_root.
7047 * jcf-reader.c (jcf_parse_constant_pool): Update for new
7048 cpool_entry type.
7049 * java-tree.h (current_jcf): Use gengtype to mark.
7050 (CPOOL_UTF): Update for new cpool_entry type.
7051 (outgoing_cpool): Use gengtype to mark.
7052 (struct lang_type): GC struct JCF and struct CPool.
7053 * config-lang.in (gtfiles): Add jcf.h.
7054 * constants.c (find_tree_constant): New.
7055 (set_constant_entry): Allocate cpool subfields using GGC. Update
7056 for new cpool_entry type.
7057 (find_constant1): Update for new cpool_entry type.
7058 (find_constant2): Likewise.
7059 (find_utf8_constant): Use find_tree_constant.
7060 (find_class_or_string_constant): Remove unnecessary cast to jword.
7061 Update for new cpool_entry type.
7062 (count_constant_pool_bytes): Update for new cpool_entry type.
7063 (write_constant_pool): Likewise.
7064 (alloc_name_constant): Use find_tree_constant.
7065 (build_constants_constructor): Update for new cpool_entry type.
7066
7067 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
7068
7069 * parse.y (mark_parser_ctxt): Delete.
7070 (goal): Don't use ggc_add_root.
7071 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7072 (java_pop_parser_context): Let GC free parser_ctxt.
7073 (java_parser_context_resume): Likewise.
7074 * parse.h (struct parser_ctxt): Use gengtype to mark.
7075 (ctxp): Likewise.
7076 (ctxp_for_generation): Likewise.
7077 * lex.h (struct java_lc_s): Mark for gengtype.
7078 (java_lexer): Rearrange for gengtype.
7079 * config-lang.in (gtfiles): Add lex.h, parse.h.
7080
b3339cf7
KG
70812003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7082
d2097937
KG
7083 * All Files: Remove PARAMS macro.
7084
6ff2fe39
KG
7085 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7086 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7087 `__STDC__' macros.
7088
b3339cf7
KG
7089 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7090 VA_CLOSE.
7091
8a4c5898
CC
70922003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
7093
7094 * Make-lang.in (java.install-common, java.uninstall,
7095 java.install-info, java.install-man): Prepend $(DESTDIR)
7096 to destination paths in all (un)installation commands.
7097 (java.install-common): Rewrite $(LN) command to support
7098 DESTDIR with "ln" as well as with "ln -s".
7099
2f23f5c1
NN
71002003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
7101
7102 * java-tree.h: Protect against multiple inclusion.
7103
b47ffb8f
TT
71042003-01-07 Tom Tromey <tromey@redhat.com>
7105
7106 * class.c (add_assume_compiled): Don't adjust parent if we're
7107 already at the root of tree.
7108
c7c50494
KG
71092003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7110
7111 * lang.c (dump_compound_expr): Prototype.
7112
f3ce4aba
TT
71132003-01-03 Tom Tromey <tromey@redhat.com>
7114
7115 Fix for PR java/8712:
7116 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7117 when simply checking against `null'.
7118
60db58b2
TT
71192003-01-03 Tom Tromey <tromey@redhat.com>
7120
0320cac3
TT
7121 * gcj.texi (Standard Properties): Document http.proxyHost and
7122 http.proxyPort.
7123
60db58b2
TT
7124 * gcj.texi (GNU Classpath Properties): Document new properties.
7125
43c6a96a
SB
71262003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
7127
7128 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7129 java/lang-options.h, java/mangle.c, java/mangle_name.c,
7130 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7131
f309ff0a
SB
71322003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7133
7134 * Make-lang.in, boehm.c, buffer.c,
7135 buffer.h, builtins.c, class.c,
7136 config-lang.in, constants.c,
7137 convert.h, decl.c, except.c,
7138 expr.c, java-except.h,
7139 java-tree.h, javaop.def,
7140 jcf-parse.c, jcf-write.c,
7141 jv-scan.c, jvgenmain.c,
43c6a96a 7142 jvspec.c, keyword.gperf,
f309ff0a
SB
7143 keyword.h, lang-options.h,
7144 lang-specs.h, lang.c, lex.c,
7145 lex.h, mangle.c, mangle_name.c,
7146 parse-scan.y, parse.h, parse.y,
7147 typeck.c, verify.c, xref.c,
7148 xref.h: Replace "GNU CC" with
7149 "GCC" in the copyright header.
7150
7151 * check-init.c, gjavah.c, javaop.h,
7152 jcf-depend.c, jcf-dump.c, jcf-io.c,
7153 jcf-path.c, jcf-reader.c, jcf.h,
7154 zextract.c, zipfile.h: These files are
7155 "part of GCC". Also say "GCC" not "GNU CC".
7156
9a280a6e
DD
71572002-12-30 DJ Delorie <dj@redhat.com>
7158
e2f45c30 7159 * Make-lang.in: Protect against texi2pod/pod2man failing.
9a280a6e 7160
bdefb2ab
JM
71612002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
7162
7163 * gcj.texi: Use @copying.
7164
239b7dea
MM
71652002-12-27 Mark Mitchell <mark@codesourcery.com>
7166
7167 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7168 print_cxx_classname.
7169 (print_cxx_classname): Add add_scope parameter.
7170 (print_class_decls): Do not emit a semicolon after the extern
7171 "Java" block.
43c6a96a 7172 (process_file): Adjust calls to print_cxx_classname.
239b7dea 7173
df82908a
JM
71742002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7175
7176 * gcj.texi: Include Cover Texts in man page.
7177
d3ab697b
JS
71782002-12-23 Jeff Sturm <jsturm@one-point.com>
7179
7180 * class.c (build_static_field_ref): Check FIELD_FINAL.
7181
7182 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7183 instead of current_constant_pool_data_ref.
7184 * java-tree.h (current_constant_pool_data_ref): Undefine.
7185 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7186 * jcf-parse.c (init_outgoing_cpool): Don't initialize
7187 current_constant_pool_data_ref.
7188
7189 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7190 not build_internal_class_name.
7191
7192 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7193 Use it when class ref isn't certain to be compiled.
7194
46d40353
JM
71952002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
7196
7197 * gcj.texi: Include gcc-common.texi.
7198 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7199 $(srcdir)/doc/include/gcc-common.texi.
7200
fba1caab
AG
72012002-12-22 Anthony Green <green@redhat.com>
7202
7203 * gcj.texi (Limitations): Add note about org.xml.sax and
7204 org.w3c.dom.
7205
913746e3
TT
72062002-12-20 Tom Tromey <tromey@redhat.com>
7207
7208 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7209 where minimum case value is Integer.MIN_VALUE.
7210 Fixes PR java/8955.
7211
71d082af
AH
72122002-12-18 Andrew Haley <aph@redhat.com>
7213
7214 * parse.y (patch_invoke): Force evaluation order when `check' is
7215 set. For PR libgcj/8945.
7216
7a04c51b
MM
72172002-12-16 Mark Mitchell <mark@codesourcery.com>
7218
7219 * gcj.texi: Change version number to 3.4.
7220
0cc1565a 72212002-12-05 Ranjit Mathew <rmathew@hotmail.com>
649eaf9b 7222 Andrew Haley <aph@redhat.com>
0cc1565a
RM
7223
7224 * parse.y (source_end_java_method): Remove custom encoding of line
7225 numbers for a function decl before passing it to the back end.
7226
421f9e60
AH
72272002-12-03 Andrew Haley <aph@redhat.com>
7228
7229 * class.c (make_class_data): New field, "chain".
7230 * decl.c (java_init_decl_processing): Likewise.
7231
6b55b27f
TT
72322002-12-02 Tom Tromey <tromey@redhat.com>
7233
7234 For PR java/8740:
7235 * parse.y (do_resolve_class): Handle qualified name via
7236 recursion.
7237
4977bab6
ZW
72382002-11-30 Zack Weinberg <zack@codesourcery.com>
7239
7240 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7241 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7242 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7243 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7244 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7245 Include coretypes.h and tm.h.
7246 * Make-lang.in: Update dependencies.
7247
d1aed877
KG
72482002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7249
7250 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7251
b4bbc8b7
DN
72522002-11-25 Diego Novillo <dnovillo@redhat.com>
7253
7254 * jcf-reader.c: Don't expand JCF_readu4 inside the
7255 expansion of JCF_SKIP.
7256
4977bab6
ZW
72572002-11-25 Diego Novillo <dnovillo@redhat.com>
7258
7259 * jcf-reader.c: Don't expand JCF_readu4 inside the
7260 expansion of JCF_SKIP.
7261
dd06be9e
TT
72622002-11-22 Tom Tromey <tromey@redhat.com>
7263
7264 * parse.y (patch_binop): Cast right hand side of shift expression
7265 to `int'. Fixes PR java/8676.
7266
34744d4e
RM
72672002-11-22 Ranjit Mathew <rmathew@hotmail.com>
7268 Andrew Haley <aph@redhat.com>
7269
7270 * gcc/java/jcf-write.c (write_classfile): Remove target
7271 class file, if it exists, before renaming the temporary
7272 class file to it.
7273
f3226a90
JT
72742002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
7275
7276 * jvspec.c (lang_specific_spec_functions): New.
7277
5602b49d
TT
72782002-11-18 Tom Tromey <tromey@redhat.com>
7279
7280 Fix for PR java/7912:
7281 * expr.c (can_widen_reference_to): Allow cast of array to
7282 Cloneable or Serializable.
7283 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7284 (java_io_serializable_identifier_node): Likewise.
7285 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7286 (valid_ref_assignconv_cast_p): Use new identifier nodes.
7287 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7288 java_io_serializable.
7289 * decl.c (java_init_decl_processing): Initialize
7290 java_lang_cloneable_identifier_node and
7291 java_io_serializable_identifier_node.
7292 (java_lang_cloneable_identifier_node): New global.
7293 (java_io_serializable_identifier_node): Likewise.
7294
a92cb0c3
JMH
72952002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
7296
7297 * buffer.c: Remove unnecessary casts.
7298 * check-init.c: Likewise.
7299 * class.c: Likewise.
7300 * constants.c: Likewise.
7301 * decl.c: Likewise.
7302 * except.c: Likewise.
7303 * gjavah.c: Likewise.
7304 * jcf-io.c: Likewise.
7305 * jcf-parse.c: Likewise.
7306 * jcf-path.c: Likewise.
7307 * jvspec.c: Likewise.
7308 * lang.c: Likewise.
7309 * lex.c: Likewise.
7310 * verify.c: Likewise.
7311
5bd717f1
TT
73122002-11-06 Tom Tromey <tromey@redhat.com>
7313
7314 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7315 a JNI header.
7316
c034b453
TT
73172002-11-05 Tom Tromey <tromey@redhat.com>
7318
7319 Fix for PR java/6388.
7320 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7321 * java-tree.h (enum java_tree_index): New values
7322 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7323 (decimal_int_max, decimal_long_max): New defines.
7324 * lex.c (yylex): Rewrote range checking. Sign extend literals.
7325 (error_if_numeric_overflow): Rewrote range checking.
7326 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7327 decimal_long_max.
7328
21140beb
TT
73292002-11-02 Tom Tromey <tromey@redhat.com>
7330
60b68525
TT
7331 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7332
21140beb
TT
7333 * class.c (make_method_value): Put class name, not signature, into
7334 `throws' field. For PR java/8415.
7335
3752ac08
TT
73362002-10-24 Tom Tromey <tromey@redhat.com>
7337
7338 * gcj.texi (Invoking gij): Document --showversion.
7339 (Standard Properties): java.library.path now set.
7340
0d3911c9
TT
73412002-10-23 Tom Tromey <tromey@redhat.com>
7342
7343 * gjavah.c (decode_signature_piece): In JNI mode, print
7344 `jobjectArray' when array depth is nonzero.
7345 Fixes PR java/8296.
7346
c1ddb5c8
AH
73472002-10-15 Andrew Haley <aph@redhat.com>
7348
7349 * parse.y (patch_invoke): Call force_evaluation_order on a static
7350 arg list.
7351 (resolve_qualified_expression_name): Call force_evaluation_order
7352 on a arg list that is part of a Qualified Expression Name.
7353
7354 * lang.c (dump_compound_expr): New.
7355 (java_dump_tree): New.
7356
63bb20d4
RM
73572002-10-20 Ranjit Mathew <rmathew@hotmail.com>
7358
7359 * gcj.texi: Added item describing the GCJ runtime property
7360 "gnu.gcj.progname".
7361
ba0bb02d
RH
73622002-10-15 Richard Henderson <rth@redhat.com>
7363
7364 * jcf-parse.c (get_constant): Fix type warning.
7365
dbd1e2d8
AH
73662002-10-15 Andrew Haley <aph@redhat.com>
7367
7368 * java-tree.h (java_inlining_merge_static_initializers): Declare.
7369 (java_inlining_map_static_initializers): Declare.
7370
3eb429b2
AH
73712002-10-14 Andrew Haley <aph@redhat.com>
7372
7373 * tree-inline.c (remap_block): All local class initialization
7374 flags go in the outermost scope.
7375 (expand_call_inline): Call java_inlining_map_static_initializers.
7376 (expand_call_inline): Call java_inlining_merge_static_initializers.
7377 * java/lang.c (merge_init_test_initialization): New.
7378 (java_inlining_merge_static_initializers): New.
7379 (inline_init_test_initialization): New.
7380 (java_inlining_map_static_initializers): New.
7381
37d2b7e2
MW
73822002-10-11 Mark Wielaard <mark@klomp.org>
7383
7384 * gcj.texi (Compatibility): Add Limitations and Extensions section.
7385
7bdfd72e
KG
73862002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7387
7388 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7389
c6449a1d
KG
73902002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7391
7392 * parse.y (merge_string_cste): Add parentheses around & within |.
7393
8f6d2e96
TT
73942002-10-08 Tom Tromey <tromey@redhat.com>
7395
7396 * parse.y (variable_declarator_id): Simplify error path for
7397 array declarator error. For PR java/8003.
7398
36624850
ZW
73992002-10-08 Zack Weinberg <zack@codesourcery.com>
7400
7401 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7402 bug_report_url.
7403
ce5bb293
AH
74042002-10-08 Andrew Haley <aph@redhat.com>
7405
7406 * parse.y (attach_init_test_initialization_flags): Check for
7407 error_mark_node.
7408
36624850 74092002-10-07 Anthony Green <green@redhat.com>
6a921942 7410
36624850 7411 * parse.y (merge_string_cste): Fix bug in string concatenation.
6a921942 7412
f42ee52f
MK
74132002-10-03 Michael Koch <konqueror@gmx.de>
7414
7415 * gcj.texi (Standard properties):
7416 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7417
f963b5d9
RS
74182002-10-02 Roger Sayle <roger@eyesopen.com>
7419
7420 PR optimization/6627
7421 * lang.c (java_init): If storing the vbit in function
7422 pointers, ensure that force_align_functions_log is atleast
7423 one to aid compatability with g++ vtables.
7424
6f7e9e94
NS
74252002-10-01 Nathan Sidwell <nathan@codesourcery.com>
7426
7427 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7428 foul of type-based aliasing.
7429
71dff728
AG
74302002-09-30 Anthony Green <green@redhat.com>
7431
7432 * gcj.texi (Invoking jv-scan): Fix texinfo.
7433
acc59b85
AG
74342002-09-28 Anthony Green <green@redhat.com>
7435
7436 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7437 (Code Generation): Add -fno-assert documentation.
7438 * jv-scan.c (flag_assert): New global.
7439 (options): Add assert option.
7440 (help): Add --no-assert documentation.
7441 * parse-scan.y (flag_assert): New global.
7442 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7443 (flag_assert): New global.
7444 * java-tree.h (flag_assert): New global.
7445 * lex.c (java_lex): Obey flag_assert.
7446 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7447 calling cc1.
7448
fc5295fa
AH
74492002-09-26 Andrew Haley <aph@redhat.com>
7450
7451 * expr.c (build_java_array_length_access): Check for null pointer.
7452 * expr.c (expand_java_arrayload): Likewise.
7453
aa2046c4
RH
74542002-09-21 Richard Henderson <rth@redhat.com>
7455
36624850 7456 * jcf-parse.c (get_constant): Decode from IEEE no matter
aa2046c4
RH
7457 what the target format.
7458
ee142fe7
KH
74592002-09-20 Kazu Hirata <kazu@cs.umass.edu>
7460
7461 * ChangeLog: Follow spelling conventions.
7462 * class.c: Likewise.
7463 * decl.c: Likewise.
7464 * expr.c: Likewise.
7465 * gjavah.c: Likewise.
7466 * java-tree.h: Likewise.
7467 * jcf-dump.c: Likewise.
7468 * jcf-parse.c: Likewise.
7469 * jvspec.c: Likewise.
7470 * lang.c: Likewise.
7471 * mangle.c: Likewise.
7472 * parse.y: Likewise.
7473
6a022513
TT
74742002-09-17 Tom Tromey <tromey@redhat.com>
7475
7476 * lex.c (java_read_unicode_collapsing_terminators): Handle case
7477 where \r appears at EOF. Fixes PR java/7950.
7478
4977bab6
ZW
74792002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
7480
7481 * jvspec.c (lang_specific_driver): Remove unused variable.
7482
36a5eadd
GK
74832002-09-16 Geoffrey Keating <geoffk@apple.com>
7484
7485 * java-tree.h (union lang_tree_node): Add chain_next option.
7486
efdc7e19
RH
74872002-09-16 Richard Henderson <rth@redhat.com>
7488
7489 * jcf-parse.c (get_constant): Runtime check for IEEE format;
7490 use new real.h interface.
7491 * jcf-write.c (find_constant_index): Use new real.h interface.
7492 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7493
6522685d
KH
74942002-09-15 Kazu Hirata <kazu@cs.umass.edu>
7495
25facd31 7496 * lang.c: Follow spelling conventions.
6522685d 7497
6e471ea7
PB
74982002-09-11 Per Bothner <per@bothner.com>
7499
7500 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
7501 constant to the type of the field.
7502 (java_complete_tree): Remove now-redundant code.
7503
7504 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
7505
23114b69
JR
75062002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
7507
7508 For PR java/5794:
7509 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7510 return label if a ret instruction for the jsr has been reached.
7511
f724acb8
RM
75122002-09-09 Ranjit Mathew <rmathew@hotmail.com>
7513
7514 * parse.y (DIR_SEPARATOR): Don't define.
7515 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7516
b139fcfd
AH
75172002-08-28 Andrew Haley <aph@redhat.com>
7518
7519 * verify.c (verify_jvm_instructions): Allow exception handler
7520 inside code that is being protected, but generate a warning.
7521 * except.c (link_handler): Initialize `expanded' in new eh_range.
7522 (binding_depth, is_class_level, current_pc): Declare extern.
7523
f60518c8
MW
75242002-09-01 Mark Wielaard <mark@klomp.org>
7525
7526 * gcj.texi: Add chapter about system properties.
7527 Fixed some typos.
7528
83dd5fae
TT
75292002-08-26 Tom Tromey <tromey@redhat.com>
7530
7531 * parse.y (try_builtin_assignconv): Allow narrowing primitive
7532 conversion if RHS_TYPE is byte, short, or char.
7533
00a8b314
TT
75342002-08-22 Tom Tromey <tromey@redhat.com>
7535
7536 * gcj.texi (Invoking gij): Document -cp and -classpath.
7537
0d811e1a
TT
75382002-08-21 Tom Tromey <tromey@redhat.com>
7539
79a3cb18
TT
7540 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7541 $(prefix)/share. For PR libgcj/7633.
7542
0d811e1a
TT
7543 For PR java/6005 and PR java/7611:
7544 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7545 (java_can_use_bit_fields_p): New function.
7546
ca75573a
TT
75472002-08-16 Tom Tromey <tromey@redhat.com>
7548
7549 * gcj.texi (Class Initialization): Mention class initialization of
7550 arrays.
7551
7149627b
AH
75522002-07-30 Andrew Haley <aph@cambridge.redhat.com>
7553
7554 * Make-lang.in (java-tree-inline.o): New.
7555 (JAVA_OBJS): Add java-tree-inline.o.
7556 * parse.y (source_end_java_method): Call java_optimize_inline.
7557 (java_expand_method_bodies): Save method's tree in
7558 DECL_SAVED_TREE.
7559 (add_stmt_to_compound): Keep track of the number of statments.
7560 * lang.c (java_init): Enable flag_inline_trees.
7561 (java_post_options): If flag_inline_functions is on, enable
7562 flag_inline_trees instread.
7563 (decl_constant_value): New.
7564 (java_tree_inlining_walk_subtrees): New.
7565 * java-tree.h (DECL_NUM_STMTS): New macro.
7566 (java_optimize_inline): Declare.
7567 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7568 Handle a LABEL_EXPR.
7569 * decl.c (build_result_decl): If we already have a DECL_RESULT
7570 don't make another.
7571 (dump_function): New.
7572 (java_optimize_inline): New.
7573 (dump_function): New.
7574
ee1884cb
JR
75752002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
7576
7577 For PR java/7483:
7578 * parse.y (build_assertion): Invert return from
7579 desiredAssertionStatus.
7580
097684ce
BM
75812002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7582
36624850 7583 * jcf-write.c (get_access_flags): Return correct access flags for
097684ce
BM
7584 private and protected inner classes.
7585
22aa533e
NS
75862002-08-08 Nathan Sidwell <nathan@codesourcery.com>
7587
7588 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7589
b3426eb9
GK
75902002-08-05 Geoffrey Keating <geoffk@redhat.com>
7591
7592 * mangle_name.c: Don't include obstack.h twice.
7593 * xref.c: Don't include obstack.h.
7594
6d9f628e
GK
75952002-08-04 Geoffrey Keating <geoffk@redhat.com>
7596
7597 * class.c: (permanent_obstack): Delete declaration.
7598 * constants.c: (permanent_obstack): Delete declaration.
7599 * except.c: (permanent_obstack): Delete declaration.
7600 * expr.c: (permanent_obstack): Delete declaration.
7601 * jcf-parse.c: (permanent_obstack): Delete declaration.
7602 (saveable_obstack): Delete declaration.
7603 * parse.h: (permanent_obstack): Delete declaration.
7604 * typeck.c: (permanent_obstack): Delete declaration.
7605
d500c5d7
JM
76062002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
7607
7608 * gcj.texi (version-gcc): Increase to 3.3.
7609
e75abdab
TT
76102002-07-22 Tom Tromey <tromey@redhat.com>
7611
7612 * lex.c (java_lex): Check for `e' or `E' after 0.
7613
8943a0b4
RH
76142002-07-21 Richard Henderson <rth@redhat.com>
7615
7616 * lang.c (java_unsafe_for_reeval): New.
7617 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7618
2f8dd115
NB
76192002-07-21 Neil Booth <neil@daikokuya.co.uk>
7620
7621 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7622 (jcf_path_init): Use GET_ENVIRONMENT.
7623
c5358a5d
RS
76242002-07-10 Roger Sayle <roger@eyesopen.com>
7625 Zack Weinberg <zack@codesourcery.com>
7626
7627 * builtins.c (initialize_builtins): Remove defines that
7628 handled C/C++ specific junk hereby removed from builtins.def.
7629
5351f1ca
NB
76302002-07-07 Neil Booth <neil@daikokuya.co.uk>
7631
7632 * lang.c (java_post_options): Update prototype.
7633
df061a43
RS
76342002-07-05 Roger Sayle <roger@eyesopen.com>
7635
c5358a5d 7636 * builtins.c (initialize_builtins): Ignore the additional
df061a43
RS
7637 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
7638 the builtins.def file.
7639
68a830fe
TT
76402002-07-01 Tom Tromey <tromey@redhat.com>
7641
7642 For PR libgcj/7073:
7643 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7644 specially.
7645
6a2dd09a
RS
76462002-07-01 Roger Sayle <roger@eyesopen.com>
7647
7648 * java/decl.c (builtin_function): Accept additional parameter.
7649 (java_init_decl_processing): Pass an additional NULL_TREE
7650 argument to builtin_function.
7651
32c4621e
M
76522002-06-29 T.J. Mather <tjmather@maxmind.com>
7653
7654 * gcj.texi: Fixed gcj invocation example so that it compiles.
7655
bd466c7b
KG
76562002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7657
57ddd19c
KG
7658 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7659 * parse.y (mark_parser_ctxt): Likewise.
33780b45
KG
7660 (check_modifiers, declare_local_variables): Avoid incorrect
7661 hardcoded constant 10.
57ddd19c 7662
bd466c7b
KG
7663 * lex.c (java_read_char): Avoid "comparison is always true"
7664 warning.
7665
b6532e57
AS
76662002-06-25 Andreas Schwab <schwab@suse.de>
7667
7668 * expr.c (JSR): Avoid undefined operation on PC.
7669
eb6b51b9
KG
76702002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7671
7672 * decl.c (clear_binding_level): Const-ify.
7673
6d61f1bd
AD
76742002-06-13 Akim Demaille <akim@epita.fr>
7675
7676 * parse.y (class_declaration, interface_declaration): Make sure
7677 all their rules have an action, in order to avoid meaningless `$$
7678 = $1' and their type clashes.
7679
c6226a7e
TT
76802002-06-11 Tom Tromey <tromey@redhat.com>
7681
7682 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7683 * parse-scan.y (statement_without_trailing_substatement): Added
7684 assert_statement.
7685 (assert_statement): New rule.
7686 * java-tree.h (struct lang_type) [assertions]: New field.
7687 (TYPE_USES_ASSERTIONS): New macro.
7688 (CLASS_USES_ASSERTIONS): Likewise.
7689 (FIELD_SYNTHETIC): New define.
7690 * lex.c (java_lval;): Added ASSERT_TK.
7691 * parse.y (ASSERT_TK): Added.
7692 (statement_without_trailing_substatement): Added assert_statement.
7693 (assert_statement): New rule.
7694 (build_assertion): New function.
7695 (maybe_generate_pre_expand_clinit): Create and initialize
7696 $assertionsDisabled.
7697 (lookup_package_type): Removed decl.
7698 * keyword.h: Rebuilt.
7699 * keyword.gperf (assert): New token.
7700
e35b68b0
AD
77012002-06-10 Akim Demaille <akim@epita.fr>
7702
7703 * parse.y (interface_type_list, class_member_declaration)
7704 (unary_expression_not_plus_minus): Remove duplicate %type.
7705 Whitespace changes.
7706
950ac1d3
TT
77072002-06-09 Tom Tromey <tromey@redhat.com>
7708
ac57655a
TT
7709 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7710
950ac1d3
TT
7711 * parse.y (method_header): Give error message in all cases.
7712 Fixes PR java/6865.
7713
36d010ca
BM
77142002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7715
7716 Don't use RTL inlining. Fix for PR java/6820.
7717 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7718 (flag_really_inline): New.
7719 (java_decode_option): Set flag_really_inline if -finline-functions
7720 is seen.
7721 (java_post_options): New function. Turn off inlining unless
7722 flag_really_inline is set.
7723
64e68197
BM
77242002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7725
36624850 7726 * gjavah.c (throwable_p): Accept argument as either a classname or
64e68197
BM
7727 signature fragment. Create null-terminated classname string for super
7728 when calling itself recursively.
36624850 7729 (decode_signature_piece): Skip first character from class name
64e68197
BM
7730 signature when calling throwable_p.
7731
c238d806
L
77322002-06-08 H.J. Lu (hjl@gnu.org)
7733
7734 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7735
f06cafdf
TT
77362002-06-04 Tom Tromey <tromey@redhat.com>
7737
7738 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7739
0bb5f0e4
MK
77402002-06-04 Michael Koch <konqueror@gmx.de>
7741
7742 * gcj.texi (Input Options): Fixed typo.
7743
c02ebb18
ZW
77442002-06-04 Zack Weinberg <zack@codesourcery.com>
7745
7746 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7747 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7748 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7749 and all now-pointless local variables. Rename other local
7750 variables to reflect their not being handles.
7751
7752 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7753 #if JCF_USE_STDIO blocks.
7754
7755 * parse.y: Add missing semicolon at end of rule.
7756
e2500fed
GK
77572002-06-03 Geoffrey Keating <geoffk@redhat.com>
7758
7759 * check-init.c (attach_initialized_static_class): Delete, unused.
7760 * parse.y: Use htab_t instead of struct hashtable, update
7761 all uses.
7762 * java-tree.h: Include hashtab.h instead of hash.h.
7763 (struct lang_decl_func): Use htab_t, set up for gengtype.
7764 (struct init_test_hash_entry): Delete.
7765 (struct treetreehash_entry): New.
c02ebb18 7766 (java_treetreehash_find): New
e2500fed
GK
7767 (java_treetreehash_new): New prototype.
7768 (java_treetreehash_create): New prototype.
7769 (java_mark_tree): Delete prototype.
7770 (java_hash_hash_tree_node): Delete prototype.
7771 (java_hash_compare_tree_node): Delete prototype.
7772 (attach_initialized_static_class): Delete prototype.
7773 * expr.c (build_class_init): Update to use java_treetreehash
7774 functions.
7775 (java_expand_expr): Update to use htab_t.
7776 (emit_init_test_initialization): Likewise.
7777 * decl.c (java_mark_tree): Delete.
7778 * class.c (init_test_hash_newfunc): Delete.
7779 (java_hash_hash_tree_node): Delete.
7780 (java_hash_compare_tree_node): Delete.
7781 (add_method_1): Update to use java_treetreehash functions.
7782 (JAVA_TREEHASHHASH_H): New macro.
7783 (java_treetreehash_hash): New function.
7784 (java_treetreehash_compare): New function.
7785 (java_treetreehash_find): New function.
7786 (java_treetreehash_new): New function.
7787 (java_treetreehash_create): New function.
7788 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7789
7790 * Make-lang.in (java/parse.o): Depend on debug.h.
7791 * java-tree.h (struct lang_identifier): Use gengtype.
7792 (union lang_tree_node): New.
7793 (struct lang_decl_func): Use gengtype.
7794 (struct lang_decl_var): Likewise.
7795 (struct lang_decl): Likewise.
7796 * parse.y: Include debug.h.
7797 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7798
7799 * lang.c (struct language_function): New dummy structure.
7800
7801 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7802 descriminator for DECL_LANG_SPECIFIC.
7803 (struct lang_decl_func): Rename from struct lang_decl.
7804 (enum lang_decl_desc): New.
7805 (struct lang_decl): Make it a union. Update all the accessor macros.
7806 (struct lang_type): Use gengtype.
7807 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7808 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7809 are now the same size.
7810 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7811 use discriminator to mark DECL_LANG_SPECIFIC.
7812
7813 * Make-lang.in (gt-java-builtins.h): New rule.
7814 (java/builtins.o): Add dependency on gt-<filename>.h.
7815 * builtins.c: Use gengtype for roots.
7816 (union string_or_tree): Use gengtype.
7817 (struct builtin_record): Use gengtype.
7818 * config-lang.in (gtfiles): Add builtins.c.
7819
7820 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7821 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7822 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7823 gt-java-parse.h, gtype-java.h): Add rules to generate.
7824 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7825 (class.o): Add dependency on gt-*.h.
7826 (constants.o): Likewise.
7827 (decl.o): Likewise.
7828 (expr.o): Likewise.
7829 (jcf-parse.o): Likewise.
7830 (jcf-write.o): Likewise.
7831 (lang.o): Likewise.
7832 * config-lang.in (gtfiles): New.
7833 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7834 * constants.c: Replace uses of ggc_add_* with GTY markers.
7835 Include gt-*.h.
7836 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7837 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7838 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7839 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7840 Include gt-*.h.
7841 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7842 Include gt-*.h.
7843 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7844 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
7845 gt-*.h.
7846 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7847 Include gtype-java.h.
7848
c442c002
TT
78492002-06-02 Tom Tromey <tromey@redhat.com>
7850
7851 Fix for PR java/5913:
7852 * parse.y (patch_binop): Call patch_string on op1.
7853
48711f4d
TT
78542002-06-02 Tom Tromey <tromey@redhat.com>
7855
7856 Fix for PR java/1343, PR java/6336:
7857 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7858 formatting. Changed return type.
7859 (anonymous_class_counter): Moved to top of file.
7860 (maybe_make_nested_class_name): Append number to class name for
7861 function-local classes.
7862
11ad4784
ZW
78632002-05-28 Zack Weinberg <zack@codesourcery.com>
7864
7865 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7866 * Make-lang.in: Update dependency lists.
7867
a15135c9
MM
78682002-05-18 Mark Mitchell <mark@codesourcery.com>
7869
7870 * gjavah.c (throwable_p): Do not free the name of the class after
7871 passing it to find_class.
7872 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7873 * jcf-io.c (dirent.h): Include it.
7874 (fnmatch.h): Likewise.
7875 (compare_path): New function.
7876 (java_or_class_file): Likewise.
7877 (memoized_dirlist_entry): New type.
7878 (memoized_dirlist_lookup_eq): New function.
7879 (memoized_dirlists): New variable.
7880 (caching_stat): New function.
7881 (memoized_class_lookup_eq): New function.
7882 (memoized_class_lookups): Likewise.
7883 (find_class): Use memoized_class_lookups and caching_stat.
7884 * jcf.h (JCF_USE_SCANDIR): Define.
7885 * parse.y (java_expand_classes): Write the class files in reverse
7886 order.
c02ebb18 7887
1e6347d8
RO
78882002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7889
7890 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7891
2f9a2cd7
MM
78922002-05-13 Mark Mitchell <mark@codesourcery.com>
7893
7894 * jcf-write.c (write_classfile): Unlink the temporary file if it
7895 cannot be renamed. Use concat to build up the name of the
7896 temporary file.
7897
281524f4
MM
78982002-05-08 Mark Mitchell <mark@codesourcery.com>
7899
c02ebb18 7900 * jcf-write.c (write_classfile): Write the file to a
281524f4
MM
7901 temporary file and then rename it.
7902
6b9b5de2
TT
79032002-05-07 Tom Tromey <tromey@redhat.com>
7904
5643bb97
TT
7905 * gjavah.c (throwable_p): Use xstrdup, not strdup.
7906
6b9b5de2
TT
7907 Fix for PR java/1200:
7908 * gjavah.c (throwable_p): New function.
7909 (decode_signature_piece): Use it. A `WeakReference' isn't the
7910 same as a `jweak'.
7911 Include hashtab.h.
7912 (gcjh_streq): New function.
7913
2c7e9098
AJ
79142002-05-07 Andreas Jaeger <aj@suse.de>
7915
c02ebb18 7916 * parse.y (finish_for_loop): Fix if statement.
2c7e9098 7917
486e8c0c
TT
79182002-05-06 Tom Tromey <tromey@redhat.com>
7919
7920 Fix for PR java/5941:
7921 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7922 loop update expression.
7923 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7924 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7925
30b50f90
MW
79262002-05-04 Mark Wielaard <mark@klomp.org>
7927
7928 For PR java/6519:
7929 * parse.y (build_string_concatenation): Return just op1 only when op2
7930 is null and op1 is a STRING_CST, otherwise always construct a
7931 StringBuffer.
7932
0a32c5ea
TT
79332002-04-27 Tom Tromey <tromey@redhat.com>
7934
7935 For PR java/6382:
7936 * parse.y (string_convert_int_cst): New function.
7937 (merge_string_cste): Use it.
7938
ff45c01e
NB
79392002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7940
7941 * java-tree.h (java_parse_file): Update.
7942 (java_set_yydebug): Remove.
7943 * jcf-parse.c (yydebug): Remove.
7944 (java_set_yydebug): Die.
7945 (java_parse_file): Update.
7946 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7947
9127b2da
TT
79482002-04-24 Tom Tromey <tromey@redhat.com>
7949
7950 For PR java/6425:
7951 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7952 EXPR_WFL_QUALIFICATION of qual_wfl.
7953
67f0a6bf
PB
79542002-04-23 Per Bothner <per@bothner.com>
7955
7956 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
7957 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
7958 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
7959
3d3707c1
TT
79602002-04-23 Tom Tromey <tromey@redhat.com>
7961
7962 For PR java/6314:
7963 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
7964 recognize `-fcompile-resource='.
7965 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
7966 a bit.
7967
920f81e7
APB
79682002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
7969
7970 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7971 paths. Fixes PR java/2791.
7972
a2761d68
AH
79732002-04-19 Andrew Haley <aph@redhat.com>
7974
c02ebb18
ZW
7975 * jcf-write.c (push_long_const): lo, hi: New variables.
7976 Use rshift_double to extract the high part of a 64-bit long.
7977 Use WORD_TO_INT to extract the low part.
a2761d68 7978
c02ebb18
ZW
7979 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7980 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
7981 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
a2761d68 7982
7a228918
NB
79832002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7984
7985 * typeck.c (incomplete_type_error): Remove.
7986
b798d8b6
BM
79872002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7988
7989 * class.c (make_class_data): Set DECL_ALIGN on static class data,
7990 for hash synchronization.
7991 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7992 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7993 class_type_node.
7994
1cde1d05
MW
79952002-04-16 Mark Wielaard <mark@klomp.org>
7996
7997 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7998 negative zero.
7999
3020a7f5
BM
80002002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8001
8002 Fix for PR java/6294:
8003 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8004 interfaces.
2c7e9098 8005
10aa83c7
BM
80062002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8007
8008 Fix for PR java/6085:
8009 * parse.y (patch_method_invocation): Always use build_access_to_thisn
8010 to get enclosing "this" argument for inner-class constructor
8011 invocation. Pass correct arguments to build_access_to_thisn.
8012
9fef1fe3
AG
80132002-04-10 Andreas Jaeger <aj@suse.de>
8014
8015 * gcj.texi (Input Options): Fix extdirs patch.
8016
80172002-04-10 Anthony Green <green@redhat.com>
8018
8019 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8020
80212002-04-09 Anthony Green <green@redhat.com>
8022
8023 * gcj.texi (Input Options): Add --extdirs documentation.
8024 * jcf-dump.c (OPT_extdirs): New macro.
8025 (options): Add extdirs option.
8026 (help): Describe --extdirs.
8027 (main): Handle OPT_extdirs.
8028 * gjavah.c (OPT_extdirs): New macro.
8029 (options): Add extdirs option.
8030 (help): Describe --extdirs.
8031 (main): Handle OPT_extdirs.
8032 * jcf-path.c (jcf_path_init): Add extdirs support.
8033 (jcf_path_extdirs_arg): New function.
8034 (extensions): New variable to hold extensions path entries.
8035 * jvspec.c: Remove -fextdirs= when compiling main().
8036 * lang.c (java_decode_option): Handle -fextdirs=.
8037 * jcf.h (jcf_path_extdirs_arg): Declare new function.
8038 * Make-lang.in: Compile jcf-path with version info for use in
8039 identifying the appropriate libgcj.jar.
8040
66133721
TT
80412002-04-08 Tom Tromey <tromey@redhat.com>
8042
8043 For PR libgcj/5303:
8044 * .cvsignore: Added rmic.1 and rmiregistry.1.
8045 * gcj.texi (Top): Link to new nodes.
8046 (Invoking rmic): New node.
8047 (Invoking rmiregistry): Likewise.
8048 * Make-lang.in (java.generated-manpages): Added rmic.1 and
8049 rmiregistry.1.
8050 (java.maintainer-clean): Likewise.
8051 ($(srcdir)/java/rmic.1): New target.
8052 ($(srcdir)/java/rmiregistry.1): Likewise.
8053 (java.install-man): Handle rmic.1 and rmiregistry.1.
8054
00b224f8
BM
80552002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8056
8057 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8058 Add note about handling uncaught exceptions. Add an exception handler
8059 to example.
8060
0b055ea1
BM
80612002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8062
8063 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8064 after using it to patch CALL_EXPR.
8065
92c76eba
BM
80662002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8067
8068 * gcj.texi (Invocation): Document CNI invocation API.
8069
78ef5b89
NB
80702002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
8071
8072 * expr.c (truthvalue_conversion): Rename. Update.
8073 (expand_compare): Update.
8074 * java-tree.h (java_truthvalue_conversion): New.
8075 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8076
dffd7eb6
NB
80772002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8078
8079 * java-tree.h (java_mark_addressable): New.
8080 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8081 * typeck.c (mark_addressable): Rename, update.
8082
ceef8ce4
NB
80832002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
8084
8085 * expr.c (build_java_binop): Update.
8086 * java-tree.h (java_signed_type, java_unsigned_type,
8087 java_signed_or_unsigned_type): Update.
8088 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8089 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8090 * parse.y (patch_binop): Update.
8091 * typeck.c (signed_or_unsigned_type, unsigned_type,
8092 signed_type): Update.
8093
7cb32822
NB
80942002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
8095
8096 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8097 (java_dummy_print): Remove.
8098 (lang_print_error): Rename. Exit early if inhibiting output.
8099 (inhibit_error_printing_function): New.
8100 (java_init): Don't set hook.
8101 (lang_init_source): Use new boolean.
8102
5bebbee7
MK
81032002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8104
8105 * parse.y (do_resolve_class): Fix infinite recursion.
8106
bce54832
TT
81072002-03-29 Tom Tromey <tromey@redhat.com>
8108
8109 * parse.y (check_inner_circular_reference): Ignore incomplete
8110 types.
8111
b0c48229
NB
81122002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
8113
8114 * Make-lang.in (builtins.o): Update.
8115 * boehm.c (get_boehm_type_descriptor): Update.
8116 * builtins.c: Include langhooks.h.
8117 * decl.c (java_init_decl_processing): Update.
8118 * java-tree.h (java_type_for_mode, java_type_for_size): New.
8119 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8120 Redefine.
8121 * typeck.c (type_for_mode, type_for_size): Update.
8122
5843e870
MK
81232002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
8124
8125 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8126
073681c5
TT
81272002-03-28 Tom Tromey <tromey@redhat.com>
8128
8129 * except.c (expand_end_java_handler): If the handler type is NULL,
8130 use java.lang.Throwable. Fixes PR java/5986.
8131
242747e5
APB
81322002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8133
8134 Fix for PR java/4715:
8135 * jcf-parse.c (parse_source_file_3): New function.
8136 (read_class): Call it.
8137 (java_parse_file): Likewise.
8138
62c9aa5f 81392002-03-28 Jan Hubicka <jh@suse.cz>
f5eb5fd0
JH
8140
8141 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8142
c187b20e
BM
81432002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8144
8145 * parse.y (resolve_package): Initialize "decl".
8146 (lookup_package_type): Remove unused function.
8147
2f418289
BM
81482002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8149
8150 Fix for PR java/5993:
8151 * parse.y (resolve_package): Return the decl if resolution was
2c7e9098 8152 successful. Don't special case "java.lang" and "java.lang.reflect"
2f418289
BM
8153 packages. Set type_name to the merged identifier.
8154 (resolved_qualified_expression_name): Print error using "name" if
8155 resolve_package returns NULL_TREE.
8156
39bea374
TT
81572002-03-27 Tom Tromey <tromey@redhat.com>
8158
8159 * expr.c (expand_invoke): Don't generate null pointer check if
8160 we're calling <init>.
8161
c9d892a8
NB
81622002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
8163
8164 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8165 fix prototype.
8166 * java-tree.h (java_lang_expand_expr): Similarly.
8167 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8168 (java_init): Don't set hook.
8169
05833095
BM
81702002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8171
8172 Fix for PR java/5850:
8173 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8174 context if field was not found in the current scope.
8175 * expr.c (lookup_field): Don't look in enclosing contexts.
8176
c8c21a8c
TT
81772002-03-26 Tom Tromey <tromey@redhat.com>
8178
8179 Fix for PR java/5942:
8180 * parse.y (init_src_parse): Added sanity check.
8181 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8182 elements, not 11.
8183
4f0ade92
NB
81842002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
8185
8186 * decl.c (lang_mark_tree): Rename java_mark_tree.
8187 * java-tree.h (java_mark_tree): New.
8188 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8189
15e5ad76
ZW
81902002-03-25 Zack Weinberg <zack@codesourcery.com>
8191
8192 * lex.c: Change java_perform_atof to take normal parameters
8193 instead of a pointer to a parameter block. Call it directly
8194 from java_lex.
8195
caaabaa1
MW
81962002-03-22 Mark Wielaard <mark@klomp.org>
8197
8198 Fix for PR java/5368:
8199 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8200 when printing error message.
8201
c88770e9
NB
82022002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
8203
8204 * decl.c (maybe_build_cleanup): Remove.
8205
c58408bf
TT
82062002-03-22 Tom Tromey <tromey@redhat.com>
8207
8208 Andrew Haley <aph@cambridge.redhat.com>
8209
8210 * expr.c (build_field_ref): Don't build a check if the field is a
8211 member of `this'.
8212
6c18d181
EB
82132002-03-21 Eric Blake <ebb9@email.byu.edu>
8214
8215 Fix for PR java/6026:
8216 * lex.c (java_lex): Fix parsing of consecutive floats.
8217
a5778545
TT
82182002-03-21 Tom Tromey <tromey@redhat.com>
8219
8220 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8221 class.
8222
43577e6b
NB
82232002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
8224
8225 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8226 insert_block, getdecls, kept_level_p, global_bindings_p): New.
8227
fe911510
NF
82282002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8229
2c7e9098 8230 * gcj.texi: @code{gcj} becomes @command{gcj}.
15e5ad76
ZW
8231 @code{gcc} becomes @command{gcc}.
8232 GcjRaw changed to gnu.gcc.RawData.
8233
7afff7cf
NB
82342002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
8235
8236 * decl.c (start_java_method): Use new hook.
8237 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8238 (java_init): Remove old hook.
8239
c2d8e20a
APB
82402002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8241
8242 * builtins.c (define_builtin): Do nothing if `type' is null.
8243 Fixes PR java/5876.
8244
6befbee5
BM
82452002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8246
8247 * parse.y (parser_check_super_interface): Fix error message
8248 grammar/order.
8249
320c81a6
KG
82502002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8251
8252 * jcf-parse.c (get_constant): Delete unused variables.
8253
52dabb6c
NB
82542002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
8255
8256 * java-tree.h (java_parse_file): New.
8257 * jcf-parse.c (yyparse): Rename java_parse_file.
8258 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8259
568d1435
BM
82602002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8261
8262 * parse.y (craft_constructor): Return the constructor decl.
8263 (java_expand_classes): Update comments.
8264 (lookup_method_invoke): Call fix_constructors immediately for
8265 anonymous class. Fixes PR java/5935.
8266
8d39b447
AG
82672002-03-15 Anthony Green <green@redhat.com>
8268
8269 * jcf-parse.c (yyparse): Don't emit class registration
8270 constructor when compiling resource files.
8271
2f9834e8
KG
82722002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8273
8274 * lang.c (java_tree_code_type, java_tree_code_length,
8275 tree_code_name): Delete.
8276 (tree_code_type, tree_code_length, tree_code_name): Define.
8277 (java_init): Don't try to copy into the various tree_code
8278 arrays.
8279
f792bce5
TT
82802002-03-12 Tom Tromey <tromey@redhat.com>
8281
8a611251
TT
8282 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8283 UTF-8, not UCS-2. Fixes PR java/5923.
8284
f792bce5
TT
8285 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8286 a call_expr wrapped in a convert. Fixes PR java/5848.
8287
acf8bc25
BM
82882002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8289
8290 * jcf-write.c (write_classfile): Improve error strings.
8291
e0b1c206
EB
82922002-03-11 Eric Blake <ebb9@email.byu.edu>
8293
8294 * lex.c: Adjust comments to GNU standards.
8295
82962002-03-11 Eric Blake <ebb9@email.byu.edu>
8297
8298 Fix for PR java/5902:
8299 * lex.c (java_lex): Fix parsing of literals.
8300
884523df
BM
83012002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8302
8303 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8304 to prevent it getting evaluated twice in the store checking case.
8305 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8306 examining OBJECT.
8307
45597167
BM
83082002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8309
8310 * decl.c (java_init_decl_processing): Make sure class_type_node
8311 alignment is not less than 64 bits if hash synchronization is enabled.
8312
edcc88c1
PB
83132002-03-08 Per Bothner <per@bothner.com>
8314
8315 * parse.y (java_complete_lhs): Check if patch_assignment
8316 returned an error-mark.
8317
8318 * parse.y (try_builtin_assignconv): Don't special-case zero.
8319
5295f849
PB
83202002-03-08 Per Bothner <per@bothner.com>
8321
8322 Fix for PR java/5812.
8323 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
be3ac45e 8324 here instead of in JSR macro. Likewise with load_type_state call.
5295f849 8325 Do the latter on if the return_pc has been verified (the jsr returns).
be3ac45e 8326 (JSR): Now just call build_java_jsr.
5295f849 8327
d3e1c36d
JS
83282002-03-07 Jeff Sturm <jsturm@one-point.com>
8329
8330 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8331 (java.install-common): Link native driver to
8332 JAVA_TARGET_INSTALL_NAME.
8333
6d6b5cd7
DB
83342002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
8335
8336 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8337 * builtins.c(sin_builtin): Likewise
8338 * builtins.c(sqrt_builtin): Likewise
8339
ba31d94e
ZW
83402002-03-03 Zack Weinberg <zack@codesourcery.com>
8341
8342 * java/expr.c, java/jcf-parse.c, java/lex.c:
8343 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8344 REAL_ARITHMETIC blocks unconditional. Delete some further
8345 #ifdef blocks predicated on REAL_ARITHMETIC.
8346
ca7558fc
KG
83472002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8348
8349 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8350 explicit sizeof/sizeof.
8351 * decl.c (java_init_decl_processing): Likewise.
8352 * jcf-parse.c (init_jcf_parse): Likewise.
8353 * parse.y (init_src_parse): Likewise.
8354
2a85660d
PB
83552002-03-02 Per Bothner <per@bothner.com>
8356
8357 Make --CLASSPATH by a synonym for --classpath and -classpath.
8358 Implement --bootclasspath.
8359 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
8360 (classpath_l): Remove.
8361 (jcf_path_CLASSPATH_arg): Remove.
8362 (jcf_path_bootclasspath_arg): New function.
8363 (jcf_path_seal): Simplify accordingly.
8364
8365 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
8366 (jcf_path_CLASSPATH): Remove declaration.
8367 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
8368 (lang_specific_driver): Translate -bootclasspath.
8369 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
8370 * lang.c (decode_lang_options): Do jcf_path_init first.
8371 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
8372 * gjavah.c: Also handle --bootclasspath.
8373 Handle --CLASSPATH as a synonum for --classpath.
8374 * jcf-dump.c: Likewise.
8375
8376 "." is not part of system path, but is the default for --classpath.
8377 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
8378 (jcf_path_seal): Add "." if no CLASSPATH specified.
8379
8380 * gcj.texi: Document changes.
8381
2060fd4c
BM
83822002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8383
8384 * expr.c (build_java_arraystore_check): Fix formatting.
8385
4f647d52
APB
83862002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8387
8388 Fix for PR java/5758, java/5632:
8389 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8390 inner-class separator too.
8391 * parse.y (do_resolve_class): New local `decl_result.'
8392 Progressively build a name for what can have been loaded.
8393
022dcc46
BM
83942002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8395
8396 * expr.c (java_array_data_offset): Removed function.
8397 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8398 (build_java_array_length_access): Obtain "length" value using a
8399 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8400 (build_java_arrayaccess): Correct comment. Access "data" using a
8401 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8402 (build_java_arraystore_check): New function.
8403 (expand_java_arraystore): Use build_java_arraystore_check.
8404 * parse.y (patch_assignment): Simplify code to insert a store check
8405 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8406 * check-init.c (check_init): Update to reflect that an array length
8407 access is now a COMPONENT_REF.
8408 * gcj.texi (Code Generation): Improve documentation of
8409 -fno-bounds-check. Add documentation for -fno-store-check.
8410 * java-tree.h (flag_store_check): Declare.
8411 (build_java_arraystore_check): Declare.
8412 * lang.c (flag_store_check): Initialize to 1.
8413 (lang_f_options): Add store-check option.
8414 * jvspec.c: Don't pass store-check option to jvgenmain.
8415 * lang-options.h: Add help string for -fno-store-check.
8416
63e1b1c4
NB
84172002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
8418
8419 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8420 * java-tree.h (java_dup_lang_specific_decl): New.
8421 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8422
f458d1d5
ZW
84232002-02-27 Zack Weinberg <zack@codesourcery.com>
8424
8425 * builtins.c, decl.c: Delete traditional-mode-related code
8426 copied from the C front end but not used, or used only to
8427 permit the compiler to link.
8428
d2fb5329
TT
84292002-02-22 Tom Tromey <tromey@redhat.com>
8430
8431 Fix for PR java/2369:
8432 * jvspec.c (verify_class_name): New function.
8433 (lang_specific_driver): Call it.
8434 (JAVA_START_CHAR_P): New macro.
8435 (JAVA_PART_CHAR_P): Likewise.
8436
dcb36804
PB
84372002-02-22 Per Bothner <per@bothner.com>
8438
022dcc46 8439 * class.c: Change vtable to be more compatible with g++ v3 abi.
dcb36804
PB
8440 (get_dispatch_table): Prepend offset-to-top (always 0) and
8441 type_info pointer (currently unimplemented hence NULL) to vtable.
8442 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8443 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
8444 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8445 (build_dtable_decl): Add declarations for new fields.
8446
453c182f
PB
84472002-02-20 Per Bothner <per@bothner.com>
8448
8449 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8450 to finit$ (otherwise generate_bytecode_insns drops it). However, we
8451 don't need to set it on the COMPOUND_EXPR - the caller does that.
8452
3babb2e3
NF
84532002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8454
15e5ad76
ZW
8455 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8456 `--CLASSPATH' becomes `--classpath.'
8457 * gjavah.c: Likewise.
8458 * jcf-dump.c: Likewise.
8459 * lang-options.h: Likewise.
8460 * lang.c: Likewise.
8461 * jcf-path.c: Updated comment.
8462 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8463 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8464 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8465 (jcf_path_CLASSPATH_arg): Ditto.
8466 (classpath_u): Updated leading comment.
3babb2e3 8467
9fe2cc05
PB
84682002-02-20 Per Bothner <per@bothner.com>
8469
8470 * builtins.c (check_for_builtin): New function.
8471 (build_call_or_builtin): Remove.
8472 * java-tree.h: Update accordingly.
8473 * expr.c (expand_invoke): Use build + check_for_builtin instead
8474 of build_call_or_builtin.
8475 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
8476 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8477 flag (which had caused jcf-write to incorrectly emit invokevirtual).
8478
6b6294f1
TT
84792002-02-17 Tom Tromey <tromey@redhat.com>
8480
8481 * java-tree.h (TYPE_STRICTFP): New macro.
8482 (struct lang_type) [strictfp]: New field.
8483 (CLASS_STRICTFP): New macro.
8484 (METHOD_STRICTFP): New macro.
8485 (struct lang_decl) [strictfp]: New field.
8486 * parse.y (method_header): Disallow strictfp constructor or
8487 abstract method.
8488 (STRICT_TK): Move before MODIFIER_TK.
8489 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8490 (METHOD_MODIFIERS): Likewise.
8491 (INTERFACE_MODIFIERS): Likewise.
8492 * jcf-write.c (get_access_flags): Likewise.
8493 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8494 (add_method_1): Likewise.
8495 (get_access_flags_from_decl): Likewise.
8496 * jcf-dump.c (print_access_flags): Print in standard order. Also,
8497 recognize strictfp flag.
8498 * jcf.h (ACC_STRICT): New define.
8499
5667c33d
DB
85002002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
8501
8502 * class.c(build_utf8_ref): Move declaration of decl_size
8503
5d65aeb7
TT
85042002-02-07 Tom Tromey <tromey@redhat.com>
8505
8506 * gcj.texi (Input Options): --CLASSPATH does not suppress system
8507 path.
8508
10c45943
AG
85092002-02-04 Anthony Green <green@redhat.com>
8510
8511 * class.c (build_utf8_ref): Put UTF-8 constants into merged
8512 sections if available.
8513
14b71055
BM
85142002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8515
8516 * parse.y (java_expand_classes): Fix typo in static field loop.
8517
f0c75752
RH
85182002-02-02 Richard Henderson <rth@redhat.com>
8519
8520 * class.c (add_field): Mark static fields external.
8521 (build_class_ref): Remove redundant set.
8522 * parse.y (java_expand_classes): Mark static fields of classes
8523 to be compiled as local.
8524 * jcf-parse.c (parse_class_file): Likewise.
8525
d4ad1c90
NF
85262002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
8527
8528 * gcj.texi (About CNI): New node.
8529
58fae3f7
CR
85302002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
8531
8532 PR java/5080
8533 * jcf-parse.c : Check for HAVE_LOCALE_H before using
8534 setlocale() with LC_CTYPE as a parameter.
8535 * jv-scan.c: Same.
8536
8512bbd7
JM
85372002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
8538
8539 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8540 Follow GNU Coding Standards for --version.
8541
adc8cb5d
TT
85422002-01-28 Tom Tromey <tromey@redhat.com>
8543
8544 * expr.c (build_jni_stub): Ensure storage for `meth' is
8545 generated.
8546 * parse.y (java_complete_expand_methods): Set
8547 current_function_decl before building JNI stub.
8548
1d8478d7 85492002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
15e5ad76 8550
1d8478d7
AT
8551 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8552 BUILT_IN_SQRTF.
8553
fec763fc
TT
85542002-01-22 Tom Tromey <tromey@redhat.com>
8555
8556 * decl.c (java_init_decl_processing): Use add_predefined_file.
8557 Predefine RawData.java.
8558 (predef_filenames): Removed.
8559 (java_init_decl_processing): Don't register predef_filenames.
8560 * jcf-parse.c (add_predefined_file): New function.
8561 (predefined_filename_p): Rewrote.
8562 (predefined_filename_p): No longer static.
8563 * decl.c (java_init_decl_processing): Call initialize_builtins.
8564 * Make-lang.in (JAVA_OBJS): Added builtins.o.
8565 (java/builtins.o): New target.
8566 * builtins.c: New file.
8567 * parse.y (patch_invoke): Use build_call_or_builtin.
8568 * java-tree.h (build_call_or_builtin): Declare.
8569 (initialize_builtins): Declare.
8570 (java_set_exception_lang_code): Removed unused declaration.
8571 (PREDEF_FILENAMES_SIZE): Removed.
8572 (java_tree_index): Added JTI_PREDEF_FILENAMES.
8573 (predef_filenames): New define.
8574 (add_predefined_file): Declare.
8575 (predefined_filename_p): Declare.
8576 * expr.c (expand_invoke): Use build_call_or_builtin.
8577
cc586d70
KG
85782002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8579
8580 * parse.y (patch_switch_statement): Fix format specifier.
8581
0df29596
TT
85822002-01-16 Tom Tromey <tromey@redhat.com>
8583
8584 More for PR java/5365:
8585 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8586 default.
8587 (process_file): Generate include for
8588 java.lang.UnsupportedOperationExceptions.
8589
e1886ae0
AJ
85902002-01-15 Andreas Jaeger <aj@suse.de>
8591
8592 * .cvsignore: Add man pages.
8593
9c874875
TT
85942002-01-15 Tom Tromey <tromey@redhat.com>
8595
8596 Fix for PR java/5365:
8597 * gjavah.c (process_file): Turn class name into a file name.
8598
707635f9
MK
85992002-01-14 Matthias Klose <doko@debian.org>
8600
8601 * gcj.texi: Fix whitespace and formatting errors in the
8602 synopsis of the man pages. Update copyright.
8603
e6a5e462
TT
86042002-01-14 Tom Tromey <tromey@redhat.com>
8605
8606 For PR libgcj/5303:
8607 * Make-lang.in (java.install-man): Handle jv-convert man page.
8608 (java.generated-manpages): Added jv-convert.1.
8609 (java.uninstall): Remove jv-convert.1.
8610 (java.maintainer-clean): Likewise.
8611 ($(srcdir)/java/jv-convert.1): New target.
8612 * gcj.texi (Top): Link to jv-convert node.
8613 (Individual utilities): Likewise.
8614 (Invoking jv-convert): New node.
8615
0b0d4c5b 86162001-01-10 Jeff Sturm <jsturm@one-point.com>
f0c75752 8617 Martin Kahlert <martin.kahlert@infineon.com>
0b0d4c5b
JS
8618
8619 * jcf-parse.c (get_constant): Don't swap lo/hi for big
8620 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8621
c0b65ff1 86222002-01-03 Graham Stott <grahams@redhat.com>
79ab76fd 8623
f0c75752
RH
8624 * class.c (compile_resource_file): Update copyright date.
8625 Constify filename parameter.
8626 (java-tree.h): Update copyright date.
8627 (compile_resource_file): Constify filename parameter.
79ab76fd 8628
22e85ed4
GS
86292002-01-03 Graham Stott <grahams@redhat.com>
8630
f0c75752
RH
8631 * gcc/jcf-parse.c: Update copyright date.
8632 (yyparse): Constify resource_filename.
22e85ed4 8633
5e65297b
KG
86342002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8635
8636 * parse.y (src_parse_roots): Don't needlessly zero init.
8637
12cfb4fc
TT
86382001-12-31 Tom Tromey <tromey@redhat.com>
8639
8640 * parse.y (dump_java_tree): New function.
8641 (source_end_java_method): Call it.
8642 (end_class_declaration): Likewise.
8643 * lang.c (java_decode_option): Call dump_switch_p.
8644
dab722ee
TT
86452001-12-28 Tom Tromey <tromey@redhat.com>
8646
8647 * gen-table.pl: Don't process characters after \uffff. Added
8648 comment pointing to input file.
8649
7b0295ab
KG
86502001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8651
8652 * gen-table.pl: Const-ify output. Document the location of a
8653 suitable unicode input file.
8654
8655 * chartables.h: Regenerate.
8656
c083a819
KG
86572001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8658
8659 * chartables.h: Const-ify.
8660 * gjavah.c (options): Likewise.
8661 * jcf-dump.c (options): Likewise.
8662 * jv-scan.c (options): Likewise.
8663 * lex.c (java_start_char_p, java_part_char_p): Likewise.
8664 * parse.y (binop_lookup): Likewise.
8665
0b5826ac
KG
86662001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8667
8668 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8669 the static arrays that are output.
8670 * jvspec.c (jvgenmain_spec): Make static.
8671 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8672 * keyword.h: Regenerate.
8673 * lang.c (string_option, process_option_with_no, lang_f_options,
8674 lang_W_options): Const-ify.
8675 * lex.c (java_lex): Likewise.
8676
9a07cfaf
RH
86772001-12-21 Richard Henderson <rth@redhat.com>
8678
8679 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8680 (get_boehm_type_descriptor): ... here. Arrange for the
8681 TREE_TYPE to get set properly.
8682
f44fefca
RH
86832001-12-21 Richard Henderson <rth@redhat.com>
8684
ef969525
RH
8685 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8686 only if the target requires collect2.
8687
f44fefca
RH
8688 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8689
84a944b3
TT
86902001-12-20 Tom Tromey <tromey@redhat.com>
8691
8692 For PR java/4509:
8693 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8694 CAN_COMPLETE_NORMALLY for the node.
8695 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8696 generate code for second branch if first branch can't complete
8697 normally.
8698 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8699 the loop head if the loop body can't complete normally.
8700
2d93b924
TT
87012001-12-20 Tom Tromey <tromey@redhat.com>
8702
8703 For PR java/4766:
8704 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8705 case where `finally' clause can't complete normally.
8706
f2af50db
TT
87072001-12-20 Tom Tromey <tromey@redhat.com>
8708
8709 Fixes PR java/5057:
8710 * parse.y (analyze_clinit_body): Added this_class parameter.
8711 Check for more cases where we must keep <clinit>.
8712 (maybe_yank_clinit): Cleaned up flow control.
8713
7899e8b9
BM
87142001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8715
e1886ae0 8716 * decl.c (java_init_decl_processing): Don't initialize
7899e8b9
BM
8717 finit_leg_identifier_node.
8718 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8719 (finit_leg_identifier_node): Remove.
8720 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8721
de4984af
BM
87222001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8723
e1886ae0 8724 * mangle.c (mangle_member_name): Don't special-case for
de4984af
BM
8725 NO_DOLLAR_IN_LABEL.
8726 * mangle_name.c (unicode_mangling_length): Likewise.
8727 (append_unicode_mangled_name): Likewise.
8728 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8729 code.
8730
08514ae4
BM
87312001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8732
8733 * expr.c (build_java_array_length_access): Don't force null pointer
8734 check unless flag_check_references is set.
8735
56b8325e
TT
87362001-12-20 Tom Tromey <tromey@redhat.com>
8737
8738 Fix for PR java/3417:
8739 * parse.y (patch_assignment): Added special processing for
8740 `return'.
8741 (patch_return): Don't convert booleans to integers, and don't
8742 special-case `null'.
8743
38be19f6
JM
87442001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8745
8746 * config-lang.in (diff_excludes): Remove.
8747
b11cc610
JM
87482001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
8749
8750 * gcj.texi: Update link to GCC manual.
8751
e97562f5
TT
87522001-12-17 Tom Tromey <tromey@redhat.com>
8753
8754 * parse.y (link_nested_class_to_enclosing): Removed useless
8755 statement.
8756
2c5187c5
TT
87572001-12-16 Tom Tromey <tromey@redhat.com>
8758
8759 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8760 Fixes PR java/5088.
8761
a83f01f0
JM
87622001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
8763
8764 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8765 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8766 spelling errors.
8767
faf31866
KG
87682001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8769
8770 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8771
9a8de998
BM
87722001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8773
8774 * decl.c (java_init_decl_processing): Build otable_type correctly.
8775 otable_decl is an otable_type.
8776
861ef928
BM
87772001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8778
8779 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
e1886ae0 8780 otable_type, otable_ptr_type, method_symbol_type,
861ef928
BM
8781 method_symbols_array_type, method_symbols_array_ptr_type): New
8782 field/global tree definitions.
8783 (flag_indirect_dispatch): New flag.
e1886ae0 8784 * decl.c (java_init_decl_processing): Initialize new otable and
861ef928
BM
8785 otable_syms type nodes and decls. Add new field "index" to
8786 method_type_node.
8787 * class.c (build_method_symbols_entry): New function.
8788 (make_method_value): Set "index" to to method's vtable index for
8789 virtual methods when indirect-dispatch is not used.
a83f01f0 8790 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
861ef928
BM
8791 and set vtable_method_count to -1. Set otable and otable_syms field
8792 if indirect-dispatch is used and there was something to put in them.
8793 (build_method_symbols_entry): New function.
8794 (emit_offset_symbol_table): New function.
8795 * expr.c (get_offset_table_index): New function.
e1886ae0 8796 (build_invokevirtual): Build array reference to otable at the index
861ef928
BM
8797 returned by get_offset_table_index, and use the result as the vtable
8798 offset.
8799 (build_invokeinterface): Similar.
e1886ae0
AJ
8800 * jcf-parse.c (yyparse): If indirect-dispatch, call
8801 emit_offset_symbol_table at the end of compilation, after all classes
861ef928
BM
8802 have been generated.
8803 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8804 * lang.c (flag_indirect_dispatch): Define.
8805 (lang_f_options): Add indirect-dispatch flag.
8806
f1727481
MK
88072001-12-14 Matthias Klose <doko@debian.org>
8808
8809 * gcj.texi: Markup for man page generation. Document missing
8810 options printed by <tool> --help.
8811 Terminate description of gij's -ms option with a dot.
8812 * Make-lang.in ($(srcdir)/java/*.1): New targets.
8813 (java.generated-manpages java.install-man, java.uninstall,
8814 java-maintainer-clean) Updated.
8815
eec87542
HB
88162001-12-14 Hans Boehm <Hans_Boehm@hp.com>
8817
8818 * class.c (get_dispatch_table): Fix java vtable layout
8819 for TARGET_VTABLE_USES_DESCRIPTORS.
8820 * decl.c (java_init_decl_processing): Initialize
8821 alloc_no_finalizer_node, finalize_identifier_node.
8822 * expr.c (class_has_finalize_method): New function.
8823 (expand_java_NEW): Generate calls for finalizer-free allocation.
8824 (build_invokevirtual): Fix java vtable layout for
8825 TARGET_VTABLE_USES_DESCRIPTORS.
e1886ae0 8826 * java-tree.h (enum java_tree_index): New entries:
eec87542
HB
8827 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8828 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8829 (class_has_finalize_method): declare.
8830 (HAS_FINALIZER_P): New macro.
8831 * parse.y (patch_invoke): Generate calls for finalizer-free
8832 allocation.
8833
81deb0a3
MK
88342001-12-12 Matthias Klose <doko@debian.org>
8835
8836 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8837 whitespace at end of line.
8838
34026199
TT
88392001-12-11 Tom Tromey <tromey@redhat.com>
8840
8841 * lex.c (java_init_lex): Define wfl_to_string as
8842 gnu.gcj.runtime.StringBuffer unless generating bytecode.
8843
a3bcfa67
JS
88442001-12-11 Jeff Sturm <jsturm@one-point.com>
8845
8846 * class.c (make_method_value): Use null_pointer_node to
8847 represent empty exception table.
8848
3afdfae8
TT
88492001-12-10 Tom Tromey <tromey@redhat.com>
8850
8851 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8852
62c9aa5f 88532001-12-10 Douglas B. Rupp <rupp@gnat.com>
96a9c44f
DR
8854
8855 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8856
a5cb134d
PB
88572001-12-09 Per Bothner <per@bothner.com>
8858
8859 * check-init.c (current_switch_has_default): New static field.
8860 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
8861 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
8862 DEFAULT_EXPR seen, simulate a default alternative that copies state.
8863
1aca9b81
TT
88642001-12-09 Tom Tromey <tromey@redhat.com>
8865
8866 * check-init.c (check_init): Don't allow pre- or post- increment
8867 or decrement of final variable.
8868 (final_assign_error): Minor error message rewording.
8869
4440ffc4
TT
88702001-12-08 Tom Tromey <tromey@redhat.com>
8871
0854b1c4
TT
8872 * java-tree.h: Fixed typo.
8873
5fcab235
TT
8874 * gjavah.c (decompile_method): Don't decompile to `return this'
8875 for static methods.
8876
7b35f6c9
TT
8877 * gjavah.c (cxx_keywords): Re-sorted.
8878 * lex.c (cxx_keywords): Re-sorted.
8879
897c9e66
TT
8880 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8881 else.
8882
4440ffc4
TT
8883 * gjavah.c (print_namelet): Clear subnamelets.
8884 (HANDLE_METHOD): Set `method_printed' earlier.
8885
8f25dc28
TT
88862001-12-07 Tom Tromey <tromey@redhat.com>
8887
8888 * lang.c (lang_f_options): Added
8889 optimize-static-class-initialization.
8890 (java_decode_option): Removed special case.
8891
a9040c77
PB
88922001-12-07 Per Bothner <per@bothner.com>
8893
8894 * check-init.c (check_init): Fix typo freeing memory twice.
8895
5412ef6b
PB
88962001-12-05 Per Bothner <per@bothner.com>
8897
8898 Restore support for static class initialization optimization.
8899 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8900 * check-init.c (check_int): At end of BLOCK handle initialization
8901 blocks, which used to be done in java_complete_expand_method but did
8902 not handle the case where check_for_initialization might allocate
8903 more than a word of bits.
8904 * decl.c (lang_make_tree): The smic field is now a tree.
8905 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
8906 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
8907
8908 * parse.y (emit_test_initialization): Combine hash_lookup calls.
8909
8910 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8911 Change from a hash table to a list.
8912 (struct_lang_decl): Change field 'smic' to match.
8913 * class.c (add_method_1): Initialize
8914 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8915 * parse.y (adjust_init_test_initialization): Removed - inlined into -
8916 (java_expand_method_bodies): -here, since 'smic' is now a list.
8917 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
8918
8919 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
8920
8921 * class.c (java_hash_compare_tree_node): Fix casts.
8922
4f88ccda
PB
89232001-12-04 Per Bothner <per@bothner.com>
8924
8925 * check-init.c: Handle definite unassignment to finals in addition
8926 to definite assignment.
8927 (loop_current_locals): New field.
8928 (num_current_locals, int start_current_locals, num_current_words):
8929 Make static.
8930 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
8931 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8932 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
8933 (get_variable_decl, check_final_reassigned): New functions.
8934 (check_init, check_bool_init): Modify as needed for checking finals.
8935 (check_for_initialization): Take extra parameter and return void.
8936 Do extra start-up logic to check final fields for assignment.
8937 * parse.y (check_static_final_variable_assignment_flag,
8938 reset_static_final_variable_assignment_flag, check_final_assignment,
8939 check_final_variable_local_assignment_flag,
8940 reset_final_variable_indirect_assignment_flag,
8941 reset_final_variable_global_assignment_flag): Remove functions.
8942 (java_complete_expand_methods, outer_field_access_fix,
8943 patch_assignment): Remove no-longer used logic.
8944 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
8945 * parse.y (register_fields, java_complete_tree): Update accordingly.
8946
8947 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
8948 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
8949 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
8950
8951 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
8952
8953 * java-tree.h (DECL FINAL): New bit-field.
8954 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
8955 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
8956 (DECL_INIT_CALLS_THIS): New macro.
8957 (struct lang_decl): New bit-field init_calls_this.
8958 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8959 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8960 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
8961 use it for both local variables and final fields.
8962 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
8963 and local_final.
8964 (struct lang_type): Remove hfv bit-field.
8965 (check_for_initialization): Change to return void.
8966
8967 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
8968 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
8969 * check-init.c (final_assign_error): New helper function.
8970 (check_final_reassigned, check_init): Use it.
8971 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
e1886ae0 8972
4f88ccda
PB
8973 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
8974 bit-fields to unsigned.
8975
87d4ad08
PB
89762001-12-03 Per Bothner <per@bothner.com>
8977
8978 * parse.y (patch_binop): Minor constant folding.
8979
8980 * parse.y (build_current_thisn): Shorter 'buffer'.
8981
aedcdb65
PB
89822001-12-03 Per Bothner <per@bothner.com>
8983
8984 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
8985 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8986 * jcf-write.c (generate_bytecode_insns): Remove support for
8987 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8988 * check-init.c (check_init): Likewise.
8989
82ff672e
PB
89902001-12-03 Per Bothner <per@bothner.com>
8991
8992 * verify.c (subroutine_nesting): New function.
8993 (verify_jvm_instructions): Use it to fix logic for checking that
8994 we're done with the current subroutine.
8995
8996 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8997 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8998
98a63868
PB
89992001-12-03 Per Bothner <per@bothner.com>
9000
9001 * jcf.h: Fix obvious typo in comment.
9002 * typeck.c (build_null_signature): Add comment.
9003
c725bd79
NB
90042001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
9005
9006 * expr.c: Remove leading capital from diagnostic messages, as
9007 per GNU coding standards.
9008 * jcf-io.c: Similarly.
9009 * jcf-parse.c: Similarly.
9010 * jv-scan.c: Similarly.
9011 * jvspec.c: Similarly.
9012 * mangle.c: Similarly.
9013
b736dee6
TCH
90142001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
9015 Alexandre Petit-Bianco <apbianco@redhat.com>
9016
e1886ae0 9017 * expr.c (build_java_arrayaccess): Call save_expr on array for
7e5f4bee 9018 correct evaluation order, modified comment, fixed indentation.
b736dee6
TCH
9019 * parse.y: (patch_assignment): Correctly extract the array base
9020 from the tree generate by build_java_arrayaccess, added comments.
9021 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9022 Fixes PR java/3096, PR java/3803, PR java/3965.
9023
357351e5
NB
90242001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
9025
9026 * expr.c (expand_byte_code): Remove trailing periods from messages.
9027 * jcf-parse.c (load_class, jcf_parse): Similarly.
9028 * jcf-write.c (generate_classfile): Similarly.
9029 * lex.c (java_lex): Similarly.
9030
a7c5337d
BM
90312001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9032
9033 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9034
d3945f0a
JM
90352001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
9036
9037 * Make-lang.in (java.generated-manpages): New dummy target.
9038
b856c15d
RO
90392001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9040
9041 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9042 ASM_FINAL_SPEC.
9043 (lang_specific_pre_link): Use set_input to set input_filename.
9044 Append `main' here.
9045 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9046 (main): Fix definition.
9047 Strip `main' from classname.
9048 Fixes PR java/227.
9049
9c2fcf09
RS
90502001-11-18 Roger Sayle <roger@eyesopen.com>
9051
9052 * parse.h (java_expand_switch): Remove old prototype.
9053
8aeb42d0
TT
90542001-11-18 Tom Tromey <tromey@redhat.com>
9055
9056 Fix for PR java/1401:
9057 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9058 arg0 is null.
9059 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9060 correctly.
9061
22703ccc
NB
90622001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
9063
9064 * lang.c (finish_parse): Rename to java_finish.
9065 (LANG_HOOKS_FINISH, java_finish): New.
9066
f5e99456
NB
90672001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
9068
9069 * decl.c (init_decl_processing): Rename java_init_decl_processing.
9070 * java-tree.h: New prototype.
9071 * lang.c (java_init): Update prototype. Combine with old init_parse.
9072
150f086d
TT
90732001-11-13 Tom Tromey <tromey@redhat.com>
9074
9075 * gjavah.c (method_signature): New global.
9076 (HANDLE_METHOD): Set it.
9077 (decompile_return_statement): New function.
9078 (decompile_method): Use it.
9079 (print_method_info): Removed `synth' argument.
9080
5d69f816
NB
90812001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9082
9083 * java-tree.h (java_set_yydebug): New.
9084 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9085 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9086 (print_lang_decl, print_lang_type, print_lang_identifier,
9087 print_lang_statistics, lang_print_xnode): Remove.
9088
3ac88239
NB
90892001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
9090
9091 * jcf-parse.c (init_lex): Remove.
9092 * lang.c (language_string, lang_identify): Remove.
9093 (struct lang_hooks): Constify.
9094 (LANG_HOOKS_NAME): Override.
9095 (init_parse): Update.
9096
b21d216c
AF
90972001-11-08 Andreas Franck <afranck@gmx.de>
9098
e1886ae0 9099 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
b21d216c
AF
9100 program_transform_name the way suggested by autoconf.
9101 (java.install-common): Also transform auxiliary program names with
9102 program_transform_name.
9103
1fa73144
TT
91042001-11-08 Tom Tromey <tromey@cygnus.com>
9105
9106 * parse.y (trap_overflow_corner_case): New rule.
9107 (unary_expression): Use it.
9108 * lex.c (java_init_lex): Don't set minus_seen.
9109 (yylex): Don't use minus_seen. Communicate overflow to parser for
9110 it to handle.
9111 (error_if_numeric_overflow): New function.
9112 * parse.h (minus_seen): Removed field.
9113 (JAVA_RADIX10_FLAG): New define.
9114
5a21a051
TT
91152001-11-07 Tom Tromey <tromey@redhat.com>
9116
9117 Patch for PR java/1414:
9118 * parse.y (case_label_list): New global.
9119 (goal): Register case_label_list with GC.
9120 (java_complete_lhs): Save new case on case_label_list.
9121 (patch_switch_statement): Check for duplicate case labels.
9122
5573cb39
APB
91232001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9124
9125 * parse.y (patch_assignment): Removed unused third argument.
9126 (java_complete_lhs): Removed unused third argument to patch_assignment.
9127
d23c55c2
NB
91282001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
9129
9130 * lang.c: Include langhooks-def.h.
9131 * Make-lang.in: Update.
9132
5b7874aa
ZW
91332001-10-31 Zack Weinberg <zack@codesourcery.com>
9134
9135 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9136
2b472f91
BM
91372001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9138
9139 * mangle.c (find_compression_record_match): Don't match compression
9140 records for package name elements unless they occur at the start of
9141 the name. Fix for PR java/4717.
9142
961b8e70
BM
91432001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9144
9145 * expr.c (expand_java_field_op): Don't special-case references to
9146 java.lang.PRIMTYPE.TYPE.
9147 (build_primtype_type_ref): Removed.
9148 * java-tree.h (build_primtype_type_ref): Remove prototype.
9149 * parse.y (maybe_build_primttype_type_ref): Removed.
9150 (complete_function_arguments): Don't special-case references to
9151 java.lang.PRIMTYPE.TYPE.
9152 (patch_assignment): Likewise.
9153 (array_constructor_check_entry): Likewise.
9154
98f705b9
APB
91552001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9156
9157 * mangle.c (static tree compression_table): Fixed leading comment.
9158 * parse.h (struct parser_ctxt): Fixed field comment.
9159 * parse.y (check_pkg_class_access): New prototype, fixed leading
9160 comment, new parameter used to emit error only if passed as true.
9161 (parse_check_super): Pass extra argument to check_pkg_class_access.
9162 (do_resolve_class): Likewise.
9163 (process_imports): Likewise.
9164 (read_import_dir): Fixed indentation.
9165 (find_in_imports_on_demand): New local class_type_name. Local
9166 node_to_use deleted. while loop changed into for loop. Report
9167 multiple definition only for accessible classes. Improved error
9168 message.
9169 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9170 assigned to parameter list, fixed indentation. while loop changed
9171 into for loop, restore TREE_CHAIN on local `tem' before the next
9172 iteration.
9173
62c9aa5f 91742001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8ac61af7
RK
9175
9176 * lang.c (lang_get_alias_set): Deleted.
9177
0df6c2c7
KG
91782001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9179
299b5f9e
KG
9180 * gjavah.c (jni_print_char): Fix thinko in last change.
9181
0df6c2c7
KG
9182 * gjavah.c (jni_print_char, decode_signature_piece): Use
9183 safe-ctype macros and/or fold extra calls into fewer ones.
9184 * lex.c (java_read_unicode, java_lex): Likewise.
9185 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9186 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9187 * mangle_name.c (append_unicode_mangled_name,
9188 unicode_mangling_length): Likewise.
9189
17ed6335
RH
91902001-10-17 Richard Henderson <rth@redhat.com>
9191
9192 * Make-lang.in (java/lang.o): Depend on langhooks.h.
9193
c83303d8
APB
91942001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9195
9196 * lang.c (langhooks.h): Included.
9197 (LANG_HOOKS_INIT): Redefined.
9198 (LANG_HOOKS_INIT_OPTIONS): Likewise.
9199 (LANG_HOOKS_DECODE_OPTION): Likewise.
9200 (struct lang_hooks lang_hooks): New initialization.
9201
be98560f
PB
92022001-10-11 Per Bothner <per@bothner.com>
9203
89b894e1
PB
9204 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
9205 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9206 The former is simpler, and jcf-write.c handles it better.
9207 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
9208 or WITH_CLEANUP_EXPR.
9209 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
9210 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9211
be98560f
PB
9212 * parse.y (patch_if_else_statement): If the condition is constant,
9213 optimize away the test.
9214
3fb5c0eb
APB
92152001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9216
9217 * parse.y (patch_cast): Call patch_string on the first operand of
c83303d8 9218 the incoming node, update it if necessary. Fixes PR java/4510.
3fb5c0eb 9219
908fecca
BM
92202001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9221
9222 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9223 when name qualifier matches a package name.
9224
f3ca28bf
TT
92252001-10-08 Tom Tromey <tromey@redhat.com>
9226
9227 Fix for PR java/4489:
9228 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9229 force a new label when computing `body_block'.
9230
8b60264b
KG
92312001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9232
9233 * jcf-io.c (format_uint): Const-ify.
9234 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9235 * lex.c (java_get_line_col): Likewise.
9236 * parse.y (build_incdec): Likewise.
9237
3fb5c0eb
APB
92382001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9239
9240 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
c83303d8 9241 a NULL enclosing context if appropriate. Fixes PR java/4466.
3fb5c0eb 9242
7754e0a9
APB
92432001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9244
9245 * parse.y (patch_assignment): Use lvalue's original TYPE when
9246 building the final COMPOUND_EXPR.
9247 (try_reference_assignconv): Fixed leading comment.
9248
e9546ca4
APB
92492001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9250
9251 * parse.y (check_final_variable_indirect_assignment): For
9252 COMPOUND_EXPR, return only if finals were found initialized
9253 properly, if not, keep on checking.
9254 (check_final_variable_global_assignment_flag): New local
9255 error_found, set when appropriate and used to decide whether to
9256 report uninitialized finals. Fixed typo in comment.
9257
f6a67a81
APB
92582001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9259
9260 * decl.c (init_decl_processing): Fixed typo in predef_filenames
9261 last three initializations. Fixes PR java/4360.
9262
67231816
RH
92632001-09-21 Richard Henderson <rth@redhat.com>
9264
9265 * class.c (get_dispatch_table): Handle function descriptors.
9266 (build_dtable_decl): Likewise.
9267 * expr.c (build_invokevirtual): Likewise.
9268
870a5b8a
APB
92692001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9270
9271 * parse.y (patch_method_invocation): Build class initialization
9272 when static finals are used to qualify method invocation.
9273 Fixes PR java/4366.
9274
2e3b2d2c
APB
92752001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
9276
9277 * parse.h: (WFL_STRIP_BRACKET): Re-written using
9278 build_type_name_from_array_name.
9279 (STRING_STRIP_BRACKETS): New macro.
9280 * parse.y (build_type_name_from_array_name): New function.
9281 (array_creation_expression:): Accumulate []s instead of [s.
9282 (cast_expression:): Accumulate []s instead of [s after cast type
9283 name.
9284 (build_array_from_name): Local string deleted, use
9285 build_type_name_from_array_name.
9286 (build_unresolved_array_type): Accumulate []s instead of [s after
9287 type name.
9288 (register_fields): Fixed comment.
9289 (resolve_class): Local name, base deleted, new locals tname and
9290 array_dims. Use build_type_name_from_array_name. Use array_dims to
9291 build array type.
9292 (purify_type_name): Use STRING_STRIP_BRACKETS.
9293
e64c46ce
AJ
92942001-09-18 Andreas Jaeger <aj@suse.de>
9295
9296 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9297 * jv-scan.c: Likewise.
9298
3fb5c0eb
APB
92992001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9300
9301 * parse.y (patch_method_invocation): Inner class creation context
9302 check not enforced within constructors. Fixes PR java/1873.
9303
7a91449c
TT
93042001-09-16 Tom Tromey <tromey@redhat.com>
9305
9306 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9307 NOTE_PUSH for single-case push. Fixes PR java/4189.
9308
653d5d95
APB
93092001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9310
9311 * java-tree.h (TYPE_IMPORT_LIST): New macro.
9312 (TYPE_IMPORT_DEMAND_LIST): Likewise.
9313 (struct lang_type): New fields import_list and import_demand_list.
9314 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9315 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9316 (do_resolve_class): New local saved_enclosing_type, initialized,
9317 passed as parameter to find_in_imports and find_in_imports_on_demand.
9318 (find_in_imports): Added paramater enclosing_type, use its
9319 TYPE_IMPORT_LIST when applicable.
9320 (find_in_imports_on_demand): Added parameter enclosing_type, use
9321 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9322 declaration and initialization.
9323 (fold_constant_for_init): Switch/restore current_class to the
9324 appropriate context.
9325
6d334db8
MM
93262001-09-13 Mark Mitchell <mark@codesourcery.com>
9327
9328 * verify.c (verify_jvm_instructions): Fix typo.
9329
83182544
KG
93302001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9331
9332 * expr.c (expand_invoke): Const-ification.
9333 * parse.y (patch_method_invocation): Likewise.
9334
fd033052
KG
93352001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9336
9337 * gjavah.c (cxx_keywords): Const-ification.
9338 * keyword.gperf (java_keyword): Likewise.
9339 * lang.c (java_tree_code_name): Likewise.
9340 * lex.c (cxx_keywords): Likewise.
9341 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9342
fcbc317f
RH
93432001-09-11 Richard Henderson <rth@redhat.com>
9344
9345 * parse.h (ctxp_for_generation): Mark extern.
9346
c347e68d
RH
93472001-09-10 Richard Henderson <rth@redhat.com>
9348
9349 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9350
6a9f6727
MK
93512001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9352
9353 * typeck.c (java_array_type_length, build_prim_array_type):
9354 Represent empty arrays by NULL index.
9355
0ef02b2d
APB
93562001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
9357
9358 * java-tree.h (compile_resource_file): Grouped with other prototypes.
e64c46ce 9359 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
0ef02b2d 9360
f2767a67
AG
93612001-09-06 Anthony Green <green@redhat.com>
9362
9363 * class.c (O_BINARY): Define if necessary.
9364 (registerResource_libfunc): Declare.
9365 (init_class_processing): Initilize registerResource_libfunc.
9366 (compile_resource_file): New function.
9367 * java-tree.h (resource_name): Declare.
9368 (compile_resource_file): Declare.
9369 * jcf-parse.c (yyparse): Handle compiling java resource files.
9370 * lang.c (java_decode_option): Handle -fcompile-resource option.
9371 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9372 resource files.
9373 * gcj.texi (Code Generation): Add documentation for -R flag.
9374
731866ba
APB
93752001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9376
9377 * jcf-write.c (generate_classfile): Issue an error in case of
9378 field/initial value mismatch.
9379 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9380 being initialized and we're generating bytecode.
9381 (java_complete_lhs): In MODIFY_EXPR section: added comments,
9382 set DECL_INITIAL properly when appropriate.
9383 Fixes PR java/4230
9384 Fixes PR java/4204
9385
0286a91d
PB
93862001-09-01 Per Bothner <per@bothner.com>
9387
9388 * parse.y (maybe_yank_clinit): A field without an initializer is not
9389 relevant. All initializers except static final and constant require
9390 <clinit>, regardless of flag_emit_class_files.
9391
289b57ee
PB
93922001-08-31 Per Bothner <per@bothner.com>
9393
67264b4f 9394 * class.c (set_constant_value): When not emitting class files, then a
289b57ee
PB
9395 String ConstantValue is a utf8const_ptr_type.
9396
be0c7ff4
PB
93972001-08-30 Per Bothner <per@bothner.com>
9398
9399 * jcf-write.c (generate_classfile): Check that field is primitive
9400 or string before emitting ConstantValue attribute.
e64c46ce 9401
f0cdee96
PB
94022001-08-30 Per Bothner <per@bothner.com>
9403
9404 * parse.y (resolve_qualified_expression_name): If creating a
9405 COMPOUND_EXPR, set it's type correctly.
9406
bc8a5e56
PB
94072001-08-30 Per Bothner <per@bothner.com>
9408
9409 * jcf-io.c (open_class): Set filename field.
9410
9411 * jcf-parse,c (parse_class_file): Set current_function_decl
9412 for better error message when Code attribute is missing.
9413
9414 * lang.c (put_decl_node, lang_print_error): Re-arrange for
9415 better diagnostics, especially for constructors.
e64c46ce 9416
1b9ee723
PB
94172001-08-30 Per Bothner <per@bothner.com>
9418
9419 * jcf-write.c (generate_classfile): Don't write ConstantValue
9420 attribute if field is not final, for compatibility with jdk.
9421
9422 * jcf-write.c (generate_classfile): Convert ConstantValue values
9423 to correct type. Work-around for front-end bug.
9424 * class.c (set_constant_value): Error if constant has wrong type.
9425
6e4302ec
PB
94262001-08-30 Per Bothner <per@bothner.com>
9427
9428 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
9429 "Double" are printed at verbosity 1.
9430
9431 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
9432
9433 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
9434
3ed218d4
APB
94352001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
9436
9437 * parse.y (patch_assignment): Don't verify final re-assignment here.
9438 (java_complete_lhs): Verify assignments to finals calling
9439 patch_assignment. Verify re-assignments to finals before calling
9440 patch_assignment.
9441
94422001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
9443
9444 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9445 Fixes PR java/1413
9446
94472001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
9448
9449 * lex.c (java_lex): new local found_hex_digits. Set and then used
9450 in test to reject invalid hexadecimal numbers.
9451 * parse.y (java_complete_tree): Prevent unwanted cast with
9452 initialized floating point finals.
9453 (patch_binop): Emit a warning when detecting a division by zero,
9454 mark result not constant, don't simplify non integer division.
9455
1a27eec1
PB
94562001-08-28 Per Bothner <per@bothner.com>
9457
9458 * jcf-write.c (generate_bytecode_insns): For increments and
9a07cfaf 9459 decrements just recurse to push constant. Improvement on Mark's patch.
1a27eec1 9460
06657dcd
MM
94612001-08-28 Mark Mitchell <mark@codesourcery.com>
9462
9463 * jcf-write.c (generate_bytecode_insns): Generate an integer to
9464 real conversion for increments and decrements of reals.
9465
1ca09b48
APB
94662001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9467
9468 * parse.y (resolve_qualified_expression_name): Handle unresolved
9469 qualified expressions, prevent numerical qualifiers, fixed typo.
9470 Fixes PR java/4141
9471
7b02957e
APB
94722001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
9473
9474 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9475 don't report anything but deprecated class when marked so. Handle
9476 VAR_DECL.
9477 (patch_method_invocation): Check deprecation on methods and types.
9478 (patch_binop): code becomes an enum tree_code, added default: to
9479 switch to handle that. Detect division by zero, try to fold and
9480 return before using a subroutine.
9481
496849ba
APB
94822001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
9483
9484 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
e64c46ce 9485 file smaller than 4 bytes.
496849ba
APB
9486 * parse.y (check_inner_circular_reference): New function.
9487 (check_circular_reference): Likewise.
9488 (array_initializer:): Accept {,}.
9489 (java_check_circular_reference): Rewritten using
9490 check_circular_reference and check_inner_circular_reference.
9491 (java_complete_expand_method): Unconditionally save and restore
9492 the unpurged exception list.
9493 (build_dot_class_method_invocation): Unmangle signature parameter.
9494
66b461ce
TT
94952001-08-21 Tom Tromey <tromey@redhat.com>
9496
9497 * decl.c (init_decl_processing): Add `throws' field to method
9498 descriptor.
9499 * class.c (make_method_value): Compute `throws' field for method.
9500
df1c5346
APB
95012001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
9502
9503 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9504 circularity is detected.
9505 (ctors_unchecked_throws_clause_p): Fixed leading comment.
9506
c8af3574
RH
95072001-08-17 Richard Henderson <rth@redhat.com>
9508
9509 * class.c (emit_register_classes): Add align parameter to
9510 call to assemble_integer.
9511
17126208
APB
95122001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
9513
9514 * jcf-parse.c (load_class): New locals saved and class_loaded. If
9515 loading a class_or_name fails, try considering an innerclass name
9516 and load the enclosing context.
9517 * parse.y (resolve_inner_class): New function.
9518 (find_as_inner_class): Added leading comment.
9519 (register_incomplete_type): Keep the current context as enclosing
9520 context for JDEP_FIELD dependencies.
9521 (do_resolve_class): Locals new_class_decl and super initialized to
9522 NULL. Call resolve_inner_class, explore the enclosing context
9523 superclass if necessary.
9524 Fixes PR java/4007
9525
4266d0b2
TT
95262001-08-16 Tom Tromey <tromey@redhat.com>
9527
9528 * jcf-dump.c (main): Updated for change to jcf_path_seal.
9529 * gjavah.c (main): Updated for change to jcf_path_seal.
9530 * lang.c (version_flag): New global.
9531 (java_decode_option): Recognize `-version'.
9532 (java_init): Update for change to jcf_path_seal.
9533 * jcf.h (jcf_path_seal): Added `print' argument.
9534 * jcf-path.c (jcf_path_seal): Added `print' argument.
9535
e78d8e51
ZW
95362001-08-13 Zack Weinberg <zackw@panix.com>
9537
9538 * Make-lang.in (java/decl.o): Update dependencies.
9539 * decl.c: Include libfuncs.h, don't include toplev.h.
9540
17126208
APB
95412001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9542
9543 * decl.c (init_decl_processing): exception_type_node,
9544 class_not_found_type_node, and no_class_def_found_type_node
9545 initialized. predef_filenames augmented accordingly.
9546 instinit_identifier_node initialized.
9547 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9548 * java-tree.h (enum java_tree_index): New entries
9549 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9550 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9551 (exception_type_node): New macro.
9552 (class_not_found_type_node): Likewise.
9553 (no_class_def_found_type_node): Likewise.
9554 (instinit_identifier_node): Likewise.
9555 (PREDEF_FILENAMES_SIZE): Adjusted.
9556 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9557 (struct lang_type): Fixed typo in bitfield name.
9558 (DECL_INSTINIT_P): New macro.
9559 (ID_INSTINIT_P): Likewise.
9560 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9561 attribute.
9562 * parse.y (encapsulate_with_try_catch): New function.
9563 (generate_instinit): Likewise.
9564 (build_instinit_invocation): Likewise.
9565 (ctors_unchecked_throws_clause_p): Likewise.
9566 (add_instance_initializer): Deleted.
9567 (build_instance_initializer): Likewise.
9568 (in_instance_initializer): Likewise.
9569 (check_method_redefinition): instinit$ not to be verified.
9570 (java_complete_expand_methods): Generate instinit$, simplified code.
9571 (build_dot_class_method): Eliminated unnecessary locals. Use
9572 encapsulate_with_try_catch, removed unnecessary code.
9573 (fix_constructors): New local iii. Use build_instinit_invocation.
9574 (patch_method_invocation): Added comment.
9575 (maybe_use_access_method): Don't consider instinit$.
9576 (find_applicable_accessible_methods_list): Shorten the search for
9577 instinit$ too.
9578 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9579 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9580 (patch_throw_statement): Likewise. Fixed typo.
e64c46ce 9581
6ba57472
DE
95822001-08-12 David Edelsohn <edelsohn@gnu.org>
9583
9584 Revert:
9585 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9586 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9587 ASM_FINAL_SPEC.
9588 (lang_specific_pre_link): Use set_input to set input_filename.
9589 Append `main' here.
9590 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9591 (main): Fix definition.
9592 Strip `main' from classname.
9593 Fixes PR java/227.
9594
94aca342
ZW
95952001-08-11 Zack Weinberg <zackw@panix.com>
9596
9597 * lex.h: Don't include setjmp.h. Don't define
9598 SET_FLOAT_HANDLER or prototype set_float_handler.
9599
17126208
APB
96002001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9601
9602 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9603 `poplevel' in the right order.
9604
2cc07db4
RH
96052001-08-09 Richard Henderson <rth@redhat.com>
9606
9607 * Make-lang.in (class.o): Depend on TARGET_H.
9608 * class.c (emit_register_classes): Use target hooks instead of
9609 assemble_constructor and assemble_destructor.
9610
4009bb7d
APB
96112001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
9612
9613 * check-init.c (flags.h): Include
9614 (check_init): Don't report uninitialized static class
9615 initialization flags, don't free bit index when doing static class
9616 initialization optimization.
9617 (check_for_initialization): Return type changed to `unsigned int.'
9618 (attach_initialized_static_class): New function.
9619 * class.c (add_method_1): Create the initialized static class
9620 table if necessary.
9621 (finish_class): Always emit deferred inline methods.
9622 * decl.c (emit_init_test_initialization): Moved to expr.c
9623 (complete_start_java_method): Don't traverse
9624 DECL_FUNCTION_INIT_TEST_TABLE.
9625 (lang_mark_tree): Mark hash tables in function decls.
9626 * expr.c (emit_init_test_initialization): Moved from decl.c.
9627 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9628 initialization flag, set DECL_CONTEXT and
9629 LOCAL_CLASS_INITIALIZATION_FLAG.
9630 (java_lang_expand_expr): Emit initialization code for static class
9631 initialized flags when entering block, if necessary.
9632 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9633 * java-tree.h (flag_optimize_sci): New global variable declaration.
9634 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9635 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9636 (LOCAL_FINAL_P): Fixed typo in comment.
9637 (FINAL_VARIABLE_P): Likewise.
9638 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9639 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9640 (struct lang_decl): New fields `ict', `smic' and `cif.'
9641 (check_for_initialization): New returned value for global.
9642 (attach_initialized_static_class): New global function.
9643 (STATIC_CLASS_INIT_OPT_P): New macro.
9644 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9645 * lang.c (java_decode_option): Handle
9646 `-fno-optimize-static-class-initialization'
9647 * parse.y (start_complete_expand_method): New function.
9648 (java_expand_method_bodies): Likewise.
9649 (attach_init_test_initialization_flags): Likewise.
9650 (adjust_init_test_initialization): Likewise.
9651 (emit_test_initialization): Likewise.
9652 (java_complete_expand_methods): Nullify abstract and native method
9653 bodies.
9654 (java_complete_expand_method): New locals `fbody', `block_body'
9655 and `exception_copy.' Reorganized: directly return on empty method
9656 bodies, call `start_complete_expand_method', remember definitely
9657 initialized static class in function, don't expand method bodies.
9658 (java_expand_classes): Call `java_expand_method_bodies' before
9659 `finish_class' when compiling to native.
9660 (resolve_expression_name): Use `orig' after building outer class
9661 field access.
67264b4f 9662 (patch_invoke): Remember static method invocations.
4009bb7d 9663
47907859
RH
96642001-08-06 Richard Henderson <rth@redhat.com>
9665
9a07cfaf 9666 * class.c (emit_register_classes): Pass a symbol_ref and priority
47907859
RH
9667 to assemble_constructor.
9668
36e10d77
APB
96692001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
9670
9671 * java-tree.h (all_class_filename): New macro.
9672 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9673 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9674 newly created IDENTIFIER_NODE to `all_class_filename.'
9675
f2f25b6d
JS
96762001-08-01 Jeff Sturm <jsturm@one-point.com>
9677
9a07cfaf
RH
9678 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9679 Use ggc_add_tree_root to register roots.
e64c46ce 9680
6ad7895a
APB
96812001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9682
9683 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9684 second operand calling check_init.
9685 * decl.c (complete_start_java_method): Swaped second and third
9686 arguments while creating WITH_CLEANUP_EXPR node.
9687 * jcf-write.c (generate_bytecode_insns): Use second operand
9688 instead of third when handling WITH_CLEANUP_EXPR.
9689 * parse.y (java_complete_lhs): Expand second operand of
9690 WITH_CLEANUP_EXPR nodes.
9691 (patch_synchronized_statement): Swaped second and third arguments
9692 while creating WITH_CLEANUP_EXPR node.
9693
9d7d8362
APB
96942001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
9695
9696 * parse.y (create_interface): Avoid cyclic inheritance report when
9697 syntax error encountered during class definition.
9698 Fixes PR java/2956
9699
578672a2
RO
97002001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9701
9702 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9703 ASM_FINAL_SPEC.
9704 (lang_specific_pre_link): Use set_input to set input_filename.
9705 Append `main' here.
9706 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9707 (main): Fix definition.
9708 Strip `main' from classname.
9709 Fixes PR java/227.
9710
6a65ea5b
TT
97112001-07-18 Tom Tromey <tromey@redhat.com>
9712
9713 For PR java/2812:
9714 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9715 * lex.c (java_new_lexer): Use ICONV_CONST.
9716 (java_read_char): Likewise.
9717 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9718 (jv-scan$(exeext)): Likewise.
9719
9d7d8362
APB
97202001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9721
9722 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9723 * parse.y (check_class_interface_creation): Allow `private' if the
9724 enclosing is not an interface.
9725 (create_interface): Interface tagged public if the enclosing
9726 context is an interface.
9727 (create_class): Class tagged public if the enclosing context
9728 is an interface.
9729 Fixes PR java/2959
9730
97312001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9732
9733 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9734 Fixes PR java/2665
9735
e6290e74
TJ
97362001-07-14 Tim Josling <tej@melbpc.org.au>
9737
9738 * check-init.c (check_init): Remove references to EXPON_EXPR.
9739
9d7d8362
APB
97402001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9741
9742 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9743 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9744 Fixes PR java/3602
9745
4b2dc1b2
TT
97462001-07-13 Tom Tromey <tromey@redhat.com>
9747
9748 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9749 invocation.
9750
b6e3e1ff
APB
97512001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9752
9753 * parse.y (patch_method_invocation): Don't override primary if one
9754 is already provided, but let this$<n> be built. Fixed comment.
9755
97562001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9757
9758 * parse.y (empty_statement:): Report empty statement error only
9759 when found at class declaration level.
9760 Fixes PR java/3635
9761
a3cb5122
TT
97622001-07-12 Tom Tromey <tromey@redhat.com>
9763
9764 * expr.c (expand_load_internal): New function.
9765 (LOAD_INTERNAL): Use it.
9766
29fcdaae
APB
97672001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
9768
9769 * parse.y (verify_constructor_super): Compare anonymous class ctor
9770 args with `valid_method_invocation_conversion_p.'
9771 Fixes PR java/3285
9772
2df37a59
APB
97732001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9774
9775 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9776 `-fsyntax-only.' Fixes PR java/3248
9777
97782001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9779
9780 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9781
97822001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9783
9784 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9785 current function is static. Fixes PR java/1970
9786
97872001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9788
9789 * parse.y (patch_method_invocation): Add enclosing context to ctor
9790 calls if necessary. Fixes PR java/2953
9791
97922001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9793
9794 * parse.y (resolve_package): Abort if qualified expression member
9795 isn't right.
9796 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9797 Fixes PR java/1391
9798
74d04dd1
ZW
97992001-07-07 Zack Weinberg <zackw@stanford.edu>
9800
9801 * verify.c: Don't use // comments.
9802
af418b8c
TT
98032001-07-05 Tom Tromey <tromey@redhat.com>
9804
9805 * lang.c (flag_assume_compiled): Removed.
9806 * java-tree.h (flag_assume_compiled): Removed.
9807 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9808 -fhash-synchronization, -fuse-divide-subroutine,
9809 -fcheck-references, -femit-class-file, -femit-class-files,
9810 -fassume-compiled. Updated --encoding information. Changed
9811 -foutput-class-dir to `-d'.
9812
84a5b4f8
DB
98132001-07-04 Daniel Berlin <dan@cgsoftware.com>
9814
9815 * jcf-parse.c (parse_class_file): Add lineno parameter to
9816 debug_start_source_file call.
9817
0671eaf6
JM
98182001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
9819
9820 * gcj.texi: Use gpl.texi.
9821 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9822 dependencies and use doc/include in search path.
9823
9be7529d
JS
98242001-07-03 Jeff Sturm <jsturm@one-point.com>
9825
9826 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9827 `this'. If so, don't build instance initializers.
9828
51e23701
APB
98292001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9830
9831 * parse.y (resolve_expression_name): Improved error message for
2df37a59 9832 inner class cases. Fixes PR java/1958
51e23701 9833
46f018e1
GDR
98342001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
9835
9836 * lang.c: #include diagnostic.h
9837 (lang_print_error): Add a `diagnostic_context *' parameter.
9838 (java_dummy_print): Likewise.
9839 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9840
51e23701
APB
98412001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9842
9843 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9844 * jcf.h (typedef struct JCF): New bitfield `finished.'
9845 (JCF_FINISH): Set `finished.'
9846 (JCF_ZERO): Reset `finished.'
9847 Fixes PR java/2633
9848
98492001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9850
9851 * parse.y (class_body_declaration:): Don't install empty instance
9852 initializers.
9853 Fixes PR java/1314
9854
4a70e37e
APB
98552001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9856
9857 * class.c (set_super_info): Call `set_class_decl_access_flags.'
9858 (set_class_decl_access_flags): New function.
9859 * java-tree.h (set_class_decl_access_flags): New prototype.
9860 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9861 (parse_class_file): New local `decl_max_locals.' Take wide types
9862 into account to compute DECL_MAX_LOCALS.
9863 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9864 imports on demand.
9865
561a0365
JM
98662001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
9867
9868 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9869
8e41c4f3
APB
98702001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9871
9872 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9873 * parse.y (do_resolve_class): Moved comments out to leading comment
9874 section. Removed local `start', New local `_ht' and
9875 `circularity_hash.' Record `enclosing' in hash table and search
9876 it to detect circularity. Use `enclosing' as an argument to
9877 `lookup_cl.' Free the hash table when done.
9878
c01b7cdf
TT
98792001-06-19 Tom Tromey <tromey@redhat.com>
9880
9881 * lex.c (java_read_char): Disallow invalid and overlong
9882 sequences. Fixes PR java/2319.
9883
21a6bb3c
JS
98842001-06-05 Jeff Sturm <jsturm@one-point.com>
9885
9886 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9887
0c90837b
APB
98882001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9889
9890 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9891 arguments accordingly.
9892
1347cc4f
JM
98932001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
9894
9895 * gcj.texi: Move contents to just after title page.
9896
12e248d6
APB
98972001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
9898
9899 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9900 builtin type.
9901 (patch_incomplete_class_ref): Build the class ref, build the class
9902 init if necessary, complete the tree.
9903 Fixes PR java/2605
9904
19559012
APB
99052001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9906
9907 * parse.y (lookup_field_wrapper): Test `name' code.
9908 (resolve_qualified_expression_name): Test `qual_wfl' code.
9909 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9910 handle `qual_wfl' by code.
9911 (maybe_build_primttype_type_ref): Test `wfl' code.
9912
eb153223
TP
99132001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9914
9915 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9916 fdl.texi.
9917 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
9918 the dvi file in the java directory.
9919
88657302
RH
99202001-05-25 Sam TH <sam@uchicago.edu>
9921
9922 * gen-table.pl javaop.h jcf.h lex.h,
9923 parse.h: Fix header include guards.
9924
719f0fde
JM
99252001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
9926
9927 * jv-scan.c (version): Update copyright year.
9928
075516bc
PB
99292001-05-21 Per Bothner <per@bothner.com>
9930
9931 * jcf-parse.c (read_class): If class is from .class or .zip file
9932 and it's already been read, don't push/pop parser context.
9933
9d289604
PB
99342001-05-18 Per Bothner <per@bothner.com>
9935
9936 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9a07cfaf 9937 command line so the jvgenmain-generated main program comes first.
9d289604 9938
48187504
TT
99392001-05-15 Tom Tromey <tromey@redhat.com>
9940
9941 * class.c (build_utf8_ref): Don't generate identifier based on
9942 utf8const contents.
9943
f17f1898
RH
99442001-05-12 Richard Henderson <rth@redhat.com>
9945
9946 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9947 * expr.c (java_lang_expand_expr): Expand it.
9948 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9949 calling build_exception_object_ref.
9950 * parse.y (catch_clause_parameter): Likewise.
9951 (build_dot_class_method): Likewise.
9952 (try_reference_assignconv): Likewise.
9953 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9954 * jcf-write.c (generate_bytecode_insns): Likewise.
9955
352b3f3f
APB
99562001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9957
9958 * parse.y (build_unresolved_array_type): Set
9959 EXPR_WFL_QUALIFICATION on the newly created wfl.
9960 Fixes PR java/2538. Fixes PR java/2535.
9961
41ee0877
APB
99622001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9963
17126208 9964 * parse.y (fix_constructors): Removed unnecessary assignment to
41ee0877
APB
9965 local. Moved assignment to `this$<n>', fixed comments and
9966 indentation.
9967 (build_wfl_wrap): Fixed indentation.
9968 Fixes PR java/2598, java/2579 and java/2658.
9969
4def8930
MD
99702001-05-03 Mo DeJong <mdejong@redhat.com>
9971
9a07cfaf 9972 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
4def8930
MD
9973 check for byte swap.
9974
8fc6a63c
JS
99752000-05-02 Jeff Sturm <jsturm@one-point.com>
9976
9977 * expr.c (build_class_init): Move MODIFY_EXPR
9978 outside of COND_EXPR. Remove variable `call'.
9979
3e411c3f
KG
99802001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9981
9982 * decl.c: NULL_PTR -> NULL.
9983 * jcf-write.c: Likewise.
9984
0cd015ea
TT
99852001-05-01 Tom Tromey <tromey@redhat.com>
9986
9987 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9988 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9989 * gcj.texi: Updated copyright text. Include fdl.texi.
9990 (Top): Link to new node.
9991
6a117d00
PB
99922001-05-01 Per Bothner <per@bothner.com>
9993
9994 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
9995
063df563
PB
99962001-05-01 Per Bothner <per@bothner.com>
9997
9998 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
9999 import_list contains the name, not the TREE_PURPOSE.
10000
962584ea
KG
100012001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10002
10003 * jcf-io.c (read_zip_member): Cast to long in comparison with
10004 signed value.
10005
10006 * jvspec.c (lang_specific_driver): Initialize variables.
10007
10008 * mangle.c (find_compression_record_match): Likewise.
10009
10010 * typeck.c (build_null_signature): Provide static prototype. Mark
10011 parameter with ATTRIBUTE_UNUSED.
10012
10013 * verify.c (verify_jvm_instructions): Initialize variable.
10014
86d9e8d8
BM
100152001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10016
10017 * parse.y (do_resolve_class): Check for cyclic inheritance during
e64c46ce 10018 inner class resolution.
86d9e8d8 10019
9c491eb8
PB
100202001-04-27 Per Bothner <per@bothner.com>
10021
10022 * parse.y (java_expand_classes): Don't change ctxp_for_generation
10023 while iterating, since that could cause gc to lose stuff.
10024
56fe39c8
PB
100252001-04-26 Per Bothner <per@bothner.com>
10026
10027 Fix method search wrt scope of inner classes to match JLS2.
10028 * typeck.c (build_null_signature): New static function.
10029 (has_method): New function. Uses build_null_signature and lookup_do.
10030 * java-tree.h (has_method): New declaration.
10031 * parse.y (find_applicable_accessible_methods_list): Do not search
10032 context of inner classes here.
10033 (patch_method_invocation): Search scope, ie. current and outer clases,
10034 for method matching simple name, to find class.
10035
8789b9fa
PB
100362001-04-26 Per Bothner <per@bothner.com>
10037
10038 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10039 Fix thinko: If a single case, use if_icmpeq, not ifeq.
10040
10041 * constants.c (find_methodref_with_class_index): New function.
10042 (find_methodref_index): Use find_methodref_with_class_index.
10043 * java-tree.h (find_methodref_with_class_index): New declaration.
10044 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
10045 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10046 If context changed from interface to class, don't use invokeinterface.
10047
5acea42b
PB
100482001-04-25 Per Bothner <per@bothner.com>
10049
10050 * verify.c (verify_jvm_instructions): For field instructions,
10051 check that field index is valid. For invoke instructions, check that
10052 method index is valid.
10053
dd6f3662
AO
100542001-04-25 Alexandre Oliva <aoliva@redhat.com>
10055
10056 * config-lang.in (target_libs): Copy from $libgcj_saved.
10057
28f7d9d0
BM
100582001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
10059
10060 * decl.c (init_decl_processing): Add new class "protectionDomain"
10061 field.
10062 * class.c (make_class_data): Set initial value for "protectionDomain".
10063
d4c3ec27
KG
100642001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10065
10066 * jvspec.c (lang_specific_driver): Fix memory allocation
10067 deficit, by using concat in lieu of xmalloc/sprintf.
10068
3c0ce750
PB
100692001-04-20 Per Bothner <per@bothner.com>
10070
10071 Fixes to compile multiple .class files at once.
10072 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
10073 * java-tree.h (CLASS_PARSED_P): New macro.
10074 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10075 * jcf-parse.c (jcf_parse_source): Inline into read_class.
10076 (read_class): Avoid some code duplication.
10077 Don't call JCF_FINISH for a .class file - might be needed later.
10078 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
10079 rather than CLASS_LOADED_P, since latter implies class laid out.
10080 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
10081 * parse.y: Don't need to set CLASS_LOADED_P for array types.
10082
d6684bc8
KG
100832001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10084
10085 * Make-lang.in (java/boehm.o): Depend on toplev.h.
10086
10087 * boehm.c: Include toplev.h.
10088
10e2af38
TT
100892001-04-06 Tom Tromey <tromey@redhat.com>
10090 Alexandre Petit-Bianco <apbianco@redhat.com>
10091
10092 Fix for PR gcj/1404 and PR gcj/2332:
10093 * parse.y (build_array_from_name): If we use the type_wfl then
10094 accumulate dimensions from the original type as well.
10095 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10096
2d9fea5d
TT
100972001-04-06 Tom Tromey <tromey@redhat.com>
10098
10099 * parse.y (analyze_clinit_body): Return true if the second operand
10100 of a METHOD_EXPR is nonzero.
10101
613bb86e
TT
101022001-04-06 Tom Tromey <tromey@redhat.com>
10103
10104 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10105 directory.
10106 ($(srcdir)/java/parse.c): Likewise.
10107
8b66cd8f
APB
101082001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
10109
10110 * gcj.texi: Use `which-gcj' instead of `which-g77.'
10111 (version-gcc): Initialized.
10112 (which-gcj): Likewise.
10113
73c299fc
APB
101142001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
10115
10116 * java-tree.h (struct lang_decl): New macro
10117 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10118 * parse.y (build_instance_initializer): New function.
10119 (add_instance_initializer): Use it.
10120 (java_fix_constructors): Set `current_class' before fix pass.
10121 (fix_constructors): Just return if already fixed. Move `super()'
67264b4f 10122 invocation ahead. Use `build_instance_initializer.'
73c299fc
APB
10123 Fixes PR java/1315.
10124
93a6eb78 101252001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
e64c46ce 10126
93a6eb78
APB
10127 * parse.y (resolve_qualified_expression_name): Pass field's
10128 DECL_CONTEXT to `not_accessible_p.'
10129 (not_accessible_p): Changed parameters order in `inherits_from_p'
67264b4f 10130 invocation.
93a6eb78 10131
4956c16e
AH
101322001-03-27 Andrew Haley <aph@cambridge.redhat.com>
10133
10134 * lang-options.h: Add flag_check_references.
10135
3cc48399
PB
101362001-04-04 Per Bothner <per@bothner.com>
10137
10138 * java-tree.h (CONSTANT_VALUE_P): New macro.
10139 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
10140 * parse.y (maybe_build_class_init_for_field): New static function.
10141 (resolve_expression_name, resolve_field_access): Use
e64c46ce 10142 maybe_build_class_init_for_field instead of build_class_init
3cc48399
PB
10143 This does not do the init if the field is compile-time-constant.
10144 (resolve_field_access): Simplify.
10145
10146 * parse.y (fold_constant_for_init): Merge test into switch.
10147
d02af173
ZW
101482001-04-03 Zack Weinberg <zackw@stanford.edu>
10149
10150 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10151 on gansidecl.h.
10152 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10153
44a2150d
ZW
101542001-04-02 Zack Weinberg <zackw@stanford.edu>
10155
10156 * expr.c (pop_type_0): Save the result of the first
e64c46ce 10157 lang_printable_name call in a scratch buffer, so it
44a2150d
ZW
10158 won't be clobbered by the second call.
10159
de307574
APB
101602001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
10161
10162 * parse-scan.y (array_type:): Rewritten.
10163 (type_declaration:): `empty_statement' replaces `SC_TK.'
10164 (class_member_declaration:): `empty statement' added.
10165 (method_body:): Simplified.
10166 (static_initializer:): Likewise.
10167 (primary_no_new_array:): Use `type_literals.'
10168 (type_literals:): New rule.
10169 (dims:): Set and update `bracket_count.'
10170 Fixes PR java/1074. Fixes PR java/2412.
10171
2ff50199
APB
101722001-03-28 Hans Boehm <boehm@acm.org>
10173
10174 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10175 (get_boehm_type_descriptor): Set type on returned value to be a
10176 pointer length integer.
10177
80122075
KG
101782001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10179
10180 * expr.c (pop_type_0): Call `concat' rather than building the
10181 string manually.
10182 (pop_type): Add format specifier in call to `error'.
10183
10184 * parse.y (patch_method_invocation): Avoid casting away
10185 const-ness.
10186
0f5c1ee4
JO
101872001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
10188
10189 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10190
52a11cbf
RH
101912001-03-28 Richard Henderson <rth@redhat.com>
10192
10193 IA-64 ABI Exception Handling:
10194 * Make-lang.in (except.o): Don't depend on eh-common.h.
10195 * check-init.c (check_init): Handle EXC_PTR_EXPR.
10196 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10197 [soft_exceptioninfo_call_node]: Remove.
10198 [eh_personality_libfunc, lang_eh_runtime_type]: New.
10199 (end_java_method): No emit_handlers.
10200 * except.c (java_set_exception_lang_code): Remove.
10201 (method_init_exceptions): Don't call it.
10202 (prepare_eh_table_type): No CATCH_ALL_TYPE.
10203 (build_exception_object_ref): New.
10204 (expand_end_java_handler): Update for except.h name changes.
10205 (emit_handlers, expand_resume_after_catch): Remove.
10206 * expr.c (java_lang_expand_expr): Update for except.h name changes.
10207 (process_jvm_instruction): Use build_exception_object_ref.
10208 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10209 (soft_exceptioninfo_call_node): Remove.
10210 (build_exception_object_ref): Declare.
10211 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10212 soft_exceptioninfo_call_node. Move processing ...
10213 [EXC_PTR_EXPR]: ... here.
10214 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10215 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10216 (source_end_java_method): No java_set_exception_lang_code or
10217 emit_handlers.
10218 (build_dot_class_method): Use build_exception_object_ref.
10219 (try_reference_assignconv): Check EXC_PTR_EXPR not
10220 soft_exceptioninfo_call_node.
10221
ce1c98ea
RH
102222001-03-28 Richard Henderson <rth@redhat.com>
10223
10224 * java-tree.h (throw_node): Define as a single member of
10225 java_global_trees instead of a separate array.
10226 (JTI_THROW_NODE): New.
10227 * decl.c (throw_node): Don't declare.
10228 (init_decl_processing): Init a scalar throw_node.
10229 Don't register it for gc.
10230 * check-init.c (check_init): Reference scalar throw_node.
10231 * expr.c (build_java_athrow): Likewise.
10232 * jcf-write.c (generate_bytecode_insns): Likewise.
10233 * parse.h (BUILD_THROW): Likewise.
10234
da7da8f9
RH
102352001-03-28 Richard Henderson <rth@redhat.com>
10236
10237 * decl.c (end_java_method): Do not save and restore
10238 flag_non_call_exceptions.
10239 * parse.y (source_end_java_method): Likewise.
10240 * lang.c (flag_exceptions): Don't declare.
10241 (java_init_options): Set flag_non_call_exceptions. Set
10242 flag_exceptions here ...
10243 (java_init): ... not here.
10244
531073e7
RH
102452001-03-27 Richard Henderson <rth@redhat.com>
10246
10247 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10248 exceptions_via_longjmp.
10249
461fc4de
RH
10250 * lang.c (flag_new_exceptions): Don't declare it.
10251 (java_init_options): Or set it.
10252
c1e9f663
RH
102532001-03-27 Richard Henderson <rth@redhat.com>
10254
10255 * decl.c (end_java_method): Rename asynchronous_exceptions to
10256 flag_non_call_exceptions.
979988f3 10257 * parse.y (source_end_java_method): Likewise.
c1e9f663 10258
911e6107
KG
102592001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10260
10261 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10262
b850de4f
MM
102632001-03-26 Mark Mitchell <mark@codesourcery.com>
10264
10265 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10266
ce06965e
APB
102672001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
10268
10269 * parse.y (find_as_inner_class): Follow current package
10270 indications not to mistakingly load an unrelated class.
10271
cb9b7a8c
KG
102722001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10273
10274 * constants.c (PUTN): Use memcpy, not bcopy.
10275
10276 * lex.c (java_read_char): Use memmove, not bcopy.
10277
10278 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10279
fa029f45
PB
102802001-03-23 Per Bothner <per@bothner.com>
10281
10282 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
10283 macro for better error pin-pointing.
10284 * java-tree.h: Fix typo in comment.
10285
10286 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
10287 Don't include jsr/goto in exception range.
10288 Check if start and end of exception range are the same (also TRY_EXPR).
10289 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10290 However, do emit the following goto even if try_block is empty.
10291 Defer freeing exception_decl until after the finalizer, to make
10292 sure the local isn't reused in the finalizer. Fixes PR java/1208.
10293
10294 * parse.y (java_complete_lhs): If the try-clause is empty, just
10295 return the finally-clause and vice versa.
10296
b124f72e
APB
102972001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
10298
10299 * gcj.texi (Input Options): documented the check for attribute
10300 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10301 * java-tree.h (flag_force_classes_archive_check): Declared extern.
10302 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10303 (jcf_parse): Check for the right classes archive if necessary.
10304 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10305 (jcf_parse_fields): Fixed indentation.
10306 * jcf-write.c (append_gcj_attribute): New function.
10307 (generate_classfile): Compute the attribute count, invoke
10308 `append_gcj_attribute'.
10309 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
ee142fe7 10310 turned into bit-fields. New bit-field `right_zip.'
b124f72e
APB
10311 (JCF_ZERO): Set `right_zip' to zero.
10312 * lang-options.h (-fforce-classes-archive-check): Added flag.
10313 * lang.c (flag_force_classes_archive_check): New flag.
10314 (lang_f_options): New entry `force-classes-archive-check.'
10315 Fixes PR java/1213.
10316
4ff17c6a
AH
103172001-02-07 Andrew Haley <aph@redhat.com>
10318
10319 * gcj.texi (Configure-time Options): Add -fcheck-references.
10320 * expr.c (build_java_indirect_ref): New function.
3e02b1c3 10321 (java_check_reference): New function.
4ff17c6a
AH
10322 (build_java_array_length_access): Use build_java_indirect_ref to
10323 check for null references.
10324 (build_java_arrayaccess): Likewise.
10325 (build_get_class): Likewise.
10326 (build_field_ref): Likewise.
10327 (invoke_build_dtable): Likewise.
10328 (build_invokeinterface): Likewise.
10329 * lang.c (lang_f_options): Add flag_check_references.
10330 * jvspec.c (jvgenmain_spec): Add flag_check_references.
10331 * java-tree.h (flag_check_references): New variable.
10332 * lang.c (flag_check_references): Likewise.
e64c46ce 10333 * parse.y (patch_invoke): Use java_check_reference.
3e02b1c3
AH
10334 (patch_assignment): Allow for extra nesting in
10335 _Jv_CheckArrayStore.
4ff17c6a 10336
f2a29271
BM
103372001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
10338
10339 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10340 * lex.c (cxx_keywords): Likewise.
10341
2ff50199
APB
103422001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
10343
10344 * parse.y (qualify_ambiguous_name): Broaden `length'
10345 recognition. Help MODIFY_EXPR be resolved as expression names.
10346 Fixes PR java/2066. Fixes PR java/2400.
10347
60c87482
BM
103482001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
10349
e64c46ce 10350 * gjavah.c (process_file): Mark interface definitions with
60c87482
BM
10351 "__attribute__ ((java_interface))".
10352
96c6f628
APB
103532001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
10354
10355 * class.c (layout_class): Fixed push_super_field's second
10356 argument. Fixes PR java/2333.
10357 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10358 too early to lay innerclasses out.
10359
7abecd65
TT
103602001-03-20 Tom Tromey <tromey@redhat.com>
10361 Alexandre Petit-Bianco <apbianco@redhat.com>
10362
10363 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10364 inside an array reference. Insertion of the array store check
10365 rewritten. Fixes PR java/2299.
10366
4aed8938
TT
103672001-03-20 Tom Tromey <tromey@redhat.com>
10368
10369 * lex.c (java_read_unicode): Only accept leading `u's.
10370
ddd705d1
TT
103712001-03-20 Tom Tromey <tromey@redhat.com>
10372
10373 * jcf-parse.c (read_class): Initialize `class'.
10374
de83bf66
MK
103752001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10376
10377 * jcf_parse.c (jcf_parse): Eliminate unused variable.
10378
92643fea
MM
103792001-03-19 Mark Mitchell <mark@codesourcery.com>
10380
10381 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10382 (layout_class): Likewise.
10383 (layout_class_method): Likewise.
10384 (emit_register_classes): Likewise.
10385 * decl.c (builtin_function): Likewise.
10386 (give_name_to_locals): Likewise.
10387
54646811
PB
103882001-03-19 Per Bothner <per@bothner.com>
10389
80fc2e84
PB
10390 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
10391 before trying to load an inner class.
10392
54646811
PB
10393 Fixes to process to command-line .class files in two passes.
10394 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
10395 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
10396 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
10397 * class.c (is_compiled_class): Fix for renamed flag.
10398 * parse.y (maybe_create_class_interface_decl): Likewise.
10399 * jcf-parse.c (yyparse): Also set if compiling .class files.
10400 * jcf-parse.c (read_class); Read current_class.
10401 (jcf_parse): Make static.
10402 (load_inner_classes): New function, with code moved from jcf_parse,
10403 because we need to inner classes after the command-line files are read.
10404 (yyparse): Set finput to NULL when it doesn't need to be closed.
10405 Reduce use of main_jcf (basically only for archive) and
10406 use finput instead of main_jcf->read_state.
10407 Inline jcf_figure_file_type into yyparse.
10408 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10409 Defer load_inner_classes and parse_class_file to a second pass,
10410 after we've correctly mapped command-line .clas fiels to classes.
10411 (jcf_figure_file_type): Removed.
10412 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
10413 (JCF_ZERO): Also clear zipd field.
10414 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
10415
104162001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
10417
10418 * jcf-parse.c (yyparse): Change ch from char * to char.
10419
8b1edcee
PB
104202001-03-19 Per Bothner <per@bothner.com>
10421
10422 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
10423 Add constructed filelist-file at end, following -xjava. Thus any .o
10424 and library files are not affected by the -xjava. Also wrap
54646811 10425 explicit @FILE with -xjava and -xnone.
8b1edcee 10426
6bc5f6cb
AH
104272001-03-19 Andrew Haley <aph@cambridge.redhat.com>
10428
9a07cfaf
RH
10429 * class.c (build_static_field_ref): Call make_decl_rtl() after
10430 setting the DECL_EXTERNAL flag.
6bc5f6cb 10431
daaaf29f
PB
104322001-03-17 Per Bothner <per@bothner.com>
10433
90f59043
PB
10434 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
10435
478e7ed6
PB
10436 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
10437 when result is is needed (target is STACK_TARGET).
10438
daaaf29f 10439 * parse.h (JDEP_SOLV): Removed.
d148b6aa 10440 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
daaaf29f 10441
d148b6aa
PB
10442 * parse.y (incomplete_class_list): Removed.
10443 (obtain_incomplete_type): Don't use or set incomplete_class_list.
10444 It doesn't work if resolve_class changes the name of an array type
10445 that is on the list and then someone else looks for the modified name.
10446 Also, seems liable to break when compiling multiple source files at
10447 once. So the simplest is to just remove incomplete_class_list -
10448 it is only a minor space win and it is not even clear it saves time.
daaaf29f
PB
10449
10450 * parse.y (resolve_class): Remove unneeded promote_type.
10451
4763d38f
PB
104522001-03-15 Per Bothner <per@bothner.com>
10453
b16e8f08
PB
10454 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
10455 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
10456 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10457 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8b1edcee 10458
3a2e5926
PB
10459 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
10460 * parse.y (java_expand_classes): Likewise.
8b1edcee 10461
47a50de9
PB
10462 * parse.y (expand_start_java_method): Was only called once and had a
10463 misleading name, so inline in caller java_complete_expand_method.
3a2e5926 10464 (enter_a_block): Likewise inline in enter_block and remove.
47a50de9 10465
4763d38f
PB
10466 Remove junk from when gcc/java was created (by copying from C/C++).
10467 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
10468 (struct binding_level): Remove fields keep, keep_if_subblocks,
10469 more_cleanups_ok, have_cleanups (which have never been used).
10470 (pushlevel, poplevel): Remove related useless code.
19f8e04b 10471
69ca5554
PB
10472 * class.c (make_class_data): The class_dtable_decl (i.e. the
10473 vtable for Class) should be external, except when compiling Class.
10474
7d32abcd
PB
10475 * jvspec.c (lang_specific_driver): Fix -C handling.
10476 Check -save-temps to see if temp @FILE should be deleted.
10477 Follow-up to/fix for February 16 patch.
10478
19f8e04b
PB
10479 * verify.c (verify_jvm_instructions): Better error msgs for dup.
10480 (type_stack_dup): Remove no-longer neded error check.
10481
551bf03c
BM
104822001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
10483
10484 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10485 to 'for_pointer'. If this type is for a pointer (argument) mangling,
e64c46ce 10486 don't surround the element with 'N..E' if the type name is
551bf03c
BM
10487 unqualified.
10488
19e7881c
MM
104892001-03-14 Mark Mitchell <mark@codesourcery.com>
10490
d1d61788
MM
10491 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10492 DECL_RTL_SET_P, etc.
19e7881c
MM
10493 (make_method_value): Likewise.
10494 (get_dispatch_table): Likewise.
10495
10496 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8b1edcee 10497
bcacc465
TT
104982001-03-07 Tom Tromey <tromey@redhat.com>
10499
10500 * config-lang.in (lang_requires): Define.
10501
de6c5979
BL
105022001-03-07 Brad Lucier <lucier@math.purdue.edu>
10503
10504 * typeck.c (convert): Check flag_unsafe_math_optimizations,
10505 not flag_fast_math.
10506
6d37cf2f
PB
105072001-03-05 Per Bothner <per@bothner.com>
10508
10509 Fix a problem where rest_of_decl_compilation applied to
10510 class_dtable_decl causes problems because it was done too early,
10511 before output file was opened.
10512 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
10513 * class.c (class_dtable_decl): Add macro - element of class_roots.
10514 (make_class_data): Define class_dtable_decl.
10515 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
10516
d6edb99e
ZW
105172001-03-01 Zack Weinberg <zackw@stanford.edu>
10518
10519 * java/class.c, java/decl.c, java/java-tree.h: Replace all
10520 uses of 'boolean' with 'bool'.
10521
f7143427
ZW
105222001-03-01 Zack Weinberg <zackw@stanford.edu>
10523
10524 * lang-specs.h: Add zero initializer for cpp_spec field to all
10525 array elements.
10526
fea2d5da
PB
105272001-02-16 Per Bothner <per@bothner.com>
10528
10529 Handle compiling multiple input files at once, and @FILE syntax.
e4087691 10530 * gcj.texi: Updated documentation to match.
fea2d5da
PB
10531 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
10532 * jcf-parse.c (parse_source_file): Split into ...
10533 (parse_source_file_1): New function - and:
10534 (parse_source_file_2): New function.
10535 (yyparse): On -ffilelist-file, open and scan named file.
10536 On first pass over files, only do parse_source_file_1.
10537 A new second pass calls parse_source_file_2 for each file to compile.
10538 (init_jcf_parse): Call init_src_parse.
10539 * jvspec.c (INDIRECT_FILE_ARG): New flag.
10540 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
10541 as multiple input file combined in one compilation.
10542 * lang-options.h: Add -ffilelist-file
10543 * lang.c (flag_filelist_file): New flag variable.
10544 (lang_f_options): Handle -ffilelist-file.
10545 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10546 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
10547 gclass_list - use global fields of src_parse_roots instead.
10548 * parse.y (src_parse_roots): New array.
10549 (incomplete_class_list, gclass_list): New macros.
10550 (push_parser_context, java_pop_parser_context,
10551 java_parser_context_resume): Don't fiddle with deleted fields.
10552 (various): Use incomplete_class gclass_list and global macros
10553 instead of parse_ctxt fields - the lists are global.
10554 (init_src_parse): New function.
10555
62c9aa5f 105562001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9b58f739
RK
10557
10558 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10559
064a552c
APB
105602001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
10561
10562 * parse.y (check_inner_class_access): Moved declaration of local
10563 `enclosing_decl_type' to the right location.
10564
a648f4e4
BM
105652001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
10566
e64c46ce 10567 * parse.y (parser_check_super_interface): Don't call
a648f4e4 10568 check_pkg_class_access for an inner interface.
e64c46ce 10569 (parser_check_super): Don't call check_pkg_class_access for inner
a648f4e4 10570 class.
e64c46ce 10571 (do_resolve_class): Simplify enclosing type loop. Don't call
a648f4e4
BM
10572 check_pkg_class_access if CL and DECL are not set.
10573 (find_in_imports_on_demand): Set DECL if class_type needed to be
10574 loaded. Don't call check_pkg_class_access for an inner class.
10575 (check_inner_class_access): Rewritten to implement member access
10576 rules as per spec 6.6.1.
10577 (check_pkg_class_access): Handle the empty package correctly.
10578 (in_same_package): New function. Determine if two classes are in the
10579 same package.
10580
35ab11f0
BM
105812001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
10582
10583 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10584 method into array types.
10585 * parse.y (patch_method_invocation): Bypass access check on clone call
10586 to array instance.
e64c46ce 10587
055adbaa
APB
105882001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
10589
10590 * expr.c (build_instanceof): Check for arrays when trying fold to
10591 false.
10592
e658449e
JM
105932001-02-15 Jim Meyering <meyering@lucent.com>
10594
fd48c9b5
DD
10595 * Make-lang.in (java.install-common): Depend on `installdirs'.
10596 (java.install-info): Likewise.
e658449e 10597
4238a754
BM
105982001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
10599
10600 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10601
e101152f 106022001-02-14 Tom Tromey <tromey@redhat.com>
9a07cfaf 10603 Alexandre Petit-Bianco <apbianco@cygnus.com>
e101152f 10604
055adbaa
APB
10605 Fix for PR java/1261.
10606 * typeck.c (build_java_array_type): Add public `clone' method to
10607 arrays.
10608 * parse.y (resolve_qualified_expression_name): Use current_class
e101152f 10609 when checking for inaccessibility.
055adbaa 10610 (patch_method_invocation): Fixed error message when accessibility
e101152f
APB
10611 denied. Added `from_super' argument.
10612
106132001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
10614
10615 * parse.y (resolve_class): Don't build a fake decl. Use the one
10616 already built.
10617 * typeck.c (build_java_array_type): Build and assign decl to array
10618 type.
10619
106202001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
10621
10622 * parse.y (not_accessible_p): Changed leading comment. Added extra
10623 `where' argument. Use it to enforce protected access rules.
10624 (resolve_qualified_expression_name): Added extra argument to
10625 not_accessible_p.
10626 (patch_method_invocation): Use argument `primary' to provide
10627 not_accessible_p with an extra argument.
10628 (lookup_method_invoke): Added extra argument to not_accessible_p.
10629 (search_applicable_method_list): Likewise.
10630
863cd85a
APB
106312001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
10632
10633 * parse.y (resolve_qualified_expression_name): Try to resolve as
10634 an inner class access only if `decl' is a TYPE_DECL.
10635
94807d33
APB
106362001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10637
10638 * decl.c (classdollar_identifier_node): Initialize.
e64c46ce 10639 * java-tree.h (enum java_tree_index): New entry
94807d33
APB
10640 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10641 (classdollar_identifier_node): New macro.
10642 (ID_CLASSDOLLAR_P): Likewise.
10643 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10644 (build_dot_class_method_invocation): Likewise.
10645 (find_applicable_accessible_methods_list): `class$' can't be
10646 inherited.
10647
30f87f1a
APB
106482001-02-09 Raja R Harinath <harinath@cs.umn.edu>
10649
10650 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10651
106522001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10653
10654 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10655 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10656 gone.
10657
1e97aa40
APB
106582001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10659
10660 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10661 outside of the `__U' sequence too.
10662 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10663 sequence too.
10664
a395f5ab
APB
106652001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
10666
10667 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10668
1b43b6be
APB
106692001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10670
10671 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10672 (JVGENMAIN_OBJS): Likewise.
e64c46ce 10673 * java-tree.h (append_gpp_mangled_name): New prototype.
1b43b6be
APB
10674 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10675 Removed cast calling `gcc_add_root.'
10676 * jvgenmain.c (mangle_obstack): New global, initialized.
10677 (main): Use it.
10678 (do_mangle_class): Constify local `ptr.'
10679 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10680 append_gpp_mangle_name and update `count' if necessary.
10681 Use `mangle_obstack.'
10682 * mangle.c (append_unicode_mangled_name): Removed.
10683 (append_gpp_mangled_name): Likewise.
10684 (unicode_mangling_length): Likewise.
10685 (mangle_member_name): Return type set to `void.'
10686 (mangle_field_decl): Don't append `U' in escaped names.
10687 (mangle_method_decl): Likewise.
10688 (mangle_member_name): Just use `append_gpp_mangled_name.'
10689 * mangle_name.c: New file.
10690
4a83be51
PB
106912001-02-07 Per Bothner <per@bothner.com>
10692
10693 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
10694
10695 * check-init.c (check_init): Don't call done_alternative after
10696 processing loop code, as a LOOP_EXPR never terminates normally.
10697
7e5fd99f
JM
106982001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
10699
10700 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10701
1456345e
APB
107022001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10703
10704 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10705 DECLs.
10706
77aff9f9
TT
107072001-02-06 Tom Tromey <tromey@redhat.com>
10708
10709 * lex.c (java_new_lexer): Longer error message.
10710
c00dd14e
JS
107112001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
10712 Alexandre Petit-Bianco <apbianco@cygnus.com>
10713
10714 * typeck.c (build_prim_array_type): Added leading comment.
10715 (build_java_array_type): Moved locals out of
10716 block. Always create the `data' field, fixed alignment to match
10717 C++.
10718
6d091870
TT
107192001-02-04 Tom Tromey <tromey@redhat.com>
10720
10721 * expr.c (java_lang_expand_expr): Don't bother recomputing
10722 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
10723 Fixes PR java/1866.
10724
1ebb5e73
APB
107252001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10726
10727 * parse.y (process_imports): Save the original name of the import
10728 for better error report.
10729
ca5b1ff8
BM
107302001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
10731
10732 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10733 of macros used when compiling jvspec.c.
10734 * jvspec.c (lang_specific_driver): Link with the shared
10735 libgcc by default.
10736
62c9aa5f 107372001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
400500c4
RK
10738
10739 * check-init.c (check_init): Call internal_error instead of fatal.
10740 * expr.c (java_lang_expand_expr): Likewise.
10741 * jcf-parse.c (get_constant): Likewise.
10742 * mangle.c (java_mangle_decl): Likewise.
10743 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10744 (operator_string): Likewise.
10745 * check-init.c (check_init): Call abort instead of fatal.
10746 * class.c (build_class_ref): Likewise.
10747 * constants.c (write_constant_pool): Likewise.
10748 * decl.c (start_java_method): Likewise.
10749 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10750 (java_stack_dup, encode_newarray_type): Likewise.
10751 (build_java_array_length_access): Likewise.
10752 (build_java_check_indexed_type, expand_java_pushc): Likewise.
10753 (build_java_soft_divmod, build_invokeinterface): Likewise.
10754 * java-tree.h (INNER_CLASS_P): Likewise.
10755 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10756 (give_name_to_class, get_class_constant): Likewise.
10757 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10758 (find_constant_index, generate_bytecode_conditional): Likewise.
10759 (generate_bytecode_insns, perform_relocations): Likewise.
10760 * lex.c (java_unget_unicode, java_lex): Likewise.
10761 * mangle.c (mangle_type, mangle_record_type): Likewise.
10762 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10763 (finish_mangling): Likewise.
10764 * parse.h (MARK_FINAL_PARMS): Likewise.
10765 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10766 (obtain_incomplete_type, java_complete_class): Likewise.
10767 (java_check_regular_methods, java_complete_expand_method): Likewise.
10768 (cut_identifier_in_qualified, check_deprecation): Likewise.
10769 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10770 (java_complete_lhs, lookup_name_in_blocks): Likewise.
10771 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10772 * typeck.c (set_local_type, parse_signature_type): Likewise.
10773 (parse_signature_string, build_java_signature): Likewise;
10774 (set_java_signature): Likewise.
10775 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10776 * class.c (add_method): Call fatal_error instead of fatal.
10777 (build_static_field_ref): Likewise.
10778 * expr.c (build_known_method_ref, expand_invoke): Likewise.
10779 * jcf-parse.c (get_constant, jcf_parse): Likewise.
10780 * lex.c (java_new_new_lexer): Likewise.
10781 * jv-scan.c (main): Likewise.
10782 (fatal_error): Renamed from fatal.
10783 * jcf-parse.c (yyparse): Call fatal_io_error instead of
10784 pfatal_with_name.
10785 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10786 (yyparse): Likewise.
10787 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10788 * lex.c (java_get_line_col): Likewise.
10789 * jcf-parse.c (load_class): Make errors non-fatal.
10790 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
e64c46ce 10791
4bae4eb5
BM
107922001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
10793
10794 * jvgenmain.c (class_mangling_suffix): Remove unused string.
10795 (error): Remove unused function.
10796 (main): Don't use "__attribute__ alias" on generated class symbol.
10797
c0b00d37
APB
107982001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10799
10800 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10801 argument.
10802 * parse.y (finish_method_declaration): Code accounting for WFLed
10803 method DECL_NAMEs deleted.
10804 (check_abstract_method_definitions): Likewise.
10805 (resolve_type_during_patch): Layout resolved type.
10806 * typeck.c (lookup_do): Removed unused local.
10807
4bae4eb5 108082001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
eb59e547
BM
10809
10810 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10811 * decl.c (init_decl_processing): Use integer_minus_one_node, not
10812 integer_negative_one_node.
10813 * expr.c (build_java_binop): Likewise.
10814
4bae4eb5 108152001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7be00c49
JS
10816
10817 * zextract.c (read_zip_archive): Read file_offset before writing
10818 zipd and consequently clobbering the header contents.
10819
c913b6f1
KG
108202001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10821
10822 * Make-lang.in: Remove all dependencies on defaults.h.
10823 * decl.c: Don't include defaults.h.
10824 * expr.c: Likewise.
10825 * parse.y: Likewise.
10826
c4faeb92
APB
108272001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10828
10829 * ChangeLog (2001-01-21): Fixed typo.
10830 * class.c (layout_class_method): Code accounting for WFLed
10831 method DECL_NAMEs deleted.
10832 * constant.c (find_methodref_index): Likewise.
10833 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10834 * java-tree.h (DECL_FUNCTION_WFL): New macro.
10835 (struct lang_decl): New field `wfl'.
10836 (java_get_real_method_name): Prototype deleted.
10837 * mangle.c (mangle_method_decl): Code accounting for WFLed
10838 method DECL_NAMEs deleted.
10839 * parse.h (GET_METHOD_NAME): Macro deleted.
10840 * parse.y (reset_method_name): Deleted.
10841 (method_header): Set DECL_FUNCTION_WFL.
10842 (check_abstract_method_header): Code accounting for WFLed method
10843 DECL_NAMEs deleted.
10844 (java_get_real_method_name): Deleted.
10845 (check_method_redefinition): Code accounting for WFLed method
10846 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10847 (java_check_regular_methods): Likewise.
10848 (java_check_abstract_methods): Likewise.
10849 (java_expand_classes): Don't call `reset_method_name.'
10850 (search_applicable_method_list): Use DECL_NAMEs instead of
10851 GET_METHOD_NAME.
10852 * typeck.c (lookup_do): Code accounting for WFLed method
10853 DECL_NAMEs deleted.
10854
97876d66
RE
108552001-01-25 Richard Earnshaw <rearnsha@arm.com>
10856
10857 * lex.c (java_read_char): Check for EOF from getc first.
10858
493d561d
APB
108592001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10860
10861 * class.c (layout_class): Don't lay the superclass out if it's
10862 already being laid out.
10863 * jcf-parse.c (handle_innerclass_attribute): New function.
10864 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10865 handle_innerclasses_attribute.
10866 (jcf_parse): Don't load an innerclasses if it's already being
10867 laid out.
10868 * jcf-write.c (append_innerclass_attribute_entry): Static
10869 `anonymous_name' and its initialization deleted. `ocii' and `ini'
10870 to be zero for anonymous classes.
10871
108722001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10873
10874 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10875 necessary.
10876 * jcf-parse.c (set_source_filename): Use
10877 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10878
108792001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10880
10881 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10882 gets a unique asm name.
10883
108842001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10885
10886 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10887 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10888 if necessary.
10889 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10890 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10891 * parse.y (lookup_package_type_and_set_next): Deleted.
10892 (resolve_package): Removed unnecessary code.
10893 (find_applicable_accessible_methods_list): `finit$' can't be
e64c46ce 10894 inherited.
493d561d
APB
10895 * verify.c (pop_argument_types): Added missing prototype.
10896
7c01b2b5
BM
108972001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
10898
10899 * config-lang.in: Disable java by default.
10900
80261b56
TT
109012001-01-23 Tom Tromey <tromey@redhat.com>
10902
10903 * gcj.texi (Copying): New node.
10904 Added copyright information.
10905
a4796c80
PB
109062001-01-21 Per Bothner <per@bothner.com>
10907
10908 Various fixes to allow compiling a compressed .jar/.zip archive.
10909 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
10910 (struct ZipFile): Add fields name and next (from ZipFileCache).
10911 (struct ZipDirectory): New field zipf points to owning ZipFile.
10912 * jcf.h (struct ZipDirectory): Add forward declaration.
10913 (struct JCF): Declare zipd field to have type struct ZipDirectory.
10914 Remove seen_in_zip and zip_offset fields.
10915 (JCF_SEEN_IN_ZIP): New macro.
10916 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
10917 * jcf-io.c: Change all ZipFileCache to ZipFile.
10918 (read_zip_member): New function.
10919 (open_in_zip): Call read_zip_member.
10920 * jcf-parse.c (find_in_current_zip): Remove function.
10921 (read_class): Merge in find_in_current_zip functionality.
10922 Call read_zip_member if needed.
10923 (parse_zip_file_entries): Use read_zip_member.
10924 (process_zip_dir): Update for removed and added JCF fields.
10925 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
10926
b5c4fed9
PB
109272001-01-21 Per Bothner <per@bothner.com>
10928
10929 Minor optimization of static ggc roots.
10930 * jcf-parse.c (parse_roots): New static field.
10931 (current_field, current_method, current_file_list): Replace by macros
10932 naming fields of parse_roots.
10933 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
10934 * class.c (class_roots): New static field.
10935 (registered_class, fields_ident, info_ident, class_list):
10936 New macros naming fields of parse_roots.
10937 (build_static_field_ref): Don't register roots here.
10938 (layout_class): Static field list replaced by macro class_list.
10939 (init_class_processing): Call ggc_add_tree_root for 4 roots.
10940 Initialize fields_ident and info_ident here.
10941
3432b91b
PB
109422001-01-21 Per Bothner <per@bothner.com>
10943
10944 * jcf-parse.c (ggc_mark_jcf): New function.
10945 (init_jcf_parse): Register current_jcf as ggc root.
10946
2c36c7fd
PB
109472001-01-21 Per Bothner <per@bothner.com>
10948
10949 * lang.c (put_decl_node): Print method's name.
10950
9c0c88ac
PB
109512001-01-21 Per Bothner <per@bothner.com>
10952
10953 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
10954 (verify_jvm_instructions): Use it, for better error messages on loads.
10955
230cbd5f
PB
109562001-01-21 Per Bothner <per@bothner.com>
10957
c4faeb92 10958 * verify.c (merge_type_state): Still may have to merge even if
230cbd5f
PB
10959 LABEL_VERIFIED (label).
10960
e6b6db0d
PB
109612001-01-21 Per Bothner <per@bothner.com>
10962
10963 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
10964 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10965
b57300bc
PB
109662001-01-19 Per Bothner <per@bothner.com>
10967
10968 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
10969 if expeting an interface type. Refines Tom's change of 2000-09-12.
10970
ee08d4cc
PB
109712001-01-18 Per Bothner <per@bothner.com>
10972
10973 * gcj.texi (Input Options): Mention .java files.
10974
b1117741
APB
109752001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10976
10977 * lang-options.h (-Wunsupported-jdk11): Removed.
10978 * lang.c (flag_not_overriding): Deleted.
10979 (flag_static_local_jdk1_1): Likewise.
10980 (lang_W_options): Removed "unsupported-jdk11" entry.
10981 * parse.y (java_check_methods): Removed dead code.
10982
2dc73168
TT
109832001-01-17 Tom Tromey <tromey@redhat.com>
10984
10985 Changes suggested by Per Bothner:
10986 * gcj.texi (Input Options): Don't mention input files.
10987 (Code Generation): Updated --main information.
10988 (Invoking jcf-dump): Mention that --javap is incomplete.
10989 From Alexandre Petit-Bianco:
10990 (Warnings): Don't mention -Wunsupported-jdk11.
10991 My stuff:
10992 (Compatibility): Mention JDK 1.2-ness of libraries.
10993 (Resources): Mention resources used when writing gcj.
10994
bc65b5ec
TT
109952001-01-17 Tom Tromey <tromey@redhat.com>
10996
10997 * gcj.texi: New file.
10998 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10999 (java.info): Depend on gcj.info.
11000 (java/gcj.dvi): New target.
11001 (java.dvi): Depend on gcj.dvi.
11002 (java.install-info): Wrote.
11003
930f6690
JS
110042001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
11005
11006 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11007 having called make_decl_rtl.
11008
00b4575d
PB
110092001-01-14 Per Bothner <per@bothner.com>
11010
984ad2c6
PB
11011 Various patches to emit better messages on verification errors.
11012 * expr.c (push_type_0): Return error indication on stack overflow,
11013 instead of callinfg fatal.
11014 (push_type): Now just call push_type_0 (nd fatal on overflow).
11015 (pop_type_0): Return detailed error message (in a char** argument).
11016 (pop_type): If pop_type_0 fails, print error message.
11017 (pop_argument_types): Moved to verify.c.
11018 * verify.c (pop_argument_types): Moved from expr.c.
11019 Return a (possible) error message, rather than void.
11020 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
11021 (verify_jvm_instruction): Use new macros, improving error messages.
11022 For case OPCODE_astore use object_ptr_type_node.
11023 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
11024 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
11025
00b4575d
PB
11026 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11027 constant, return body without wrapper. (Improves constant folding.)
11028 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
11029
d9da31dd
PB
110302001-01-13 Per Bothner <per@bothner.com>
11031
11032 * expr.c (expand_java_field_op): Assigning to a final field outside
11033 an initializer does not violate JVM spec, so should be warning, not
11034 error. (Sun's verifier does not complain - though MicroSoft's does.)
e64c46ce 11035
a67a383a
JM
110362001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
11037
11038 * gjavah.c (version), jcf-dump.c (version): Update copyright year
11039 to 2001.
11040
7e1376a1
BM
110412001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
11042
11043 * parse.y (resolve_expression_name): Permit instance variables from
11044 enclosing context in super constructor call.
11045 (resolve_qualified_expression_name): Permit enclosing class's qualified
11046 "this" in super constructor call.
11047
6c418184
MM
110482001-01-10 Mark Mitchell <mark@codesourcery.com>
11049
11050 * class.c (build_utf8_ref): Remove last argument in call to
11051 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11052 (build_class_ref): Likewise.
11053 (build_static_field_ref): Likewise.
11054 (get_dispatch_table): Likewise.
11055 (layout_class_method): Likewise.
11056 (emit_register_classes): Likewise.
11057 * constants.c (build_constant_data_ref): Likewise.
11058 * decl.c (builtin_function): Likewise.
11059 (create_primitive_vtable): Likewise.
11060 * expr.c (build_known_method_def): Likewise.
11061 (build_jni_stub): Likewise.
11062 (java_lang_expand_expr): Likewise.
e64c46ce 11063
0adc3d8a
TT
110642001-01-10 Tom Tromey <tromey@redhat.com>
11065
11066 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11067
761491c8
APB
110682001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11069
11070 * java-tree.h (lang_printable_name_wls): New prototype.
11071 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11072 rather than `current_class' to print type name. Don't prepend type
11073 names when printing constructor names.
11074 (lang_printable_name_wls): New function.
11075 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11076 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11077 * parse.y (patch_method_invocation): Message tuned for constructors.
11078 (not_accessible_p): Grant `private' access from within
11079 enclosing contexts.
e64c46ce 11080
dc08e603
APB
110812001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11082
11083 All files with updated copyright when applicable.
11084 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11085 * class.c (mangle_class_field): Function removed.
11086 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11087 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11088 (build_class_ref): Call `java_mangle_class_field' instead of
11089 `mangle_class_field.'
11090 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
e64c46ce 11091 (layout_class): Call `java_mangle_decl' instead of
dc08e603
APB
11092 `mangle_static_field.'
11093 (cxx_keywords): Initialized static array moved to `lex.c.'
11094 (layout_class_method): Changed leading comment. Simplified to
11095 call `java_mangle_decl.' Local `ptr' moved in for loop body.
11096 * decl.c (lang_mark_tree): Mark field `package_list.'
11097 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11098 (struct lang_type): New field `package_list.'
11099 (unicode_mangling_length): Prototype removed.
11100 (append_gpp_mangled_name, append_gpp_mangled_classtype,
11101 emit_unicode_mangled_name): Likewise.
11102 (cxx_keyword_p): New prototype.
11103 (java_mangle_decl, java_mangle_class_field,
11104 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11105 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11106 `build_expr_wfl.'
11107 * jvgenmain.c (main_method_prefix): Global variable removed.
11108 (main_method_suffix): Likewise.
11109 (do_mangle_classname): New function.
a83f01f0 11110 (main): Call it. Format changed to accommodate new mangling scheme.
dc08e603
APB
11111 * lex.c: (utf8_cmp): Conditionally prototyped.
11112 (cxx_keywords): Moved from class.c, conditionally defined.
11113 (utf8_cmp, cxx_keyword_p): Likewise.
11114 * mangle.c (obstack.h, ggc.h): Included.
11115 (mangle_field_decl): New function.
11116 (mangle_method_decl, mangle_type, mangle_pointer_type,
11117 mangle_array_type, mangle_record_type,
11118 find_compression_pointer_match, find_compression_array_match,
11119 find_compression_record_match,
11120 find_compression_array_template_match, set_type_package_list,
11121 entry_match_pointer_p, emit_compression_string, init_mangling,
11122 finish_mangling, compression_table_add, mangle_member_name): Likewise.
11123 (mangle_obstack): New global.
11124 (MANGLE_RAW_STRING): New macro.
11125 (unicode_mangling_length): Turned static.
11126 (append_unicode_mangled_name): Renamed from
11127 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
11128 replaces `obstack', removed from the parameter list.
11129 (append_gpp_mangled_name): Turned static. `mangle_obstack'
e64c46ce 11130 replaces parameter `obstack', removed from the parameter list. Call
dc08e603
APB
11131 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11132 (append_gpp_mangled_classtype): Removed.
11133 (compression_table, compression_next): New static variables.
11134 * parse.y (temporary_obstack): Extern declaration removed.
11135
761491c8
APB
111362001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11137
11138 * parse.y (patch_binop): Compute missing type in error situations.
11139
5bb11b2e
BM
111402001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11141
11142 * class.c (make_class_data): Push initial value for "arrayclass".
11143 * decl.c (init_decl_processing): Add new class field "arrayclass".
11144
ac39dac0
BM
111452001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
11146
11147 From patha@softlab.ericsson.se:
e64c46ce 11148 * parse.y (switch_label): Use build, not build1, to construct
ac39dac0
BM
11149 DEFAULT_EXPR.
11150
a5a4ce3c
NB
111512001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
11152
11153 * lang.c (lang_decode_option): Change -MA to -MP.
11154 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11155 Update to new prototype; do quote targets.
11156 (jcf_dependency_write): Update.
11157
d27fd99a
BM
111582000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
11159
11160 Shorten primitive array allocation path:
11161 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11162 to create new primitive arrays.
e64c46ce 11163 * expr.c (build_newarray): If generating native code, call
d27fd99a
BM
11164 soft_newarray_node with a reference to the primitive TYPE identifier
11165 instead of type_value.
e64c46ce 11166
c1eacb70
BM
111672000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
11168
11169 Fix for PRs gcj/312 and gcj/253:
11170 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11171 dest if they arn't already.
e64c46ce 11172 * class.c (layout_class): Call maybe_layout_super_class on
c1eacb70
BM
11173 superinterfaces also, but only if compiling from bytecode.
11174
6d003d5c
BM
11175 Fix for PR gcj/373:
11176 * parse.y (create_class): Set ACC_STATIC if class is declared in an
11177 interface.
11178
325de66c
TT
111792000-12-15 Tom Tromey <tromey@redhat.com>
11180
11181 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11182 set.
11183
e35990c4
AH
111842000-12-14 Andrew Haley <aph@redhat.com>
11185
11186 * boehm.c (mark_reference_fields): Change test to correctly detect
11187 bitmap overflow.
11188
53714cda
AJ
111892000-12-15 Andreas Jaeger <aj@suse.de>
11190
11191 * config-lang.in (lang_dirs): Added.
11192
1e0cdc10
APB
111932000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11194
11195 * parse.y (end_artificial_method_body): Fixed undefined behavior.
11196 Credits go to rth for finding it.
11197
e9e42530
MS
111982000-12-13 Mike Stump <mrs@wrs.com>
11199
11200 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11201
3f27e3f8
TT
112022000-11-07 Tom Tromey <tromey@cygnus.com>
11203
11204 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11205 * lex.c (java_ignorable_control_p): Removed.
11206 (java_letter_or_digit_p): Removed.
11207 (java_start_char_p): New function.
11208 (java_read_char): Return `int', not `unicode_t'. Changed
11209 callers.
11210 (java_read_unicode): Likewise.
11211 (java_read_unicode_collapsing_terminators): Likewise.
11212 (java_get_unicode): Likewise.
11213 (java_new_lexer): Initialize hit_eof.
11214 (java_parse_end_comment): Take `int' argument.
11215 (java_parse_doc_section): Likewise.
11216 (java_parse_escape_sequence): Don't allow backlash-newline.
11217 Return `int'.
11218 * lex.h (JAVA_DIGIT_P): Removed.
11219 (_JAVA_LETTER_OR_DIGIT_P): Removed.
11220 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11221 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11222 (JAVA_PART_CHAR_P): New macro.
11223 (UEOF): Now -1.
11224 (JAVA_CHAR_ERROR): Now -2.
11225 (java_lexer): New field `hit_eof'.
11226 * chartables.h: New file.
11227 * gen-table.pl: new file.
11228
568aac9c 112292000-11-20 Tom Tromey <tromey@cygnus.com>
9a07cfaf 11230 Alexandre Petit-Bianco <apbianco@cygnus.com>
568aac9c
TT
11231
11232 * parse.y (java_complete_lhs): Only allow compound assignment of
11233 reference type if type is String.
11234
f34ff6d6
APB
112352000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11236
11237 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11238 jcf-path.c: Likewise.
11239
6e5589e8
AG
112402000-12-09 Anthony Green <green@redhat.com>
11241
11242 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11243 filestart and filename_length as int values.
11244
8000caee
MD
112452000-12-07 Mo DeJong <mdejong@redhat.com>
11246
11247 * jcf-io.c (find_class): Correct the logic that tests to see if a
11248 .java file is newer than its .class file. The compiler was
11249 incorrectly printing a warning when file mod times were equal.
11250
f6bbde28
ZW
112512000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
11252
11253 * jvgenmain.c: Use ISPRINT not isascii.
11254
46142b26
APB
112552000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11256
11257 * parse.y (end_artificial_method_body): Fixed typo.
11258
f8b93ea7
APB
112592000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
11260
11261 * parse.y (patch_method_invocation): Pick the correct enclosing
11262 context when creating inner class instances.
11263 Fixes gcj/332.
11264
45441c5b
JM
112652000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
11266
11267 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11268 Update copyright year to 2000.
11269
1510057a
AG
112702000-11-23 Anthony Green <green@redhat.com>
11271
11272 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11273 Move current_file_list out of yyparse and make it static.
11274
11275 * expr.c: Declare quick_stack and tree_list_free_list as static
11276 (init_expr_processing): Register quick_stack and
11277 tree_list_free_list roots.
11278
5e18f6d6
APB
112792000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
11280
11281 * parse.y (build_outer_field_access): New local `decl_ctx', use
11282 it. Check for field's context and current class immediate outer
11283 context inheritance.
11284 (outer_field_access_p): Consider fields inherited from the last
11285 enclosing context.
11286 (build_access_to_thisn): Stop at the last enclosing context if
11287 necessary.
11288 Fixes gcj/367.
11289
62c9aa5f 112902000-11-23 J"orn Rennecke <amylaar@redhat.com>
9196ece5
R
11291
11292 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11293
c385cdf6
BM
112942000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
11295
11296 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11297 scratch buffer.
11298
1535cc88
TT
112992000-11-20 Tom Tromey <tromey@cygnus.com>
11300
11301 * jv-scan.c (help): Document --complexity.
11302 (options): Added --complexity.
11303 (flag_complexity): New global.
11304 (main): Call `report'.
11305 * parse-scan.y (complexity): New global.
11306 (if_then_statement, if_then_else_statement,
11307 if_then_else_statement_nsi, switch_block_statement_group,
11308 while_expression, do_statement, for_begin, continue_statement,
11309 throw_statement, catch_clause, finally, method_invocation,
11310 conditional_and_expression, conditional_or_expression,
11311 conditional_expression): Update complexity.
11312 (reset_report): Reset complexity.
11313 (report): New function.
11314
d828bc42
TT
113152000-11-20 Tom Tromey <tromey@cygnus.com>
11316
11317 * lex.c (yylex): Added STRICT_TK case.
11318 * parse.y (STRICT_TK): Added.
11319 * parse-scan.y (STRICT_TK): Added.
11320 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11321 `;'. Use 4, not 3, with -k option. Correctly rename resulting
11322 file.
11323 * keyword.h: Rebuilt.
11324 * keyword.gperf (strictfp): Added.
11325
4e7842a0
TT
113262000-11-20 Tom Tromey <tromey@cygnus.com>
11327
11328 * lex.c (yylex): Recognize floating point constants with leading
11329 0.
11330
7e9355c6
KG
113312000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11332
11333 * java-tree.h (cyclic_inheritance_report): Constify.
11334 * parse.y (cyclic_inheritance_report): Likewise.
11335
a8a05998
ZW
113362000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
11337
11338 * parse.y (goal): Remove call to ggc_add_string_root.
11339
520a57c8
ZW
113402000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
11341
11342 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11343 Create string in scratch buffer, then pass to build_string.
11344
88f3c477
JM
113452000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
11346
11347 * parse.y (issue_warning_error_from_context): Add
11348 ATTRIBUTE_PRINTF.
11349
ac51395d
AG
113502000-11-11 Anthony Green <green@redhat.com>
11351
11352 * jcf-parse.c (process_zip_dir): Add finput parameter.
11353 (jcf_figure_file_type): Call process_zip_dir with appropriate
11354 argument.
11355
4e135bdd
KG
113562000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11357
11358 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11359 * jcf-parse.c (jcf_figure_file_type): Likewise.
11360
2e09e75a
JM
113612000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
11362
11363 * parse.y (create_new_parser_context): Use memset () instead of
11364 bzero ().
11365
136c35df
TT
113662000-11-08 Tom Tromey <tromey@cygnus.com>
11367
11368 * gjavah.c (process_file): Only include gcj/cni.h when generating
11369 CNI stubs.
11370
961192e1
JM
113712000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
11372
11373 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11374 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11375 instead of bzero ().
11376
099a5150
TT
113772000-11-05 Tom Tromey <tromey@cygnus.com>
11378
11379 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11380 * lex.c (IS_ZERO): New define.
11381 (java_perform_atof): Error on floating point underflow.
11382
cbf53a1d
TT
113832000-11-04 Tom Tromey <tromey@cygnus.com>
11384
11385 * lex.c (java_parse_escape_sequence): Only read two octal
11386 characters if the first one is greater than 3. Don't allow
11387 "octal" numbers to include the digits 8 or 9.
11388
436a88a6
JM
113892000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
11390
11391 * Make-lang.in (java.distdir): Remove.
11392
747800ee
TT
113932000-11-03 Tom Tromey <tromey@cygnus.com>
11394
4e2c8d44
TT
11395 * Make-lang.in (java.dvi): New target.
11396 Partial fix for PR other/567.
11397
b7436b72
TT
11398 * lang-options.h: Mention -Wout-of-date.
11399 * jcf-dump.c (flag_newer): New global.
11400 * gjavah.c (flag_newer): New global.
11401 * jcf-io.c (find_class): Only warn when flag_newer set.
11402 * lang.c (flag_newer): New global.
11403 (struct string_option): New declaration.
11404 (lang_W_options): New global.
11405 (process_option_with_no): New function.
11406 (lang_decode_option): Use it.
11407
0160fbe1
TT
11408 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11409 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11410 `$'.
11411
747800ee
TT
11412 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11413 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11414 * lex.c (java_read_unicode): Removed `term_context' argument.
11415 Recognize any number of `u' in `\u'.
11416 (java_read_unicode_collapsing_terminators): New function.
11417 (java_get_unicode): Use it.
11418 (java_lineterminator): Removed.
11419 (yylex): Produce error if character literal is newline or single
11420 quote. Return if eof found in middle of `//' comment. EOF in
11421 `//' comment is only an error if pedantic.
11422 (java_ignorable_control_p): New function.
11423 (java_parse_end_comment): Return if eof found in middle of
11424 comment.
11425 Include flags.h.
11426 * jv-scan.c (pedantic): New global.
11427
ee5f86dc
APB
114282000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11429
11430 * parse.y (outer_field_access_p): Inherited fields aren't
11431 consider outer fields.
11432 (maybe_build_thisn_access_method): Use
11433 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11434 (resolve_expression_name): Trigger an error if a static field
11435 is being accessed as an outer field.
11436
7ccd2fc9 114372000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 11438
7ccd2fc9
APB
11439 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11440 Fixes gcj/365.
11441
b8dad04b
ZW
114422000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
11443
11444 * Make-lang.in: Move all build rules here from Makefile.in,
11445 adapt to new context. Wrap all rules that change the current
11446 directory in parentheses. Expunge all references to $(P).
11447 When one command depends on another and they're run all at
11448 once, use && to separate them, not ;. Add OUTPUT_OPTION to
11449 all object-file generation rules. Delete obsolete variables.
11450
11451 * Makefile.in: Delete.
11452 * config-lang.in: Delete outputs= line.
11453
2cb3951d
APB
114542000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11455
11456 * parse.y (patch_method_invocation): NULLify this_arg when already
11457 inserted.
11458 (maybe_use_access_method): Handle call to methods unrelated to the
11459 current class. Fixed comment.
11460 Fixes gcj/361.
11461
ee5f86dc
APB
114622000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11463
5f86874e
AP
11464 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11465 scope.
ee5f86dc 11466
07b5e470
TT
114672000-10-24 Tom Tromey <tromey@cygnus.com>
11468
11469 * lex.c (java_new_lexer): Initialize new fields. Work around
11470 broken iconv() implementations.
11471 (java_read_char): Swap bytes if required. Use fallback decoder if
11472 required.
11473 (byteswap_init, need_byteswap): New globals.
11474 (java_destroy_lexer): Only close iconv handle if it is in use.
11475 * lex.h (java_lexer): New fields read_anything, byte_swap,
11476 use_fallback.
11477 Made out_buffer unsigned.
11478
8ac1de05
APB
114792000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11480
11481 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11482 where an enclosing context can be set on the jdep.
11483 (do_resolve_class): Fixed identation.
11484
80393943
KG
114852000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11486
11487 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
f6bbde28 11488
80393943
KG
11489 * jcf-reader.c (peek_attribute, skip_attribute): Only define
11490 when requested.
11491
11492 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11493
11494 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11495
c7303e41
APB
114962000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11497
11498 * jcf-write.c (OP1): Update `last_bc'.
11499 (struct jcf_block): Fixed indentation and typo in comments. New
11500 field `last_bc'.
11501 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11502 follows `monitorenter'.
11503 * parse.y (patch_synchronized_statement): New local `tmp'. Call
11504 `patch_string'.
11505 Fixes gcj/232.
11506
316a06a1
TT
115072000-10-16 Tom Tromey <tromey@cygnus.com>
11508
11509 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11510 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11511 * lang-options.h: Added -MA, -MT, -MF..
11512 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11513 (DEPEND_TARGET_SET): New macro.
11514 (DEPEND_FILE_ALREADY_SET): Likewise.
11515 (init_parse): Handle new flags.
11516 * jcf.h (jcf_dependency_print_dummies): Declare.
11517 * Make-lang.in (s-java): Added mkdeps.o.
11518 * Makefile.in (BACKEND): Added mkdeps.o.
11519 (../gcjh$(exeext)): Added mkdeps.o.
11520 (../jcf-dump$(exeext)): Added mkdeps.o.
11521 * jcf-depend.c: Include mkdeps.h.
11522 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11523 add_entry): Removed.
11524 (jcf_dependency_reset): Rewrote.
11525 (dependencies): New global.
11526 (jcf_dependency_set_target): Rewrote.
11527 (jcf_dependency_add_target): Likewise.
11528 (jcf_dependency_add_file): Likewise.
11529 (munge): Removed.
11530 (print_ents): Removed.
11531 (jcf_dependency_write): Rewrote.
11532 (print_dummies): New global.
11533 (jcf_dependency_print_dummies): New function
11534 (jcf_dependency_write): Call deps_dummy_targets if required.
11535
dba41d30
APB
115362000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
11537
11538 * gjavah.c (add_class_decl): Removed unused variables `tname',
11539 `tlen' and `name_index'.
11540 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11541 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11542 in `wfl_operator' with value.
11543 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11544 (jcf_figure_file_type): Fixed identation.
11545 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11546 * parse.y (analyze_clinit_body): New function.
11547 (static_initializer:): Reset `current_static_block'.
11548 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11549 `wfl_operator' with new value.
11550 (lookup_cl): Use EXPR_WFL_FILENAME.
11551 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11552 analyze_clinit_body.
11553 (build_outer_field_access): Access to this$<n> built from
11554 current_class, not its outer context.
11555 (build_access_to_thisn): Fixed leading comment. Tidied things up.
f6bbde28 11556 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
dba41d30
APB
11557 (patch_method_invocation): Use `is_static_flag' when already
11558 initialized.
11559 (patch_newarray): Removed assignment in ternary operator.
11560
1a2ebe6d
APB
115612000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11562
dba41d30 11563 * except.c (free_eh_ranges): Don't free `whole_range'.
1a2ebe6d 11564
8e7ab3ff
AG
115652000-10-15 Anthony Green <green@redhat.com>
11566
11567 * decl.c (init_decl_processing): Call init_class_processing before
11568 anything else.
11569
c7303e41
APB
115702000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11571
11572 * check-init.c (check_init): Fixed leading comment. Use
11573 LOCAL_FINAL_P.
11574 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11575 (give_name_to_locals): Likewise.
11576 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11577 fields in lang_decl_var.
11578 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11579 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11580 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11581 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11582 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11583 (LOCAL_FINAL): Rewritten.
11584 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11585 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11586 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11587 `init_final' fields.
11588 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11589 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11590 (TYPE_HAS_FINAL_VARIABLE): New macro.
11591 (struct lang_type): Added `afv' field.
11592 * parse.y (check_static_final_variable_assignment_flag): New function.
11593 (reset_static_final_variable_assignment_flag): Likewise.
11594 (check_final_variable_local_assignment_flag): Likewise.
11595 (reset_final_variable_local_assignment_flag): Likewise.
11596 (check_final_variable_indirect_assignment): Likewise.
11597 (check_final_variable_global_assignment_flag): Likewise.
11598 (add_inner_class_fields): Use LOCAL_FINAL_P.
11599 (register_fields): Handle local finals and final variables.
11600 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11601 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11602 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11603 on local finals.
11604 (java_complete_expand_methods): Loop to set
11605 TYPE_HAS_FINAL_VARIABLE. Call
f6bbde28 11606 `reset_final_variable_local_assignment_flag' and
c7303e41
APB
11607 `check_final_variable_local_assignment_flag' accordingly before
11608 and after constructor expansion. Call
11609 `reset_static_final_variable_assignment_flag'
f6bbde28 11610 before expanding <clinit> and after call
c7303e41
APB
11611 `check_static_final_variable_assignment_flag' if the
11612 current_class isn't an interface. After all methods have been
11613 expanded, call `check_final_variable_global_assignment_flag' and
11614 `check_static_final_variable_assignment_flag' if the current class
f6bbde28 11615 is an interface.
c7303e41
APB
11616 (maybe_yank_clinit): Fixed typo in comment.
11617 (build_outer_field_access_methods): Removed old sanity check. Use
11618 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11619 Don't create access methods for finals.
11620 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11621 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
f6bbde28 11622 existing DECL_INIT has been processed.
c7303e41
APB
11623 (java_complete_lhs): Likewise.
11624 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11625 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11626 logic.
11627 (patch_assignment): Use LOCAL_FINAL_P.
11628 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11629 DECL_INITIAL is nullified.
11630 Fixes gcj/163.
11631
4b945402
KG
116322000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11633
11634 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
f6bbde28 11635
4b945402
KG
11636 * Makefile.in (parse.c, parse-scan.c): Likewise.
11637
1f8f4a0b
MM
116382000-10-12 Mark Mitchell <mark@codesourcery.com>
11639
11640 * class.c (temporary_obstack): Remove.
11641 (make_class): Don't mess with obstascks.
11642 (push_class): Likewise.
11643 (set_super_info): Likewise.
11644 (add_method_1): Likewise.
11645 (add_method): Likewise.
11646 (add_field): Likewise.
11647 (build_utf8_ref): Likewise.
11648 (build_class_ref): Likewise.
11649 (build_static_field_ref): Likewise.
11650 (finish_class): Likewise.
11651 (push_super_field): Likewise.
11652 (layout_class): Likewise.
11653 (layout_class_methods): Likewise.
11654 (init_class_processing): Likewise.
11655 * constants.c (get_tag_node): Likewise.
11656 (build_constant_data_ref): Likewise.
11657 * decl.c (ggc_p): Remove.
11658 (copy_lang_decl): Use ggc_alloc.
11659 (complete_start_java_method): Don't mess with obstacks.
11660 (start_java_method): Likewise.
11661 (end_java_method): Likewise.
11662 * except.c (link_handler): Use xmalloc.
11663 (free_eh_ranges): New function.
11664 (method_init_exceptions): Use it.
11665 (add_handler): Use xmalloc.
11666 (expand_start_java_handler): Don't mess with obstacks.
11667 (prepare_eh_table_type): Likewise.
11668 (expand_end_java_handler): Likewise.
11669 * expr.c (push_value): Likewise.
11670 (create_label_decl): Likewise.
11671 (build_jni_stub): Likewise.
11672 (java_lang_expand_expr): Likewise.
11673 (note_instructions): Use xrealloc.
11674 (java_push_constant_from_pool): Don't mess with obstacks.
11675 (process_jvm_instruction): Likewise.
11676 * java-tree.h (cyclic_inheritance_report): Remove duplicate
11677 declaration.
11678 * jcf-parse.c (get_constant): Don't mess with obstacks.
11679 (read_class): Likewise.
11680 (jcf_parse): Likewise.
a83f01f0 11681 * lex.c (expression_obstack): Remove.
1f8f4a0b
MM
11682 (java_lex): Don't use obstack_free.
11683 * parse.h (exit_java_complete_class): Don't mess with obstacks.
11684 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11685 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11686 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11687 * parse.y (gaol): Add more GC roots.
11688 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11689 (lookup_field_wrapper): Likewise.
11690 (obtain_incomplete_type): Don't mess with obstacks.
a83f01f0 11691 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
1f8f4a0b
MM
11692 macros.
11693 (craft_constructor): Don't mess with obstacks.
11694 (safe_layout_class): Likewise.
11695 (java_complete_class): Likewise.
11696 (source_end_java_method): Likewise.
11697 (build_outer_field_access_methods): Likewise.
11698 (build_outer_method_access_method): Likewise.
11699 (maybe_build_thisn_access_method): Likewise.
11700 (build_dot_class_method_invocation): Likewise.
11701 (java_complete_tree): Likewise.
11702 (java_complete_lhs): Likewise.
11703 (do_merge_string_cste): Likewise.
11704 (patch_string_cst): Likewise.
11705 (array_constructor_check_entry): Likewise.
11706 * typeck.c (build_java_array_type): Likewise.
11707 (parse_signature_string): Likewise.
11708 (build_java_signature): Likewise.
f6bbde28 11709
3c1d1e7b
TT
117102000-10-12 Tom Tromey <tromey@cygnus.com>
11711
11712 Fix for PR gcj/356:
11713 * gjavah.c (add_class_decl): Don't special-case inner classes.
11714 (add_namelet): Likewise.
11715
a93eddcf
APB
117162000-10-11 Rodney Brown <RodneyBrown@mynd.com>
11717
11718 * java-tree.h: Constify current_encoding.
11719 * lang.c: Constify current_encoding.
11720
117212000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
11722
11723 * jvgenmain.c (class_mangling_suffix): Omit `.'.
11724 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11725
117262000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11727
11728 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11729 patch. Fixes gcj/340.
11730
2e165c53
TT
117312000-10-10 Tom Tromey <tromey@cygnus.com>
11732
11733 * lex.c (java_new_lexer): Initialize out_first and out_last
11734 fields.
11735 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11736
c7303e41
APB
117372000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11738
11739 * parse.y (pop_current_osb): New function.
11740 (array_type:): Use `dims:', changed actions
11741 accordingly. Suggested by Anthony Green.
11742 (array_creation_expression:): Used pop_current_osb.
11743 (cast_expression:): Likewise.
11744 (search_applicable_method_list): Fixed indentation.
11745
117462000-10-08 Anthony Green <green@redhat.com>
11747
11748 * parse.y (array_type_literal): Remove production.
11749 (type_literals): Refer to array_type, not array_type_literal.
11750
29f8b718
APB
117512000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11752
11753 Patch contributed by Corey Minyard.
11754 * decl.c (check_local_named_variable): New function.
11755 (tree check_local_unnamed_variable): Likewise.
11756 (find_local_variable): Splitted. Call check_local_{un}named_variable.
11757
7fd9a516
AG
117582000-10-07 Anthony Green <green@redhat.com>
11759
11760 * class.c (layout_class): Handle case where superclass can't be
11761 layed out yet.
11762
20d431c9
JM
117632000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
11764
11765 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11766 gperf.
11767
e0a0c416
TT
117682000-10-05 Tom Tromey <tromey@cygnus.com>
11769
11770 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11771 * jvgenmain.c (class_mangling_prefix): Removed.
11772 (class_mangling_suffix): New global.
11773 (main): Use it.
11774 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11775 `$'.
11776 (print_method_info): Handle overrides for static and final
11777 methods.
11778 (process_file): Generate declaration for class object field.
11779 * class.c (cxx_keywords): New array.
11780 (utf8_cmp): New function.
11781 (cxx_keyword_p): New function.
11782 (layout_class_method): Mangle C++ keywords by appending `$'.
11783 (mangle_field): New function.
11784 (mangle_class_field): Use mangle_field. Mangle class name as
11785 `class$'.
11786 (mangle_static_field): Use mangle_field.
11787
62c9aa5f 117882000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6e22695a
APB
11789
11790 * decl.c (find_local_variable): Removed uncessary type check and
11791 fixed range check typo. From Corey Minyard.
11792
62c9aa5f 117932000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6e22695a
APB
11794
11795 * decl.c (give_name_to_locals): New local `code_offset'. Call
e64c46ce 11796 `maybe_adjust_start_pc'.
6e22695a
APB
11797 * expr.c (note_instructions): New function.
11798 (expand_byte_code): Don't collect insn starts here.
11799 (peek_opcode_at_pc): New function.
11800 (maybe_adjust_start_pc): Likewise.
11801 * java-tree.h (maybe_adjust_start_pc): Declare.
11802 (note_instructions): Likewise.
dba41d30 11803 * jcf-parse.c (parse_class_file): Call `note_instructions'.
6e22695a 11804
62c9aa5f 118052000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6e22695a
APB
11806
11807 * parse.y (field_access:): Fixed indentation.
11808 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11809
7e51098e
TT
118102000-09-07 Tom Tromey <tromey@cygnus.com>
11811
11812 Fix for PR gcj/307:
11813 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11814 JPRIMITIVE_TYPE_P, for arithmetic operators.
11815 (patch_method_invocation): Indentation fix.
11816 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
11817 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11818 (do_unary_numeric_promotion): Cleaned up code.
11819 (valid_cast_to_p): Handle boolean correctly.
11820
5beededc
TT
118212000-09-27 Tom Tromey <tromey@cygnus.com>
11822
11823 * lex.c (java_read_unicode): Reset bs_count when finished with
11824 `\u' sequence.
11825
f15b9af9
MM
118262000-10-01 Mark Mitchell <mark@codesourcery.com>
11827
11828 Convert to GC.
11829 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11830 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11831 (typeck.o): Depend on ggc.h.
11832 * class.c (add_method_1): Use GC functions for allocation.
11833 (init_class_processing): Register roots.
11834 * decl.c (ggc_p): Set to 1.
11835 (pending_local_decls): Make it static.
11836 (push_jvm_slot): Use GC functions for allocation.
11837 (init_decl_processing): Register roots.
11838 (give_name_to_locals): Use GC functions for allocation.
11839 (lang_mark_tree): New function.
11840 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11841 functions for allocation.
11842 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11843 * lex.c (java_lex): Use build_string, rather than replicating it
11844 inline.
11845 * parse.y (goal): Add more roots.
11846 (mark_parser_ctxt): New function.
11847 * typeck.c: Include ggc.h.
f6bbde28 11848
99eaf8d4
APB
118492000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11850
11851 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11852 contains something else than MODIFY_EXPR.
11853
19e223db
MM
118542000-09-23 Mark Mitchell <mark@codesourcery.com>
11855
11856 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11857 * Makefile.in (parse.o): Depend on ggc.h.
11858 (class.o): Likewise.
11859 (constants.o): Likewise.
11860 (decl.o): Likewise.
11861 (expr.o): Likewise.
11862 (jcf-parse.o): Likewise.
11863 (jcf-write.o): Likewise.
11864 (mangle.o): Likewise.
11865 * class.c: Include ggc.h.
11866 (build_static_field_ref): Register GC roots.
11867 (layout_class): Likewise.
11868 (init_class_processing): Likewise.
11869 * constants.c: Include ggc.h.
11870 (current_constant_pool_data_ref): Remove.
11871 (tag_nodes): Move it to ...
11872 (get_tag_node): ... here. Register GC roots.
11873 * decl.c: Include ggc.h. Remove many global tree definitions.
11874 (throw_node): Define.
11875 (java_global_trees): Likewise.
11876 (predef_filenames): Make the size a constant.
11877 (init_decl_processing): Adjust accordingly.
11878 (init_decl_processing): Call init_jcf_parse. Register GC roots.
11879 * expr.c: Include ggc.h.
11880 (init_expr_processing): Register GC roots.
11881 (build_invokeinterface): Likewise.
11882 * java-tree.h: Replace extern tree declarations with macros.
11883 (java_global_trees): New variable.
11884 (java_tree_index): New enumeration.
11885 (init_jcf_parse): Declare.
11886 * jcf-parse.c: Include ggc.h.
11887 (current_class): Remove declaration.
11888 (main_class): Likewise.
11889 (all_class_list): Likewise.
11890 (predefined_filename_p): Adjust for constant size of
11891 predef_filenames.
11892 (init_jcf_parse): New function.
11893 * jcf-write.c: Include ggc.h.
11894 (generate_classfile): Register GC roots.
11895 (append_synthetic_attribute): Likewise.
11896 (append_innerclass_attribute_entry): Likewise.
11897 * lang.c: Include ggc.h.
11898 (lang_print_error): Register GC roots.
11899 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11900 with macros.
11901 * parse.y: Include ggc.h.
11902 (wfl_operator): Remove.
11903 (goal): Register GC roots.
11904 (java_pop_parser_context): Adjust for new field names.
11905 (java_parser_context_save_global): Likewse.
11906 (java_parser_context_restore_global): Likewise.
11907 (java_parser_context_suspend): Likewise.
11908 (java_parser_context_resume): Likewise.
11909 (verify_constructor_circularity): Register GC roots.
11910 (lookup_cl): Likewise.
11911 (java_reorder_fields): Likewise.
11912 (build_current_this): Likewise.
11913 (class_in_current_package): Likewise.
11914 (argument_types_convertible): Likewise.
11915 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
f6bbde28 11916
4c4b521a
TT
119172000-09-14 Tom Tromey <tromey@cygnus.com>
11918
11919 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11920
6b8a24cd
TT
119212000-09-13 Tom Tromey <tromey@cygnus.com>
11922
11923 * jcf-parse.c: Include <locale.h>.
11924 * jv-scan.c: Include <locale.h>.
11925
86e4b1e4
TT
119262000-09-12 Tom Tromey <tromey@cygnus.com>
11927
11928 * expr.c (pop_type_0): Return `Object' if trying to merge two
11929 interface types.
11930 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11931 interface types; `Object' is always a valid supertype.
11932
d19cbcb5
TT
119332000-09-12 Tom Tromey <tromey@cygnus.com>
11934
11935 Fix for PR gcj/33:
11936 * jv-scan.c (help): Document --encoding.
11937 (options): Added `encoding' entry.
11938 (OPT_ENCODING): New define.
11939 (main): Handle --encoding.
11940 Include <langinfo.h> if nl_langinfo exists.
11941 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11942 --encoding.
11943 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11944 (parse_source_file): Correctly call java_init_lex. Added `finput'
11945 argument. Use nl_langinfo to determine default encoding.
11946 * java-tree.h (current_encoding): Declare.
11947 * parse.y (java_parser_context_restore_global): Don't restore
11948 `finput'.
11949 (java_parser_context_save_global): Don't set `finput' field.
11950 (java_pop_parser_context): Don't restore `finput'. Free old lexer
11951 if required.
11952 * lang.c (current_encoding): New global.
11953 (lang_decode_option): Recognize `-fencoding='.
11954 (finish_parse): Don't close finput.
11955 * parse.h (struct parser_ctxt): Removed `finput' and
11956 `unget_utf8_value' fields. Added `lexer' field.
11957 (java_init_lex): Fixed declaration.
11958 * lex.c (java_new_lexer): New function.
11959 (java_destroy_lexer): Likewise.
11960 (java_read_char): Added `lex' argument. Handle iconv case.
11961 (java_read_unicode): Added `lex' argument. Count backslashes in
11962 lexer structure.
11963 (java_init_lex): Added `finput' and `encoding' arguments. Set
11964 `lexer' field in ctxp.
11965 (BAD_UTF8_VALUE): Removed.
11966 (java_lex): Handle seeing UEOF in the middle of a string literal.
11967 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11968 (java_lexer): New structure.
11969 (UNGETC): Removed.
11970 (GETC): Removed.
11971 (DEFAULT_ENCODING): New define.
11972 (java_destroy_lexer): Declare.
11973
ee17a290
TT
119742000-09-12 Tom Tromey <tromey@cygnus.com>
11975
11976 Fix for PR gcj/343:
11977 * lex.c (java_init_lex): Initialize java_io_serializable.
11978 * parse.y (java_io_serializable): New global.
11979 (valid_ref_assignconv_cast_p): An array can be cast to
11980 serializable.
11981
d8ea8f28
ZW
119822000-09-10 Zack Weinberg <zack@wolery.cumb.org>
11983
11984 * decl.c, expr.c: Include defaults.h if not already included.
11985 Don't define the *_TYPE_SIZE macros.
11986
0caae6dd
GK
119872000-09-09 Geoffrey Keating <geoffk@cygnus.com>
11988
11989 * typeck.c (build_java_array_type): Correct first parameter
11990 in ADJUST_FIELD_ALIGN invocation.
11991
f0bee8b3
TT
119922000-09-06 Tom Tromey <tromey@cygnus.com>
11993
11994 * lang-specs.h: Also recognize `-femit-class-files'.
11995
3e99f50c
APB
119962000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11997
11998 * verify.c (merge_types): Load the types to merge if necessary.
11999
3ca8c9ae
AG
120002000-09-02 Anthony Green <green@redhat.com>
12001
12002 * jcf-io.c: Include zlib.h.
12003 (open_in_zip): Read compressed class file archives.
12004 * zipfile.h (ZipDirectory): Add uncompressed_size and
12005 compression_method fields.
12006 * zextract.c (read_zip_archive): Collect file compression info.
12007
e1d565ab
BM
120082000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
12009
f6bbde28 12010 * parse.y (do_resolve_class): Also explore superclasses of
e1d565ab
BM
12011 intermediate enclosing contexts when searching for inner classes.
12012
29f8b718
APB
120132000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12014
12015 * parse.y (variable_declarator_id:): Better error message.
12016 (expression_statement:): Use YYNOT_TWICE.
12017 (cast_expression:): Likewise.
12018 (assignment:): Likewise.
12019
354e99ce
APB
120202000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12021
12022 * parse.y (do_merge_string_cste): New locals. Create new
12023 STRING_CSTs each time, use memcpy. Fixes gcj/311.
12024
7c097ee9
HB
120252000-08-07 Hans Boehm <boehm@acm.org>
12026
12027 * boehm.c (mark_reference_fields): Set marking bits for all words in
12028 a multiple-word record.
12029 (get_boehm_type_descriptor): Use the procedure marking descriptor for
12030 java.lang.Class.
f6bbde28 12031
3d919a0e
MS
120322000-08-31 Mike Stump <mrs@wrs.com>
12033
12034 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12035 jcf-dump$(exeext)): Make parallel safe.
12036
63ad61ed
ZW
120372000-08-29 Zack Weinberg <zack@wolery.cumb.org>
12038
12039 * jcf-parse.c (set_source_filename): Constify a char *.
12040 * jcf-write.c (append_innerclasses_attribute,
12041 make_class_file_name): Constify a char *. Don't recycle a
12042 variable for an unrelated purpose.
12043 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12044 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12045
c00f0fb2
APB
120462000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12047
12048 * expr.c (can_widen_reference_to): Fixed indentation.
12049 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12050 * parse.y: `finit$' replaces `$finit$' in comments.
12051 (try_builtin_assignconv): Fixed leading comment.
12052
94574545
GM
120532000-08-25 Greg McGary <greg@mcgary.org>
12054
12055 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12056
6e2aa220
GM
120572000-08-24 Greg McGary <greg@mcgary.org>
12058
12059 * lang.c (lang_decode_option): Use ARRAY_SIZE.
12060 * parse.y (BINOP_LOOKUP): Likewise.
12061
9b1ee05b
AH
120622000-08-22 Andrew Haley <aph@cygnus.com>
12063
12064 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12065 sign extending. Fixes gcj/321.
12066 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12067 combining to make a jlong. Fixes gcj/321.
12068
05a3d06e 120692000-08-21 Nix <nix@esperi.demon.co.uk>
f6bbde28 12070
05a3d06e
N
12071 * lang-specs.h: Do not process -o or run the assembler if
12072 -fsyntax-only.
12073
65f69237
AH
120742000-08-16 Andrew Haley <aph@cygnus.com>
12075
12076 * typeck.c (build_java_array_type): Rewrite code to do array
12077 alignment. Take into account back-end macros when aligning array
12078 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12079 user to set alignment. Fixes gcj/252 and 160.
12080
2e0f0aff
TT
120812000-08-09 Tom Tromey <tromey@cygnus.com>
12082
1175b9b4
TT
12083 * parse.y (check_abstract_method_definitions): Now return `int'.
12084 Check implemented interfaces. Fixes PR gcj/305.
12085
2e0f0aff
TT
12086 * parse.y (patch_switch_statement): Disallow `long' in switch
12087 expressions. Fixes PR gcj/310.
12088
25bdcbc5
APB
120892000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12090
12091 * decl.c (finit_leg_identifier_node): New global.
12092 (init_decl_processing): Use `finit$' to initialize
12093 finit_identifier_node. Use `$finit$' to initialize
12094 finit_leg_identifier_node.
12095 * expr.c (expand_java_field_op): Use ID_FINIT_P.
12096 * java-tree.h (finit_identifier_node): Changed attached comment.
12097 (finit_leg_identifier_node): New declaration.
12098 (ID_FINIT_P): Take finit_identifier_node and
12099 finit_leg_identifier_node into account. This is a backward
12100 compatibility hack.
12101
81baa09a
APB
121022000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12103
12104 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12105 Jan 6 2000 patch.
12106 (generate_bytecode_insns): Check `nargs' before emitting it.
12107 * verify.c (merge_type_state): Fixed typo.
12108 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12109 generate_bytecode_{conditional,insns}.
12110
62c9aa5f 121112000-08-13 Anthony Green <green@redhat.com>
458530ee
AG
12112
12113 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12114 for -pg builds).
12115
34d4df06
APB
121162000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12117
12118 * class.c (maybe_layout_super_class): Fixed indentation.
12119 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12120 (java_check_methods): New function declaration.
12121 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12122 instead of `str_ptr'.
12123 * jcf-write.c (generate_bytecode_insns): Emit number the of args
12124 of a `invokeinterface' at the right time.
12125 * parse.h (WFL_STRIP_BRACKET): New macro.
12126 (SET_TYPE_FOR_RESOLUTION): Use it.
dba41d30 12127 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
34d4df06
APB
12128 (check_class_interface_creation): Don't check for cross package
12129 innerclass name clashes.
dba41d30 12130 (method_header): Behave properly if MDECL is `error_mark_node'.
34d4df06
APB
12131 (method_declarator): Return `error_mark_node' if bogus current
12132 class.
12133 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12134 (resolve_and_layout): New local `decl_type', set and used. Call
12135 java_check_methods.
12136 (java_check_methods): New method.
12137 (java_layout_classes): Use it.
12138 (resolve_qualified_expression_name): No EH check necessary in
12139 access$<n>.
12140 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12141 `case' statement.
12142 (patch_assignment): Set DECL_INITIAL on integral final local.
12143
5f1c312a
APB
121442000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
12145
12146 * java-tree.h (flag_extraneous_semicolon): New extern.
12147 * lang-options.h: (-Wextraneous-semicolon): New option.
12148 * lang.c (flag_redundant): Fixed typo in leading comment.
12149 (flag_extraneous_semicolon): New global.
12150 (lang_decode_option): Set `flag_extraneous_semicolon' when
12151 -Wall. Decode `-Wextraneous-semicolon'.
12152 * parse.y (type_declaration:): Removed `SC_TK' hack, added
12153 `empty_statement' rule.
12154 (class_body_declaration): Likewise.
12155 (method_body:): Accept `;' as a method body.
12156 (static_initializer:): Removed `SC_TK' hack.
12157 (constructor_block_end:): Likewise.
12158 (empty_statement:): Report deprecated empty declaration. Fixes
12159 gcj/295
12160
25bdcbc5 121612000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
f0f3a777
APB
12162
12163 * parse.y (build_dot_class_method_invocation): Changed parameter
dba41d30 12164 name to `type'. Build signature from `type' and convert it to a
f0f3a777
APB
12165 STRING_CST if it's an array.
12166 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12167 to use `ref_type' directly.
12168
62c9aa5f 121692000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
64c04091
OP
12170
12171 * lang-options.h: Added a comma after the last element to avoid
12172 syntax errors when other languages define additional options.
12173
a36556a8
ZW
121742000-08-04 Zack Weinberg <zack@wolery.cumb.org>
12175
12176 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12177 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12178 (jc1): Link with $(BACKEND).
12179 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12180
50e60bc3
ZW
121812000-08-02 Zack Weinberg <zack@wolery.cumb.org>
12182
37620334
ZW
12183 * jvspec.c: Adjust type of second argument to
12184 lang_specific_driver, and update code as necessary.
12185
50e60bc3
ZW
12186 * class.c (build_dtable_decl): Initialize dummy.
12187
f0f3a777
APB
121882000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12189
12190 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12191 method bodies not to rule out discarding `<clinit>'; don't use
12192 <clinit> to initialize static fields with constant initializers.
12193
121942000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12195
12196 * gjavah.c (print_method_info): Added `synth' parameter. Skip
12197 synthetic methods.
12198 (method_synthetic): New global.
12199 (HANDLE_METHOD): Recognize synthetic method and tell
12200 `print_method_info' about it.
12201 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12202 processing a synthetic method.
12203 * jcf-reader.c (skip_attribute): New function.
12204 ( skip_attribute): Likewise.
12205
122062000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12207
12208 * parse.y (build_outer_field_access): Fixed comments.
12209 (fix_constructors): Emit the initialization of this$<n> before
12210 calling $finit$.
12211 (resolve_qualified_expression_name): Build an access to `decl' if
12212 necessary.
12213
122142000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12215
12216 * parse-scan.y (curent_class): Non longer const.
12217 (inner_qualifier, inner_qualifier_length): Deleted.
12218 (current_class_length): New global.
12219 (bracket_count): Fixed typo in leading comment.
12220 (anonymous_count): New global.
12221 (class_instance_creation_expression:): Handle anonymous classes.
12222 (anonymous_class_creation:): New rule.
12223 (push_class_context): Rewritten.
12224 (pop_class_context): Likewise.
12225 (INNER_QUALIFIER): Macro deleted.
12226 (report_class_declaration): call `push_class_context' when
12227 entering the function. `fprintf' format modified not to use
12228 INNER_QUALIFIER.
12229 (report_class_declaration): Assign `package_name' and
a83f01f0 12230 `current_class' to NULL separately.
f0f3a777
APB
12231
122322000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12233
12234 * expr.c (build_invokeinterface): Call layout_class_methods on
12235 target interface.
12236
13107ec0 122372000-07-27 Tom Tromey <tromey@cygnus.com>
f6bbde28 12238 Anthony Green <green@cygnus.com>
13107ec0
TT
12239 Alexandre Petit-Bianco <apbianco@cygnus.com>
12240
12241 * class.c (make_class_data): Create vtable for abstract classes.
12242 (get_dispatch_table): Changed to cope with abstract classes.
12243
da632f2c
APB
122442000-07-27 Tom Tromey <tromey@cygnus.com>
12245
12246 * parse.y (patch_method_invocation): Don't reverse the argument
12247 list when dealing with anonymous class constructors. Fixed typo in
12248 comment.
12249
122502000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12251
12252 * parse.y (build_alias_initializer_parameter_list): Reverse
12253 crafted list when building aliases for anonymous class
12254 constructors.
12255
1e12ab9b
APB
122562000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12257
12258 * parse.y (jdep_resolve_class): Don't bother checking potential
12259 innerclass access if `decl' is NULL.
12260 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12261 WFL.
12262
4c31fe99
APB
122632000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12264
12265 * parse.c: Remove (again.)
12266
1e12ab9b
APB
122672000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12268
12269 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12270 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12271 outside the `if' statement, alias to innerclass removed, `decl'
12272 used to mark the class complete.
12273
f4530f43
APB
122742000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12275
12276 * parse.y (simple_name:): Fixed typo in error message.
12277
e7c7bcef
APB
122782000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12279
12280 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12281 or its first operand can be error marks.
12282
122832000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12284
12285 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12286 * parse.y (method_header): Likewise.
12287
02ae6e2e
APB
122882000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12289
12290 * parse.y (process_imports): Consider that one might be trying to
12291 import an innerclass. Fixes gcj/254
12292
e7c7bcef
APB
122932000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12294
12295 * parse.y (find_as_inner_class): Handle the case where the
12296 enclosing context of an innerclass has been loaded as bytecode.
12297
4142b247
APB
122982000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12299
f6bbde28 12300 * parse.y (simple_name:): Reject `$' in type names.
4142b247
APB
12301 (resolve_type_during_patch): Use `type' as a second
12302 argument to resolve_no_layout. Fixes gcj/257.
12303
cab8e2bd
BM
123042000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
12305
f6bbde28 12306 * parse.y (find_most_specific_methods_list): Select the only
cab8e2bd
BM
12307 non-abstract method even if max has been set.
12308 Fixes gcj/285, gcj/298.
12309
ca2875c4
JS
123102000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
12311
12312 * lang-specs.h: Added %(jc1) to java compiler options.
12313
bfbbc080
ZW
123142000-07-14 Zack Weinberg <zack@wolery.cumb.org>
12315
12316 * .cvsignore: New file.
12317
11b26d72
APB
123182000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12319
12320 * parse.y (not_accessible_p): Access granted to innerclasses
12321 (indirectly) extending the reference type. Fixes gcj/249.
12322
123232000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12324
12325 * parse.y (patch_method_invocation): Fixed comment.
12326 (maybe_use_access_method): Build this$<n>s to the context of the
12327 target method, or a type that extends it. Fixes gcj/242.
12328
649c9142
MM
123292000-07-13 Mark Mitchell <mark@codesourcery.com>
12330
12331 * parse.c: Remove.
12332
ee97d354
APB
123332000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12334
12335 * parse.y (fold_constant_for_init): Avoid bullish conversion.
12336
44fadf1e
TT
123372000-07-13 Tom Tromey <tromey@cygnus.com>
12338
12339 * lang-specs.h: Added %{I*}.
12340
ea414c97
ZW
123412000-07-13 Zack Weinberg <zack@wolery.cumb.org>
12342
12343 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
12344
792abd35
MM
123452000-07-12 Mark Mitchell <mark@codesourcery.com>
12346
12347 * parse-scan.c: Remove.
12348
11b26d72
APB
123492000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12350
12351 * class.c (set_super_info): Handled protected inner classes.
12352 (common_enclosing_context_p): Bail early if arguments aren't both
12353 inner classes.
12354 (get_access_flags_from_decl): Handle private and protected inner
12355 classes.
12356 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12357 (CLASS_PROTECTED): Likewise.
dba41d30 12358 (struct lang_type): New bitfield `poic'.
11b26d72
APB
12359 * parse.y (jdep_resolve_class): Call check_inner_class_access on
12360 inner classes only.
12361 (check_inner_class_access): Renamed arguments, added
12362 comments. Handles protected inner classes (fixes gcj/225)
12363 (not_accessible_p): Fixed comments. Avoid handling inner classes.
12364
123652000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12366
12367 * parse.y (resolve_qualified_expression_name): Verify qualified
dba41d30 12368 access to `this'. Fixes gcj/239.
11b26d72 12369
e67eb1a0 123702000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
2f2bd00a 12371
e67eb1a0
APB
12372 * jcf-write.c (generate_classfile): Don't install ConstantValue
12373 for null pointers.
2f2bd00a 12374
11b26d72
APB
123752000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12376
12377 * parse.y (resolve_qualified_expression_name): Handle inner class
12378 access. Fixes gcj/256.
12379
629d4b4d
APB
123802000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12381
12382 * jcf-write.c (generate_classfile): Properly install the
12383 ConstantValue attribute and the initial value constant pool index
12384 on string constants.
12385 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12386 class files.
12387
0c2b8145
APB
123882000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12389
12390 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12391 construct.
12392 * parse.y (find_as_inner_class): Fixed typo.
12393 (do_resolve_class): Explore enclosing contexts when searching for
12394 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12395 (check_inner_class_access): Check `decl' which can be null in case
12396 of previous errors.
12397
123982000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12399
dba41d30 12400 * java-tree.h (java_debug_context): Declared `extern'.
0c2b8145
APB
12401 (safe_layout_class): Likewise.
12402 * parse.y (resolve_field_access): Field must be `static' in order
12403 to be replaced by its initial value. Added comments.
12404 (find_applicable_accessible_methods_list): Fixed typo.
12405 (find_most_specific_methods_list): Methods found in innerclasses
12406 take over methods founds in the enclosing contexts.
12407 (java_complete_tree): Loosen restrictions on the type of DECLs
12408 that can be replaced by their initialization values.
dba41d30 12409 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
0c2b8145 12410
0267da64
TT
124112000-07-05 Tom Tromey <tromey@cygnus.com>
12412
12413 * Make-lang.in (PARSE_DIR): New macro.
12414 (PARSE_RELDIR): Likewise.
12415 (PARSE_C): Likewise.
12416 (PARSE_SCAN_C): Likewise.
12417 ($(PARSE_C)): New target.
12418 ($(PARSE_SCAN_C)): Likewise.
12419 (SET_BISON): New macro.
12420 (BISONFLAGS): Likewise.
12421 (JAVABISONFLAGS): Likewise.
12422
1bbee75b
BM
124232000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
12424
f6bbde28
ZW
12425 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12426 argument on the first pass for CNI as well as JNI.
12427 (print_method_info): Set up method name on the first pass only.
12428
98a52c2c
APB
124292000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12430
12431 * parse.y (parser_qualified_classname): Removed parameter
12432 `is_static'.
12433 (create_interface): Removed first passed parameter to
12434 parser_qualified_classname.
12435 (create_class): Likewise. Don't install alias on static
12436 innerclasses. Fixes gcj/275.
12437
124382000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12439
12440 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12441 debugable statement with empty_stmt_node. Fixes gcj/272
12442
124432000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12444
12445 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12446 gcj/271.
12447
c1c8f8cc
APB
124482000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12449
12450 * jcf-write.c (push_long_const): Appropriately cast short negative
12451 constant to jword.
12452
cf1b2274
APB
124532000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
12454
12455 * parse.y (verify_constructor_super): Use loop variable
12456 `m_arg_type' initialized with `mdecl_arg_type'.
12457
6eaeeb55
TT
124582000-06-29 Tom Tromey <tromey@cygnus.com>
12459
12460 * parse.y (resolve_field_access): Handle case where `type_found'
12461 is NULL.
12462
18ee3d5e
APB
124632000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12464
12465 * expr.c (lookup_field): The same field can be found through two
12466 different interface. Don't declare it ambiguous in that case.
12467
61d5c158
TT
124682000-06-27 Tom Tromey <tromey@cygnus.com>
12469
12470 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
12471 follows \r, then unget it at a lower level.
12472
70541f45
TT
124732000-06-26 Tom Tromey <tromey@cygnus.com>
12474
12475 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12476 java_complete_tree.
12477
774d2baf
TT
124782000-06-25 Tom Tromey <tromey@cygnus.com>
12479
12480 * parse.y (for_statement): Wrap expression in a WFL if it is a
12481 constant. For PR gcj/268.
12482
d6baf6f5
APB
124832000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12484
12485 * parse.y (do_resolve_class): Minor optimiztion in the package
17126208 12486 list search. Removed unnecessary test and return statement.
d6baf6f5
APB
12487 (valid_ref_assignconv_cast_p): Order of arguments to
12488 enclosing_context_p fixed.
12489
120f0c10
TT
124902000-06-24 Tom Tromey <tromey@cygnus.com>
12491
ae4a4c88
TT
12492 * expr.c (lookup_field): Print error and return error_mark_node if
12493 field reference is ambiguous.
12494
120f0c10
TT
12495 * parse.y (check_abstract_method_definitions): Also check if
12496 `other_method' is abstract.
12497
cf1748bf
APB
124982000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12499
12500 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12501 classes.
12502 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
dba41d30 12503 (struct lang_type): New field `pic'.
cf1748bf
APB
12504 (CLASS_PRIVATE): New macro.
12505 * parse.y (check_inner_class_access): New function.
12506 (jdep_resolve_class): Call it.
12507
f1ff439a
TT
125082000-06-23 Tom Tromey <tromey@cygnus.com>
12509
12510 * parse.y (patch_incomplete_class_ref): Initialize the returned
12511 class. For PR gcj/260.
12512
9a7ab4b3
APB
125132000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
12514
12515 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12516
125172000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12518
12519 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12520 Java specific checks.
12521 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12522 screened by DECL_P.
12523 * java-tree.def (CASE_EXPR): Marked 'e'.
12524 (DEFAULT_EXPR): Likewise.
12525 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12526 screened by DECL_P.
12527 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12528 Java specific checks.
12529 (generate_bytecode_insns): Test try_block for BLOCK before using
12530 BLOCK_EXPR_BODY.
12531 * parse.y (build_wfl_wrap): Added `location' argument. Set
12532 EXPR_WFL_LINECOL accordingly.
12533 (dim_expr:): Wrap constants with WFLs.
12534 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12535 (resolve_package): Check for `stmt' not being a BLOCK before
12536 building a debuggable statement with it.
12537 (make_qualified_primary): Added extra parameter to build_wfl_wrap
12538 invocation.
12539 (resolve_field_access): Make sure `decl' is a DECL before treating
12540 it as such.
12541 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12542 IDENTIFIER_NODE before treating it as such.
12543 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12544 treating it as such.
12545 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12546 to be applied only on non array types.
12547
125482000-06-16 Per Bothner <per@bothner.com>
12549
12550 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
12551 define in terms of DECL_RESULT, as that fails when --enable-checking.
f6bbde28 12552
ffb1f63d
KG
125532000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12554
12555 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
12556 types the same in comparison.
12557 (CHECK_OP): Add static prototype.
12558
11cf4d18
JJ
125592000-06-13 Jakub Jelinek <jakub@redhat.com>
12560
12561 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12562 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12563 * parse.c: Rebuilt.
12564
5ac9118e
KG
125652000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12566
12567 * decl.c (create_primitive_vtable): Prototype.
12568
12569 * jcf-write.c (generate_bytecode_insns): Initialize variable
12570 `saved_context'.
12571
12572 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12573
ad69b5b6
BM
125742000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
12575
12576 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12577 to track searched classes, and do not search the same class more than
12578 once. Call find_applicable_accessible_methods_list on immediate
12579 superclass, instead of search_applicable_method_list on all ancestors.
12580 Fix for PR gcj/238.
12581
cf1748bf
APB
125822000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
12583
12584 * parse.y (register_fields): Permit static fields in inner classes
12585 if they are final. Fix for PR gcj/255.
12586
9a7ab4b3
APB
125872000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
12588
12589 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12590 * parse.y (find_in_imports): Returned type changed to void,
12591 leading comment fixed.
12592 (register_package): New function.
12593 (qualify_and_find): Likewise.
12594 (package_declaration:): Use `register_package'.
12595 (single_type_import_declaration:): Removed local variable
12596 `node'. Added missing `;' for consistency.
12597 (type_import_on_demand_declaration:): Use `chainon' to link new
12598 entries.
12599 (lookup_field_wrapper): Lookup local variables defined in outer
12600 contexts first.
12601 (java_complete_class): Don't reverse the list of imported on demand.
12602 (do_resolve_class): Reorganized. Removed local variable
12603 `original_name'. Call `qualify_and_find' with the current package
12604 name, invoke `find_in_imports_on_demand' right after. Call
12605 `qualify_and_find' with the packages we've seen so far. Fixed
12606 operations numbering in comments.
12607 (java_expand_class): Don't reverse `package_list'.
12608 (find_most_specific_methods_list): New local variables `abstract'
12609 and `candidates'. Use them to pick the right method.
12610
62c9aa5f 126112000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
14d075d8
TT
12612
12613 * parse.y (check_modifiers_consistency): Don't subtract out
12614 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12615
603832a0
PT
126162000-06-04 Philipp Thomas <pthomas@suse.de>
12617
12618 * Makefile.in (INTLLIBS): New.
12619 (LIBS): Add above.
12620 (DEPLIBS): Ditto.
12621
62c9aa5f 126222000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
8f975c18
APB
12623
12624 * class.c (get_dispatch_table): Build the vtable dummy entry list
e64c46ce 12625 element with a null purpose. Fixed leading comment.
8f975c18 12626 (build_dtable_decl): Build an accurate dtable type when appropriate
e64c46ce 12627 and use it.
8f975c18 12628
2e761e49
RH
126292000-06-02 Richard Henderson <rth@cygnus.com>
12630
12631 * lang.c (lang_get_alias_set): New.
12632
0f145be8
APB
126332000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
12634
12635 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12636 before using it as the accessed field.
12637
2771fe54
TT
126382000-05-31 Tom Tromey <tromey@cygnus.com>
12639
12640 * java-tree.h (boolean_array_vtable, byte_array_vtable,
12641 char_array_vtable, short_array_vtable, int_array_vtable,
12642 long_array_vtable, float_array_vtable, double_array_vtable):
12643 Declare.
12644 * expr.c (get_primitive_array_vtable): New function.
12645 (create_primitive_vtable): New function.
12646 (java_lang_expand_expr): Enable code to statically generate
12647 arrays.
12648 * decl.c (init_decl_processing): Create primitive vtables.
12649 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12650 short_array_vtable, int_array_vtable, long_array_vtable,
12651 float_array_vtable, double_array_vtable): Define.
12652
30a3caef
ZW
126532000-05-26 Zack Weinberg <zack@wolery.cumb.org>
12654
12655 * java/parse.y (find_applicable_accessible_methods_list):
12656 Don't add an uninitialized value to the list.
12657
b8c5b1c6
TT
126582000-05-25 Tom Tromey <tromey@cygnus.com>
12659
40aaba2b
TT
12660 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12661 when trying to see if field's class should be initialized. Always
12662 initialize field's declaring class, not qualified class.
12663 For PR gcj/162.
12664
b8c5b1c6
TT
12665 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12666 `wfl_operator', to maybe_build_primttype_type_ref.
12667 Fixes PR gcj/235.
12668
6518c7b5
BM
126692000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
12670
5f86874e
AP
12671 * parse.y (patch_method_invocation): Don't try to lookup methods
12672 in primitive types.
6518c7b5 12673
611a4b87
APB
126742000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12675
12676 * parse.y (resolve_field_access): Call the appropriate <clinit>
12677 before accessing the length of a static array. Craft a decl for
12678 the field while its time. Fixes PR gcj/129.
f6bbde28 12679
6b48deee
APB
126802000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12681
12682 * parse.y (resolve_package): Correctly set `*next' (was off by
12683 one.)
12684 (resolve_qualified_expression_name): Fixed comment.
12685
62c9aa5f 126862000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
0ba154aa 12687
f6bbde28 12688 * jcf-parse.c (jcf_parse_source): Reset current_class and
e64c46ce 12689 current_function_decl to NULL before parsing a new file.
0ba154aa 12690
62c9aa5f 126912000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
c280e37a
APB
12692
12693 * parse.y (block_end:): If the collected block doesn't feature a
e64c46ce 12694 statement, insert an empty statement.
c280e37a 12695
92d83515
APB
126962000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12697
f6bbde28
ZW
12698 * parse.y (maybe_yank_clinit): New function.
12699 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12700 end of the list of methods belonging to a class.
12701 (java_complete_expand_method): Check whether <clinit> is really
12702 necessary and expand it accordingly.
92d83515 12703
ec5bb3cf
APB
127042000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12705
12706 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12707 processed by the method's switch statement.
12708
67db0ce7
TT
127092000-05-19 Tom Tromey <tromey@cygnus.com>
12710
12711 * java-tree.h: Added init state enum.
12712 * decl.c (emit_init_test_initialization): Initialize class
12713 initialization check variable by looking at class' state.
12714
43490bec
TT
127152000-05-19 Tom Tromey <tromey@cygnus.com>
12716
12717 * java-tree.h (build_instanceof): Declare.
12718 (build_get_class): Declare.
12719 * parse.y (patch_binop): Use build_instanceof.
12720 * expr.c (build_instanceof): New function. If class is final,
12721 don't make a function call.
12722 (expand_java_INSTANCEOF): Use it.
12723 (build_get_class): New function.
12724
062edaed
AO
127252000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
12726
12727 * jcf-write.c (generate_classfile): Scan the source_file for
12728 slashes with the right pointer variable.
12729
62c9aa5f 127302000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
078721e1
AC
12731
12732 * lang.c (lang_decode_option): Update -Wunused flags by calling
e64c46ce 12733 set_Wunused.
078721e1
AC
12734 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12735
46543024 127362000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
12737
12738 * check_init.c (check_init): Constify local char *.
12739 * class.c (push_class): Constify local char *.
12740 * java_tree.h: Update prototypes.
12741 * jcf-io.c (open_class): Constify filename parameter and
12742 return value.
12743 (find_class): Remove redundant string copy. Cast return from
12744 open_class.
12745 * jcf-parse.c (read_class, parse_class_file, yyparse):
12746 Constify local char *.
12747 * jcf-write.c (generate_bytecode_insns, generate_classfile):
12748 Constify local char *.
12749 * jcf.h (JCF): Constify filename and classname.
12750 (JCF_FINISH): Cast args to FREE to char * when appropriate.
12751 * lang.c (init_parse): Constify parameter and return value.
12752 * lex.c (java_get_line_col): Constify filename parameter.
12753 * parse.h: Constify parser_ctxt.filename. Update prototypes.
12754 * parse.y (java_parser_context_suspend,
12755 issue_warning_error_from_context, safe_layout_class): Constify
12756 local char *.
12757 * parse.c: Regenerate.
12758
4c6a8973
TT
127592000-05-08 Tom Tromey <tromey@cygnus.com>
12760
12761 * expr.c (build_jni_stub): Cache the result of
12762 _Jv_LookupJNIMethod.
12763
e117276e
APB
127642000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12765
12766 * decl.c (predef_filenames_size): Now 7.
12767 (predef_filenames): New seventh entry.
12768
652f2504
TT
127692000-05-04 Tom Tromey <tromey@cygnus.com>
12770
12771 * boehm.c (mark_reference_fields): Don't mark RawData fields.
12772 Keep track of when we've seen a reference field after a
12773 non-reference field.
12774 (get_boehm_type_descriptor): Handle case where we see
12775 non-reference fields but no trailing reference field.
12776 * decl.c (rawdata_ptr_type_node): Define.
12777 (init_decl_processing): Initialize rawdata_ptr_type_node.
12778 * java-tree.h (rawdata_ptr_type_node): Declare.
12779
ccedaff3
KG
127802000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12781
12782 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12783 specifiers in calls to fprintf.
12784
dd5d6281
TT
127852000-05-03 Andrew Haley <aph@cygnus.com>
12786
12787 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12788
12789 * javaop.h (WORD_TO_INT): New function.
12790 (IMMEDIATE_s4): Use WORD_TO_INT.
12791 * jcf.h (JPOOL_INT): Ditto.
12792
12793 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12794 separator.
12795
dd5d6281 127962000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
12797
12798 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12799 on native function.
12800 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12801 JNI methods.
12802 * expr.c (build_jni_stub): New function.
12803 * lang-specs.h: -fjni and -femit-class-file are incompatible.
12804 * parse.c: Rebuilt.
12805 * parse.y (java_complete_expand_methods): Expand a native method
12806 and call build_jni_stub if -fjni given.
12807 * lang-options.h: Document -fjni.
12808 * lang.c (flag_jni): New global.
12809 (lang_f_options): Added `jni' entry.
12810 * java-tree.h (soft_lookupjnimethod_node,
12811 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12812 Declare.
12813 (flag_jni): Declare.
12814 (build_jni_stub): Declare.
12815 (struct lang_decl): Added `native' flag.
12816 (METHOD_NATIVE): Redefined to use `native' field of lang specific
12817 structure.
12818 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12819 soft_jnipopsystemframe_node): New globals.
12820 (init_decl_processing): Set them. _Jv_InitClass only takes one
12821 argument.
12822
12823 * java-tree.def: Put into `C' mode.
12824
e815887f
TT
128252000-04-27 Tom Tromey <tromey@cygnus.com>
12826
12827 Fix for PR gcj/2:
12828 * expr.c (expand_invoke): Generate check to see if object pointer
12829 is null in nonvirtual invocation case.
12830 * java-tree.h (soft_nullpointer_node): Declare.
12831 * decl.c (soft_nullpointer_node): New global.
12832 (init_decl_processing): Initialize soft_nullpointer_node.
12833 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12834 or `private' methods.
12835 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12836
62c9aa5f 128372000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
ad81223c
APB
12838
12839 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 12840 from <clinit>
ad81223c 12841
f1acc01e
TT
128422000-04-26 Tom Tromey <tromey@cygnus.com>
12843
12844 * zextract.c (find_zip_file_start): New function.
12845 (read_zip_archive): Use it.
12846
e803d3b2
APB
128472000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12848
12849 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12850
152de068
APB
128512000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12852
12853 * class.c (common_enclosing_context_p): New function.
12854 * java-tree.h (common_enclosing_context_p): Added prototype.
12855 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12856 classes sharing an outer context with the current instance.
12857 * parse.y (build_access_to_thisn): Fixed leading comment.
12858 (verify_constructor_super): New local `supper_inner'. Skip
12859 enclosing context argument in the case of inner class constructors.
12860 (patch_method_invocation): Insert proper context as second
12861 parameter to pure inner class constructor super invocations.
12862
62c9aa5f 128632000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
93220702
APB
12864
12865 * parse.y (end_class_declaration): Reset the interface number
e64c46ce 12866 counter.
93220702 12867
dfb99c83
APB
128682000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12869
17126208 12870 * parse.y (source_start_java_method): Deleted unnecessary code.
f6bbde28 12871 (patch_method_invocation): Fixed comment.
dfb99c83 12872
e60a8c26
RL
128732000-04-24 Robert Lipe <robertlipe@usa.net>
12874
12875 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12876
3c8c10b8
TT
128772000-04-23 Tom Tromey <tromey@cygnus.com>
12878
12879 * boehm.c (mark_reference_fields): Use int_byte_position.
12880
8a008c41
TT
128812000-04-22 Tom Tromey <tromey@cygnus.com>
12882
12883 * boehm.c (mark_reference_fields): Only call byte_position on
12884 non-static fields.
12885
d5f76aba
TT
128862000-04-22 Tom Tromey <tromey@cygnus.com>
12887
12888 * boehm.c (mark_reference_fields): Added `last_view_index'
12889 argument. Use DECL_FIELD_OFFSET to determine field's offset.
12890
62c9aa5f 128912000-04-20 Mo DeJong <mdejong@cygnus.com>
a40d21da
APB
12892
12893 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12894 * parse.y (check_class_interface_creation): Fixed comments. Select
e64c46ce
AJ
12895 permitted modifiers for (inner) interfaces. Changed error message
12896 to report rejected modifiers used with local classes.
a40d21da
APB
12897
128982000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12899
12900 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12901 of directly inherited type considered in scope.
12902 * parse.y (do_resolve_class): Search inherited classes for inner
12903 classes.
12904
473e7b07
TT
129052000-04-20 Tom Tromey <tromey@cygnus.com>
12906
12907 * parse.y (not_accessible_p): Use member's class, not current
12908 class, when doing inheritance check for protected reference.
12909 Fixes PR gcj/124.
12910
62c9aa5f 129112000-04-20 Jason Schroeder <shrode@subnature.com>
c52fbf0f
JS
12912
12913 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12914
f2760b27
APB
129152000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12916
12917 * parse.y (lookup_field_wrapper): Search for final local aliases.
12918 (resolve_expression_name): Let lookup_field_wrapper search for
12919 final local aliases. Force the value of `name' if one is found.
12920 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12921 an expression name. Fixed comments.
12922
807bc1db
APB
129232000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12924
12925 * parse.y (yyerror): `msg' can be null, don't use it in that case.
12926
ecb36604
TT
129272000-04-19 Tom Tromey <tromey@cygnus.com>
12928
12929 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12930
48a840d9
APB
129312000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12932
12933 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12934
83c1f628
TT
129352000-04-18 Tom Tromey <tromey@cygnus.com>
12936
12937 PR gcj/211:
12938 * gjavah.c (utf8_cmp): Changed return value.
12939 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
12940 result.
12941 (cxx_keywords): New global.
12942 (get_field_name): Handle new result of cxx_keyword_subst.
12943 (print_method_info): Likewise.
12944
a7384840
BM
129452000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
12946
f6bbde28 12947 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
a7384840 12948 with a newline, for CNI.
f6bbde28 12949 (print_stub_or_jni): Print a space or newline before method name for
a7384840
BM
12950 CNI as well as JNI.
12951 (print_cxx_classname): Don't write leading "::" in CNI stub method.
f6bbde28 12952 (process_file): Include gcj/cni.h if generating CNI stubs.
a7384840 12953
3e0768f0
TT
129542000-04-16 Tom Tromey <tromey@cygnus.com>
12955
12956 * gjavah.c (decompile_method): Use print_field_name.
12957 Fixes PR gcj/205.
12958
48a840d9
APB
129592000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12960
12961 * parse.y (java_expand_classes): Reverse the package list once.
12962 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12963 reduction.
12964 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12965 the `==' and `!=' operators.
12966
cedea510
APB
129672000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12968
67264b4f 12969 * jcf-write.c (generate_bytecode_insns): At invocation time,
cedea510 12970 always relate an interface method to the type of its selector.
f6bbde28 12971
e803d3b2
APB
129722000-04-05 Tom Tromey <tromey@cygnus.com>
12973
12974 Fix for PR gcj/2:
12975 * expr.c (expand_invoke): Generate check to see if object pointer
12976 is null in nonvirtual invocation case.
12977 * java-tree.h (soft_nullpointer_node): Declare.
12978 * decl.c (soft_nullpointer_node): New global.
12979 (init_decl_processing): Initialize soft_nullpointer_node.
12980 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12981 or `private' methods.
12982 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12983
bc2874c9
TT
129842000-04-05 Tom Tromey <tromey@cygnus.com>
12985
12986 Fix for PR gcj/140:
12987 * parse.y (check_final_assignment): Recognize assignments to the
12988 `length' field of an array when generating class files.
12989
256172c4
APB
129902000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12991
12992 * class.c (decl_hash): Prototype removed.
12993 (decl_compare): Likewise.
12994
e0fc4118
TT
129952000-04-05 Tom Tromey <tromey@cygnus.com>
12996
12997 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12998 * parse.y (check_modifiers_consistency): Check for final/volatile
12999 clash. Fixes PR gcj/164.
13000
e0422ed0
APB
130012000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
13002
13003 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13004 made global.
13005 (java_hash_compare_tree_node): Renamed from `decl_compare, made
13006 global.
13007 (add_method_1): Use `java_hash_hash_tree_node' and
13008 `java_hash_compare_tree_node'.
13009 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13010 (java_hash_compare_tree_node): Likewise.
13011 * parse.y (find_applicable_accessible_methods_list): Create,
13012 delete and use a hash table to remember already searched interfaces.
13013
4200941b
MW
130142000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
13015
13016 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13017 with latest entry.
13018
c0b864fc
KG
130192000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13020
13021 * boehm.c (mark_reference_fields, set_bit): Prototype.
13022 (set_bit): Un-ANSI-fy definition.
13023
13024 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13025 Prototype.
13026
13027 * decl.c (emit_init_test_initialization): Likewise.
13028
13029 * gjavah.c (jni_print_char): Likewise.
13030
13031 * parse.y (create_new_parser_context): Likewise.
13032
62c9aa5f 130332000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
13034
13035 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13036 patch missing hunk. Fixed indentation.
13037
05411ecf
TT
130382000-03-30 Tom Tromey <tromey@cygnus.com>
13039
13040 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13041 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13042
acbedd7c
APB
130432000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13044
13045 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13046 when negative *before* using it as an array index.
13047 * ChangeLog: Fixed typo.
13048
0981a859
APB
130492000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13050
13051 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13052 to 0 when it reaches -1.
13053
130542000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
13055
13056 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 13057 invocation of `add_double'.
0981a859
APB
13058 * jcf-write.c (push_long_const): Properly cast `lo' before
13059 comparing it to short bounds.
13060 * parse-scan.y (interface_declaration:): Rule re-arrange so that
13061 `interface_body:' is reduced after the current interface is
13062 pushed.
13063
a843e0ce
TT
130642000-03-26 Tom Tromey <tromey@cygnus.com>
13065
13066 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13067 Java-specific `-f' option.
13068
62c9aa5f 130692000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
ad41cc2a
RK
13070
13071 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13072 Adjust order of making types.
13073 Make bitsize_*_node values.
13074
62c9aa5f 130752000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
770ae6cc
RK
13076
13077 * class.c (make_field_value): Use byte_position.
13078 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13079 (java_array_data_offset): Likewise.
13080 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13081 bzero call.
13082
165f37bc
APB
130832000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13084
13085 * parse.y (check_abstract_method_definitions): New local
13086 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
13087 (java_check_abstract_method_definitions): Make sure we eventually
13088 consider `java.lang.Object'.
13089 (maybe_use_access_method): Don't use access method if not in the
13090 context of a pure inner class or if the method's context is right.
13091 (find_applicable_accessible_methods_list): New static flag
165f37bc 13092 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
13093 indentation. Fixed the `java.lang.Object' only search. Search
13094 class interface(s) first, then fully search enclosing contexts.
13095 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
13096 they're all abstract.
13097
62c9aa5f 130982000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
124906f9
APB
13099
13100 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
dba41d30 13101 properly initialize `finished_label'. Don't emit gotos for empty
124906f9
APB
13102 try statements.
13103
719bb4e3 131042000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
c14f7160
ML
13105
13106 * except.c (emit_handlers): Clear catch_clauses_last.
13107
165f37bc
APB
131082000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13109
13110 * parse.y (check_method_types_complete): New function.
13111 (create_class): Reset anonymous class counter only when seeing an
13112 non inner classe.
13113 (java_complete_class): JDEP_METHOD: Don't recompute signature
13114 if incomplete.
13115
131162000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13117
13118 * class.c (build_static_ref): Fixed indentation in comment.
13119 * java-tree.def (TRY_EXPR): Fixed typo in name.
13120 (CLASS_LITERAL): Likewise.
13121 * java-tree.h: (TYPE_DOT_CLASS): New macro.
13122 (struct lang_type): New field `dot_class'.
13123 * jcf-write.c (generate_bytecode_insns): Fixed error message.
13124 (generate_classfile): Method `class$' is synthetic.
13125 * parse.y (build_do_class_method): New function.
13126 (build_dot_class_method_invocation): Likewise.
13127 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13128 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13129 (qualify_ambiguous_name): Likewise.
13130 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13131 (build_try_statement): Fixed leading comment.
13132
62c9aa5f 131332000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
665f2503
RK
13134
13135 * class.c (make_field_value): Properly handle sizes.
13136 (get_dispatch_vector): Use tree_low_cst and host_integerp.
13137 (layout_class_method): Count using trees.
13138 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13139 * expr.c (java_array_data_offset): Use int_bit_position.
13140 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13141 (build_invokevirtual): Use tree_low_cst and do computations with trees.
f6bbde28 13142
64aa33dd
TT
131432000-03-16 Tom Tromey <tromey@cygnus.com>
13144
13145 * lang.c (flag_hash_synchronization): New global.
13146 (lang_f_options): Added `hash-synchronization'.
13147 * lang-options.h: Mention -fhash-synchronization.
13148 * java-tree.h (flag_hash_synchronization): Declare.
13149 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13150 hash table synchronization is disabled.
13151 * decl.c (init_decl_processing): Only push `sync_info' value when
13152 hash table synchronization is disabled.
13153 * class.c (make_class_data): Only push `sync_info' field when hash
13154 table synchronization is disabled. Removed dead code.
13155
ae23f3ed
TT
131562000-03-16 Tom Tromey <tromey@cygnus.com>
13157
13158 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13159
165f37bc
APB
131602000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13161
13162 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13163 classes.
13164 * parse.y (patch_method_invocation): Handle anonymous classes
13165 creation in static context.
13166
131672000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13168
13169 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13170 * parse.y (resolve_qualified_expression_name): Use it.
13171 (patch_method_invocation): Likewise.
13172
131732000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13174
13175 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13176 depending on the type of dependency which dictates what the
13177 current class is.
13178 (unresolved_type_p): Resolved types limited to the current class.
13179
2c6c322a
TT
131802000-03-15 Tom Tromey <tromey@cygnus.com>
13181
13182 * decl.c (init_decl_processing): Set type of `sync_info' to be
13183 pointer to Object.
13184
13185 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13186 Correctly compute bit number for current slot. Zero `high' and
13187 `low' in DS_LENGTH case. Don't skip inherited fields. Use
13188 mark_reference_fields.
13189 (mark_reference_fields): New function.
13190
62c9aa5f 131912000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
324ed8fd
APB
13192
13193 * parse.y (register_incomplete_type): Fixed initialization of
13194 JDEP_ENCLOSING.
13195
0981a859
APB
131962000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13197
13198 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13199 static globals.
13200 (push_class_context, pop_class_context): New function.
13201 (class_body:): Call pop_class_context.
13202 (interface_body:): Likewise.
13203 (INNER_QUALIFIER): New macro.
13204 (report_class_declaration): Changed output format and use
13205 INNER_QUALIFIER. Call push_class_context.
13206
d77a712d
AH
132072000-02-14 Andrew Haley <aph@cygnus.com>
13208
f6bbde28
ZW
13209 * check-init.c (check_init): Add new cases for unary and binary
13210 tree nodes.
d77a712d 13211
dde1da72
APB
132122000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
13213
13214 * parse.y (resolve_package): Set `next' once a type name has been
13215 progressively discovered.
13216 (resolve_qualified_expression_name): Propagate resolution only if
13217 there are remaining qualifiers. Take into account `q' might have
13218 been cleared after re-qualification.
13219 * parse.y (patch_method_invocation): New local `resolved'.
e64c46ce
AJ
13220 Section dealing with qualified expression rewritten to use
13221 resolve_field_access.
dde1da72 13222
62c9aa5f 132232000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13224
13225 * parse.h (PUSH_CPC): Fixed indentation.
13226 (DEBUG_CPC): New macro.
13227 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
e64c46ce 13228 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
c2952b01 13229 * parse.y (class_body_declaration:): Use
e64c46ce 13230 SET_CPC_INSTANCE_INITIALIZER_STMT.
c2952b01
APB
13231 (method_declaration:): Check for null current_function_decl.
13232 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13233 (java_parser_context_pop_initialized_field): Better handling of
e64c46ce 13234 empty lists.
c2952b01 13235 (maybe_make_nested_class_name): Mark nested class name as
e64c46ce 13236 qualified when necessary.
c2952b01 13237 (end_class_declaration): Don't call java_parse_context_resume when
a83f01f0 13238 one or more error occurred.
c2952b01
APB
13239 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13240 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
e64c46ce 13241 SET_CPC_INITIALIZER_STMT.
c2952b01
APB
13242 (method_header): Check for inner classes declaring static methods.
13243 (resolve_qualified_expression_name): Handle situation where `this'
e64c46ce 13244 is implied.
c2952b01 13245
62c9aa5f 132462000-03-13 Hans Boehm <boehm@acm.org>
46089b86
HB
13247
13248 * typeck.c (build_prim_array_type): Correctly set the high word too.
13249
c2952b01
APB
132502000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13251
13252 * parse.y (java_complete_expand_methods): Leave <clinit> out of
13253 ordinary methods.
13254 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13255 list of methods for interfaces.
13256
cd7c5840
APB
132572000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13258
13259 * parse.y (qualify_ambiguous_name): Properly handle expressions
13260 using `null'.
f6bbde28 13261
6632dcdd
APB
132622000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13263
13264 * parse.y (check_final_assignment): Extended to process
13265 COMPOUND_EXPR.
13266 (patch_assignment): Have check_final_assignment called only once.
13267
1729c265
APB
132682000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13269
13270 * java-tree.h (IS_INIT_CHECKED): New flag.
13271 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13272 * parse.y (patch_string): Call force_evaluation_order on the
13273 completed string concatenation tree.
13274 * expr.c (force_evaluation_order): Call force_evaluation_order on
f6bbde28 13275 function's arguments too.
1729c265 13276
62c9aa5f 132772000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
05bccae2
RK
13278
13279 * decl.c (emit_init_test_initialization): Mark KEY as unused.
13280 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13281 (build_anewarray): Likewise.
13282 * parse.y (patch_newarray): Likewise.
13283 * parse.c: Regenerated.
13284
173f556c
BM
132852000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13286
13287 * decl.c (init_decl_processing): Added new class fields `depth',
13288 `ancestors', and `idt' to class_type_node. Use
13289 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13290 * class.c (make_class_data): Push initial values for new fields.
13291 * java-tree.h: Updated prototype for `build_invokeinterface'.
13292 * expr.c (build_invokeinterface): Changed parameters to accept
13293 `method' tree. Calculate index of `method' in its declaring
13294 interface. Build call to _Jv_LookupInterfaceMethodIdx.
13295 (expand_invoke): Call `build_invokeinterface' with new parameters.
13296 * parse.y (patch_invoke): Call `build_invokeinterface' with new
13297 parameters.
13298
614eaae0
APB
132992000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
13300
13301 * typeck.c (lookup_do): Search superinterfaces first
13302 when looking up an interface method. From Godmar Back
13303 <gback@cs.utah.edu>
13304
c2952b01
APB
133052000-03-06 Tom Tromey <tromey@cygnus.com>
13306
13307 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13308
614eaae0
APB
133092000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
13310
13311 * java-tree.h (lookup_argument_method2): Declared.
13312 (safe_layout_class): Prototype moved from parse.h.
13313 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13314 * parse.y (java_check_regular_methods): Local `super_class' gone.
13315 Call lookup_argument_method2 instead of lookup_argument_method.
13316 Perform modifier match for methods found declared in implemented
13317 interfaces. Fixed indentation problem. Overriding/hiding error
13318 report to take place only for methods found in classes.
13319 * typeck.c (lookup_argument_method): Changed leading
13320 comment. Re-written by calling lookup_do.
13321 (lookup_argument_method2): New function.
13322 (lookup_java_method): Re-written by calling lookup_do.
13323 (lookup_do): New function.
13324
62c9aa5f 133252000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
01447dce 13326
c2952b01 13327 * check-init.c (check_init): Removed dead code. Handle (blank)
e64c46ce 13328 final variables.
c2952b01 13329 * parse.y (declare_local_variables): New local `final_p', set it
e64c46ce 13330 and use it to initialize LOCAL_FINAL.
c2952b01 13331 (check_final_assignment): Only check FIELD_DECLs.
01447dce 13332
5830574a
TT
133332000-02-17 Tom Tromey <tromey@cygnus.com>
13334
13335 * Makefile.in (JAVA_OBJS): Added boehm.o.
13336 (boehm.o): New target.
13337 * Make-lang.in (JAVA_SRCS): Added boehm.c.
13338 * java-tree.h (flag_use_boehm_gc): Declare.
13339 (get_boehm_type_descriptor): Declare.
13340 * lang.c (lang_f_options): Added `use-boehm-gc'.
13341 (flag_use_boehm_gc): New global.
13342 * lang-options.h: Added -fuse-boehm-gc.
13343 * boehm.c: New file.
13344 * class.c (get_dispatch_table): If class uses a Boehm type
13345 descriptor, put it in the vtable.
13346 (make_class_data): Removed dead code.
13347
4a7f1935
PB
133482000-03-03 Per Bothner <per@bothner.com>
13349
13350 * decl.c (init_decl_processing): Initialize sizetype properly.
13351
c2952b01
APB
133522000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13353
13354 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13355 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
f6bbde28 13356 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
c2952b01
APB
13357 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13358 (jcf_parse): New local `current'. Load innerclasses seen in outer
13359 context being processed.
13360 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13361 * jcf-write.c (append_innerclasses_attribute): New function.
13362 (append_innerclasses_attribute_entry): Likewise.
13363 (get_access_flags): Handle static classes. Set anonymous and local
13364 classes to be private.
13365 (generate_classfile): Attribute count adjusted. Call
13366 append_innerclasses_attribute.
13367 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13368 PURE_INNER_CLASS_TYPE_P.
13369 * parse.y (parser_qualified_classname): New parameter `is_static',
13370 produce non qualified name accordingly.
13371 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13372 (create_interface): Added argument to parser_qualified_classname.
13373 (create_class): Added argument to parser_qualified_classname. Setup
13374 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13375 (add_inner_class_fields): Fixed indentation.
13376 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13377 (method_declarator): Fixed typo in comment.
13378 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13379 (build_current_thisn): Likewise.
13380 (patch_method_invocation): Likewise.
13381
719bb4e3 133822000-03-01 Martin von Löwis <loewis@informatik.hu-berlin.de>
00262c8a
ML
13383
13384 * decl.c (current_function_decl): Move to toplev.c.
13385
62c9aa5f 133862000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9df2c88c
RK
13387
13388 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13389 (DECL_BIT_INDEX): Use underlying representation.
13390 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13391
62c9aa5f 133922000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
fed3cef0
RK
13393
13394 * expr.c (build_java_ret): Pass proper type to size_binop.
13395
3ff9925c
AG
133962000-02-25 Anthony Green <green@cygnus.com>
13397
13398 * expr.c (build_class_init): Mark the decl to be ignored by
13399 check_init.
13400 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13401 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13402 * class.c (init_test_hash_newfunc): New function.
13403 (decl_hash): New function.
13404 (decl_compare): New function.
13405 * decl.c (emit_init_test_initialization): New function.
13406 (complete_start_java_method): Traverse the init test hashtable,
13407 calling emit_init_test_initialization.
13408 (always_initialize_class_p): Define.
13409 * expr.c (build_class_init): Use initialization tests when
13410 emitting class initialization code.
13411 (always_initialize_class_p): Declare.
13412 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13413 1.
13414 * java-tree.h: Include hash.h.
13415 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13416 (struct lang_decl): Add init_test_table field.
13417 (init_test_hash_entry): Define.
13418
62c9aa5f 134192000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
3c9ef127
APB
13420
13421 * gjavah.c (main): Avoid using `argi' to report unimplemented
13422 options.
13423
62c9aa5f 134242000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
0e9137bb
APB
13425
13426 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
e64c46ce 13427 initialize locals to avoid warnings. Local `exception_type' moved
0e9137bb
APB
13428 into if statement.
13429
62c9aa5f 134302000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
98f3c1db
APB
13431
13432 * parse.y (resolve_expression_name): Use `orig' as a second
e64c46ce 13433 argument to resolve_field_access.
17126208 13434 (resolve_field_access): Removed unnecessary code when dealing with
e64c46ce 13435 static fields.
98f3c1db 13436
62c9aa5f 134372000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13438
13439 * class.c (push_super_field): Don't push the field twice.
13440 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13441 * parse.h (java_reorder_fields): Prototyped.
13442 * parse.y (java_reorder_fields): New function.
13443 (java_layout_class): Simplified not to worry about re-ordering.
13444
c45c5e09
TT
134452000-02-23 Tom Tromey <tromey@cygnus.com>
13446
13447 * gjavah.c (print_name): In JNI case, correctly quote string.
13448 (print_method_info): Don't handle overrides in JNI mode.
13449
99803cd4
APB
134502000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
13451
13452 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13453 value type set to `boolean_type_node'.
13454
62c9aa5f 134552000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
c801c87c
JB
13456
13457 * jcf-dump.c (main): Test for correct condition after
13458 output file creation.
13459
7b227604
AG
134602000-02-19 Anthony Green <green@cygnus.com>
13461
13462 * jcf-depend.c (add_entry): Fix test for first list entry.
13463
62c9aa5f 134642000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
64e92991
RK
13465
13466 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13467 * constants.c (build_constants_constructor): Likewise.
13468
ccd4c273
AG
134692000-02-19 Anthony Green <green@cygnus.com>
13470
13471 * jcf-depend.c (add_entry): Add entries to the end of the list.
13472
62c9aa5f 134731999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
a0f4cca6
PN
13474
13475 * decl.c (INT_TYPE_SIZE): Define if necessary.
13476 (expand_java_return): Handle the case of a native integer smaller
e64c46ce 13477 than a JVM integer.
a0f4cca6 13478
719bb4e3 134792000-02-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
8b97e23b
ML
13480
13481 * gjavah.c (help): Use GCCBUGURL.
13482 * jv-scan.c (help): Likewise.
13483 * jcf-dump.c (help): Likewise.
13484
62c9aa5f 134852000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2a1ed9c1
APB
13486
13487 * jcf-write.c (generate_bytecode_insns): Don't generate empty
e64c46ce 13488 `finally' clauses.
2a1ed9c1 13489
62c9aa5f 134902000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2a1ed9c1
APB
13491
13492 * jcf-parse.c (load_class): Call `fatal' if no file containing
13493 the target class are found.
13494
33ae9bdf
ZW
134952000-02-16 Zack Weinberg <zack@wolery.cumb.org>
13496
13497 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
f6bbde28 13498 lex.c, lex.h, and PARSE_H to...
33ae9bdf
ZW
13499 (parse.o, parse-scan.o): ...here, respectively.
13500
13501 * lex.c: Split out code that may trigger SIGFPE from yylex()
13502 to its own function.
13503 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13504
4746ee26
KG
135052000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13506
13507 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13508
2323b28b
APB
135092000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
13510
c2952b01 13511 * parse.y (outer_field_access_p): Stop in time when outer contexts
e64c46ce 13512 are exhausted.
c2952b01 13513 (resolve_qualified_expression_name): Properly qualify *everything*
e64c46ce 13514 after a package.type to be resoled as expression names.
c2952b01 13515 (find_applicable_accessible_methods_list): Save/restore `class' to
e64c46ce 13516 isolate it from a possible outer context search.
2323b28b 13517
78de74be
TT
135182000-02-15 Tom Tromey <tromey@cygnus.com>
13519
13520 * gjavah.c (jni_print_char): New function.
13521 (print_full_cxx_name): Use it.
13522 (decode_signature_piece): Likewise.
13523 (print_cxx_classname): Likewise.
13524
9f8f4efe
KG
135252000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13526
13527 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13528 version.o.
13529 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13530
13531 * gjavah.c: Include version.h.
f6bbde28 13532
9f8f4efe
KG
13533 * jcf-dump.c: Likewise.
13534
13535 * jv-scan.c: Likewise.
13536
62c9aa5f 135372000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13538
13539 * parse.y (outer_field_access_fix): First parameter now a tree
67264b4f 13540 node. Check for assignment to final. First argument to
a83f01f0 13541 build_outer_field_access_fix modified to accommodate prototype.
c2952b01
APB
13542 (build_outer_field_access): Don't check for assignment to final
13543 here.
13544 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13545 possibly returned by outer_field_access_fix. Changed
13546 outer_field_access_fix's first argument.
13547 (check_final_assignment): $finit$'s context is OK.
13548 (patch_unaryop): Use node instead of its line/column value when
13549 calling outer_field_access_fix.
13550
62c9aa5f 135512000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13552
13553 * parse.y (interface_declaration:): No longer tagged
e64c46ce 13554 <node>. Re-installed default action.
c2952b01
APB
13555 (class_member_declaration:): Handle inner interfaces.
13556 (interface_member_declaration): Handle inner interfaces and
e64c46ce 13557 classes.
c2952b01 13558 (create_interface): Push error if one seen. Suspend parsing
e64c46ce 13559 context when processing an inner interface.
c2952b01 13560 (register_fields): Inner class static field limitations not to
e64c46ce 13561 apply to inner interfaces.
c2952b01 13562
62c9aa5f 135632000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13564
13565 * jcf-parse.c (load_class): Update `java_error_count' when a
e64c46ce 13566 class' file can't be found.
c2952b01
APB
13567 (parse.y): Avoid (byte)code generation when errors seen.
13568
62c9aa5f 135692000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13570
13571 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
e64c46ce 13572 decodes a valid node.
c2952b01
APB
13573 (patch_binop): Handle TRUNC_DIV_EXPR.
13574
62c9aa5f 135752000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01 13576
dba41d30 13577 * parse.y (resolve_package): New local `acc'. Try to progressively
e64c46ce 13578 build and guess a package and type name.
c2952b01 13579
62c9aa5f 135802000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13581
13582 * parse.y (find_applicable_accessible_methods_list): Load and
e64c46ce 13583 layout the search class if necessary.
c2952b01 13584 (java_complete_tree): Keep to original type of the folded initial
e64c46ce 13585 value.
c2952b01
APB
13586
135872000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13588
f6bbde28
ZW
13589 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13590 Generate error message if circularity is detected. New static
13591 local `list'.
13592 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
13593 * jcf-write.c (generate_bytecode_insns): Very simply handle
13594 SAVE_EXPR.
13595 * parse.y (java_check_circular_reference): Use
13596 `cyclic_inheritance_report' during report, if necessary.
13597 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13598 walking NEW_ARRAY_INIT twice.
c2952b01
APB
13599
136002000-02-09 Tom Tromey <tromey@cygnus.com>
13601
f6bbde28
ZW
13602 * parse.y (check_class_interface_creation): Allow inner classes to
13603 be `private' or `protected', check modifiers' consistency. Prevent
13604 block local classes from bearing any modifiers.
c2952b01 13605
ae0a06c5
KG
136062000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13607
13608 * except.c (check_start_handlers): Re-add prototype lost in last
13609 patch.
ef86eabb 13610 (maybe_start_try): Remove excess argument to `check_start_handlers'.
ae0a06c5 13611
71600a4a
AH
136122000-02-09 Andrew Haley <aph@cygnus.com>
13613
13614 * decl.c (clear_binding_level): Remove excess initializer.
13615 (maybe_poplevels): Remove unused variable.
13616 (force_poplevels): Ditto.
13617 (struct binding_level): Add comment.
f6bbde28 13618
c2952b01
APB
136192000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
13620
f6bbde28
ZW
13621 * jcf-write.c (generate_classfile): Don't consider
13622 pre-initialization with reference value (use <clinit> instead.)
13623 * parse.y (java_fix_constructors): No generated constructor for
13624 interfaces.
13625 (build_outer_field_access): Removed debug message.
13626 (outer_field_expanded_access_p): Adapted to bytecode generation.
13627 (build_outer_field_access_method): Use fix_method_argument_names.
13628 (build_outer_method_access_method): Fixed indentation. Added
13629 comment. Handle access method generation for static and also void
13630 methods.
13631 (build_access_to_thisn): Inserted debug message.
13632 (maybe_build_thisn_access_method): Use fix_method_argument_names.
13633 (resolve_qualified_expression_name): Fixed comment.
13634 (not_accessible_p): Adapted to bytecode generation. Added comment.
13635 (patch_method_invocation): Added comment.
13636 (maybe_use_access_method): Fixed leading comment. Handle static
13637 methods.
13638 (java_complete_lhs): Don't shortcut handling of initialized upon
13639 declaration String type static fields when generating bytecode.
13640 (patch_unaryop): Handle outer field access when generating
13641 bytecode.
c2952b01 13642
62c9aa5f 136432000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13644
13645 * java-tree.h (FIELD_THISN): New macro.
13646 * jcf-write.c (append_synthetic_attribute): New function.
13647 (generate_classfile): Set "Synthetic" attribute on this$<n>,
e64c46ce 13648 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
c2952b01 13649 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
e64c46ce 13650 this$<n> fields.
c2952b01 13651 (build_outer_field_access): Turned on access functions usage and
e64c46ce 13652 generation when compiling to bytecode.
c2952b01
APB
13653 (maybe_use_access_method): Likewise.
13654
e8b22dd1
AH
136552000-01-25 Andrew Haley <aph@cygnus.com>
13656
f6bbde28
ZW
13657 * java-except.h (struct eh_range): Add `expanded' field.
13658 (maybe_start_try): Add end_pc arg.
13659 (maybe_end_try): Ditto.
e8b22dd1 13660 * java-tree.h (force_poplevels): new function.
f6bbde28
ZW
13661 * expr.c (expand_byte_code): Don't call maybe_start_try or
13662 maybe_end_try.
13663 * except.c (add_handler): Reset expanded.
13664 (expand_start_java_handler): Set expanded.
13665 (check_start_handlers): Don't expand a start handler that's
13666 already been expanded.
13667 (maybe_start_try): Add end_pc arg. Only expand a handler which
13668 ends after end_pc.
e8b22dd1
AH
13669 (expand_end_java_handler): call force_poplevels.
13670 (force_poplevels): new function.
f6bbde28
ZW
13671 * decl.c (binding_level): Add start_pc of binding level.
13672 (maybe_pushlevels): Call maybe_start_try when pushing binding
13673 levels.
13674 (maybe_poplevels): Call maybe_end_try when popping binding levels.
13675 (LARGEST_PC): Define.
13676 (clear_binding_level): Use LARGEST_PC.
e8b22dd1
AH
13677
13678 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13679 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13680 (binding_depth, is_class_level, current_pc): new variables.
f6bbde28 13681 (struct binding_level): ditto.
e8b22dd1
AH
13682 (indent): new function.
13683 (push_jvm_slot): add debugging info.
13684 (maybe_pushlevels): ditto.
13685 (maybe_poplevels): ditto.
13686 (pushlevel): ditto.
13687 (poplevel): ditto.
13688 (start_java_method): ditto.
13689 (give_name_to_locals): comment only.
f6bbde28 13690 * except.c (binding_depth, is_class_level, current_pc):
e8b22dd1
AH
13691 new variables.
13692 (expand_start_java_handler): add debugging info.
13693 (expand_end_java_handler): ditto.
f6bbde28 13694
5ca1627b
KG
136952000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13696
13697 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13698 (print_name_for_stub_or_jni, process_file): Constify a char*.
13699
d8b6d4cf
TT
137002000-02-03 Tom Tromey <tromey@cygnus.com>
13701
13702 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13703
2c2f0e54
SB
137042000-01-31 Scott Bambrough <scottb@netwinder.org>
13705
13706 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13707 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13708 defined to be 1.
13709
62c9aa5f 137102000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13711
13712 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13713 * java-tree.h (TYPE_II_STMT_LIST): New macro.
13714 (struct lang_type): New field `ii_block'.
13715 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13716 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13717 * parse.h (struct parser_ctxt): New field `instance_initializers'.
13718 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13719 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13720 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13721 macros.
13722 * parse.y (add_instance_initializer): New function.
13723 (in_instance_initializer): New static global.
13724 (class_body_declaration:): Link instance initializer block.
13725 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13726 (array_creation_expression:): Remove unused local.
13727 (java_parser_context_push_initialized_field): Fixed leading
13728 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13729 CPC_INSTANCE_INITIALIZER_LIST.
13730 (java_parser_context_pop_initialized_field): Likewise.
13731 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13732 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13733 CPC_INITIALIZER_STMT.
13734 (fix_constructors): New local `class_type'. Use it. Call
13735 add_instance_initializer.
13736 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13737 (patch_return): Forbid return in instance initializers.
13738 (patch_throw_statement): Enforce exception handling in the context
13739 of instance initializers.
f6bbde28 13740
ef2aac99
TT
137412000-02-03 Tom Tromey <tromey@cygnus.com>
13742
13743 * Make-lang.in (java.mostlyclean): Remove executables in
13744 `mostlyclean'.
13745
9b4a08f9
SB
137462000-01-31 Scott Bambrough <scottb@netwinder.org>
13747
13748 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13749 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13750 (java_float_finite): Convert to use union Word from javaop.h.
13751 (java_double_finite): Convert to use union DWord from javaop.h.
13752
de380723
TT
137532000-02-02 Tom Tromey <tromey@cygnus.com>
13754
13755 * gjavah.c (options): Added `jni' entry.
13756 (help): Document -jni.
13757 (flag_jni): New global.
13758 (process_file): Handle JNI output. Don't print text from
13759 -prepend, -add, etc, when generating stubs. Only remove `.class'
13760 suffix if it actually exists.
13761 (main): Create a `.c' file when run with `--jni --stubs'. Create
13762 correct output file name with `--jni'.
13763 (print_include): Mangle header name differently in JNI case.
13764 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13765 method list.
13766 (print_method_info): Handle JNI case. Put signature info into
13767 method name. Handle case when STREAM is NULL.
13768 (print_name_for_stub_or_jni): New function.
13769 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
13770 (print_cxx_classname): Handle JNI.
13771 (print_full_cxx_name): Likewise.
13772 (decode_signature_piece): Likewise.
13773 (overloaded_jni_method_exists_p): New function.
13774 (struct method_name): Added `signature' and `sig_length' fields.
13775 (HANDLE_END_FIELD): Do nothing in JNI mode.
13776
c89c53eb
TT
137772000-02-02 Tom Tromey <tromey@cygnus.com>
13778
13779 * jv-scan.c: Include version.c, <getopt.h>.
13780 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13781 (options): New array.
13782 (usage): New function.
13783 (version): New function.
13784 (main): Use getopt_long to parse command line.
13785 * jcf-dump.c: Include version.c, <getopt.h>.
13786 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13787 OPT_JAVAP): New macros.
13788 (options): New array.
13789 (usage): Return `void'. Changed message.
13790 (help): New function.
13791 (version): New function.
13792 (main): Use getopt_long_only to parse command line.
13793 * gjavah.c: Include <getopt.h>.
13794 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13795 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13796 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13797 (options): New array.
13798 (java_no_argument): Removed.
13799 (help): Updated with missing options.
13800 (main): Use getopt_long_only to parse command line.
13801 (usage): Changed message.
13802
62c9aa5f 138032000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13804
13805 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13806 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13807 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13808 * parse.y (array_creation_expression:): Handle anonymous arrays.
13809 (build_array_from_name): Don't set `ret_name' if null.
13810 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13811 (qualify_ambiguous_name): Likewise.
13812 (java_complete_expand_class): Likewise.
13813
62c9aa5f 138142000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13815
13816 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13817 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13818 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13819 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13820 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13821 AIPL_FUNCTION_COMPLETED_INVOCATION.
f6bbde28 13822 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
c2952b01
APB
13823 AIPL_FUNCTION_INVOCATION_READY.
13824 (AIPL_FUNCTION_DECLARATION): New enum entry.
13825 * parse.y (reorder_static_initialized): New function.
13826 (java_parser_context_pop_initialized_field): Use it.
13827 (add_inner_class_fields): Use
13828 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13829 augmented. Install marker after last alias initializer, if any.
13830 (generate_finit): Fixed typo. Don't try to retain only the used
13831 fields.
13832 (method_header): Compute and set DECL_FUNCTION_NAP.
13833 (method_declarator): Fixed comment. Insert alias initializer in
13834 parameter list.
13835 (build_alias_initializer_parameter_list): Fixed leading
13836 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13837 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13838 (java_complete_expand_class): Code to retain only used aliases
13839 removed.
13840 (java_complete_expand_methods): New local `first_decl'. Generate
13841 $finit$ first, then expand the constructors, regular methods and
13842 <clinit>.
13843 (java_complete_expand_method): Don't report error on missing
13844 return statement if previously detected bogus.
13845 (fix_constructors): Don't patch constructor parameters list.
13846 (patch_method_invocation): Use new AIPL enum values. Reverse
13847 alias initializer list for anonymous classes.
f6bbde28 13848
105a8d1c
AG
138492000-01-30 Anthony Green <green@redhat.com>
13850
13851 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13852 determine how many stack slots to pop.
13853
f8989a66
APB
138542000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13855
13856 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13857 error handling/recovery.
13858 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13859
62c9aa5f 138602000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
13861
13862 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
e64c46ce 13863 FIELD_LOCAL_ALIAS_USED): New macros.
c2952b01
APB
13864 (DECL_FUNCTION_NAP): New macro.
13865 (struct lang_decl): New field `nap'.
13866 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13867 (struct lang_type): New fields `finit_stmt_list' and
e64c46ce 13868 `clinit_stmt_list'.
c2952b01
APB
13869 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13870 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13871 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
e64c46ce 13872 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
c2952b01 13873 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
e64c46ce 13874 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
c2952b01
APB
13875 (BUILD_THROW): Macro line separator re-indented.
13876 * parse.y (end_class_declaration): New function.
13877 (maybe_generate_pre_expand_clinit): New name for
e64c46ce
AJ
13878 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13879 pre-expand static fields.
c2952b01
APB
13880 (maybe_generate_clinit): Function deleted.
13881 (check_for_static_method_reference): Prototype's parameter list
e64c46ce 13882 indented.
c2952b01 13883 (generate_finit): New name for maybe_generate_finit. Changed
e64c46ce
AJ
13884 leading comment. Function rewritten to use
13885 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
c2952b01
APB
13886 (build_alias_initializer_parameter_list): New function.
13887 (java_parser_context_pop_initialized_field): Likewise.
13888 (add_inner_class_fields): Likewise.
13889 (type_declaration:): Call end_class_declaration.
13890 (class_member_declaration:): Likewise.
13891 (formal_parameter_list:): Fixed typos.
13892 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
e64c46ce 13893 element. Improved error handling.
c2952b01
APB
13894 (block_statement:): Call end_class_declaration.
13895 (anonymous_class_creation:): Likewise.
13896 (create_anonymous_class): Fixed comments.
13897 (create_class): Call add_inner_class_fields.
13898 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13899 (method_header): Use MARK_FINAL_PARMS.
13900 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13901 (method_declarator): Propagate final argument flag.
13902 (craft_constructor): New local `artificial'. Call
e64c46ce
AJ
13903 build_alias_initializer_parameter_list. Use
13904 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
c2952b01 13905 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
e64c46ce 13906 necessary.
c2952b01 13907 (complete_expand_class): Get rid of unused outer context local
e64c46ce 13908 alias fields.
c2952b01 13909 (java_complete_expand_methods): Fixed leading
e64c46ce
AJ
13910 comment. Generate/pre-expand <clinit> first. Changed method
13911 expansion order to regular, $finit$, constructors, <clinit>.
c2952b01
APB
13912 (java_complete_expand_method): Set current_function_decl.
13913 (fix_constructors): Fix constructor parameter list to account for
e64c46ce 13914 outer context local alias initializers.
c2952b01
APB
13915 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13916 (resolve_expression_name): Lookup outer context local aliases. New
e64c46ce 13917 local `access', use it.
c2952b01 13918 (patch_method_invocation): Patch inner class ctor invocation with
e64c46ce
AJ
13919 outer context local aliases initialization values. $finit$
13920 invocation patching now includes things generated with
13921 build_alias_initializer_parameter_list.
c2952b01
APB
13922 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13923 (build_super_invocation): Likewise.
13924 (patch_assignment): Changed comment.
13925
f85cedde
AH
139262000-01-27 Andrew Haley <aph@cygnus.com>
13927
f6bbde28
ZW
13928 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13929 (emit_if): Ditto.
13930 (emit_jsr): Ditto.
f85cedde 13931
2884c41e
KG
139322000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13933
13934 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13935 concatenation.
13936 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13937
13938 * parse.y (register_fields): Don't pass a format specifier to
13939 OBSOLETE_MODIFIER_WARNING.
13940 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13941 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13942 specifier.
13943 (check_modifiers): Change function into a macro.
13944 (check_class_interface_creation): Pass a literal format string.
13945
0a068841 139462000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
df32d2ce
KG
13947
13948 * buffer.h: PROTO -> PARAMS.
13949 * check-init.c: Likewise.
13950 * class.c: Likewise.
13951 * constants.c: Likewise.
13952 * convert.h: Likewise.
13953 * decl.c: Likewise.
13954 * except.c: Likewise.
13955 * expr.c: Likewise.
13956 * gjavah.c: Likewise.
13957 * java-except.h: Likewise.
13958 * java-tree.h: Likewise.
13959 * jcf-depend.c: Likewise.
13960 * jcf-dump.c: Likewise.
13961 * jcf-parse.c: Likewise.
13962 * jcf-path.c: Likewise.
13963 * jcf-reader.c: Likewise.
13964 * jcf-write.c: Likewise.
13965 * jcf.h: Likewise.
13966 * jv-scan.c: Likewise.
13967 * jvgenmain.c: Likewise.
13968 * jvspec.c: Likewise.
13969 * lang.c: Likewise.
13970 * lex.c: Likewise.
13971 * lex.h: Likewise.
13972 * parse-scan.y: Likewise.
13973 * parse.h: Likewise.
13974 * parse.y: Likewise.
13975 * typeck.c: Likewise.
13976 * verify.c: Likewise.
13977 * xref.c: Likewise.
13978 * xref.h: Likewise.
13979 * zextract.c: Likewise.
13980 * zipfile.h: Likewise.
f6bbde28 13981
c2952b01
APB
139822000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13983
13984 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13985 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13986 * constants.c (build_constant_data_ref): Check for cached
13987 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13988 in TYPE_CPOOL_DATE_REF.
13989 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13990 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13991 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13992 (LOCAL_FINAL): New macro.
13993 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13994 constant pool -- don't try to reuse.
13995 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13996 TYPE_LANG_SPECIFIC.
13997 (find_in_current_zip): Use TYPE_JCF.
13998 * parse.h (java_check_final): Prototype removed.
13999 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14000 (maybe_create_class_interface_decl,
14001 check_class_interface_creation): Likewise.
14002 (java_expand_finals): Function removed.
14003 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14004 (block_statement:): Fixed comment.
14005 (anonymous_class_creation:): Likewise.
14006 (check_class_interface_creation): Reversed Jan 12, 2000 extra
14007 argument patch.
14008 (check_class_interface_creation): Loosened error report on (inner)
14009 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14010 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14011 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14012 argument patch.
14013 (create_interface): Likewise.
14014 (anonymous_class_counter): New static global.
14015 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14016 patch. Fixed comments.
14017 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14018 anonymous_class_counter when declaring a toplevel class.
14019 (craft_constructor): Fixed constructor name when handling
14020 anonymous classes. Anonymous class constructors to feature hidden
14021 this$<n> parameter.
14022 (java_fix_constructors): Added comment.
14023 (java_check_final): Function removed.
14024 (java_complete_expand_methods): Fixed comment. Don't generate
14025 class data, save its outgoing constant pool instead.
14026 (verify_constructor_super): Skip anonymous class constructor
14027 hidden this$<n> parameter.
14028 (java_expand_classes): New local `saved_ctxp'. Removed call to
14029 java_expand_finals and java_check_final. Expand anonymous class
14030 constructors. Generate class data.
14031 (build_super_invocation): Skip anonymous class hidden this$<n>
14032 parameter.
14033 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14034 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14035 (set_java_signature): Likewise.
f6bbde28 14036
62c9aa5f 140372000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
a003f638
JB
14038
14039 * gjavah.c: Delete ACC_VISIBILITY define.
14040 * jcf.h: Add ACC_VISIBILITY define.
14041 * parse.y: final: rule tagged <value>.
14042 (java_check_regular_methods): Use ACC_VISIBILITY define for
14043 default package access check.
14044 (local_variable_declaration_statement): Use final: rule.
14045
62c9aa5f 140462000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
18990de5
JB
14047
14048 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14049 (final:): New rule.
14050
9b4579b3
TT
140512000-01-17 Tom Tromey <tromey@cygnus.com>
14052
14053 * gjavah.c (print_field_info): Allow non-static final fields.
14054
62c9aa5f 140552000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14056
14057 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14058 * parse.y (patch_anonymous_class): New function.
14059 (create_anonymous_class): Register incomplete type when the
e64c46ce 14060 class/interface to extends/implement isn't known yet.
c2952b01
APB
14061 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14062 (verify_constructor_super): Tuned error message.
14063
62c9aa5f 140642000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14065
14066 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14067 (ANONYMOUS_CLASS_P): New macro.
14068 (TYPE_SIGNATURE, TYPE_JCF): New macros.
14069 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14070 * parse.y (create_class): Added leading argument.
14071 (maybe_create_class_interface_decl,
e64c46ce 14072 check_class_interface_creation): Likewise.
c2952b01
APB
14073 (craft_constructor): New function.
14074 (verify_constructor_super): Added argument in prototype.
14075 (class_declaration:): Inserted leading argument.
14076 (for_begin:): Use FOR_LOOP_P.
14077 (anonymous_class_creation): Create WFL of the anonymous class to
e64c46ce 14078 instantiate. Call build_new_invocation. Added comments.
c2952b01 14079 (check_class_interface_creation): Handle parameter `anonymous' in
e64c46ce 14080 verbose mode class creation announce.
c2952b01
APB
14081 (link_nested_class_to_enclosing): Exclude anonymous classes.
14082 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
e64c46ce
AJ
14083 anonymous class, even though they appear to have an enclosing
14084 context.
c2952b01 14085 (create_interface): Pass extra argument to
e64c46ce 14086 check_class_interface_creation.
c2952b01
APB
14087 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14088 (create_class): Call check_class_interface_creation and
e64c46ce
AJ
14089 maybe_create_class_interface_decl with extra new argument. Don't
14090 add private this$<n> to anonymous classes.
c2952b01 14091 (method_declarator): Insert hidden this$<n> to anonymous class
e64c46ce 14092 constructors.
c2952b01 14093 (java_fix_constructors): Deleted code creating default
e64c46ce 14094 constructor. Call craft_constructor instead.
c2952b01 14095 (java_check_regular_methods): Set `saw_constructor' to 1 for
e64c46ce 14096 anonymous classes.
c2952b01
APB
14097 (fix_constructors): Pass extra argument to verify_constructor_super.
14098 (verify_constructor_super): New local `sdecl', use it. Search for
e64c46ce
AJ
14099 matching constructor (possibly featuring arguments) in super
14100 class.
c2952b01 14101 (lookup_method_invoke): Craft constructor according to arguments
e64c46ce 14102 list when dealing with anonymous class constructors.
c2952b01 14103 (build_super_invocation): Pass arguments to anonymous class super
e64c46ce 14104 constructors.
c2952b01
APB
14105 (search_loop): Use FOR_LOOP_P.
14106 (labeled_block_contains_loop_p): Likewise.
f6bbde28 14107
62c9aa5f 141082000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
c2952b01
APB
14109
14110 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14111 (enclosing_context_p): New function.
14112 (get_access_flags_from_decl): Handle CLASS_STATIC.
14113 (maybe_layout_super_class): Extra first argument passed to
e64c46ce 14114 do_resolve_class.
c2952b01 14115 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
e64c46ce 14116 ID_INIT_P.
c2952b01 14117 * decl.c (access0_identifier_node): New global.
f6bbde28 14118 (init_decl_processing): access0_identifier_node initialized.
c2952b01
APB
14119 (pushdecl): Set DECL_CONTEXT only on non type decls.
14120 * expr.c (lookup_field): Lookup inner class fields in enclosing
e64c46ce 14121 contexts.
c2952b01
APB
14122 (expand_invoke): Use ID_INIT_P.
14123 (expand_java_field_op): Use DECL_CLINIT_P.
14124 * java-tree.def (CLASS_LITERAL): New tree code.
14125 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
e64c46ce 14126 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
c2952b01
APB
14127 (struct lang_decl): New field `inner_access'.
14128 (enclosing_context_p): Prototyped.
14129 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
e64c46ce 14130 ID_CLINIT_P): New macros.
c2952b01
APB
14131 (CLASS_STATIC): New macro.
14132 (CLASS_ACCESS0_GENERATED_P): New macro.
14133 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
e64c46ce
AJ
14134 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14135 INNER_CLASS_P): New macros.
c2952b01
APB
14136 (DECL_INNER_CLASS_LIST): New macro.
14137 * jcf-parse.c (yyparse): Avoid the use of ANSI string
e64c46ce 14138 concatenation.
c2952b01 14139 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
e64c46ce 14140 the shift value to int. Fixed typo in comment.
c2952b01
APB
14141 * lex.c (inst_id, wpv_id): Initialize.
14142 * mangle.c (unicode_mangling_length): Take `$' into account.
14143 * parse.h (DRECOVER, RECOVER): Terminate properly.
14144 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14145 (typedef struct _jdep): New field `enclosing'.
14146 (JDEP_ENCLOSING): New macro.
14147 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14148 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14149 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
e64c46ce
AJ
14150 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14151 GET_ENCLOSING_CPC_CONTEXT): New macros.
f6bbde28 14152 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
c2952b01
APB
14153 (do_resolve_class): Added extra argument in prototype.
14154 * parse.y (resolve_class): Added extra argument in prototype.
14155 (maybe_create_class_interface_decl): Likewise.
14156 (maybe_use_access_method, build_wfl_wrap): New functions.
14157 (java_complete_expand_classes, java_complete_expand_class):
e64c46ce 14158 Likewise.
c2952b01 14159 (java_parser_context_push_initialized_field,
e64c46ce
AJ
14160 java_parser_context_suspend, java_parser_context_resume):
14161 Likewise.
c2952b01 14162 (maybe_make_nested_class_name, make_nested_class_name,
e64c46ce
AJ
14163 set_nested_class_simple_name_value,
14164 link_nested_class_to_enclosing, find_as_inner_class,
14165 find_as_inner_class_do, check_inner_class_redefinition,
14166 build_thisn_assign, build_current_thisn, build_access_to_thisn,
14167 maybe_build_thisn_access_method, build_outer_field_access,
14168 build_outer_field_access_methods, build_outer_field_access_expr,
14169 build_outer_method_access_method, build_new_access_id,
14170 build_outer_field_access_method, outer_field_access_p,
14171 outer_field_expanded_access_p, outer_field_access_fix,
14172 build_incomplete_class_ref, patch_incomplete_class_ref,
14173 create_anonymous_class): Likewise.
c2952b01
APB
14174 (inst_id, wpv_id): New static global variables.
14175 (synchronized:): New rule, tagged <node>.
14176 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
e64c46ce 14177 rules.
c2952b01
APB
14178 (anonymous_class_creation:): New rule, tagged <node>.
14179 (NEW_TK): Tagged <node>.
14180 (type_literals, array_type_literal): New rules, tagged <node>.
14181 (class_declaration:): Removed action when reducing by class_body:
14182 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
e64c46ce 14183 using GET_CPC in sub-rules.
c2952b01
APB
14184 (class_member_declaration): Handle inner classes.
14185 (method_declaration): When reducing method_header:, reset
e64c46ce 14186 current_function_decl when appropriate.
c2952b01 14187 (method_declarator:): Set the number of formal parameter to 0 for
e64c46ce 14188 method declared without arguments.
c2952b01
APB
14189 (constructor_declarator:): Likewise.
14190 (static_initializer:): List of elements kept in a list.
14191 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
e64c46ce 14192 use of the keyword `static' for type declarations.
c2952b01
APB
14193 (block_statement:): Handle inner class declarations.
14194 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
e64c46ce 14195 type qualified `this'.
c2952b01
APB
14196 (class_instance_creation_expression): Use anonymous_class_creation:
14197 to handle inner class instances creation. Handle qualified `new'.
14198 (something_dot_new): Added appropriate actions.
14199 (create_new_parser_context): New function.
14200 (java_push_parser_context, java_parser_context_save_global,
e64c46ce 14201 java_parser_context_suspend): Use create_new_parser_context.
c2952b01
APB
14202 (check_modifiers): Changed leading comment.
14203 (check_class_interface_creation): Handle interclasses.
14204 (add_superinterfaces): Fixed comment.
14205 (create_interface): Build qualified name from the raw_name instead
e64c46ce
AJ
14206 of its matching WFL. Push the initialized fields list. raw_name added
14207 as an extra argument to maybe_create_class_interface_decl.
c2952b01 14208 (create_class): Build qualified name from the raw_name instead of
e64c46ce 14209 its matching WFL. Removed assignment to current_parsed_class_un.
c2952b01 14210 Call PUSH_ERROR before returning an error. Suspend the current
e64c46ce
AJ
14211 parser context when processing an inner class. Push the
14212 initialized fields list. raw_name added as an extra argument to
14213 maybe_create_class_interface_decl. Add the private this$<n>
14214 field.
c2952b01
APB
14215 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14216 (register_fields): Get the class type from GET_CPC and handle
e64c46ce
AJ
14217 previous errors. Added code to handle the creation of static
14218 fields in inner classes. Initialized fields initialization
14219 statements kept in a list of lists.
c2952b01 14220 (maybe_generate_finit): Initialized fields initialization
e64c46ce 14221 statements kept in a list of lists. Use GET_CPC.
c2952b01
APB
14222 (maybe_generate_clinit): Likewise.
14223 (method_header): Use GET_CPC and GET_CPC_UN.
14224 (parser_qualified_classname): Handle inner classes.
14225 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14226 (java_fix_constructors): Hide pointer to enclosing context
e64c46ce 14227 instance in constructor list when dealing with inner classes.
c2952b01 14228 (jdep_resolve_class): Call resolve_class with extra first argument
e64c46ce 14229 JDEP_ENCLOSING.
c2952b01 14230 (resolve_class): Add enclosing context as a first extra argument
e64c46ce 14231 to do_resolve_class.
c2952b01 14232 (do_resolve_class): Call find_as_inner_class. Handle WFLs
e64c46ce 14233 properly.
c2952b01 14234 (resolve_no_layout): Extra argument added to resolve_class
e64c46ce 14235 invocation.
c2952b01
APB
14236 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14237 (java_get_real_method_name): Use GET_CPC_UN.
14238 (check_abstract_method_definitions): Use DECL_CLINIT_P.
14239 (java_check_abstract_methods): Handle static method declared in
e64c46ce 14240 inner classes by an error.
c2952b01
APB
14241 (java_check_regular_methods): Use DECL_CLINIT_P.
14242 (source_start_java_method): Also set DECL_MAX_LOCALS.
14243 (create_artificial_method): Call java_parser_context_save_global
e64c46ce
AJ
14244 and java_parser_context_restore_global instead of saving/restoring
14245 the context by hand.
c2952b01
APB
14246 (expand_start_java_method): Improved verbose mode message.
14247 (java_complete_expand_methods): Fixed leading comment. Use
e64c46ce 14248 DECL_CLINIT_P.
c2952b01
APB
14249 (fix_constructors): Added assignment to this$<n> if necessary.
14250 (java_expand_classes): Call java_complete_expand_classes instead
e64c46ce 14251 of java_complete_expand_methods.
c2952b01
APB
14252 (make_qualified_primary): Simplified.
14253 (merge_qualified_name): Optimized for missing left or right parts.
14254 (resolve_expression_name): Handle access to outer class fields from
e64c46ce 14255 interclasses.
c2952b01 14256 (resolve_qualified_expression_name): New macro
e64c46ce
AJ
14257 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14258 classes. Report error on non appropriate qualification of
14259 `new'. Handle qualified `this'.
c2952b01 14260 (not_accessible_p): Allow access to outer class private fields from
e64c46ce 14261 inner classes.
c2952b01 14262 (patch_method_invocation): Handle method invocations through
e64c46ce 14263 access methods and inner class constructor invocations.
c2952b01 14264 (find_applicable_accessible_methods_list): Search enclosing
e64c46ce 14265 contexts of an inner class.
c2952b01
APB
14266 (search_applicable_methods_list): Fixed typo.
14267 (argument_types_convertible): Handle inner class constructors'
e64c46ce 14268 hidden outer context reference argument.
c2952b01
APB
14269 (qualify_ambiguous_name): Handle qualified `this'.
14270 (java_complete_lhs): Handle use of field accessed through
e64c46ce
AJ
14271 artificial access methods in various cases of assignments. Handle
14272 CLASS_LITERAL node.
c2952b01
APB
14273 (check_final_assignment): Use DECL_CLINIT_P.
14274 (valid_ref_assignconv_cast_p): Handle the destination being an
e64c46ce 14275 enclosing context of the source.
c2952b01 14276 (patch_unaryop): Handle use of field accessed through artificial
e64c46ce 14277 access methods.
c2952b01
APB
14278 (patch_return): Use DECL_CLINIT_P.
14279 (patch_throw_statement): Use DECL_CLINIT_P.
14280 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14281 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
e64c46ce 14282 ID_INIT_P.
f6bbde28 14283
c52b5771
AG
142842000-01-16 Anthony Green <green@cygnus.com>
14285
14286 * parse.y (build_string_concatenation): Only use
14287 StringBuffer(String) shortcut if String arg is constant.
14288
62c9aa5f 142892000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
f8989a66
APB
14290
14291 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14292 the shift value to int. Fixed typo in comment.
14293
51149cc8
MK
142942000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
14295
14296 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14297 * jcf-write.c: Likewise.
14298 * parse.y: Likewise.
14299 * parse.c: Regenerate.
14300
2d54440c
AG
143012000-01-09 Anthony Green <green@cygnus.com>
14302
14303 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14304 bytecodes in the correct order.
14305
2cc60d16
KG
143062000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14307
14308 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14309
62c9aa5f 143102000-01-06 Anthony Green <green@cygnus.com>
f626e9fa
AG
14311
14312 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14313 before building constant array decl.
14314
62c9aa5f 143152000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
6b924cc5 14316
81baa09a 14317 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
6b924cc5 14318 method invocation and typo in conditional expression.
f6bbde28 14319 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
e64c46ce 14320 the appropriate NOTE_POP.
6b924cc5 14321 * parse.y (patch_binop): Shift value mask to feature the right
e64c46ce 14322 type.
6b924cc5 14323
c63b98cd
KG
143241999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14325
14326 * class.c (assume_compiled, assume_compiled_node): Add static
14327 prototype.
14328 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14329
14330 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14331
14332 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14333
14334 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14335 to `__modifier' to avoid stringifying it.
14336
14337 * parse.y (verify_constructor_circularity): Don't call a variadic
14338 function with a non-literal format string.
14339 (java_check_abstract_methods): Move unreachable code inside
14340 `continue' statement.
14341 (lookup_method_invoke): Call xstrdup, not strdup.
14342
14343 * expr.c (expand_java_field_op): Avoid the use of ANSI string
14344 concatenation.
14345
14346 * jcf-parse.c (yyparse): Likewise.
14347
14348 * jv-scan.c (main): Likewise.
f6bbde28 14349
781b0558
KG
143501999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14351
14352 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14353 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14354 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14355 concatenation.
14356
14357 * parse.y (synchronized, variable_redefinition_error,
14358 check_class_interface_creation, create_interface, create_class,
14359 method_header, finish_method_declaration,
14360 check_modifiers_consistency, method_declarator,
14361 complete_class_report_errors, check_abstract_method_definitions,
14362 java_check_regular_methods, check_throws_clauses,
14363 java_check_abstract_methods, read_import_dir,
14364 check_pkg_class_access, declare_local_variables, fix_constructors,
14365 cut_identifier_in_qualified, resolve_expression_name,
14366 resolve_qualified_expression_name, patch_method_invocation,
14367 java_complete_lhs, patch_assignment, try_builtin_assignconv,
14368 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14369 patch_exit_expr, patch_exit_expr, patch_switch_statement,
14370 patch_try_statement, patch_synchronized_statement,
14371 patch_throw_statement, check_thrown_exceptions,
14372 patch_conditional_expr): Likewise.
14373
62c9aa5f 143741999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
ee07f4f4
APB
14375
14376 * Makefile.in (LIBDEPS): Added gcc's errors.o
14377 (../jcf-dump$(exeext):): Link with gcc's errors.o
14378 (../gcjh$(exeext):): Likewise.
14379 * expr.c (expand_java_NEW): Layout the entire target type instead of
e64c46ce 14380 laying out its methods only.
ee07f4f4
APB
14381 (lookup_field): Layout the class after having loaded it.
14382 * java-tree.h (java_debug_context): Declared.
14383 * jcf-io.c (toplev.h): Included.
14384 (find_class): Removed assignment to jcf's outofsynch
e64c46ce
AJ
14385 field. Force source file to be read if newer than its matching
14386 class file. Tweaked debug messages.
ee07f4f4
APB
14387 * jcf-parse.c (jcf_out_of_synch): Deleted.
14388 (read_class): Call to jcf_out_of_synch removed.
14389 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14390 (jcf_out_of_synch): Prototype deleted.
14391 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
ee142fe7
KH
14392 `deprecated' and `class_err': integer turned into bit-fields.
14393 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
ee07f4f4
APB
14394 * parse.y (package_list): New global.
14395 (package_declaration:): Record newly parsed package name.
14396 (extra_ctxp_pushed_p): Static global deleted.
14397 (java_parser_context_save_global): Create buffer context for the
e64c46ce 14398 purpose of saving globals, if necessary.
ee07f4f4 14399 (java_parser_context_restore_global): Pop context pushed for the
e64c46ce 14400 purpose of saving globals, if necessary.
ee07f4f4
APB
14401 (java_debug_context_do): New prototype and function.
14402 (java_debug_context): Likewise.
14403 (do_resolve_class): Use already parsed package names to qualify
e64c46ce 14404 and lookup class candidate.
f6bbde28 14405 (java_pre_expand_clinit): Removed unnecessary local variable.
ee07f4f4 14406
6b924cc5
APB
144071999-12-17 Tom Tromey <tromey@cygnus.com>
14408
14409 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
14410 fixes PR gcj/119.
14411 (process_file): Use `\n\' at end of each line in string.
14412
62c9aa5f 144131999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
6bafd8b6
APB
14414
14415 * expr.c (expand_invoke): Layout the loaded class before
e64c46ce 14416 attempting to use it.
6bafd8b6 14417 (expand_java_field_op): Allow final field assignments to take
e64c46ce 14418 place in $finit$.
f6bbde28 14419 * typeck.c (convert): Return error_mark_node if expr is null.
6bafd8b6 14420
e920ebc9
APB
144211999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14422
14423 * class.c (class_depth): Return -1 if the class doesn't load
14424 properly.
14425 * expr.c (can_widen_reference_to): Check for errors during depth
14426 computation and return 0 accordingly.
14427 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14428 create default constructors and add an other error check.
14429 * parse.h (java_fix_constructors): Prototyped.
14430 * parse.y (java_pre_expand_clinit): Likewise.
14431 (build_super_invocation): Re-prototyped to feature one argument.
14432 (java_check_circular_reference): Directly use `current'.
14433 (java_fix_constructors): New function.
14434 (java_check_regular_methods): Don't create default constructors
14435 here, but abort if none were found.
14436 (java_complete_expand_methods): Pre-process <clinit> calling
14437 java_pre_expand_clinit.
14438 (java_pre_expand_clinit): New function.
14439 (fix_constructors): build_super_invocation invoked with the
14440 current method declaration as an argument.
14441 (build_super_invocation): Use the context of the processed method
14442 decl argument instead of current_class.
14443 * typeck.c (lookup_java_method): Take WFLs in method names into
14444 account.
f6bbde28 14445
62c9aa5f 144461999-12-14 Per Bothner <per@bothner.com>
cf69bfbf
PB
14447
14448 * class.c (make_class_data): flag_keep_inline_functions to keep
14449 private methods in the method array.
14450
38b58895
AG
144511999-12-15 Anthony Green <green@cygnus.com>
14452
14453 * check-init.c (check_init): Take into account both types of
f6bbde28 14454 `throw's when checking for uninitialized variables.
38b58895 14455
62c9aa5f 144561999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
3a1760ac 14457
67264b4f 14458 * parse.y (java_complete_lhs): Force conversion of array
f6bbde28 14459 dimensions to int_type_node, that's what runtime's ABI expects.
3a1760ac 14460
62c9aa5f 144611999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6a50bd91
APB
14462
14463 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
e64c46ce
AJ
14464 operand of a WFL, until the Java front-end gets fixed with regard
14465 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
6a50bd91 14466
8bbb23b7
AH
144671999-12-10 Andrew Haley <aph@cygnus.com>
14468
14469 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14470 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14471 expr.c (build_java_athrow): Add support for sjlj-exceptions.
14472 java-tree.h: Ditto.
f6bbde28 14473 jcf-write.c: Ditto.
8bbb23b7 14474
62c9aa5f 144751999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
6f9c8716 14476
f6bbde28
ZW
14477 * expr.c (java_lang_expand_expr): Switch to permanent obstack
14478 before calling expand_eh_region_start and expand_start_all_catch.
14479 * except.c (expand_start_java_handler): Switch to permanent
14480 obstack before calling expand_eh_region_start.
14481 (expand_end_java_handler): Switch to permanent obstack before
14482 calling expand_start_all_catch.
6f9c8716 14483
1684f874
AG
144841999-12-5 Anthony Green <green@cygnus.com>
14485
14486 * decl.c (init_decl_processing): Mark throw_node as a noreturn
14487 function with side effects.
14488 (init_decl_processing): Mark all memory allocating DECLs with
14489 DECL_IS_MALLOC.
14490
62c9aa5f 144911999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
0974e9fe 14492
f6bbde28
ZW
14493 * except.c (expand_end_java_handler): Call
14494 expand_resume_after_catch and end_catch_handler.
0974e9fe 14495
62c9aa5f 144961999-11-30 Anthony Green <green@cygnus.com>
de1f429d 14497
f6bbde28 14498 * verify.c (verify_jvm_instructions): Create new return label
a83f01f0 14499 chain if non existent (don't rely on the verified state of the jsr
f6bbde28 14500 target.)
de1f429d 14501
62c9aa5f 145021999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
afc390b1 14503
f6bbde28
ZW
14504 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14505 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
afc390b1 14506
f6bbde28
ZW
14507 * parse.y (patch_assignment): Removed bogus final class test on
14508 lhs when checking on whether to emit an ArrayStoreException runtime
14509 check.
14510 * expr.c (expand_java_arraystore): Likewise.
afc390b1 14511
3fc61836
AG
145121999-11-28 Anthony Green <green@cygnus.com>
14513
14514 * decl.c (find_local_variable): Reuse single slot decls when
14515 appropriate.
14516
62c9aa5f 145171999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
1ba305b5 14518
f6bbde28
ZW
14519 * jcf-parse.c (saw_java_source): Global variable removed.
14520 (read_class): Don't use `saw_java_source'. Added extra braces.
14521 (yyparse): Code setting `saw_java_source' removed.
1ba305b5 14522
9a260e99
MM
145231999-11-24 Mark Mitchell <mark@codesourcery.com>
14524
14525 * except.c (emit_handlers): Zero catch_clauses after emitting them.
14526
62c9aa5f 145271999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
de1f429d 14528
f6bbde28
ZW
14529 * verify.c (merge_type_state): Non verified subroutines being
14530 considered more than once to trigger passive type merge.
de1f429d 14531
62c9aa5f 145321999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
97f30284
APB
14533
14534 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
e64c46ce 14535 in case of error. Error message tuned.
97f30284 14536
48aedbca
AG
145371999-11-21 Anthony Green <green@cygnus.com>
14538
14539 * constants.c (find_methodref_index): Unwrap method names before
14540 inserting them in the constant pool.
14541
14542 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14543
14544 * class.c (assume_compiled_node): New typedef.
14545 (assume_compiled_tree): New static data.
14546 (find_assume_compiled_node): New function.
14547 (add_assume_compiled): New function.
14548 (assume_compiled): New function.
14549 * class.c (make_class_data): Use assume_compiled.
14550 (is_compiled_class): Use assume_compiled.
14551
14552 * java-tree.h (add_assume_compiled): Declare.
14553
14554 * lang.c (lang_decode_option): Parse new options.
14555
62c9aa5f 145561999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
4832340c
APB
14557
14558 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
e64c46ce 14559 int_type_node: that's what `_Jv_AllocObject' expects.
4832340c 14560
62c9aa5f 145611999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
b5b8a0e7 14562
f6bbde28 14563 * parse.y (lookup_method_invoke): Use lang_printable_name to
e64c46ce 14564 reliably build the type name during error report. Fixes PR gcj/97.
b5b8a0e7 14565
71651d6c
TT
145661999-11-09 Tom Tromey <tromey@cygnus.com>
14567
14568 * jcf-path.c: Include <sys/stat.h>.
14569 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
14570 (DIR_UP): New macro.
14571
62c9aa5f 145721999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
8226320b
APB
14573
14574 * parse.y (source_end_java_method): Resume permanent allocation,
e64c46ce 14575 reversing Apr 27 1998 patch.
8226320b 14576 (patch_string_cst): Pop obstacks after having pushed the permanent
e64c46ce 14577 ones.
8226320b 14578
09e7d04a
TT
145791999-11-05 Tom Tromey <tromey@cygnus.com>
14580
14581 * class.c (finish_class): Emit inlined methods if any native
14582 methods exist in the class. Fixes PR gcj/85.
14583
62c9aa5f 145841999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
97f30284
APB
14585
14586 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14587 (qualify_ambiguous_name): Likewise.
f6bbde28 14588
62c9aa5f 145891999-11-03 Godmar Back <gback@cs.utah.edu>
7c2e3b9b
GB
14590
14591 * typeck.c: (lookup_java_method): search all inherited
14592 interfaces when looking up interface method.
14593
62c9aa5f 145941999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
efa0a23f
APB
14595
14596 * parse.y (method_header:): Issue error message for rule `type
e64c46ce 14597 error'.
efa0a23f 14598 (synchronized:): Error report when not using synchronized.
f6bbde28 14599
62c9aa5f 146001999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
f63991a8 14601
ffa669ea 14602 * parse.y (resolve_qualified_expression_name): Prevent `this' from
e64c46ce 14603 being used before the superclass constructor has been called.
ffa669ea 14604 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
e64c46ce 14605 instead of `CALL_THIS_CONSTRUCTOR_P'.
f63991a8 14606
62c9aa5f 146071999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
f6e8b583
TF
14608
14609 * check-init.c: Fix typo in comment.
14610
62c9aa5f 146111999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
ed598dde
APB
14612
14613 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
e64c46ce 14614 and final method.
ed598dde 14615
62c9aa5f 146161999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
8119c720
APB
14617
14618 * parse.y (expression_statement:): Call function to report
e64c46ce 14619 improper invocation of a constructor.
8119c720
APB
14620 (parse_ctor_invocation_error): New function.
14621
2af0ac28
MM
146221999-10-26 Mark Mitchell <mark@codesourcery.com>
14623
14624 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14625 remember_end_note.
14626
2fca54be
TT
146271999-10-21 Tom Tromey <tromey@cygnus.com>
14628
14629 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14630 in generated `main'.
14631
62c9aa5f 146321999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
ac22f9cb
APB
14633
14634 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14635 (qualify_ambiguous_name): Likewise.
14636
62c9aa5f 146371999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
100f7cd8
APB
14638
14639 * parse.y (java_complete_tree): fold_constant_for_init to work on
e64c46ce 14640 permanent_obstack.
100f7cd8
APB
14641 (java_complete_lhs): Likewise.
14642 (array_constructor_check_entry): Complete an initializer element
e64c46ce 14643 on permanent_obstack.
100f7cd8 14644
51ae4071
TT
146451999-10-19 Tom Tromey <tromey@cygnus.com>
14646
14647 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14648 From Mike Moreton <mike@pillim.demon.co.uk>.
14649
13f9ac51
GM
146501999-10-15 Greg McGary <gkm@gnu.org>
14651
14652 * java-tree.h (flag_bounds_check): Remove extern decl.
14653 * lang.c (flag_bounds_check): Remove global variable.
14654 (lang_f_options): Remove "bounds-check" entry.
14655 (lang_init_options): Default flag_bounds_check to "on".
14656
8f426586
TT
146571999-10-14 Tom Tromey <tromey@cygnus.com>
14658
7cf41963
TT
14659 * jvgenmain.c (usage): New function.
14660 (main): Use it. Also, handle `-D' options.
14661 * jvspec.c (lang_specific_driver): Recognize -D.
14662 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14663
8f426586
TT
14664 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14665
1ebadc60
KG
146661999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14667
14668 * jcf-dump.c (print_constant, disassemble_method): Don't call a
14669 variadic function with a non-literal format string.
14670
14671 * parse-scan.y (report_main_declaration): Likewise.
14672
14673 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14674
14675 * parse.y (read_import_dir, patch_assignment, patch_binop,
14676 patch_array_ref): Likewise.
14677
14678 * typeck.c (build_java_array_type): Likewise.
14679
14680 * verify.c (verify_jvm_instructions): Likewise.
14681
62c9aa5f 146821999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
b5edd133 14683
ce74b7d6 14684 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
b5edd133 14685
ab150fb1
AG
146861999-10-07 Anthony Green <green@cygnus.com>
14687
14688 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14689 where CHECK_PUT may fail for valid reasons.
14690
14691 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
e64c46ce 14692 UNSAFE_PUTN): New macros.
ab150fb1 14693
05a3dfc7
TT
146941999-10-04 Tom Tromey <tromey@cygnus.com>
14695
14696 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14697 well. Fixes Java PR gcj/59.
14698 * parse-scan.y (yyerror): Report errors.
14699
62c9aa5f 147001999-09-24 Glenn Chambers <GChambers@provsol.com>
ca6c7489 14701
d353a00c 14702 * decl.c (insert_block): Remove unconditional `abort'.
ca6c7489 14703
62c9aa5f 147041999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
26db82d8
BS
14705
14706 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
14707 FUNCTION_CODE now of type int. All callers changed.
14708 Set the builtin's DECL_BUILT_IN_CLASS.
14709
0cffaca3
TT
147101999-09-23 Tom Tromey <tromey@cygnus.com>
14711
14712 * jvspec.c (lang_specific_driver): Don't read spec file if
14713 -fsyntax-only given.
14714
bad1e2ac
TT
147151999-09-22 Tom Tromey <tromey@cygnus.com>
14716
ba020951
TT
14717 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14718
bad1e2ac
TT
14719 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14720 (WORDS_TO_LONG): Likewise.
14721 (WORDS_TO_DOUBLE): Likewise.
14722
62c9aa5f 147231999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
cacc154e 14724
ce74b7d6 14725 * jcf-write.c (RELOCATION_VALUE_0): New macro.
cacc154e
APB
14726 (RELOCATION_VALUE_1): Likewise.
14727 (emit_iinc, emit_reloc, push_constant1, push_constant2,
e64c46ce 14728 push_in_const, push_long_const): Prototyped.
cacc154e
APB
14729 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14730 (push_constant2): Likewise.
14731 (push_int_const): Cast find_constant1's integer arguments to `jword'.
14732 (find_constant_wide): Cast find_constant2's integer arguments to
e64c46ce 14733 `jword'.
cacc154e 14734 (find_constant_index): Cast find_constant2's and find_constant2's
e64c46ce 14735 integer arguments to `jword'.
cacc154e
APB
14736 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14737 (emit_switch_reloc): Use RELOCATION_VALUE_0.
14738 (emit_if): Use RELOCATION_VALUE_1.
14739 (emit_goto): Likewise.
14740 (emit_jsr): Likewise.
14741 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
e64c46ce 14742 argument to push_long_const to HOST_WIDE_INT.
cacc154e 14743
7161fcc7
AS
147441999-09-15 Andreas Schwab <schwab@suse.de>
14745
14746 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14747
03d32d1a
NC
147481999-09-20 Nick Clifton <nickc@cygnus.com>
14749
14750 * lang.c (lang_decode_option): Extend comment.
14751
62c9aa5f 147521999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
b771925e
APB
14753
14754 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
e64c46ce 14755 instead of fndecl.
b771925e 14756
c2e3db92
KG
147571999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14758
14759 * gjavah.c (get_field_name, print_method_info, print_include,
14760 add_namelet): Use xmalloc, not malloc.
14761
14762 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
14763 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14764 NULL pointer.
14765
14766 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14767
14768 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
f6bbde28 14769
c2e3db92
KG
14770 * jcf-path.c (add_entry): Likewise.
14771
14772 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14773
14774 * jv-scan.c (xmalloc): Remove definition.
14775
14776 * jvgenmain.c (xmalloc): Likewise.
14777
14778 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14779
14780 * lex.c (java_store_unicode): Use xrealloc, not realloc.
14781
14782 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
14783 concat, not xmalloc/sprintf.
14784 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14785 (xstrdup): Remove definition.
14786
14787 * parse.y (duplicate_declaration_error_p,
14788 constructor_circularity_msg, verify_constructor_circularity,
14789 check_abstract_method_definitions, java_check_regular_methods,
14790 java_check_abstract_methods, patch_method_invocation,
14791 check_for_static_method_reference, patch_assignment, patch_binop,
14792 patch_cast, array_constructor_check_entry, patch_return,
14793 patch_conditional_expr): Use xstrdup, not strdup.
14794
14795 * zextract.c (ALLOC): Use xmalloc, not malloc.
14796
62c9aa5f 147971999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9257393c
KG
14798
14799 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14800
14801 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
14802 (do_spec, lang_specific_pre_link, lang_specific_driver,
14803 input_filename, input_filename_length): Don't declare.
14804 (main_class_name, jvgenmain_spec, lang_specific_driver):
14805 Constify a char*.
14806 (lang_specific_driver): All calls to the function pointer
f6bbde28 14807 parameter now explicitly call `fatal'.
9257393c 14808
62c9aa5f 148091999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
f4e16489
APB
14810
14811 * parse.y (find_applicable_accessible_methods_list): Search
e64c46ce 14812 abstract classes as interfaces.
f4e16489 14813
62c9aa5f 148141999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
fcf6eeb6
APB
14815
14816 * class.c (finish_class): We're now outside a valid method
e64c46ce 14817 declaration. Tell the rest of gcc so.
fcf6eeb6 14818
64e92991
RK
148191999-09-08 Bruce Korb autogen@linuxbox.com
14820
14821 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14822
512d594b
TT
148231999-09-07 Tom Tromey <tromey@cygnus.com>
14824
14825 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14826 java-array.h.
14827 (decode_signature_piece): Don't emit "::" in JArray<>.
14828 (print_namelet): Only print trailing `;' when printing a class.
14829
62c9aa5f 148301999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
81b3411c
BS
14831
14832 * java-tree.h: Delete declarations for all tree nodes now moved to
14833 global_trees.
14834 * decl.c: Delete their definitions.
14835
6308c574
MM
148361999-09-04 Mark Mitchell <mark@codesourcery.com>
14837
14838 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14839 * Makefile.in (OBJS): Add ggc-callbacks.o.
14840 (OBJDEPS): Likewise.
14841
2f11d407
TT
148421999-09-03 Tom Tromey <tromey@cygnus.com>
14843
14844 * parse.y (strip_out_static_field_access_decl): Return operand if
14845 it satisfies JDECL_P.
14846
3a5395a3
TT
148471999-09-02 Tom Tromey <tromey@cygnus.com>
14848
14849 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14850 Handle nested arrays, like `[[I'.
14851
d593dd8c
KG
148521999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14853
14854 * class.c (finish_class): Remove unused parameter, all callers
14855 changed.
14856
14857 * expr.c (build_java_athrow): Change return type to void.
14858 (java_lang_expand_expr): Make sure each case in switch returns a
14859 value.
14860
14861 * java-tree.h (finish_class): Fix prototype to take void args.
14862
14863 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14864 (main): Issue return from main, not exit.
14865
14866 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14867
14868 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14869
14870 * jv-scan.c (main): Issue return from main, not exit.
14871
14872 * parse.y (check_abstract_method_definitions,
14873 java_check_abstract_method_definitions): Add static prototypes.
14874 (java_complete_expand_methods): Fix call to `finish_class'.
14875
14876 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14877 and `prevpc'.
14878
f425a887
KG
148791999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14880
14881 * lang.c (language_string): Constify.
14882
00d30284
KG
148831999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14884
14885 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14886 Remove hacks for stuff which comes from libiberty.
14887
14888 * Make-lang.in: Likewise.
14889
62c9aa5f 148901999-08-30 Hans-Peter Nilsson <hp@axis.se>
24c30b28
HPN
14891
14892 * Makefile.in (xref.o): Depend on xref.c explicitly.
14893
1b93a502
KG
148941999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14895
14896 * java-tree.h (lang_printable_name): Constify a char*.
14897
14898 * lang.c (lang_printable_name): Likewise.
14899
62c9aa5f 149001999-08-27 Jeffrey A Law (law@cygnus.com)
5f9ee695
JL
14901
14902 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14903 comments in C code.
14904
12207a87
TT
149051999-08-26 Tom Tromey <tromey@cygnus.com>
14906
14907 * gjavah.c (print_cxx_classname): Print "::" before qualified
14908 name.
14909
62c9aa5f 149101999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
f441f671
APB
14911
14912 * parse.y (lookup_cl): Changed leading comment. Now does its best
e64c46ce 14913 to set the column number.
f441f671
APB
14914 (qualify_ambiguous_name): Take WFL wrappers into account.
14915
62c9aa5f 149161999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
ee5cd638
GT
14917
14918 * verify.c (verify_jvm_instructions): Don't check instruction
14919 validity beyond end of method.
14920
20c96b2a
TT
149211999-08-25 Tom Tromey <tromey@cygnus.com>
14922
14923 * jvspec.c (lang_specific_driver): Correctly handle --help again.
14924
be245ac0
KG
149251999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14926
14927 * gjavah.c (print_name, print_base_classname, utf8_cmp,
14928 cxx_keyword_subst, generate_access, name_is_method_p,
14929 get_field_name, print_field_name, super_class_name, print_include,
14930 decode_signature_piece, print_class_decls, usage, help,
14931 java_no_argument, version, add_namelet, print_namelet): Add static
14932 prototype.
14933 (print_base_classname, utf8_cmp, cxx_keyword_subst,
14934 name_is_method_p): Constify a char*.
14935 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
14936 Provide a final else clause in an if-else-if.
14937 (print_field_info): Add missing final arg in function call to
14938 `print_field_name'.
14939 (print_method_info, decompile_method, decode_signature_piece,
14940 print_c_decl, print_full_cxx_name, print_stub,
14941 print_mangled_classname, super_class_name, print_include,
14942 add_namelet, add_class_decl, print_class_decls, process_file,
14943 help): Constify a char*.
14944
14945 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14946 push_int_const, find_constant_wide, find_constant_index,
14947 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14948 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14949 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14950 emit_if, emit_goto, emit_jsr, call_cleanups,
14951 make_class_file_name): Add static prototypes.
14952 (generate_bytecode_return, generate_bytecode_insns): Pass a
14953 NULL_PTR, not a NULL_TREE.
14954
14955 * jv-scan.c: Include "jcf.h".
14956 (main): Declare using DEFUN macro.
14957
14958 * jvspec.c (find_spec_file, lang_specific_pre_link,
14959 lang_specific_driver): Add prototypes.
14960 (find_spec_file): Constify a char*.
14961
14962 * keyword.gperf (hash, java_keyword): Add prototypes.
14963
14964 * lang.c (lang_print_error): Add static prototype.
14965 (lang_init): Prefer memcpy over bcopy to avoid casts.
14966
14967 * lex.c (yylex): Add static prototype.
14968
14969 * parse-scan.y: Include "lex.c" earlier.
14970
14971 * parse.h: Remove redundant declaration for `yylex'.
14972
14973 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14974 labeled_block_contains_loop_p): Add static prototypes.
14975 (not_accessible_p): Make static to match prototype.
14976
14977 * verify.c (start_pc_cmp): Don't needlessly cast away const.
14978
62c9aa5f 149791999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
d77613be
APB
14980
14981 * parse.y (check_method_redefinition): Changed leading comment.
14982 (check_abstract_method_definitions): New function.
14983 (java_check_abstract_method_definitions): New function.
14984 (java_check_regular_methods): Call it.
14985 (verify_constructor_super): Fixed indentation.
14986 (lookup_method_invoke): Likewise.
14987
62c9aa5f 149881999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
79d13333
APB
14989
14990 * parse.y (method_header): Return a null pointer if the current
e64c46ce 14991 class node is null.
79d13333 14992 (finish_method_declaration): Return if the current function decl
e64c46ce 14993 is null.
79d13333
APB
14994 (source_start_java_method): Likewise.
14995 (java_method_add_stmt): Likewise.
14996
62c9aa5f 149971999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5cbdba64
APB
14998
14999 * class.c (emit_register_class): Removed unnecessary call to
e64c46ce 15000 start_sequence.
5cbdba64 15001 * parse.y (labeled_block_contains_loop_p): Removed unused local
e64c46ce 15002 variable.
5cbdba64 15003
62c9aa5f 150041999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5cbdba64 15005
f6bbde28 15006 * parse.y (java_refold): Added prototype.
5cbdba64 15007
62c9aa5f 150081999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
5cbdba64 15009
f6bbde28
ZW
15010 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15011 (java_stabilize_reference): Removed unnecessary `else'.
15012 (java_complete_lhs): Set flag to remember boolean. Call
15013 java_refold. Added comments.
15014 (java_decl_equiv): New function.
15015 (binop_compound_p): Likewise.
15016 (java_refold): Likewise.
15017 (patch_unaryop): Striped static field access assigned to decl and
15018 op. Changed promotion scheme for ++/-- operators.
15019 (search_loop): New function.
15020 (labeled_block_contains_loop_p): Likewise.
15021 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15022 comment.
15023 (patch_bc_statement): Call search_loop. Fixed comment.
5cbdba64 15024
66e06429
AG
150251999-08-14 Anthony Green <green@cygnus.com>
15026
15027 * expr.c (java_lang_expand_expr): Mark static array data as
15028 referenced.
15029
62c9aa5f 150301999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9a816500
RO
15031
15032 * jvgenmain.c (main): NUL-terminate name_obstack.
15033
c8e7d2e6
KG
150341999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15035
15036 * check-init.c (check_bool2_init, done_alternative): Add static
15037 prototypes.
15038
15039 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15040 (add_method, build_utf8_ref, build_class_ref,
15041 append_gpp_mangled_type, layout_class_method): Constify a char*.
15042
15043 * decl.c (push_promoted_type, make_binding_level): Add static
15044 prototypes.
15045 (push_promoted_type, pushdecl): Constify a char*.
15046
15047 * except.c (find_handler_in_range, link_handler,
15048 check_start_handlers): Add static prototypes.
15049
15050 * expr.c (process_jvm_instruction): Constify a char*.
15051
15052 * gjavah.c (main): Constify a char*.
15053
15054 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15055 Constify a char*.
15056
15057 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15058 static prototypes.
15059 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15060 munge, print_ents): Constify a char*.
15061
15062 * jcf-dump.c (disassemble_method): Constify a char*.
15063 (print_constant_pool, print_exception_table): Add static prototypes.
15064 (print_constant, print_exception_table, main, disassemble_method):
15065 Constify a char*.
15066
15067 * jcf-io.c (find_classfile, find_class): Likewise.
15068
15069 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15070 (set_source_filename, predefined_filename_p): Add static prototypes.
15071 (set_source_filename, get_constant, get_class_constant,
15072 find_in_current_zip): Constify a char*.
15073
15074 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15075 static prototypes.
15076 (add_entry, add_path, jcf_path_classpath_arg,
15077 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15078
15079 * jcf-reader.c (get_attribute, jcf_parse_preamble,
15080 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15081 jcf_parse_one_method, jcf_parse_methods,
15082 jcf_parse_final_attributes): Add static prototypes.
15083 (get_attribute): Constify a char*.
15084
15085 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15086 jcf_dependency_add_target, jcf_path_classpath_arg,
15087 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15088
15089 * jv-scan.c (main): Constify a char*.
15090 (gcc_obstack_init): Add prototype arguments.
15091
15092 * jvgenmain.c (gcc_obstack_init): Likewise.
15093 (main): Constify a char*.
15094
15095 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15096 static prototypes.
15097 (put_decl_string, lang_print_error): Constify a char*.
15098 (lang_init): Remove redundant extern prototype.
f6bbde28 15099
c8e7d2e6
KG
15100 * mangle.c (emit_unicode_mangled_name): Constify a char*.
15101
15102 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15103 Add static prototypes.
15104 (get_type_from_signature): Constify a char*.
15105
15106 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15107 Add static prototypes.
15108 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15109 (verify_jvm_instructions): Constify a char*.
15110
15111 * xref.c (xref_flag_value): Likewise.
f6bbde28 15112
c8e7d2e6
KG
15113 * xref.h (xref_flag_value): Likewise.
15114
15115 * zextract.c (makeword, makelong): Add static prototypes.
15116 (makeword, makelong): Constify a uch*.
15117
0070eeda
KG
151181999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15119
f6bbde28
ZW
15120 * lang.c (java_dummy_print): Constify a char*.
15121 (lang_print_error): Likewise.
15122 (lang_init): Remove redundant prototype for `print_error_function'.
15123 (lang_init_source): Likewise.
15124 (lang_identify): Constify a char*.
15125
63ac1f08
TT
151261999-08-09 Tom Tromey <tromey@cygnus.com>
15127
15128 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15129 (WORDS_TO_LONG): Likewise.
15130 (WORDS_TO_DOUBLE): Likewise.
15131
49f48c71
KG
151321999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15133
15134 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15135
15136 * expr.c (java_stack_pop, java_array_data_offset,
15137 build_java_throw_out_of_bounds_exception, case_identity,
15138 build_java_check_indexed_type): Add static prototypes.
15139 (linenumber_table, expand_invoke, expand_java_field_op,
15140 build_primtype_type_ref, expand_byte_code): Constify a char*.
15141
15142 * java-tree.h (build_primtype_type_ref, linenumber_table):
15143 Constify a char*.
15144 (java_lang_expand_expr): Add prototype.
15145
15146 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
15147 `java_lang_expand_expr'.
15148
15149 * lex.c (java_lex_error): Constify a char*.
15150 (java_get_unicode, java_read_char, java_allocate_new_line,
15151 java_unget_unicode, java_sneak_unicode): Prototype.
15152
15153 * parse-scan.y (current_class, package_name, method_declarator,
15154 report_class_declaration, yyerror): Constify a char*.
15155
15156 * parse.h (java_report_errors): Prototype.
15157 (yyerror): Constify a char*.
15158
15159 * parse.y (classitf_redefinition_error, check_modifiers,
15160 parse_jdk1_1_error, lookup_package_type,
15161 lookup_package_type_and_set_next, get_printable_method_name,
15162 purify_type_name): Constify a char*.
15163 (build_super_invocation, maybe_generate_finit,
15164 verify_constructor_super, parser_add_interface,
15165 add_superinterfaces, jdep_resolve_class, note_possible_classname,
15166 java_complete_expand_methods, java_expand_finals,
15167 cut_identifier_in_qualified, java_stabilize_reference,
15168 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15169 merge_string_cste): Prototype.
15170 (single_type_import_declaration, yyerror,
15171 variable_redefinition_error, build_array_from_name,
15172 build_unresolved_array_type, check_class_interface_creation,
15173 resolve_class, complete_class_report_errors,
15174 note_possible_classname, read_import_dir,
15175 find_in_imports_on_demand, resolve_package, fix_constructors,
15176 check_deprecation, lookup_method_invoke,
15177 maybe_build_primttype_type_ref, array_constructor_check_entry):
15178 Constify a char*.
15179 (java_complete_expand_methods, java_expand_finals): Make static.
15180 (convert_narrow): Remove static prototype.
15181
62c9aa5f 151821999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
02edc62b
R
15183
15184 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15185
0ae70c6a
RH
151861999-08-02 Richard Henderson <rth@cygnus.com>
15187
15188 * decl.c: Include defaults.h instead of expr.h.
15189 * parse.y: Likewise.
15190
e438e1b7
JJ
151911999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
15192
15193 * java/decl.c (start_java_method): Change all uses of
15194 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15195 Ensure expr.h is included.
15196 * java/expr.c (pop_arguments): Ditto.
15197 * java/parse.y (expand_start_java_method): Ditto.
15198
9490b7d6
KG
151991999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15200
15201 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15202
b384405b
BS
152031999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
15204
15205 * decl.c: Include "function.h".
15206 * except.c: Likewise.
15207 * parse.y: Likewise.
15208 * Makefile.in: Update dependencies.
15209
cd531a2e
KG
152101999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15211
15212 * expr.c (build_java_soft_divmod): Provide a default case in switch.
15213 (java_lang_expand_expr): Mark parameters `target', `tmode' and
15214 `modifier' with ATTRIBUTE_UNUSED.
15215
15216 * gjavah.c (process_file): Add braces around ambiguous `else'.
15217
15218 * jcf-dump.c (print_access_flags, localvar_free): Change return
15219 type to void.
15220
15221 * parse.y (java_complete_expand_method): Initialize variable
15222 `exception_copy'.
15223 (resolve_qualified_expression_name): Likewise for `field_decl'.
15224 (patch_method_invocation): Likewise for `class_to_search'.
15225 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15226 (patch_assignment): Likewise for `lhs_type'.
15227
15228 * verify.c (verify_jvm_instructions): Remove unused variable
15229 `caller'.
15230
8824cf7e
RH
152311999-07-25 Richard Henderson <rth@cygnus.com>
15232
15233 * decl.c (va_list_type_node): New.
15234
6c9c5c1f
AG
152351999-07-25 Anthony Green <green@cygnus.com>
15236
15237 * gjavah.c (print_stub): New function.
15238 (METHOD_IS_NATIVE): New macro.
15239 (print_mangled_classname): Make static.
15240 (HANDLE_END_FIELD): Don't emit fields during stub generation.
15241 (process_file): Perform stub generation.
15242 (HANDLE_METHOD): Don't emit class decls during stub
15243 generation.
15244 (HANDLE_END_METHOD): Take into account stub generation.
15245 (print_method_info): Handle stub generation.
15246 (print_stub): New function.
15247 (print_cxx_classname): Make signature consistant with others.
15248 (help): Describe -stubs option.
15249 (main): Create stub file.
15250 (version): Use version.c.
15251 (print_full_cxx_name): New function.
15252 (print_c_decl): Use print_full_cxx_name.
15253
62c9aa5f 152541999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
ac1d97ce
APB
15255
15256 * check-init.c (check_init): Handle MAX_EXPR.
15257
aa4759c1
AH
152581999-07-15 Andrew Haley <aph@cygnus.com>
15259
f6bbde28
ZW
15260 * lang.c (flag_use_divide_subroutine): New variable.
15261 * typeck.c: (convert_ieee_real_to_integer): Bounds check
15262 fp-to-integer conversion.
15263 (convert): Call convert_ieee_real_to_integer when flag_fast_math
15264 is not set.
15265
15266 * expr.c (build_java_soft_divmod): New function.
15267 (build_java_binop): Call build_java_soft_divmod if
15268 flag_use_divide_subroutine is set.
15269 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15270 soft_lrem_node: new builtin functions.
15271 (init_decl_processing) Initialize the new builtins.
15272 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15273 soft_lrem_node: new builtin functions.
15274 (build_java_soft_divmod): New function.
15275 * parse.y: Call build_java_soft_divmod if
15276 flag_use_divide_subroutine is set.
15277 * parse.c: Rebuilt.
15278
15279 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15280 a --specs= arg) even if not linking.
15281 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15282 -fuse-divide-subroutine
0b094f65 15283
62c9aa5f 152841999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7705e9db
APB
15285
15286 * parse.y (resolve_and_layout): Check methods only once.
15287 (resolve_qualified_expression_name): Verify thrown exceptions
e64c46ce 15288 compatibility.
7705e9db 15289 (check_thrown_exceptions): Reject exceptions thrown in
e64c46ce 15290 initializer. Error message tuned.
f6bbde28 15291
e533f648
AH
152921999-07-14 Andrew Haley <aph@cygnus.com>
15293
f6bbde28
ZW
15294 * expr.c (expand_expr): Do not return the last statement in a
15295 block as the block's value.
e533f648 15296
62c9aa5f 152971999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
15298
15299 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
e64c46ce 15300 CALL_EXPR, to avoid order of evaluation changes.
1a6d4fb7 15301
62c9aa5f 153021999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
15303
15304 * parse.y (qualify_ambiguous_name): Do not use
e64c46ce 15305 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
1a6d4fb7 15306
62c9aa5f 153071999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
15308
15309 * check-init.c (check_init): Handle MAX_EXPR.
15310 * expr.c (force_evaluation_order): Force method call arguments to
e64c46ce 15311 be evaluated in left-to-right order.
1a6d4fb7 15312 * parse.y (qualify_ambiguous_name): Loop again to qualify
e64c46ce 15313 NEW_ARRAY_EXPR properly.
1a6d4fb7 15314
62c9aa5f 153151999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
1a6d4fb7
APB
15316
15317 * parse.y (patch_invoke): Resolve unresolved invoked method
e64c46ce 15318 returned type.
1a6d4fb7 15319 (qualify_ambiguous_name): STRING_CST to qualify expression for
e64c46ce 15320 type name resolution.
1a6d4fb7 15321
ac8f5d48
AH
153221999-06-24 Andrew Haley <aph@cygnus.com>
15323
15324 * class.c (finish_class): Whenever a deferred method is
15325 output, rescan the list of methods to see if a new candidate for
15326 output can be found.
15327
4198d734
TT
153281999-06-28 Tom Tromey <tromey@cygnus.com>
15329
15330 * jvspec.c (lang_specific_driver): Recognize --help.
15331
62c9aa5f 153321999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
15333
15334 * parse.y (resolve_package): Fixed bogus return statement.
15335 (patch_method_invocation): Resolve method invocation beginning with
e64c46ce 15336 a package name qualifier.
2c56429a 15337
58ec4285
KG
153381999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15339
15340 * Make-lang.in (java.stage1): Depend on stage1-start.
15341 (java.stage2): Likewise for stage2-start.
15342 (java.stage3): Likewise for stage3-start.
15343 (java.stage4): Likewise for stage4-start.
15344
62c9aa5f 153451999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
15346
15347 * parse.y (java_complete_lhs): When doing cross referencing, don't
e64c46ce 15348 try to keep file location on a WFL expanded as a CALL_EXPR.
2c56429a 15349
62c9aa5f 153501999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
15351
15352 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
e64c46ce
AJ
15353 compiling to class file a void method with an empty method body.
15354 As a side effect, the bytecode backend will generate the
15355 appropriate `return' instruction.
f6bbde28 15356
62c9aa5f 153571999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
2c56429a
APB
15358
15359 * parse.y (lookup_package_type_and_set_next): New function prototype.
15360 (resolve_package): Search current and imported packages.
15361 (lookup_package_type_and_set_next): New function.
15362
45b0aa31
AH
153631999-06-22 Andrew Haley <aph@cygnus.com>
15364
15365 * verify.c (verify_jvm_instructions): Check for pending blocks
15366 before invalid PC test and opcode switch, not after.
15367
44d7502b
AH
153681999-06-21 Andrew Haley <aph@cygnus.com>
15369
f6bbde28
ZW
15370 * except.c (find_handler_in_range): The upper limit for exception
15371 ranges is exclusive, not inclusive: (start <= pc < end).
15372 (link_handler): find child pointer which points to outer by
15373 searching sibling list: previous code incorrectly assumed that
15374 outer->outer->first_child must point to outer.
15375 * verify.c (verify_jvm_instructions): FIXME added to code for
15376 `athrow'.
15377 (verify_jvm_instructions): Do not assume that the last block
15378 processed in a subroutine is a block which ends with a `ret'
15379 instruction. With some control flows it is possible that the last
15380 block ends with an `athrow'.
44d7502b 15381
62c9aa5f 153821999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
15383
15384 * parse.y (qualify_ambiguous_name): Reorganized the post
e64c46ce 15385 evaluation of non WFL leading expression nodes.
8576f094 15386
62c9aa5f 153871999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
15388
15389 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
e64c46ce 15390 CONVERT_EXPR.
8576f094 15391
62c9aa5f 153921999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
15393
15394 * parse.y (qualify_ambiguous_name): Handle qualified expression
e64c46ce 15395 beginning with a STRING_CST.
8576f094 15396
62c9aa5f 153971999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
8576f094
APB
15398
15399 * parse.y (register_fields): Set DECL_INITIAL on both
e64c46ce 15400 pre-initialized static and public fields.
8576f094 15401 (resolve_field_access): Static field access expressions to always
e64c46ce 15402 use pointer types.
8576f094 15403 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
e64c46ce 15404 qualification. CONVERT_EXPR to be resolved as an expression name.
8576f094 15405 (java_complete_lhs): Identify and access qualified final
e64c46ce 15406 initialized field in switch statement case expression.
8576f094 15407 (fold_constant_for_init): Pre-initialized field decl constant to
e64c46ce 15408 be folded.
8576f094 15409
62c9aa5f 154101999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
fe0e4d76
APB
15411
15412 * parse.y (note_possible_classname): Mark returned node with
e64c46ce 15413 QUALIFIED_P only if the original class name contained a '/'.
fe0e4d76 15414
62c9aa5f 154151999-06-05 Anthony Green <green@cygnus.com>
db1421c7
AG
15416
15417 * Make-lang.in (gcjh): More parallel build fixes.
15418
154191999-06-03 Mike Stump <mrs@wrs.com>
15420
15421 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15422
62c9aa5f 154231999-06-02 Anthony Green <green@cygnus.com>
99fd3aa5
AG
15424
15425 * except.c (link_handler): Chain exception handlers in order.
15426
62c9aa5f 154271999-06-02 Anthony Green <green@cygnus.com>
99fd3aa5
AG
15428
15429 * expr.c (expand_byte_code): Fill unreachable bytecode regions
e64c46ce
AJ
15430 with nops and process as usual in order to always set correct EH
15431 ranges. Emit detailed warnings about unreachable bytecodes.
99fd3aa5 15432
62c9aa5f 154331999-06-02 Anthony Green <green@cygnus.com>
99fd3aa5
AG
15434
15435 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
e64c46ce 15436 constant.
99fd3aa5 15437
62c9aa5f 154381999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893 15439
f6bbde28
ZW
15440 * parse.y (lookup_field_wrapper): Unified returned value to NULL
15441 or the searched field decl.
15442
62c9aa5f 154431999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893
APB
15444
15445 * parse.y (fold_constant_for_init): Convert numerical constant
e64c46ce 15446 values to the type of the assigned field.
93024893 15447
62c9aa5f 154481999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893
APB
15449
15450 * expr.c (lookup_field): Relaxed the test on class loading error
e64c46ce 15451 detection.
93024893
APB
15452 * parse.y (fold_constant_for_init): Enabeled old code.
15453
62c9aa5f 154541999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
93024893
APB
15455
15456 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
e64c46ce
AJ
15457 decide the validity of the cast of a java.lang.Cloneable reference
15458 to an array.
93024893 15459 (patch_conditional_expr): Fixed first argument passed to
e64c46ce 15460 binary_numeric_promotion.
93024893 15461
62c9aa5f 154621999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
2ba1f15f
APB
15463
15464 * parse.y (qualify_ambiguous_name): Take into account that a
e64c46ce 15465 CONVERT_EXPR might specify a type as a WFL.
2ba1f15f 15466
62c9aa5f 154671999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28
ZW
15468
15469 * parse.y (patch_assignment): Save the rhs before using it as an
15470 argument to _Jv_CheckArrayStore.
15471
62c9aa5f 154721999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
dc4e6ccf
APB
15473
15474 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15475
62c9aa5f 154761999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
dc4e6ccf 15477
f6bbde28 15478 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
67264b4f 15479 floating point literal only when the exponent indicator has been
f6bbde28 15480 parsed.
dc4e6ccf 15481
62c9aa5f 154821999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
5256aa37
APB
15483
15484 * parse.y (formal_parameter:): Construct argument tree list
e64c46ce 15485 element even if a yet unsupported final parameter was encountered.
5256aa37 15486
62c9aa5f 154871999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
5256aa37
APB
15488
15489 * parse.y (finish_method_declaration): Issue errors for native or
e64c46ce
AJ
15490 abstract methods declared with a method body, as well as for non
15491 native or non abstract methods with no method body.
5256aa37 15492
ab3a6dd6
KG
154931999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15494
15495 * class.c (build_utf8_ref): Initialize variable `field'.
15496
15497 * decl.c (init_decl_processing): Initialize variable `field'.
15498
15499 * expr.c (build_known_method_ref): Mark parameters `method_type',
15500 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15501 (process_jvm_instruction): Likewise for parameter `length'.
15502
15503 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15504 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15505 ATTRIBUTE_UNUSED.
15506
15507 * parse.y (maybe_generate_clinit): Remove unused variable
15508 `has_non_primitive_fields'.
15509 (find_in_imports_on_demand): Initialize variables `node_to_use'
15510 and `cl'.
15511 (patch_binop): Likewise for variable `prom_type'.
15512 (patch_unaryop): Likewise for variable `prom_type'.
15513
15514 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15515
15516 * xref.c (xref_table): Add missing initializer.
15517
5a9e5c6f
TT
155181999-05-14 Tom Tromey <tromey@cygnus.com>
15519
15520 * java-except.h (struct eh_range): Removed unused `next' member.
15521 * verify.c (verify_jvm_instructions): Call check_nested_ranges
15522 after adding all exception handlers. Sort exception ranges in
15523 order of start PC.
15524 (struct pc_index): New structure.
15525 (start_pc_cmp): New function.
15526 * except.c (add_handler): Return `void'. Don't call link_handler;
15527 instead construct an ordinary linked list and do range
15528 coalescing.
15529 (check_nested_ranges): New function.
15530 (link_handler): Changed interface to allow merging of eh_ranges.
15531 Split overlapping ranges. Return `void'.
15532
62c9aa5f 155331999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2e5eb5c5
APB
15534
15535 * parse.y (constructor_block_end:): New rule, tagged <node>.
15536 (constructor_body:): Use `constructor_block_end' instead of
e64c46ce 15537 `block_end'.
2e5eb5c5 15538
62c9aa5f 155391999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
9dd939b2
APB
15540
15541 * parse.y (statement_nsi:): Pop `for' statement block.
2e5eb5c5 15542 (java_complete_lhs): Labeled blocks containing no statement are
e64c46ce 15543 marked as completing normally.
9dd939b2 15544
62c9aa5f 155451999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
af8b342a
APB
15546
15547 * xref.c (xref_set_current_fp): New function, defined.
15548 * xref.h (xref_set_current_fp): New function, prototyped.
15549
62c9aa5f 155501999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
af8b342a
APB
15551
15552 * check-init.c (check_init): Take into account that
e64c46ce 15553 LABELED_BLOCK_STMT can be empty.
af8b342a 15554
62c9aa5f 155551999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
1fb89a4d
APB
15556
15557 * parse.y (java_check_regular_methods): Warning check on not
e64c46ce
AJ
15558 overriding methods with default access in other packages does not
15559 apply to `<clinit>'.
1fb89a4d 15560 (java_complete_lhs): If block body is an empty_stmt_node, replace
e64c46ce
AJ
15561 it by NULL_TREE. This prevents gcc from generating an irrelevant
15562 warning.
1fb89a4d 15563
62c9aa5f 155641999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
ce6e9147
APB
15565
15566 * check-init.c (check_init): Removed code accepting to see things
15567 falling through default:, when doing xrefs.
15568 * java-tree.h (do_not_fold): New global variable, declared.
15569 * parse.y (do_not_fold): New global variable, defined.
15570 (java_complete_expand_method): Set `do_not_fold' to the value of
e64c46ce
AJ
15571 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15572 and reinstall them after them have been purged; do not check for
15573 initializations; do not issue missing return errors.
ce6e9147 15574 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
e64c46ce 15575 when doing xrefs.
ce6e9147
APB
15576 (patch_binop): Skip the fold part when doing xrefs.
15577 (build_string_concatenation): Skip the concatenation part when
e64c46ce 15578 doing xrefs.
ce6e9147 15579 (patch_synchronized_statement): Do not generate a try-finally when
e64c46ce 15580 doing xrefs.
ce6e9147 15581 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
e64c46ce 15582 and keep the location where the throw was seen.
ce6e9147 15583 * typeck.c (convert): When `do_not_fold' is set, do not attempt
e64c46ce
AJ
15584 any treatment on the converted node an simply return a NOP_EXPR of
15585 the targeted type.
ce6e9147
APB
15586 * xref.c (xref_get_data): New function, defined.
15587 * xref.h (xref_get_data): New function, declared.
15588 (XREF_GET_DATA): Use xref_get_data.
f6bbde28 15589
ab3a6dd6 155901999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1b01250d 15591
f6bbde28
ZW
15592 * gjavah.c (print_include): Cast the result of `strlen' to int
15593 when comparing against a signed value.
15594 (add_namelet): Likewise.
1b01250d 15595
ab3a6dd6 155961999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
34ba56fa 15597
b4b63e32
KG
15598 * expr.c (expand_invoke): Mark parameter `nargs' with
15599 ATTRIBUTE_UNUSED.
15600 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15601
15602 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15603 ATTRIBUTE_UNUSED.
15604
15605 * jcf-reader.c (get_attribute): Cast a value to long
15606 when comparing against a signed expression. Likewise.
15607
34ba56fa
KG
15608 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15609 HOST_BITS_PER_CHAR.
15610
138657ec
AH
156111999-05-11 Andrew Haley <aph@cygnus.com>
15612
f6bbde28
ZW
15613 * parse.y (source_end_java_method): If the current method contains
15614 any exception handlers, force asynchronous_exceptions: this is
15615 necessary because signal handlers in libjava may throw exceptions.
15616 * decl.c (end_java_method): Ditto.
138657ec 15617
6a09296d
TT
156181999-05-11 Tom Tromey <tromey@cygnus.com>
15619
15620 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15621 flags.
15622 * jvspec.c (THREAD_NAME): Removed.
15623 (GC_NAME): Likewise.
15624 (MATHLIB): Likewise.
15625 (WITHLIBC): Likewise.
15626 (GCLIB): Likewise.
15627 (THREADLIB): Likewise.
15628 (MATH_LIBRARY): Likewise.
15629 (lang_specific_driver): Don't add `-l' options to command line.
15630 Instead, add a single --specs option. Recognize `-L' options and
15631 use them to search for spec file.
15632 (find_spec_file): New function.
15633 (SPEC_FILE): New define.
15634
62c9aa5f 156351999-05-11 Dave Brolley <brolley@cygnus.com>
b8b8bc03
DB
15636
15637 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15638 cpplib-enabled build.
15639
c14cff58
PB
156401999-05-05 Per Bothner <bothner@cygnus.com>
15641
15642 * class.c (make_field_value): DECL_INITIAL may be a string literal;
15643 temporarily zero it while calling rest_of_decl_compilation.
15644
15645 * java-tree.h (string_ptr_type_node): Add declaration.
15646 * decl.c: Define and initialize string_ptr_type_node.
15647 * parse.y (patch_string_cst): Use string_ptr_type_node.
15648
15649 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
15650 * parse.y (for_statement): Now unconditionally exit_block.
15651 (finish_labeled_statement): No longer exit_block if for-loop.
15652 (patch_loop_statement): Check harder if the loop is already labeled.
15653
15654 * parse.y (patch_initialized_static_field): Removed function.
15655 (maybe_generate_clinit): Removed special handling for interfaces.
15656 (java_complete_expand_methods): Do a preliminary java_complete_tree
15657 on <clinit> to determine if it can be removed.
15658 (java_complete_expand_method): Remove special handling for <clinit>.
15659 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
15660 optimize if we get back empty_stmt_node.
15661 For MODIFY_EXPR, re-do checking of static initializers.
15662 (fold_constant_for_init): Don't return immediate if VAR_DECL.
15663 For VAR_DECL, pass correct context.
15664
15665 * verify.c (verify_jvm_instructions): Better error messages.
15666
a7f0ef91
TT
156671999-05-03 Tom Tromey <tromey@cygnus.com>
15668
15669 * parse-scan.y (interface_declaration): Call
15670 report_class_declaration for interfaces.
15671
b4c92efc
ZW
156721999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
15673
15674 * Makefile.in: Remove -v from bison command lines.
15675
62c9aa5f 156761999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
7f10c2e2
APB
15677
15678 * check-init.c (check_init): Exclude a case of error when doing
e64c46ce 15679 xrefs.
7f10c2e2 15680 * class.c (layout_class_method): Don't generate the error message
e64c46ce 15681 twice when compiling from source.
7f10c2e2
APB
15682 * lang-options.h: Added `-Wredundant-modifers' and
15683 `-Wunusupported-jdk11' flags and help text.
15684 * lang.c (lang_decode_option): Added support for
e64c46ce 15685 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
7f10c2e2
APB
15686 flag_static_local_jdk11 and flag_redundant set accordingly.
15687 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15688 * parse.h (EXPR_WFL_ADD_COL): New macro.
15689 (DECL_END_SOURCE_LINE): Likewise.
15690 (DECL_INHERITED_SOURCE_LINE): Likewise.
15691 * parse.y (static_ref_err): New function, prototyped.
15692 (CCB_TK): Now tagged <operator>.
15693 (class_body:): Remember the location of the closing '}' of a class
e64c46ce 15694 definition when doing xrefs.
7f10c2e2
APB
15695 (block:): Likewise.
15696 (block_end:): Likewise.
15697 (create_class): Remember the location of the inherited class
e64c46ce 15698 identifier when doing xrefs.
7f10c2e2 15699 (register_fields): Added test on first operand of `init' before
e64c46ce 15700 testing it TREE_CODE.
7f10c2e2 15701 (method_header): Store the location of the class identifier in the
e64c46ce 15702 class decl when doing xrefs.
7f10c2e2 15703 (finish_method_declaration): Don't combine first/last method line
e64c46ce 15704 when doing xref.
7f10c2e2 15705 (java_check_regular_methods): Warning check on not overriding
e64c46ce
AJ
15706 methods with default access on other packages move before check on
15707 static methods. Initialization of `aflags' also moved up.
7f10c2e2
APB
15708 (resolve_expression_name): Call static_ref_err to report the error.
15709 (static_ref_err): New function, implemented.
15710 (resolve_field_access): Returned simplified static field access
e64c46ce 15711 when doing xrefs.
7f10c2e2 15712 (resolve_qualified_expression_name): Check for illegal use of
e64c46ce
AJ
15713 static fields in a non static context. Call static_ref_err to
15714 report error in various places.
ce6e9147 15715 (java_complete_tree): Do not fold initialized static fields when
e64c46ce 15716 doing xrefs.
7f10c2e2
APB
15717 (java_complete_lhs): Likewise.
15718
d2e0d40a
AG
157191999-04-29 Anthony Green <green@cygnus.com>
15720
15721 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15722 create internal labels.
15723 (lookup_label): Ditto.
15724
62c9aa5f 157251999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
7f1d4866
APB
15726
15727 * class.c (layout_class_method): Generate <clinit>'s rtl for
e64c46ce 15728 interfaces.
7f1d4866 15729 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
e64c46ce 15730 for interfaces' <clinit>.
7f1d4866
APB
15731 * expr.c (lookup_field): Search for fields in interfaces.
15732 (expand_invoke): Fixed indentation.
15733 (expand_java_field_op): Likewise. Use IS_CLINIT.
15734 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15735 (IS_CLINIT): New macro.
15736 * parse.y (type_declaration:): Call maybe_generate_clinit after an
e64c46ce 15737 interface was parsed.
7f1d4866 15738 (maybe_generate_clinit): Don't generate if the current class is an
e64c46ce 15739 interface with only fields of primitive types.
7f1d4866
APB
15740 (reset_method_name): Use IS_CLINIT.
15741 (java_complete_expand_method): Expand <clinit> when it exists for
e64c46ce 15742 interfaces. Use IS_CLINIT.
7f1d4866 15743 (resolve_expression_name): Use DECL_CONTEXT instead of
e64c46ce 15744 current_class to build static field references.
7f1d4866 15745 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
e64c46ce 15746 ARRAY_REF when doing xreferencing.
7f1d4866 15747 (check_final_assignment): Fixed typo in leading comment. Use
e64c46ce 15748 IS_CLINIT.
7f1d4866 15749 (patch_array_ref): Don't fully expand array references when
e64c46ce 15750 xreferencing.
7f1d4866
APB
15751 (patch_return): Use IS_CLINIT.
15752 (patch_throw_statement): Likewise.
15753
c9eb638e
TT
157541999-04-22 Tom Tromey <tromey@cygnus.com>
15755
15756 * Make-lang.in (JAVA_SRCS): Added check-init.c.
15757
62c9aa5f 157581999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
5423609c
APB
15759
15760 * decl.c (predef_filenames, predef_filenames_size): New globals
15761 (init_decl_processing): predef_filenames and predef_filenames_size
e64c46ce 15762 initialized.
5423609c 15763 * java-tree.h (predef_filenames, predef_filenames_size): Declared
e64c46ce 15764 extern.
5423609c
APB
15765 * jcf-parse.c (predefined_filename_p): New function.
15766 (yyparse): Check that files on the command line are specified only
e64c46ce 15767 once and issue a warning otherwise.
5423609c
APB
15768 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15769 * parse.y (source_end_java_method): Nullify NOP method bodies, to
e64c46ce 15770 avoid a gcc warning with -W -Wall turned on.
5423609c
APB
15771 (java_expand_classes): Abort if errors were encountered.
15772 (java_complete_lhs): If the cross reference flag is set, wrap
e64c46ce 15773 field DECL node around a WFL when resolving expression name.
f6bbde28 15774
62c9aa5f 157751999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
e8fc7396
APB
15776
15777 * lang.c (lang_decode_option): Fixed returned value when parsing
e64c46ce 15778 `-fxref=...' and `-Wall'.
e8fc7396 15779 * parse.y (source_end_java_method): Do not generate code when
e64c46ce 15780 flag_emit_xref is set.
e8fc7396 15781 (resolve_expression_name): Do not build static field access when
e64c46ce 15782 flag_emit_xref is set.
5423609c 15783 (resolve_field_access): No special treatment on `length' when
e64c46ce
AJ
15784 flag_emit_xref is set. Do not build qualified static field access
15785 when flag_emit_xref is set.
e8fc7396 15786 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
e64c46ce 15787 when flag_emit_xref is set.
e8fc7396 15788 (patch_assignment): Do not generate array store runtime check when
e64c46ce 15789 flag_emit_xref is set.
e8fc7396 15790 * xref.c (xref_flag_value): Fixed function declaration
e64c46ce 15791 indentation.
e8fc7396
APB
15792 (xset_set_data): New function.
15793 * xref.h (xref_set_data): Added prototype for new function.
15794 (typedef struct xref_flag_table): New field data.
15795 (XREF_GET_DATA): New macro.
15796
a3f406ce
TT
157971999-04-19 Tom Tromey <tromey@cygnus.com>
15798
15799 * xref.h (enum): Removed trailing comma.
15800
15801 * parse.y (resolve_qualified_expression_name): Added missing
15802 `break'.
15803
62c9aa5f 158041999-04-15 Anthony Green <green@cygnus.com>
08967681
AG
15805
15806 * gjavah.c: New prototypes for java_float_finite and
15807 java_double_finite.
15808
62c9aa5f 158091999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
b3edebcf 15810
e8fc7396 15811 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
e64c46ce 15812 references.
b3edebcf 15813
62c9aa5f 158141999-04-06 Jeffrey A Law (law@cygnus.com)
0bb07950
JL
15815
15816 * Makefile.in (TREE_H): Add tree-check.h.
15817 (RTL_H): Add genrtl.h.
15818
62c9aa5f 158191999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
2622b947 15820
f6bbde28
ZW
15821 * parse.y (patch_assignment): Added ArrayStoreException runtime
15822 check.
2622b947 15823
b399dcd2
PB
158241999-04-06 Per Bothner <bothner@cygnus.com>
15825
ab45646c
PB
15826 * expr.c (pop_type_0): New function.
15827 (pop_type): Use pop_type_0.
15828 * java-tree.h (pop_type_0): New declaration.
15829 * verify.c (verify_jvm_instructions): Check return instructions.
15830
b399dcd2
PB
15831 * parse.y (patch_binop): Don't fold if non-constant and emiting
15832 class files.
15833
62c9aa5f 158341999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4f65832d
KG
15835
15836 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15837
15838 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
15839 (main_jcf): Don't define.
15840 (process_file): Don't set `main_jcf'.
f6bbde28 15841
4f65832d
KG
15842 * java-tree.h (main_jcf): Don't declare.
15843
15844 * jcf-parse.c (main_jcf): Add static definition.
15845
15846 * lang.c (main_jcf): Don't define.
15847
62c9aa5f 158481999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4504ead1 15849
f6bbde28 15850 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
4504ead1 15851
f6bbde28 15852 * decl.c (copy_lang_decl): Likewise for `bcopy'.
4504ead1 15853
f6bbde28 15854 * jcf-depend.c: Include "config.h", not <config.h>.
4504ead1 15855
f6bbde28 15856 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
4504ead1
KG
15857 `bcopy' to PTR.
15858
f6bbde28 15859 * jcf-path.c: Include "config.h", not <config.h>.
4504ead1 15860
f6bbde28 15861 * lex.c: Don't include various system header files.
4504ead1
KG
15862 (java_init_lex): Cast the argument of `bzero' to PTR
15863
f6bbde28 15864 * parse-scan.y (java_push_parser_context): Likewise.
4504ead1 15865
f6bbde28 15866 * parse.y (java_push_parser_context): Likewise.
4504ead1
KG
15867 (patch_bc_statement): Match format specifier to variable argument.
15868
f6bbde28 15869 * xref.c: Don't include <stdio.h>.
4504ead1 15870
62c9aa5f 158711999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
d4370213
APB
15872
15873 * parse.y (struct parser_ctxt *ctxp): Now global.
15874 (declare_local_variables): Use WFL compound value for the
e64c46ce 15875 declaration source line value, when doing cross-referencing.
d4370213 15876
5877286e
TT
158771999-03-31 Tom Tromey <tromey@cygnus.com>
15878
15879 * gjavah.c (print_field_info): Allow constants of other types.
15880 (print_include): Generate include when new name is proper prefix
15881 of already printed name.
15882 (add_namelet): Likewise.
15883 (cxx_keyword_subst): New function.
15884 (print_method_info): Use it.
15885 (print_field_name): New function.
15886 (get_field_name): New function.
15887 (print_field_info): Use get_field_name and print_field_name.
15888
62c9aa5f 158891999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6a28cabc 15890
f6bbde28
ZW
15891 * Makefile.in (keyword.h): Generate using gperf language 'C', not
15892 'KR-C', so gperf uses the `const' keyword on strings.
6a28cabc 15893
f6bbde28 15894 * keyword.gperf (java_keyword): Const-ify a char*.
6a28cabc 15895
62c9aa5f 158961999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
1504b2b4
APB
15897
15898 * parse.y (patch_bc_statement): Fixed identation and a bogus
e64c46ce 15899 `printf' format.
1504b2b4 15900
62c9aa5f 159011999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
1504b2b4
APB
15902
15903 * parse.y (patch_assignment): Allow static variables in other
e64c46ce 15904 classes to be assigned.
1504b2b4 15905
62c9aa5f 159061999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
152f94fc
KG
15907
15908 * class.c (maybe_add_interface): Remove unused variable
15909 `interface_binfo'.
15910 (make_class_data): Use = for assignment, not ==. Likewise.
15911 (emit_register_classes): Remove unused variable `decl'.
15912
15913 * lex.c: Fix comment so as not to contain an embedded `/*'.
15914
15915 * verify.c (verify_jvm_instructions): Remove unused variable
f6bbde28 15916 `self_type'.
152f94fc 15917
62c9aa5f 159181999-03-27 Per Bothner <bothner@cygnus.com>
f1b0c0d8
PB
15919
15920 * parse.y (complete_loop_body): Rename to finish_loop_body.
e64c46ce 15921 (complete_labeled_statement): Rename to finish_labeled_statement.
f1b0c0d8
PB
15922 (complete_for_loop): Rename to finish_for_loop.
15923 (complete_method_declaration): Rename to finish_method_declaration.
15924
15925 * java-tree.h (continue_identifier_node): New global node.
15926 * decl.c: Define and initialize continue_identifier_node.
15927 * parse.y (generate_labeled_block): Remove - no longer needed.
15928 (build_loop_body): Use continue_identifier_node for continue block.
15929 (finish_labeled_statement): Also do pop_labeled_block actions.
15930 (java_complete_lhs): POP_LOOP even if error.
15931 (build_labeled_block): Special handling for continue_identifier_node.
15932 (patch_loop_statement): Re-organize.
15933 (patch_bc_statement): Re-write.
15934
62c9aa5f 159351999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
f099f336
APB
15936
15937 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
e64c46ce 15938 using a WFL compound value.
f099f336
APB
15939 * parse.y (xref.h): Include.
15940 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
e64c46ce 15941 WFL compound value.
f099f336 15942 (register_fields): Set WFL compound value to lineno if doing
e64c46ce 15943 xrefs.
f099f336 15944 (java_complete_expand_method): Call expand_xref if flag_emit_xref
e64c46ce 15945 is set.
f099f336
APB
15946 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15947 * xref.h (expand_xref): Prototype renamed from xref_generate.
15948
62c9aa5f 159491999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
f099f336
APB
15950
15951 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15952 (GET_CURRENT_BLOCK): New macro.
15953 * parse.y (current_static_block): New global variable.
15954 (method_body:): Define action.
15955 (complete_method_declaration): Set current_function_decl to NULL
e64c46ce 15956 when work on the current method is done.
f099f336
APB
15957 (declare_local_variables): Use GET_CURRENT_BLOCK.
15958 (java_method_add_stmt): Likewise.
15959 (java_complete_expand_method): Disable the use of `this' when
e64c46ce 15960 expanding <clinit>.
f099f336 15961 (enter_a_block): If no current method exist, use
e64c46ce 15962 current_static_block to link static initializer blocks.
f099f336 15963 (exit_block): Rewritten to use current_static_block when no current
e64c46ce 15964 method decl exists.
f099f336
APB
15965 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15966 (patch_return): Forbid the use of `return' in static initializers.
15967 (patch_throw_statement): Fixed indentation. Issue specific error
e64c46ce
AJ
15968 for uncaught thrown checked exception in static initializer
15969 blocks. Removed FIXME.
f099f336 15970
08dc830e
ZW
159711999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
15972
15973 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15974 Link gcj from gcc.o.
15975
62c9aa5f 159761999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
de0b553f
APB
15977
15978 * parse.y (find_applicable_accessible_methods_list): When dealing
e64c46ce
AJ
15979 with interface: ensure that a given interface or java.lang.Object
15980 are searched only once.
de0b553f 15981
62c9aa5f 159821999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9ee9b555
KG
15983
15984 * gjavah.c (print_c_decl): Remove unused argument `flags'.
15985
15986 * jcf-dump.c (print_access_flags): Add braces around if-else.
15987
15988 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15989 COMBINE_INPUTS.
15990
15991 * lex.c (build_wfl_node): Add static prototype.
15992
15993 * lex.h (build_wfl_node): Remove static prototype.
15994
15995 * parse.y: Include lex.c early enough to declare everything needed.
15996 Ensure calls to `build_wfl_node' pass the proper arguments.
15997 (create_class): Remove unused variable `super_decl'.
15998 (get_printable_method_name): Initialize variable `name'.
f6bbde28 15999
62c9aa5f 160001999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
8af456c8
APB
16001
16002 * Changelog: Fixed 1999-03-22 typos.
16003 * lang.c (lang_decode_option): Fixed typo in error string in the
e64c46ce 16004 XARG section.
8af456c8 16005
235acd35
APB
160061999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
16007
8af456c8 16008 * Makefile.in (JAVA_OBJS): Added entry xref.o.
235acd35
APB
16009 (xref.o): New rule.
16010 * java-tree.h (flag_emit_xref): Declared extern.
8af456c8 16011 * lang.c (xref.h): Included.
235acd35
APB
16012 (flag_emit_xref): New global variable.
16013 (lang_decode_option): Added support for -fxref.
16014 * xref.c: Created.
16015 * xref.h: Likewise.
16016
e541d2b1
MH
160171999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
16018
16019 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16020 linked with.
16021
62c9aa5f 160221999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4bcde32e
KG
16023
16024 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16025 $(srcdir)/../system.h and $(JAVA_TREE_H).
16026 (jcf-io.o): Depend on $(JAVA_TREE_H).
16027 (mangle.o): Likewise.
16028
16029 * check-init.c (check_cond_init): Add static prototype.
16030
16031 * class.c (build_java_method_type, hashUtf8String,
16032 make_field_value, get_dispatch_vector, get_dispatch_table,
16033 append_gpp_mangled_type, mangle_static_field): Likewise.
16034 (strLengthUtf8): Hide unused definition.
16035 (hashUtf8String): Const-ify.
16036 (make_field_value): Un-ANSI-fy.
16037
16038 * constants.c: Move inclusion of jcf.h above java-tree.h.
16039 (set_constant_entry, find_class_or_string_constant,
16040 find_name_and_type_constant, get_tag_node,
16041 build_constant_data_ref): Add static prototype.
16042
16043 * decl.c (push_jvm_slot, builtin_function,
16044 lookup_name_current_level): Likewise.
16045 (builtin_function): Const-ify.
16046
16047 * except.c (expand_start_java_handler, expand_end_java_handler):
16048 Add static prototype.
16049
16050 * expr.c (flush_quick_stack, push_value, pop_value,
16051 java_stack_swap, java_stack_dup, build_java_athrow,
16052 build_java_jsr, build_java_ret, expand_java_multianewarray,
16053 expand_java_arraystore, expand_java_arrayload,
16054 expand_java_array_length, build_java_monitor, expand_java_pushc,
16055 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16056 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16057 expand_compare, expand_test, expand_cond, expand_java_goto,
16058 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16059 expand_java_field_op, java_push_constant_from_pool): Likewise.
16060
16061 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16062 (build_java_arraynull_check): Mark parameters `node' and `type'
16063 with ATTRIBUTE_UNUSED.
16064 (note_label): Likewise for parameter `current_pc'.
16065 (expand_java_call, expand_java_ret): Hide unused definition.
16066
16067 * java-tree.h (make_class, build_constants_constructor,
16068 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16069 init_outgoing_cpool, register_class, emit_register_classes,
16070 java_layout_seen_class_methods): Prototype.
16071 (unicode_mangling_length): Const-ify.
16072 (append_gpp_mangled_name, append_gpp_mangled_classtype,
16073 emit_unicode_mangled_name, format_int, format_uint,
16074 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16075 jcf_print_utf8_replace, open_class): Prototype.
16076
16077 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
16078 <stdio.h>. Include tree.h/java-tree.h.
16079 (utf8_equal_string usage, process_class): Add static prototype.
16080 (open_class): Don't prototype this here.
16081 (utf8_equal_string): Match arguments to format specifiers.
16082 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16083 TABLE_SWITCH, disassemble_method): Likewise.
16084
16085 * jcf-io.c: Include tree.h/java-tree.h.
16086 (open_class, find_classfile, jcf_print_utf8,
16087 jcf_print_utf8_replace): Const-ify.
16088
16089 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16090 parse_class_file): Add static prototype.
16091 (find_in_current_zip): Match definition to existing static
16092 prototype.
f6bbde28 16093
4bcde32e
KG
16094 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16095 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16096 finish_jcf_block, define_jcf_label, get_jcf_label_here,
16097 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16098 write_chunks, adjust_typed_op, generate_bytecode_conditional,
16099 generate_bytecode_return, perform_relocations, init_jcf_state,
16100 init_jcf_method, release_jcf_state, generate_classfile):
e64c46ce 16101 Add static prototype.
4bcde32e
KG
16102 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16103 (make_class_file_name): Const-ify.
16104
16105 * jcf.h (find_classfile): Const-ify.
16106
16107 * jv-scan.c (reset_report): Remove prototype.
16108
16109 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16110 (error): Rewrite to allow varargs.
16111
16112 * lang.c (lang_f_options): Const-ify.
16113
16114 * lex.c (java_parse_escape_sequence): Add static prototype.
e64c46ce
AJ
16115 (java_allocate_new_line): Match definition to existing static
16116 prototype.
f6bbde28 16117
4bcde32e
KG
16118 * mangle.c Include tree.h/java-tree.h.
16119 (unicode_mangling_length, emit_unicode_mangled_name,
16120 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16121
16122 * parse.h (jdep_code): Remove trailing comma in enumeration.
16123 (java_get_line_col): Move prototype outside of !JC1_LITE test.
16124 (reset_report): Add prototype.
16125
16126 * verify.c (push_pending_label, merge_types): Add static
16127 prototypes.
16128
16129 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
f6bbde28 16130
1982388a
APB
161311999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16132
16133 * parse.y (find_applicable_accessible_methods_list): Extend the
16134 search to superinterfaces when relevant.
16135 (search_applicable_methods_list): New function.
16136
161371999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16138
16139 * class.c (unmangle_classname): Implemented stricter testing
16140 before setting the QUALIFIED_P flag on an identifier.
16141
62c9aa5f 161421999-03-16 Per Bothner <bothner@cygnus.com>
8fe57f78
PB
16143
16144 * parse.y (java_complete_lhs): Call force_evaluation_order
16145 after patch_newarray.
16146 (patch_binop): Don't call fold if there are side effects.
16147
642f15d1
APB
161481999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
16149
16150 * parse.y (java_stabilize_reference): Use save_expr instead of
16151 building a SAVE_EXPR node.
16152 (java_complete_lhs): Patch the resulting string of the `+='
16153 operator (if necessary) and complete the RHS after having built
16154 the cast.
16155
62c9aa5f 161561999-03-15 Per Bothner <bothner@cygnus.com>
c52016e4
PB
16157
16158 * class.c (make_class): Don't set CLASS_P here (because
16159 this function is also called by build_java_array_type).
16160 (push_class): Set CLASS_P here instead.
16161 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
16162
16163 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
16164 context. If the context is class, perfer "super" over "synchronized".
16165 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
16166
16167 * parse.y (create_class): Don't call parser_check_super here;
16168 it is not robust. Always wait until later.
16169
16170 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
16171 match what JDK 1.2 does), but don't set ACC_PUBLIC.
16172
62c9aa5f 161731999-03-13 Per Bothner <bothner@cygnus.com>
b911df12
PB
16174
16175 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
16176 * lex.h (UNGETC): Change misleading macro.
16177
2aa11e97
APB
161781999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16179
16180 * parse.y (java_stabilize_reference): Return NODE when patching a
16181 COMPOUND_EXPR.
16182 (java_complete_lhs): Put parenthesis around truth values.
16183
161841999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16185
16186 * class.c (layout_class_method): Don't make rtl for interface
16187 methods.
16188 * parse.h (GET_TYPE_NAME): New macro.
16189 * parse.y (if_then_statement:): Fixed indentation.
16190 (if_then_else_statement:): Likewise.
16191 (for_statement:): Fixed spacing.
16192 (try_statement:): Fixed indentation.
16193 (create_interface): Don't force interfaces to be abstract.
16194 (method_header): Abstract methods are OK in interfaces.
16195 (declare_local_variables): Fixed typo in comment.
16196 (java_complete_expand_method): Fixed indentation.
16197 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16198 non accessible fields.
16199 (java_stabilize_reference): New function.
16200 (java_complete_lhs): Fixed indentation. Use
67264b4f 16201 java_stabilize_reference in compound assignment. Insert the
2aa11e97
APB
16202 cast. If not processing `+' fix string constants before processing
16203 binop.
16204
62c9aa5f 162051999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7e21fe59
KG
16206
16207 * constants.c (find_class_or_string_constant): Cast variable `j'
e64c46ce 16208 to a `jword' when comparing against one.
7e21fe59
KG
16209
16210 * expr.c (java_lang_expand_expr): Remove unused variables
16211 `has_finally_p' and `op0'.
16212
16213 * gjavah.c (print_field_info): Cast a value to jint when comparing
16214 against one. Likewise for a jlong.
16215 (add_namelet): Likewise cast a `sizeof' to an int when comparing
16216 against a signed quantity.
f6bbde28 16217
7e21fe59
KG
16218 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16219 (print_signature): Don't needlessly dereference variable `str'
16220
16221 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16222 `max_locals' with ATTRIBUTE_UNUSED.
16223 (jcf_parse_class): Likewise for variable `index'.
16224
16225 * parse.h (reverse_jdep_list): Remove static prototype.
16226
16227 * parse.y (build_jump_to_finally): Remove prototype and definition.
16228 (reverse_jdep_list): Add static prototype.
16229
16230 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16231 `assignment' and `expr_decl'.
16232
16233 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16234
ecef190c
AH
162351999-03-12 Andrew Haley <aph@cygnus.com>
16236
16237 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
f6bbde28 16238 we'll need a directory separator and a null character.
ecef190c 16239
62c9aa5f 162401999-03-10 Per Bothner <bothner@cygnus.com>
2aee04d2
PB
16241
16242 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
16243
5f86874e 16244Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 16245
e64c46ce
AJ
16246 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16247 interfaces.
f6bbde28 16248
62c9aa5f 162491999-03-05 Per Bothner <bothner@cygnus.com>
30ca27b4
PB
16250
16251 * lex.c (java_parse_end_comment): Take extra parameter (next char).
16252
16253 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
16254
16255 * class.c (layout_class_method): A static method in a base class
16256 is never overridden, so treat it like it doesn't exist.
16257 However, do complain about private non-static method overriding
16258 public static method.
16259
16260 * parse.y: Don't set unused INITIALIZED_P flag.
16261 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
16262
16263 * parse.y (find_expr_with_wfl): Optimize tail-calls.
16264 (build_array_from_name): Re-order &index[string] to &string[index].
16265
2aa11e97 16266 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
30ca27b4
PB
16267 error_mark (it might catch more errors, but it is more likely to lose).
16268
62c9aa5f 162691999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8e1f2d4c
KG
16270
16271 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16272 (parse-scan.o): Depend on toplev.h.
16273
16274 * class.c (make_method_value): Add prototype. Make it static.
e64c46ce 16275 Remove unused second argument, caller changed.
8e1f2d4c
KG
16276
16277 * expr.c (java_lang_expand_expr): Remove unused variable
16278 `return_label'.
16279
16280 * java-tree.h: Don't prototype find_in_current_zip.
16281 Add prototypes for verify_constant_pool, start_java_method,
16282 end_java_method, give_name_to_locals, expand_byte_code,
16283 open_in_zip, set_constant_value, find_constant1, find_constant2,
16284 find_utf8_constant, find_string_constant, find_class_constant,
16285 find_fieldref_index, find_methodref_index, write_constant_pool,
16286 count_constant_pool_bytes and encode_newarray_type.
16287
16288 * jcf-dump.c: Remove unused variable `LONG_temp'.
16289
16290 * jcf-parse.c: Include parse.h.
16291 (jcf_parse_source): Remove unused parameter, all callers changed.
16292 (jcf_figure_file_type): Add static prototype.
16293 (find_in_current_zip): Likewise. Also remove unused parameter,
16294 all callers changed.
16295 (read_class): Initialize variable `saved_pos'.
f6bbde28 16296
8e1f2d4c
KG
16297 * jcf-reader.c (jcf_parse_preamble): Mark variables
16298 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16299
16300 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16301 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16302 (java_parse_doc_section): Initialize variable `seen_star'.
16303 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16304 (java_lex_error): Mark parameters `msg' and `forward' with
16305 ATTRIBUTE_UNUSED.
16306 (java_get_line_col): Mark parameters `filename' and `line' with
16307 ATTRIBUTE_UNUSED.
16308
16309 * parse-scan.y: Include toplev.h.
16310 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16311
16312 * parse.h: use `struct JCF', not plain `JCF'.
16313 (java_parser_context_save_global, java_expand_classes
16314 java_parser_context_restore_global, java_parse): Add prototypes.
16315
16316 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16317 `node'.
16318
62c9aa5f 163191999-02-24 Per Bothner <bothner@deneb.cygnus.com>
afe81dd6
PB
16320
16321 * check-init.c (check_init): COPYN takes word count, not bit count.
16322
62c9aa5f 163231999-02-26 Per Bothner <bothner@cygnus.com>
2d9e5c79
PB
16324
16325 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
16326 explicit build_decl. (Avoids crash in reload when optimizing.)
16327
62c9aa5f 163281999-02-25 Per Bothner <bothner@cygnus.com>
2d9e5c79
PB
16329
16330 * decl.c (complete_start_java_method): Handle synchronized method
16331 even when compiling from bytecode.
16332
f3d50f42
TT
163331999-02-26 Tom Tromey <tromey@cygnus.com>
16334
686fb236
TT
16335 * gjavah.c (add_class_decl): Only generate `#include' if outer
16336 class is not the name of the class we are processing. Correctly
16337 append `.h' in #include.
16338 (process_file): Clean up newlines around generated `#include's.
16339 (decode_signature_piece): Correctly handle inner classes.
16340 (struct include): New structure.
16341 (all_includes): New global.
16342 (print_include): New function.
16343 (add_class_decl): Use it.
16344 (process_file): Likewise.
16345 (add_class_decl): Generate include for java-array.h if array
16346 seen.
16347 (process_file): Don't generate java-array.h include.
16348
f3d50f42
TT
16349 * gjavah.c (add_namelet): Check for standard package names here.
16350 (add_class_decl): Don't check for standard package names here.
16351
345137c7
TT
163521999-02-25 Tom Tromey <tromey@cygnus.com>
16353
16354 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16355 When reading a zip file, only use strncmp if both strings are
16356 bigger than the buffer length. Initialize `k' when looping
16357 through zip file.
16358
bdb59aec
TT
163591999-02-24 Tom Tromey <tromey@cygnus.com>
16360
16361 * gjavah.c (struct namelet): New structure.
16362 (add_namelet): New function.
16363 (print_namelet): New function.
16364 (print_class_decls): Use add_namelet and print_namelet to generate
16365 namespaces and not classes.
16366 (method_printed): New global.
16367 (HANDLE_END_METHOD): Examine method_printed.
16368 (print_method_info): Set method_printed when required. Print
16369 error if function to be ignored is marked virtual. Handle $finit$
16370 method.
16371 (METHOD_IS_FINAL): New macro.
16372 (print_field_info): Use it.
16373 (HANDLE_METHOD): Clear method_printed.
16374 (method_pass): New global.
16375 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16376 (process_file): Do two passes over both fields and methods.
16377 (HANDLE_METHOD): Examine method_pass.
16378 (root): New global.
16379 (add_class_decl): New function.
16380 (print_class_decls): Don't scan over entire constant pool.
16381
4e2e5821
TT
163821999-02-23 Tom Tromey <tromey@cygnus.com>
16383
16384 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16385 disable linking in that case.
16386
a3299934
TT
163871999-02-20 Tom Tromey <tromey@cygnus.com>
16388
16389 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16390 not 0x1f.
16391
62c9aa5f 163921999-02-21 Per Bothner <bothner@cygnus.com>
edd643a9 16393
92ada242
PB
16394 * decl.c (build_result_decl), java-tree.h: New method.
16395 (complete_start_java_method): Handle synchronized methods.
16396 Don't build DECL_RESULT here. (Ordering dependency problem.)
16397 (start_java_method): Call build_result_decl here instead ...
16398 * parse.y (java_complete_expand_method): ... and here.
16399 (expand_start_java_method): Don't call complete_start_java_method here.
16400 (java_complete_expand_method): Call it here instead.
16401 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
16402 * java-tree.h: ... here.
16403
16404 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
16405 * parse.y (java_complete_lhs): Don't call force_evaluation_order
16406 for ARRAY_REF - it doesn't work when array bounds are checked.
16407 (patch_array_ref): Handle it here instead.
16408
edd643a9
PB
16409 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
16410
62c9aa5f 164111999-02-19 Per Bothner <bothner@cygnus.com>
419ff8e1
PB
16412
16413 Force left-to-right evaluation of binary operations etc.
16414 * expr.c (force_evaluation_order), java-tree.h: New function.
16415 * parse.y (java_complete_lhs): Pass binary operations, procedure
16416 calls, and ARRAY_REFs to force_evaluation_order.
16417 (various): Set TREE_SIDE_EFFECTS more carefully.
16418
16419 Tolerate random (non-UTF8) encoding in comments without complaining.
16420 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
16421 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
16422
16423 * parse.y (resolve_qualified_expression_name): Handle error_mark.
16424 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
16425
16426 * parse.y (java_complete_lhs): Ignore an empty statement in a
16427 COMPOUND_EXPR. Don't complain about empty statement after return.
f6bbde28 16428
62c9aa5f 164291999-02-19 Per Bothner <bothner@cygnus.com>
04ed7a0c
PB
16430
16431 * parse.y (obtain_incomplete_type): Don't wrap unknown types
16432 in TREE_LIST - just chain the POINTER_TYPEs together.
16433 (resolve_class): If type already resolved, return decl.
16434 After resolving, update TREE_TYPE(class_type), and name (if array).
f6bbde28 16435 * parse.h (do_resolve_class), parse.y: Make non-static.
04ed7a0c
PB
16436 * class.c (maybe_layout_super_class): Take this_class argument.
16437 Do do_resolve_class if necessary.
16438 (layout_class, layout_class_methods): Adjust calls appropriately.
16439 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16440 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
16441 * typeck.c (build_java_array_type): Don't call layout_class.
16442
62c9aa5f 164431999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
fad22e3b
APB
16444
16445 * parse.y (check_pkg_class_access): Allow private class access
e64c46ce 16446 within the same package.
fad22e3b
APB
16447 (strip_out_static_field_access_decl): New function.
16448 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
e64c46ce 16449 operator argument before testing its nature.
fad22e3b 16450
62c9aa5f 164511999-02-03 Per Bothner <bothner@cygnus.com>
ececaeae
PB
16452
16453 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
16454 (TRY_EXPR): Simplify - it no longer has a finally clause.
16455 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
16456 Simpler handling of TRY_EXPR, which no longer has a finally clause.
16457 * expr.c (java_lang_expand_expr): Likewise.
16458 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
16459 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
16460 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
16461 (build_try_statement): Remove finally parameter and handling.
16462 (build_try_finally_statement): New function.
16463 (patch_try_statement): No longer need to support finally clause.
16464 (try_statement): Update grammar action rules.
16465 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
16466 Simpler handling of TRY_EXPR, which no longer has a finally clause.
16467
43c5ec70
AH
164681998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
16469
16470 * jcf-parse.c (get_constant): Add braces around computation of 'd'
16471 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
16472
7e57923c
AH
164731999-02-17 Andrew Haley <aph@cygnus.com>
16474
16475 * class.c (build_utf8_ref): Back out broken patch which was
f6bbde28 16476 intended to to output signatures using '.' as a separator.
7e57923c 16477
f6bbde28
ZW
16478 * class.c (make_class_data): Output signatures using '.' as a
16479 separator, rather than '/'.
16480 (mangled_classname): Likewise.
16481 (make_field_value): Likewise.
16482 (make_method_value): Likewise.
16483 * constants.c (alloc_class_constant): Likewise.
16484 * expr.c (build_invokeinterface): Likewise.
7e57923c 16485
62c9aa5f 164861999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 16487
e64c46ce
AJ
16488 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16489 of an ancient workaround.
e3884b71 16490
62c9aa5f 164911999-02-10 Jeffrey A Law (law@cygnus.com)
e860aea3
JL
16492
16493 * jvspec.c (xmalloc): Kill the prototype. It does not belong
16494 here anymore.
16495
fa2bb9fd 164961999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 16497
fa2bb9fd
APB
16498 * lex.c (yylex): Encode \0 as UTF8.
16499
0ffe9eea
TT
165001999-02-10 Tom Tromey <tromey@cygnus.com>
16501
00368bdd
TT
16502 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16503 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16504 (libgcj_zip): Renamed.
16505 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16506 LIBJAVA_ZIP_FILE.
16507 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16508
0ffe9eea
TT
16509 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16510 (GC_NAME): Renamed -lgc to -lgcjgc.
16511
62c9aa5f 165121999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
09ed0f70
APB
16513
16514 * lex.c (java_lang_cloneable): Initialize.
16515 * parse.y (java_lang_cloneable): New static variable.
16516 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
e64c46ce 16517 doing one more qualification round.
09ed0f70 16518 (valid_ref_assignconv_cast_p): Reject null source or
e64c46ce 16519 destination. Allow an array to be cast into java.lang.Cloneable.
09ed0f70 16520 (patch_cast): Swapped two first arguments to first call to
e64c46ce 16521 valid_ref_assignconv_cast_p.
09ed0f70 16522
62c9aa5f 165231999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
34f4db93
APB
16524
16525 * parse.h: DECL_P renamed JDECL_P.
f6bbde28
ZW
16526 * parse.y: DECL_P replaced by JDECL_P.
16527 (build_array_from_name): Always use pointer's type.
16528 (patch_bc_statement): Extra code to search continue target in a
16529 for loop. Fixed comments. Continue target is current loop when
16530 unlabeled.
34f4db93 16531
93089423
AH
165321999-02-05 Andrew Haley <aph@cygnus.com>
16533
16534 * class.c (make_class_data): The superclass of an interface should
16535 be null, not class Object.
16536
16537 * lex.c (java_lex): Sign extend hex literals.
16538
954d8a5d
AH
165391999-02-04 Andrew Haley <aph@cygnus.com>
16540
16541 * class.c (build_utf8_ref): Output signatures using '.' as a
16542 separator, rather than '/'.
16543 (make_class_data): Likewise.
16544
62c9aa5f 165451999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
3204fae4 16546
f6bbde28
ZW
16547 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16548 mkstemp.o. Get them from libiberty now.
3204fae4 16549
62c9aa5f 165501999-02-02 Jeffrey A Law (law@cygnus.com)
6d6dbe51
JL
16551
16552 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16553
62c9aa5f 165541999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
b0f780c3
KG
16555
16556 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
e64c46ce 16557 from libiberty.h
b0f780c3 16558
62c9aa5f 165591999-02-02 Per Bothner <bothner@cygnus.com>
bb31662f
PB
16560
16561 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16562 * jcf-write.c (generate_bytecode_return): New function.
16563 (generate_bytecode_insns): Use it, for RETURN_EXPR.
16564
16565 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
16566 generate special [fd]const_[01] instructions.
f6bbde28 16567
bb31662f
PB
16568 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
16569
16570 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
16571 handling OPCODE_lookupswitch or OPCODE_tableswitch.
16572
62c9aa5f 165731999-02-01 Per Bothner <bothner@cygnus.com>
f044fba9
PB
16574
16575 * parse.y (patch_method_invocation): Handle calling static methods,
16576 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16577
16578 * parse.y (java_complete_lhs): Don't complain about unreachable
16579 exit condition in a do-while statement.
f6bbde28 16580
62c9aa5f 165811999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
acd663ee
APB
16582
16583 * lex.c (java_read_char): Fixed utf8 decoding.
16584 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
e64c46ce 16585 range.
acd663ee 16586 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
e64c46ce
AJ
16587 comments. Local variable `all_primitive' is gone. Broadened
16588 acceptance of `0' to floating point targets. `long' can now be
16589 widened to `double' or `float'.
acd663ee 16590 (valid_method_invocation_conversion_p): Added leading
e64c46ce 16591 comment. Fixed tabulation.
acd663ee 16592 (build_string_concatenation): Optimize out left or right empty
e64c46ce 16593 string constants.
f044fba9 16594
62c9aa5f 165951999-01-28 Per Bothner <bothner@cygnus.com>
36be4b99
PB
16596
16597 * jcf-write.c (localvar_alloc): Only emit entry for
16598 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16599 (generate_bytecode_insns): Only call put_linenumber if
16600 debug_info_level > DINFO_LEVEL_NONE.
16601 * jvspec.c (lang_specific_driver): If no -O* or -g* option
16602 is specified, add -g1 (for compatibility wih javac).
16603
62c9aa5f 166041999-01-28 Hans-Peter Nilsson <hp@axis.se>
9594b1b2
HPN
16605
16606 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16607 gjavah.o, check-init.o, jv-scan.o
16608
62c9aa5f 166091999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9caaf519
KG
16610
16611 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16612
16613 * gjavah.c: Include config.h and system.h.
16614
16615 * javaop.h (inline): Don't define, its handled by system.h.
16616 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16617 from `inline' to `static inline'.
16618
16619 * jcf.h (inline): Don't define, its handled by system.h.
16620
16621 * lex.c (inline): Likewise.
16622
62c9aa5f 166231999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
ba140e41
ZW
16624
16625 * lang-specs.h: Map -Qn to -fno-ident.
16626
62c9aa5f 166271999-01-29 Richard Henderson <rth@cygnus.com>
4c7f1c63
RH
16628
16629 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16630
061ac426
TT
166311999-01-29 Tom Tromey <tromey@cygnus.com>
16632
16633 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16634 then cast it to Object before calling `append' method.
16635
62c9aa5f 166361999-01-28 Per Bothner <bothner@cygnus.com>
f2693f2f
PB
16637
16638 * check-init.c (check_bool2_init, check_bool_init, check_init):
16639 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16640 * jcf-write.c (generate_bytecode_insns): Likewise.
16641
62c9aa5f 166421999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
0b4d333e
APB
16643
16644 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16645 * parse.y (patch_cast): Allow a boolean to be cast into a
e64c46ce 16646 boolean.
0b4d333e 16647
62c9aa5f 166481999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
0b4d333e
APB
16649
16650 * parse.y: (class_declaration:): Fixed indentation.
16651 (class_member_declaration:): Extra `;' after field declaration now
e64c46ce 16652 accepted.
0b4d333e
APB
16653 (interface_declaration:): Removed debug messages in error reports.
16654 (patch_binop): Nodes created and returned inherit the orignal
e64c46ce 16655 node's COMPOUND_ASSIGN_P flag value.
0b4d333e
APB
16656 (patch_cast): Fix cast from char to floating point.
16657
62c9aa5f 166581999-01-25 Andrew Haley <aph@cygnus.com>
1b18747f 16659
f6bbde28
ZW
16660 * except.c, java-except.h (expand_resume_after_catch): new
16661 function.
16662 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16663 to branch back to main flow of control after a catch block.
1b18747f 16664
62c9aa5f 166651999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
d4476be2
KG
16666
16667 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16668 $(srcdir)/../system.h.
16669 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16670 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16671 (jcf-write.o): Likewise.
16672 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16673 (mangle.o): Depend on $(srcdir)/../toplev.h.
16674 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16675 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16676
16677 * class.c: Include output.h and parse.h.
16678 (mangled_classname): Add the `const' keyword to a char*.
16679 (find_named_method): Hide unused function definition.
16680 (build_utf8_ref): Change type of variable `c' to unsigned char.
16681 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16682 (build_class_ref): Add the `const' keyword to a char*.
16683 (layout_class_method): Remove unused variable `buf'.
16684
16685 * decl.c (find_local_variable): Remove unused variable `rtl'.
16686 (pushdecl): Likewise for variables `different_binding_level' and
16687 `oldglobal'.
16688 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16689 (maybe_build_cleanup): Likewise for parameter `decl'.
16690
16691 * except.c (expand_start_java_handler): Mark parameter `range'
16692 with ATTRIBUTE_UNUSED.
16693
16694 * expr.c: Include except.h.
16695 (pop_type): Remove unused variable `i'.
16696 (pop_value): Likewise for variables `n_words' and `i'.
16697 (expand_java_arrayload): Likewise for variable `convert'.
16698 (java_lang_expand_expr): Likewise for variables `op0', `type',
16699 `mode', `unsignedp', `node' and `elements'.
16700 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16701 `eh_ranges'.
16702 (process_jvm_instruction): Add a `const' qualifier to a char*.
16703
16704 * gjavah.c (output_directory): Add the `const' keyword to a char*.
16705 (temp_directory): Likewise.
16706 (print_c_decl): Likewise.
16707 (print_method_info): Likewise.
16708 (decode_signature_piece): Likewise.
16709 (print_mangled_classname): Likewise.
16710
16711 * java-except.h: Provide prototypes for maybe_start_try,
16712 maybe_end_try and add_handler.
16713
16714 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16715 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
16716 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16717 init_expr_processing, push_super_field, init_class_processing,
16718 can_widen_reference_to, class_depth, verify_jvm_instructions,
16719 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16720 set_local_type, merge_type_state, push_type, load_type_state,
16721 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16722 emit_unicode_mangled_name): Add prototypes.
16723
16724 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16725 (print_signature_type): Use ISDIGIT, not isdigit.
16726 (print_signature): Remove unused variable `j'.
16727
16728 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16729 int when comparing against one.
16730
16731 * jcf-parse.c: Include toplev.h.
16732
16733 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
16734 (localvar_free): Remove unused variable `i'.
16735 (generate_bytecode_conditional): Likewise for variable `kind'.
16736
16737 * jv-scan.c: Include config.h and system.h. Remove redundant
16738 OS header and gansidecl.h includes.
16739 (warning): Add the `const' keyword to a char*. Also add
16740 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
16741 __STDC__, when determining whether to use ANSI-isms.
16742 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
16743 (xmalloc): Don't redundantly prototype here.
16744 (main): Remove unused parameter `envp'. Also fix the arguments
16745 passed to function `fatal' to match the format specifier.
16746
16747 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16748
16749 * mangle.c: Include toplev.h.
16750 (emit_unicode_mangled_name): Declare parameter `len'.
16751
16752 * parse.y (parse_warning_context): Add the `const' keyword to a
16753 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
16754 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16755 (issue_warning_error_from_context): Add the `const' keyword to
16756 a char*.
16757 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
16758 not `__STDC__' for whether to use ANSI-isms.
16759
16760 * typeck.c (incomplete_type_error): Mark parameters `value' and
16761 `type' with ATTRIBUTE_UNUSED.
16762 (parse_signature_type): Use ISDIGIT, not isdigit.
16763
16764 * verify.c (check_pending_block): Add the `const' keyword to a char*.
16765 (verify_jvm_instructions): Likewise. Remove unused variables
16766 `field_name' and `default_val'.
f6bbde28 16767
d4476be2
KG
16768 * zextract.c: Include config.h and system.h. Remove redundant
16769 OS header includes.
f6bbde28 16770
d4476be2
KG
16771 * zipfile.h: Prototype `read_zip_archive'.
16772
62c9aa5f 167731999-01-21 Andrew Haley <aph@cygnus.com>
fff02f07
AH
16774
16775 * typeck.c (convert): Allow conversions to void type: some
e64c46ce 16776 optimizations in gcc do this.
fff02f07 16777
62c9aa5f 167781999-01-21 Andrew Haley <aph@cygnus.com>
fff02f07
AH
16779
16780 * typeck.c (convert_ieee_real_to_integer): New function.
16781 (convert): When not using fast-math and using hardware fp, convert
e64c46ce 16782 an IEEE NaN to zero.
f6bbde28 16783
73333a87
AH
167841999-01-18 Andrew Haley <aph@cygnus.com>
16785
16786 * parse.y (patch_binop): Do a type conversion from signed to
16787 unsigned and then back to signed when a ">>>" is found.
16788
62c9aa5f 167891999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
d8fccff5
APB
16790
16791 * java-tree.h: (check_for_initialization): Added prototype.
16792 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16793 * parse.y (do_resolve_class): Removed unused locals.
16794 (read_import_dir): Likewise.
16795 (resolve_qualified_expression_name): Array creation
e64c46ce 16796 expressions are valid primary expressions.
d8fccff5
APB
16797 (qualify_ambiguous_name): Likewise.
16798 (patch_synchronized_statement): Removed unused local.
16799
62c9aa5f 168001999-01-17 Jeffrey A Law (law@cygnus.com)
82770562 16801
ef2b940d
JL
16802 * Makefile.in (zextract.o): Add dependencies.
16803
f6bbde28 16804 * Makefile.in: Do not put ^Ls at the start of a line.
82770562 16805
62c9aa5f 168061999-01-15 Per Bothner <bothner@cygnus.com>
2a4dc31b
PB
16807
16808 * expr.c (process_jvm_instruction): Coerce to correct Throwable
16809 sub-type the result of the call that gets the exception value.
16810
16811 * parse.y (java_complete_expand_methods): If flags_syntax_only,
16812 don't call finish_class.
16813
16814 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
16815 clear found before continuing.
16816
16817 * verify.c (verify_jvm_instructions): On an array load, allow
16818 and handle top of stack to be TYPE_NULL.
16819
16820 * gjavah.c (generate_access): Translate Java package private or
16821 protected access to C++ public, but with a comment.
16822
96847892
AH
168231999-01-13 Andrew Haley <aph@cygnus.com>
16824
16825 * expr.c (generate_name): Name prefix changed to avoid clashes
16826 with assembler temp labels.
16827
16828 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
67264b4f 16829 MODIFY_EXPR. Without this, code for the assignment may not be
96847892
AH
16830 generated at all and the synchronized statement will read an
16831 uninitialized variable.
f6bbde28 16832
62c9aa5f 168331999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
ba179f9f
APB
16834
16835 * class.c (maybe_layout_super_class): Fixed returned value.
16836 * lex.c: Added 1999 to the copyright.
16837 (java_init_lex): Initialize java_lang_imported.
16838 * lex.h: Added 1999 to the copyright.
16839 * parse.h: Added 1999 to the copyright.
16840 (REGISTER_IMPORT): Fixed typo in trailing macro.
16841 (CURRENT_OSB): New macro.
16842 (struct parser_ctxt): New fields osb_depth, osb_limit.
16843 * parse.y (java_lang_id): New global variable.
16844 (type_import_on_demand_declaration): Don't import java.lang.* twice.
16845 (array_creation_expression:): Use CURRENT_OSB.
16846 (dims:): Uses a stack to keep track of array dimensions.
16847 (cast_expression:): Use CURRENT_OSB.
16848 (find_expr_with_wfl): Return NULL if node found doesn't meet the
e64c46ce 16849 conditions.
ba179f9f
APB
16850 (register_fields): Fixed typos in comment.
16851 (check_method_redefinition): Fixed comment indentation.
16852 (java_check_regular_methods): Set saved found wfl to NULL after
e64c46ce 16853 having reinstalled it in the previously found DECL_NAME.
ba179f9f 16854
62c9aa5f 168551999-01-10 Richard Henderson <rth@cygnus.com>
b6186fe6
RH
16856
16857 * gjavah.c (java_float_finite): Use a union to do type punning.
16858 (java_double_finite): Likewise.
16859
62c9aa5f 168601999-01-09 Per Bothner <bothner@cygnus.com>
fe053cfc
PB
16861
16862 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
16863 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16864 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
16865 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
16866 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16867 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
16868
62c9aa5f 168691999-01-08 Per Bothner <bothner@cygnus.com>
b82daa87
PB
16870
16871 * check-init.c (check_init): If compiling to native, we don't
16872 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
16873
5c280133
TT
168741999-01-08 Tom Tromey <tromey@cygnus.com>
16875
16876 * parse-scan.y (variable_declarator_id): Set or increment
16877 bracket_count.
16878 (bracket_count): New global.
16879 (formal_parameter): Handle case where bracket pairs trail variable
16880 declarator id.
16881
5e1db167
AH
168821999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
16883
16884 * jcf-parse.c (yyparse): variable len changed from a char to an
16885 int to prevent overflow.
16886
62c9aa5f 168871999-01-06 Per Bothner <bothner@cygnus.com>
db84cc46
PB
16888
16889 * java-tree.h: Declare read_class.
16890 * jcf-parse.c (read_class): New function.
16891 (load_class): Now just call read_class.
16892
16893 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
16894 * jcf-parse.c (parse_source_file): Declare save_error_count,
16895 which is needed by java_parse_abort_on_error macro,
16896 * parse.y (java_layout_classes, java_expand_classes): Likewise.
16897
16898 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
16899 constructor, if initializing a static field.
16900 (patch_new_array_init): Set TREE_CONSTANT if it is.
16901 * expr.c (java_lang_expand_expr): For a static array constructor
16902 of primitive elements, allocate the array itself statically.
16903 Disabled until we can set the vtable field statically.
f6bbde28 16904
db84cc46
PB
16905 * check-init.c: New file. Checks for definite assignment.
16906 * Makefile.in (JAVA_OBJS): Add check-init.o.
16907 * parse.y (java_complete_expand_method): Call check_for_initialization.
16908 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
16909
62c9aa5f 169101999-01-06 Graham <grahams@rcp.co.uk>
8c4ea1fd
GS
16911
16912 * parse.y : include system.h instead of including
16913 standard headers directly with the exception of <dirent.h>.
16914
62c9aa5f 169151999-01-06 Per Bothner <bothner@cygnus.com>
0d34ccb7
PB
16916
16917 * lex.h: Moved static function declarations to lex.c,
16918 to shut up some -Wall warnings.
16919 * lex.c: Static function declarations moved here.
16920 * jcf-dump.c: Small fixes to shut up -Wall warnings.
16921
62c9aa5f 169221999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5b5d821c 16923
f6bbde28 16924 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
5b5d821c 16925
62c9aa5f 169261998-12-22 Per Bothner <bothner@cygnus.com>
e402ca98
PB
16927
16928 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
16929 * verify.c (verify_jvm_instructions): Fix off-by-one error.
16930
16931 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
16932 (localvar_alloc): Change return type to void,
16933 (emit_unop): Remove unused variable size.
f6bbde28 16934
e402ca98
PB
16935 * jcf-write.c (struct jcf_block): Add new union.
16936 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
16937 (call_cleanups): New functions.
16938 (struct jcf_partial): New fields num_finalizers and return_value_decl.
16939 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
16940 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16941 * lang.c (lang_init): Call using_eh_for_cleanups.
16942 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
16943 completing operands to patch_synchronized_statement.
16944 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16945 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
f6bbde28 16946 WITH_CLEANUP_EXPR instead of TRY_EXPR.
e402ca98 16947
62c9aa5f 169481998-12-20 John F. Carr <jfc@mit.edu>
62481348
JC
16949
16950 * Make-lang.in: Comment out control-Ls; they upset some makes.
16951
847fe791
TT
169521998-12-18 Tom Tromey <tromey@cygnus.com>
16953
16954 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16955 consistently.
16956
d5ff227d
TT
169571998-12-17 Tom Tromey <tromey@cygnus.com>
16958
fa322ab5
TT
16959 * parse.y (DIR_SEPARATOR): New define.
16960 (check_class_interface_creation): Use it.
16961
d5ff227d
TT
16962 * parse-scan.y (report_main_declaration): Recognize
16963 `java.lang.String' in argument to main.
16964
62c9aa5f 169651998-12-16 Per Bothner <bothner@cygnus.com>
83a86272
PB
16966
16967 * parse.y (create_interface): Remove bogus test.
16968
62c9aa5f 169691998-12-16 Per Bothner <bothner@cygnus.com>
f868ca8f
PB
16970
16971 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
16972 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
16973
0252081c
TT
169741998-12-16 Tom Tromey <tromey@cygnus.com>
16975
16976 * parse-scan.y (qualified_name): Use correct sprintf format.
16977
06d84d69
TT
169781998-12-15 Tom Tromey <tromey@cygnus.com>
16979
16980 * gjavah.c (print_field_info): Changed how most negative number is
16981 printed.
16982
62c9aa5f 169831998-12-14 Per Bothner <bothner@cygnus.com>
659ad450
PB
16984
16985 * parse.y (fold_constant_for_init): New function.
16986 (resolve_expression_name): Don't replace static final
e64c46ce 16987 constant-initialized fields by its value.
659ad450
PB
16988 (java_complete_lhs): New. Same as java_complete_tree, except does
16989 not replace static final constant-initialized fields by their values.
16990 (register_fields): If there is an initializer, set DECL_INITIAL and
16991 MODIFY_EXPR_FROM_INITIALIZATION_P.
16992 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
16993 Only call patch_initialized_static_field if
16994 MODIFY_EXPR_FROM_INITIALIZATION_P.
16995 (patch_initialized_static_field): If not valid constant, clear
16996 DECL_INITIAL.
16997
16998 * parse.y (lookup_field_wrapper): Fix thinko.
16999
17000 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
17001 set and restore global lineno.
17002
11b89622
TT
170031998-12-14 Tom Tromey <tromey@cygnus.com>
17004
17005 * gjavah.c (print_field_info): If value to print is the smallest
17006 value of its size, then print as hex to avoid later warnings from
17007 C++ compiler.
17008
8c2dfb32
TT
170091998-12-14 Tom Tromey <tromey@cygnus.com>
17010
17011 * gjavah.c (decompile_method): Decompile `return null'.
17012 (process_file): Generate `#pragma interface'.
17013 (method_declared): New global.
17014 (print_method_info): Set it.
17015 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17016 (print_method_info): Handle abstract methods.
17017
62c9aa5f 170181998-12-13 Per Bothner <bothner@cygnus.com>
ba02c53a
PB
17019
17020 * parse.y (patch_method_invocation): If class_decl is null
17021 (e.g. an array type), use original type.
17022
17023 * parse.y (check_thrown_exceptions): Temporary hack to suppress
17024 errors about uncaught exception from clone (of array, specifically).
17025
cb975f38
TT
170261998-12-13 Tom Tromey <tromey@cygnus.com>
17027
17028 * gjavah.c (decompile_method): Handle all types of `return'
17029 opcode. Decompile `return this' and `return'.
17030 (method_access): New global.
17031 (print_method_info): Set it.
17032 (decompile_method): Don't decompile a synchronized method.
17033
92c068d1
TT
170341998-12-13 Tom Tromey <tromey@cygnus.com>
17035
17036 * jcf-reader.c (jcf_parse_one_method): Recognize
17037 HANDLE_END_METHOD.
17038 * gjavah.c (HANDLE_END_METHOD): New macro.
17039 (HANDLE_CODE_ATTRIBUTE): New macro.
17040 (decompile_method): New function.
17041 (print_method_info): Don't print `;\n' at end of function decl.
17042 Include java-opcodes.h.
17043 (decompiled): New global.
17044
62c9aa5f 170451998-12-12 Per Bothner <bothner@cygnus.com>
0b245181
PB
17046
17047 * class.c (build_class_ref): Handle PRIMTYPE.class if
17048 flag_emit_class_files.
17049 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
17050 if flag_emit_class_files.
17051 * parse.y (java_complete_tree): Pre-liminary support for
17052 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17053
17054 * parse.y (patch_synchronized_statement): Don't call monitorexit
e64c46ce 17055 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
0b245181
PB
17056
17057 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
17058
17059 * zipfile.h (opendir_in_zip): New declaration.
17060 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
17061 (opendir_in_zip): New function, using code from open_in_zip.
17062 (open_in_zip): Call opendir_in_zip.
17063 (find_class): Remove no-longer-used do_class_file parameter,
17064 but add source_ok parameter. Change logic so if we find a .java file,
17065 we don't look for .class in later classpath emtries.
17066 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
17067 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
17068 * gjavah.c: Update call to find_class.
17069 * jcf-dump.c: Likewise.
17070
17071 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
17072 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
17073 nothing if body is empty_stmt_node.
17074 Various little fixes so SP gets correctly adjusted.
17075 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17076 For CALL_EXPR, test if static first.
17077 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
17078 such as the ones we create for Object and Class.
17079 Set and restore current_function_decl.
17080 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17081 (note_possible_classname): New function.
17082 (read_import_entry): Removed. Merged with read_import_dir.
17083 (read_import_dir): Don't call find_class - that only gives us
17084 the first classpath entry having the needed package.
17085 Use the struct buffer data structure from buffer.h.
17086 (read_import_dir, find_in_imports_on_demand): The remembered
17087 class names now use '.' (not '/') as package separator.
17088
17089 * parse.y (java_complete_expand_methods): Call write_classfile
17090 here, and not in java_expand_classes (which only gets first class).
17091
62c9aa5f 170921998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
1287b91a
APB
17093
17094 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
17095 (register_fields): If a static fields has an initializer, just
17096 chain it on ctxp->static_initialized, and handle later.
17097 (java_complete_expand_methods): Force <clinit> first.
17098 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
17099 - it's already been completed.
17100 (patch_initialized_static_field): New function.
17101 (java_complete_field): Call it.
17102
62c9aa5f 171031998-12-12 Per Bothner <bothner@cygnus.com>
05f9acdc
PB
17104
17105 * expr.c (encode_newarray_type, build_new_array): New functions.
17106 * java-tree.h: Declare build_new_array.
17107 * jcf-write.c (patch_newarray): Use build_new_array.
17108
17109 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
17110 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
17111
17112 * parse.y (patch_new_array_init): Re-organize.
17113 Now is passed the actual array (pointer) type of the value.
17114 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17115 (patch_array_constructor): Removed - merged into patch_new_array_init.
e64c46ce 17116 (java_complete_tree): Update patch_new_array_init.
05f9acdc
PB
17117
17118 * jcf-write.c (find_constant_index): New function.
17119 (generate_bytecode_insns): Use find_constant_index.
17120 (generate_classfile): Use find_constant_index for ConstantValue.
17121
78857b4e
TT
171221998-12-11 Tom Tromey <tromey@cygnus.com>
17123
17124 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17125 * decl.c (init_decl_processing): Renamed dtable -> vtable.
17126 * class.c (make_class_data): Renamed dtable -> vtable, and
17127 dtable_method_count -> vtable_method_count.
17128
62c9aa5f 171291998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
4a5f66c3
APB
17130
17131 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
e64c46ce 17132 global variables, initialized.
4a5f66c3 17133 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
e64c46ce 17134 Declared new global variables.
4a5f66c3 17135 * lex.c (java_lex): Return long_zero_node, float_zero_node,
e64c46ce 17136 double_zero_node, integer_zero_node upon direct matching.
4a5f66c3
APB
17137 * parse.y (purify_type_name): Added function prototype.
17138 (duplicate_declaration_error_p): Consider new_type as potentially
e64c46ce 17139 being a incomplete type. Use purify_type_name on type string.
4a5f66c3 17140 (method_header): saved_type: unused variable removed. Don't figure
e64c46ce 17141 return type if method name is invalid.
4a5f66c3 17142 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
e64c46ce 17143 processed by patch_unaryop.
4a5f66c3 17144 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
e64c46ce
AJ
17145 increment/decrement node into its original type after binary
17146 numeric promotion on its operands.
4a5f66c3 17147
62c9aa5f 171481998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
1179ebc2
APB
17149
17150 * parse.y (array_initializer:): Array init operand is NULL_TREE
e64c46ce
AJ
17151 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17152 now an error. Fixed indentation problems.
1179ebc2
APB
17153 (patch_string): Handle error_mark_node as an argument.
17154 (patch_new_array_init): Fixed indentation problems.
17155 (array_constructor_check_entry): Removed check on null wfl_value.
e64c46ce 17156 Return an error if wfl_value's walk returns an error.
1179ebc2 17157
62c9aa5f 171581998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
f8976021
APB
17159
17160 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17161 * lex.c (java_lex): Remember column position before advancing one
e64c46ce 17162 token. Retain location information on OCB_TK.
f8976021
APB
17163 * lex.h (typedef struct java_lc): Added new field.
17164 * parse.h (GET_SKIP_TYPE): New macro.
17165 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17166 * parse.y (build_new_array_init, patch_new_array_init,
e64c46ce
AJ
17167 patch_array_constructor, maybe_build_array_element_wfl,
17168 array_constructor_check_entry): New function prototypes.
f8976021
APB
17169 (switch_block:): Tagged <node>.
17170 (OCB_TK): Tagged <operator>.
17171 (array_initializer:): Installed actions.
17172 (variable_initializer): Build location information on element if
e64c46ce 17173 necessary.
f8976021
APB
17174 (switch_statement:): Fixed indentation typo.
17175 (switch_block:): Redefined default action.
17176 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17177 (patch_assignment): Removed duplicate code.
17178 (maybe_build_array_element_wfl, build_new_array_init,
e64c46ce
AJ
17179 patch_new_array_init, patch_array_constructor,
17180 array_constructor_check_entry): New functions.
f8976021 17181
62c9aa5f 171821998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
ac825856
APB
17183
17184 * parse.y (array_initializer): Tagged <node>.
17185 (variable_initializer:): Use default rule.
17186 (array_initializer:): Defined actions.
17187 (variable_initializers:): Likewise.
17188 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
e64c46ce 17189 non-static field accesses.
ac825856
APB
17190 (patch_invoke): Fixed indentation typo.
17191 (java_complete_tree): Likewise.
17192 (build_labeled_block): Changed leading comment. Generate an error
e64c46ce 17193 in case of duplicate loop labels.
ac825856 17194 (patch_conditional_expr): Patch results of string concatenation
e64c46ce 17195 operations.
ac825856 17196
62c9aa5f 171971998-12-06 Per Bothner <bothner@cygnus.com>
2dfaf550
PB
17198
17199 * constants.c (find_methodref_index): When the class is an interface,
17200 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17201
17202 * decl.c (finit_identifier_node): Use "$finit$", rather than
17203 "<finit>" (which Sun's verifier rejects).
17204 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
17205 (generate_field_initialization_code): Removed.
17206 (fix_constructors) Don't add call to $finit$ here (wrong order).
17207 (patch_method_invocation): Add $finit$ call here.
17208
17209 * java-tree.h (CALL_USING_SUPER): New macro.
17210 * parse.y (patch_invoke): Remove im local variable.
e64c46ce 17211 (patch_method_invocation, patch_invoke): Don't pass super parameter.
f6bbde28 17212 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
2dfaf550
PB
17213 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
17214
17215 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
17216
17217 * parse.y (java_complete_tree): Don't complain about unreachable
17218 statement if it is empty_stmt_node.
17219
17220 * jcf-write.c (find_constant_wide): New function.
17221 (push_long_const): Use find_constant_wide.
17222
17223 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
17224 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
17225 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17226 Emit invokeinterface when calling an interface method.
17227 Emit invokespecial also when calling super or private methods.
17228
17229 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
17230
62c9aa5f 172311998-12-06 Per Bothner <bothner@cygnus.com>
0f0d3319
PB
17232
17233 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
17234
62c9aa5f 172351998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
1886c9d8
APB
17236
17237 * java-tree.h (java_layout_seen_class_methods): New function
e64c46ce 17238 prototype.
1886c9d8
APB
17239 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17240 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17241 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17242 * parse.y (method_declarator:): Defined action.
17243 (issue_warning_error_from_context): input_filename saved, set to
e64c46ce 17244 the appropriate value and restored after java_error is called.
1886c9d8
APB
17245 (build_unresolved_array_type): Fixed comment.
17246 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17247 (method_header): Deal with return type the same way type are
e64c46ce
AJ
17248 handled for fields and method's parameters and local variables
17249 types are handled.
1886c9d8
APB
17250 (check_method_redefinition): Removed extra CR.
17251 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17252 (java_layout_seen_class_methods): New function.
17253 (java_layout_classes): Call java_layout_seen_class_methods.
f6bbde28 17254
62c9aa5f 172551998-12-03 Per Bothner <bothner@cygnus.com>
52e01aa6
PB
17256
17257 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
17258
62c9aa5f 172591998-12-03 Per Bothner <bothner@cygnus.com>
66af84e4
PB
17260
17261 * jcf-dump.c (main): Fix error message.
17262 * jcf-path.c (add_entry): Style fix.
17263
62c9aa5f 172641998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
c3f2a476
APB
17265
17266 * class.c (layout_class_method): Call build_java_argument_signature
17267 on constructors too.
17268 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17269 (patch_method_invocation): Define a primary when resolving an
e64c46ce
AJ
17270 expression name. Augmented comment on code checking illegal `this'
17271 usage. Loosened it test by accepting NEW_CLASS_EXPR.
c3f2a476 17272
62c9aa5f 172731998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
82371d41
APB
17274
17275 * class.c (layout_class_method): Don't report error on non-static
e64c46ce 17276 overriding static if the method is private.
82371d41
APB
17277 * java-tree.h (finish_class): Prototype added.
17278 * lex.c (java_get_line_col): Handle col argument -2 value.
17279 * parse.h: All static method declarations moved to parse.y.
17280 * parse.y: Now contains all static method declarations previously
e64c46ce 17281 found in parse.h.
82371d41 17282 (find_expr_with_wfl, missing_return_error,
e64c46ce 17283 unreachable_stmt_error): New functions.
82371d41 17284 (java_get_real_method_name): Identify constructors bearing class
e64c46ce 17285 names in source code compiled classes only.
82371d41
APB
17286 (java_complete_expand_methods): Call missing_return_error.
17287 (invocation_mode): Private methods invoked as static methods.
17288 (java_complete_tree): Call unreachable_stmt_error.
17289
de80f416
TT
172901998-12-01 Tom Tromey <tromey@cygnus.com>
17291
17292 * Makefile.in (+target): Removed.
17293 (+xmake_file): Likewise.
17294 (+tmake_file): Likewise.
17295 (.NOEXPORT): Removed duplicate.
17296
62c9aa5f 172971998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
45254bf6
KG
17298
17299 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17300
17301 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
f6bbde28 17302
45254bf6
KG
17303 * jvgenmain.c: Remove the xmalloc prototype, we get it from
17304 libiberty.h. Provide an xmalloc definition.
17305
17306 * jvspec.c: Remove the xmalloc prototype.
17307
17308 * parse-scan.y: Include config.h and system.h. Don't include
17309 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
17310 Provide an xstrdup definition.
17311
62c9aa5f 173121998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
076b41ee 17313
ceff9b14
AO
17314 * jcf-path.c (add_entry): Recognize ".jar" too.
17315 * lang-specs.h: Likewise.
076b41ee 17316
62c9aa5f 173171998-11-26 Per Bothner <bothner@cygnus.com>
c5941a9f
PB
17318
17319 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
17320 soft_monitorenter_node, soft_monitorexit_node, throw_node.
17321
17322 * jcf-write.c (generate_bytecode_insns):
e64c46ce 17323 Handle pre/post-increment/decrement of long.
c5941a9f
PB
17324
17325 * jcf-write.c (generate_bytecode_insns):
17326 Handle missing exception handler (finally for synchronized).
17327
62c9aa5f 173281998-11-25 Per Bothner <bothner@cygnus.com>
00abfc00 17329
df8940cf
PB
17330 * java-tree.h (end_params_node): Declare global.
17331 * decl.c (end_params_node): New global.
17332 (init_decl_processing, start_java_method): Use end_params_node for
17333 end of list of parameter types. Follows correct gcc conventions.
17334 * expr.c (pop_argument_types, pop_arguments): Likewise.
17335 * lang.c (put_decl_node): Likewise.
17336 * typeck.c (various places): Likewise.
17337 * class.y (various places): Likewise.
17338 * parse.y (various places): Likewise.
17339
17340 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
17341 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
17342
17343 * class.c: Add #include flags.h, remove no-longer needed declaration.
17344
17345 * class.c (layout_class_method): Remove commented-out code, re-format.
17346 Don't add vtable entry (or index) for private methods.
17347 * expr.c (expand_invoke): A private method is implicitly final.
17348 * class.c (make_class_data): If inlining or optimizing,
17349 skip private methods.
17350
17351 * class.c (finish_class): New function. Calls existing methods,
17352 but alls emits deferred inline functions.
17353 * jcf-parse.c (parse_class_file): Call finish_class.
17354 * parse.y (java_complete_expand_methods): Likewise.
17355
17356 * expr.c (build_java_binop): Explicit default, to silence -Wall.
17357
00abfc00
PB
17358 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
17359
62c9aa5f 173601998-11-25 Marc Espie <espie@quatramaran.ens.fr>
de7b168e
ME
17361
17362 * jcf-write.c (generate_bytecode_conditional): Fix typo.
17363
62c9aa5f 173641998-11-24 Per Bothner <bothner@cygnus.com>
23a79c61
APB
17365
17366 * (generate_classfile): Always write class access flag with
e64c46ce 17367 ACC_SUPER set.
23a79c61 17368
62c9aa5f 173691998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
23a79c61
APB
17370
17371 * class.c (maybe_layout_super_class): New function.
17372 (layout_class): Reorganized. Loop on class methods dispatched into
e64c46ce 17373 a new function. Call maybe_layout_super_class.
23a79c61
APB
17374 (layout_class_methods, layout_class_method): New functions.
17375 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
e64c46ce 17376 class.
23a79c61
APB
17377 (expand_invoke): Likewise.
17378 * java-tree.h (all_class_list): New global variable declared.
17379 (layout_class_methods, layout_class_method): New function
e64c46ce 17380 prototypes.
23a79c61
APB
17381 (LAYOUT_SEEN_CLASS_METHODS): New macro.
17382 * jcf-parse.c (all_class_list): New global variable.
17383 (load_class): Extended what class_or_name can be. Use parser
e64c46ce 17384 context mechanism to save globals before calling jcf_parse.
23a79c61 17385 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
e64c46ce 17386 is set on the file name.
23a79c61 17387 (jcf_parse): Layout class methods when Object is loaded, otherwise
e64c46ce 17388 record class in all_class_list for delayed method layout.
23a79c61
APB
17389 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17390 * lang.c (put_decl_node): Decode <init> into the decl context
e64c46ce 17391 class name.
23a79c61
APB
17392 * lex.c (java_allocate_new_line): Use xmalloc.
17393 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
e64c46ce 17394 pointers, not TREE_LIST elements.
23a79c61 17395 (struct parser_ctxt): Fixed comment indentations, added comments
e64c46ce 17396 and reordered some fields.
23a79c61
APB
17397 (java_check_methods): Function prototype removed.
17398 * parse.y (java_push_parser_context): Use xmalloc.
17399 (java_parser_context_restore_global): Pop extra pushed ctxp only
e64c46ce 17400 when there's nothing next.
23a79c61 17401 (maybe_create_class_interface_decl): Fixed comment, add new
e64c46ce 17402 created class decl to all_class_list.
23a79c61
APB
17403 (method_header): Use GET_REAL_TYPE on argument's types.
17404 (method_declarator): Use GET_REAL_TYPE, change type to the real
e64c46ce
AJ
17405 type in TREE_LIST dependency node. Build argument list with the
17406 real type.
23a79c61
APB
17407 (create_jdep_list): Use xmalloc. Removed allocation error message.
17408 (obtain_incomplete_type): Fixed leading comment. Broadened
e64c46ce 17409 incoming argument meaning.
23a79c61 17410 (register_incomplete_type): Use xmalloc. Removed allocation error
e64c46ce 17411 message.
23a79c61
APB
17412 (safe_layout_class): Fixed leading comment.
17413 (jdep_resolve_class): Reversed if statement condition and switch
e64c46ce 17414 if and else bodies.
23a79c61 17415 (resolve_and_layout): Fixed leading comment. Broadened incoming
e64c46ce 17416 argument meaning.
23a79c61 17417 (complete_class_report_errors): New local variable name, for
e64c46ce 17418 clarity. purify_type_name used for all error cases.
23a79c61
APB
17419 (java_get_real_method_name): Stricter check on constructors.
17420 (java_check_regular_methods): Reverse methods list only if not
e64c46ce 17421 already laid out. Layout artificial constructor.
23a79c61
APB
17422 (java_check_methods): Deleted.
17423 (source_start_java_method): Obtain incomplete type for patchable
e64c46ce 17424 method arguments.
23a79c61 17425 (java_layout_classes): Fixed leading comment. Use
e64c46ce
AJ
17426 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17427 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17428 before returning. Fixed comments.
23a79c61
APB
17429 (java_expand_classes): Check for errors up front.
17430 (patch_method_invocation): Class to search is resolved and laid
e64c46ce 17431 out.
f6bbde28 17432
62c9aa5f 174331998-11-24 Per Bothner <bothner@cygnus.com>
818347b4
PB
17434
17435 * expr.c (java_lang_expand_expr): Add missing emit_queue.
17436
17437 * javaop.h (int8): Removed - not used.
17438 (jbyte): Redefine portably with correct signedness.
17439
17440 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
17441
17442 * jcf-write.c (generate_bytecode_insns): Fix typo
17443 OPCODE_getstatic to OPCODE_getfield.
17444
17445 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
17446 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
17447 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17448
62c9aa5f 174491998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
1c7f3673
APB
17450
17451 * jcf-parse.c (jcf_parse_source): Function returned type is
e64c46ce 17452 void. Added prototype.
1c7f3673
APB
17453 (jcf_parse): Function returned type is void.
17454 (yyparse): Remove call to fclose on the last parsed file.
17455
17456 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17457
62c9aa5f 174581998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
c877974e
APB
17459
17460 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17461 (layout_class): Cope with methods featuring WFL in decl names.
17462 * decl.c (unqualified_object_id_node): New global variable,
e64c46ce 17463 initialized.
c877974e
APB
17464 (build_decl_no_layout): Removed.
17465 * expr.c (build_primtype_type_ref): Handle Double.
17466 (java_lang_expand_expr): Fixed indentations.
17467 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17468 (flag_wall, flag_redundant, flag_not_overriding,
e64c46ce
AJ
17469 flag_static_local_jdk1_1, unqualified_object_id_node): Global
17470 variable declarations.
c877974e
APB
17471 (build_decl_no_layout): Removed prototype.
17472 (java_get_real_method_name): Added prototype.
17473 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17474 (java_parse_abort_on_error): Macro now just returns.
17475 * jcf-parse.c (jcf_parse_source): Check fclose returned
e64c46ce
AJ
17476 value. Call emit_register_classes if java_report_errors returns
17477 zero.
c877974e 17478 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
e64c46ce 17479 flag_static_local_jdk1_1): New integer flags.
c877974e
APB
17480 (lang_decode_option): New flags set here.
17481 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17482 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
e64c46ce 17483 the flag_redundant variable.
c877974e 17484 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
e64c46ce 17485 when parsing java.lang.Object class.
c877974e 17486 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
e64c46ce 17487 NULL_TREE to build.
c877974e
APB
17488 (resolve_qualified_expression_name): Fixed indentation.
17489 (patch_array_ref): Changed prototype.
17490 (not_initialized_as_it_should_p): Prototype removed.
17491 (java_report_errors): Added function prototype.
17492 * parse.y (formal_parameter:): Changed error message for not yet
e64c46ce 17493 supported final parameters.
c877974e 17494 (class_type_list:): Set both PURPOSE and VALUE of created
e64c46ce 17495 TREE_LIST to be class_type.
c877974e
APB
17496 (primary_no_new_array:): Handle class literals on primitive types.
17497 (parse_warning_context): Reinstalled correct force_error and
e64c46ce 17498 do_warning flags setups.
c877974e 17499 (java_report_errors): Changed prototype. Return java_error_count
e64c46ce 17500 value.
c877974e 17501 (variable_redefinition_error): Consider treating variable type as
e64c46ce 17502 a fake pointer.
c877974e 17503 (create_interface): Warn about redundant abstract modifier if
e64c46ce 17504 flag_redundant is set. Changed error message.
c877974e 17505 (lookup_field_wrapper): Save/restore globals before/after looking
e64c46ce 17506 up field.
c877974e 17507 (duplicate_declaration_error_p): Consider treating declaration
e64c46ce 17508 type as a fake pointer.
c877974e 17509 (register_fields): Extract real type from dependency node. Check
e64c46ce
AJ
17510 for duplicate field declaration after type adjustment. Use
17511 DECL_INITIAL to store static final initialized values.
c877974e
APB
17512 (method_header): Extract real function type from dependency node.
17513 (check_abstract_method_header): Use GET_METHOD_NAME.
17514 (obtain_incomplete_type): Layout fake pointer type.
17515 (safe_layout_class): Don't try to check for methods before layout.
17516 (java_complete_class): Don't check for correct throws clause
e64c46ce 17517 elements inheritance here.
c877974e
APB
17518 (resolve_and_layout): Broadened name parameter meaning.
17519 (reset_method_name): Use GET_METHOD_NAME.
17520 (java_get_real_method_name): New function.
17521 (java_check_regular_methods): Don't check methods in
e64c46ce
AJ
17522 java.lang.Object. Verify lineage of throws clause elements. Use
17523 flag_no_overriding in warning report.
c877974e 17524 (check_throws_clauses): Don't check if class was from
e64c46ce 17525 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
c877974e
APB
17526 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17527 (declare_local_variables): Use flag_static_local_jdk1_1 to report
e64c46ce
AJ
17528 warning on unsupported final local variables. Use build_decl
17529 instead of build_decl_no_layout. Get real local variable type from
17530 dependency node.
c877974e 17531 (source_start_java_method): Get real parameter type from
e64c46ce 17532 dependency node. Call build_decl instead of build_decl_no_layout.
c877974e 17533 (java_layout_classes): Reverse tree and layout type and class as
e64c46ce 17534 required. Mark class as loaded when done.
c877974e 17535 (resolve_field_access): Fixed indentation. Restricted condition
e64c46ce
AJ
17536 leading to static field access code generation. Set field_type
17537 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
c877974e 17538 (resolve_qualified_expression_name): Initialize type_found to
e64c46ce
AJ
17539 null. Handle static field resolved during qualification. Fixed
17540 layout on non primitive field decl types.
c877974e
APB
17541 (not_accessible_p): Fixed typo in comment.
17542 (patch_method_invocation): Resolve and layout class to search from
e64c46ce 17543 type.
c877974e 17544 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
e64c46ce
AJ
17545 layout non primitive type, if necessary. Make method node only to
17546 report errors.
c877974e 17547 (find_applicable_accessible_methods_list): Consider WFL'ed method
e64c46ce 17548 decl names. Fixed indentation.
c877974e 17549 (argument_types_convertible): Resolve and layout target type if
e64c46ce 17550 necessary.
c877974e 17551 (java_complete_tree): Fixed indentation problems. Rewrote
e64c46ce
AJ
17552 CALL_EXPR thrown exceptions check. Re-installed further processing
17553 of the assignment in certain cases.
c877974e 17554 (patch_assignment): Call maybe_build_primttype_type_ref to perform
e64c46ce 17555 inlining on class literals.
c877974e 17556 (valid_builtin_assignconv_identity_widening_p): Cope with constant
e64c46ce 17557 0 literal.
c877974e
APB
17558 (valid_method_invocation_conversion_p): Likewise.
17559 (patch_string): Temporary disable forbidden use of `this' in
e64c46ce
AJ
17560 explicit constructor invocations when doing string concatenation
17561 within their scope.
c877974e 17562 (patch_unaryop): Added comment. Reinstalled code to disable
e64c46ce 17563 further check on assignment operation with cast expression RHS.
c877974e
APB
17564 (patch_switch_statement): Fixed indentation.
17565 (build_try_statement): Call build_decl instead of
e64c46ce 17566 build_decl_no_layout.
c877974e
APB
17567 (patch_synchronized_statement): Likewise.
17568 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
e64c46ce 17569 IS_UNCHECKED_EXPRESSION_P.
c877974e 17570 (check_thrown_exceptions_do): Changed leading comment. Resolve and
e64c46ce 17571 layout argument exception type.
c877974e 17572 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
e64c46ce 17573 of IS_UNCHECKED_EXPRESSION_P.
f6bbde28 17574
62c9aa5f 175751998-11-18 Anthony Green <green@cygnus.com>
1c7f3673
APB
17576
17577 * jcf-parse.c (yyparse): Open class file in binary mode.
17578
62c9aa5f 175791998-11-15 Per Bothner <bothner@cygnus.com>
411efd21
PB
17580
17581 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
17582
17583 * jcf-write.c (perform_relocations): Move check out one loop.
17584
62c9aa5f 175851998-11-15 Anthony Green <green@hoser.cygnus.com>
8773d9d5
AG
17586
17587 * Make-lang.in: Fix reference to srcdir.
17588 * jv-scan.c: Add missing xmalloc prototype.
17589 * jvgenmain.c: Ditto.
17590
62c9aa5f 175911998-11-15 Per Bothner <bothner@cygnus.com>
9bbc7d9f
PB
17592
17593 * decl.c (error_mark_node), java-tree.h: New global.
17594 * parse.y: Use empty_stmt_node instead of size_zero_node.
17595 (build_if_else_statement): If missing else, use empty_stmt_node.
17596
17597 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
17598 (java_complete_expand_method): Complain if return is missing.
17599 (java_check_regular_methods): Comment out incorrect error check.
17600 (not_accessible_p): Fix incorrect handling of protected methods.
17601 (patch_method_invocation): Pass correct context to not_accessible_p.
17602 (find_applicable_accessible_methods_list): Likewise.
17603 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
17604 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
17605 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
17606 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
17607
17608 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
17609 (push_int_const): Remove reundant NOTE_PUSH.
17610 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
17611 (- case SWITCH_EXPR): Fix code generation bug.
17612 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
17613 (generate_classfile): More robust for abstract methods.
17614
62c9aa5f 176151998-11-15 Anthony Green <green@cygnus.com>
175135a6
AG
17616
17617 * Makefile.in: jv-scan and jvgenmain all require libiberty.
17618 * Make-lang.in: Ditto.
17619
17620 * jv-scan.c: Remove xmalloc and xstrdup definitions.
17621 * jvgenmain: Ditto.
17622
62c9aa5f 176231998-11-15 Per Bothner <bothner@cygnus.com>
0ef38928
PB
17624
17625 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
17626
17627 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
17628
62c9aa5f 176291998-11-14 Per Bothner <bothner@cygnus.com>
a2f44beb
PB
17630
17631 Allow uses of interface types to verify. This is not really
17632 type-safe, but it matches what Sun does, and is OK as long as
17633 there are appropriate run-time checks.
17634 * verify.c (merge_types): If merging two interface types,
17635 just set the result to java.lang.Object.
17636 * expr.c (pop_type): Any interface is matches by java.lang.Object.
17637
928962ae
TT
176381998-11-13 Tom Tromey <tromey@cygnus.com>
17639
df66b566
TT
17640 * gjavah.c (main): Handle --output-class-directory argument.
17641 * jvspec.c (lang_specific_driver): Translate `-d' into
17642 -foutput-class-dir.
17643 * jcf.h (jcf_write_base_directory): Declare.
17644 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17645 * lang-options.h: Mention -foutput-class-dir.
17646 * jcf-write.c (jcf_write_base_directory): New global.
17647 (make_class_file_name): Put generated .class file into `-d'
17648 directory, or into source directory if -d not given. Function now
17649 static.
17650 (write_classfile): Free class file name. Handle case where class
17651 file name is NULL.
17652 (DIR_SEPARATOR): New macro.
17653 Include <sys/stat.h>
17654
928962ae
TT
17655 * Makefile.in (prefix): New macro.
17656
62c9aa5f 176571998-11-12 Per Bothner <bothner@cygnus.com>
14dd5b38 17658
421fb085
PB
17659 * parse.y (patch_invoke): Do less if flag_emit_class_files.
17660 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
17661 here (done in patch_invoke instead).
17662 (case_identity): Moved here from parse.y.
17663
17664 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
17665 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
17666 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
17667 so they can be efficiently scanned without recursion.
17668 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17669 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
17670 in BLOCK iteratively, rather than recursively.
17671
17672 * parse.y (do_unary_numeric_promotion): New function.
17673 (patch_unaryop, patch_binop, patch_array_ref): Use it.
17674
17675 * parse.y (patch_newarray): Various fixes.
17676
17677 Re-do handling of switch statements (for proper block scoping).
17678 * parse.y: Add just a single block for the enture switch block,
17679 but don't create any "case blocks".
17680 (group_of_labels): Rmeoved unneeded non-terminal.
17681 CASE_EXPR and DEFAULT_EXPR are added to current block.
17682 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
17683 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17684 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
17685 * parse.y (wfl_operator, print_int_node): Make non-static.
17686 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
17687 as part of recursive scan of block.
17688 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
17689 (patch_switch_statement): Most tests move dinto java_complete_tree.
f6bbde28 17690
421fb085
PB
17691 * parse.y: Make various production be non-typed (void).
17692 * parse.y (parse_error): Merged into issue_warning_error_from_context.
17693 * parse.y (add_stmt_to_compound): Don't create/change extra node.
17694 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
17695
17696 * jcf-write.c (struct jcf_handler): New type.
17697 (struct jcf_switch_state): New type.
17698 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
17699 (alloc_handler, emit_unop, emit_reloc): New functions.
17700 (adjust_typed_op): Add extra parameter ("max type" offset).
17701 (emit_switch_reloc, emit_case-reloc): New function.
17702 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
17703 (generate_bytecode_insns): Support REAL_CST, switch statements,
17704 exception handling, method calls, object/array creation, and more.
f6bbde28 17705
14dd5b38
PB
17706 * class.c: Remove some unused variables.
17707 * constants.c (find_string_constant): New function.
17708 (count_constant_pool_bytes): Fix to correctly handle wide constants.
17709 * decl.c (complete_start_java_method): Don't _Jv_InitClass
17710 if flag_emit_class_files.
421fb085 17711
dfded5c3
TT
177121998-11-12 Tom Tromey <tromey@cygnus.com>
17713
733b3a87
TT
17714 * jcf-io.c (find_class): Added explanatory comment.
17715
17716 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
17717 trailing slash to `.zip' entries.
17718
dfded5c3
TT
17719 * jvspec.c (lang_specific_driver): Correctly handle case where
17720 GC_NAME not defined.
17721
aaff4ee4
TT
177221998-11-11 Tom Tromey <tromey@cygnus.com>
17723
17724 * jvspec.c (GC_NAME): New define.
17725 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
17726 if required.
17727 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17728
62c9aa5f 177291998-11-11 Per Bothner <bothner@cygnus.com>
b62d42fe
PB
17730
17731 * jcf-dump.c (TABLE_SWITCH): Fix typos.
17732
233f10d3
TT
177331998-11-11 Tom Tromey <tromey@cygnus.com>
17734
17735 * jcf-dump.c (main): Correctly recognize `--'-style long options.
17736
62c9aa5f 177371998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
5e942c50
APB
17738
17739 * class.c (is_compiled_class): Call safe_layout_class for class
e64c46ce 17740 compiled from source.
5e942c50 17741 * conver.h (convert_to_integer, convert_to_real,
e64c46ce 17742 convert_to_pointer): Added prototypes.
5e942c50 17743 * decl.c (init_decl_processing): Non longer push the decls of
e64c46ce
AJ
17744 `methodtable', `constants', `Class', `Field', `dispatchTable'
17745 `jexception' and `Method'.
5e942c50
APB
17746 * expr.c (build_invokeinterface): New function.
17747 (expand_invoke): static variable CLASS_IDENT now in
e64c46ce 17748 build_invokeinterface. Use build_invokeinterface.
5e942c50 17749 (expand_java_field_op): Moved code to inline
e64c46ce 17750 java.lang.PRIMTYPE.TYPE into a function.
5e942c50
APB
17751 (build_primtype_type_ref): New function.
17752 * java-tree.def (INSTANCEOF_EXPR): New tree code.
17753 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
e64c46ce 17754 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
5e942c50
APB
17755 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17756 (DECL_LOCAL_STATIC_VALUE): New macro.
17757 (build_invokeinterface, build_primtype_type_ref): New function
e64c46ce 17758 prototypes.
5e942c50
APB
17759 (java_parse_abort_on_error): Macro rewritten.
17760 * jcf-parse.c (current_method): Add comment to declaration.
17761 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
e64c46ce 17762 Function prototypes fixed.
5e942c50
APB
17763 (jcf_parse_source): push/pop parser context. save/restore global.
17764 (parse_source_file): Fixed leading comment. Now take a
e64c46ce
AJ
17765 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17766 classes and pop the parser context anymore.
5e942c50 17767 (yyparse): Push parser context, save globals, parse the source
e64c46ce
AJ
17768 file, restore globals and pop the parser context when processing a
17769 source file.
5e942c50
APB
17770 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17771 * lex.c (java_parse_doc_section): New function.
17772 (java_lex): Call java_parse_doc_section when appropriate. Build an
e64c46ce 17773 operator around INSTANCEOF_TK.
5e942c50 17774 * lex.h (java_lineterminator, java_sprint_unicode,
e64c46ce
AJ
17775 java_unicode_2_utf8, java_lex_error, java_store_unicode):
17776 Prototypes rewritten.
5e942c50 17777 (java_parse_escape_sequence, java_letter_or_digit_p,
e64c46ce
AJ
17778 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17779 java_read_unicode, java_store_unicode, java_read_char,
17780 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17781 Added function prototypes.
5e942c50 17782 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
e64c46ce 17783 define.
5e942c50 17784 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
e64c46ce 17785 New macros
5e942c50 17786 (struct parser_ctxt): New fields: deprecated,
e64c46ce 17787 current_parsed_class_un, gclass_list.
5e942c50 17788 (fix_method_argument_names, issue_warning_error_from_context,
e64c46ce 17789 resolve_package, lookup_package_type): New function prototypes.
5e942c50
APB
17790 (resolve_expression_name): Fixed function prototype.
17791 (find_applicable_accessible_methods_list): Fixed indentation, added
17792 extra argument in prototype.
17793 (check_final_assignment, build_null_of_type, check_deprecation,
e64c46ce
AJ
17794 check_method_redefinition, reset_method_name,
17795 java_check_regular_methods, java_check_abstract_methods,
17796 maybe_build_primttype_type_ref): New function prototype.
5e942c50
APB
17797 * parse.y (conver.h): Include.
17798 (INSTANCEOF_TK): Tagged <operator>.
17799 (single_type_import_declaration): Use REGISTER_IMPORT macro.
17800 (relational_expression:): Build binop for instanceof.
17801 (java_push_parser_context): Remember ctxp->gclass_list across
e64c46ce 17802 contexts.
5e942c50 17803 (java_pop_parser_context): Simply return if no context
e64c46ce 17804 exists. Remember gclass_list across contexts.
5e942c50
APB
17805 (issue_warning_error_from_context): New function.
17806 (parse_error_context): Don't setup ctxp->elc here. Call
e64c46ce 17807 issue_warning_error_from_context instead.
5e942c50
APB
17808 (parse_warning_context): Likewise.
17809 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
e64c46ce 17810 setup. Link new class/interface to ctxp->gclass_list.
5e942c50 17811 (add_superinterfaces): Register interface as incomplete if not
e64c46ce 17812 loaded.
5e942c50 17813 (create_class): Remember class unqualified name in
e64c46ce 17814 ctxp->current_parsed_class_un. Check class deprecation.
5e942c50 17815 (register_fields): Check field deprecation. Remember static final
e64c46ce
AJ
17816 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17817 processing INIT.
5e942c50 17818 (method_header): New local variable ORIG_ARG. Use unqualified
e64c46ce
AJ
17819 current class name for check on constructor errors. Promote return
17820 type if of record type. Argument list fix moved in
17821 fix_method_argument_names, called here. Check method deprecation.
5e942c50
APB
17822 (fix_method_argument_names): New function.
17823 (method_declarator): Promote record typed arguments.
17824 (safe_layout_class): Check class methods before layout.
17825 (java_complete_class): Compute field layout when patched.
17826 (do_resolve_class): Try to load class after having it renamed
e64c46ce 17827 after the package name.
5e942c50
APB
17828 (get_printable_method_name): Use DECL_CONTEXT.
17829 (reset_method_name): New function.
17830 (check_method_redefinition): Use reset_method_name.
17831 (java_check_regular_methods): New local variable
e64c46ce
AJ
17832 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17833 names for error report. Check for compile-time error when method
17834 found has default (package) access.
5e942c50 17835 (java_check_abstract_methods): Now takes an interface DECL node as
e64c46ce
AJ
17836 an argument. Also reinstall real name on unchecked
17837 overriding/hiding methods for error report.
5e942c50 17838 (java_check_methods): Fixed leading comment. Get classes to verify
e64c46ce
AJ
17839 from ctxp->gclass_list. Use CHECK_METHODS macro and set
17840 CLASS_METHOD_CHECKED_P on class verification.
5e942c50
APB
17841 (lookup_java_method2): Get real method name if necessary.
17842 (find_in_imports): Don't check package class access here.
17843 (resolve_package, lookup_package_type): New functions.
17844 (java_layout_classes): Fixed leading comment. Take classes to be
e64c46ce 17845 laid out from ctxp->gclass_list.
5e942c50 17846 (java_complete_expand_methods): Don't expand native and abstract
e64c46ce 17847 methods.
5e942c50
APB
17848 (java_expand_classes): New function.
17849 (resolve_expression_name): Use additional argument ORIG. Retrieve
e64c46ce 17850 values of static final field of primitive types.
5e942c50 17851 (resolve_field_access): Handles static final field of promotive
e64c46ce 17852 type.
5e942c50 17853 (resolve_qualified_expression_name): Handle STRING_CST as
e64c46ce
AJ
17854 primaries and package name resolution. Check deprecation on found
17855 decls. Set where_found and type_found on non static field resolved
17856 during qualification. Layout non primitive field decl types.
5e942c50
APB
17857 (check_deprecation): New function.
17858 (maybe_access_field): Simplified.
17859 (patch_method_invocation_stmt): Local variable CLASS_TYPE
e64c46ce
AJ
17860 removed. Reverse method's argument when primary is a type. Don't
17861 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17862 instead. Include abstract class in the list of class searchable
17863 for constructors. Use DECL_CONTEXT of found method for access
17864 checks. Check method deprecation.
5e942c50 17865 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
e64c46ce 17866 converting arguments. Handle INVOKE_INTERFACE.
5e942c50 17867 (lookup_method_invoke): Search constructor using existing
e64c46ce 17868 infrastructure (don't rely on lookup_java_constructor anymore).
5e942c50 17869 (find_applicable_accessible_methods_list): Extra argument flag
e64c46ce 17870 LC. Now include constructor in the search.
5e942c50
APB
17871 (qualify_ambiguous_name): Conditional expression are primaries.
17872 (not_initialized_as_it_should_p): static final are always
e64c46ce 17873 initialized.
5e942c50 17874 (java_complete_tree): Pass extra NULL argument to
e64c46ce
AJ
17875 resolve_expression_name. Stricter test to carry on patching
17876 assignments. New case for INSTANCEOF_EXPR.
5e942c50
APB
17877 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17878 (check_final_assignment, maybe_build_primttype_type_ref): New
e64c46ce 17879 functions.
5e942c50 17880 (patch_assignment): Detect resolved static finals and carry normal
e64c46ce 17881 assignment error check on them. Inline PRIMTYPE.TYPE read access.
5e942c50 17882 (try_builtin_assignconv): Access constant 0 on all primitive
e64c46ce 17883 types.
5e942c50 17884 (valid_builtin_assignconv_identity_widening_p): Accept identical
e64c46ce 17885 types. Accept all promoted type on int type.
5e942c50 17886 (valid_ref_assignconv_cast_p): Accept a null pointer to be
e64c46ce 17887 assigned to a reference.
5e942c50 17888 (valid_method_invocation_conversion_p): Accept to check null
e64c46ce 17889 pointers.
5e942c50 17890 (build_binop): Merge declaration and initialization of local
e64c46ce 17891 variable BINOP.
5e942c50 17892 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
e64c46ce
AJ
17893 numeric types. Improved validity test for qualify operators on
17894 references.
5e942c50 17895 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
e64c46ce
AJ
17896 and PREINCREMENT_EXPR. Also detect resolved static finals of a
17897 primitive type and issue the appropriate error message.
5e942c50
APB
17898 (resolve_type_during_patch): Mark class loaded when resolved.
17899 (patch_cast): Allow null to be cased to reference types.
17900 (build_null_of_type): New function.
17901 (patch_array_ref): Handle array on references correctly.
17902 (patch_return): Removed unused local variable MODIFY. Force
e64c46ce
AJ
17903 boolean to be returned as integers. Allows null to be returned by
17904 a function returning a reference.
5e942c50 17905 * typeck.c (convert_to_integer, convert_to_real,
e64c46ce 17906 convert_to_pointer): Prototypes moved to convert.h
5e942c50
APB
17907 (lookup_argument_method): Use method real name, if necessary.
17908
9cfceb60
TT
179091998-10-30 Tom Tromey <tromey@cygnus.com>
17910
66d88624
TT
17911 * class.c (build_class_ref): Changed name of primitive classes to
17912 start with `_Jv_'.
17913
9cfceb60
TT
17914 * class.c (make_class_data): Renamed fields: nmethods to
17915 method_count, method_count to dtable_method_count. Always set
17916 `state' field to 0.
17917 * decl.c (init_decl_processing): Likewise.
17918
62c9aa5f 179191998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
22eed1e6
APB
17920
17921 * class.c (layout_class): Don't mangle <finit>, produce
e64c46ce 17922 __finit<class> instead. Don't verify artificial methods.
22eed1e6
APB
17923 * decl.c (finit_identifier_node): New declared global.
17924 (init_decl_processing): finit_identifier_node initialized.
17925 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17926 * java-tree.h (finit_identifier_node): Declared as extern.
17927 (struct lang_decl): New field called_constructor.
17928 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17929 (CLASS_HAS_FINIT_P): New macro.
17930 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
e64c46ce 17931 explicit constructor invocation.
22eed1e6 17932 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
e64c46ce 17933 CALL_SUPER_CONSTRUCTOR_P): New macros.
22eed1e6
APB
17934 (write_classfile): Added prototype.
17935 * jcf-parse.c (jcf_parse_source): Parse and remember for
e64c46ce 17936 generation if the file was seen on the command line.
22eed1e6
APB
17937 (parse_source_file): Don't write the class file here.
17938 (yyparse): Loop on files rewritten. Set current_jcf.
17939 (parse_zip_file_entries): Parse class file only if it was found.
17940 * lang.c (init_parse): Don't open command line provided filename
e64c46ce 17941 here.
22eed1e6
APB
17942 (lang_parse): Don't set main_jcf anymore.
17943 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17944 (JCONSTRUCTOR_CHECK): New macro.
17945 (JBSC_TYPE_P): New macro.
17946 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17947 (COMPLETE_CHECK_OP_2): New macro.
17948 (struct parse_ctxt): New field explicit_constructor_p.
17949 (check_class_interface_creation): Fixed prototype indentation.
17950 (patch_method_invocation_stmt): Prototype reflects added argument.
17951 (patch_invoke): Likewise.
17952 (complete_method_declaration, build_super_invocation,
e64c46ce
AJ
17953 verify_constructor_circularity,
17954 build_this_super_qualified_invocation, get_printable_method_name,
17955 patch_conditional_expr, maybe_generate_finit, fix_constructors,
17956 verify_constructor_super, create_artificial_method,
17957 start_artificial_method_body, end_artificial_method_body,
17958 generate_field_initialization_code): New function prototypes.
22eed1e6
APB
17959 * parse.y: Fixed leading comment
17960 (constructor_header:, constructor_body:, block_end:): Rules tagged
e64c46ce 17961 <node>.
22eed1e6
APB
17962 (type_declaration:): Call maybe_generate_finit.
17963 (method_declaration:): Action for method_body: placed in new
e64c46ce 17964 function complete_method_declaration, called here.
22eed1e6 17965 (constructor_declaration:): Defined actions. Removed leading
e64c46ce 17966 FIXME.
22eed1e6
APB
17967 (constructor_header:): New rule with action.
17968 (constructor_body:): Rule rewritten using block_begin: and
e64c46ce 17969 block_end:. Defined actions.
22eed1e6 17970 (constructor_declarator:, explicit_constructor_invocation:):
e64c46ce 17971 Defined actions.
22eed1e6
APB
17972 (block:): Use new rules block_begin: block_end:.
17973 (block_begin:, block_end:): New rules and actions.
17974 (block_statements:): Fixed error message for explicit
e64c46ce 17975 constructors.
22eed1e6 17976 (method_invocation:): Call build_this_super_qualified_invocation
e64c46ce 17977 if primary is `this' or `super' was seen.
22eed1e6
APB
17978 (conditional_expression:): Action defined.
17979 (extra_ctxp_pushed_p): New static global flag.
17980 (java_parser_context_save_global): Create parser context if
e64c46ce 17981 necessary. Use extra_ctxp_pushed_p to remember it.
22eed1e6 17982 (java_parser_context_restore_global): Pop extra parser context if
e64c46ce 17983 one exists.
22eed1e6 17984 (build_array_from_name): Array on primitive types are marked
e64c46ce 17985 loaded.
22eed1e6 17986 (register_fields): Restore new name in field initializer
e64c46ce
AJ
17987 expression if type was altered. Non static fields initialized upon
17988 declaration marked initialized.
22eed1e6
APB
17989 (maybe_generate_finit): New function.
17990 (maybe_generate_clinit): Use create_artificial_method,
e64c46ce
AJ
17991 start_artificial_method_body, end_artificial_method_body. Generate
17992 debug info for enclosed initialization statements.
22eed1e6 17993 (method_header): Fixed leading comment. Check constructor
e64c46ce
AJ
17994 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17995 accordingly.
22eed1e6 17996 (complete_method_declaration, constructor_circularity_msg,
e64c46ce 17997 verify_constructor_circularity): New functions.
22eed1e6
APB
17998 (get_printable_method_name): New function.
17999 (check_method_redefinition): Don't rename <finit> methods. Fix
e64c46ce
AJ
18000 declared constructor names. Error message for
18001 constructors modified.
22eed1e6 18002 (java_check_regular_methods): Local variable seen_constructor
e64c46ce
AJ
18003 renamed saw_constructor. Skip verification on constructors. Create
18004 default constructor with create_artificial_method.
22eed1e6
APB
18005 (java_check_methods): Removed unnecessary empty line.
18006 (create_artificial_method, start_artificial_method_body,
e64c46ce 18007 end_artificial_method_body): New functions.
22eed1e6 18008 (java_layout_classes): Changed leading comment. Reverse fields
e64c46ce
AJ
18009 list if necessary. Always layout java.lang.Object if being
18010 defined.
22eed1e6
APB
18011 (java_complete_expand_methods): Verify constructor circularity.
18012 (java_complete_expand_method): Call fix_constructor on
e64c46ce
AJ
18013 constructors. Local variable no_ac_found removed. Restore
18014 bindings if method body expansion failed.
22eed1e6 18015 (fix_constructors, verify_constructor_super,
e64c46ce 18016 generate_field_initialization_code): New function.
22eed1e6 18017 (java_expand_classes): Fixed leading comment. Write class file
e64c46ce 18018 here.
22eed1e6 18019 (resolve_expression_name): Check for illegal instance variable
e64c46ce
AJ
18020 usage within the argument scope of an explicit constructor
18021 invocation.
22eed1e6 18022 (resolve_qualified_expression_name): Pass extra from_super flag
e64c46ce
AJ
18023 when invoking patch_method_invocation_stmt. New case for
18024 conditional expression when used as a primary. Check for error
18025 when acquiring super.
22eed1e6 18026 (patch_method_invocation_stmt): Added extra argument super. New
e64c46ce
AJ
18027 local variable is_static_flag. Set class_to_search according to
18028 the nature of the constructor invocation. Don't add `this'
18029 argument when expanding NEW_CLASS_EXPR. Check for illegal method
18030 invocation within the argument scope of explicit constructor
18031 invocation. Set is_static according to is_static_flag. Provide
18032 extra `super' argument to patch_invoke invocation.
22eed1e6 18033 (patch_invoke): New argument from_super. Loop on arguments
e64c46ce
AJ
18034 indentation fixed. Pass from_super to invocation_mode. New switch
18035 case INVOKE_SUPER. Fixed error message in switch default case.
18036 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18037 value.
22eed1e6
APB
18038 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18039 (lookup_method_invoke): Fixed prototypes in candidates list. Error
e64c46ce 18040 message takes constructors into account.
22eed1e6
APB
18041 (find_applicable_accessible_methods_list): Fixed indentation.
18042 (qualify_ambiguous_name): Take explicit constructor invocation
e64c46ce
AJ
18043 into account. Deal with a conditional expression as a primary to
18044 a method call.
22eed1e6 18045 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
e64c46ce
AJ
18046 case. Added extra argument to patch_method_invocation_stmt.
18047 Register calls made to explicit constructor `this'. Don't call
18048 save_expr in ARRAY_REF case when emitting class files. Check for
18049 illegal use of this when expanding explicit constructor invocation
18050 arguments.
22eed1e6 18051 (complete_function_arguments): Set and reset parser context
e64c46ce 18052 explicit_constructor_p field value when appropriate.
22eed1e6 18053 (build_super_invocation, build_this_super_qualified_invocation):
e64c46ce 18054 New functions.
22eed1e6
APB
18055 (patch_assignment): Fixed typo.
18056 (patch_unaryop): Check on final fields occurs only when a decl
e64c46ce 18057 exits.
22eed1e6
APB
18058 (patch_return): Take constructors into account.
18059 (patch_conditional_expr): New function.
18060 * typeck.c (build_java_signature): Removed unnecessary empty line.
f6bbde28 18061
62c9aa5f 180621998-10-28 Jeffrey A Law (law@cygnus.com)
e626b840
JL
18063
18064 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18065
571d54d5
TT
180661998-10-28 Tom Tromey <tromey@cygnus.com>
18067
18068 * decl.c (init_decl_processing): Renamed fields.
18069 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18070 interface_len, msize fields.
18071
18072 * class.c (make_class_data): Removed subclass_head and
18073 subclass_next fields.
18074 * decl.c (init_decl_processing): Removed subclass_head and
18075 subclass_next fields.
18076
62c9aa5f 180771998-10-28 Jeffrey A Law (law@cygnus.com)
5ed948ce
JL
18078
18079 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18080 * mangle.c (emit_unicode_mangled_name): Similarly.
571d54d5 18081
62c9aa5f 180821998-10-26 Nick Clifton <nickc@cygnus.com>
0d17a080
NC
18083
18084 * jcf-parse.c (get_constant): Place braces around code to compute
18085 'd' when REAL_ARITHMETIC is not defined.
18086
62c9aa5f 180871998-10-25 H.J. Lu (hjl@gnu.org)
937293e9
L
18088
18089 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18090 dependency.
18091
45ae5597
TT
180921998-10-23 Tom Tromey <tromey@cygnus.com>
18093
18094 * lang-specs.h: `.zip' files are input to jc1.
18095
62c9aa5f 180961998-10-22 Per Bothner <bothner@cygnus.com>
172b2240
PB
18097
18098 * jvspecs.c: Add (but don't enable) support for combining multiple
18099 .class and .java input filenames to a single jc1 invocation.
18100 Add support for -C flag (copile to .class files).
18101 Translate -classpath and -CLASSPATH arguments.
18102 * lang-specs.h: Don't set %2 spec.
18103
8603f9c5
TT
181041998-10-22 Tom Tromey <tromey@cygnus.com>
18105
71f6a8e2
TT
18106 * jcf-path.c (add_entry): Don't add trailing separator if entry is
18107 a .zip file.
18108 (add_path): Don't add trailing separator to non-empty path
18109 elements.
18110
18111 * lang.c (lang_decode_option): Check for -fclasspath and
18112 -fCLASSPATH before examining other `-f' options.
18113
f7670760
TT
18114 * java-tree.h (finalize_identifier_node): Don't declare.
18115 * class.c (make_class_data): Don't push "final" field.
18116 * decl.c (init_decl_processing): Don't push "final" field.
18117 (finalize_identifier_node): Removed.
18118 (init_decl_processing): Don't set finalize_identifier_node.
18119
257fafbb
TT
18120 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18121
62c9aa5f 181221998-10-11 Anthony Green <green@cygnus.com>
257fafbb
TT
18123
18124 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18125 (JV_SCAN_SOURCES): New macro.
18126 (JCF_DUMP_SOURCES): Likewise.
18127 (jcf-dump$(exeext)): New target.
18128 (jv-scan$(exeext)): New target.
18129
181301998-10-22 Tom Tromey <tromey@cygnus.com>
18131
18132 * Makefile.in (LEX): Removed.
18133 (LEXFLAGS): Likewise.
18134 (SET_BISON): New macro.
18135 (BISON): Removed.
18136 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
18137 spurious diffs in parse.c.
18138 ($(PARSE_SCAN_C)): Likewise.
18139 (PARSE_DIR): New macro.
18140 (PARSE_C): Use it.
18141 (PARSE_SCAN_C): Likewise.
18142 (PARSE_RELDIR): New macro.
18143
18144 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18145
8603f9c5
TT
18146 * jcf-io.c (find_class): Use saw_java_source to determine when to
18147 look for `.java' file.
18148 * jcf-parse.c (saw_java_source): New global.
18149 (yyparse): Set it if `.java' file seen.
18150
18151 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18152 (GCJH_SOURCES): Likewise.
18153 * Makefile.in (datadir): New macro.
18154 (libjava_zip): Likewise.
18155 (JAVA_OBJS): Added jcf-path.o.
18156 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18157 (../gcjh$(exeext)): Likewise.
18158 (jcf-path.o): New target.
18159 * java-tree.h (fix_classpath): Removed decl.
18160 * jcf-parse.c (fix_classpath): Removed.
18161 (load_class): Don't call fix_classpath.
18162 * parse.y (read_import_dir): Don't call fix_classpath.
18163 * lex.h: Don't mention classpath.
18164 * lex.c (java_init_lex): Don't initialize classpath.
18165 * jcf-io.c (classpath): Removed global.
18166 (find_class): Use jcf_path iteration functions. Correctly search
18167 class path for .java file.
18168 (open_in_zip): New argument `is_system'.
18169 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
18170 classpath-related options.
18171 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18172 and -I.
18173 (lang_init): Call jcf_path_init.
18174 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18175 * lang-specs.h: Handle -I. Minor cleanup to -M options.
18176 Correctly put braces around second string in each entry.
18177 * gjavah.c (main): Call jcf_path_init. Recognize all the new
18178 classpath-related options.
18179 (help): Updated for new options.
18180 * jcf.h: Declare functions from jcf-path.c. Don't mention
18181 `classpath' global.
18182 * jcf-path.c: New file.
18183
18184 * jcf-depend.c: Include jcf.h.
18185
18186 * jcf-write.c (localvar_alloc): Returns `void'.
18187 (localvar_free): Removed unused variable.
18188
18189 * lang.c (OBJECT_SUFFIX): Define if not already defined.
18190 (init_parse): Use OBJECT_SUFFIX, not ".o".
18191
62c9aa5f 181921998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
866e9df8
APB
18193
18194 * class.c (emit_register_classes): Renamed from
e64c46ce 18195 emit_register_class.
866e9df8 18196 * java-tree.h (emit_register_classes): Prototype renamed from
e64c46ce 18197 emit_register_class.
866e9df8 18198 * jcf-parse.c (yyparse): Call emit_register_classes once before
e64c46ce 18199 returning.
866e9df8
APB
18200 * parse.y (java_expand_classes): No longer register classes.
18201
62c9aa5f 182021998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
b351b287
APB
18203
18204 * class.c (is_compiled_class): New local variable
e64c46ce
AJ
18205 seen_in_zip. Identify classes found in currently compiled source
18206 file(s).
b351b287
APB
18207 * decl.c (complete_start_java_method): Fixed typo.
18208 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
e64c46ce 18209 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
b351b287
APB
18210 (CLASS_P): Moved around.
18211 (java_parse_abort_on_error): Macro moved from jcf-parse.c
18212 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
27e928ed 18213 java-tree.h
b351b287 18214 (jcf_parse_source): Changed leading comment. Removed unnecessary
e64c46ce 18215 fclose and CLASS_FROM_SOURCE_P marking.
b351b287 18216 (parse_source_file): New local variables remember_for_generation
e64c46ce
AJ
18217 and filename. Mark parsed file name identifier node. Removed block
18218 executed when parse_only was null. Set remember_for_generation.
b351b287
APB
18219 Use it as an argument to java_pop_parser_context.
18220 (yyparse): New local variables several_files, list, next node and
e64c46ce
AJ
18221 current_file_list. Split ampersand separated file names into
18222 current_file_list. Iterate through the list and parse accordingly.
b351b287
APB
18223 * parse.h (java_pop_parser_context): New function prototype.
18224 * parse.y (ctxp_for_generation): New static global variable.
18225 (java_pop_parser_context): New argument generate. Link popped ctxp
e64c46ce 18226 to ctxp_for_generation list accordingly.
b351b287
APB
18227 (java_complete_expand_methods): Fixed indentation.
18228 (java_expand_classes): New function.
f6bbde28 18229
62c9aa5f 182301998-10-17 Per Bothner <bothner@cygnus.com>
f9d48c82
PB
18231
18232 * Makefile.in: Link with libiberty.a instead of memmove.o.
18233
62c9aa5f 182341998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
c583dd46
APB
18235
18236 * lex.c (setjmp.h): No longer included.
18237 * lex.h (setjmp.h): Included.
18238 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18239 (duplicate_declaration_error_p): Renamed from
e64c46ce 18240 duplicate_declaration_error.
c583dd46
APB
18241 (build_array_from_name): New function prototype.
18242 * parse.y (setjmp.h): No longer included.
18243 (variable_declarator_id): Define action.
18244 (build_array_from_name): New function.
18245 (duplicate_declaration_error_p): Renamed from
e64c46ce 18246 duplicate_declaration_error. Fixed leading comment.
c583dd46 18247 (register_fields): Main `for' loop reorganized. Uses
e64c46ce 18248 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
c583dd46 18249 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
e64c46ce 18250 build_array_from_name.
c583dd46 18251 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
e64c46ce 18252 types.
c583dd46
APB
18253 (read_import_dir): Don't try to skip `.' and `..'.
18254 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
e64c46ce 18255 build_array_from_name. Main `for' loop reorganized.
c583dd46 18256 (resolve_qualified_expression_name): When building access to a
e64c46ce 18257 field, use the type where the field was found, not its own type.
c583dd46 18258 (maybe_access_field): Use field DECL_CONTEXT if the type where the
e64c46ce 18259 field was found is null.
c583dd46 18260 (qualify_ambiguous_name): Sweep through all successive array
e64c46ce 18261 dimensions.
f6bbde28 18262
62c9aa5f 182631998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
0a2138e2
APB
18264
18265 * java-tree.h (pop_labeled_block, lang_printable_name,
e64c46ce
AJ
18266 maybe_add_interface, set_super_info, get_access_flags_from_decl,
18267 interface_of_p, inherits_from_p, fix_classpath,
18268 complete_start_java_method, emit_handlers, init_outgoing_cpool,
18269 make_class_data, register_class, alloc_name_constant): New
18270 function prototypes.
0a2138e2 18271 * lang.c (lang_decode_option): Set argc argument unused. Fixed
e64c46ce 18272 indentation. Added cast to remove warning.
0a2138e2
APB
18273 (lang_printable_name): Set v argument unused.
18274 (lang_print_error): Added argument to lang_printable_name call.
18275 (java_dummy_print, print_lang_decl, print_lang_type,
e64c46ce
AJ
18276 print_lang_identifier, lang_print_xnode): All argument marked
18277 unused.
0a2138e2
APB
18278 * lex.c (java_unget_unicode): Removed unnecessary argument.
18279 (java_allocate_new_line): Unused local variable is gone.
18280 (java_read_char): Added parenthesis in expressions to remove
e64c46ce 18281 warnings. Added final return statement.
0a2138e2 18282 (java_read_unicode): Added parenthesis in expression to remove
e64c46ce 18283 warning.
0a2138e2
APB
18284 (java_parse_end_comment): Fixed java_unget_unicode invocation.
18285 (java_parse_escape_sequence): Likewise.
18286 (java_lex): Unused local variables are gone. Fixed
e64c46ce 18287 java_unget_unicode invocation.
0a2138e2 18288 * lex.h (set_float_handler): Prototype added when JC1_LITE not
e64c46ce 18289 defined.
0a2138e2 18290 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
e64c46ce 18291 lang_printable_name invocation in macro.
0a2138e2 18292 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
e64c46ce 18293 Likewise.
0a2138e2 18294 (duplicate_declaration_error): Suppressed unused argument in
e64c46ce 18295 prototype.
0a2138e2
APB
18296 (identical_subpath_p): Function declaration is gone.
18297 (patch_invoke): Suppressed unused argument in prototype.
18298 (patch_cast, build_labeled_block, check_thrown_exceptions):
e64c46ce 18299 Likewise.
0a2138e2
APB
18300 * parse.y (setjmp.h): Included
18301 (toplev.h): Likewise.
18302 (field_declaration:): Suppressed unused local
18303 (label_decl:): Fixed build_labeled_block invocation.
18304 (java_pop_parser_context): Put extra parenthesis around assignment
e64c46ce 18305 in if.
0a2138e2
APB
18306 (yyerror): Suppressed unused local variables.
18307 (variable_redefinition_error): Fixed lang_printable_name
e64c46ce 18308 invocation.
0a2138e2
APB
18309 (create_interface): Suppressed unused local variables.
18310 (create_class): Likewise.
18311 (duplicate_declaration_error): Suppressed unused argument. Fixed
e64c46ce 18312 lang_printable_name invocation.
0a2138e2 18313 (register_fields): Suppressed unused local variable. Fixed
e64c46ce 18314 duplicate_declaration_error invocation.
0a2138e2
APB
18315 (method_header): Suppressed unused local variable.
18316 (method_declarator, parser_check_super): Likewise.
18317 (java_complete_class): Suppressed unused local variable. Fixed
e64c46ce 18318 fatal error message.
0a2138e2
APB
18319 (complete_class_report_errors): Added default: in switch.
18320 (java_check_regular_methods): Fixed lang_printable_name
e64c46ce 18321 invocations.
0a2138e2
APB
18322 (check_throws_clauses): Likewise.
18323 (java_check_abstract_methods): Suppressed unused local
e64c46ce 18324 variable. Fixed lang_printable_name invocation.
0a2138e2
APB
18325 (read_import_entry): Added supplemental return statement.
18326 (read_import_dir): Suppressed unused local variables.
18327 (check_pkg_class_access, declare_local_variables): Likewise.
18328 (source_start_java_method): Suppressed unused extern variable
e64c46ce 18329 declarations
0a2138e2 18330 (expand_start_java_method): Suppressed unused extern and local
e64c46ce 18331 variable declarations.
0a2138e2
APB
18332 (java_complete_expand_methods): Likewise.
18333 (java_complete_expand_method): Suppressed unused local variables.
18334 (make_qualified_name): Likewise.
18335 (resolve_qualified_expression_name): Added default: in
e64c46ce 18336 switch. Fixed lang_printable_name invocation.
0a2138e2 18337 (class_instance_creation_expression): Added parenthesis around
e64c46ce 18338 expressions.
0a2138e2 18339 (patch_method_invocation_stmt): Fixed lang_printable_name and
e64c46ce 18340 patch_invoke invocations.
0a2138e2 18341 (check_for_static_method_reference): Fixed lang_printable_name
e64c46ce 18342 invocation.
0a2138e2
APB
18343 (patch_invoke): Suppressed unused arguments and local variables.
18344 (lookup_method_invoke): Suppressed unused local variables.
18345 (qualify_ambiguous_name): Added default: in switch.
18346 (identical_subpath_p): Function removed.
18347 (patch_assignment): Suppressed unused local variables. Suppressed
e64c46ce 18348 unnecessary if statement. Fixed lang_printable_name invocations.
0a2138e2
APB
18349 (try_builtin_assignconv): Fixed lang_printable_name invocations.
18350 (valid_ref_assignconv_cast_p): Parenthesis around
e64c46ce 18351 expression. Suppressed unused local variables.
0a2138e2 18352 (build_binop): Suppressed unused local variables. fixed
e64c46ce 18353 lang_printable_name invocations.
0a2138e2 18354 (string_constant_concatenation): Suppressed unused local
e64c46ce 18355 variables.
0a2138e2
APB
18356 (patch_unaryop): Fixed lang_printable_name invocation.
18357 (patch_cast): Suppressed unnecessary argument. Fixed
e64c46ce 18358 lang_printable_name invocation.
0a2138e2
APB
18359 (patch_array_ref): Fixed lang_printable_name invocation.
18360 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18361 (build_labeled_block): Suppressed unused argument.
18362 (generate_labeled_block): Fixed build_labeled_block invocation.
18363 (build_loop_body): Suppressed unused local variables.
18364 (patch_loop_statement): Likewise.
18365 (patch_exit): Fixed lang_printable_name invocation.
18366 (patch_switch_statement): Likewise.
18367 (case_identity): First argument marked unused.
18368 (patch_try_statement): Fixed lang_printable_name invocations.
18369 (patch_synchronized_statement, patch_throw_statement): Likewise.
18370 (check_thrown_exceptions): Fixed check_thrown_exceptions and
e64c46ce 18371 lang_printable_name invocations.
0a2138e2
APB
18372 (check_thrown_exceptions_do): Suppressed unused argument.
18373
fc45c7ef
TT
183741998-10-14 Tom Tromey <tromey@cygnus.com>
18375
18376 * jcf-write.c (write_classfile): Add output class file as target.
18377 * lang-options.h: Added -MD, -MMD, -M, and -MM.
18378 * jcf.h: Added declarations for dependency-tracking functions.
18379 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18380 * lang.c (lang_decode_option): Recognize -MD and -MMD.
18381 (finish_parse): Call jcf_dependency_write.
18382 (dependency_tracking): New global.
18383 (DEPEND_SET_FILE): New define.
18384 (DEPEND_ENABLE): New define.
18385 (init_parse): Enable dependency tracking if required.
18386 Include "flags.h".
18387 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18388 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18389 (../gcjh$(exeext)): Likewise.
18390 (jcf-depend.o): New target.
18391 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18392 (GCJH_SOURCES): Likewise.
18393 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
18394 dep_name argument.
18395 (find_classfile): Added dep_name argument.
18396 (find_class): Compute name of dependency.
18397 (open_in_zip): Call jcf_dependency_add_file.
18398 * gjavah.c (output_file): No longer global.
18399 (usage): Don't mention "gjavah".
18400 (help): Likewise.
18401 (java_no_argument): Likewise.
18402 (version): Likewise.
18403 (main): Recognize and handle -M family of options.
18404 (print_mangled_classname): Return is void.
18405 (process_file): Handle case where output is suppressed.
18406 (HANDLE_END_FIELD): Likewise.
18407 (HANDLE_METHOD): Likewise.
18408 * jcf-depend.c: New file.
18409
62c9aa5f 184101998-10-13 Jeffrey A Law (law@cygnus.com)
bcf6c7e3
JL
18411
18412 * java-tree.def: Add missing newline at EOF.
18413
0a65887a
TT
184141998-10-13 Tom Tromey <tromey@cygnus.com>
18415
18416 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18417 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
18418 function.
18419 Include <config.h> and "system.h".
18420 (disassemble_method): Undefine RET to avoid clash with
18421 config/i386/i386.h.
18422
62c9aa5f 184231998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
b9f7e36c
APB
18424
18425 * decl.c (runtime_exception_type_node, error_exception_type_node):
e64c46ce 18426 New global variables.
b9f7e36c
APB
18427 (init_decl_processing): Initialized.
18428 * expr.c (java_lang_expand_expr): Set caught exception type to
e64c46ce 18429 null if catch handler argument doesn't exit.
b9f7e36c 18430 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
e64c46ce 18431 tree codes.
b9f7e36c 18432 * java-tree.h (runtime_exception_type_node,
e64c46ce 18433 error_exception_type_node): Global variables declared.
b9f7e36c
APB
18434 (DECL_FUNCTION_THROWS): New macro.
18435 (DECL_FUNCTION_BODY): Modified comment.
18436 (DECL_SPECIFIC_COUNT): Likewise.
18437 (struct lang_decl): New field throws_list.
18438 (IS_UNCHECKED_EXPRESSION_P): New macro.
18439 * lex.c (java_lex): Generate location information for THROW_TK.
18440 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
e64c46ce 18441 EXCEPTIONS_P): New macros.
b9f7e36c
APB
18442 (enum jdep_code): New value JDEP_EXCEPTION.
18443 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
e64c46ce
AJ
18444 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18445 PATCH_METHOD_RETURN_ERROR): New macros.
b9f7e36c
APB
18446 (patch_method_invocation_stmt): Added new argument to prototype.
18447 (patch_synchronized_statement, patch_throw_statement,
e64c46ce
AJ
18448 check_thrown_exceptions, check_thrown_exceptions_do,
18449 purge_unchecked_exceptions, check_throws_clauses): New function
18450 prototypes.
b9f7e36c
APB
18451 * parse.y Fixed typo in keyword section.
18452 (throw:): Rule tagged <node>.
18453 (THROW_TK): Keyword tagged <operator>.
18454 (method_header:): Last argument to call to method_header passed
e64c46ce 18455 from throws: rule.
b9f7e36c 18456 (throws:, class_type_list:, throw_statement:,
e64c46ce 18457 synchronized_statement:, synchronized:): Defined actions.
b9f7e36c 18458 (method_header): New local variable current. Register exceptions
e64c46ce 18459 from throws clause.
b9f7e36c 18460 (java_complete_tree): Complete and verify exceptions from throws
e64c46ce 18461 clause.
b9f7e36c 18462 (complete_class_report_errors): Error message on exceptions not
e64c46ce 18463 found
b9f7e36c 18464 (java_check_regular_methods): Fixed typo. Shortcut on private
e64c46ce
AJ
18465 overriding methods. Changed error message on method
18466 redefinition. Check for throws clause compatibility.
b9f7e36c
APB
18467 (check_throws_clauses): New function.
18468 (java_check_abstract_methods): Use DECL_NAME for wfl or current
e64c46ce 18469 method. Changed error message on method redefinition.
b9f7e36c
APB
18470 (currently_caught_type_list): New static variable.
18471 (java_complete_expand_methods): Purge unchecked exceptions from
e64c46ce
AJ
18472 throws clause list. Call PUSH_EXCEPTIONS before walk and
18473 POP_EXCEPTIONS after.
b9f7e36c 18474 (resolve_qualified_expression_name): Pass new argument as NULL to
e64c46ce 18475 patch_method_invocation_stmt.
b9f7e36c 18476 (patch_method_invocation_stmt): New argument ref_decl. Invoke
e64c46ce
AJ
18477 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18478 argument list when appropriate. Use new argument if non null to
18479 store selected method decl.
b9f7e36c 18480 (patch_invoke): Convert if necessary args of builtin types before
e64c46ce 18481 forming CALL_EXPR. Argument list no longer reversed here.
b9f7e36c
APB
18482 (invocation_mode): Treat final methods as static methods.
18483 (java_complete_tree): New cases for THROW_EXPR: and
e64c46ce
AJ
18484 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18485 function call.
b9f7e36c 18486 (complete_function_arguments): No more RECORD_TYPE
e64c46ce 18487 conversion. Function parameter nodes no longer saved.
b9f7e36c
APB
18488 (valid_ref_assignconv_cast_p): Avoid handling null type.
18489 (patch_binop): Fixed null constant reference handling.
18490 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
e64c46ce 18491 BUILD_THROW macros.
b9f7e36c 18492 (patch_try_statement): Fixed comments. Record caught types in
e64c46ce 18493 list, push the list, expand try block and pop the list.
b9f7e36c 18494 (patch_synchronized_statement, patch_throw_statement,
e64c46ce
AJ
18495 check_thrown_exceptions, check_thrown_exceptions_do,
18496 purge_unchecked_exceptions): New functions.
b9f7e36c 18497 * typeck.c (lookup_argument_method): Allow WFL in place of method
e64c46ce 18498 DECL_NAME during method definition check
f6bbde28 18499
6d6044b0
PB
185001998-10-09 Tom Tromey <tromey@cygnus.com>
18501
18502 * gjavah.c (decode_signature_piece): New function.
18503 (print_c_decl): Use it. Added `name_override' argument.
18504 (print_method_info): Use name_override argument to print_c_decl.
18505 (seen_fields): Removed.
18506 (print_field_info): Don't update seen_fields.
18507 (struct method_name): New structure.
18508 (method_name_list): New global.
18509 (print_method_info): Add new method to list of methods.
18510 (name_is_method_p): New function.
18511 (print_field_info): If field name has same name as method, then
18512 change field name.
18513 (process_file): Parse methods before fields.
18514 (field_pass): New global.
18515 (HANDLE_END_FIELD): Take field_pass into account.
18516
62c9aa5f 185171998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13abbf47
KG
18518
18519 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18520 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18521
62c9aa5f 185221998-10-03 Anthony Green <green@cygnus.com>
6d6044b0
PB
18523
18524 * jvspec.c: Fix bug in jvgenmain_spec patch.
18525
62c9aa5f 185261998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
18527
18528 * Makefile.in (lang.o:): Install dependency on java-tree.def.
18529 * decl.c (soft_exceptioninfo_call_node): New global variable.
18530 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
e64c46ce
AJ
18531 takes extra integer argument. soft_exceptioninfo_call_node
18532 initialized.
6d6044b0
PB
18533 * except.c (java_set_exception_lang_code): New function
18534 (method_init_exceptions): Called here.
18535 (prepare_eh_table_type): New function.
18536 (expand_end_java_handler): Called here.
18537 * expr.c (build_java_throw_out_of_bounds_exception): Now features
e64c46ce
AJ
18538 one argument. Modified generation of call to
18539 soft_badarrayindex_node to use new argument.
6d6044b0 18540 (build_java_arrayaccess): Pass faulty index value to
e64c46ce 18541 build_java_throw_out_of_bounds_exception.
6d6044b0
PB
18542 (generate_name): New function.
18543 (java_lang_expand_expr): New local variables node, current,
e64c46ce 18544 has_finally_p. Expand TRY_EXPR node.
6d6044b0 18545 (process_jvm_instruction): Replace top of the stack with thrown
e64c46ce 18546 object reference when entering exception handler.
6d6044b0 18547 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
e64c46ce 18548 specific tree codes.
6d6044b0 18549 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
e64c46ce 18550 global.
6d6044b0
PB
18551 (DECL_SPECIFIC_COUNT): New macro.
18552 (prepare_eh_table_type, java_set_exception_lang_code,
e64c46ce 18553 generate_name): New function declarations.
6d6044b0
PB
18554 (match_java_method): Declaration deleted.
18555 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
e64c46ce 18556 macros.
6d6044b0
PB
18557 * lex.c (TRY_TK, CATCH_TK): Generate location information.
18558 * parse.h (redefinition_error, refine_accessible_methods_list,
e64c46ce 18559 can_cast_to_p): Function declaration removed.
6d6044b0 18560 (classitf_redefinition_error, variable_redefinition_error,
e64c46ce
AJ
18561 parse_jdk1_1_error, find_applicable_accessible_methods_list,
18562 find_most_specific_methods_list, argument_types_convertible,
18563 enter_a_block, valid_builtin_assignconv_identity_widening_p,
18564 valid_cast_to_p, valid_method_invocation_conversion_p,
18565 try_reference_assignconv, add_stmt_to_compound,
18566 build_jump_to_finally, build_tree_list, patch_try_statement,
18567 java_get_catch_block): New function declarations.
6d6044b0
PB
18568 * parse.y (string_buffer_type): Global variable deleted.
18569 (group_of_labels, catches, catch_clause, catch_clause_parameter,
e64c46ce 18570 finally): Rules tagged <node>.
6d6044b0
PB
18571 (TRY_TK, CATCH_TK): Token tagged <operator>.
18572 (class_body_declaration:, class_member_declaration:,
e64c46ce
AJ
18573 formal_parameter:, explicit_constructor_invocation:,
18574 interface_member_declaration:, constant_declaration:,
18575 primary_no_new_array:, class_instance_creation_expression:,
18576 array_creation_expression:): Issue error on unsuported JDK1.1
18577 features.
6d6044b0
PB
18578 (try_statement:, catches:, finally:): Define actions.
18579 (catch_clause_parameter): New rule.
18580 (catch_clause:): Use new rule catch_clause_parameter.
18581 (parse_jdk1_1_error): New function.
18582 (redefinition_error): Renamed classitf_redefinition_error.
18583 (variable_redefinition_error): New function.
18584 (check_class_interface_creation): Call
e64c46ce 18585 classitf_redefinition_error.
6d6044b0
PB
18586 (java_complete_tree): Added error message on JDEP_TYPE: case.
18587 (complete_class_report_errors): Fixed indentation.
18588 (declare_local_variables): Call variable_redefinition_error.
18589 (source_end_java_method): Call java_set_exception_lang_code and
e64c46ce 18590 emit_handlers where appropriate.
6d6044b0
PB
18591 (java_method_add_stmt): Call add_stmt_to_block.
18592 (add_stmt_to_block): New function.
18593 (lookup_method_invoke): Fixed outside comment. new local variable
e64c46ce
AJ
18594 candicates. Call find_applicable_accessible_methods_list and
18595 find_most_specific_methods_list when searching for a
18596 method. Modified error report to list possible candidates when
18597 applicable.
6d6044b0 18598 (find_applicable_accessible_methods_list,
e64c46ce
AJ
18599 find_most_specific_methods_list, argument_types_convertible): New
18600 function.
6d6044b0
PB
18601 (refine_accessible_methods_list): Function deleted.
18602 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
e64c46ce 18603 expr (if applicable) before calling patch_array_ref.
6d6044b0
PB
18604 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18605 (enter_block): Fixed comment.
18606 (enter_a_block): New function.
18607 (patch_assignment): Reorganized. Call try_reference_assignconv for
e64c46ce 18608 references. Call valid_cast_to_p instead of can_cast_to_p.
6d6044b0 18609 (try_reference_assignconv,
e64c46ce 18610 valid_builtin_assignconv_identity_widening_p): New functions.
6d6044b0
PB
18611 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18612 (valid_cast_to_p, valid_method_invocation_conversion_p): New
e64c46ce 18613 functions.
6d6044b0
PB
18614 (build_string_concatenation): Don't resolve StringBuffer.
18615 (patch_cast): Fixed inverted arguments.
18616 (patch_array_ref): Code to save array expr deleted. Call
e64c46ce 18617 valid_cast_to_p instead of can_cast_to_p.
6d6044b0
PB
18618 (generate_labeled_block): Call generate_name.
18619 (build_jump_to_finally, build_try_statement, java_get_catch_block,
e64c46ce 18620 patch_try_statement): New functions.
6d6044b0 18621 * typeck.c (match_java_method): Function deleted.
f6bbde28 18622
62c9aa5f 186231998-10-02 Anthony Green <green@cygnus.com>
6d6044b0
PB
18624
18625 * jvspec.c: jvgenmain_spec uses different temporary file names.
18626
62c9aa5f 186271998-10-02 Anthony Green <green@cygnus.com>
6d6044b0
PB
18628
18629 * jvspec.c (lang_specific_driver): Fail if user specifies
18630 --main= when not linking.
18631
62c9aa5f 186321998-09-28 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18633
18634 * class.c (make_class_data): Push value for `thread' field.
18635 * decl.c (init_decl_processing): Added `thread' field to class.
18636
18637 * class.c (add_field): Always make static fields externally
18638 visible.
18639
62c9aa5f 186401998-09-26 Anthony Green <green@cygnus.com>
6d6044b0
PB
18641
18642 * expr.c (build_java_athrow,
18643 build_java_throw_out_of_bounds_exception, expand_invoke,
18644 build_newarray, expand_java_multianewarray, build_java_monitor):
18645 Update comments to reflect _Jv_* function names.
18646
62c9aa5f 186471998-09-25 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18648
18649 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
18650 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
18651 * parse.y (expand_start_java_method): Likewise.
18652
62c9aa5f 186531998-09-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18654
18655 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
18656
18657 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18658 (add_field): No longer need to convert from RECORD_TYPE to pointer,
18659 * expr.c: Remove no-longer-needed calls to promote_type.
18660 * decl.c (give_name_to_locals): Liekwise.
18661 * jcf-parse.c (get_class_constant): Compensate for new signatures.
18662 * parse.y: Add/remove promote_type calls as appropriate.
18663 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
18664 (parse_signature_string): Likewise.
e64c46ce 18665 (build_java_array_type): Fix for now signature convenions.
6d6044b0
PB
18666
18667 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
18668
62c9aa5f 186691998-09-23 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18670
18671 * class.c (init_class_processing): libjava function renamed to
18672 _Jv_RegisterClass.
18673
62c9aa5f 186741998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
18675
18676 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18677 * java-tree.def: Fixed DEFTREECODE third argument.
18678 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
e64c46ce 18679 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
6d6044b0
PB
18680 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18681 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
e64c46ce 18682 JAVA_THIS_EXPR): Now replaced by tree code definitions.
6d6044b0
PB
18683 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18684 * lang.c (java_tree_code_type, java_tree_code_length,
e64c46ce 18685 java_tree_code_name): New arrays.
6d6044b0
PB
18686 (lang_init): Append Java tree node definitions to Gcc ones.
18687 * lex.c (expression_obstack): Declared as extern when JC1_LITE
e64c46ce 18688 defined.
6d6044b0 18689 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
e64c46ce 18690 wfl_to_string.
6d6044b0 18691 (java_lex): Allow declaration of empty string constants. Retain
e64c46ce 18692 location information on CASE_TK and DEFAULT_TK.
6d6044b0 18693 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
e64c46ce
AJ
18694 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18695 Modified to be more robust.
6d6044b0
PB
18696 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18697 (build_new_invocation, try_builtin_assignconv,
e64c46ce
AJ
18698 patch_switch_statement, string_constant_concatenation,
18699 build_string_concatenation, patch_string_cst, patch_string,
18700 java_expand_switch): New function declarations.
6d6044b0
PB
18701 * parse.y: Rules related to switch and EH tagged <node>.
18702 (label_id): Set to NULL_TREE
18703 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
e64c46ce 18704 tree nodes.
6d6044b0
PB
18705 (this_or_super:): Fixed indentation.
18706 (statement:, statement_nsi:, statement_without_trailing_substatement:,
e64c46ce 18707 statement_expression:): Removed call to RULE on all sub-rules.
6d6044b0
PB
18708 (switch_expression:, switch_labels:): New rules.
18709 (switch_statement:, switch_block:, switch_block_statement_groups:,
e64c46ce
AJ
18710 switch_block_statement_group:, switch_labels:, switch_label:):
18711 Defined actions.
6d6044b0 18712 (throw_statement:, synchronized_statement:, try_statement:):
e64c46ce 18713 Defined temporary actions.
6d6044b0 18714 (class_instance_creation_expression:): Call
e64c46ce 18715 build_new_invocation. Fixed indentation.
6d6044b0
PB
18716 (field_access): Fixed indentation.
18717 (method_invocation): Likewise.
18718 (make_qualified_primary): Use THIS_EXPR.
18719 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
e64c46ce 18720 resolving from SUPER, set *type_found.
6d6044b0
PB
18721 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18722 (java_complete_tree): Removed unused local variable `location'. Case
e64c46ce
AJ
18723 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18724 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18725 on MODIFY_EXPR: and all binary operator tree code cases. Removed
18726 STRING_CST: case. default: checks for patchable strings.
6d6044b0 18727 (complete_function_arguments): Transform string constant or
e64c46ce 18728 crafted StringBuffer if necessary.
6d6044b0
PB
18729 (build_method_invocation): Fixed comments.
18730 (build_new_invocation): New function.
18731 (patch_assignment): Call try_builtin_assignconv to figure a valid
e64c46ce 18732 assignment conversion between builtin types.
6d6044b0
PB
18733 (try_builtin_assignconv): New function.
18734 (build_binop): Use URSHIFT_EXPR directly to call build.
18735 (operator_string): Use UNARY_PLUS_EXPR.
18736 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
e64c46ce 18737 operator.
6d6044b0 18738 (do_merge_string_cste, merge_string_cste,
e64c46ce
AJ
18739 string_constant_concatenation, build_string_concatenation,
18740 patch_string, patch_string_cst): New function.
6d6044b0
PB
18741 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18742 (patch_unaryop): Likewise. New test of valid ++/-- operands.
18743 (build_newarray_node): Use NEW_ARRAY_EXPR.
18744 (build_this): Use THIS_EXPR.
18745 (build_return): Enable debug information on return statement.
18746 (build_if_else_statement): Likewise.
18747 (complete_labeled_statement): Fixed related comment.
18748 (build_loop_body): Fixed comment.
18749 (build_bc_statement): Enable debug information on break/continue
e64c46ce 18750 statements.
6d6044b0 18751 (patch_bc_statement): Fixed typos. Handle SWITCH statement
e64c46ce 18752 context.
6d6044b0 18753 (patch_switch_statement, case_identity, java_expand_switch): New
e64c46ce 18754 functions.
6d6044b0 18755
62c9aa5f 187561998-09-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18757
18758 * buffer.h (BUFFER_INIT): New macro.
18759 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
18760 Pass (struct jcf_partial *state) to most functions.
18761 (jcf_block, jcf_relocation): New types.
18762 Support labels, branches, conditionals, loops.
18763
62c9aa5f 187641998-09-21 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18765
18766 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18767
62c9aa5f 187681998-09-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18769
18770 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
18771 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
18772 not integer_type_node (INT_TYPE_SIZ bits).
18773
18774 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
18775
18776 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
18777 * jcf-dump.c (print_exception_table): New function.
18778 (disassemble_method): Better handling of wide instructions.
18779 Make more robust for bad input.
18780
62c9aa5f 187811998-09-30 Jeffrey A Law (law@cygnus.com)
4f01de5c
JL
18782
18783 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18784 FreeBSD.
18785
62c9aa5f 187861998-09-17 Jeffrey A Law (law@cygnus.com)
da4f7dc1
JL
18787
18788 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18789
62c9aa5f 187901998-09-17 Tom Tromey <tromey@cygnus.com>
4a4a4682
TT
18791
18792 * Makefile.in ($(PARSE_H)): Removed target.
18793
62c9aa5f 187941998-09-17 Jeffrey A Law (law@cygnus.com)
e6a480d3
JL
18795
18796 * Makefile.in (JAVA_OBJS): Add memmove.o
18797 (memmove.o): New target & rules.
18798
62c9aa5f 187991998-09-15 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18800
18801 * expr.c (expand_invoke): Don't generate a call to the class init
18802 code.
18803
62c9aa5f 188041998-09-14 Jeffrey A Law (law@cygnus.com)
1f43f4b4
JL
18805
18806 * Makefile.in: Add many missing dependencies.
18807 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18808 as appropriate.
18809 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18810 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18811
62c9aa5f 188121998-09-11 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18813
18814 * decl.c (complete_start_java_method): If method is static (and
18815 not private) call _Jv_InitClass.
18816 * expr.c (expand_invoke): Don't call build_class_init.
18817
18818 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
18819
62c9aa5f 188201998-09-10 Jeffrey A Law (law@cygnus.com)
76f42086
JL
18821
18822 * Make-lang.in (GCJ): Define before using.
18823
62c9aa5f 188241998-09-09 Jeffrey A Law (law@cygnus.com)
71d05349
JL
18825
18826 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18827 losing due to namespace pollution in GNU getopt.h
18828
62c9aa5f 188291998-09-09 Tom Tromey <tromey@cygnus.com>
232e6c7c
TT
18830
18831 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18832 (java.all.cross): Likewise.
18833 (java.rest.encap): Likewise.
18834
62c9aa5f 188351998-09-08 Jeffrey A Law (law@cygnus.com)
e742fecc
JL
18836
18837 * gjavah.c (print_class_decls): Fix thinko in arglist
18838 * jcv-io.c (find_classfile): Similarly.
18839
62c9aa5f 188401998-09-07 Jeffrey A Law (law@cygnus.com)
5db17173
JL
18841
18842 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18843
62c9aa5f 188441998-09-05 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18845
18846 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18847 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18848 * Makefile.in (PARSE_C): New macro.
18849 (PARSE_H): Likewise.
18850 (PARSE_SCAN_C): Likewise.
18851 ($(PARSE_C)): Target renamed from parse.c.
18852 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18853 (clean): Remove parse-scan.c as well.
18854 (parse.o): Depend on $(PARSE_C).
18855
62c9aa5f 188561998-09-05 Anthony Green <green@cygnus.com>
6d6044b0
PB
18857
18858 * README, license.terms: Removed.
18859
18860 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18861 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18862 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18863 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18864 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18865 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18866 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18867 and Java trademark attribution.
18868
62c9aa5f 188691998-09-04 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18870
18871 * Makefile.in: Use gcjh, not gjavah.
18872 * config-lang.in (stagestuff): Use gcjh, not gjavah.
18873 * Make-lang.in: Changed gjavah to gcjh everywhere.
18874
62c9aa5f 188751998-09-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18876
18877 * gjavah.c: Support new -prepend -add -append flags.
f6bbde28 18878 (print_method_info): Method is not virtual if class is final.
6d6044b0 18879
62c9aa5f 188801998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
18881
18882 * jv-scan.c: Fixed copyright assignment.
18883 * keyword.gperf: Likewise.
18884 * keyword.h: Likewise.
18885 * lex.c: Fixed copyright assignment.
18886 (java_lex): Push unicode back when parsing '<'.
18887 * lex.h: Fixed copyright assignment.
18888 * parse-scan.y: Likewise.
18889 * parse.h: Fixed copyright assignment.
18890 (build_debugable_stmt, complete_for_loop): New function prototypes.
18891 * parse.y: Fixed copyright assignment.
18892 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
e64c46ce 18893 size_zero_node when completing a loop with no exit condition.
6d6044b0
PB
18894 (for_statement_nsi:): Define action.
18895 (for_init:, for_update:): Return size_zero_node when empty.
18896 (declare_local_variables): Call build_debugable_stmt.
18897 (build_debugable_stmt): New function.
18898 (build_loop_body): Build debugable statement around loop
e64c46ce 18899 condition part.
6d6044b0
PB
18900 (complete_loop_body): Take into account the debugable statement
18901 around the EXIT_EXPR.
18902 (complete_loop_body): New function.
18903 (patch_exit_expr): Fixed condition inversion.
18904
62c9aa5f 189051998-09-02 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18906
18907 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18908 name of thread define.
18909 * jvspec.c (THREAD_NAME): New macro.
18910 (GCLIB): Likewise.
18911 (THREADLIB): Likewise.
18912 (lang_specific_driver): Recognize attempt to link with thread
18913 library or gc library. Recognize -ljava on command line so it
18914 isn't linked against more than once.
18915
62c9aa5f 189161998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
18917
18918 * parse-scan.y (report_main_declaration): Name of the class
e64c46ce 18919 containing `main' can be a qualified name.
6d6044b0 18920
62c9aa5f 189211998-08-31 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18922
18923 * config-lang.in: Changed gjavac to gjc everywhere.
18924 * Make-lang.in: Changed gjavac to gjc everywhere.
18925
62c9aa5f 189261998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
18927
18928 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18929 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18930 and install the files.
18931 * Makefile.in (JAVA_OBJS_LITE): New variable.
18932 (compiler:): Now include jv-scan as a dependency.
18933 (../jv-scan$(exeext), parse-scan.c): New targets.
18934 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18935 * config-lang.in (compilers): Removed gcj, gjavah from the list.
18936 * jcf-parse.c (parse_source_file): Call java_layout_classes and
e64c46ce 18937 check for errors even if parse_only.
6d6044b0 18938 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
e64c46ce 18939 defined.
6d6044b0
PB
18940 (yylex): New function. Uses java_lex body.
18941 (java_lex): Removed commented out statement. Remove local variable
e64c46ce
AJ
18942 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18943 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18944 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18945 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18946 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18947 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18948 where appropriate.
6d6044b0
PB
18949 (java_lex_error): Empty if JC1_LITE is defined.
18950 (java_get_line_col): Return 0 if JC1_LITE is defined.
18951 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
e64c46ce
AJ
18952 SET_MODIFIER_CTX): Moved into the section containing the macros
18953 conditionally defined by JC1_LITE.
6d6044b0 18954 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
e64c46ce 18955 argument if JC1_LITE is defined.
6d6044b0 18956 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
e64c46ce
AJ
18957 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18958 is defined.
6d6044b0 18959 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
e64c46ce
AJ
18960 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18961 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18962 to different values according to JC1_LITE.
6d6044b0 18963 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
e64c46ce 18964 declared if JC1_LITE set.
6d6044b0 18965 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
e64c46ce 18966 defined if JC1_LITE not set.
6d6044b0 18967 (struct parser_ctx): Reorganized and skip the jc1 front end part
e64c46ce 18968 if JC1_LITE set.
6d6044b0
PB
18969 (java_layout_classes): New function definition.
18970 (java_push_parser_context, java_init_lex, yyparse, yylex,
e64c46ce
AJ
18971 yyerror): Prototype always declared. All other static function
18972 prototypes declared only if JC1_LITE is not set.
6d6044b0 18973 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
e64c46ce 18974 declared in parse.h.
6d6044b0 18975 (java_layout_classes): New function.
e64c46ce 18976 (java_complete_expand_methods): No longer layout the class here.
6d6044b0
PB
18977 * parse-scan.y: New file.
18978 * jv-scan.c: New file.
18979
62c9aa5f 189801998-08-25 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
18981
18982 * gjavah.c (main): Handle -friend option.
18983 (friend_specs): New global.
18984 (generate_access): Handle friend_specs.
18985 (process_file): Likewise.
18986 (MAX_FRIENDS): New macro.
18987 (friend_count): New global.
18988 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
18989 Changed all callers.
18990
62c9aa5f 189911998-08-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18992
18993 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
18994 (main): Handle processing all the entries of a named .zip archive.
18995 * jcf-io.c (jcf_trim_old_input): New function.
18996 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
18997
62c9aa5f 189981998-08-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
18999
19000 * lang.c (flag_assume_compiled): Make default be on.
19001
62c9aa5f 190021998-08-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19003
19004 * jcf-dump.c: Add bunches of flags to control output more.
19005 (process_class): New function; support printing more than one class.
19006 (main): Support new --print-main and --javap flags.
19007 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
19008 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
19009
62c9aa5f 190101998-08-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19011
19012 Change mangling of dispatch table to match C++ vtable (w/thunks).
19013 * class.c (build_dtable_decl), java-tree.h: New function.
19014 (make_class_data): Call it.
19015 * decl.c (init_decl_processing): Likewise.
19016
62c9aa5f 190171998-08-19 Warren Levy <warrenl@cygnus.com>
6d6044b0
PB
19018
19019 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
e64c46ce 19020 soft_anewarray; adjust args passed.
6d6044b0 19021 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
e64c46ce 19022 match _Jv_NewObjectArray.
f6bbde28 19023
62c9aa5f 190241998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19025
19026 * decl.c (push_labeled_block, pop_labeled_block): New functions.
19027 * expr.c (loopup_label): Call create_label_decl.
19028 (create_label_decl): New function.
19029 (java_lang_expand_expr): Call expand_start_bindings with argument
e64c46ce 19030 set to zero.
6d6044b0 19031 * java-tree.h Added space after PROTO in function declarations
e64c46ce 19032 when necessary.
6d6044b0
PB
19033 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19034 (create_label_decl, push_labeled_block): New function
e64c46ce 19035 declarations.
6d6044b0
PB
19036 * lex.c (label_id): Initialize.
19037 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
e64c46ce 19038 switch.
6d6044b0 19039 * parse.h Added space after PROTO in function declarations when
e64c46ce 19040 necessary.
6d6044b0 19041 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
e64c46ce
AJ
19042 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19043 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19044 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19045 macros.
6d6044b0 19046 (struct parser_ctxt): New fields current_loop,
e64c46ce 19047 current_labeled_block.
6d6044b0 19048 (build_if_else_statement, patch_if_else_statement,
e64c46ce
AJ
19049 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19050 generate_labeled_block, complete_labeled_statement,
19051 build_bc_statement, patch_bc_statement, patch_loop_statement,
19052 build_new_loop, build_loop_body, complete_loop_body): New function
19053 declarations.
6d6044b0
PB
19054 * parse.y (java_warning_count): New global variable.
19055 (label_id): New static variable.
19056 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19057 (block:): Return size_zero_node when block is empty.
19058 (empty_statement:): Return size_zero_node.
19059 (statement:): Implement supplemental action when for_statement: is
e64c46ce 19060 reduced.
6d6044b0
PB
19061 (label_decl:): New rule.
19062 (labeled_statement:): Rewritten using label_decl. Actions
e64c46ce 19063 implemented.
6d6044b0
PB
19064 (labeled_statement_nsi:): Likewise.
19065 (if_then_statement): Actions implemented.
19066 (while_expression): New rule.
19067 (while_statement:): Rewritten using while_expression. Actions
e64c46ce 19068 implemented.
6d6044b0
PB
19069 (while_statement_nsi:): Likewise.
19070 (do_statement_begin:): New rule.
19071 (do_statement:): Rewritten using do_statement_begin. Actions
e64c46ce 19072 implemented.
6d6044b0
PB
19073 (for_statement:): Rewritten using for_begin. Actions implemented.
19074 (for_statement_nsi:): Likewise.
19075 (for_header:, for_begin:): New rules.
19076 (for_init:): Actions implemented.
19077 (statement_expression_list:, break_statement:,
e64c46ce 19078 continue_statement:): Likewise.
6d6044b0
PB
19079 (yyerror): Count number of issued warning(s).
19080 (java_report_errors): Report error(s) and/or warning(s).
19081 (java_complete_class): Use build_java_argument_signature to
e64c46ce 19082 recompute completed method signature.
6d6044b0 19083 (java_check_regular_methods): New locals method_wfl and aflags.
e64c46ce
AJ
19084 Use method_wfl instead of lookup_cl during error reports. Fixed
19085 indentation and modified some error messages. Use
19086 lang_printable_name in method instead of the DECL_NAME. New code
19087 to issue warnings on methods not overriding corresponding methods
19088 private to a different package.
6d6044b0
PB
19089 (java_method_add_stmt): Call add_stmt_to_compound.
19090 (add_stmt_to_compound): New function.
19091 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
e64c46ce 19092 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
6d6044b0 19093 (build_if_else_statement, patch_if_else_statement,
e64c46ce
AJ
19094 build_labeled_block, generate_labeled_block,
19095 complete_labeled_statement, build_new_loop, build_loop_body,
19096 complete_loop_body, patch_loop_statement, build_bc_statement,
19097 patch_bc_statement, patch_exit_expr): New functions.
6d6044b0 19098 * typeck.c (build_java_signature): Build argument signature before
e64c46ce 19099 enclosing it in between parenthesis.
f6bbde28 19100
62c9aa5f 191011998-08-17 Warren Levy <warrenl@cygnus.com>
6d6044b0
PB
19102
19103 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
e64c46ce 19104 (JAVA_OBJS): Added reminder comment
6d6044b0 19105
62c9aa5f 191061998-08-13 Nick Clifton <nickc@cygnus.com>
6d6044b0
PB
19107
19108 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19109 be interpreted as a long long.
19110
62c9aa5f 191111998-08-13 Warren Levy <warrenl@cygnus.com>
6d6044b0
PB
19112
19113 * decl.c (init_decl_processing): Use _Jv_InitClass, not
e64c46ce
AJ
19114 soft_initialise_class. Use _Jv_NewMultiArray, not
19115 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
19116 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
19117 _Jv_CheckArrayStore, not soft_checkarraystore. Use
19118 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
f6bbde28 19119
62c9aa5f 191201998-08-12 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19121
19122 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19123 length_identifier_node): New global tree node constants.
19124 * parse.y (kw_super, kw_this, kw_length): Removed globals.
19125 Replace uses by super_identifier_node etc.
19126 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
19127
19128 * parse.y (resolve_field_access): Don't special-case ".length" if
19129 flag_emit_class_files.
19130 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
19131 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
19132 and ARRAY.length.
19133
62c9aa5f 191341998-08-11 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19135
19136 * decl.c (init_decl_processing): Remove unused method_type_node fields.
19137 * class.c (make_method_value): Remove init for removed fields.
19138
19139 * class.c (layout_class): Use build_java_argument_signature.
19140 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
19141
19142 * typeck.c (push_java_argument_signature): Removed. Merged into ...
19143 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
19144 (build_java_signature): Don't use push_java_argument_signature.
19145
19146 * typeck.c (lookup_argument_method): New function.
19147 * parse.y (java_check_regular_methods): Use lookup_argument_method
19148 instead of lookup_java_method2 followed by lookup_java_method.
f6bbde28 19149
6d6044b0 19150 * parse.y (check_method_redefinition): Minor optimization.
f6bbde28 19151
6d6044b0
PB
19152 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
19153 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19154
62c9aa5f 191551998-08-10 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19156
19157 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19158 c-pragma.o.
19159
19160 * gjavah.c (java_float_finite): Use K&R-style definition.
19161 (java_double_finite): Likewise.
19162 (generate_access): Now returns void. Changed all callers.
19163 (last_access_generated): Removed.
19164 (process_file): Only make a single pass over the .class file.
19165
62c9aa5f 191661998-07-29 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19167
19168 * class.c (get_dispatch_table): Add extra dummy vtable entry,
19169 for compatibility for G++ (with -fvtable-thunks).
19170 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
19171
19172 * gjavah.c (process_file): Use public inheritance for super-class.
19173
62c9aa5f 191741998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19175
19176 * lex.c (java_init_lex): Initialize ctxp->package.
19177 * parse.h (struct parser_ctxt): package and package_len replaced
e64c46ce
AJ
19178 by tree package, an identifier node. Field method_decl_list is
19179 gone. Fixed comments.
6d6044b0 19180 (lookup_field_wrapper, merge_qualified_name, not_accessible,
e64c46ce 19181 class_in_current_package): New function prototypes.
6d6044b0 19182 * parse.y (array_type:): Set class loaded flag on primitive type
e64c46ce 19183 arrays.
6d6044b0 19184 (package_declaration:): Assign ctxp->package to the
e64c46ce 19185 identifier node.
6d6044b0 19186 (method_invocation:): Handle invocation of method qualified by
e64c46ce 19187 `super'.
6d6044b0
PB
19188 (single_type_import_declaration:): Removed ambiguity check.
19189 (java_pop_parser_context): New local variable `next'. Reset and
e64c46ce
AJ
19190 set IMPORT_CLASSFILE_NAME flags on current and previous import
19191 list.
6d6044b0
PB
19192 (java_accstring_lookup): Use new local macro COPY_RETURN.
19193 (lookup_field_wrapper): New function.
19194 (parser_qualified_classname): Use merge_qualified_name.
19195 (parser_check_super_interface): Broaden error message.
19196 (do_resolve_class): Check for qualified class name in the current
e64c46ce 19197 compilation unit if appropriate.
6d6044b0
PB
19198 (process_imports): Check for already defined classes.
19199 (check_pkg_class_access): Got rid of call to
e64c46ce 19200 get_access_flags_from_decl.
6d6044b0 19201 (java_complete_expand_methods): Call safe_layout_class based on
e64c46ce 19202 the current class size.
6d6044b0 19203 (make_qualified_primary): Build a WFL qualification on primary if
e64c46ce 19204 none exists.
6d6044b0
PB
19205 (merge_qualified_name): New function.
19206 (make_qualified_name): Use merge_qualified_name.
19207 (resolve_expression_name): Use safe_lookup_field.
19208 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19209 (resolve_qualified_expression_name): Likewise. Check on resolved
e64c46ce 19210 element accessibility.
6d6044b0
PB
19211 (not_accessible_p, class_in_current_package): New functions.
19212 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19213 (patch_method_invocation_stmt): Merged common pieces. Check
e64c46ce 19214 accessibility of invoked method.
6d6044b0 19215 (check_for_static_method_reference): Add returned type in error
e64c46ce 19216 message.
6d6044b0
PB
19217 (invocation_mode): Get rid of bogus check on PRIVATE methods.
19218 (refine_accessible_methods_list): Merged two conditions in test.
19219 (java_complete_class): Sanity check on stabilize_ref gone.
19220 * zextract.c (read_zip_archive): Cast lseek second argument to long.
f6bbde28 19221
62c9aa5f 192221998-07-28 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19223
19224 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
19225
62c9aa5f 192261998-07-24 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19227
19228 * gjavah.c (F_NAN): Removed.
19229 (F_NAN_MASK): New macro.
19230 (F_POSITIVE_INFINITY): Removed.
19231 (F_NEGATIVE_INFINITY): Likewise.
19232 (java_float_finite): Rewrote.
19233 (D_NAN_MASK): Renamed.
19234 (java_double_finite): Rewrote.
19235 (D_POSITIVE_INFINITY): Removed.
19236 (D_NEGATIVE_INFINITY): Likewise.
19237
19238 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19239 If verbose, print underlying representation of value in hex.
19240
62c9aa5f 192411998-07-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19242
19243 * buffer.h, buffer.c: New files.
19244 * Makefile.in (JAVA_OBJS): Add buffer.o.
19245
19246 Support locals variables and writing their debug entries to .class.
19247 * jcf-write.c: Simplify some by user new buffer type.
19248 (vode_buffer_grow): Removed.
19249 (struct localvar_info): New type.
19250 (localsvars, localvartable): New buffers.
19251 (localvar_alloc, localvar_free): New functions.
19252 (generate_bytecode_insns): Handle local variables.
19253 (generate_classfile): Write LocalVariableTable attribute.
19254
62c9aa5f 192551998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19256
19257 * jcf-io.c (open_in_zip): Check the zipfile magic number.
19258 * zipfile.h (ZIPMAGIC): New macro.
19259
62c9aa5f 192601998-07-24 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19261
19262 * Makefile.in (gjavah.o): Updated dependencies.
19263 (jcf-dump.o): Likewise.
19264 (all.indirect): Use ../gjavah.
19265 (../gjavah$(exeext)): Likewise.
19266 (clean): Don't remove gjavah.
19267 (clean): Remove parse.c, not java/parse.c.
19268 * Make-lang.in (java): Added gjavah.
19269 (gjavah$(exeext)): New target.
19270 (GJAVAH_SOURCES): New macro.
19271 (java.all.build): Added gjavah.
19272 (java.all.cross): Likewise.
19273 (java.rest.encap): Likewise.
19274 * config-lang.in (compilers, stagestuff): Added gjavah.
19275
62c9aa5f 192761998-07-23 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19277
19278 * gjavah.c (java_float_finite): New function.
19279 (java_double_finite): Likewise.
19280 (F_POSITIVE_INFINITY): New macro.
19281 (F_NEGATIVE_INFINITY): Likewise.
19282 (F_NAN): Likewise.
19283 (D_POSITIVE_INFINITY): Likewise.
19284 (D_NEGATIVE_INFINITY): Likewise.
19285 (D_NAN): Likewise.
19286 (print_field_info): Use java_float_finite and java_double_finite.
19287
62c9aa5f 192881998-07-23 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19289
19290 * parse.y (method_header): Name "this" implicit argument.
19291
62c9aa5f 192921998-07-22 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19293
19294 * jcf-write.c: Write out LineNumberTable attribute in .class file.
e64c46ce 19295 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
6d6044b0
PB
19296 (put_linenumber): New function.
19297 (generate_bytecode_insns, generate_classfile): Write line numbers.
19298
62c9aa5f 192991998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19300
19301 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19302 (lookup_name, build_known_method_ref, build_class_init,
e64c46ce
AJ
19303 build_invokevirtual, invoke_build_dtable, match_java_method,
19304 build_field_ref, pushdecl_force_head, build_java_binop,
19305 binary_numeric_promotion, build_decl_no_layout,
19306 build_java_arrayaccess, build_newarray, build_anewarray,
19307 build_java_array_length_access, build_java_arraynull_check): New
19308 extern function prototypes.
6d6044b0 19309 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
e64c46ce
AJ
19310 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19311 java-tree.h.
6d6044b0 19312 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
f6bbde28 19313 to NULL
6d6044b0
PB
19314 * jcf.h (jcf_out_of_synch): New extern function prototype.
19315 * parse.h: Static/global function implemented in parse.y
e64c46ce 19316 prototyped and declarations moved at the end of the file.
6d6044b0
PB
19317 (DECL_P): Check that the argument isn't null.
19318 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
e64c46ce 19319 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
6d6044b0
PB
19320 (QUAL_DECL_TYPE): New macro.
19321 (PARAMS): Macro definition removed.
19322 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19323 (return_statement:): Call build_return.
19324 (field_access:): Call make_qualified_primary in sub rule.
19325 (method_invocation:): Build method invocation and call
e64c46ce 19326 make_qualified_primary when processing primaries.
6d6044b0 19327 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
e64c46ce 19328 get_type_from_signature.
6d6044b0 19329 (java_check_regular_method): Extra integer 0 argument when calling
e64c46ce 19330 lookup_java_method2.
6d6044b0 19331 (lookup_java_interface_method2): Extra method DECL argument when
e64c46ce 19332 calling lookup_java_interface_method2.
6d6044b0 19333 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
e64c46ce 19334 COMPOUND_EXPR node.
6d6044b0 19335 (java_complete_expand_method): Layout current class iff not
e64c46ce 19336 already done. Don't process interface's methods.
6d6044b0 19337 (java_complete_expand_method): Use super class only if it
e64c46ce 19338 exists. Use current class otherwise.
6d6044b0
PB
19339 (make_qualified_primary): New function.
19340 (resolve_expression_name): Process qualified expression or
e64c46ce 19341 expression from primary the same way.
6d6044b0 19342 (resolve_expression_name): Two last arguments to
e64c46ce 19343 resolve_field_access are now NULL_TREEs.
6d6044b0 19344 (resolve_field_access): New variable is_static. Local field must
e64c46ce
AJ
19345 be DECLs. is_static computed on field DECLs only. Append code in
19346 where_found to the field access if necessary. Use QUAL_DECL_TYPE
19347 to initialize field_type.
6d6044b0 19348 (resolve_qualified_expression_name): New local variable,
e64c46ce
AJ
19349 previous_call_static and is_static. Handle primaries with function
19350 calls, casts, array references and `this'. `super' now handled as
19351 `(super_class)this'. Use is_static to clarify boolean expressions.
19352 Added code to handle case where a proper handle is required to
19353 access a field. Use QUAL_DECL_TYPE where applicable.
6d6044b0
PB
19354 (maybe_access_field): New function.
19355 (patch_method_invocation_stmt): New arguments primary, where,
e64c46ce
AJ
19356 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19357 deleted. Use `where' as a type to search from if specified. Check
19358 for static method reference where forbidden. Append primary or
19359 current_this to the argument list if not calling constructor nor
19360 static methods.
6d6044b0
PB
19361 (check_for_static_method_reference): New function.
19362 (patch_invoke): Layout the class on which new is done if
e64c46ce 19363 necessary.
6d6044b0 19364 (lookup_method_invoke): Changed format to report errors on
e64c46ce 19365 methods.
6d6044b0 19366 (qualify_ambiguous_name): New local variable this_found. Now
e64c46ce
AJ
19367 handle things from primaries. Method call are considered
19368 expression names.
6d6044b0 19369 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
e64c46ce 19370 changed into NULLs.
6d6044b0
PB
19371 (not_initialized_as_it_should_p): Comply with the new DECL_P.
19372 (java_complete_tree): New case fo RETURN_EXPR. Process function
e64c46ce 19373 call arguments in separate function.
6d6044b0
PB
19374 (complete_function_arguments): New function.
19375 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
e64c46ce 19376 anymore.
6d6044b0 19377 (patch_assignment): Take the return function slot into account as
e64c46ce 19378 a RHS. Distinguish assignment from a return.
6d6044b0 19379 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
e64c46ce 19380 when checking methods in interfaces.
6d6044b0 19381 (resolve_type_during_patch): NULL argument to unresolve_type_p
e64c46ce 19382 instead of NULL_TREE.
6d6044b0
PB
19383 (patch_newarray): Fixed typo in comment.
19384 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19385 (build_return, patch_return): New functions.
19386 * typeck.c (lookup_java_constructor): Fixed typo in comment.
f6bbde28 19387
62c9aa5f 193881998-07-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19389
19390 * constants.c (find_name_and_type_constant, find_fieldref_index,
19391 find_methodref_index): New methods.
19392 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
19393 just return given method. Also, rename to build_known_method_ref.
19394 (expand_invoke): Rename call to build_invoke_non_interface.
19395 * java-tree.h, parse.h: Update prototype.
19396 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
e64c46ce 19397 (such as expand_expr_stmt) if flag_emit_class_files.
6d6044b0
PB
19398 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19399 STACK_TARGET, IGNORE_TARGET): New macros.
e64c46ce 19400 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
6d6044b0
PB
19401 (generate_bytecode_insn): New function to generate method's bytecode.
19402 (generate_classfile): Node generate Code attribute for a method.
19403 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19404 push_long_const, field_op, adjust_typed_op, maybe_wide):
19405 New functions used by generate_bytecode_insn.
f6bbde28 19406
6d6044b0
PB
19407 * typeck.c (signature_include_return): Remove variable.
19408 (push_java_argument_signature, build_java_argument_signature): New.
19409 (build_java_signature): Use push_java_argument_signature.
19410 * parse.y: Use build_java_argument_signature instead of fiddling
19411 with signature_include_return.
19412
62c9aa5f 194131998-07-17 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19414
19415 * gjavah.c (print_c_decl): Always generate JArray<>* for array
19416 types.
19417
19418 * Makefile.in (all.indirect): Added gjavah$(exeext).
19419 (gjavah$(exeext)): Added $(exeext).
19420 (clean): Likewise.
19421
62c9aa5f 194221998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19423
19424 * class.c (layout_class): Call to java_layout_parsed_class replace
e64c46ce 19425 by safe_layout_class.
6d6044b0 19426 * expr.c (build_java_array_length_access): Removed static storage
e64c46ce 19427 class in the function definition.
f6bbde28 19428 (build_java_arraynull_check): Likewise.
6d6044b0
PB
19429 Also fixed typos in two comments.
19430 * lex.c (java_init_lex): Initialize static global kw_length.
19431 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19432 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
e64c46ce 19433 java_lex_error.
6d6044b0
PB
19434 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19435 * parse.h (resolve_no_layout): New static function declaration.
19436 (get_identifier_in_static): Declaration removed.
19437 (java_layout_parsed_class): Function name declaration changed to
e64c46ce 19438 safe_layout_class.
6d6044b0 19439 (build_newarray_node, patch_newarray, resolve_type_during_patch,
e64c46ce
AJ
19440 not_initialized_as_it_should_p, build_this): New static function
19441 declarations.
6d6044b0 19442 (pushdecl_force_head, build_java_binop, int_fits_type_p,
e64c46ce
AJ
19443 binary_numeric_promotion, stabilize_reference,
19444 build_decl_no_layout, build_java_arrayaccess): Extern function
19445 declarations moved into their own section.
6d6044b0 19446 (build_newarray, build_anewarray, build_java_array_length_access,
e64c46ce 19447 build_java_arraynull_check): New extern function declarations.
6d6044b0
PB
19448 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19449 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
e64c46ce 19450 fake tree codes.
6d6044b0
PB
19451 (CALL_CONSTRUCTOR_P): New macro.
19452 * parse.y (kw_length): New static global tree node.
19453 (return_statement): Tagged <node>.
19454 (RETURN_TK): Tagged <operator>.
19455 (variable_declarator_id:): Build variable declaration with an
e64c46ce
AJ
19456 empty initialization value if a syntax error was found in the
19457 initialization part of the variable declaration.
6d6044b0 19458 (statement_without_trailing_substatement:): return_statement: now
e64c46ce 19459 uses the default rule.
6d6044b0
PB
19460 (return_statement:): Temporarily fixed to return NULL_TREE.
19461 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19462 (class_instance_creation_expression:): Class creation rules now
e64c46ce 19463 call build_method_invocation upon reduction.
6d6044b0 19464 (array_creation_expression:): Rules call build_newarray_node upon
e64c46ce 19465 reduction.
6d6044b0
PB
19466 (dim_exprs:): Build a list of dimension expressions.
19467 (dim_expr:): Store location of the OSB_TK in the dimension
e64c46ce 19468 expression node.
6d6044b0
PB
19469 (method_invocation:): Added a new error rule.
19470 (build_unresolved_array_type): WFL argument may also be an array
e64c46ce 19471 on a primitive type. Name of the argument changed to reflect this.
6d6044b0 19472 (method_declarator): Insert argument type at the beginning of the
e64c46ce 19473 argument type list and later reverse the list.
6d6044b0 19474 (unresolved_type_p): Argument 'returned' may be optionally
e64c46ce 19475 NULL_TREE.
6d6044b0 19476 (java_layout_class_from_source): Function renamed
e64c46ce 19477 safe_layout_class.
6d6044b0 19478 (resolve_and_layout): Now call resolve_no_layout and
e64c46ce 19479 safe_layout_class.
6d6044b0
PB
19480 (resolve_no_layout): New function.
19481 (purify_type_name): New function.
19482 (complete_class_report_errors): Call purify_type_name during error
e64c46ce 19483 report on a type not found.
6d6044b0 19484 (process_imports): error_found local variable doesn't need to be
e64c46ce 19485 initialized to zero.
6d6044b0 19486 (declare_local_variables): New local type_wfl. Fixed typo in error
e64c46ce
AJ
19487 message. type_wfl assigned to unresolved type and used to register
19488 incomplete type. Build a WFL around the variable initialization
19489 statement so that debug info can be generated on it.
6d6044b0 19490 (source_start_java_method): Reverse argument list after they've
e64c46ce 19491 been processed.
6d6044b0
PB
19492 (current_this): New static global variable.
19493 (java_complete_expand_methods): Set current_this when appropriate.
19494 (resolve_expression_name): Build correct static and non static
e64c46ce 19495 field access bearing a simple name.
6d6044b0 19496 (resolve_field_access): Resolve the length field of arrays. Handle
e64c46ce 19497 f.m() cases.
6d6044b0 19498 (patch_method_invocation_stmt): Set the type of the method
e64c46ce
AJ
19499 invocation to error_mark_node. This value is later overridden by a
19500 valid type, if any. Don't handle qualified constructor invocation
19501 as qualified method invocation. Call lookup_method_invoke with its
19502 new flag. It's no longer necessary to access the selected method
19503 as the value of a tree list. Handle constructor invocation.
6d6044b0 19504 (patch_invoke): Reverse argument list when invoking non interface
e64c46ce
AJ
19505 methods. Insert call to new as the first argument of the
19506 constructor.
6d6044b0 19507 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
e64c46ce
AJ
19508 defined within a final class. Return INVOKE_STATIC if the invoked
19509 method is a constructor.
6d6044b0 19510 (lookup_method_invoke): New lc argument is a flag to indicate a
e64c46ce
AJ
19511 constructor lookup. Now handle constructor lookup. Choose the most
19512 specific method in case several were matching the invocation
19513 requirements. Return a method decl instead of a tree list featuring
19514 one single method decl element.
6d6044b0 19515 (refine_accessible_methods_list): New lc flag argument to
e64c46ce 19516 indicate that a constructor is being looked up.
6d6044b0
PB
19517 (not_initialized_as_it_should_p): New function.
19518 (java_complete_tree): Now process fake tree codes
e64c46ce
AJ
19519 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19520 save_expr on resolved function call arguments. Case on
19521 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
6d6044b0 19522 (patch_assignment): LHS can be a field access expression. When
e64c46ce
AJ
19523 dealing with reference, lhs_type is the promoted type of the
19524 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19525 applicable.
6d6044b0
PB
19526 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19527 (patch_binop): Use not_initialized_as_it_should_p where
e64c46ce 19528 applicable.
6d6044b0
PB
19529 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19530 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
e64c46ce 19531 where applicable.
6d6044b0
PB
19532 (resolve_type_during_patch): New function.
19533 (patch_cast): Call resolve_type_during_patch to resolve type and
e64c46ce 19534 report error accordingly.
6d6044b0 19535 (patch_array_ref): Use not_initialized_as_it_should_p where
e64c46ce
AJ
19536 applicable. Array base expression is saved before being
19537 used. Promote the type of an array elements if it contains non
19538 builtin types.
6d6044b0
PB
19539 (build_newarray_node, patch_newarray, build_this): New functions.
19540
62c9aa5f 195411998-07-16 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19542
19543 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19544 increment it in `for' statement.
19545 (print_field_info): If number is inf or nan, don't print it.
19546 (print_method_info): If method name is `delete', just ignore it.
19547 (print_c_decl): Special-case jstringArray.
19548
19549 * gjavah.c (help): New function.
19550 (no_argument): New function.
19551 (usage): Changed text.
19552 (main): Rewrote argument handling. Now handles -v, --help,
19553 --version.
19554 (version): New function.
19555 (found_error): New global.
19556 (main): Return found_error.
19557 (generate_access): Set found_error.
19558 (print_c_decl): Likewise.
19559
62c9aa5f 195601998-07-15 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19561
19562 * gjavah.c (print_c_decl): Don't print "," when examining field.
19563 Skip type name when looking at "[L" types.
19564 (process_file): Now static.
19565 (generate_access): Now returns int.
19566 (last_access_generated): New global.
19567 (process_file): Clear last_access_generated; make multiple passes
19568 over the class.
19569 (print_field_info): Just return if generate_access returns true.
19570 (print_method_info): Likewise. Also, allow <init> functions to
19571 pass through.
19572 (print_c_decl): Added is_init argument. Print constructors
19573 properly.
19574 (print_cxx_classname): Use UTF8_GET to extract characters from
19575 string.
19576 (print_base_classname): New function.
19577 (print_class_decls): New function.
19578 (process_file): Use it.
19579 (utf8_cmp): New function.
19580
62c9aa5f 195811998-07-13 Nick Clifton <nickc@cygnus.com>
6d6044b0
PB
19582
19583 * lang-options.h: Format changed to match changes in gcc/toplev.c
19584 to implement a --help option.
19585
195861998-07-10 Brendan Kehoe <brendan@cygnus.com>
19587
19588 * decl.c (init_decl_processing): Revert change to dtable_type.
19589
62c9aa5f 195901998-07-09 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19591
19592 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19593
195941998-07-08 Brendan Kehoe <brendan@cygnus.com>
19595
19596 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19597
19598 * lang.c (lang_init): Default flag_exceptions to 1, without
19599 checking to see if it's 2 first.
19600
62c9aa5f 196011998-07-08 Jeffrey A Law (law@cygnus.com)
6d6044b0
PB
19602
19603 * constants.c: Include "system.h".
19604 * decl.c: Likewise.
19605 * lang.c (flag_new_exceptions): Get via extern now.
19606 (lang_init_options): New functions. Turn on flag_new_exceptions.
f6bbde28 19607
62c9aa5f 196081998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19609
19610 * lex.c (java_lex): Return 0 when we see an invalid character in
e64c46ce 19611 the input.
6d6044b0
PB
19612
19613 * lex.c (java_read_char): Specify extra argument when calling
e64c46ce 19614 java_lex_error.
6d6044b0 19615 (java_read_unicode, java_parse_end_comment,
e64c46ce 19616 java_parse_escape_sequence): Likewise,
6d6044b0 19617 (java_lex): Specify extra argument when calling
e64c46ce
AJ
19618 java_lex_error. Test that IDs are beginning with a legal character
19619 for IDs. Handle invalid characters with an error message and a
19620 call to java_lex_error.
6d6044b0 19621 (java_lex_error): Adjust column position by new argument
e64c46ce
AJ
19622 `forward'. Issue an error even if in the middle of reporting an
19623 other error.
6d6044b0
PB
19624
196251998-07-07 Brendan Kehoe <brendan@cygnus.com>
19626
19627 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19628 we don't explicitly put a null pointer when we're copying it.
19629
62c9aa5f 196301998-07-07 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19631
19632 * gjavah.c (print_cxx_classname): New function.
19633 (super_class_name): Likewise.
19634 (print_super_fields): Removed.
19635 (in_super): Removed.
19636 (print_field_info): Never generate #defines.
19637 (print_c_decl): Changed generated types to match JNI. No longer
19638 print class name before method name.
19639 (print_method_info): Print "static" before static methods.
19640 Print "virtual" before non-final methods.
19641 (usage): Use exit(1), not exit(-1).
19642 (main): Likewise.
19643 (print_field_info): Use %.17g to print a double.
19644 (last_access): New globals.
19645 (process_file): Initialize last_access.
19646 (usage): Now static.
19647 (ACC_VISIBILITY): New define.
19648 (generate_access): New function.
19649 (print_field_info): Call it.
19650 (print_method_info): Likewise. Also, generate information for all
19651 methods, not just native methods. Return void.
19652 (print_c_decl): Return void.
19653 (print_field_info): Return void.
19654
62c9aa5f 196551998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19656
19657 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
e64c46ce
AJ
19658 processing the jc1 grammar file. Prefix bison functions and
19659 variables with java_.
6d6044b0
PB
19660 (parse.c): Dependencies on parse.h and lex.h
19661 * expr.c (build_java_arrayaccess): Function now global.
19662 * java-tree.h: Comment reorganized to carry on previous
e64c46ce 19663 classification effort.
6d6044b0 19664 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
e64c46ce 19665 RESOLVE_TYPE_NAME_P): New flags on WFLs.
6d6044b0 19666 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
e64c46ce 19667 java_parse (new prefix java_ generated by bison).
6d6044b0 19668 (java_layout_parsed_class, java_register_parsed_class): Function
e64c46ce 19669 call removed.
6d6044b0
PB
19670 (yyparse): Removed unnecessary call to init_outgoing_cpool.
19671 * lex.c (static tree wfl_op): Variable deleted.
19672 (java_init_lex): Initialize kw_super and kw_this. Initialize more
e64c46ce 19673 ctxp fields to NULL_TREE.
6d6044b0 19674 (java_lex): No longer create WFL for operators. Filename caching
e64c46ce
AJ
19675 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19676 created as STRING_CST and later expanded. Removed extra argument
19677 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19678 and SUPER.
6d6044b0
PB
19679 (build_wfl_node): Removed code in comments.
19680 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
e64c46ce 19681 store token and location data in the current bison token.
6d6044b0 19682 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
e64c46ce 19683 static/extern function declaration at the beginning of the file.
6d6044b0
PB
19684 (struct qualification): Data structure definition deleted.
19685 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19686 (qualify_ambiguous_name): Function declaration modified. Function
e64c46ce 19687 now returns nothing.
6d6044b0 19688 (build_array_ref, patch_array_ref, make_qualified_name,
e64c46ce
AJ
19689 resolve_qualified_expression_name, maybe_generate_clinit,
19690 resolve_field_access): New static function declarations.
6d6044b0
PB
19691 (build_java_arrayaccess): New extern function declaration.
19692 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19693 (CALL_EXPR_PRIMARY): Macro deleted.
19694 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19695 (struct parser_ctxt): Field initialized_final
e64c46ce 19696 removed. non_static_initialized, static_initialized: New fields.
6d6044b0 19697 * parse.y (static tree kw_super, static tree kw_this): New global
e64c46ce 19698 static.
6d6044b0 19699 (%union): tree wfl field of operator member replaced by int
e64c46ce 19700 location. WFLs are non longer created for operators.
6d6044b0
PB
19701 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19702 (qualified_name:): Now calls make_qualified_name to build the
e64c46ce 19703 identifier.
6d6044b0 19704 (type_declaration:): Consider generating <clinit> when class
e64c46ce 19705 parsing completed.
6d6044b0 19706 (variable_declarator:): Directly build an assignment node when the
e64c46ce 19707 variable is initialized when declared.
6d6044b0 19708 (this_or_super:): Build a WFL and set current location when THIS
e64c46ce 19709 or SUPER are parsed.
6d6044b0
PB
19710 (expression_statement:): Wrap statement around a WFL.
19711 (primary_no_new_array:): Fixed typo. Changed value returned by
e64c46ce 19712 THIS_TK because of its new type (temporary).
6d6044b0
PB
19713 (dim_exprs:): Temporary fix because of OSB_TK's new type.
19714 (field_access:): Build qualified name with SUPER.
19715 (method_invocation:): Fixed returned value because of SUPER's new
e64c46ce 19716 type.
6d6044b0
PB
19717 (array_access:): Use OSB_TK location information.
19718 (post_increment_expression:, post_decrement_expression:,
e64c46ce
AJ
19719 unary_expression:, pre_increment_expression:,
19720 pre_decrement_expression:, unary_expression_not_plus_minus:,
19721 cast_expression:, multiplicative_expression:,
19722 additive_expression:, shift_expression:, relational_expression:,
19723 equality_expression:, and_expression:, exclusive_or_expression:,
19724 inclusive_or_expression:, conditional_and_expression:,
19725 conditional_or_expression:, assignment:): Use new location/token
19726 information available on operators.
6d6044b0 19727 (create_class): Set super_decl_type to NULL_TREE when processing
e64c46ce 19728 java.lang.Object.
6d6044b0 19729 (register_fields): Field initialization is now a MODIFY_EXPR
e64c46ce 19730 node. Chain initialization code to the matching lists (according
fe0b9fb5 19731 to the field declaration modifiers).
6d6044b0
PB
19732 (maybe_generate_clinit): New function.
19733 (method_header): Don't set method's DECL_NAME to a WFL when adding
e64c46ce 19734 methods to java.lang.Object.
6d6044b0 19735 (resolve_and_layout): Now can return NULL_TREE if the type
e64c46ce
AJ
19736 resolution fails. Otherwise, return the class DECL instead of its
19737 TYPE.
6d6044b0 19738 (check_method_redefinition): Don't patch method DECL_NAME if it
e64c46ce 19739 belongs to java.lang.Object.
6d6044b0 19740 (process_imports): Simply assign error_found to the value returned
e64c46ce 19741 by check_pkg_class_access.
6d6044b0 19742 (declare_local_variables): Don't use their init statements (if
e64c46ce
AJ
19743 any) when parsing error were previously found. Reuse MODIFY_EXPR
19744 build during parsing as an init statement.
6d6044b0
PB
19745 (java_method_add_stmt): Now return the current method body.
19746 (java_layout_parsed_class, java_register_parsed_class): Functions
e64c46ce 19747 removed.
6d6044b0 19748 (java_complete_expand_methods): Initialize the constant pool on a
e64c46ce
AJ
19749 per class basis. Layout the classes before expanding their method
19750 bodies. Don't try expand artificial constructor code if error were
19751 found. Make the classes data and register them if no error were
19752 found.
6d6044b0 19753 (java_complete_expand_method): Retrieve an artificial constructor
e64c46ce
AJ
19754 argument list before entering its body. Assign the top block to
19755 the artificial constructor function body and set types of declared
19756 blocks and compound statements to void. Walk method body if not an
19757 artificial constructor.
6d6044b0
PB
19758 (make_qualified_name, cut_identifier_in_qualified): New functions.
19759 (resolve_expression_name): Fixed comments. Save/restore the
e64c46ce
AJ
19760 current class CLASS_LOADED_P flag value. Build non qualified
19761 static field access and handle qualified expression names.
6d6044b0 19762 (resolve_field_access, resolve_qualified_expression_name): New
e64c46ce 19763 functions.
6d6044b0 19764 (patch_method_invocation_stmt): Use the new expression resolution
e64c46ce
AJ
19765 scheme, calling resolve_field_access when the function call is
19766 resolved as an expression.
6d6044b0 19767 (qualify_ambiguous_name): Function rewritten to work on qualified
e64c46ce 19768 expression produced by make_qualified_name.
6d6044b0 19769 (java_complete_tree): Promote type when function's argument are
e64c46ce
AJ
19770 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19771 the assignment to discover further errors if RHS is a expression
19772 name that fails to evaluate. Declare LHS initialized even though
19773 the assignment failed. Don't use the location variable and removed
19774 extra argument in patch function calls. Now handle the ARRAY_REF
19775 case and build internal string representation when STRING_CSTs are
19776 walked.
6d6044b0
PB
19777 (build_method_invocation): Don't wrap function call around a WFL.
19778 (build_assignment): Likewise. Use the operator location
e64c46ce 19779 information.
6d6044b0 19780 (patch_assignment): Handle array access LHSs. Handle error
e64c46ce 19781 provenance, resulting in a better error report.
6d6044b0 19782 (build_binop): Use op_location from operator as binop location
e64c46ce 19783 information.
6d6044b0
PB
19784 (build_unaryop, build_incdec, build_cast): Likewise.
19785 (patch_binop): Extract location information from the node. Fixed
e64c46ce 19786 typo in error message.
6d6044b0
PB
19787 (patch_unary_op): Extract location information from the node.
19788 (build_array_ref, patch_array_ref): New functions.
f6bbde28 19789
62c9aa5f 197901998-07-01 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19791
19792 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19793 match _Jv_IsInstanceOf.
19794 * decl.c (init_decl_processing): Use _Jv_NewArray, not
19795 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
19796
62c9aa5f 197971998-06-30 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19798
19799 * decl.c (init_decl_processing): Functions are now named
19800 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19801
62c9aa5f 198021998-06-29 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19803
19804 * java-tree.h (load_class): Add prototype.
e64c46ce 19805 * class.c (is_compiled_class): Add missing arg to load_class.
6d6044b0
PB
19806 * expr.c (expand_java_NEW): Call load_class.
19807 * parse.y (process_import): Removed bogus use of void return value.
19808
62c9aa5f 198091998-06-25 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19810
19811 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
19812 Function name is "_Jv_Throw" instead of "soft_athrow".
19813 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
19814 Function name is "_Jv_AllocObject" instead of "soft_new".
19815 Takes an extra parameter (object size).
19816 * expr.c: Update calls.
19817
62c9aa5f 198181998-06-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19819
19820 * lex.c (java_get_line_col): Handle end-of-file.
19821 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
19822
62c9aa5f 198231998-06-24 Andrew MacLeod <amacleod@cygnus.com>
6d6044b0
PB
19824
19825 * lang.c (lang_init): Make -fexceptions the default.
19826 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19827 exception handling is not turned on.
19828
62c9aa5f 198291998-06-23 Andrew MacLeod <amacleod@cygnus.com>
6d6044b0
PB
19830
19831 * lang.c (flag_new_exceptions): Make this this default.
19832 * decl.c (end_java_method): Call emit_handlers.
19833 * except.c (method_init_exceptions): Set language code and version.
f6bbde28 19834 (expand_start_java_handler): Enable exception, and call
6d6044b0
PB
19835 expand_eh_region_start.
19836 (expand_end_java_handler): Enable exception, and set up catch blocks.
19837 (emit_handlers): New routine to generate the saved handlers.
19838 * java-except.h (emit_handlers): Add prototype.
19839
62c9aa5f 198401998-06-12 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
19841
19842 We used to have three different representations of the constant pool:
19843 the CPool structure, the tree_constant_pool, and the constructures
19844 used to build the Class object (which may need class and string
19845 constants) in compiled code. None were appropriate for compiling
19846 to .class files, so I did a major overhaul.
19847
19848 First, the tree_constant_pool array was removed. Things were
19849 modified to the CPool structure in the JCF could be used.
19850 Second, a "capacity" field was added to the CPool, and functions
19851 written to search for a matching constant, adding one if not found.
19852 The code that generated the Class object was changed to use a CPool.
19853 The actual TREE_LISTs used to build the CONSTRUCTORs used for
19854 the static Class object are now only in build_constants_constructor.
19855 Finally, I wrote code which can generate a .class file (including its
19856 constant pool) from the RECORD_TYPE of a class. This is a big step
19857 on the way to compiling Java source into .class files.
f6bbde28 19858
6d6044b0
PB
19859 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
19860 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
19861
19862 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19863 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
19864 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19865 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19866 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
19867 (lang_type): Removed constant_pool field.
19868 * jcf.h (CPool): Renamed size to count. Added field capacity.
19869 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19870 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
19871 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19872
19873 * constants.c (current_constant_pool_tags, current_constant_pool_data,
19874 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19875 * constants.c (build_constants_constructor): Use new outgoing_cpool.
19876 (set_constant_entry, find_constant1, find_constant2,
19877 find_class_constant, count_constant_pool_bytes, write_constant_pool,
19878 find_utf8_constant, find_class_or_string_constant): New functions.
f6bbde28 19879
6d6044b0 19880 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
e64c46ce 19881 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
6d6044b0
PB
19882 (give_name_to_class, get_class_constant): Likewise.
19883 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
e64c46ce 19884 (get_name_and_type_constant, get_ref_constant): Removed.
6d6044b0
PB
19885 * parse.h (parser_ctxt): Remove field tree_constant_pool.
19886 * parse.y: Don't save/restore tree_constant_pool.
19887 * verify.c (verify_jvm_instructions): Update for new approach.
19888 * expr.c (expand_invoke, expand_java_field_op): Likewise.
19889
19890 * lang-options.h: Added -femit-class-file, -femit-class-files.
19891 * lang.c (flag_emit_class_files), java-tree.h: New flag.
19892 (lang_f_options): Added "emit-class-file(s)".
19893
19894 * expr.c (build_java_arrayaccess): Generate more efficient array
19895 bounds checking, by using unsigned compare.
19896
19897 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
19898
62c9aa5f 198991998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19900
19901 * parse.h: New comment on the handling of unresolved type
e64c46ce 19902 identifiers. JDEPs are now part of the jdep_code enum.
6d6044b0 19903 (typedef struct jdep): Now use enum jdep_code or int, depending on
e64c46ce 19904 availability. Both are narrowed down to an 8 bits bitfield.
6d6044b0
PB
19905 (CALL_EXPR_PRIMARY): Fixed comment.
19906
62c9aa5f 199071998-06-10 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
19908
19909 * Make-lang.in (java): Added gjavac and jvgenmain.
19910 (java.start.encap): Depend on gjavac.
19911 (java.rest.encap): Depend on jvgenmain.
19912
19913 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19914 (JAVA_CROSS_NAME): Likewise.
19915 (java.all.build): Depend on jvgenmain and gjavac.
19916 (java.all.cross): Depend on jvgenmain and gjavac-cross.
19917 (jvgenmain$(exeext)): New target.
19918 (java.install-common): Wrote.
19919 * config-lang.in (compilers, stagestuff): Added gjavac and
19920 jvgenmain.
19921
62c9aa5f 199221998-06-10 Dave Brolley <brolley@cygnus.com>
6d6044b0
PB
19923
19924 * lang.c (lang_decode_option): New argc/argv interface.
19925
62c9aa5f 199261998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
19927
19928 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19929 * decl.c (build_decl_no_layout): New function.
19930 * expr.c (java_lang_expand_expr): Layout declarations found in
e64c46ce 19931 blocks before they're pushed.
6d6044b0 19932 * jcf-parse.c (load_class): Save current line when parsing class
e64c46ce 19933 file.
6d6044b0 19934 (parse_source_file): Register class before expanding their
e64c46ce 19935 methods.
6d6044b0 19936 * lang.c (put_decl_node): Produce `null' when `void *' is
e64c46ce 19937 processed.
6d6044b0 19938 * lex.c (static tree wfl_op): New static global, for error report
e64c46ce 19939 on casts.
6d6044b0 19940 (java_init_lex): wfl_operator and wfl_op initialized
e64c46ce
AJ
19941 here. Filename caching added for wfl_op. Return wfl_op when `(' is
19942 parsed.
6d6044b0 19943 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
e64c46ce
AJ
19944 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19945 build_unresolved_array_type): New static function definitions.
6d6044b0
PB
19946 (build_decl_no_layout): New extern function declared.
19947 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
e64c46ce 19948 faulty modifier exists.
6d6044b0
PB
19949 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19950 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19951 (UNARY_PLUS_EXPR): New fake operator.
19952 (struct parser_ctxt): New field osb_number.
19953 * parse.y (static tree wfl_operator): New static WFL for operator
e64c46ce 19954 bound error messages.
6d6044b0
PB
19955 (DECR_TK, INCR_TK): Moved.
19956 (OP_TK): Tagged <operator>.
19957 (array_type:): Now call build_unresolved_array_type.
19958 (dim_expr:): Count the number of '[' seen.
19959 (post_increment_expression, post_decrement_expression,
e64c46ce
AJ
19960 pre_increment_expression, pre_decrement_expression,
19961 unary_expression_not_plus_minus, unary_expression:): Actions are
19962 now building the corresponding unary expressions.
6d6044b0
PB
19963 (cast_expression:): Actions are now building cast expressions.
19964 (build_unresolved_array_type): New function.
19965 (create_interface): Reset the number of declared interfaces.
19966 (create_class): Likewise.
19967 (method_header): Methods declared within the scope of an interface
e64c46ce 19968 are now implicitly set public and abstract.
6d6044b0 19969 (java_complete_class): Variable's and parameter's type are patched
e64c46ce 19970 with a promoted type.
6d6044b0 19971 (declare_local_variables): Resolved non builtin types are promoted
e64c46ce
AJ
19972 before being used to build a variable decl. Removed type patch
19973 posted on variable initialization statement.
6d6044b0 19974 (source_start_java_method): Use build_decl_no_layout to build the
e64c46ce 19975 decl of a parameter of incomplete type.
6d6044b0 19976 (java_register_parsed_class): Process interfaces too. Call
e64c46ce 19977 rest_of_decl_compilation on each processed class declarations.
6d6044b0 19978 (java_complete_expand_methods): Don't attempt to expand things in
e64c46ce 19979 interfaces.
6d6044b0 19980 (java_complete_tree): Process CONVERT_EXPR, even though it always
e64c46ce
AJ
19981 has a type. Propagate error_mark_node to node's type too. Promote
19982 method's call argument type and return error_mark_node if
19983 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19984 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19985 handle unary operator nodes.
6d6044b0
PB
19986 (build_assignment): Added comment.
19987 (print_int_node): New function.
19988 (patch_assignment): New second argument. New error handling. Use
e64c46ce
AJ
19989 print_int_node. Handle references. Use can_cast_to_p to issue
19990 different error message according to the context and check upon
19991 the initialization of the RHS.
6d6044b0
PB
19992 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19993 (operator_string): Handle more operators.
19994 (patch_binop): No longer use a function static
e64c46ce 19995 wfl_operator. Improved error message on shift distance.
6d6044b0 19996 (build_unaryop, build_incdec, build_cast, patch_unaryop,
e64c46ce 19997 patch_cast): New functions.
f6bbde28 19998
62c9aa5f 199991998-06-05 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20000
20001 * jvspec.c: New file.
20002 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
20003
20004 * java-tree.h (identifier_subst): Add declaration.
20005
62c9aa5f 200061998-06-04 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20007
20008 * jvgenmain.c (main): Generate call to JvRunMain.
20009
20010 * class.c (make_class_data): Push value for "sync_info" field.
20011 * decl.c (init_decl_processing): Push "sync_info" field.
20012
62c9aa5f 200131998-06-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20014
20015 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
20016 Java (source) name, not signature.
20017 Set TYPE_ALIGN to (at least) that of element_type.
20018
62c9aa5f 200191998-06-02 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20020
20021 * class.c: Moved classname-mangling-rekated code to ...
20022 * mangle.c: ... this new file.
20023 * jvgenmain.c: New program (needs mangle.c) to generate main program.
f6bbde28 20024 * Makefile.in: Update for above changes.
6d6044b0 20025
62c9aa5f 200261998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20027
20028 * expr.c (truthvalue_conversion): Convert integer and floating
e64c46ce 20029 point value to their truth value.
6d6044b0
PB
20030 * lex.c (java_lex): Handle the `null' literal.
20031 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20032 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
e64c46ce
AJ
20033 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20034 New macros.
6d6044b0
PB
20035
20036 * parse.y: Reorganization/documentation on token declaration.
20037 (binop_lookup[]): New added new tree codes.
20038 (relational_expression): Build corresponding binary operators.
20039 (equality_expression, conditional_and_expression,
e64c46ce 20040 conditional_or_expression): Likewise.
6d6044b0
PB
20041 (java_complete_class): Fix crash in debug message.
20042 (java_complete_tree): Check initialization of method call
e64c46ce
AJ
20043 arguments. Further bogus node evaluation to detect more error
20044 during assignments. Handles more binary operators.
6d6044b0
PB
20045 (patch_assignment): Use DECL_P.
20046 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
e64c46ce 20047 code.
6d6044b0
PB
20048 (operator_string): Handle more case. Compacted source.
20049 (patch_binop): Changed function comment. Checking for
e64c46ce
AJ
20050 uninitialized first operand takes the compound assignment into
20051 account and uses DECL_P. Checking for uninitialized second operand
20052 delayed to routine's end. Use macros to issue type bound error
20053 messages and issue messages on both operands if their types are
20054 different. Force fixed type into node. Handle all binary
20055 operators.
f6bbde28 20056
62c9aa5f 200571998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20058
20059 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
f6bbde28
ZW
20060 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20061 build operator node and return tokens.
20062 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
6d6044b0
PB
20063 * parse.h (java_complete_tree): Changed returned type in prototype.
20064 (build_method_invocation, build_assignment, patch_assignment,
e64c46ce 20065 patch_binop): New static function declarations.
f6bbde28 20066 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
e64c46ce 20067 BUILD_EXPR_WFL): New macros.
6d6044b0 20068 * parse.y (enum tree_code binop_lookup[]): New static for token to
e64c46ce 20069 TREE_CODE lookup.
6d6044b0 20070 (%union): Parser union has new sub-structure `operator'.
f6bbde28
ZW
20071 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20072 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20073 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20074 ASSIGN_ANY_TK): Tokens tagged `operator'.
6d6044b0 20075 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
e64c46ce
AJ
20076 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20077 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20078 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
f6bbde28 20079 (assignment_operator:): Rule tagged `operator'.
6d6044b0 20080 (expression_statement:): Re-installed default rule.
f6bbde28 20081 (method_invocation:): Sub rules call build_method_invocation.
6d6044b0 20082 (postfix_expression:): Don't attempt to resolve name here. Just
e64c46ce 20083 return an ID.
6d6044b0 20084 (multiplicative_expression:): Sub-rules build corresponding binop
e64c46ce 20085 expression node.
6d6044b0 20086 (additive_expression:, shift_expression:, and_expression:,
e64c46ce 20087 exclusive_or_expression:, inclusive_or_expression:): Likewise.
f6bbde28
ZW
20088 (assignment:): Sub rule invoke build_assignment.
20089 (assignment_operator:): Default rules on sub rules.
6d6044b0 20090 (force_error): Added documentation on this variable.
f6bbde28
ZW
20091 (declare_local_variables): Build initialization calling
20092 build_assignment.
20093 (expand_start_java_method): Removed unused rtx declaration. Mark
e64c46ce 20094 arguments as already initialized.
f6bbde28 20095 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
6d6044b0 20096 (java_complete_expand_methods): Don't process next method if
e64c46ce 20097 completion of the previous one triggered errors.
6d6044b0 20098 (java_complete_expand_method): Call source_end_java_method if no
e64c46ce 20099 error were found during completion.
6d6044b0 20100 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
e64c46ce
AJ
20101 locals declaratilon. Handle names found within a class. Return
20102 error_mark_node when things aren't found.
6d6044b0
PB
20103 (patch_method_invocation_stmt): Return error_mark_node on failures.
20104 (patch_invoke): Removed unused local. Return the correct node.
20105 (java_complete_tree): Now returns a value. The BLOCK section binds
e64c46ce
AJ
20106 local identifiers and the type of a BLOCK is now void. Assign the
20107 result of operand completion on COMPOUND_EXPR. Assign the
20108 encapsulated node of a WFL to the result of its completion, except
20109 when the node is an identifier. Now handle MODIFY_EXPR and several
20110 binary operators. Return error_mark_node on errors.
6d6044b0 20111 (build_method_invocation, build_assignment, patch_assignment,
e64c46ce 20112 build_binop, operator_string, patch_binop): New functions.
6d6044b0
PB
20113 * typeck.c (binary_numeric_promotion): New function.
20114
62c9aa5f 201151998-05-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20116
20117 * class.c (identifier_subst): New convenience wrapper for ident_subst.
20118 Replace most uses of ident_subst by identifier_subst.
20119
20120 * class.c (push_class_static_dummy_field): Removed function.
20121 (build_class_ref): Find Class object decl by looking up "CNAME.class",
20122 instead of looking got "class" static field. Create that decl here.
20123 (class_identifier_node): Removed; no longer needed.
20124 (init_class_processing): Don't init class_identifier_node.
20125 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
20126 Do nreverse 0 times (instead of twice) for Object and Class.
20127 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20128
62c9aa5f 201291998-05-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20130
20131 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
20132 while initializing linenumber_count and linenumber_table.
20133 Do it before init_function_start (which calls emit_line_note).
20134 * expr.c (expand_byte_code): Don't need to clear lineno here.
20135
62c9aa5f 201361998-05-18 Tom Tromey <tromey@cygnus.com>
6d6044b0
PB
20137
20138 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20139 then mangle number as _N_.
20140
20141 * class.c (mangle_class_field): New function.
20142 (build_class_ref): Set assembler name of class reference using
20143 mangle_class_field.
20144 (push_class_static_dummy_field): Likewise.
20145
62c9aa5f 201461998-05-17 Michael Tiemann <tiemann@cygnus.com>
6d6044b0
PB
20147
20148 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20149 of assigning to TREE_CODE. The latter method exploits a feature
20150 of GCC that is not ANSI compliant.
20151
62c9aa5f 201521998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20153
20154 * decl.c (pushdecl_force_head): New function.
20155 (pushlevel): Removed conditional printf.
20156 (complete_start_java_method): Don't enter local variable scope if
e64c46ce 20157 function is compiled from source code.
6d6044b0
PB
20158 * expr.c: parse.h now included
20159 (java_lang_expand_expr): New function.
20160 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
e64c46ce 20161 printf. Terminate buffer when doing directories.
6d6044b0 20162 * jcf-parse.c (parse_source_file): Call lang_init_source before
e64c46ce 20163 parsing and before code generation.
6d6044b0 20164 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
e64c46ce 20165 use printf if the macro is defined.
6d6044b0 20166 * lang.c (lang_init): Install lang_expand_expr hook on
e64c46ce 20167 java_lang_expand_expr.
6d6044b0
PB
20168 (java_dummy_print): New function.
20169 (lang_init_source): New function.
20170 * lex.c (java_lex): Remember location of an opening brace at the
e64c46ce 20171 second nesting level.
6d6044b0
PB
20172 (java_is_eol): Unget character seen after a CR if it is EOF.
20173 * parse.h: Now includes lex.h
20174 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
e64c46ce 20175 printf if the macro is defined.
6d6044b0 20176 (expand_start_java_method, build_expr_block, enter_block,
e64c46ce
AJ
20177 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20178 New static function declarations.
6d6044b0
PB
20179 (pushdecl_force_head): New extern function declaration.
20180 (INCOMPLETE_TYPE_P): New macro.
20181 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20182 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
e64c46ce 20183 BLOCK_EXPR_ORIGIN): New macros.
6d6044b0 20184 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
e64c46ce 20185 DECL_SOURCE_LINE_LAST): New macros.
6d6044b0 20186 (struct parser_ctxt): Removed field current_method_decl, redundant
e64c46ce
AJ
20187 with the field current_function_decl. Added fields
20188 first_ccb_indent1 and pending_block.
6d6044b0 20189 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
e64c46ce
AJ
20190 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20191 tagged <node>
6d6044b0
PB
20192 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20193 (compilation_unit:): Cosmetic on sub rule.
20194 (type_declaration:): Cosmetic on sub rules. Added an error rule.
20195 (variable_initializer:): Installed default rule on expression:.
20196 (method_declaration:): method_header: starts a new
e64c46ce
AJ
20197 method. method_body: installs the function body, absorbs blocks
20198 emitted for temporary variable scopings, pops function's body block
20199 and merges function's last statement lineno in DECL_SOURCE_LINE.
6d6044b0
PB
20200 (method_body:): Installed default rules.
20201 (block:): Call enter_block when an opening brace is seen. Absorb
e64c46ce 20202 scoping blocks and call exit_block when a closing brace is seen.
6d6044b0
PB
20203 (block_statement:): Cosmetic changes.
20204 (method_invocation:): Create WFL around CALL_EXPR node.
20205 (patch_stage): Added comment around definition.
20206 (method_header): Try to use first_ccb_indent1 as the first line of
e64c46ce
AJ
20207 the method, so BP debug info are emitted at the first opening
20208 brace of the function. If the function has no body, use the
20209 location of the function's name. Override currently defined method
20210 name with the matching WFL so we can point redefinition errors
20211 using the location where the function's name was declared.
6d6044b0 20212 (check_abstract_method_header): Interprets DECL_NAME as an
e64c46ce 20213 identifier or as a WFL, accordingly.
6d6044b0
PB
20214 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20215 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
e64c46ce
AJ
20216 location and name information out of it and reinstall DECL_NAME to
20217 its original identifier node value.
6d6044b0 20218 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
e64c46ce 20219 function's source code).
6d6044b0 20220 (read_import_dir): Test the value returned by find_class and issue
e64c46ce 20221 a fatal accordingly.
6d6044b0 20222 (declare_local_variables): Push a new block for the scope of the
e64c46ce
AJ
20223 new variable(s) if code has been already generated at that nesting
20224 level. Pinpoint redefinition errors using the variable id
20225 WFLs. Generate initialization code if necessary. If the variable
20226 type is incomplete, register a patch on its decl.
6d6044b0 20227 (source_start_java_method): Rewritten. Define a new block for the
e64c46ce
AJ
20228 function's parameters. Build parameter decl out of function's
20229 arguments and register them for a patch if their types are
20230 incomplete.
6d6044b0 20231 (expand_start_java_method): Includes the part of
e64c46ce
AJ
20232 source_start_java_method that was pushing the parameter decls and
20233 completing the method start code.
6d6044b0 20234 (source_end_java_method): Removed call the expand_end_bindings and
e64c46ce
AJ
20235 poplevel (already taken care of). Reinstall function's arguments
20236 and get function's last line of code before calling
20237 expand_function_end.
6d6044b0 20238 (java_method_add_stmt): New comment before the function's
e64c46ce
AJ
20239 code. Complement the second operand of the current COMPOUND_EXPR
20240 if necessary.
6d6044b0 20241 (java_complete_expand_methods): Don't generate debug info on line
e64c46ce 20242 zero when expanding a generated constructor.
6d6044b0 20243 (java_complete_expand_method): Set start and end line numbers for
e64c46ce
AJ
20244 a artificially generated constructor to one and manually call
20245 enter_block and exit_block when defining it. For all methods:
20246 expand function's start calling the new expand_start_java_method
20247 and invoke java_complete_tree on the effective method's body, if
20248 any.
6d6044b0 20249 (resolve_expression_name): Now use lookup_name_in_blocks to search
e64c46ce
AJ
20250 local variable decls and print out an error when variables are
20251 undefined.
6d6044b0 20252 (patch_method_invocation_stmt): Inserted comment before the
e64c46ce 20253 function's code.
6d6044b0 20254 (lookup_method_invoke): Chain method's arguments using chainon
e64c46ce
AJ
20255 with the current arg list as a second argument. Inserted missing
20256 IDENTIFIER_POINTER when reporting an error on methods not found.
6d6044b0
PB
20257 (refine_accessible_methods_list): Don't retain constructors.
20258 (patch_arguments): Function removed.
20259 (java_complete_tree): Inserted comment before the function's
e64c46ce
AJ
20260 code. New case for BLOCKs. Moved the WFL case a bit
20261 further. Complete function's arguments.
20262 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20263 maybe_absorb_scoping_blocks): New functions.
f6bbde28 20264
62c9aa5f 202651998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20266
20267 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
e64c46ce 20268 previously set.
6d6044b0 20269 * jcf-parse.c (parse_source_file, java_error_count): New forward
e64c46ce 20270 and extern declarations.
6d6044b0
PB
20271 (java_parse_abort_on_error): Macro moved.
20272 (jcf_parse_source): fatal called if fopen fails. Now calls
e64c46ce 20273 parse_source_file.
6d6044b0 20274 (parse_source_file): New parse_only parameter. Reflects the
e64c46ce 20275 elimination of the second pass.
6d6044b0
PB
20276 (yyparse): parse_source_file called with argument set to 0.
20277 * jcf.h (JCF_ZERO): Sets java_source to zero.
20278 * lex.c (java_init_lex): pass argument is gone. Function modified
e64c46ce 20279 to be called once during the analysis of a file.
6d6044b0
PB
20280 (java_unget_unicode): Fixed typo in fatal message.
20281 (java_get_line_col): Likewise.
20282 (java_lval): Likewise. String literals no longer built during
e64c46ce 20283 second pass.
6d6044b0 20284 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
e64c46ce 20285 account.
6d6044b0
PB
20286 * parse.h (MODIFIER_WFL): New macro.
20287 (parse_check_super, parser_check_super_interface): Now return int.
20288 (parser_chain_incomplete_item, not_builtin_p,
e64c46ce 20289 complete_method_decl): Declarations removed.
6d6044b0 20290 (build_method_invocation_stmt, build_invoke): Renamed using the
e64c46ce 20291 `patch' instead of `build'
6d6044b0 20292 (register-incomplete_type, obtain_incomplete_type,
e64c46ce
AJ
20293 java_complete_tree, java_complete_expand_method,
20294 unresolved_type_p, create_jdep_list): New function declarations.
6d6044b0 20295 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
e64c46ce 20296 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
6d6044b0
PB
20297 (jdep): New typedef on new struct _jdep.
20298 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
e64c46ce
AJ
20299 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20300 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20301 JDEP_RESOLVED_P): New macros.
6d6044b0 20302 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
e64c46ce
AJ
20303 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20304 JDEP_VARIABLE): New enum values and jdep kinds.
6d6044b0
PB
20305 (jdeplist): New typedef on struct _jdeplist.
20306 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
e64c46ce 20307 macros.
6d6044b0
PB
20308 (CALL_EXPR_PRIMARY): New macro.
20309 (struct parser_ctxt): Fields java_pass, current_method_decl,
e64c46ce 20310 method_decl_list deleted. New field jdeplist.
6d6044b0
PB
20311 (INCOMPLETE_P): Macro deleted.
20312 * parse.y (single_type_import_declaration:): Removed pass switch.
20313 (type_import_on_demand_declaration): Likewise.
20314 (field_declaration:): Removed pass switch on all sub rules.
20315 (class_declaration:): Call the complete_class_decl removed on
e64c46ce 20316 class_body rules.
6d6044b0 20317 (method_declaration:): Removed second pass switch. No longer chain
e64c46ce 20318 methods decl when method_header reduced.
6d6044b0
PB
20319 (method_header:): Sub rules no longer depend on pass switch.
20320 (method_declarator:): Likewise.
20321 (method_body:): Likewise.
20322 (abstract_method_declaration:): Likewise.
20323 (block_statement:): Likewise.
20324 (local_variable_declaration:): Likewise.
20325 (argument_list:): Likewise.
20326 (method_invocation:): Likewise. Call to build_method_invocation_stmt
20327 removed. Partial CLASS_EXPR tree node built instead.
20328 (postfix_expression:): Removed pass switch on all sub rules.
20329 (java_pop_parser_context): Free classd_list content.
20330 (yyerror): Call obstrack_grow0 to finalize error message.
20331 (check_class_interface_creation): Comment modified to reflect new
e64c46ce
AJ
20332 returned value meaning. Removed second pass switch. Return 1 if an
20333 error was found, 0 otherwise. Adjust pointer on filename if a
20334 leading path separator was found.
6d6044b0 20335 (maybe_create_class_interface_decl): Removed first pass switch
e64c46ce
AJ
20336 when linking the class decl to the class_list. Install a new
20337 jdep_list for the class.
6d6044b0 20338 (add_superinterfaces): List of unresolved interfaces is
e64c46ce
AJ
20339 gone. Unresolved interfaces are directly added to the current
20340 dependencies list.
f6bbde28 20341 (create_interface): Second pass shortcut removed.
6d6044b0
PB
20342 ctpx->modifier_ctx access through MODIFIER_WFL.
20343 (create_class): Second pass shortcut removed. Call to
e64c46ce
AJ
20344 register_incomplete_type replaces the call to
20345 parser_chain_incomplete_item.
6d6044b0
PB
20346 (complete_class_decl): Function removed.
20347 (duplicate_declaration_error): New way of retrieving redeclared
e64c46ce 20348 item type.
6d6044b0 20349 (register_fields): Call to lookup_modifier_cl replaced by
e64c46ce
AJ
20350 MODIFIER_WFL. New way of handling unresolved type, using
20351 unresolved_type_p and obtain_incomplete_type.
6d6044b0
PB
20352 register_incomplete_type replaces call to parser_chain_incomplete_item.
20353 (patch_stage): New static global variable.
20354 (method_header): New way of handling unresolved type, using
e64c46ce
AJ
20355 unresolved_type_p and obtain_incomplete_type. patch_stage used to
20356 indicates that the method decl needs to be patched.
6d6044b0 20357 (check_abstract_method_header): Call to lookup_modifier_cl
e64c46ce 20358 replaced by MODIFIER_WFL.
6d6044b0 20359 (method_declarator): Incomplete argument type are registered
e64c46ce
AJ
20360 calling register_incomplete_type. Patch on the declared method is
20361 issued in that case.
6d6044b0
PB
20362 (unresolved_type_p): New function.
20363 (parser_check_super_interface): New comment to reflect function's
e64c46ce
AJ
20364 modified returned type (int). Function and has a new argument
20365 this_wfl. Call to parse_error_context uses this_wfl instead of
20366 relying on lookup_cl.
6d6044b0 20367 (parser_check_super): Comment reflects function's new returned
ee142fe7 20368 type (int). Function returns nonzero value on error.
6d6044b0 20369 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
e64c46ce
AJ
20370 register_incomplete_type, jdep_resolve_class): New functions to
20371 handle incomplete types in declarations.
6d6044b0 20372 (java_complete_class): Rewritten to work with the new incomplete
e64c46ce 20373 type handling scheme.
6d6044b0
PB
20374 (complete_class_report_errors): Likewise.
20375 (complete_method_decl): Removed: it jobs is now handled by
e64c46ce 20376 java_complete_class.
6d6044b0 20377 (do_resolve_class): Class loaded in not already loaded and not
e64c46ce 20378 found in Java source code.
6d6044b0 20379 (java_check_regular_methods, java_check_abstract_methods): Don't
e64c46ce 20380 call complete_method_decl anymore.
6d6044b0
PB
20381 (lookup_modifier_cl, not_builtin_p): Functions deleted.
20382 (read_import_dir): Got rid of the pass number dependency.
20383 (declare_local_variables): New handling of unresolved types (patch
e64c46ce 20384 issued).
6d6044b0 20385 (source_start_java_method): New parameter level. Function called
e64c46ce
AJ
20386 with level set to 1 when argument types are potentially
20387 unresolved. Called to complete the job with level set to 2 once
20388 types are complete.
6d6044b0 20389 (source_end_java_method): Call to permanent_allocation
e64c46ce
AJ
20390 removed. Waiting to be replaced by a more suitable obstack
20391 management.
6d6044b0 20392 (java_complete_expand_methods, java_complete_expand_method,
e64c46ce 20393 java_expand_finals): New functions.
6d6044b0 20394 (build_method_invocation_stmt): Renamed
e64c46ce
AJ
20395 patch_method_invocation_stmt. Extracts function call expression
20396 (wfl) and arguments (args) from CALL_EXPR tree operands.
6d6044b0 20397 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
e64c46ce
AJ
20398 call. Patch the function and argument operand of the CALL_EXPR
20399 tree argument.
6d6044b0
PB
20400 (patch_argument, java_complete_tree): New functions.
20401
62c9aa5f 204021998-04-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20403
20404 Recover from missing fields and methods (i.e. error instead of fatal).
20405 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
20406 * expr.c (expand_invoke): Recover from missing method.
20407 (expand_java_field_op): Recover from missing field.
20408 Inline references to java.lang.{Integer,Char,...}.TYPE.
20409 * typeck.c (get_type_from_signature), java-tree.h: New function.
20410 * class.c (add_method): Use get_type_from_signature.
20411 (build_class_ref): Handle a class that was not found.
20412 * typeck.c (convert): Handle conversion to pointers (for convenience).
20413 * verify.c (verify_jvm_instructions): Use get_type_from_signature
20414 instead of lookup_field to handle missing fields.
f6bbde28 20415
6d6044b0
PB
20416 * jcf-parse.c (process_zip_dir): Set java_source.
20417
204181998-04-20 Brendan Kehoe <brendan@cygnus.com>
20419
20420 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20421
62c9aa5f 204221998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20423
20424 * jcf-parse.c (load_class): Don't change input_filename before
e64c46ce
AJ
20425 calling jcf_parse_source (but still do it before calling
20426 jcf_parse).
6d6044b0 20427 (jcf_parse_source): Assign input_filename after having saved the
e64c46ce 20428 parser context.
6d6044b0 20429 * lex.c (java_init_lex): Chain a WFL node to the import on demand
e64c46ce
AJ
20430 list. ctxp->modifier_ctx zeroed according to its new
20431 definition. ctxp->filename initialized. Removed
6d6044b0
PB
20432 JAVA_MODIFIER_CTX_UNMARK.
20433 (java_unget_unicode): Update the character based column position.
20434 (java_allocate_new_line): ref_count not used anymore. Always free
e64c46ce 20435 ctxp->p_line. Initialize c_line->char_col to 0.
f6bbde28 20436 (java_get_unicode): Update the character based column position.
6d6044b0 20437 (java_lex): Use ctxp->elc to store current position in source
e64c46ce
AJ
20438 file, at the beginning of the parsed token. Set modifier_ctx entry
20439 corresponding to the parse modifier to a WFL node. Return a WFL
20440 node when an identifier is parsed.
6d6044b0 20441 (java_lex_error): Now uses ctxp->elc to store current position in
e64c46ce 20442 source.
6d6044b0
PB
20443 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20444 * lex.h (build_wfl_node): New function definitions.
20445 (struct java_line): ref_count and next fields are gone. New field
e64c46ce 20446 char_col.
6d6044b0 20447 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
e64c46ce 20448 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
6d6044b0
PB
20449 (JAVA_COLUMN_DELTA): New macro.
20450 (java_lc): New typedef on new struct _java_lc.
20451 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20452 (parse_error_context, parse_warning_context): Changed prototypes.
20453 (java_get_line_col): Added as an available global function.
20454 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20455 (IC_DECL): Replaced by macro IC_TYPE
20456 (DEPEND_WFL): New macro.
20457 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20458 wrong modifier.
20459 (exit_java_complete_class): Removed a commented out statement.
20460 (struct parser_ctxt): Added comments on fields. modifier_ctx is
e64c46ce
AJ
20461 now an array of tree nodes. Deleted fields line_list and
20462 e_line. New field elc, to replace e_line.
f6bbde28 20463 * parse.y (array_type:): Build WFL node.
6d6044b0 20464 (qualified_name:): Build a single WFL node out of two. Retain
e64c46ce 20465 the location information of the first node in the resulting node.
f6bbde28 20466 (package_declaration:): Use package name as a WFL node
6d6044b0
PB
20467 (single_type_import_declaration:): Use imported name as a WFL node.
20468 (type_import_on_demand_declaration:): Use root of the imported
e64c46ce 20469 packages as a WFL node.
6d6044b0
PB
20470 (field_declaration:): Removed unused local variable cl.
20471 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20472 (yyerror): New static elc. Removed static error_line, error_pos.
e64c46ce
AJ
20473 New local code_from_source. Save ctxp->elc into elc at the first
20474 pass. Call java_get_line_col to get a string of the line where
a83f01f0 20475 the error occurred.
6d6044b0
PB
20476 (debug_line): Removed static function.
20477 (parse_error_context, parse_warning_context): Parameter cl is now
e64c46ce 20478 a WFL node. Use its value to initialize ctxp->elc.
6d6044b0
PB
20479 (redefinition_error): Parameter cl is now a WFL node.
20480 (parse_add_interface): New parameter wfl. No longer call
e64c46ce 20481 lookup_cl, use wfl instead.
6d6044b0
PB
20482 (check_class_interface_creation): Parameter cl is now a WFL node.
20483 (maybe_create_class_interface_decl): Likewise.
20484 (add_superinterfaces): New function.
20485 (create_interface): Removed local cl, node, super_decl,
e64c46ce
AJ
20486 super_decl_type. Function now uses id as a WFL node. Better
20487 warning/error report on obsolete or forbidden mix of
20488 modifiers. Now calls add_superinterfaces to register interfaces.
6d6044b0 20489 (create_class): Removed local cl, node. Local variable id is used
e64c46ce
AJ
20490 as a WFL node. Better error report on forbidden modifier
20491 mix. Uses add_superinterfaces to register interfaces.
6d6044b0 20492 (find_field): Argument cl is now a WFL node. Now store the WFL
e64c46ce
AJ
20493 node of a fields that needs to be checked for their
20494 initialization.
6d6044b0 20495 (method_header): Local variable node non longer used. Local
e64c46ce 20496 variable id replaces cl.
6d6044b0 20497 (check_modifiers_consistency): Local variable cl is now a WFL
e64c46ce 20498 node.
6d6044b0
PB
20499 (method_declarator): Local variable cl replaced by parameter id.
20500 (parser_qualified_name): Now uses parameter name as a WFL node.
20501 (parser_check_super_interface): New parameter wfl, for achieve
e64c46ce 20502 greater accuracy during error reports.
6d6044b0 20503 (parser_chain_incomplete_item): New parameter named location. Used,
e64c46ce 20504 along the decl, to construct the incomplete item node.
6d6044b0 20505 (java_complete_class): resolve_class now uses WFL node extracted
e64c46ce 20506 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
6d6044b0
PB
20507 where appropriate.
20508 (complete_method_decl): Unresolved function's argument types are WFL.
20509 (resolve_class): Parameter cl is now a WFL node.
20510 (resolve_and_layout): Likewise.
20511 (do_resolve_class): Likewise. Try first to use cl and then do the
e64c46ce 20512 lookup on the decl when calling check_pkg_class_access.
6d6044b0 20513 (complete_class_report_errors): Use IC_TYPE in place of
e64c46ce
AJ
20514 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20515 instead of doing a lookup over the decl.
6d6044b0
PB
20516 (java_check_final): Use WFL info from field tree list.
20517 (lookup_cl): Rewritten and returns a statically defined WFL node.
20518 (lookup_modifier_cl): Now uses information from WFL nodes.
20519 (process_imports): Likewise.
20520 (read_import_dir): name and cl arguments replaced by a single WFL
e64c46ce 20521 node. Function modified accordingly.
6d6044b0
PB
20522 (find_in_imports_on_demand): Now uses WFL node.
20523 (check_pkg_class_access): cl argument is now a WFL node.
20524 (declare_local_variables): Fixed to use WFL nodes.
20525 (resolve_expression_name): Likewise.
20526 (build_method_invocation_stmt): name_combo argument renamed
e64c46ce 20527 wfl. Function modified to use WFL nodes.
6d6044b0
PB
20528 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20529 (lookup_method_invoke): cl is now a WFL node. Added missing
e64c46ce 20530 IDENTIFIER_POINTER to class type decl name.
f6bbde28 20531
62c9aa5f 205321998-04-14 Dave Brolley <brolley@cygnus.com>
6d6044b0
PB
20533
20534 * lang.c (init_parse): Now returns char* containing the filename.
20535
62c9aa5f 205361998-04-10 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20537
20538 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
20539
20540 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
20541 * class.c (make_class_data): If flag_assume_compiled, initial class
20542 state is CSTATE_PREPARED; make superclass and interfaces direct
20543 references, rather than constant pool indexes.
20544
62c9aa5f 205451998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20546
20547 * parser.y: Include flags.h. Removed debug variable pl.
20548 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20549 (block:): Likewise.
20550 (labeled_statement_nsi:): Generate debug info when reducing
e64c46ce 20551 expression_statement:.
67264b4f 20552 (check_pkg_class_access): get_access_flags_from_decl invocation
e64c46ce 20553 fixed for new CLASS_* flags location.
6d6044b0 20554 (source_end_java_method): Save/restore parser context when
e64c46ce
AJ
20555 entering/leaving this routine. Restore lineno to its right value
20556 before calling expand_end_bindings.
6d6044b0 20557 (build_method_invocation_stmt): build_invoke called with the
e64c46ce 20558 current line information.
6d6044b0 20559 (build_invoke): New argument cl. Wrap the function call around a
e64c46ce 20560 wfl node.
6d6044b0 20561 (refine_accessible_methods_list): Changed comment, removed
e64c46ce 20562 unnecessary code.
6d6044b0
PB
20563 * parse.h: Fixed typo in comments.
20564 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20565 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20566 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
e64c46ce 20567 parser_ccb_indent.
6d6044b0 20568 * lex.c (java_lex): Record the last closing curly bracket of a
e64c46ce 20569 function.
6d6044b0 20570 * jcf-parse.c (jcf_parse_source): Now calls
e64c46ce 20571 java_check_methods. Clarified comment, fixed typo.
6d6044b0
PB
20572
205731998-04-09 Dave Brolley <brolley@cygnus.com>
20574
20575 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20576 (finish_parse): Expose for non USE_CPPLIB builds.
20577
62c9aa5f 205781998-04-08 Jeffrey A Law (law@cygnus.com)
6d6044b0
PB
20579
20580 * lang.c (lang_print_xnode): New function.
20581
62c9aa5f 205821998-04-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20583
20584 * decl.c (class_dtable_decl), java-tree.h: New tree node.
20585 * class.c (get_dispatch_vector, get_dispatch_table): New functions
20586 used to build a class's dispatch table.
20587 (make_class_data): Generate dispatch table if flag_assume_compiled.
20588 Set dtable of class object to address of class_dtable_decl.
20589
20590 * decl.c (int_decl_processing): Make soft_badarrayindex_node
20591 be volatile and have side effects - generates better code.
20592
20593 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
20594 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20595
20596 * expr.c (expand_invoke): If class is final, method is
20597 effectively final, so can call it directly.
20598
20599 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
20600
20601 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
20602
62c9aa5f 206031998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20604
20605 * parse.y (build_method_invocation_stmt): Removed extra argument
e64c46ce 20606 to build_invoke.
6d6044b0 20607
62c9aa5f 206081998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20609
20610 * expr.c (dtable_indent): Now static global.
20611 (expand_invoke): Now call invoke_build_dtable and
e64c46ce 20612 build_invokevirtual.
6d6044b0
PB
20613 (invoke_build_dtable, build_invokevirtual): New functions.
20614 * jcf-io.c (find_class): Defer issuing a warning by setting
e64c46ce 20615 jcf->outofsynch to 1.
6d6044b0
PB
20616 * jcf-parse.c (jcf_out_of_synch): New function.
20617 (load_class): Test this_jcf.outofsynch flag and call
e64c46ce 20618 jcf_out_of_synch accordingly.
6d6044b0 20619 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
e64c46ce 20620 comment indentation.
6d6044b0
PB
20621 * lex.c (java_get_unicode): Fixed code indentation.
20622 (java_lex): Create string literal. Fixed typo. Removed several
e64c46ce 20623 premature obstack_free.
6d6044b0
PB
20624 * parse.h: New enums for name resolution and invocation mode.
20625 (struct qualification): New data structure.
20626 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20627 (do_resolve_class, build_method_invocation_stmt,
e64c46ce
AJ
20628 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20629 debug_line, identical_subpath_p, invocation_mode,
20630 refine_accessible_methods_list, build_invoke,
20631 lookup_method_invoke): New functions declared.
6d6044b0 20632 (build_invokevirtual, invoke_build_dtable, match_java_method,
e64c46ce
AJ
20633 build_field_ref, jcf_out_of_synch): New references to external
20634 functions.
6d6044b0
PB
20635 (struct parse_ctxt): Removed artificial_constructor field.
20636 * parse.y: (array_type:): Type defined for this rule.
20637 (class_type:): Installed default rule for interface_type:.
20638 (array_type:): Now build Java array type.
20639 (qualified_name:): Now use obstack_grow0.
20640 (method_declaration:): Skip the artificial constructor added to
e64c46ce 20641 the list, if any.
6d6044b0
PB
20642 (abstract_method_declaration:): Execute the code only during pass 1.
20643 (block:): Installed default rule in block_statements:.
20644 (block_statement:): Add the statement to the method during pass 2.
20645 (statement_expression): Installed default rule for
e64c46ce 20646 method_invocation:.
6d6044b0 20647 (argument_list:): Added code to build the argument list.
e64c46ce
AJ
20648 (method_invocation:): Added call to create the method invocation
20649 node.
6d6044b0
PB
20650 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20651 (debug_line): New function for debug.
20652 (complete_class_decl): No longer do something during pass 1.
20653 (method_header): Use BUILD_PTR_FROM_NAME.
20654 (parser_qualified_classname): Use obstack_grow0. Removed bogus
e64c46ce 20655 obstack_free.
6d6044b0 20656 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
e64c46ce 20657 function's main comment.
6d6044b0 20658 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
e64c46ce 20659 classes.
6d6044b0
PB
20660 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20661 (resolve_class): Now works with arrays.
20662 (do_resolve_class, resolve_and_layout): New functions.
20663 (java_check_regular_methods): Reverse method list before and after
e64c46ce 20664 having processed it. No longer set ctxp->artificial_constructor.
6d6044b0 20665 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
e64c46ce
AJ
20666 accordingly. Fixed typo in issued error message. Now use
20667 obstack_grow0.
6d6044b0
PB
20668 (find_in_imports_on_demand): Now use obstack_grow0.
20669 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20670 (source_end_java_method): Call expand_expr_stmt instead of
e64c46ce 20671 expand_expr. Calls it before calling expand_function_end.
6d6044b0 20672 (java_method_add_stmt): Do nothing if errors were found during
e64c46ce 20673 parsing.
6d6044b0
PB
20674 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20675 (build_method_invocation_stmt, build_invoke, invocation_mode,
e64c46ce
AJ
20676 lookup_method_invoke, refine_accessible_methods_list,
20677 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20678 New functions.
6d6044b0 20679 * typeck.c (build_java_signature): Properly end method signature
e64c46ce 20680 if return type skipped.
f6bbde28
ZW
20681 (match_java_method): New function.
20682
62c9aa5f 206831998-03-16 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20684
20685 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
20686
62c9aa5f 206871998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20688
20689 * expr.c (build_invoke_non_interface): New function.
20690 (methods_ident, ncode_ident): Now static globals.
20691 (expand_invoke): Use build_invoke_non_interface.
20692 * java-tree.h (struct lang_decl): New field function_decl_body.
20693 (DECL_FUNCTION_BODY): New macro.
20694 * jcf-parse.c (jcf_parse_source): Deeper check before setting
e64c46ce 20695 CLASS_FROM_SOURCE_P.
6d6044b0
PB
20696 (parse_source_file): Fixed typos. Call java_layout_parsed_class
20697 before starting pass 2. Call to java_generate_parsed_class replaced
20698 by java_register_parsed_class.
20699 * lex.c: Fixed typo in header. Some line width related formating.
20700 * lex.h: Some line width related formating.
20701 * parse.h (source_end_java_method, resolve_expression_name,
e64c46ce
AJ
20702 complete_class_decl, maybe_create_class_interface_decl,
20703 check_class_interface_creation): New static function declarations.
6d6044b0 20704 (java_layout_parsed_class, java_method_add_stmt): New function
e64c46ce 20705 declarations.
6d6044b0 20706 (struct parser_ctxt): Field mark_class_generate removed. New
e64c46ce 20707 fields class_list and artificial_constructor.
6d6044b0
PB
20708 * parse.y: Fixed typo in header.
20709 (class_declaration:): Call complete_class_decl when class body
e64c46ce 20710 parsed.
6d6044b0
PB
20711 (method_declaration:): Call source_end_java_method in pass 2 when
20712 the method body is defined.
20713 (postfix_expression:): Do expression name resolution on sub-rule
e64c46ce 20714 name during pass 2.
6d6044b0 20715 (create_class, create_interface): Merged common pieces.
e64c46ce 20716 (check_class_interface_creation, maybe_create_class_interface_decl):
6d6044b0
PB
20717 New functions.
20718 (complete_class_decl): New function.
20719 (register_fields): Fixed line width related typo.
20720 (method_header): Correctly skip first argument when fixing
e64c46ce 20721 argument line. Changed the loop.
6d6044b0
PB
20722 (java_check_circular_reference): Now use ctxp->class_list.
20723 (java_complete_class): Removed start/stop marking.
20724 (java_check_regular_methods): Now takes a class decl as an
e64c46ce 20725 argument. Add default constructor if none were encountered.
6d6044b0 20726 (java_check_methods): Now use ctxp->class_list. Changed call to
e64c46ce 20727 java_check_regular_methods.
6d6044b0 20728 (source_start_java_method): Set DECL_ARG_TYPE for each function
e64c46ce 20729 arguments.
6d6044b0
PB
20730 (source_end_java_method, java_method_add_stmt): New functions.
20731 (java_generate_parsed_class): No longer exists.
e64c46ce 20732 (java_layout_parsed_class, java_register_parsed_class): New functions.
f6bbde28 20733 (resolve_expression_name): New function.
6d6044b0 20734
62c9aa5f 207351998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20736
20737 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20738 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
e64c46ce
AJ
20739 until pass initializations are done. Call read_import_dir with
20740 pass set to 0.
6d6044b0
PB
20741 * parse.h: (lookup_modifier_cl): New function declared.
20742 (INTERFACE_FIELD_MODIFIERS): New macro.
20743 (OBSOLETE_MODIFIER_WARNING): New macro.
20744 * parse.y: (register_fields): Class type and current field name in
e64c46ce 20745 local variables. Check modifier(s) if adding field(s) to an interface.
6d6044b0 20746 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
e64c46ce 20747 and report errors using the faulty modifier line context.
6d6044b0
PB
20748 (lookup_modifier_cl): New function.
20749 (read_import_dir): Detect and report default import processing
e64c46ce 20750 failure.
6d6044b0
PB
20751
207521998-02-11 Brendan Kehoe <brendan@cygnus.com>
20753
20754 Add a pair of -fassume-compiled/-fno-assume-compiled options.
20755 * class.c (is_compiled_class): Return 1 after making sure it
20756 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20757 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20758 * java-tree.h (flag_assume_compiled): Add decl.
20759 * lang.c (lang_f_options): Add the flag.
20760 (flag_assume_compiled): Add decl, default to 0.
20761
62c9aa5f 207621998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20763
20764 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20765 (is_compiled_class): Likewise.
20766 (layout_class): Likewise.
20767 (layout_class): Detect and lay out classes defined in source code.
20768 (interface_of_p, add_interface_do, may_add_interface): New
e64c46ce 20769 function.
6d6044b0
PB
20770 (add_interface): Now use add_interface_do.
20771 (add_method_1): New function.
20772 (add_method): Now use add_method_1.
20773 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20774 (complete_start_java_method): New function.
20775 (start_java_mehod): Now call complete_start_java_method.
20776 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20777 (expand_invoke): Likewise and fixed typo.
20778 *gjava.c: (print_super_field): Use new argument to find_class
e64c46ce 20779 DO_CLASS_FILE.
6d6044b0
PB
20780 (main): Likewise.
20781 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
e64c46ce
AJ
20782 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20783 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20784 IDENTIFIER_NODE.
20785 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
6d6044b0
PB
20786 (add_method_1, push_class): New prototypes.
20787 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20788 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
e64c46ce 20789 directory where the class was found.
6d6044b0 20790 (find_class): New argument DO_CLASS_FILE. Function find_class
e64c46ce 20791 modified accordingly.
6d6044b0
PB
20792 *jcf-parse.c: (fix_class_path): New function.
20793 (load_class): Use new VERBOSE argument. load_class now finds and
e64c46ce 20794 loads/parses .class/.java files. Save read_state of current_jcf
6d6044b0
PB
20795 if necessary.
20796 (java_parser_abort_on_error): New macro.
20797 (jcf_parse_source, parse_source_file): New function.
20798 (jcf_parse): Fixed typo.
20799 (yyparse): Call parse_source_file () only.
20800 (process_zip_dir): Fixed typo, fix zdir->filename_length when
e64c46ce 20801 writing the real class name back in the zip directory entry.
6d6044b0
PB
20802 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20803 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20804 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20805 (find_class): Prototype fixed.
20806 *lex.c: Added 1998 time stamp.
20807 Removed all static global variables, moved into the parser
e64c46ce
AJ
20808 context data structure.. Now include unistd.h if SEEK_SET not
20809 defined.
6d6044b0
PB
20810 (java_init_lex): Rewritten.
20811 (java_sneak_unicode): Modified current unicode access in current line.
20812 (java_unget_unicode): Likewise.
20813 (java_allocate_new_line): New allocation management.
20814 (java_read_char): Modified access and storage of unget_utf8_value.
20815 New way of processing current unicode.
20816 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20817 (java_get_unicode): Now use the parser context.
20818 (java_lineterminator): Likewise.
20819 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
e64c46ce
AJ
20820 of the reentrant parser implementation. Function now use the
20821 parser context data structure and java_lval. Fixed production of
20822 the float and double constant "out of range" error message. Fixed
20823 obstack use. Return integer value when hitting a modifier. Now
20824 return type for TRUE, FALSE and other predefined types. Return
20825 identifier as a TREE_LIST list containing the current line context
20826 as the TREE_VALUE sub-node.
6d6044b0
PB
20827 (java_unicode_2_utf8): Fixed typo in declaration.
20828 (java_lex_error): Now use the parser context data structure.
20829 *lex.h: Added 1998 time stamp.
20830 (struct java_line): New fields ref_count and next.
20831 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
e64c46ce 20832 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
6d6044b0
PB
20833 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20834 *parse.h: Added 1998 time stamp.
20835 (java_parse_source_file): Renamed from parse_source_file.
20836 (YYERROR_NOW, YYNOT_TWICE): Fixed.
20837 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
e64c46ce
AJ
20838 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20839 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20840 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20841 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20842 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
6d6044b0
PB
20843 (struct parser_ctxt): New data structure to keep the parser context.
20844 *parse.y: Added 1998 time stamp, got rid of static global variables.
20845 (java_error_count, ctxp): New global variables.
20846 (%union): New value field.
20847 (numeric_type, integral_type): Rules removed.
20848 (primitive_type): Rule defined to handle integral, float, double and
e64c46ce 20849 boolean types.
6d6044b0 20850 (qualified_name, package_declaration,
e64c46ce
AJ
20851 single_type_import_declaration, type_import_on_demand_declaration,
20852 modifiers, class_declaration, super, interfaces,
20853 interface_type_list, class_body, field_declaration,
20854 field_declaration, variable_declarators, variable_declarator,
20855 variable_declarator_id, method_declaration, method_header,
20856 formal_parameter_list, formal_parameter, method_body, block,
20857 static, interface_declaration, extends_interfaces,
20858 abstract_method_declaration, local_variable_declarators): Rules now
20859 define actions.
6d6044b0
PB
20860 (force_error, do_warning): New global statics.
20861 (push_parser_context, parser_context_save_global,
e64c46ce 20862 parser_context_restore_global, pop_parser_context): New functions.
6d6044b0
PB
20863 (yyerror): Now uses the global parser context. Fixed use of obstack.
20864 (parse_error, parse_error_context, parse_warning_context,
e64c46ce
AJ
20865 java_accstring_lookup, redefinition_error, check_modifiers,
20866 parser_add_interface, create_interface, create_class, find_field,
20867 duplicate_declaration_error, register_fields, method_header,
20868 check_modifiers_consistency, check_abstract_method_header,
20869 method_declarator, parser_qualified_classname,
20870 parser_check_super_interface, parser_check_super,
20871 parser_chain_incomplete_item, java_check_circular_reference,
20872 layout_class_from_source, java_complete_class,
20873 complete_method_decl, resolve_class, complete_class_report_errors,
20874 java_check_final, check_method_redefinition,
20875 java_check_regular_methods, java_check_abstract_methods,
20876 java_check_methods, lookup_java_interface_method2,
20877 lookup_java_method2, lookup_cl, find_name_in_single_imports,
20878 process_imports, find_in_imports, read_import_entry,
20879 read_import_dir, find_in_imports_on_demand,
20880 check_pkg_class_access, not_builtin_p, declare_local_variables,
20881 source_start_java_method, java_generate_parsed_class): New
20882 functions.
6d6044b0
PB
20883 *typeck.c: (signature_include_return): New global variable.
20884 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
e64c46ce 20885 to add the function returned type in the signature.
6d6044b0
PB
20886
208871998-02-09 Brendan Kehoe <brendan@cygnus.com>
20888
20889 * jcf-io.c (open_in_zip): Use strncmp and LEN.
20890
62c9aa5f 208911998-01-29 Dave Brolley <brolley@cygnus.com>
6d6044b0
PB
20892
20893 * Make-lang.in (java.info): Added.
20894 (java.install-info): Added
20895
208961998-01-27 Brendan Kehoe <brendan@cygnus.com>
20897
20898 * Makefile.in (clean): Also remove java/parse.c.
20899
209001998-01-26 Brendan Kehoe <brendan@cygnus.com>
20901
20902 Add a pair of -fbounds-check/-fno-bounds-check options.
20903 * lang.c (lang_decode_option): Add code to grok arguments.
20904 (flag_bounds_check): Add decl.
20905 (lang_f_options): New array w/ the option in it.
20906 * java-tree.h (flag_bounds_check): Add decl.
20907 * lang-options.h: New file.
20908 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20909 of a static macro value.
20910 (JAVA_ARRAY_EXCEPTION): Delete macro.
20911
62c9aa5f 209121998-01-23 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20913
20914 * typeck.c (build_java_array_type): Fix two bugs in previous change.
20915 * expr.c (build_anewarray): Add missing promote_type.
20916
62c9aa5f 209171998-01-22 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20918
20919 Add array types with known length to optimize bounds checking.
20920 * typeck.c (build_java_array_type): Take length parameter.
20921 (java_array_type_length, build_prim_array_type): New functions.
20922 * java-tree.h: Update for new functions.
20923 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20924 * class.c: Use build_prim_array_type.
20925 * expr.c (can_widen_reference_to): Handle known-length array types.
20926 (verify_jvm_instructions): Keep track of integer push instructions
20927 followed by newarray/anewarray, so we can build known-length arrays.
20928 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
20929 (java_array_data_offset): New function.
20930 (build_java_array_length_access): New function. Optimize if constant.
20931 (build_java_arrayaccess): Constant fold bounds check.
20932 (expand_java_newarray, expand_java_anewarray): Replaced by ...
20933 (build_newarray, build_anewarray): New functions.
20934 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
20935 * verify.c (merge_types): Handle known-lengh array types.
20936
62c9aa5f 209371998-01-19 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20938
20939 * expr.c (expand_byte_code): Fix performace bug, which caused
20940 searching linenumber_table to be linear rather than constant.
20941
62c9aa5f 209421997-12-12 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20943
20944 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
20945
20946 * decl.c, java-tree.h (soft_fmod_node): New global.
20947 * decl.c (init_decl_processing): Define __builtin_fmod.
20948 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
20949 using __builtin_fmod.
20950
62c9aa5f 209511997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20952
20953 * keyword.h: New file, output of keyword.gperf as processed by
e64c46ce 20954 gperf.
6d6044b0
PB
20955 * lex.c (java_lex_init): Initialize java_error_flag.
20956 * parse.c (YYERROR_NOW): Uses java_error_flag.
20957 * parse.y: New static java_error_flag. Useless definition of
e64c46ce 20958 buffer_error gone.
6d6044b0 20959 * parse.y (java_error): Portable error recovery using
e64c46ce 20960 java_error_flag (not yet completely tuned).
6d6044b0
PB
20961
209621997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
20963
20964 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20965
62c9aa5f 209661997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
20967
20968 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20969 (parse.c, lex.c, keyword.h): New rules for Java source code
e64c46ce 20970 front-end.
6d6044b0
PB
20971 * parse.c: Renamed into jcf-parse.c.
20972 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20973 * keyword.gperf: New file, Java keywords.
20974 * parse.y: New file, Java language grammar.
20975 * parse.h: New file, Java language grammar definitions.
20976 * lex.c: New file, Java language lexer.
20977 * lex.h: New file, Java language lexer definitions.
20978
62c9aa5f 209791997-12-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20980
20981 * decl.c (clinit_identifier_node), java-tree.h: New global.
20982 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
20983 * verify.c (verify_jvm_instructions): Inline use of removed macros.
20984 * expr.c (expand_java_field_op): Check for invalid assignment
20985 to final field.
20986
20987 * jcf-reader.c (get_attribute): Test for wrong attribute length.
20988
62c9aa5f 209891997-10-27 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20990
20991 * verify.c (verify_jvm_instructions): When processing a handler,
20992 attempt to set the current_subr to the right value.
20993 (More complicated code combines Sep 17 and Oct 22 versions.)
20994
62c9aa5f 209951997-10-24 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
20996
20997 * class.c (push_class): Figure out (guess) name of source file.
20998 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
20999 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
21000 (parse_class_file): Change return type from int to void.
21001 Call debug_start_source_file/debug_end_source_file.
21002
21003 * expr.c (build_java_binop): Fix masking 2nd operand.
21004 * decl.c (init_decl_processing): Set sizetype first.
21005
62c9aa5f 210061997-10-22 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21007
21008 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
21009 (Revert Sep 17 change.)
21010
62c9aa5f 210111997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21012
21013 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
e64c46ce
AJ
21014 .class extension in their name and fix thing so we don't process
21015 them parse_zip_file_entries().
6d6044b0
PB
21016 (parse_zip_file_entries): Cleaned unused local variables.
21017
62c9aa5f 210181997-10-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21019
21020 * expr.c (can_widen_reference_to): Allows equal array element types.
21021 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
21022 * jcf-dump.c (RET): Get (and print) index.
21023
21024 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21025 Promote element type to POINTER_TYPE.
21026
62c9aa5f 210271997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21028
21029 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
e64c46ce
AJ
21030 find_in_current_zip, jcf_figure_file_type): Moved from
21031 jcf-reader.c to parse.c.
6d6044b0
PB
21032 * zextract.c: (read_zip_archive): takes file_comment_length possible
21033 field into account.
21034
62c9aa5f 210351997-10-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21036
21037 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
21038
21039 * verify.c (merge_types): Handle array types even better ...
21040
62c9aa5f 210411997-10-17 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21042
21043 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
21044
21045 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
21046 * class.c (make_class_data): Don't build fields_decl if no fields.
a83f01f0 21047 When building fields_decl, skip if DECL_ARTIFICIAL.
6d6044b0
PB
21048
21049 * expr.c (java_stack_swap): Update stack_type_map.
21050 * verify.c (merge_types): Handle array types better.
21051
62c9aa5f 210521997-10-15 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21053
21054 * class.c (add_field): Don't promote short integral fields to
21055 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21056 * expr.c (push_value): Promote and convert short integral values.
21057
21058 * decl.c, java-tree.h (integer_two_node): New constant node.
21059 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
21060
62c9aa5f 210611997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21062
21063 * class.c (append_gpp_mangled_type): Use function argument
e64c46ce 21064 unpromoted type to generate mangled name.
6d6044b0 21065
62c9aa5f 210661997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21067
21068 * constants.c (build_constant_data_ref): Now uses current_class
e64c46ce 21069 instead of main_class.
6d6044b0 21070 (build_constants_constructor): Now uses current_class instead of
e64c46ce 21071 main_class.
6d6044b0 21072 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
e64c46ce 21073 of the global variable SeepZipFiles done here.
6d6044b0 21074 * zextract.c (read_zip_archive): extra_field optional field taken
e64c46ce
AJ
21075 into account while computing the position of the class file in the
21076 archive.
6d6044b0 21077 * verify.c (verify_jvm_instructions): Use current_jcf to search
e64c46ce 21078 the constant pool.
6d6044b0 21079 * parse.c (load_class): First search for the class to load in the
e64c46ce
AJ
21080 current zip file. Saves current_jcf (restored before returning
21081 from that function). Don't call JCF_FINISH in the class was found
21082 in the current ZIP file.
6d6044b0 21083 (jcf_parse): If the class was found in the current ZIP file, save
e64c46ce 21084 its tree_constant_pool (for later reuse).
6d6044b0 21085 (parse_class_file): New function. Process each method defined in
e64c46ce 21086 the current class and record the class as to be later registered.
6d6044b0
PB
21087 (yyparse): Rewritten. Figure the type of the current file and switch
21088 accordingly.
21089 * lang.c: New global variable current_jcf.
21090 (lang_init): Removed compiling_from_source test (done later, in
e64c46ce 21091 yyparse). Removed call the jcf_parse ().
6d6044b0
PB
21092 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21093 (typedef struct JCF): New fields seen_in_zip (to mark a class found
21094 in the current ZIP file) and zip_offset (offset to the class data in
21095 the current zip file).
21096 * jcf-reader.c: zipfile.h included.
21097 localToFile: New ZipFileCache static global variable
21098 (parse_zip_file_entries): New function. Browse the current ZIP
e64c46ce 21099 file directory and process each class found.
6d6044b0 21100 (process_zip_dir): New function. Register each class found in the
e64c46ce
AJ
21101 ZIP file directory. The class aren't parsed but a valid JCF is
21102 link to each of them.
6d6044b0 21103 (find_in_current_zip): New function. Search for a class in the
e64c46ce
AJ
21104 current ZIP file directory. If found, prepare the class so that it
21105 can be loaded.
6d6044b0 21106 (jcf_figure_file_type): New function. Examine the file structure
e64c46ce
AJ
21107 to figure a class file, a ZIP file. If none of these categories are
21108 matched, a source file is assumed.
6d6044b0 21109 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
e64c46ce 21110 SeenZipFile: New global variable.
6d6044b0 21111 (open_in_zip): Use zipmember's length to accelerate the search for
e64c46ce
AJ
21112 a member. If zipmember was NULL and zip file successfully read,
21113 return 0.
6d6044b0 21114 * java-tree.h: New global variable current_jcf declared. Added
e64c46ce 21115 declaration for current_constant_pool_tags, current_constant_pool_data,
6d6044b0
PB
21116 current_constant_pool_length, current_constant_pool_data_ref.
21117 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
e64c46ce 21118 store the JCF of classes seen in a zip file) and tree *constant_pool
6d6044b0
PB
21119 (to save a loaded class constant pool). current_class declared here.
21120 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
e64c46ce 21121 retrieve method_ref_constant.
6d6044b0
PB
21122 (PUSHC): java_push_constant_from_pool now uses current_jcf.
21123 (OBJECT): get_class_constant now uses current_jcf.
21124 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21125 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21126 (expand_invoke): Now uses current_class instead of main_class
21127 (build_class_init): Now uses current_class instead of main_class
21128 * class.c: New static global variable registered_class.
21129 (register_class): New function.
21130 (emit_register_class): Modified to use registered_class instead of
e64c46ce 21131 main_class
6d6044b0
PB
21132 (is_compiled_class): Now take into account class seen in the archive.
21133
62c9aa5f 211341997-10-06 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21135
21136 * except.h: Renamed to: java-except.h.
21137 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
21138 * except.c: Add semi-working (commented out) implementation.
21139
21140 * expr.c (expand_iinc): Add needed flush_quick_stack.
21141 * parse.c (set_source_filename): New function.
21142 (give_name_to_class): Set input_filename from package.classname.java.
21143
21144 * jcf-io.c (find_class): Don't look first in ".".
21145
62c9aa5f 211461997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21147
21148 * zextract.c (read_zip_archive): Now takes into account the
e64c46ce 21149 extra_field field.
6d6044b0 21150 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
f6bbde28 21151
62c9aa5f 211521997-09-20 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21153
21154 * constants.c, java-tree.h (build_internal_class_name): New function.
21155 (alloc_class_constant): Re-implement using build_internal_class_name.
21156 * class.c (make_class_data): Likewise.
21157 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
21158
62c9aa5f 211591997-09-17 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21160
21161 * verify.c (verify_jvm_instructions): Temporarily set current_subr
21162 to NULL before pushing an exception handler target.
21163
21164 * expr.c (flush_quick_stack): Save from low stack indexes to high.
21165 (java_stack_swap, java_stack_dup): Re-write to be safe from
21166 clobbering registers.
21167 (build_class_init): New function.
21168
62c9aa5f 211691997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21170
21171 * typeck.c (build_java_array_type): Temporary use
e64c46ce 21172 permanent_obstack to create the array 'length' field.
6d6044b0 21173 * expr.c (lookup_label): Temporay use permanent_obstack to create
e64c46ce 21174 label if not found.
6d6044b0
PB
21175 * class.c (push_super_field): Tempory use permanent_obstack.
21176
62c9aa5f 211771997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21178
21179 * typeck.c (type_for_mode): Now handles double_type_node and
e64c46ce 21180 float_type_node.
6d6044b0 21181 * verify.c (verify_jvm_instructions): The instruction following
e64c46ce
AJ
21182 the wide bytecode is checked. OPCODE_ret added to the list of
21183 wide.
6d6044b0 21184
62c9aa5f 211851997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21186
21187 * class.c (make_class): Temporary use permanent_obstack. Set the
e64c46ce 21188 class CLASS_P field to 1.
6d6044b0
PB
21189 (push_class): Temporary use permanent_obstack.
21190 (set_super_info): Temporary use permanent_obstack.
21191 (add_method): Temporary use permanent_obstack, set
e64c46ce 21192 METHOD_TRANSIENT().
6d6044b0 21193 (add_field): Temporary use permanent_obstack. Sets
e64c46ce 21194 FIELD_VOLATILE() and FIELD_TRANSIENT().
6d6044b0 21195 (build_class_ref): Temporary use permanent_obstack if the class
e64c46ce 21196 isn't compiled.
6d6044b0 21197 (build_static_field_ref): Temporary use permanent_obstack when
e64c46ce 21198 creating field's rtl.
6d6044b0 21199 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
e64c46ce 21200 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
6d6044b0
PB
21201 and fields. Function finalized, as far as flag handling.
21202 (push_class_static_dummy_field): Temporary use permanent_obstack.
21203 (emit_register_class): Force generation of class registration at
e64c46ce 21204 -O3 or deeper.
6d6044b0
PB
21205 * decl.c (end_java_method): Call permanent_allocation() before
21206 returning.
21207 * expr.c (can_widen_reference_to): Added comment to interface
21208 handling, fixed typo.
21209 (lookup_field): Now uses CLASS_P() to correct FIXME
f6bbde28 21210 (expand_invoke): Verification on public && !static &&
6d6044b0
PB
21211 !abstract moved into soft_lookupinterfacemethod (kaffe).
21212 Use Object class dtable if objectref is an array when expanding
21213 invokeinterface.
21214 (java_push_constant_from_pool): Temporary use permanent_obstack
21215 for CONSTANT_string
21216 * parse.c (get_ref_constant): Temporary use permanent_obstack to
e64c46ce 21217 create constant references.
6d6044b0
PB
21218 (get_constant): Temporary use permanent_obstack to create constant.
21219 (load_class): Temporary use permanent_obstack to load class.
21220 (jcf_parse): Temporary use permanent_obstack to perform class
21221 layout.
21222 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21223 (build_java_signature): Temporary use permanent_obstack.
17126208 21224 * verify.c: (verify_jvm_instruction): removed unnecessary verification
6d6044b0
PB
21225 on ACC_SUPER flag.
21226 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21227 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21228 (CLASS_P): Defined
21229
62c9aa5f 212301997-09-11 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21231
21232 * class.c (append_gpp_mangled_type): Fix typo.
21233 (emit_register_class): Use main_class to get class object, rather
21234 than looking for no-longer-existing static decl starting with _CL.
21235 * typeck.c (parse_signature_type): Promote array element type
21236 if it is a RECORD_TYPE.
f6bbde28 21237
62c9aa5f 212381997-09-10 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21239
21240 * class.c (push_class_static_dummy_field): New function.
21241 (mangle_static_field): New. Do G++-style mangling of static fields.
21242 (layout_class): Mandle static fields here, not in add_field.
21243 (build_class_ref): The class object is now a dummy static field.
21244 * decl.c (find_local_variable): Look for best, instead of first match.
21245 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
21246 (build_java_athrow): Don't check here if exception is Throwable.
21247 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
21248 (TYPE_USED): Removed. No longer used ...
21249 * parse.c (jcf_parse): Call push_class_static_dummy_field.
21250 * verify.c (push_pending_label): New function.
21251 (push_pending_block): Renamed to check_pending_block.
21252 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
21253 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
21254 re-checking possible handlers) after a store (less wasted work).
e64c46ce 21255 Check for null handler (finally) before calling add_handler.
6d6044b0
PB
21256 Various changes to (finally?) correctly handle try/finally.
21257
212581997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
21259
21260 * class.c: Include stdio.h.
21261
62c9aa5f 212621997-09-04 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21263
21264 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21265 to make sure class is initialized before static/special invoke.
21266
21267 * verify.c (verify_jvm_instructions): On a store instruction,
21268 call find_local_variable to force pre-allocation of decl and rtx.
21269 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
21270
62c9aa5f 212711997-09-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21272
21273 * class.c (build_class_ref): Strip off "promoted_" if need be.
21274 (make_field_value): Call build_java_signature when needed.
21275 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
21276 * expr.c (build_java_athrow): Don't push_value of exception.
21277 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21278 match specification of [fd]cmp[lg] for NaNs.
21279 (expand_byte_code): Add support for exception handler ranges.
21280 * except.c: Add skeleton for EH code-generation.
21281 * verify.c (merge_types): Treat all promoted integral types as equal.
21282 * constants.c (build_constants_constructor): To force creation of
e64c46ce 21283 current_constant_pool_data_ref, call build_constant_data_ref.
f6bbde28 21284
6d6044b0
PB
21285 * javaop.def (lload): Fix typo.
21286 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
f6bbde28 21287
62c9aa5f 212881997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
6d6044b0
PB
21289
21290 * parse.c: Don't include function.h.
21291
62c9aa5f 212921997-08-27 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21293
21294 * except.[ch]: New files.
21295 * Makefile.in (JAVA_OBJS): Add except.o
21296 * expr.c: Temporary warning about unimplemented exceptions.
21297 * verify.c: Verify exception handlers.
f6bbde28 21298
6d6044b0
PB
21299 * jcf-dump.c (disassemble_method): Print exception table.
21300
62c9aa5f 213011997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21302
21303 * expr.c (verify_jvm_instructions): Started a thorough
e64c46ce 21304 verification of invoke* bytecodes.
6d6044b0 21305 (expand_byte_code): flush quick stack if PC is the target of a
e64c46ce 21306 branch. and undef RET (conflicting with config/i386/i386.h).
6d6044b0 21307 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
e64c46ce 21308 used.
6d6044b0 21309 (expand_invoke): Now handles invokeinterface and do more
e64c46ce 21310 verification according to the bytecode.
6d6044b0 21311 (lookup_field): Don't try to load the class if processing
e64c46ce 21312 dtable_type.
6d6044b0
PB
21313 (can_widen_reference_to): Now handles interfaces.
21314 * decl.c (init_decl_processing): New global variable
e64c46ce 21315 soft_lookupinterfacemethod_node, declared in java-tree.h.
6d6044b0
PB
21316 Call set_super_info on string_type_node.
21317 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21318 defined.
21319 * class.c (set_super_info): Fills the CLASS_* flags according to
21320 access_flags.
21321 (get_access_flags_from_decl): Handles all class flags.
21322
62c9aa5f 213231997-08-26 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21324
21325 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
21326 * parse.c (yyparse): Check for abstract method, and missing code.
21327 * expr.c (expand_byte_code): Change interface.
21328 * lang.c (put_decl_node): Print promoted types prettier.
21329 * verify.c (verify_jvm_instruction): Change interface.
21330 Partial support for scanning exception table.
21331 For load instructions, handle promoted integral types.
21332
62c9aa5f 213331997-08-21 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21334
21335 * verify.c: New file, with contents moved from expr.c.
21336 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
21337 * typeck.c (is_array_type_p): Moved here from expr.c.
21338 * java-tree.h: Add some now-needed function declarations.
21339 * Makefile.in (JAVA_OBJS): Added verify.o.
21340
62c9aa5f 213411997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21342
21343 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21344 METHOD_ABSTRACT flag.
21345
21346 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21347 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21348 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21349
21350 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21351 variables.
21352 (start_java_method): Hook for SYNCHRONIZED methods.
21353
21354 * expr.c (build_java_jsr, build_java_ret): New functions
21355 (JSR,PRE): New macros
21356 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
f6bbde28 21357 (verify_jvm_instructions): tableswitch, lookupswitch,
6d6044b0
PB
21358 monitorenter, monitorexit, goto_w: verified.
21359 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21360 (build_java_monitor): New function.
21361 (MONITOR_OPERATION): Modified to call build_java_monitor()
f6bbde28 21362 (verify_jvm_instructions): Started a thorough verification of
6d6044b0
PB
21363 invoke* bytecodes.
21364
62c9aa5f 213651997-08-19 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21366
21367 Support verification of jsr/ret subroutines (used for try/finally).
21368 * decl.c (return_address_type_node): New type node.
21369 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21370 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21371 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
21372 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21373 TYPE_USED): New macros for special types in type_map.
21374
21375 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
21376 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
21377 BCODE_JUMP_TARGET.
21378 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
21379
21380 * expr.c (can_widen_reference_to): New function.
21381 (pop_type): Use it.
21382 (merge_type_state): Support handling start of subroutine.
21383 (push_pending_block): Return char* error message, instead of calling
21384 fatal on an error. Also handle subroutines.
21385 (verify_jvm_instructions): Handle errors from push_poending_block.
21386 Support jsr and ret instructions.
f6bbde28 21387
62c9aa5f 213881997-08-19 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21389
21390 * jcf-io.c (find_classfile): Fix thinko.
21391 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
21392
62c9aa5f 213931997-08-12 Jason Merrill <jason@yorick.cygnus.com>
6d6044b0
PB
21394
21395 * Makefile.in (BISON): Remove.
21396
62c9aa5f 213971997-08-07 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21398
21399 * Makefile.in: Convert to autoconf.
21400 * config-lang.in (outputs): Added java/Makefile.
21401
21402 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21403 Rename cc1java to jc1.
21404
21405 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
21406 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
21407
21408 * class.c (class_depth): Do load_class if needed.
21409
21410 Mostly better verification.
21411 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
21412 (init_decl_processing): Change return type of soft_checkcast.
21413 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
21414 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21415 lang_print_error): New functions.
21416 (lang_init): Set global hook print_error_function to lang_print_error.
21417 * expr.c: In the type_map ptr_type_node is only used for null now.
21418 (pop_type, merge_types): Hence ptr_type_node matches any reference.
21419 (merge_types): Dererence pointer to record types before comparing.
21420 (decode_newarray_type, merge_types): On error just return NULL.
21421 (build_java_binop): Add preliminary implementation (with warning)
21422 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21423 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
21424 (expand_compare, expand_java_goto, expand_java_call): Don't
21425 push_pending_block, since that only makes sense when verifying.
21426 (merge_type_state): Different return codes.
21427 (push_pending_block): A block may need to be verified more than once.
21428 (expand_byte_code): Warn about unused code at code generation time.
21429 (verify_jvm_instruction): Changed logic, since code may need to be
21430 re-verified if type-state has changed. Also, better error handling.
21431 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21432 Improve newarray, anewarray, ?aload, athrow,
21433 * java-tree.h (LABEL_CHANGED): New macro.
f6bbde28 21434
62c9aa5f 214351997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21436
21437 * decl.c (soft_athrow_node): New global variable initialized.
21438 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21439 * typeck.c (convert): Added support for REAL_TYPE.
21440 (convert_to_char): New function.
21441 (convert): Handle CHAR_TYPE.
21442 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21443 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21444 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21445 promoted type.
21446 (verify_jvm_instructions): Added break a the end of bogus unop: label.
21447 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21448 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21449 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21450 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21451 to Use The Right Things.
21452 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
e64c46ce 21453 compatible with INT. BOOLEAN is made equivalent to BYTE.
f6bbde28 21454 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
6d6044b0
PB
21455 OPCODE_ifnonnull): Now supported.
21456 (build_java_athrow): New function.
21457
62c9aa5f 214581997-08-04 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21459
21460 Rename method name <init> to match G++ (and fix mangling).
21461 * class.c (layout_class): Replace method name of <init> by class name.
21462 (make_method_value): Do inverse renaming of constructor from <init>.
21463 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
21464 * typeck.c (lookup_java_constructor): New function.
21465 * expr.c (expand_invoke): If method_name is <init>, call
21466 lookup_java_constructor to find constructor.
21467
21468 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
21469
62c9aa5f 214701997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
6d6044b0
PB
21471
21472 * parse.c (get_class_constant): Modified to handle array "classes"
21473 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21474 wide type.
21475 (convert): Modified to handle real type.
21476 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21477 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21478 variables declared.
21479 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21480 soft_multianewarray, soft_newarray_node, soft_throw_node): New
21481 global variables initialized.
21482 (find_local_variable): Handles the case of a pointer
21483 (end_java_method): Restore the use of one more scope
21484 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21485 build_java_array_length_access, expand_java_arrayload,
21486 expand_java_arraystore, expand_java_array_length,
f6bbde28 21487 expand_java_multianewarray, expand_java_anewarray,
6d6044b0
PB
21488 build_java_check_indexed_type, is_array_type_p,
21489 build_java_throw_out_of_bound_exception): New functions.
21490 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21491 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21492 OPCODE_<t>aload): Implemented code for verification.
21493 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21494 ARRAY_NEW_MULTI): Macro defined.
21495 (CONVERT): Modified to invoke convert().
21496 (case OPCODE_aload2): Fixed index typo from 2 to 1.
21497
62c9aa5f 214981997-07-31 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21499
21500 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
21501 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
21502 (make_class_data): Field name needs '/' as package prefix.
21503 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
21504
62c9aa5f 215051997-07-25 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21506
21507 Implement debug information for local variables.
21508 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21509 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21510 DECL_LOCAL_SLOT_CHAIN): New macros.
21511 (struct lang_decl_var): New type.
21512 * parse.c (give_name_to_locals): Move to decl.c.
21513 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
21514 (start_java_method): Re-write parameter handling.
21515 (pending_local_decls): New global variable.
21516 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
21517 (find_local_variable): Accept pc so we can skips decls not in range.
21518 (struct binding_level): Add end_pc field.
21519 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21520 (various): Change so current pc gets passed to find_local_variable.
21521
21522 * decl.c (init_decl_processing): Re-arrange fields in
21523 class_type_node and and method_type_node to match kaffe 0.9.1.
21524 * class.c (make_method_value, make_class_data): Update
21525 initializations to match.
f6bbde28 21526
62c9aa5f 215271997-07-16 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21528
21529 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21530 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
21531 (push_super_field): New function.
21532 (make_class_data): Handle inheritance of class static initializer.
21533 (layout_class): New name mangling.
21534 * constants.c (build_constant_data_ref): Init type of data array
21535 to a one-element array.
21536 (build_constants_constructor): Set DECL_SIZE from complete array type.
21537 * decl.c: Rename class_type, object_type etc to class_type_node,
f6bbde28 21538 object_type_node etc. Make former inherit from latter.
6d6044b0
PB
21539 * expr.c (expand_invoke): Add cast of function address.
21540 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
21541 * parse.c (yyparse): Don't call layout_class here.
21542 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
21543
62c9aa5f 215441997-06-14 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21545
21546 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
21547 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
21548 (alloc_class_constant): New.
21549 * expr.c (expand_invoke): Make sure method's class is initialized.
21550 * class.c (interits_from_p, emit_register_class): New functions.
21551 * parse.c (yyparse): Call emit_register_class.
21552
62c9aa5f 215531997-06-09 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21554
21555 * constants.c: New file, to handle constant pool.
21556 * Makefile.in (JAVA_OBJS): Add constants.o.
21557 * decl.c (init_decl_processing): Update, fix, finish various structs.
21558 (pushdecl_top_level): New.
21559 * parse.c (layout_class): Moved to class.c.
21560 * expr.c (java_push_constant_from_pool): New function.
21561 * class.c (build_class_ref): Make work fully
21562 (make_class_data): Emit super-class, constant pool, interface vector.
21563
62c9aa5f 215641997-06-03 Per Bothner <bothner@cygnus.com>
6d6044b0
PB
21565
21566 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
21567 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
21568 * class.c (class_depth): New function.
21569 (lookup_named_class): Replaced by new function lookup_class.
21570 * decl.c (object_type_node, string_type_node): New.
21571 Remove various types that we no longer need.
21572 * expr.c (verify_jvm_instructions): New separate verifier pass.
21573 (push_type, pop_type): New functions for verifier.
21574 (type_stack_dup, pop_argument_types, merge_types): Likewise.
21575 (expand_byte_code): Simplify, since we assume already verified.
21576 (expand_invoke): Now mostly works.
21577 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21578 * lang.c (main_class): Move to parse.c. Don't make_class yet.
21579 * parse.c: Wait to allocate class object until we know its name.
21580 (layout_class): Calculate DECL_VINDEX for each virtual method.
21581 * typeck.c (get_array_type): Rename to ...
21582 (build_java_array_type): ... and provide working implementation.
21583 (build_java_signature): New function - build Java signature of type.
21584 (set_java_signature): New function - cache signature with type.
21585 (lookup_java_method): New function.
f6bbde28 21586
62c9aa5f 215871997-05-06 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
21588
21589 * class.c (ident_subst): Take extra SUFFIX parameter.
21590 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
21591 (set_constant_value, build_static_field_ref, is_compiled_class): New.
21592 (build_class_ref): Actually implement.
21593 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
21594 * decl.c (builtin_function): New.
21595 (init_decl_processing): Update for current Kaffe. Declare some
21596 builtin Kaffe functions.
21597 * expr.c (build_address_of): New.
21598 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21599 Renamed (from expand_java_new etc), and added working implementations.
21600 (build_field_ref): Now also handle static fields.
21601 (expand_invoke): Implement invokestatic, and start implement rest.
21602 * java-opcodes.h: Use javaop.def to avoid duplicated list.
21603 * javaop.def: Rename invokevirt -> invokevirtual.
21604 * lang.c (use_handles): Removed.
a83f01f0 21605 * parse.c: Add support for ConstantValue attribute.
6d6044b0
PB
21606 Handle nested loading of a class. (JPOOL_UTF): New.
21607
62c9aa5f 216081997-03-11 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
21609
21610 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
21611
62c9aa5f 216121997-02-27 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
21613
21614 * Make-lang.in (java.install-man): New empty rule.
21615 * typeck.c (set_local_type): New function.
21616 * expr.c (STORE_INTERNAL): Call find_local_variable,
21617 not find_stack_slot. Call set_local_type.
21618
62c9aa5f 216191997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
6d6044b0
PB
21620
21621 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
21622 and building RECORD_TYPE CONSTRUCTORs.
21623 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21624
21625 * lang.c (use_handles): Change the default to 0.
21626 * decl.c: Define and build class_type, field_type, utf8const_type.
21627 * class.c (make_class_data, make_field_value,
21628 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21629 hashUtf8String, strLengthUtf8, mangled_classname:
21630 Functions to build reflective data structures.
21631 * parse.c (yyparse): Call make_class_data.
21632
21633 * jcf-io.c (open_class, find_classfile): New functions.
21634 * jcf-dump.c: Support reading classfile from explicitly-named
21635 class file (without CLASSPATH searching).
21636
62c9aa5f 216371996-10-24 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
21638
21639 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
21640 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21641 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21642 (get_constant): Now trivial for CONSTANT_Utf8.
21643
21644 * jcf.h: Make NEW_CPOOL the default.
21645 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
f6bbde28 21646
62c9aa5f 216471996-10-24 Per Bothner <bothner@deneb.cygnus.com>
6d6044b0
PB
21648
21649 New directory.
This page took 5.761457 seconds and 5 git commands to generate.