]> gcc.gnu.org Git - gcc.git/blame - gcc/java/ChangeLog
parse.h (JDEP_SOLV): Removed.
[gcc.git] / gcc / java / ChangeLog
CommitLineData
daaaf29f
PB
12001-03-17 Per Bothner <per@bothner.com>
2
3 * parse.h (JDEP_SOLV): Removed.
4 * parse.y (incomplete_class_list): Removed.
5 (register_incomplete_type): Use JDEP_TO_RESOLVE instead of JDEP_SOLV.
6
7 * parse.y (obtain_incomplete_type): Removed. It doesn't work if
8 resolve_class changes the name of an array type that is on the list
9 and then someone else looks for the modified name. Also, seems liable
10 to break when compiling multiple source files at once. So the simplest
11 is to just remove incomplete_class_list - it is only a minor
12 space win and it is not even clear it saves time.
13
14 * parse.y (resolve_class): Remove unneeded promote_type.
15
4763d38f
PB
162001-03-15 Per Bothner <per@bothner.com>
17
b16e8f08
PB
18 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
19 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
20 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
21 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
22
3a2e5926
PB
23 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
24 * parse.y (java_expand_classes): Likewise.
25
47a50de9
PB
26 * parse.y (expand_start_java_method): Was only called once and had a
27 misleading name, so inline in caller java_complete_expand_method.
3a2e5926 28 (enter_a_block): Likewise inline in enter_block and remove.
47a50de9 29
4763d38f
PB
30 Remove junk from when gcc/java was created (by copying from C/C++).
31 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
32 (struct binding_level): Remove fields keep, keep_if_subblocks,
33 more_cleanups_ok, have_cleanups (which have never been used).
34 (pushlevel, poplevel): Remove related useless code.
19f8e04b 35
69ca5554
PB
36 * class.c (make_class_data): The class_dtable_decl (i.e. the
37 vtable for Class) should be external, except when compiling Class.
38
7d32abcd
PB
39 * jvspec.c (lang_specific_driver): Fix -C handling.
40 Check -save-temps to see if temp @FILE should be deleted.
41 Follow-up to/fix for February 16 patch.
42
19f8e04b
PB
43 * verify.c (verify_jvm_instructions): Better error msgs for dup.
44 (type_stack_dup): Remove no-longer neded error check.
45
551bf03c
BM
462001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
47
48 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
49 to 'for_pointer'. If this type is for a pointer (argument) mangling,
50 don't surround the element with 'N..E' if the type name is
51 unqualified.
52
19e7881c
MM
532001-03-14 Mark Mitchell <mark@codesourcery.com>
54
d1d61788
MM
55 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
56 DECL_RTL_SET_P, etc.
19e7881c
MM
57 (make_method_value): Likewise.
58 (get_dispatch_table): Likewise.
59
60 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
61
bcacc465
TT
622001-03-07 Tom Tromey <tromey@redhat.com>
63
64 * config-lang.in (lang_requires): Define.
65
de6c5979
BL
662001-03-07 Brad Lucier <lucier@math.purdue.edu>
67
68 * typeck.c (convert): Check flag_unsafe_math_optimizations,
69 not flag_fast_math.
70
6d37cf2f
PB
712001-03-05 Per Bothner <per@bothner.com>
72
73 Fix a problem where rest_of_decl_compilation applied to
74 class_dtable_decl causes problems because it was done too early,
75 before output file was opened.
76 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
77 * class.c (class_dtable_decl): Add macro - element of class_roots.
78 (make_class_data): Define class_dtable_decl.
79 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
80
d6edb99e
ZW
812001-03-01 Zack Weinberg <zackw@stanford.edu>
82
83 * java/class.c, java/decl.c, java/java-tree.h: Replace all
84 uses of 'boolean' with 'bool'.
85
f7143427
ZW
862001-03-01 Zack Weinberg <zackw@stanford.edu>
87
88 * lang-specs.h: Add zero initializer for cpp_spec field to all
89 array elements.
90
fea2d5da
PB
912001-02-16 Per Bothner <per@bothner.com>
92
93 Handle compiling multiple input files at once, and @FILE syntax.
e4087691 94 * gcj.texi: Updated documentation to match.
fea2d5da
PB
95 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
96 * jcf-parse.c (parse_source_file): Split into ...
97 (parse_source_file_1): New function - and:
98 (parse_source_file_2): New function.
99 (yyparse): On -ffilelist-file, open and scan named file.
100 On first pass over files, only do parse_source_file_1.
101 A new second pass calls parse_source_file_2 for each file to compile.
102 (init_jcf_parse): Call init_src_parse.
103 * jvspec.c (INDIRECT_FILE_ARG): New flag.
104 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
105 as multiple input file combined in one compilation.
106 * lang-options.h: Add -ffilelist-file
107 * lang.c (flag_filelist_file): New flag variable.
108 (lang_f_options): Handle -ffilelist-file.
109 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
110 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
111 gclass_list - use global fields of src_parse_roots instead.
112 * parse.y (src_parse_roots): New array.
113 (incomplete_class_list, gclass_list): New macros.
114 (push_parser_context, java_pop_parser_context,
115 java_parser_context_resume): Don't fiddle with deleted fields.
116 (various): Use incomplete_class gclass_list and global macros
117 instead of parse_ctxt fields - the lists are global.
118 (init_src_parse): New function.
119
9b58f739
RK
120Fri Feb 23 15:28:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
121
122 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
123
064a552c
APB
1242001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
125
126 * parse.y (check_inner_class_access): Moved declaration of local
127 `enclosing_decl_type' to the right location.
128
a648f4e4
BM
1292001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
130
131 * parse.y (parser_check_super_interface): Don't call
132 check_pkg_class_access for an inner interface.
133 (parser_check_super): Don't call check_pkg_class_access for inner
134 class.
135 (do_resolve_class): Simplify enclosing type loop. Don't call
136 check_pkg_class_access if CL and DECL are not set.
137 (find_in_imports_on_demand): Set DECL if class_type needed to be
138 loaded. Don't call check_pkg_class_access for an inner class.
139 (check_inner_class_access): Rewritten to implement member access
140 rules as per spec 6.6.1.
141 (check_pkg_class_access): Handle the empty package correctly.
142 (in_same_package): New function. Determine if two classes are in the
143 same package.
144
35ab11f0
BM
1452001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
146
147 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
148 method into array types.
149 * parse.y (patch_method_invocation): Bypass access check on clone call
150 to array instance.
151
055adbaa
APB
1522001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
153
154 * expr.c (build_instanceof): Check for arrays when trying fold to
155 false.
156
e658449e
JM
1572001-02-15 Jim Meyering <meyering@lucent.com>
158
fd48c9b5
DD
159 * Make-lang.in (java.install-common): Depend on `installdirs'.
160 (java.install-info): Likewise.
e658449e 161
4238a754
BM
1622001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
163
164 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
165
e101152f
APB
1662001-02-14 Tom Tromey <tromey@redhat.com>
167 Alexandre Petit-Bianco <apbianco@cygnus.com>
168
055adbaa
APB
169 Fix for PR java/1261.
170 * typeck.c (build_java_array_type): Add public `clone' method to
171 arrays.
172 * parse.y (resolve_qualified_expression_name): Use current_class
e101152f 173 when checking for inaccessibility.
055adbaa 174 (patch_method_invocation): Fixed error message when accessibility
e101152f
APB
175 denied. Added `from_super' argument.
176
1772001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
178
179 * parse.y (resolve_class): Don't build a fake decl. Use the one
180 already built.
181 * typeck.c (build_java_array_type): Build and assign decl to array
182 type.
183
1842001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
185
186 * parse.y (not_accessible_p): Changed leading comment. Added extra
187 `where' argument. Use it to enforce protected access rules.
188 (resolve_qualified_expression_name): Added extra argument to
189 not_accessible_p.
190 (patch_method_invocation): Use argument `primary' to provide
191 not_accessible_p with an extra argument.
192 (lookup_method_invoke): Added extra argument to not_accessible_p.
193 (search_applicable_method_list): Likewise.
194
863cd85a
APB
1952001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
196
197 * parse.y (resolve_qualified_expression_name): Try to resolve as
198 an inner class access only if `decl' is a TYPE_DECL.
199
94807d33
APB
2002001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
201
202 * decl.c (classdollar_identifier_node): Initialize.
203 * java-tree.h (enum java_tree_index): New entry
204 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
205 (classdollar_identifier_node): New macro.
206 (ID_CLASSDOLLAR_P): Likewise.
207 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
208 (build_dot_class_method_invocation): Likewise.
209 (find_applicable_accessible_methods_list): `class$' can't be
210 inherited.
211
30f87f1a
APB
2122001-02-09 Raja R Harinath <harinath@cs.umn.edu>
213
214 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
215
2162001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
217
218 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
219 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
220 gone.
221
1e97aa40
APB
2222001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
223
224 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
225 outside of the `__U' sequence too.
226 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
227 sequence too.
228
a395f5ab
APB
2292001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
230
231 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
232
1b43b6be
APB
2332001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
234
235 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
236 (JVGENMAIN_OBJS): Likewise.
237 * java-tree.h (append_gpp_mangled_name): New prototype.
238 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
239 Removed cast calling `gcc_add_root.'
240 * jvgenmain.c (mangle_obstack): New global, initialized.
241 (main): Use it.
242 (do_mangle_class): Constify local `ptr.'
243 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
244 append_gpp_mangle_name and update `count' if necessary.
245 Use `mangle_obstack.'
246 * mangle.c (append_unicode_mangled_name): Removed.
247 (append_gpp_mangled_name): Likewise.
248 (unicode_mangling_length): Likewise.
249 (mangle_member_name): Return type set to `void.'
250 (mangle_field_decl): Don't append `U' in escaped names.
251 (mangle_method_decl): Likewise.
252 (mangle_member_name): Just use `append_gpp_mangled_name.'
253 * mangle_name.c: New file.
254
4a83be51
PB
2552001-02-07 Per Bothner <per@bothner.com>
256
257 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
258
259 * check-init.c (check_init): Don't call done_alternative after
260 processing loop code, as a LOOP_EXPR never terminates normally.
261
7e5fd99f
JM
2622001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
263
264 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
265
1456345e
APB
2662001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
267
268 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
269 DECLs.
270
77aff9f9
TT
2712001-02-06 Tom Tromey <tromey@redhat.com>
272
273 * lex.c (java_new_lexer): Longer error message.
274
c00dd14e
JS
2752001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
276 Alexandre Petit-Bianco <apbianco@cygnus.com>
277
278 * typeck.c (build_prim_array_type): Added leading comment.
279 (build_java_array_type): Moved locals out of
280 block. Always create the `data' field, fixed alignment to match
281 C++.
282
6d091870
TT
2832001-02-04 Tom Tromey <tromey@redhat.com>
284
285 * expr.c (java_lang_expand_expr): Don't bother recomputing
286 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
287 Fixes PR java/1866.
288
1ebb5e73
APB
2892001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
290
291 * parse.y (process_imports): Save the original name of the import
292 for better error report.
293
ca5b1ff8
BM
2942001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
295
296 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
297 of macros used when compiling jvspec.c.
298 * jvspec.c (lang_specific_driver): Link with the shared
299 libgcc by default.
300
400500c4
RK
301Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
302
303 * check-init.c (check_init): Call internal_error instead of fatal.
304 * expr.c (java_lang_expand_expr): Likewise.
305 * jcf-parse.c (get_constant): Likewise.
306 * mangle.c (java_mangle_decl): Likewise.
307 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
308 (operator_string): Likewise.
309 * check-init.c (check_init): Call abort instead of fatal.
310 * class.c (build_class_ref): Likewise.
311 * constants.c (write_constant_pool): Likewise.
312 * decl.c (start_java_method): Likewise.
313 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
314 (java_stack_dup, encode_newarray_type): Likewise.
315 (build_java_array_length_access): Likewise.
316 (build_java_check_indexed_type, expand_java_pushc): Likewise.
317 (build_java_soft_divmod, build_invokeinterface): Likewise.
318 * java-tree.h (INNER_CLASS_P): Likewise.
319 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
320 (give_name_to_class, get_class_constant): Likewise.
321 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
322 (find_constant_index, generate_bytecode_conditional): Likewise.
323 (generate_bytecode_insns, perform_relocations): Likewise.
324 * lex.c (java_unget_unicode, java_lex): Likewise.
325 * mangle.c (mangle_type, mangle_record_type): Likewise.
326 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
327 (finish_mangling): Likewise.
328 * parse.h (MARK_FINAL_PARMS): Likewise.
329 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
330 (obtain_incomplete_type, java_complete_class): Likewise.
331 (java_check_regular_methods, java_complete_expand_method): Likewise.
332 (cut_identifier_in_qualified, check_deprecation): Likewise.
333 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
334 (java_complete_lhs, lookup_name_in_blocks): Likewise.
335 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
336 * typeck.c (set_local_type, parse_signature_type): Likewise.
337 (parse_signature_string, build_java_signature): Likewise;
338 (set_java_signature): Likewise.
339 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
340 * class.c (add_method): Call fatal_error instead of fatal.
341 (build_static_field_ref): Likewise.
342 * expr.c (build_known_method_ref, expand_invoke): Likewise.
343 * jcf-parse.c (get_constant, jcf_parse): Likewise.
344 * lex.c (java_new_new_lexer): Likewise.
345 * jv-scan.c (main): Likewise.
346 (fatal_error): Renamed from fatal.
347 * jcf-parse.c (yyparse): Call fatal_io_error instead of
348 pfatal_with_name.
349 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
350 (yyparse): Likewise.
351 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
352 * lex.c (java_get_line_col): Likewise.
353 * jcf-parse.c (load_class): Make errors non-fatal.
354 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
355
4bae4eb5
BM
3562001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
357
358 * jvgenmain.c (class_mangling_suffix): Remove unused string.
359 (error): Remove unused function.
360 (main): Don't use "__attribute__ alias" on generated class symbol.
361
c0b00d37
APB
3622001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
363
364 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
365 argument.
366 * parse.y (finish_method_declaration): Code accounting for WFLed
367 method DECL_NAMEs deleted.
368 (check_abstract_method_definitions): Likewise.
369 (resolve_type_during_patch): Layout resolved type.
370 * typeck.c (lookup_do): Removed unused local.
371
4bae4eb5 3722001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
eb59e547
BM
373
374 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
375 * decl.c (init_decl_processing): Use integer_minus_one_node, not
376 integer_negative_one_node.
377 * expr.c (build_java_binop): Likewise.
378
4bae4eb5 3792001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
7be00c49
JS
380
381 * zextract.c (read_zip_archive): Read file_offset before writing
382 zipd and consequently clobbering the header contents.
383
c913b6f1
KG
3842001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
385
386 * Make-lang.in: Remove all dependencies on defaults.h.
387 * decl.c: Don't include defaults.h.
388 * expr.c: Likewise.
389 * parse.y: Likewise.
390
c4faeb92
APB
3912001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
392
393 * ChangeLog (2001-01-21): Fixed typo.
394 * class.c (layout_class_method): Code accounting for WFLed
395 method DECL_NAMEs deleted.
396 * constant.c (find_methodref_index): Likewise.
397 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
398 * java-tree.h (DECL_FUNCTION_WFL): New macro.
399 (struct lang_decl): New field `wfl'.
400 (java_get_real_method_name): Prototype deleted.
401 * mangle.c (mangle_method_decl): Code accounting for WFLed
402 method DECL_NAMEs deleted.
403 * parse.h (GET_METHOD_NAME): Macro deleted.
404 * parse.y (reset_method_name): Deleted.
405 (method_header): Set DECL_FUNCTION_WFL.
406 (check_abstract_method_header): Code accounting for WFLed method
407 DECL_NAMEs deleted.
408 (java_get_real_method_name): Deleted.
409 (check_method_redefinition): Code accounting for WFLed method
410 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
411 (java_check_regular_methods): Likewise.
412 (java_check_abstract_methods): Likewise.
413 (java_expand_classes): Don't call `reset_method_name.'
414 (search_applicable_method_list): Use DECL_NAMEs instead of
415 GET_METHOD_NAME.
416 * typeck.c (lookup_do): Code accounting for WFLed method
417 DECL_NAMEs deleted.
418
97876d66
RE
4192001-01-25 Richard Earnshaw <rearnsha@arm.com>
420
421 * lex.c (java_read_char): Check for EOF from getc first.
422
493d561d
APB
4232001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
424
425 * class.c (layout_class): Don't lay the superclass out if it's
426 already being laid out.
427 * jcf-parse.c (handle_innerclass_attribute): New function.
428 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
429 handle_innerclasses_attribute.
430 (jcf_parse): Don't load an innerclasses if it's already being
431 laid out.
432 * jcf-write.c (append_innerclass_attribute_entry): Static
433 `anonymous_name' and its initialization deleted. `ocii' and `ini'
434 to be zero for anonymous classes.
435
4362001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
437
438 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
439 necessary.
440 * jcf-parse.c (set_source_filename): Use
441 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
442
4432001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
444
445 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
446 gets a unique asm name.
447
4482001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
449
450 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
451 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
452 if necessary.
453 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
454 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
455 * parse.y (lookup_package_type_and_set_next): Deleted.
456 (resolve_package): Removed unnecessary code.
457 (find_applicable_accessible_methods_list): `finit$' can't be
458 inherited.
459 * verify.c (pop_argument_types): Added missing prototype.
460
7c01b2b5
BM
4612001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
462
463 * config-lang.in: Disable java by default.
464
80261b56
TT
4652001-01-23 Tom Tromey <tromey@redhat.com>
466
467 * gcj.texi (Copying): New node.
468 Added copyright information.
469
a4796c80
PB
4702001-01-21 Per Bothner <per@bothner.com>
471
472 Various fixes to allow compiling a compressed .jar/.zip archive.
473 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
474 (struct ZipFile): Add fields name and next (from ZipFileCache).
475 (struct ZipDirectory): New field zipf points to owning ZipFile.
476 * jcf.h (struct ZipDirectory): Add forward declaration.
477 (struct JCF): Declare zipd field to have type struct ZipDirectory.
478 Remove seen_in_zip and zip_offset fields.
479 (JCF_SEEN_IN_ZIP): New macro.
480 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
481 * jcf-io.c: Change all ZipFileCache to ZipFile.
482 (read_zip_member): New function.
483 (open_in_zip): Call read_zip_member.
484 * jcf-parse.c (find_in_current_zip): Remove function.
485 (read_class): Merge in find_in_current_zip functionality.
486 Call read_zip_member if needed.
487 (parse_zip_file_entries): Use read_zip_member.
488 (process_zip_dir): Update for removed and added JCF fields.
489 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
490
b5c4fed9
PB
4912001-01-21 Per Bothner <per@bothner.com>
492
493 Minor optimization of static ggc roots.
494 * jcf-parse.c (parse_roots): New static field.
495 (current_field, current_method, current_file_list): Replace by macros
496 naming fields of parse_roots.
497 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
498 * class.c (class_roots): New static field.
499 (registered_class, fields_ident, info_ident, class_list):
500 New macros naming fields of parse_roots.
501 (build_static_field_ref): Don't register roots here.
502 (layout_class): Static field list replaced by macro class_list.
503 (init_class_processing): Call ggc_add_tree_root for 4 roots.
504 Initialize fields_ident and info_ident here.
505
3432b91b
PB
5062001-01-21 Per Bothner <per@bothner.com>
507
508 * jcf-parse.c (ggc_mark_jcf): New function.
509 (init_jcf_parse): Register current_jcf as ggc root.
510
2c36c7fd
PB
5112001-01-21 Per Bothner <per@bothner.com>
512
513 * lang.c (put_decl_node): Print method's name.
514
9c0c88ac
PB
5152001-01-21 Per Bothner <per@bothner.com>
516
517 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
518 (verify_jvm_instructions): Use it, for better error messages on loads.
519
230cbd5f
PB
5202001-01-21 Per Bothner <per@bothner.com>
521
c4faeb92 522 * verify.c (merge_type_state): Still may have to merge even if
230cbd5f
PB
523 LABEL_VERIFIED (label).
524
e6b6db0d
PB
5252001-01-21 Per Bothner <per@bothner.com>
526
527 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
528 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
529
b57300bc
PB
5302001-01-19 Per Bothner <per@bothner.com>
531
532 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
533 if expeting an interface type. Refines Tom's change of 2000-09-12.
534
ee08d4cc
PB
5352001-01-18 Per Bothner <per@bothner.com>
536
537 * gcj.texi (Input Options): Mention .java files.
538
b1117741
APB
5392001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
540
541 * lang-options.h (-Wunsupported-jdk11): Removed.
542 * lang.c (flag_not_overriding): Deleted.
543 (flag_static_local_jdk1_1): Likewise.
544 (lang_W_options): Removed "unsupported-jdk11" entry.
545 * parse.y (java_check_methods): Removed dead code.
546
2dc73168
TT
5472001-01-17 Tom Tromey <tromey@redhat.com>
548
549 Changes suggested by Per Bothner:
550 * gcj.texi (Input Options): Don't mention input files.
551 (Code Generation): Updated --main information.
552 (Invoking jcf-dump): Mention that --javap is incomplete.
553 From Alexandre Petit-Bianco:
554 (Warnings): Don't mention -Wunsupported-jdk11.
555 My stuff:
556 (Compatibility): Mention JDK 1.2-ness of libraries.
557 (Resources): Mention resources used when writing gcj.
558
bc65b5ec
TT
5592001-01-17 Tom Tromey <tromey@redhat.com>
560
561 * gcj.texi: New file.
562 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
563 (java.info): Depend on gcj.info.
564 (java/gcj.dvi): New target.
565 (java.dvi): Depend on gcj.dvi.
566 (java.install-info): Wrote.
567
930f6690
JS
5682001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
569
570 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
571 having called make_decl_rtl.
572
00b4575d
PB
5732001-01-14 Per Bothner <per@bothner.com>
574
984ad2c6
PB
575 Various patches to emit better messages on verification errors.
576 * expr.c (push_type_0): Return error indication on stack overflow,
577 instead of callinfg fatal.
578 (push_type): Now just call push_type_0 (nd fatal on overflow).
579 (pop_type_0): Return detailed error message (in a char** argument).
580 (pop_type): If pop_type_0 fails, print error message.
581 (pop_argument_types): Moved to verify.c.
582 * verify.c (pop_argument_types): Moved from expr.c.
583 Return a (possible) error message, rather than void.
584 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
585 (verify_jvm_instruction): Use new macros, improving error messages.
586 For case OPCODE_astore use object_ptr_type_node.
587 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
588 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
589
00b4575d
PB
590 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
591 constant, return body without wrapper. (Improves constant folding.)
592 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
593
d9da31dd
PB
5942001-01-13 Per Bothner <per@bothner.com>
595
596 * expr.c (expand_java_field_op): Assigning to a final field outside
597 an initializer does not violate JVM spec, so should be warning, not
598 error. (Sun's verifier does not complain - though MicroSoft's does.)
599
a67a383a
JM
6002001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
601
602 * gjavah.c (version), jcf-dump.c (version): Update copyright year
603 to 2001.
604
7e1376a1
BM
6052001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
606
607 * parse.y (resolve_expression_name): Permit instance variables from
608 enclosing context in super constructor call.
609 (resolve_qualified_expression_name): Permit enclosing class's qualified
610 "this" in super constructor call.
611
6c418184
MM
6122001-01-10 Mark Mitchell <mark@codesourcery.com>
613
614 * class.c (build_utf8_ref): Remove last argument in call to
615 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
616 (build_class_ref): Likewise.
617 (build_static_field_ref): Likewise.
618 (get_dispatch_table): Likewise.
619 (layout_class_method): Likewise.
620 (emit_register_classes): Likewise.
621 * constants.c (build_constant_data_ref): Likewise.
622 * decl.c (builtin_function): Likewise.
623 (create_primitive_vtable): Likewise.
624 * expr.c (build_known_method_def): Likewise.
625 (build_jni_stub): Likewise.
626 (java_lang_expand_expr): Likewise.
627
0adc3d8a
TT
6282001-01-10 Tom Tromey <tromey@redhat.com>
629
630 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
631
761491c8
APB
6322001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
633
634 * java-tree.h (lang_printable_name_wls): New prototype.
635 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
636 rather than `current_class' to print type name. Don't prepend type
637 names when printing constructor names.
638 (lang_printable_name_wls): New function.
639 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
640 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
641 * parse.y (patch_method_invocation): Message tuned for constructors.
642 (not_accessible_p): Grant `private' access from within
643 enclosing contexts.
644
dc08e603
APB
6452001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
646
647 All files with updated copyright when applicable.
648 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
649 * class.c (mangle_class_field): Function removed.
650 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
651 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
652 (build_class_ref): Call `java_mangle_class_field' instead of
653 `mangle_class_field.'
654 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
655 (layout_class): Call `java_mangle_decl' instead of
656 `mangle_static_field.'
657 (cxx_keywords): Initialized static array moved to `lex.c.'
658 (layout_class_method): Changed leading comment. Simplified to
659 call `java_mangle_decl.' Local `ptr' moved in for loop body.
660 * decl.c (lang_mark_tree): Mark field `package_list.'
661 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
662 (struct lang_type): New field `package_list.'
663 (unicode_mangling_length): Prototype removed.
664 (append_gpp_mangled_name, append_gpp_mangled_classtype,
665 emit_unicode_mangled_name): Likewise.
666 (cxx_keyword_p): New prototype.
667 (java_mangle_decl, java_mangle_class_field,
668 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
669 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
670 `build_expr_wfl.'
671 * jvgenmain.c (main_method_prefix): Global variable removed.
672 (main_method_suffix): Likewise.
673 (do_mangle_classname): New function.
674 (main): Call it. Format changed to accomodate new mangling scheme.
675 * lex.c: (utf8_cmp): Conditionally prototyped.
676 (cxx_keywords): Moved from class.c, conditionally defined.
677 (utf8_cmp, cxx_keyword_p): Likewise.
678 * mangle.c (obstack.h, ggc.h): Included.
679 (mangle_field_decl): New function.
680 (mangle_method_decl, mangle_type, mangle_pointer_type,
681 mangle_array_type, mangle_record_type,
682 find_compression_pointer_match, find_compression_array_match,
683 find_compression_record_match,
684 find_compression_array_template_match, set_type_package_list,
685 entry_match_pointer_p, emit_compression_string, init_mangling,
686 finish_mangling, compression_table_add, mangle_member_name): Likewise.
687 (mangle_obstack): New global.
688 (MANGLE_RAW_STRING): New macro.
689 (unicode_mangling_length): Turned static.
690 (append_unicode_mangled_name): Renamed from
691 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
692 replaces `obstack', removed from the parameter list.
693 (append_gpp_mangled_name): Turned static. `mangle_obstack'
694 replaces parameter `obstack', removed from the parameter list. Call
695 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
696 (append_gpp_mangled_classtype): Removed.
697 (compression_table, compression_next): New static variables.
698 * parse.y (temporary_obstack): Extern declaration removed.
699
761491c8
APB
7002001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
701
702 * parse.y (patch_binop): Compute missing type in error situations.
703
5bb11b2e
BM
7042001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
705
706 * class.c (make_class_data): Push initial value for "arrayclass".
707 * decl.c (init_decl_processing): Add new class field "arrayclass".
708
ac39dac0
BM
7092001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
710
711 From patha@softlab.ericsson.se:
712 * parse.y (switch_label): Use build, not build1, to construct
713 DEFAULT_EXPR.
714
a5a4ce3c
NB
7152001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
716
717 * lang.c (lang_decode_option): Change -MA to -MP.
718 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
719 Update to new prototype; do quote targets.
720 (jcf_dependency_write): Update.
721
d27fd99a
BM
7222000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
723
724 Shorten primitive array allocation path:
725 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
726 to create new primitive arrays.
727 * expr.c (build_newarray): If generating native code, call
728 soft_newarray_node with a reference to the primitive TYPE identifier
729 instead of type_value.
730
c1eacb70
BM
7312000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
732
733 Fix for PRs gcj/312 and gcj/253:
734 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
735 dest if they arn't already.
736 * class.c (layout_class): Call maybe_layout_super_class on
737 superinterfaces also, but only if compiling from bytecode.
738
6d003d5c
BM
739 Fix for PR gcj/373:
740 * parse.y (create_class): Set ACC_STATIC if class is declared in an
741 interface.
742
325de66c
TT
7432000-12-15 Tom Tromey <tromey@redhat.com>
744
745 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
746 set.
747
e35990c4
AH
7482000-12-14 Andrew Haley <aph@redhat.com>
749
750 * boehm.c (mark_reference_fields): Change test to correctly detect
751 bitmap overflow.
752
53714cda
AJ
7532000-12-15 Andreas Jaeger <aj@suse.de>
754
755 * config-lang.in (lang_dirs): Added.
756
1e0cdc10
APB
7572000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
758
759 * parse.y (end_artificial_method_body): Fixed undefined behavior.
760 Credits go to rth for finding it.
761
e9e42530
MS
7622000-12-13 Mike Stump <mrs@wrs.com>
763
764 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
765
3f27e3f8
TT
7662000-11-07 Tom Tromey <tromey@cygnus.com>
767
768 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
769 * lex.c (java_ignorable_control_p): Removed.
770 (java_letter_or_digit_p): Removed.
771 (java_start_char_p): New function.
772 (java_read_char): Return `int', not `unicode_t'. Changed
773 callers.
774 (java_read_unicode): Likewise.
775 (java_read_unicode_collapsing_terminators): Likewise.
776 (java_get_unicode): Likewise.
777 (java_new_lexer): Initialize hit_eof.
778 (java_parse_end_comment): Take `int' argument.
779 (java_parse_doc_section): Likewise.
780 (java_parse_escape_sequence): Don't allow backlash-newline.
781 Return `int'.
782 * lex.h (JAVA_DIGIT_P): Removed.
783 (_JAVA_LETTER_OR_DIGIT_P): Removed.
784 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
785 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
786 (JAVA_PART_CHAR_P): New macro.
787 (UEOF): Now -1.
788 (JAVA_CHAR_ERROR): Now -2.
789 (java_lexer): New field `hit_eof'.
790 * chartables.h: New file.
791 * gen-table.pl: new file.
792
568aac9c
TT
7932000-11-20 Tom Tromey <tromey@cygnus.com>
794 Alexandre Petit-Bianco <apbianco@cygnus.com>
795
796 * parse.y (java_complete_lhs): Only allow compound assignment of
797 reference type if type is String.
798
f34ff6d6
APB
7992000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
800
801 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
802 jcf-path.c: Likewise.
803
6e5589e8
AG
8042000-12-09 Anthony Green <green@redhat.com>
805
806 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
807 filestart and filename_length as int values.
808
8000caee
MD
8092000-12-07 Mo DeJong <mdejong@redhat.com>
810
811 * jcf-io.c (find_class): Correct the logic that tests to see if a
812 .java file is newer than its .class file. The compiler was
813 incorrectly printing a warning when file mod times were equal.
814
f6bbde28
ZW
8152000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
816
817 * jvgenmain.c: Use ISPRINT not isascii.
818
46142b26
APB
8192000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
820
821 * parse.y (end_artificial_method_body): Fixed typo.
822
f8b93ea7
APB
8232000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
824
825 * parse.y (patch_method_invocation): Pick the correct enclosing
826 context when creating inner class instances.
827 Fixes gcj/332.
828
45441c5b
JM
8292000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
830
831 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
832 Update copyright year to 2000.
833
1510057a
AG
8342000-11-23 Anthony Green <green@redhat.com>
835
836 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
837 Move current_file_list out of yyparse and make it static.
838
839 * expr.c: Declare quick_stack and tree_list_free_list as static
840 (init_expr_processing): Register quick_stack and
841 tree_list_free_list roots.
842
5e18f6d6
APB
8432000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
844
845 * parse.y (build_outer_field_access): New local `decl_ctx', use
846 it. Check for field's context and current class immediate outer
847 context inheritance.
848 (outer_field_access_p): Consider fields inherited from the last
849 enclosing context.
850 (build_access_to_thisn): Stop at the last enclosing context if
851 necessary.
852 Fixes gcj/367.
853
9196ece5
R
854Thu Nov 23 02:19:14 2000 J"orn Rennecke <amylaar@redhat.com>
855
856 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
857
c385cdf6
BM
8582000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
859
860 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
861 scratch buffer.
862
1535cc88
TT
8632000-11-20 Tom Tromey <tromey@cygnus.com>
864
865 * jv-scan.c (help): Document --complexity.
866 (options): Added --complexity.
867 (flag_complexity): New global.
868 (main): Call `report'.
869 * parse-scan.y (complexity): New global.
870 (if_then_statement, if_then_else_statement,
871 if_then_else_statement_nsi, switch_block_statement_group,
872 while_expression, do_statement, for_begin, continue_statement,
873 throw_statement, catch_clause, finally, method_invocation,
874 conditional_and_expression, conditional_or_expression,
875 conditional_expression): Update complexity.
876 (reset_report): Reset complexity.
877 (report): New function.
878
d828bc42
TT
8792000-11-20 Tom Tromey <tromey@cygnus.com>
880
881 * lex.c (yylex): Added STRICT_TK case.
882 * parse.y (STRICT_TK): Added.
883 * parse-scan.y (STRICT_TK): Added.
884 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
885 `;'. Use 4, not 3, with -k option. Correctly rename resulting
886 file.
887 * keyword.h: Rebuilt.
888 * keyword.gperf (strictfp): Added.
889
4e7842a0
TT
8902000-11-20 Tom Tromey <tromey@cygnus.com>
891
892 * lex.c (yylex): Recognize floating point constants with leading
893 0.
894
7e9355c6
KG
8952000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
896
897 * java-tree.h (cyclic_inheritance_report): Constify.
898 * parse.y (cyclic_inheritance_report): Likewise.
899
a8a05998
ZW
9002000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
901
902 * parse.y (goal): Remove call to ggc_add_string_root.
903
520a57c8
ZW
9042000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
905
906 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
907 Create string in scratch buffer, then pass to build_string.
908
88f3c477
JM
9092000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
910
911 * parse.y (issue_warning_error_from_context): Add
912 ATTRIBUTE_PRINTF.
913
ac51395d
AG
9142000-11-11 Anthony Green <green@redhat.com>
915
916 * jcf-parse.c (process_zip_dir): Add finput parameter.
917 (jcf_figure_file_type): Call process_zip_dir with appropriate
918 argument.
919
4e135bdd
KG
9202000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
921
922 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
923 * jcf-parse.c (jcf_figure_file_type): Likewise.
924
2e09e75a
JM
9252000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
926
927 * parse.y (create_new_parser_context): Use memset () instead of
928 bzero ().
929
136c35df
TT
9302000-11-08 Tom Tromey <tromey@cygnus.com>
931
932 * gjavah.c (process_file): Only include gcj/cni.h when generating
933 CNI stubs.
934
961192e1
JM
9352000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
936
937 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
938 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
939 instead of bzero ().
940
099a5150
TT
9412000-11-05 Tom Tromey <tromey@cygnus.com>
942
943 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
944 * lex.c (IS_ZERO): New define.
945 (java_perform_atof): Error on floating point underflow.
946
cbf53a1d
TT
9472000-11-04 Tom Tromey <tromey@cygnus.com>
948
949 * lex.c (java_parse_escape_sequence): Only read two octal
950 characters if the first one is greater than 3. Don't allow
951 "octal" numbers to include the digits 8 or 9.
952
436a88a6
JM
9532000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
954
955 * Make-lang.in (java.distdir): Remove.
956
747800ee
TT
9572000-11-03 Tom Tromey <tromey@cygnus.com>
958
4e2c8d44
TT
959 * Make-lang.in (java.dvi): New target.
960 Partial fix for PR other/567.
961
b7436b72
TT
962 * lang-options.h: Mention -Wout-of-date.
963 * jcf-dump.c (flag_newer): New global.
964 * gjavah.c (flag_newer): New global.
965 * jcf-io.c (find_class): Only warn when flag_newer set.
966 * lang.c (flag_newer): New global.
967 (struct string_option): New declaration.
968 (lang_W_options): New global.
969 (process_option_with_no): New function.
970 (lang_decode_option): Use it.
971
0160fbe1
TT
972 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
973 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
974 `$'.
975
747800ee
TT
976 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
977 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
978 * lex.c (java_read_unicode): Removed `term_context' argument.
979 Recognize any number of `u' in `\u'.
980 (java_read_unicode_collapsing_terminators): New function.
981 (java_get_unicode): Use it.
982 (java_lineterminator): Removed.
983 (yylex): Produce error if character literal is newline or single
984 quote. Return if eof found in middle of `//' comment. EOF in
985 `//' comment is only an error if pedantic.
986 (java_ignorable_control_p): New function.
987 (java_parse_end_comment): Return if eof found in middle of
988 comment.
989 Include flags.h.
990 * jv-scan.c (pedantic): New global.
991
ee5f86dc
APB
9922000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
993
994 * parse.y (outer_field_access_p): Inherited fields aren't
995 consider outer fields.
996 (maybe_build_thisn_access_method): Use
997 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
998 (resolve_expression_name): Trigger an error if a static field
999 is being accessed as an outer field.
1000
7ccd2fc9 10012000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
f6bbde28 1002
7ccd2fc9
APB
1003 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
1004 Fixes gcj/365.
1005
b8dad04b
ZW
10062000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
1007
1008 * Make-lang.in: Move all build rules here from Makefile.in,
1009 adapt to new context. Wrap all rules that change the current
1010 directory in parentheses. Expunge all references to $(P).
1011 When one command depends on another and they're run all at
1012 once, use && to separate them, not ;. Add OUTPUT_OPTION to
1013 all object-file generation rules. Delete obsolete variables.
1014
1015 * Makefile.in: Delete.
1016 * config-lang.in: Delete outputs= line.
1017
2cb3951d
APB
10182000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
1019
1020 * parse.y (patch_method_invocation): NULLify this_arg when already
1021 inserted.
1022 (maybe_use_access_method): Handle call to methods unrelated to the
1023 current class. Fixed comment.
1024 Fixes gcj/361.
1025
ee5f86dc
APB
10262000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
1027
1028 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
1029 scope.
1030
07b5e470
TT
10312000-10-24 Tom Tromey <tromey@cygnus.com>
1032
1033 * lex.c (java_new_lexer): Initialize new fields. Work around
1034 broken iconv() implementations.
1035 (java_read_char): Swap bytes if required. Use fallback decoder if
1036 required.
1037 (byteswap_init, need_byteswap): New globals.
1038 (java_destroy_lexer): Only close iconv handle if it is in use.
1039 * lex.h (java_lexer): New fields read_anything, byte_swap,
1040 use_fallback.
1041 Made out_buffer unsigned.
1042
8ac1de05
APB
10432000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
1044
1045 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
1046 where an enclosing context can be set on the jdep.
1047 (do_resolve_class): Fixed identation.
1048
80393943
KG
10492000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1050
1051 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
f6bbde28 1052
80393943
KG
1053 * jcf-reader.c (peek_attribute, skip_attribute): Only define
1054 when requested.
1055
1056 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
1057
1058 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
1059
c7303e41
APB
10602000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
1061
1062 * jcf-write.c (OP1): Update `last_bc'.
1063 (struct jcf_block): Fixed indentation and typo in comments. New
1064 field `last_bc'.
1065 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
1066 follows `monitorenter'.
1067 * parse.y (patch_synchronized_statement): New local `tmp'. Call
1068 `patch_string'.
1069 Fixes gcj/232.
1070
316a06a1
TT
10712000-10-16 Tom Tromey <tromey@cygnus.com>
1072
1073 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
1074 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
1075 * lang-options.h: Added -MA, -MT, -MF..
1076 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
1077 (DEPEND_TARGET_SET): New macro.
1078 (DEPEND_FILE_ALREADY_SET): Likewise.
1079 (init_parse): Handle new flags.
1080 * jcf.h (jcf_dependency_print_dummies): Declare.
1081 * Make-lang.in (s-java): Added mkdeps.o.
1082 * Makefile.in (BACKEND): Added mkdeps.o.
1083 (../gcjh$(exeext)): Added mkdeps.o.
1084 (../jcf-dump$(exeext)): Added mkdeps.o.
1085 * jcf-depend.c: Include mkdeps.h.
1086 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
1087 add_entry): Removed.
1088 (jcf_dependency_reset): Rewrote.
1089 (dependencies): New global.
1090 (jcf_dependency_set_target): Rewrote.
1091 (jcf_dependency_add_target): Likewise.
1092 (jcf_dependency_add_file): Likewise.
1093 (munge): Removed.
1094 (print_ents): Removed.
1095 (jcf_dependency_write): Rewrote.
1096 (print_dummies): New global.
1097 (jcf_dependency_print_dummies): New function
1098 (jcf_dependency_write): Call deps_dummy_targets if required.
1099
dba41d30
APB
11002000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
1101
1102 * gjavah.c (add_class_decl): Removed unused variables `tname',
1103 `tlen' and `name_index'.
1104 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
1105 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
1106 in `wfl_operator' with value.
1107 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
1108 (jcf_figure_file_type): Fixed identation.
1109 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
1110 * parse.y (analyze_clinit_body): New function.
1111 (static_initializer:): Reset `current_static_block'.
1112 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
1113 `wfl_operator' with new value.
1114 (lookup_cl): Use EXPR_WFL_FILENAME.
1115 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
1116 analyze_clinit_body.
1117 (build_outer_field_access): Access to this$<n> built from
1118 current_class, not its outer context.
1119 (build_access_to_thisn): Fixed leading comment. Tidied things up.
f6bbde28 1120 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
dba41d30
APB
1121 (patch_method_invocation): Use `is_static_flag' when already
1122 initialized.
1123 (patch_newarray): Removed assignment in ternary operator.
1124
1a2ebe6d
APB
11252000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
1126
dba41d30 1127 * except.c (free_eh_ranges): Don't free `whole_range'.
1a2ebe6d 1128
8e7ab3ff
AG
11292000-10-15 Anthony Green <green@redhat.com>
1130
1131 * decl.c (init_decl_processing): Call init_class_processing before
1132 anything else.
1133
c7303e41
APB
11342000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
1135
1136 * check-init.c (check_init): Fixed leading comment. Use
1137 LOCAL_FINAL_P.
1138 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
1139 (give_name_to_locals): Likewise.
1140 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
1141 fields in lang_decl_var.
1142 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
1143 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
1144 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
1145 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
1146 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
1147 (LOCAL_FINAL): Rewritten.
1148 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
1149 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
1150 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
1151 `init_final' fields.
1152 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
1153 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
1154 (TYPE_HAS_FINAL_VARIABLE): New macro.
1155 (struct lang_type): Added `afv' field.
1156 * parse.y (check_static_final_variable_assignment_flag): New function.
1157 (reset_static_final_variable_assignment_flag): Likewise.
1158 (check_final_variable_local_assignment_flag): Likewise.
1159 (reset_final_variable_local_assignment_flag): Likewise.
1160 (check_final_variable_indirect_assignment): Likewise.
1161 (check_final_variable_global_assignment_flag): Likewise.
1162 (add_inner_class_fields): Use LOCAL_FINAL_P.
1163 (register_fields): Handle local finals and final variables.
1164 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
1165 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
1166 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
1167 on local finals.
1168 (java_complete_expand_methods): Loop to set
1169 TYPE_HAS_FINAL_VARIABLE. Call
f6bbde28 1170 `reset_final_variable_local_assignment_flag' and
c7303e41
APB
1171 `check_final_variable_local_assignment_flag' accordingly before
1172 and after constructor expansion. Call
1173 `reset_static_final_variable_assignment_flag'
f6bbde28 1174 before expanding <clinit> and after call
c7303e41
APB
1175 `check_static_final_variable_assignment_flag' if the
1176 current_class isn't an interface. After all methods have been
1177 expanded, call `check_final_variable_global_assignment_flag' and
1178 `check_static_final_variable_assignment_flag' if the current class
f6bbde28 1179 is an interface.
c7303e41
APB
1180 (maybe_yank_clinit): Fixed typo in comment.
1181 (build_outer_field_access_methods): Removed old sanity check. Use
1182 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
1183 Don't create access methods for finals.
1184 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
1185 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
f6bbde28 1186 existing DECL_INIT has been processed.
c7303e41
APB
1187 (java_complete_lhs): Likewise.
1188 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
1189 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
1190 logic.
1191 (patch_assignment): Use LOCAL_FINAL_P.
1192 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
1193 DECL_INITIAL is nullified.
1194 Fixes gcj/163.
1195
4b945402
KG
11962000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1197
1198 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
f6bbde28 1199
4b945402
KG
1200 * Makefile.in (parse.c, parse-scan.c): Likewise.
1201
1f8f4a0b
MM
12022000-10-12 Mark Mitchell <mark@codesourcery.com>
1203
1204 * class.c (temporary_obstack): Remove.
1205 (make_class): Don't mess with obstascks.
1206 (push_class): Likewise.
1207 (set_super_info): Likewise.
1208 (add_method_1): Likewise.
1209 (add_method): Likewise.
1210 (add_field): Likewise.
1211 (build_utf8_ref): Likewise.
1212 (build_class_ref): Likewise.
1213 (build_static_field_ref): Likewise.
1214 (finish_class): Likewise.
1215 (push_super_field): Likewise.
1216 (layout_class): Likewise.
1217 (layout_class_methods): Likewise.
1218 (init_class_processing): Likewise.
1219 * constants.c (get_tag_node): Likewise.
1220 (build_constant_data_ref): Likewise.
1221 * decl.c (ggc_p): Remove.
1222 (copy_lang_decl): Use ggc_alloc.
1223 (complete_start_java_method): Don't mess with obstacks.
1224 (start_java_method): Likewise.
1225 (end_java_method): Likewise.
1226 * except.c (link_handler): Use xmalloc.
1227 (free_eh_ranges): New function.
1228 (method_init_exceptions): Use it.
1229 (add_handler): Use xmalloc.
1230 (expand_start_java_handler): Don't mess with obstacks.
1231 (prepare_eh_table_type): Likewise.
1232 (expand_end_java_handler): Likewise.
1233 * expr.c (push_value): Likewise.
1234 (create_label_decl): Likewise.
1235 (build_jni_stub): Likewise.
1236 (java_lang_expand_expr): Likewise.
1237 (note_instructions): Use xrealloc.
1238 (java_push_constant_from_pool): Don't mess with obstacks.
1239 (process_jvm_instruction): Likewise.
1240 * java-tree.h (cyclic_inheritance_report): Remove duplicate
1241 declaration.
1242 * jcf-parse.c (get_constant): Don't mess with obstacks.
1243 (read_class): Likewise.
1244 (jcf_parse): Likewise.
1245 * lex.c (expresion_obstack): Remove.
1246 (java_lex): Don't use obstack_free.
1247 * parse.h (exit_java_complete_class): Don't mess with obstacks.
1248 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
1249 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
1250 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
1251 * parse.y (gaol): Add more GC roots.
1252 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
1253 (lookup_field_wrapper): Likewise.
1254 (obtain_incomplete_type): Don't mess with obstacks.
1255 (build_alias_initializer_paramter_list): Adjust calls to MANGLE_*
1256 macros.
1257 (craft_constructor): Don't mess with obstacks.
1258 (safe_layout_class): Likewise.
1259 (java_complete_class): Likewise.
1260 (source_end_java_method): Likewise.
1261 (build_outer_field_access_methods): Likewise.
1262 (build_outer_method_access_method): Likewise.
1263 (maybe_build_thisn_access_method): Likewise.
1264 (build_dot_class_method_invocation): Likewise.
1265 (java_complete_tree): Likewise.
1266 (java_complete_lhs): Likewise.
1267 (do_merge_string_cste): Likewise.
1268 (patch_string_cst): Likewise.
1269 (array_constructor_check_entry): Likewise.
1270 * typeck.c (build_java_array_type): Likewise.
1271 (parse_signature_string): Likewise.
1272 (build_java_signature): Likewise.
f6bbde28 1273
3c1d1e7b
TT
12742000-10-12 Tom Tromey <tromey@cygnus.com>
1275
1276 Fix for PR gcj/356:
1277 * gjavah.c (add_class_decl): Don't special-case inner classes.
1278 (add_namelet): Likewise.
1279
a93eddcf
APB
12802000-10-11 Rodney Brown <RodneyBrown@mynd.com>
1281
1282 * java-tree.h: Constify current_encoding.
1283 * lang.c: Constify current_encoding.
1284
12852000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
1286
1287 * jvgenmain.c (class_mangling_suffix): Omit `.'.
1288 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
1289
12902000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
1291
1292 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
1293 patch. Fixes gcj/340.
1294
2e165c53
TT
12952000-10-10 Tom Tromey <tromey@cygnus.com>
1296
1297 * lex.c (java_new_lexer): Initialize out_first and out_last
1298 fields.
1299 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
1300
c7303e41
APB
13012000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
1302
1303 * parse.y (pop_current_osb): New function.
1304 (array_type:): Use `dims:', changed actions
1305 accordingly. Suggested by Anthony Green.
1306 (array_creation_expression:): Used pop_current_osb.
1307 (cast_expression:): Likewise.
1308 (search_applicable_method_list): Fixed indentation.
1309
13102000-10-08 Anthony Green <green@redhat.com>
1311
1312 * parse.y (array_type_literal): Remove production.
1313 (type_literals): Refer to array_type, not array_type_literal.
1314
29f8b718
APB
13152000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1316
1317 Patch contributed by Corey Minyard.
1318 * decl.c (check_local_named_variable): New function.
1319 (tree check_local_unnamed_variable): Likewise.
1320 (find_local_variable): Splitted. Call check_local_{un}named_variable.
1321
7fd9a516
AG
13222000-10-07 Anthony Green <green@redhat.com>
1323
1324 * class.c (layout_class): Handle case where superclass can't be
1325 layed out yet.
1326
20d431c9
JM
13272000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
1328
1329 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
1330 gperf.
1331
e0a0c416
TT
13322000-10-05 Tom Tromey <tromey@cygnus.com>
1333
1334 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
1335 * jvgenmain.c (class_mangling_prefix): Removed.
1336 (class_mangling_suffix): New global.
1337 (main): Use it.
1338 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
1339 `$'.
1340 (print_method_info): Handle overrides for static and final
1341 methods.
1342 (process_file): Generate declaration for class object field.
1343 * class.c (cxx_keywords): New array.
1344 (utf8_cmp): New function.
1345 (cxx_keyword_p): New function.
1346 (layout_class_method): Mangle C++ keywords by appending `$'.
1347 (mangle_field): New function.
1348 (mangle_class_field): Use mangle_field. Mangle class name as
1349 `class$'.
1350 (mangle_static_field): Use mangle_field.
1351
6e22695a
APB
1352Tue Oct 3 13:44:37 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
1353
1354 * decl.c (find_local_variable): Removed uncessary type check and
1355 fixed range check typo. From Corey Minyard.
1356
1357Wed Sep 13 16:06:52 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
1358
1359 * decl.c (give_name_to_locals): New local `code_offset'. Call
dba41d30 1360 `maybe_adjust_start_pc'.
6e22695a
APB
1361 * expr.c (note_instructions): New function.
1362 (expand_byte_code): Don't collect insn starts here.
1363 (peek_opcode_at_pc): New function.
1364 (maybe_adjust_start_pc): Likewise.
1365 * java-tree.h (maybe_adjust_start_pc): Declare.
1366 (note_instructions): Likewise.
dba41d30 1367 * jcf-parse.c (parse_class_file): Call `note_instructions'.
6e22695a
APB
1368
1369Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
1370
1371 * parse.y (field_access:): Fixed indentation.
1372 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
1373
7e51098e
TT
13742000-09-07 Tom Tromey <tromey@cygnus.com>
1375
1376 Fix for PR gcj/307:
1377 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
1378 JPRIMITIVE_TYPE_P, for arithmetic operators.
1379 (patch_method_invocation): Indentation fix.
1380 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
1381 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
1382 (do_unary_numeric_promotion): Cleaned up code.
1383 (valid_cast_to_p): Handle boolean correctly.
1384
5beededc
TT
13852000-09-27 Tom Tromey <tromey@cygnus.com>
1386
1387 * lex.c (java_read_unicode): Reset bs_count when finished with
1388 `\u' sequence.
1389
f15b9af9
MM
13902000-10-01 Mark Mitchell <mark@codesourcery.com>
1391
1392 Convert to GC.
1393 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
1394 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
1395 (typeck.o): Depend on ggc.h.
1396 * class.c (add_method_1): Use GC functions for allocation.
1397 (init_class_processing): Register roots.
1398 * decl.c (ggc_p): Set to 1.
1399 (pending_local_decls): Make it static.
1400 (push_jvm_slot): Use GC functions for allocation.
1401 (init_decl_processing): Register roots.
1402 (give_name_to_locals): Use GC functions for allocation.
1403 (lang_mark_tree): New function.
1404 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
1405 functions for allocation.
1406 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
1407 * lex.c (java_lex): Use build_string, rather than replicating it
1408 inline.
1409 * parse.y (goal): Add more roots.
1410 (mark_parser_ctxt): New function.
1411 * typeck.c: Include ggc.h.
f6bbde28 1412
99eaf8d4
APB
14132000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
1414
1415 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
1416 contains something else than MODIFY_EXPR.
1417
19e223db
MM
14182000-09-23 Mark Mitchell <mark@codesourcery.com>
1419
1420 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
1421 * Makefile.in (parse.o): Depend on ggc.h.
1422 (class.o): Likewise.
1423 (constants.o): Likewise.
1424 (decl.o): Likewise.
1425 (expr.o): Likewise.
1426 (jcf-parse.o): Likewise.
1427 (jcf-write.o): Likewise.
1428 (mangle.o): Likewise.
1429 * class.c: Include ggc.h.
1430 (build_static_field_ref): Register GC roots.
1431 (layout_class): Likewise.
1432 (init_class_processing): Likewise.
1433 * constants.c: Include ggc.h.
1434 (current_constant_pool_data_ref): Remove.
1435 (tag_nodes): Move it to ...
1436 (get_tag_node): ... here. Register GC roots.
1437 * decl.c: Include ggc.h. Remove many global tree definitions.
1438 (throw_node): Define.
1439 (java_global_trees): Likewise.
1440 (predef_filenames): Make the size a constant.
1441 (init_decl_processing): Adjust accordingly.
1442 (init_decl_processing): Call init_jcf_parse. Register GC roots.
1443 * expr.c: Include ggc.h.
1444 (init_expr_processing): Register GC roots.
1445 (build_invokeinterface): Likewise.
1446 * java-tree.h: Replace extern tree declarations with macros.
1447 (java_global_trees): New variable.
1448 (java_tree_index): New enumeration.
1449 (init_jcf_parse): Declare.
1450 * jcf-parse.c: Include ggc.h.
1451 (current_class): Remove declaration.
1452 (main_class): Likewise.
1453 (all_class_list): Likewise.
1454 (predefined_filename_p): Adjust for constant size of
1455 predef_filenames.
1456 (init_jcf_parse): New function.
1457 * jcf-write.c: Include ggc.h.
1458 (generate_classfile): Register GC roots.
1459 (append_synthetic_attribute): Likewise.
1460 (append_innerclass_attribute_entry): Likewise.
1461 * lang.c: Include ggc.h.
1462 (lang_print_error): Register GC roots.
1463 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
1464 with macros.
1465 * parse.y: Include ggc.h.
1466 (wfl_operator): Remove.
1467 (goal): Register GC roots.
1468 (java_pop_parser_context): Adjust for new field names.
1469 (java_parser_context_save_global): Likewse.
1470 (java_parser_context_restore_global): Likewise.
1471 (java_parser_context_suspend): Likewise.
1472 (java_parser_context_resume): Likewise.
1473 (verify_constructor_circularity): Register GC roots.
1474 (lookup_cl): Likewise.
1475 (java_reorder_fields): Likewise.
1476 (build_current_this): Likewise.
1477 (class_in_current_package): Likewise.
1478 (argument_types_convertible): Likewise.
1479 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
f6bbde28 1480
4c4b521a
TT
14812000-09-14 Tom Tromey <tromey@cygnus.com>
1482
1483 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
1484
6b8a24cd
TT
14852000-09-13 Tom Tromey <tromey@cygnus.com>
1486
1487 * jcf-parse.c: Include <locale.h>.
1488 * jv-scan.c: Include <locale.h>.
1489
86e4b1e4
TT
14902000-09-12 Tom Tromey <tromey@cygnus.com>
1491
1492 * expr.c (pop_type_0): Return `Object' if trying to merge two
1493 interface types.
1494 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
1495 interface types; `Object' is always a valid supertype.
1496
d19cbcb5
TT
14972000-09-12 Tom Tromey <tromey@cygnus.com>
1498
1499 Fix for PR gcj/33:
1500 * jv-scan.c (help): Document --encoding.
1501 (options): Added `encoding' entry.
1502 (OPT_ENCODING): New define.
1503 (main): Handle --encoding.
1504 Include <langinfo.h> if nl_langinfo exists.
1505 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
1506 --encoding.
1507 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
1508 (parse_source_file): Correctly call java_init_lex. Added `finput'
1509 argument. Use nl_langinfo to determine default encoding.
1510 * java-tree.h (current_encoding): Declare.
1511 * parse.y (java_parser_context_restore_global): Don't restore
1512 `finput'.
1513 (java_parser_context_save_global): Don't set `finput' field.
1514 (java_pop_parser_context): Don't restore `finput'. Free old lexer
1515 if required.
1516 * lang.c (current_encoding): New global.
1517 (lang_decode_option): Recognize `-fencoding='.
1518 (finish_parse): Don't close finput.
1519 * parse.h (struct parser_ctxt): Removed `finput' and
1520 `unget_utf8_value' fields. Added `lexer' field.
1521 (java_init_lex): Fixed declaration.
1522 * lex.c (java_new_lexer): New function.
1523 (java_destroy_lexer): Likewise.
1524 (java_read_char): Added `lex' argument. Handle iconv case.
1525 (java_read_unicode): Added `lex' argument. Count backslashes in
1526 lexer structure.
1527 (java_init_lex): Added `finput' and `encoding' arguments. Set
1528 `lexer' field in ctxp.
1529 (BAD_UTF8_VALUE): Removed.
1530 (java_lex): Handle seeing UEOF in the middle of a string literal.
1531 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
1532 (java_lexer): New structure.
1533 (UNGETC): Removed.
1534 (GETC): Removed.
1535 (DEFAULT_ENCODING): New define.
1536 (java_destroy_lexer): Declare.
1537
ee17a290
TT
15382000-09-12 Tom Tromey <tromey@cygnus.com>
1539
1540 Fix for PR gcj/343:
1541 * lex.c (java_init_lex): Initialize java_io_serializable.
1542 * parse.y (java_io_serializable): New global.
1543 (valid_ref_assignconv_cast_p): An array can be cast to
1544 serializable.
1545
d8ea8f28
ZW
15462000-09-10 Zack Weinberg <zack@wolery.cumb.org>
1547
1548 * decl.c, expr.c: Include defaults.h if not already included.
1549 Don't define the *_TYPE_SIZE macros.
1550
0caae6dd
GK
15512000-09-09 Geoffrey Keating <geoffk@cygnus.com>
1552
1553 * typeck.c (build_java_array_type): Correct first parameter
1554 in ADJUST_FIELD_ALIGN invocation.
1555
f0bee8b3
TT
15562000-09-06 Tom Tromey <tromey@cygnus.com>
1557
1558 * lang-specs.h: Also recognize `-femit-class-files'.
1559
3e99f50c
APB
15602000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
1561
1562 * verify.c (merge_types): Load the types to merge if necessary.
1563
3ca8c9ae
AG
15642000-09-02 Anthony Green <green@redhat.com>
1565
1566 * jcf-io.c: Include zlib.h.
1567 (open_in_zip): Read compressed class file archives.
1568 * zipfile.h (ZipDirectory): Add uncompressed_size and
1569 compression_method fields.
1570 * zextract.c (read_zip_archive): Collect file compression info.
1571
e1d565ab
BM
15722000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
1573
f6bbde28 1574 * parse.y (do_resolve_class): Also explore superclasses of
e1d565ab
BM
1575 intermediate enclosing contexts when searching for inner classes.
1576
29f8b718
APB
15772000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
1578
1579 * parse.y (variable_declarator_id:): Better error message.
1580 (expression_statement:): Use YYNOT_TWICE.
1581 (cast_expression:): Likewise.
1582 (assignment:): Likewise.
1583
354e99ce
APB
15842000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
1585
1586 * parse.y (do_merge_string_cste): New locals. Create new
1587 STRING_CSTs each time, use memcpy. Fixes gcj/311.
1588
7c097ee9
HB
15892000-08-07 Hans Boehm <boehm@acm.org>
1590
1591 * boehm.c (mark_reference_fields): Set marking bits for all words in
1592 a multiple-word record.
1593 (get_boehm_type_descriptor): Use the procedure marking descriptor for
1594 java.lang.Class.
f6bbde28 1595
3d919a0e
MS
15962000-08-31 Mike Stump <mrs@wrs.com>
1597
1598 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
1599 jcf-dump$(exeext)): Make parallel safe.
1600
63ad61ed
ZW
16012000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1602
1603 * jcf-parse.c (set_source_filename): Constify a char *.
1604 * jcf-write.c (append_innerclasses_attribute,
1605 make_class_file_name): Constify a char *. Don't recycle a
1606 variable for an unrelated purpose.
1607 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
1608 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
1609
c00f0fb2
APB
16102000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
1611
1612 * expr.c (can_widen_reference_to): Fixed indentation.
1613 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
1614 * parse.y: `finit$' replaces `$finit$' in comments.
1615 (try_builtin_assignconv): Fixed leading comment.
1616
94574545
GM
16172000-08-25 Greg McGary <greg@mcgary.org>
1618
1619 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
1620
6e2aa220
GM
16212000-08-24 Greg McGary <greg@mcgary.org>
1622
1623 * lang.c (lang_decode_option): Use ARRAY_SIZE.
1624 * parse.y (BINOP_LOOKUP): Likewise.
1625
9b1ee05b
AH
16262000-08-22 Andrew Haley <aph@cygnus.com>
1627
1628 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
1629 sign extending. Fixes gcj/321.
1630 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
1631 combining to make a jlong. Fixes gcj/321.
1632
05a3d06e 16332000-08-21 Nix <nix@esperi.demon.co.uk>
f6bbde28 1634
05a3d06e
N
1635 * lang-specs.h: Do not process -o or run the assembler if
1636 -fsyntax-only.
1637
65f69237
AH
16382000-08-16 Andrew Haley <aph@cygnus.com>
1639
1640 * typeck.c (build_java_array_type): Rewrite code to do array
1641 alignment. Take into account back-end macros when aligning array
1642 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
1643 user to set alignment. Fixes gcj/252 and 160.
1644
2e0f0aff
TT
16452000-08-09 Tom Tromey <tromey@cygnus.com>
1646
1175b9b4
TT
1647 * parse.y (check_abstract_method_definitions): Now return `int'.
1648 Check implemented interfaces. Fixes PR gcj/305.
1649
2e0f0aff
TT
1650 * parse.y (patch_switch_statement): Disallow `long' in switch
1651 expressions. Fixes PR gcj/310.
1652
25bdcbc5
APB
16532000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
1654
1655 * decl.c (finit_leg_identifier_node): New global.
1656 (init_decl_processing): Use `finit$' to initialize
1657 finit_identifier_node. Use `$finit$' to initialize
1658 finit_leg_identifier_node.
1659 * expr.c (expand_java_field_op): Use ID_FINIT_P.
1660 * java-tree.h (finit_identifier_node): Changed attached comment.
1661 (finit_leg_identifier_node): New declaration.
1662 (ID_FINIT_P): Take finit_identifier_node and
1663 finit_leg_identifier_node into account. This is a backward
1664 compatibility hack.
1665
81baa09a
APB
16662000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
1667
1668 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
1669 Jan 6 2000 patch.
1670 (generate_bytecode_insns): Check `nargs' before emitting it.
1671 * verify.c (merge_type_state): Fixed typo.
1672 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
1673 generate_bytecode_{conditional,insns}.
1674
458530ee
AG
1675Sun Aug 13 09:41:49 2000 Anthony Green <green@redhat.com>
1676
1677 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
1678 for -pg builds).
1679
34d4df06
APB
16802000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
1681
1682 * class.c (maybe_layout_super_class): Fixed indentation.
1683 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
1684 (java_check_methods): New function declaration.
1685 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
1686 instead of `str_ptr'.
1687 * jcf-write.c (generate_bytecode_insns): Emit number the of args
1688 of a `invokeinterface' at the right time.
1689 * parse.h (WFL_STRIP_BRACKET): New macro.
1690 (SET_TYPE_FOR_RESOLUTION): Use it.
dba41d30 1691 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
34d4df06
APB
1692 (check_class_interface_creation): Don't check for cross package
1693 innerclass name clashes.
dba41d30 1694 (method_header): Behave properly if MDECL is `error_mark_node'.
34d4df06
APB
1695 (method_declarator): Return `error_mark_node' if bogus current
1696 class.
1697 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
1698 (resolve_and_layout): New local `decl_type', set and used. Call
1699 java_check_methods.
1700 (java_check_methods): New method.
1701 (java_layout_classes): Use it.
1702 (resolve_qualified_expression_name): No EH check necessary in
1703 access$<n>.
1704 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
1705 `case' statement.
1706 (patch_assignment): Set DECL_INITIAL on integral final local.
1707
5f1c312a
APB
17082000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
1709
1710 * java-tree.h (flag_extraneous_semicolon): New extern.
1711 * lang-options.h: (-Wextraneous-semicolon): New option.
1712 * lang.c (flag_redundant): Fixed typo in leading comment.
1713 (flag_extraneous_semicolon): New global.
1714 (lang_decode_option): Set `flag_extraneous_semicolon' when
1715 -Wall. Decode `-Wextraneous-semicolon'.
1716 * parse.y (type_declaration:): Removed `SC_TK' hack, added
1717 `empty_statement' rule.
1718 (class_body_declaration): Likewise.
1719 (method_body:): Accept `;' as a method body.
1720 (static_initializer:): Removed `SC_TK' hack.
1721 (constructor_block_end:): Likewise.
1722 (empty_statement:): Report deprecated empty declaration. Fixes
1723 gcj/295
1724
25bdcbc5 17252000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
f0f3a777
APB
1726
1727 * parse.y (build_dot_class_method_invocation): Changed parameter
dba41d30 1728 name to `type'. Build signature from `type' and convert it to a
f0f3a777
APB
1729 STRING_CST if it's an array.
1730 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
1731 to use `ref_type' directly.
1732
64c04091
OP
1733Sun Aug 6 00:47:24 2000 Ovidiu Predescu <ovidiu@cup.hp.com>
1734
1735 * lang-options.h: Added a comma after the last element to avoid
1736 syntax errors when other languages define additional options.
1737
a36556a8
ZW
17382000-08-04 Zack Weinberg <zack@wolery.cumb.org>
1739
1740 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
1741 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
1742 (jc1): Link with $(BACKEND).
1743 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
1744
50e60bc3
ZW
17452000-08-02 Zack Weinberg <zack@wolery.cumb.org>
1746
37620334
ZW
1747 * jvspec.c: Adjust type of second argument to
1748 lang_specific_driver, and update code as necessary.
1749
50e60bc3
ZW
1750 * class.c (build_dtable_decl): Initialize dummy.
1751
f0f3a777
APB
17522000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
1753
1754 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
1755 method bodies not to rule out discarding `<clinit>'; don't use
1756 <clinit> to initialize static fields with constant initializers.
1757
17582000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
1759
1760 * gjavah.c (print_method_info): Added `synth' parameter. Skip
1761 synthetic methods.
1762 (method_synthetic): New global.
1763 (HANDLE_METHOD): Recognize synthetic method and tell
1764 `print_method_info' about it.
1765 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
1766 processing a synthetic method.
1767 * jcf-reader.c (skip_attribute): New function.
1768 ( skip_attribute): Likewise.
1769
17702000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
1771
1772 * parse.y (build_outer_field_access): Fixed comments.
1773 (fix_constructors): Emit the initialization of this$<n> before
1774 calling $finit$.
1775 (resolve_qualified_expression_name): Build an access to `decl' if
1776 necessary.
1777
17782000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
1779
1780 * parse-scan.y (curent_class): Non longer const.
1781 (inner_qualifier, inner_qualifier_length): Deleted.
1782 (current_class_length): New global.
1783 (bracket_count): Fixed typo in leading comment.
1784 (anonymous_count): New global.
1785 (class_instance_creation_expression:): Handle anonymous classes.
1786 (anonymous_class_creation:): New rule.
1787 (push_class_context): Rewritten.
1788 (pop_class_context): Likewise.
1789 (INNER_QUALIFIER): Macro deleted.
1790 (report_class_declaration): call `push_class_context' when
1791 entering the function. `fprintf' format modified not to use
1792 INNER_QUALIFIER.
1793 (report_class_declaration): Assign `package_name' and
1794 `current_class' to NULL separatly.
1795
17962000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
1797
1798 * expr.c (build_invokeinterface): Call layout_class_methods on
1799 target interface.
1800
13107ec0 18012000-07-27 Tom Tromey <tromey@cygnus.com>
f6bbde28 1802 Anthony Green <green@cygnus.com>
13107ec0
TT
1803 Alexandre Petit-Bianco <apbianco@cygnus.com>
1804
1805 * class.c (make_class_data): Create vtable for abstract classes.
1806 (get_dispatch_table): Changed to cope with abstract classes.
1807
da632f2c
APB
18082000-07-27 Tom Tromey <tromey@cygnus.com>
1809
1810 * parse.y (patch_method_invocation): Don't reverse the argument
1811 list when dealing with anonymous class constructors. Fixed typo in
1812 comment.
1813
18142000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
1815
1816 * parse.y (build_alias_initializer_parameter_list): Reverse
1817 crafted list when building aliases for anonymous class
1818 constructors.
1819
1e12ab9b
APB
18202000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
1821
1822 * parse.y (jdep_resolve_class): Don't bother checking potential
1823 innerclass access if `decl' is NULL.
1824 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
1825 WFL.
1826
4c31fe99
APB
18272000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
1828
1829 * parse.c: Remove (again.)
1830
1e12ab9b
APB
18312000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
1832
1833 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
1834 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
1835 outside the `if' statement, alias to innerclass removed, `decl'
1836 used to mark the class complete.
1837
f4530f43
APB
18382000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
1839
1840 * parse.y (simple_name:): Fixed typo in error message.
1841
e7c7bcef
APB
18422000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
1843
1844 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
1845 or its first operand can be error marks.
1846
18472000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1848
1849 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
1850 * parse.y (method_header): Likewise.
1851
02ae6e2e
APB
18522000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
1853
1854 * parse.y (process_imports): Consider that one might be trying to
1855 import an innerclass. Fixes gcj/254
1856
e7c7bcef
APB
18572000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
1858
1859 * parse.y (find_as_inner_class): Handle the case where the
1860 enclosing context of an innerclass has been loaded as bytecode.
1861
4142b247
APB
18622000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
1863
f6bbde28 1864 * parse.y (simple_name:): Reject `$' in type names.
4142b247
APB
1865 (resolve_type_during_patch): Use `type' as a second
1866 argument to resolve_no_layout. Fixes gcj/257.
1867
cab8e2bd
BM
18682000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
1869
f6bbde28 1870 * parse.y (find_most_specific_methods_list): Select the only
cab8e2bd
BM
1871 non-abstract method even if max has been set.
1872 Fixes gcj/285, gcj/298.
1873
ca2875c4
JS
18742000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
1875
1876 * lang-specs.h: Added %(jc1) to java compiler options.
1877
bfbbc080
ZW
18782000-07-14 Zack Weinberg <zack@wolery.cumb.org>
1879
1880 * .cvsignore: New file.
1881
11b26d72
APB
18822000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
1883
1884 * parse.y (not_accessible_p): Access granted to innerclasses
1885 (indirectly) extending the reference type. Fixes gcj/249.
1886
18872000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
1888
1889 * parse.y (patch_method_invocation): Fixed comment.
1890 (maybe_use_access_method): Build this$<n>s to the context of the
1891 target method, or a type that extends it. Fixes gcj/242.
1892
649c9142
MM
18932000-07-13 Mark Mitchell <mark@codesourcery.com>
1894
1895 * parse.c: Remove.
1896
ee97d354
APB
18972000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
1898
1899 * parse.y (fold_constant_for_init): Avoid bullish conversion.
1900
44fadf1e
TT
19012000-07-13 Tom Tromey <tromey@cygnus.com>
1902
1903 * lang-specs.h: Added %{I*}.
1904
ea414c97
ZW
19052000-07-13 Zack Weinberg <zack@wolery.cumb.org>
1906
1907 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
1908
792abd35
MM
19092000-07-12 Mark Mitchell <mark@codesourcery.com>
1910
1911 * parse-scan.c: Remove.
1912
11b26d72
APB
19132000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
1914
1915 * class.c (set_super_info): Handled protected inner classes.
1916 (common_enclosing_context_p): Bail early if arguments aren't both
1917 inner classes.
1918 (get_access_flags_from_decl): Handle private and protected inner
1919 classes.
1920 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
1921 (CLASS_PROTECTED): Likewise.
dba41d30 1922 (struct lang_type): New bitfield `poic'.
11b26d72
APB
1923 * parse.y (jdep_resolve_class): Call check_inner_class_access on
1924 inner classes only.
1925 (check_inner_class_access): Renamed arguments, added
1926 comments. Handles protected inner classes (fixes gcj/225)
1927 (not_accessible_p): Fixed comments. Avoid handling inner classes.
1928
19292000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
1930
1931 * parse.y (resolve_qualified_expression_name): Verify qualified
dba41d30 1932 access to `this'. Fixes gcj/239.
11b26d72 1933
e67eb1a0 19342000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
2f2bd00a 1935
e67eb1a0
APB
1936 * jcf-write.c (generate_classfile): Don't install ConstantValue
1937 for null pointers.
2f2bd00a 1938
11b26d72
APB
19392000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1940
1941 * parse.y (resolve_qualified_expression_name): Handle inner class
1942 access. Fixes gcj/256.
1943
629d4b4d
APB
19442000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1945
1946 * jcf-write.c (generate_classfile): Properly install the
1947 ConstantValue attribute and the initial value constant pool index
1948 on string constants.
1949 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
1950 class files.
1951
0c2b8145
APB
19522000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
1953
1954 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
1955 construct.
1956 * parse.y (find_as_inner_class): Fixed typo.
1957 (do_resolve_class): Explore enclosing contexts when searching for
1958 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
1959 (check_inner_class_access): Check `decl' which can be null in case
1960 of previous errors.
1961
19622000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
1963
dba41d30 1964 * java-tree.h (java_debug_context): Declared `extern'.
0c2b8145
APB
1965 (safe_layout_class): Likewise.
1966 * parse.y (resolve_field_access): Field must be `static' in order
1967 to be replaced by its initial value. Added comments.
1968 (find_applicable_accessible_methods_list): Fixed typo.
1969 (find_most_specific_methods_list): Methods found in innerclasses
1970 take over methods founds in the enclosing contexts.
1971 (java_complete_tree): Loosen restrictions on the type of DECLs
1972 that can be replaced by their initialization values.
dba41d30 1973 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
0c2b8145 1974
0267da64
TT
19752000-07-05 Tom Tromey <tromey@cygnus.com>
1976
1977 * Make-lang.in (PARSE_DIR): New macro.
1978 (PARSE_RELDIR): Likewise.
1979 (PARSE_C): Likewise.
1980 (PARSE_SCAN_C): Likewise.
1981 ($(PARSE_C)): New target.
1982 ($(PARSE_SCAN_C)): Likewise.
1983 (SET_BISON): New macro.
1984 (BISONFLAGS): Likewise.
1985 (JAVABISONFLAGS): Likewise.
1986
1bbee75b
BM
19872000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
1988
f6bbde28
ZW
1989 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
1990 argument on the first pass for CNI as well as JNI.
1991 (print_method_info): Set up method name on the first pass only.
1992
98a52c2c
APB
19932000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
1994
1995 * parse.y (parser_qualified_classname): Removed parameter
1996 `is_static'.
1997 (create_interface): Removed first passed parameter to
1998 parser_qualified_classname.
1999 (create_class): Likewise. Don't install alias on static
2000 innerclasses. Fixes gcj/275.
2001
20022000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
2003
2004 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
2005 debugable statement with empty_stmt_node. Fixes gcj/272
2006
20072000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
2008
2009 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
2010 gcj/271.
2011
c1c8f8cc
APB
20122000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
2013
2014 * jcf-write.c (push_long_const): Appropriately cast short negative
2015 constant to jword.
2016
cf1b2274
APB
20172000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
2018
2019 * parse.y (verify_constructor_super): Use loop variable
2020 `m_arg_type' initialized with `mdecl_arg_type'.
2021
6eaeeb55
TT
20222000-06-29 Tom Tromey <tromey@cygnus.com>
2023
2024 * parse.y (resolve_field_access): Handle case where `type_found'
2025 is NULL.
2026
18ee3d5e
APB
20272000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
2028
2029 * expr.c (lookup_field): The same field can be found through two
2030 different interface. Don't declare it ambiguous in that case.
2031
61d5c158
TT
20322000-06-27 Tom Tromey <tromey@cygnus.com>
2033
2034 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
2035 follows \r, then unget it at a lower level.
2036
70541f45
TT
20372000-06-26 Tom Tromey <tromey@cygnus.com>
2038
2039 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
2040 java_complete_tree.
2041
774d2baf
TT
20422000-06-25 Tom Tromey <tromey@cygnus.com>
2043
2044 * parse.y (for_statement): Wrap expression in a WFL if it is a
2045 constant. For PR gcj/268.
2046
d6baf6f5
APB
20472000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2048
2049 * parse.y (do_resolve_class): Minor optimiztion in the package
2050 list search. Removed unecessary test and return statement.
2051 (valid_ref_assignconv_cast_p): Order of arguments to
2052 enclosing_context_p fixed.
2053
120f0c10
TT
20542000-06-24 Tom Tromey <tromey@cygnus.com>
2055
ae4a4c88
TT
2056 * expr.c (lookup_field): Print error and return error_mark_node if
2057 field reference is ambiguous.
2058
120f0c10
TT
2059 * parse.y (check_abstract_method_definitions): Also check if
2060 `other_method' is abstract.
2061
cf1748bf
APB
20622000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
2063
2064 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
2065 classes.
2066 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
dba41d30 2067 (struct lang_type): New field `pic'.
cf1748bf
APB
2068 (CLASS_PRIVATE): New macro.
2069 * parse.y (check_inner_class_access): New function.
2070 (jdep_resolve_class): Call it.
2071
f1ff439a
TT
20722000-06-23 Tom Tromey <tromey@cygnus.com>
2073
2074 * parse.y (patch_incomplete_class_ref): Initialize the returned
2075 class. For PR gcj/260.
2076
9a7ab4b3
APB
20772000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
2078
2079 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
2080
20812000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
2082
2083 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
2084 Java specific checks.
2085 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
2086 screened by DECL_P.
2087 * java-tree.def (CASE_EXPR): Marked 'e'.
2088 (DEFAULT_EXPR): Likewise.
2089 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
2090 screened by DECL_P.
2091 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
2092 Java specific checks.
2093 (generate_bytecode_insns): Test try_block for BLOCK before using
2094 BLOCK_EXPR_BODY.
2095 * parse.y (build_wfl_wrap): Added `location' argument. Set
2096 EXPR_WFL_LINECOL accordingly.
2097 (dim_expr:): Wrap constants with WFLs.
2098 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
2099 (resolve_package): Check for `stmt' not being a BLOCK before
2100 building a debuggable statement with it.
2101 (make_qualified_primary): Added extra parameter to build_wfl_wrap
2102 invocation.
2103 (resolve_field_access): Make sure `decl' is a DECL before treating
2104 it as such.
2105 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
2106 IDENTIFIER_NODE before treating it as such.
2107 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
2108 treating it as such.
2109 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
2110 to be applied only on non array types.
2111
21122000-06-16 Per Bothner <per@bothner.com>
2113
2114 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
2115 define in terms of DECL_RESULT, as that fails when --enable-checking.
f6bbde28 2116
ffb1f63d
KG
21172000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2118
2119 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
2120 types the same in comparison.
2121 (CHECK_OP): Add static prototype.
2122
11cf4d18
JJ
21232000-06-13 Jakub Jelinek <jakub@redhat.com>
2124
2125 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
2126 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
2127 * parse.c: Rebuilt.
2128
5ac9118e
KG
21292000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2130
2131 * decl.c (create_primitive_vtable): Prototype.
2132
2133 * jcf-write.c (generate_bytecode_insns): Initialize variable
2134 `saved_context'.
2135
2136 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
2137
ad69b5b6
BM
21382000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
2139
2140 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
2141 to track searched classes, and do not search the same class more than
2142 once. Call find_applicable_accessible_methods_list on immediate
2143 superclass, instead of search_applicable_method_list on all ancestors.
2144 Fix for PR gcj/238.
2145
cf1748bf
APB
21462000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
2147
2148 * parse.y (register_fields): Permit static fields in inner classes
2149 if they are final. Fix for PR gcj/255.
2150
9a7ab4b3
APB
21512000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
2152
2153 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
2154 * parse.y (find_in_imports): Returned type changed to void,
2155 leading comment fixed.
2156 (register_package): New function.
2157 (qualify_and_find): Likewise.
2158 (package_declaration:): Use `register_package'.
2159 (single_type_import_declaration:): Removed local variable
2160 `node'. Added missing `;' for consistency.
2161 (type_import_on_demand_declaration:): Use `chainon' to link new
2162 entries.
2163 (lookup_field_wrapper): Lookup local variables defined in outer
2164 contexts first.
2165 (java_complete_class): Don't reverse the list of imported on demand.
2166 (do_resolve_class): Reorganized. Removed local variable
2167 `original_name'. Call `qualify_and_find' with the current package
2168 name, invoke `find_in_imports_on_demand' right after. Call
2169 `qualify_and_find' with the packages we've seen so far. Fixed
2170 operations numbering in comments.
2171 (java_expand_class): Don't reverse `package_list'.
2172 (find_most_specific_methods_list): New local variables `abstract'
2173 and `candidates'. Use them to pick the right method.
2174
14d075d8
TT
2175Tue Jun 6 11:39:05 2000 Tom Tromey <tromey@ferrule.cygnus.com>
2176
2177 * parse.y (check_modifiers_consistency): Don't subtract out
2178 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
2179
603832a0
PT
21802000-06-04 Philipp Thomas <pthomas@suse.de>
2181
2182 * Makefile.in (INTLLIBS): New.
2183 (LIBS): Add above.
2184 (DEPLIBS): Ditto.
2185
8f975c18
APB
2186Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2187
2188 * class.c (get_dispatch_table): Build the vtable dummy entry list
2189 element with a null purpose. Fixed leading comment.
2190 (build_dtable_decl): Build an accurate dtable type when appropriate
2191 and use it.
2192
2e761e49
RH
21932000-06-02 Richard Henderson <rth@cygnus.com>
2194
2195 * lang.c (lang_get_alias_set): New.
2196
0f145be8
APB
21972000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
2198
2199 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
2200 before using it as the accessed field.
2201
2771fe54
TT
22022000-05-31 Tom Tromey <tromey@cygnus.com>
2203
2204 * java-tree.h (boolean_array_vtable, byte_array_vtable,
2205 char_array_vtable, short_array_vtable, int_array_vtable,
2206 long_array_vtable, float_array_vtable, double_array_vtable):
2207 Declare.
2208 * expr.c (get_primitive_array_vtable): New function.
2209 (create_primitive_vtable): New function.
2210 (java_lang_expand_expr): Enable code to statically generate
2211 arrays.
2212 * decl.c (init_decl_processing): Create primitive vtables.
2213 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
2214 short_array_vtable, int_array_vtable, long_array_vtable,
2215 float_array_vtable, double_array_vtable): Define.
2216
30a3caef
ZW
22172000-05-26 Zack Weinberg <zack@wolery.cumb.org>
2218
2219 * java/parse.y (find_applicable_accessible_methods_list):
2220 Don't add an uninitialized value to the list.
2221
b8c5b1c6
TT
22222000-05-25 Tom Tromey <tromey@cygnus.com>
2223
40aaba2b
TT
2224 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
2225 when trying to see if field's class should be initialized. Always
2226 initialize field's declaring class, not qualified class.
2227 For PR gcj/162.
2228
b8c5b1c6
TT
2229 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
2230 `wfl_operator', to maybe_build_primttype_type_ref.
2231 Fixes PR gcj/235.
2232
6518c7b5
BM
22332000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
2234
2235 * parse.y (patch_method_invocation): Don't try to lookup methods
2236 in primitive types.
2237
611a4b87
APB
22382000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
2239
2240 * parse.y (resolve_field_access): Call the appropriate <clinit>
2241 before accessing the length of a static array. Craft a decl for
2242 the field while its time. Fixes PR gcj/129.
f6bbde28 2243
6b48deee
APB
22442000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
2245
2246 * parse.y (resolve_package): Correctly set `*next' (was off by
2247 one.)
2248 (resolve_qualified_expression_name): Fixed comment.
2249
0ba154aa
APB
2250Thu Apr 27 17:47:34 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2251
f6bbde28 2252 * jcf-parse.c (jcf_parse_source): Reset current_class and
0ba154aa
APB
2253 current_function_decl to NULL before parsing a new file.
2254
c280e37a
APB
2255Thu Apr 27 17:25:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2256
2257 * parse.y (block_end:): If the collected block doesn't feature a
2258 statement, insert an empty statement.
2259
92d83515
APB
22602000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2261
f6bbde28
ZW
2262 * parse.y (maybe_yank_clinit): New function.
2263 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
2264 end of the list of methods belonging to a class.
2265 (java_complete_expand_method): Check whether <clinit> is really
2266 necessary and expand it accordingly.
92d83515 2267
ec5bb3cf
APB
22682000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
2269
2270 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
2271 processed by the method's switch statement.
2272
67db0ce7
TT
22732000-05-19 Tom Tromey <tromey@cygnus.com>
2274
2275 * java-tree.h: Added init state enum.
2276 * decl.c (emit_init_test_initialization): Initialize class
2277 initialization check variable by looking at class' state.
2278
43490bec
TT
22792000-05-19 Tom Tromey <tromey@cygnus.com>
2280
2281 * java-tree.h (build_instanceof): Declare.
2282 (build_get_class): Declare.
2283 * parse.y (patch_binop): Use build_instanceof.
2284 * expr.c (build_instanceof): New function. If class is final,
2285 don't make a function call.
2286 (expand_java_INSTANCEOF): Use it.
2287 (build_get_class): New function.
2288
062edaed
AO
22892000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2290
2291 * jcf-write.c (generate_classfile): Scan the source_file for
2292 slashes with the right pointer variable.
2293
078721e1
AC
2294Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
2295
2296 * lang.c (lang_decode_option): Update -Wunused flags by calling
2297 set_Wunused.
2298 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
2299
46543024 23002000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3b304f5b
ZW
2301
2302 * check_init.c (check_init): Constify local char *.
2303 * class.c (push_class): Constify local char *.
2304 * java_tree.h: Update prototypes.
2305 * jcf-io.c (open_class): Constify filename parameter and
2306 return value.
2307 (find_class): Remove redundant string copy. Cast return from
2308 open_class.
2309 * jcf-parse.c (read_class, parse_class_file, yyparse):
2310 Constify local char *.
2311 * jcf-write.c (generate_bytecode_insns, generate_classfile):
2312 Constify local char *.
2313 * jcf.h (JCF): Constify filename and classname.
2314 (JCF_FINISH): Cast args to FREE to char * when appropriate.
2315 * lang.c (init_parse): Constify parameter and return value.
2316 * lex.c (java_get_line_col): Constify filename parameter.
2317 * parse.h: Constify parser_ctxt.filename. Update prototypes.
2318 * parse.y (java_parser_context_suspend,
2319 issue_warning_error_from_context, safe_layout_class): Constify
2320 local char *.
2321 * parse.c: Regenerate.
2322
4c6a8973
TT
23232000-05-08 Tom Tromey <tromey@cygnus.com>
2324
2325 * expr.c (build_jni_stub): Cache the result of
2326 _Jv_LookupJNIMethod.
2327
e117276e
APB
23282000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2329
2330 * decl.c (predef_filenames_size): Now 7.
2331 (predef_filenames): New seventh entry.
2332
652f2504
TT
23332000-05-04 Tom Tromey <tromey@cygnus.com>
2334
2335 * boehm.c (mark_reference_fields): Don't mark RawData fields.
2336 Keep track of when we've seen a reference field after a
2337 non-reference field.
2338 (get_boehm_type_descriptor): Handle case where we see
2339 non-reference fields but no trailing reference field.
2340 * decl.c (rawdata_ptr_type_node): Define.
2341 (init_decl_processing): Initialize rawdata_ptr_type_node.
2342 * java-tree.h (rawdata_ptr_type_node): Declare.
2343
ccedaff3
KG
23442000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2345
2346 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
2347 specifiers in calls to fprintf.
2348
dd5d6281
TT
23492000-05-03 Andrew Haley <aph@cygnus.com>
2350
2351 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
2352
2353 * javaop.h (WORD_TO_INT): New function.
2354 (IMMEDIATE_s4): Use WORD_TO_INT.
2355 * jcf.h (JPOOL_INT): Ditto.
2356
2357 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
2358 separator.
2359
dd5d6281 23602000-04-19 Tom Tromey <tromey@cygnus.com>
7145d9fe
TT
2361
2362 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
2363 on native function.
2364 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
2365 JNI methods.
2366 * expr.c (build_jni_stub): New function.
2367 * lang-specs.h: -fjni and -femit-class-file are incompatible.
2368 * parse.c: Rebuilt.
2369 * parse.y (java_complete_expand_methods): Expand a native method
2370 and call build_jni_stub if -fjni given.
2371 * lang-options.h: Document -fjni.
2372 * lang.c (flag_jni): New global.
2373 (lang_f_options): Added `jni' entry.
2374 * java-tree.h (soft_lookupjnimethod_node,
2375 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
2376 Declare.
2377 (flag_jni): Declare.
2378 (build_jni_stub): Declare.
2379 (struct lang_decl): Added `native' flag.
2380 (METHOD_NATIVE): Redefined to use `native' field of lang specific
2381 structure.
2382 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
2383 soft_jnipopsystemframe_node): New globals.
2384 (init_decl_processing): Set them. _Jv_InitClass only takes one
2385 argument.
2386
2387 * java-tree.def: Put into `C' mode.
2388
e815887f
TT
23892000-04-27 Tom Tromey <tromey@cygnus.com>
2390
2391 Fix for PR gcj/2:
2392 * expr.c (expand_invoke): Generate check to see if object pointer
2393 is null in nonvirtual invocation case.
2394 * java-tree.h (soft_nullpointer_node): Declare.
2395 * decl.c (soft_nullpointer_node): New global.
2396 (init_decl_processing): Initialize soft_nullpointer_node.
2397 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
2398 or `private' methods.
2399 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
2400
ad81223c
APB
2401Wed Apr 26 14:29:33 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2402
2403 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
2404 from <clinit>
2405
f1acc01e
TT
24062000-04-26 Tom Tromey <tromey@cygnus.com>
2407
2408 * zextract.c (find_zip_file_start): New function.
2409 (read_zip_archive): Use it.
2410
e803d3b2
APB
24112000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
2412
2413 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
2414
152de068
APB
24152000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
2416
2417 * class.c (common_enclosing_context_p): New function.
2418 * java-tree.h (common_enclosing_context_p): Added prototype.
2419 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
2420 classes sharing an outer context with the current instance.
2421 * parse.y (build_access_to_thisn): Fixed leading comment.
2422 (verify_constructor_super): New local `supper_inner'. Skip
2423 enclosing context argument in the case of inner class constructors.
2424 (patch_method_invocation): Insert proper context as second
2425 parameter to pure inner class constructor super invocations.
2426
93220702
APB
2427Mon Apr 24 14:59:36 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2428
2429 * parse.y (end_class_declaration): Reset the interface number
2430 counter.
2431
dfb99c83
APB
24322000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
2433
f6bbde28
ZW
2434 * parse.y (source_start_java_method): Deleted unecessary code.
2435 (patch_method_invocation): Fixed comment.
dfb99c83 2436
e60a8c26
RL
24372000-04-24 Robert Lipe <robertlipe@usa.net>
2438
2439 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
2440
3c8c10b8
TT
24412000-04-23 Tom Tromey <tromey@cygnus.com>
2442
2443 * boehm.c (mark_reference_fields): Use int_byte_position.
2444
8a008c41
TT
24452000-04-22 Tom Tromey <tromey@cygnus.com>
2446
2447 * boehm.c (mark_reference_fields): Only call byte_position on
2448 non-static fields.
2449
d5f76aba
TT
24502000-04-22 Tom Tromey <tromey@cygnus.com>
2451
2452 * boehm.c (mark_reference_fields): Added `last_view_index'
2453 argument. Use DECL_FIELD_OFFSET to determine field's offset.
2454
a40d21da
APB
2455Thu Apr 20 17:41:28 2000 Mo DeJong <mdejong@cygnus.com>
2456
2457 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
2458 * parse.y (check_class_interface_creation): Fixed comments. Select
2459 permitted modifiers for (inner) interfaces. Changed error message
2460 to report rejected modifiers used with local classes.
2461
24622000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
2463
2464 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
2465 of directly inherited type considered in scope.
2466 * parse.y (do_resolve_class): Search inherited classes for inner
2467 classes.
2468
473e7b07
TT
24692000-04-20 Tom Tromey <tromey@cygnus.com>
2470
2471 * parse.y (not_accessible_p): Use member's class, not current
2472 class, when doing inheritance check for protected reference.
2473 Fixes PR gcj/124.
2474
c52fbf0f
JS
2475Thu Apr 20 18:20:58 2000 Jason Schroeder <shrode@subnature.com>
2476
2477 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
2478
f2760b27
APB
24792000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
2480
2481 * parse.y (lookup_field_wrapper): Search for final local aliases.
2482 (resolve_expression_name): Let lookup_field_wrapper search for
2483 final local aliases. Force the value of `name' if one is found.
2484 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
2485 an expression name. Fixed comments.
2486
807bc1db
APB
24872000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
2488
2489 * parse.y (yyerror): `msg' can be null, don't use it in that case.
2490
ecb36604
TT
24912000-04-19 Tom Tromey <tromey@cygnus.com>
2492
2493 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
2494
48a840d9
APB
24952000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
2496
2497 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
2498
83c1f628
TT
24992000-04-18 Tom Tromey <tromey@cygnus.com>
2500
2501 PR gcj/211:
2502 * gjavah.c (utf8_cmp): Changed return value.
2503 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
2504 result.
2505 (cxx_keywords): New global.
2506 (get_field_name): Handle new result of cxx_keyword_subst.
2507 (print_method_info): Likewise.
2508
a7384840
BM
25092000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
2510
f6bbde28 2511 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
a7384840 2512 with a newline, for CNI.
f6bbde28 2513 (print_stub_or_jni): Print a space or newline before method name for
a7384840
BM
2514 CNI as well as JNI.
2515 (print_cxx_classname): Don't write leading "::" in CNI stub method.
f6bbde28 2516 (process_file): Include gcj/cni.h if generating CNI stubs.
a7384840 2517
3e0768f0
TT
25182000-04-16 Tom Tromey <tromey@cygnus.com>
2519
2520 * gjavah.c (decompile_method): Use print_field_name.
2521 Fixes PR gcj/205.
2522
48a840d9
APB
25232000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
2524
2525 * parse.y (java_expand_classes): Reverse the package list once.
2526 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
2527 reduction.
2528 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
2529 the `==' and `!=' operators.
2530
cedea510
APB
25312000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2532
2533 * jcf-write.c (generate_bytecode_insns): At invokation time,
2534 always relate an interface method to the type of its selector.
f6bbde28 2535
e803d3b2
APB
25362000-04-05 Tom Tromey <tromey@cygnus.com>
2537
2538 Fix for PR gcj/2:
2539 * expr.c (expand_invoke): Generate check to see if object pointer
2540 is null in nonvirtual invocation case.
2541 * java-tree.h (soft_nullpointer_node): Declare.
2542 * decl.c (soft_nullpointer_node): New global.
2543 (init_decl_processing): Initialize soft_nullpointer_node.
2544 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
2545 or `private' methods.
2546 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
2547
bc2874c9
TT
25482000-04-05 Tom Tromey <tromey@cygnus.com>
2549
2550 Fix for PR gcj/140:
2551 * parse.y (check_final_assignment): Recognize assignments to the
2552 `length' field of an array when generating class files.
2553
256172c4
APB
25542000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2555
2556 * class.c (decl_hash): Prototype removed.
2557 (decl_compare): Likewise.
2558
e0fc4118
TT
25592000-04-05 Tom Tromey <tromey@cygnus.com>
2560
2561 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
2562 * parse.y (check_modifiers_consistency): Check for final/volatile
2563 clash. Fixes PR gcj/164.
2564
e0422ed0
APB
25652000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
2566
2567 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
2568 made global.
2569 (java_hash_compare_tree_node): Renamed from `decl_compare, made
2570 global.
2571 (add_method_1): Use `java_hash_hash_tree_node' and
2572 `java_hash_compare_tree_node'.
2573 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
2574 (java_hash_compare_tree_node): Likewise.
2575 * parse.y (find_applicable_accessible_methods_list): Create,
2576 delete and use a hash table to remember already searched interfaces.
2577
4200941b
MW
25782000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
2579
2580 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
2581 with latest entry.
2582
c0b864fc
KG
25832000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2584
2585 * boehm.c (mark_reference_fields, set_bit): Prototype.
2586 (set_bit): Un-ANSI-fy definition.
2587
2588 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
2589 Prototype.
2590
2591 * decl.c (emit_init_test_initialization): Likewise.
2592
2593 * gjavah.c (jni_print_char): Likewise.
2594
2595 * parse.y (create_new_parser_context): Likewise.
2596
7a678b64 2597Thu Mar 30 15:26:56 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
64ea4a5e
APB
2598
2599 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
2600 patch missing hunk. Fixed indentation.
2601
05411ecf
TT
26022000-03-30 Tom Tromey <tromey@cygnus.com>
2603
2604 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
2605 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
2606
acbedd7c
APB
26072000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
2608
2609 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
2610 when negative *before* using it as an array index.
2611 * ChangeLog: Fixed typo.
2612
0981a859
APB
26132000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
2614
2615 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
2616 to 0 when it reaches -1.
2617
26182000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
2619
2620 * jcf-parse.c (get_constant): Properly cast `num' during the
acbedd7c 2621 invocation of `add_double'.
0981a859
APB
2622 * jcf-write.c (push_long_const): Properly cast `lo' before
2623 comparing it to short bounds.
2624 * parse-scan.y (interface_declaration:): Rule re-arrange so that
2625 `interface_body:' is reduced after the current interface is
2626 pushed.
2627
a843e0ce
TT
26282000-03-26 Tom Tromey <tromey@cygnus.com>
2629
2630 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
2631 Java-specific `-f' option.
2632
ad41cc2a
RK
2633Sun Mar 26 11:37:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2634
2635 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
2636 Adjust order of making types.
2637 Make bitsize_*_node values.
2638
770ae6cc
RK
2639Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2640
2641 * class.c (make_field_value): Use byte_position.
2642 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
2643 (java_array_data_offset): Likewise.
2644 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
2645 bzero call.
2646
165f37bc
APB
26472000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
2648
2649 * parse.y (check_abstract_method_definitions): New local
2650 `end_type_reached'. Make sure we also consider `end_type'.
0981a859
APB
2651 (java_check_abstract_method_definitions): Make sure we eventually
2652 consider `java.lang.Object'.
2653 (maybe_use_access_method): Don't use access method if not in the
2654 context of a pure inner class or if the method's context is right.
2655 (find_applicable_accessible_methods_list): New static flag
165f37bc 2656 `object_done'. Don't search abstract classes as interfaces. Fixed
0981a859
APB
2657 indentation. Fixed the `java.lang.Object' only search. Search
2658 class interface(s) first, then fully search enclosing contexts.
2659 (find_most_specific_methods_list): Pick the closest candidate when
165f37bc
APB
2660 they're all abstract.
2661
124906f9
APB
2662Mon Mar 20 08:58:51 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
2663
2664 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
dba41d30 2665 properly initialize `finished_label'. Don't emit gotos for empty
124906f9
APB
2666 try statements.
2667
c14f7160
ML
2668