]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/java/ChangeLog
ec3807dd123c62f0c172608a4756fc6c876ba630
[thirdparty/gcc.git] / gcc / java / ChangeLog
1 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
2
3 * typeck.c (java_signed_type): Remove.
4 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
5 * java-tree.h (java_signed_type): Remove.
6
7 2007-05-18 Geoffrey Keating <geoffk@apple.com>
8
9 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
10 (print_constant): Likewise.
11
12 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
13
14 * expr.c (build_java_binop): Use unsigned_type_for instead of
15 java_unsigned_type.
16 * java-tree.h (java_unsigned_type): Remove.
17 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
18 * typeck.c (java_unsigned_type): Remove.
19
20 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
21
22 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
23 instead of checking GIMPLE_STMT_P in chain_next.
24
25 2007-04-06 Colin Walters <walters@redhat.com>
26
27 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
28 * jcf-io.c (open_class): Copy 'filename'.
29
30 2007-04-03 Andrew Haley <aph@redhat.com>
31
32 * jvgenmain.c (main): Change main to use class$, not class$$.
33 (do_mangle_classname): Likewise.
34 * class.c (hide): New function.
35 (add_field): Hide everything that shouldn't be visible outside a
36 DSO.
37 (build_static_class_ref): Likewise.
38 (build_classdollar_field): Likewise.
39 (make_class_data): Likewise.
40 (layout_class_method): Likewise.
41 * expr.c (special_method_p): New function.
42
43 * class.c (push_class): Don't bogusly guess the source filename.
44 * jcf-parse.c (give_name_to_class): Don't set input_location from
45 DECL_ARTIFICIAL decls.
46
47 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
48
49 * typeck.c (java_signed_or_unsigned_type): Removed.
50 (java_signed_type): use get_signed_or_unsigned_type instead of
51 java_signed_or_unsigned_type.
52 (java_unsigned_type): Ditto.
53 * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
54 * java-tree.h (java_signed_or_unsigned_type): Removed.
55
56 2007-03-26 Tom Tromey <tromey@redhat.com>
57
58 * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
59 (java.maintainer-clean): Likewise.
60 (java.install-man): Likewise.
61 (.INTERMEDIATE): Removed grmiregistry.pod.
62 (grmiregistry.pod): Removed.
63 * gcj.texi (Invoking gcjh): Removed.
64 (Invoking gjnih): Likewise.
65 (Invoking grmiregistry): Likewise.
66 (direntry): Updated.
67 (Top): Likewise.
68 (which-gcj): Removed.
69
70 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
71
72 * Make-lang.in: Add install-pdf target as copied from
73 automake v1.10 rules.
74
75 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
76
77 * gcj.texi: Standardize title page.
78
79 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
80
81 * class.c: Fix a comment typo.
82
83 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
84 Brooks Moses <brooks.moses@codesourcery.com>
85 Lee Millward <lee.millward@codesourcery.com>
86
87 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
88 of build3.
89 (BUILD_MONITOR_EXIT): Likewise.
90
91 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
92 (java_gimplify_modify_expr): Likewise.
93
94 * class.c (cache_this_class_ref): Use build_call_expr.
95 (build_static_field_ref): Likewise.
96 (emit_indirect_register_classes): Likewise.
97 (emit_register_classes): Likewise.
98
99 * resource.c (write_resource_constructor): Use build_call_expr.
100
101 * builtins.c (builtin_creator_function): Change interpretation of
102 the second parameter to be the whole CALL_EXPR instead of the arglist.
103 (max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
104 (min_builtin): Likewise.
105 (abs_builtin): Likewise.
106 (java_build_function_call_expr): Likewise.
107 (convert_real): Likewise.
108 (UNMARSHAL3): Likewise.
109 (UNMARSHAL4): Likewise.
110 (UNMARSHAL5): Likewise.
111 (build_arglist_for_builtin): Delete. Fix callers to use
112 build_call_expr instead.
113 (putObject_builtin): Tweak parameter list. Use new CALL_EXPR
114 accessors.
115 (compareAndSwapInt_builtin): Likewise.
116 (compareAndSwapLong_builtin): Likewise.
117 (compareAndSwapObject_builtin): Likewise.
118 (putVolatile_builtin): Likewise.
119 (getVolatile_builtin): Likewise.
120 (VMSupportsCS8_builtin): Likewise.
121 (check_for_builtin): Pass entire CALL_EXPR to builtin expander
122 instead of arglist.
123
124 * expr.c (build_java_athrow): Use build_call_nary instead of build3.
125 (build_java_throw_out_of_bounds_exception): Likewise.
126 (java_check_reference): Likewise.
127 (build_java_arraystore_check): Likewise.
128 (build_newarray): Likewise.
129 (build_anewarray): Likewise.
130 (expand_java_multinewarray): Use build_call_list instead of build3.
131 (build_java_monitor): Use build_call_nary instead of build3.
132 (java_create_object): Likewise.
133 (expand_java_NEW): Likewise.
134 (build_instanceof): Likewise.
135 (expand_java_CHECKCAST): Likewise.
136 (build_java_soft_divmod): Likewise.
137 (build_java_binop): Likewise.
138 (build_field_ref): Likewise.
139 (build_class_init): Likewise.
140 (rewrite_arglist_getcaller): Use build_call_expr.
141 (build_invokeinterface): Use build_call_nary instead of build3.
142 (expand_invoke): Use build_call_list instead of build3.
143 (build_jni_stub): Use build_call_nary, build_call_list, or
144 build_call_expr instead of build3.
145 (expand_java_field_op): Use build_call_expr instead of build3.
146 (force_evaluation_order): Use new CALL_EXPR accessors.
147
148 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
149
150 2007-02-15 David Daney <ddaney@avtrex.com>
151
152 * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
153 (java.maintainer-clean):Add gc-analyze.1.
154 (.INTERMEDIATE): Add gc-analyze.pod.
155 (gc-analyze.pod): New rule.
156 (java.install-man): Install gc-analyze.1
157 * gcj.texi: Add new section for the gc-analyze program.
158
159 2007-02-07 Andrew Haley <aph@redhat.com>
160
161 * class.c (uncache_this_class_ref): New.
162 * expr.c (build_jni_stub): Initialize the class.
163 (expand_byte_code): Call uncache_this_class_ref after generating
164 code.
165
166 2007-02-06 Tom Tromey <tromey@redhat.com>
167
168 PR java/30714:
169 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
170
171 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
172
173 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
174
175 2007-02-02 Andrew Haley <aph@redhat.com>
176
177 * expr.c (expand_byte_code): Call cache_this_class_ref() and
178 cache_cpool_data_ref().
179 Set TYPE_CPOOL_DATA_REF.
180 (cache_cpool_data_ref): New function.
181 * constants.c (build_ref_from_constant_pool): Remove special-case
182 code for flag_indirect_classes.
183 (build_constant_data_ref): Move special-case code for
184 flag_indirect_classes here from build_ref_from_constant_pool.
185 * decl.c (finish_method): Move class initialization from here to
186 cache_this_class_ref.
187 * class.c (cache_this_class_ref): New function.
188 (build_class_ref): Use this_classdollar for the ouput class.
189
190 2007-02-02 David Daney <ddaney@avtrex.com>
191
192 * class.c (is_compiled_class): Move check to avoid reloading
193 current class.
194 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
195 already set.
196
197 2007-02-01 Andrew Haley <aph@redhat.com>
198
199 PR java/30641
200 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
201
202 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
203
204 * class.c, jcf-parse.c: Fix comment typos.
205
206 2007-01-30 Tom Tromey <tromey@redhat.com>
207
208 * gcj.texi (Strings): Fix documentation for JvNewString.
209
210 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
211
212 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
213 typos.
214
215 2007-01-30 Ben Elliston <bje@au.ibm.com>
216
217 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
218
219 2007-01-29 Tom Tromey <tromey@redhat.com>
220
221 PR java/30607:
222 * jvspec.c (lang_specific_driver): Handle separate -I argument.
223 * lang.opt (-I): Add 'Separate'.
224
225 2007-01-29 Andrew Haley <aph@redhat.com>
226
227 * class.c (add_method_1): Mark fndecl as external unless we are
228 compiling it into this object file.
229
230 2007-01-24 Andrew Haley <aph@redhat.com>
231
232 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
233 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
234
235 2007-01-22 Andrew Haley <aph@redhat.com>
236
237 * builtins.c (VMSupportsCS8_builtin): New function.
238
239 2007-01-23 Andrew Pinski <pinskia@gmail.com>
240
241 PR java/30454
242 * jcf-io.c (opendir_in_zip): Close the file
243 and free zipf before returning after an error.
244
245 2007-01-16 Tom Tromey <tromey@redhat.com>
246
247 * java-tree.def: Added copyright header.
248
249 2007-01-15 Tom Tromey <tromey@redhat.com>
250
251 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
252 case.
253 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
254 Removed case.
255 * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
256 (EXPR_WFL_NODE): Likewise.
257 (EXPR_WFL_LINECOL): Likewise.
258 (EXPR_WFL_FILENAME): Likewise.
259 (EXPR_WFL_LINENO): Likewise.
260 (build_expr_wfl, expr_add_location): Don't declare.
261 (build_unknown_wfl): Removed.
262 (EXPR_WFL_FILENAME_NODE): Removed.
263 (EXPR_WFL_COLNO): Removed.
264 (EXPR_WFL_SET_LINECOL): Removed.
265 (DECL_FUNCTION_WFL): Removed.
266 (DECL_FIELD_FINAL_WFL): Removed.
267 (struct lang_decl_func) <wfl>: Removed field.
268 <called_constructor>: Likewise.
269 <inner_access>: Likewise.
270 (struct lang_decl_var) <wfl>: Removed field.
271 (DECL_CONSTRUCTOR_CALLS): Removed.
272 (DECL_FUNCTION_ACCESS_DECL): Likewise.
273 (DECL_FUNCTION_INNER_ACCESS): Likewise.
274 (DECL_SPECIFIC_COUNT): Likewise.
275 * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
276 * expr.c (build_expr_wfl): Removed.
277 (expr_add_location): Likewise.
278
279 2007-01-12 Tom Tromey <tromey@redhat.com>
280
281 * jcf-dump.c (main): Updated call to find_class.
282 * lang.c (java_init): Removed dead code.
283 * jcf-parse.c (read_class): Don't use java_source field. Removed
284 dead code.
285 (parse_zip_file_entries): Don't use java_source field.
286 (process_zip_dir): Likewise.
287 (jcf_parse): Removed dead code.
288 (java_parse_file): Likewise.
289 (read_class): Updated call to find_class.
290 * jcf-io.c (find_class): Don't use java_source field. Removed
291 'source_ok' argument, .java logic.
292 * jcf.h (JCF) <java_source>: Removed field.
293 (JCF_ZERO): Updated. (find_class): Updated.
294 * decl.c: Removed dead code.
295 * class.c: Removed dead code.
296
297 2007-01-11 Tom Tromey <tromey@redhat.com>
298
299 * typeck.c (convert): Don't use flag_emit_class_files.
300 * lang.c (java_post_options): Don't use flag_emit_class_files.
301 (java_handle_option): Don't use flag_extraneous_semicolon or
302 flag_redundant.
303 * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
304 flag_emit_class_files.
305 (load_class): Likewise.
306 * java-tree.h (flag_emit_class_files): Don't declare.
307 (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
308 (flag_extraneous_semicolon): Don't declare.
309 (flag_not_overriding): Likewise.
310 (flag_static_local_jdk1_1): Likewise.
311 (flag_redundant): Likewise.
312 * expr.c (build_newarray): Don't use flag_emit_class_files.
313 * class.c (DEFAULT_ENABLE_ASSERT): Don't use
314 flag_emit_class_files.
315 (build_class_ref): Likewise.
316 * builtins.c (check_for_builtin): Don't use
317 flag_emit_class_files.
318
319 2007-01-10 Tom Tromey <tromey@redhat.com>
320
321 * lang.c (java_can_use_bit_fields_p): Removed.
322 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
323
324 2007-01-09 Andrew Haley <aph@redhat.com>
325
326 * expr.c (build_java_arrayaccess): Rewrite to generate array
327 access in canonical form.
328 (expand_java_arraystore): Use build_fold_addr_expr() on address of
329 array access.
330
331 2007-01-03 Andrew Haley <aph@redhat.com>
332
333 PR java/28754
334 * expr.c (expand_java_field_op): If we're initializing a field's
335 declaring interface we should not also initialize the class
336 context in which it was referenced.
337
338 2007-01-02 Tom Tromey <tromey@redhat.com>
339
340 * java-tree.h (compiling_from_source, current_encoding,
341 JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
342 JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
343 JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
344 JTI_WFL_OPERATOR): Removed
345 (finit_identifier_node, instinit_identifier_node,
346 length_identifier_node, super_identifier_node,
347 continue_identifier_node, access0_identifier_node, wfl_operator):
348 Removed.
349 (cyclic_inheritance_report,
350 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
351 DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
352 DECL_FIXED_CONSTRUCTOR_P): Removed.
353 (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
354 Removed.
355 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
356 TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
357 (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
358 import_list, import_demand_list>: Removed.
359 (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
360 cxx_keyword_p): Removed.
361 (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
362 TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
363 CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
364 IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
365 IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
366 PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
367 CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
368 LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
369 RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
370 IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
371 NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
372 PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
373 CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
374 CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
375 FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
376 BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
377 java_parse_abort_on_error, extract_field_decl): Removed.
378 (finput): Declare.
379 * lang.c: (compiling_from_source, current_encoding): Removed.
380 (java_handle_option): Ignore -fencoding.
381 * parse.h: Don't include lex.h.
382 (java_error_count, int_fits_type_p, stabilize_reference, RULE,
383 RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
384 YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
385 INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
386 INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
387 MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
388 ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
389 CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
390 OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
391 BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
392 JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
393 JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
394 IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
395 MANGLE_OUTER_LOCAL_VARIABLE_NAME,
396 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
397 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
398 SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
399 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
400 AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
401 AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
402 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
403 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
404 LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
405 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
406 LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
407 PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
408 IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
409 ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
410 INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
411 INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
412 JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
413 JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
414 JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
415 jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
416 JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
417 STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
418 BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
419 EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
420 GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
421 COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
422 BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
423 PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
424 CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
425 CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
426 GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
427 GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
428 GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
429 PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
430 CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
431 CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
432 CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
433 SET_CPC_STATIC_INITIALIZER_STMT,
434 SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
435 java_complete_class, java_check_circular_reference,
436 java_fix_constructors, java_layout_classes, java_reorder_fields,
437 java_method_add_stmt, java_get_line_col, reset_report,
438 java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
439 java_finish_classes, ctxp, ctxp_for_generation,
440 ctxp_for_generation_last): Removed.
441 * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
442 * mangle.c (utf8_cmp): New function.
443 (cxx_keywords): New global.
444 (cxx_keyword_p): New function.
445 * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
446 * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
447 NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
448 CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
449 THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
450 CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
451 * Make-lang.in (java.srcextra): Do nothing.
452 (parse.c, keyword.h, gt-java-parse.h): Removed targets.
453 (JAVA_OBJS): Don't mention deleted files.
454 (java.mostlyclean): Likewise.
455 (java.clean): Likewise.
456 (JAVA_LEX_C): Removed.
457 (buffer.o, check-init.o, parse.o): Remove unused targets.
458 (typeck.o): Updated.
459 * jcf-parse.c (read_class): Comment out unused code.
460 (java_layout_seen_class_methods): New function.
461 (parse_source_file_1, parse_source_file_2, parse_source_file_3):
462 Removed.
463 (java_parse_file): Comment out unused code. Don't use 'ctxp'.
464 (init_jcf_parse): Removed.
465 * config-lang.in (gtfiles): Remove deleted files.
466 * decl.c (java_init_decl_processing): Don't initialize
467 finit_identifier_node, instinit_identifier_node,
468 length_identifier_node, super_identifier_node,
469 continue_identifier_node, access0_identifier_node. Don't call
470 init_jcf_parse.
471 * class.c (cyclic_inheritance_report): New global.
472 (add_method_1): Don't use
473 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
474 (maybe_layout_super_class): Comment out code.
475 (safe_layout_class): New function.
476 * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
477 DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
478 UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
479 NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
480 INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
481 (java_gimplify_case_expr): Removed.
482 (java_gimplify_default_expr): Likewise.
483 (java_gimplify_new_array_init): Likewise.
484 * parse.y: Removed.
485 * keyword.gperf, keyword.h: Removed.
486 * chartables.h: Removed.
487 * check-init.c: Removed.
488 * buffer.c, buffer.h: Removed.
489 * convert.h: Removed.
490 * gen-table.pl: Removed.
491 * lex.c, lex.h: Removed.
492
493 2007-01-02 Andrew Haley <aph@redhat.com>
494
495 * expr.c (expand_java_arraystore): Make sure we perform a bounds
496 check at runtime before we perform a type check.
497
498 2006-12-19 Andrew Haley <aph@redhat.com>
499
500 * decl.c: Bump minor BC ABI version.
501
502 2006-12-13 Gary Benson <gbenson@redhat.com>
503
504 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
505
506 2006-12-12 Tom Tromey <tromey@redhat.com>
507
508 * lang-specs.h: Pass -M options to jc1.
509 * jcf-depend.c (jcf_dependency_add_file): Don't emit
510 dependencies.
511
512 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
513
514 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
515
516 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
517
518 * lang-specs.h: Pass '%U'-based options as separate arguments.
519
520 2006-12-05 Tom Tromey <tromey@redhat.com>
521
522 PR java/29495:
523 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
524 classes as well.
525 * class.c (add_field): Handle ACC_SYNTHETIC.
526 (add_method_1): Likewise. Handle bridge and varargs.
527 (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
528 annotation.
529 (set_class_decl_access_flags): Handle synthetic and annotation.
530 * java-tree.h (METHOD_BRIDGE): New macro.
531 (METHOD_VARARGS): Likewise.
532 (TYPE_SYNTHETIC): Likewise.
533 (TYPE_ANNOTATION): Likewise.
534 (lang_type): New fields 'synthetic' and 'annotation'.
535 (lang_decl_func): New fields 'varargs' and 'bridge'.
536
537 2006-12-04 Andrew Haley <aph@redhat.com>
538
539 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
540 there's no map.
541
542 2006-11-29 Gary Benson <gbenson@redhat.com>
543
544 * expr.c (rewrite_arglist_getcaller): Reorder.
545
546 2006-11-29 Andrew Haley <aph@redhat.com>
547
548 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
549 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
550
551 2006-11-23 Andrew Haley <aph@redhat.com>
552
553 * expr.c (rewrite_arglist_getcaller): New.
554 (rewrite_arglist_getclass): Fix indentation.
555 (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and
556 gnu.classpath.VMStackWalker.getCallingClassLoader().
557 * builtins.c (initialize_builtins): Remove duplicate def'n of
558 __sync_synchronize.
559 Add __builtin_return_address.
560
561 2006-11-22 Andrew Haley <aph@redhat.com>
562
563 * jcf-reader.c (get_attribute): Mark attr_type unused.
564
565 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
566
567 2007-01-08 Richard Guenther <rguenther@suse.de>
568
569 * lex.c (do_java_lex): Use build_int_cst_wide_type.
570 * jcf-parse.c (get_constant): Likewise.
571
572 2006-11-12 Jan Hubicka <jh@suse.cz>
573
574 * resource.c (compile_resource_data): Update for new varpool names.
575 * java/class.c (build_utf8_ref): Likewise.
576
577 2006-11-12 David Daney <ddaney@avtrex.com>
578
579 PR java/29805
580 * typeck.c (build_java_array_type): Increase buffer sizes.
581
582 2006-11-11 Richard Guenther <rguenther@suse.de>
583
584 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
585 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
586
587 2006-11-06 Andrew Haley <aph@redhat.com>
588
589 * java-tree.h (CONSTANT_LazyFlag): New.
590 * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
591 * jcf-parse.c (handle_innerclass_attribute): Write attribute to
592 reflection_data.
593 (handle_constant): Return 0 for dummy cpool entries.
594 Handle constants of kind Class.
595 Handle constants of kind NameAndType.
596 (handle_enclosingmethod_attribute): New.
597 (handle_signature_attribute): New.
598 (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
599 (HANDLE_SIGNATURE_ATTRIBUTE): New.
600 (handle_constant): Use unmangle_classname()rather than calling
601 identifier_subst() directly.
602
603 2006-11-02 Andrew Haley <aph@redhat.com>
604
605 * java-tree.h (FIELD_ENUM): New.
606 (lang_decl_var.field_enum): New.
607 (lang_type.enum_class): New.
608 (CLASS_ENUM): New.
609 * class.c (set_class_decl_access_flags): Handle enum types.
610 (add_field): Handle enum fields.
611 (get_access_flags_from_decl): Likewise.
612
613 * class.c (make_class_data): Put reflection_data into rodata.
614
615 2006-11-01 Andrew Haley <aph@redhat.com>
616
617 * jcf-parse.c (field_offsets, bit_obstack): New variables.
618 (jcf_parse): Write end marker to annotation_data.
619 (java_parse_file): Create field_offsets bitmap. Destroy it.
620 (annotation_grow, annotation_rewrite_byte)
621 (annotation_rewrite_short, annotation_rewrite_int)
622 (annotation_read_short, annotation_write_byte)
623 (annotation_write_short, annotation_write_int)
624 (handle_long_constant, handle_constant, handle_element_value)
625 (handle_annotation, handle_annotations)
626 (handle_annotation_attribute, rewrite_reflection_indexes)
627 (handle_member_annotations, handle_parameter_annotations)
628 (handle_default_annotation): New functions.
629 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE)
630 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE)
631 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
632 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE)
633 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
634 * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New.
635 (TYPE_REFLECTION_DATA): New.
636 (TYPE_REFLECTION_DATASIZE): New.
637 * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
638 an enum.
639 * jcf-reader.c (get_attribute): Pass field/method index and
640 attribute type to get_attribute().
641 * constants.c (find_class_or_string_constant): Make nonstatic.
642 (cpool_for_class): Likewise.
643 (build_constants_constructor): Separate string and scalar types.
644 * class.c (make_class_data): Generate field_indexes permutation.
645 Pass it to rewrite_reflection_indexes().
646 (make_class_data): Generate constructor for reflection_data field.
647
648 2006-10-20 Tom Tromey <tromey@redhat.com>
649
650 * gcj.texi (Top): Don't mention jv-scan.
651 (Invoking gcj): Likewise.
652 (Invoking gcjh): Likewise.
653 (Invoking gjnih): Likewise.
654 (Invoking gij): Likewise.
655 (Invoking gcj-dbtool): Likewise.
656 (Invoking jv-scan): Removed.
657 * parse-scan.y: Removed.
658 * jv-scan.c: Removed.
659 * config-lang.in (stagestuff): Don't mention jv-scan.
660 * Make-lang.in (java): Removed jv-scan.
661 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
662 (JVSCAN_OBJS): Removed.
663 (jv-scan$(exeext)): Likewise.
664 (JAVA_MANFILES): Removed jv-scan.1.
665 (java.uninstall): Don't mention jv-scan.
666 (java.mostlyclean): Likewise.
667 (java.maintainer-clean): Likewise.
668 (.INTERMEDIATE): Likewise.
669 (java/jv-scan.o): Removed.
670 (jv-scan.pod): Likewise.
671 (java.srcextra): Don't mention parse-scan.c.
672 (java.mostlyclean): Likewise.
673 (java/parse-scan.c): Removed.
674 (java/parse-scan.o-warn): Removed.
675 (java/parse-scan.o): Removed.
676
677 2006-10-20 Tom Tromey <tromey@redhat.com>
678
679 * lang.c (java_handle_option): Don't use
680 jcf_write_base_directory.
681 * jcf.h (jcf_write_base_directory): Removed.
682 * parse.y (java_expand_classes): Don't call write_classfile.
683 * config-lang.in (gtfiles): Removed jcf-write.c.
684 * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
685 (java/jcf-write.o): Removed.
686 * jcf-parse.c (parse_class_file): Don't call write_classfile.
687 * java-tree.h (write_classfile): Removed declaration.
688 * jcf-write.c: Removed.
689
690 2006-10-20 Tom Tromey <tromey@redhat.com>
691
692 * Make-lang.in (java): Removed gjnih, gcjh.
693 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
694 (GCJH_OBJS): Removed.
695 (GJNIH_OBJS): Likewise.
696 (gjnih$(exeext)): Likewise.
697 (gcjh$(exeext)): Likewise.
698 (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
699 (java.install-common): Don't special case gcjh.
700 (java.uninstall): Don't mention gcjh, gjnih.
701 (java.mostlyclean): Likewise.
702 (java.maintainer-clean): Likewise.
703 (.INTERMEDIATE): Likewise.
704 (gcjh.pod): Removed.
705 (gjnih.pod): Likewise.
706 (GCJH_TARGET_INSTALL_NAME): Removed.
707 (java/gjavah-jni.o): Removed.
708 (java/gjavah.o): Likewise.
709 * config-lang.in (stagestuff): Removed gjnih, gcjh.
710 * gjavah.c: Removed.
711
712 2006-10-17 Tom Tromey <tromey@redhat.com>
713
714 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
715 "string" case.
716
717 2006-10-17 Tom Tromey <tromey@redhat.com>
718
719 * jvgenmain.c (main): Handle -findirect-dispatch.
720 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
721 jvgenmain.
722
723 2006-10-06 Andrew Haley <aph@redhat.com>
724
725 * builtins.c (compareAndSwapInt_builtin): Check that we really do
726 have a compare_and_swap builtin.
727 (compareAndSwapLong_builtin): Likewise.
728 (compareAndSwapObject_builtin): Likewise.
729
730 2006-10-04 Andrew Haley <aph@redhat.com>
731
732 * builtins.c (java_builtins): Add compareAndSwapInt,
733 compareAndSwapLong, compareAndSwapObject, putOrderedInt,
734 putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
735 putObjectVolatile, getObjectVolatile, getIntVolatile,
736 getLongVolatile, getLong.
737 (UNMARSHAL3): New macro.
738 (UNMARSHAL4): Likewise.
739 (UNMARSHAL5): Likewise.
740 (build_arglist_for_builtin): New function.
741 (build_addr_sum, build_check_this): New functions.
742 (putObject_builtin. compareAndSwapInt_builtin,
743 compareAndSwapLong_builtin, compareAndSwapObject_builtin,
744 putVolatile_builtin, getVolatile_builtin): New builtins.
745
746 2006-06-08 Andrew Haley <aph@redhat.com>
747
748 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
749 get_symbol_table_index().
750 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
751 private method.
752 (build_known_method_ref): New arg: special. Pass it to
753 get_symbol_table_index.
754 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
755 the method list.
756 (build_invokevirtual): New arg: special. Pass it to
757 get_symbol_table_index.
758 (expand_invoke): New variable: special.
759 Pass it to maybe_rewrite_invocation().
760 Pass it to build_known_method_ref().
761 * class.c (build_symbol_entry): Add new arg: special. Use it to
762 build the symbol table conbstructor.
763 (emit_symbol_table): Extract SPECIAL from the method list and pass
764 it to build_symbol_entry().
765 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
766 special accordingly.
767
768 2006-09-08 Andrew Haley <aph@redhat.com>
769
770 * class.c (layout_class_method): Use build_java_signature, not
771 build_java_argument_signature. Use lookup_java_method, not
772 lookup_argument_method.
773
774 2006-08-16 Jakub Jelinek <jakub@redhat.com>
775 Bryce McKinlay <bryce@mckinlay.net.nz>
776
777 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
778
779 2006-07-18 Tom Tromey <tromey@redhat.com>
780
781 * lang.opt: Added missing -W options.
782
783 2006-07-12 Tom Tromey <tromey@redhat.com>
784
785 PR java/28329:
786 * lang-specs.h: Pass '%U'-based options as separate arguments.
787 Use -faux-classpath.
788 * lang.c (java_handle_option): Handle OPT_faux_classpath.
789 * lang.opt (faux-classpath): New option.
790
791 2006-07-07 Tom Tromey <tromey@redhat.com>
792
793 * class.c (make_class_data): Set value for reflection_data field.
794 * decl.c (java_init_decl_processing): Add reflection_data field.
795
796 2006-07-07 Tom Tromey <tromey@redhat.com>
797
798 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
799 earlier.
800 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
801
802 2006-07-07 Andrew Haley <aph@redhat.com>
803
804 * jcf-parse.c (set_source_filename): Don't check for
805 CLASS_FROM_CURRENTLY_COMPILED_P.
806 Remove // comments.
807
808 2006-07-07 Andrew Haley <aph@redhat.com>
809
810 * java-tree.h (java_read_sourcefilenames): Declare.
811 * lang.c (java_handle_option): Call java_read_sourcefilenames().
812 * lang.opt (fsource-filename): New opt.
813 * lang-specs.h: Add -fsource-filename.
814 * jcf-parse.c (num_files, filenames): New variables.
815 (reverse, cmpstringp, java_read_sourcefilenames,
816 find_sourcefile): New.
817 (set_source_filename): Call find_sourcefile to find the real name
818 of a source file.
819
820 2006-06-27 Tom Tromey <tromey@redhat.com>
821
822 * jcf-reader.c (get_attribute): Handle EnclosingMethod,
823 Signature, LocalVariableTypeTable, annotation attributes.
824 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
825 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
826 (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
827 (HANDLE_METHOD): Likewise.
828 (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
829 (print_annotation): New function.
830 (print_element_value): Likewise.
831 (indent): Likewise.
832 (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
833 (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
834 (print_parameter_annotations): New function.
835 (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
836 (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
837 Likewise.
838 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
839 (print_annotations): New function.
840
841 2006-06-23 Tom Tromey <tromey@redhat.com>
842
843 * lang-specs.h: Default -fsource and -ftarget to 1.5. If
844 emitting class files, always use 1.5.
845 * gcj.texi (Input Options): Document -fsource.
846 (Code Generation): Document -ftarget.
847
848 2006-06-21 Tom Tromey <tromey@redhat.com>
849
850 PR java/28089:
851 * expr.c (expand_java_field_op): Initialize field's declaring
852 class.
853
854 2006-06-20 Tom Tromey <tromey@redhat.com>
855
856 * expr.c (push_value): Always flush quick stack.
857
858 2006-06-19 Tom Tromey <tromey@redhat.com>
859
860 * expr.c (push_value): Also flush quick stack if value is a
861 component_ref.
862
863 2006-06-19 Tom Tromey <tromey@redhat.com>
864
865 * expr.c (push_value): Flush quick stack if value has side
866 effects.
867
868 2006-06-13 Tom Tromey <tromey@redhat.com>
869
870 * class.c (is_compiled_class): Explicitly check for current
871 class.
872
873 2006-06-09 Tom Tromey <tromey@redhat.com>
874
875 * gjavah.c (decompile_method): Don't decompile a static field
876 accessor method.
877
878 2006-06-06 Tom Tromey <tromey@redhat.com>
879
880 * lang-specs.h <jc1>: Add .jar file to command line if
881 -fsaw-java-file. Also, remove -ffilelist-file in this case.
882
883 2006-06-05 Tom Tromey <tromey@redhat.com>
884
885 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
886 synthetic, enum, annotation.
887 * jcf.h (ACC_BRIDGE): New macro.
888 (ACC_VARARGS): Likewise.
889 (ACC_SYNTHETIC): Likewise.
890 (ACC_ENUM): Likewise.
891 (ACC_ANNOTATION): Likewise.
892
893 2006-06-04 Tom Tromey <tromey@redhat.com>
894
895 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
896 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
897 and -ftarget.
898 (lang_specific_driver): Removed dead code. Add -fsaw-java-file
899 when needed. Handle classpath-setting.
900 * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
901 * lang-specs.h: Rewrote.
902
903 2006-06-04 Tom Tromey <tromey@redhat.com>
904
905 * jcf-io.c (find_class): Set source_ok to 0.
906 * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
907 (parse_class_file): Don't call java_mark_class_local.
908 (java_parse_file): Skip .java files. Call java_mark_class_local
909 before lowering any code.
910 (parse_zip_file_entries): Don't call duplicate_class_warning
911 here.
912 (process_zip_dir): ... call it here.
913 * class.c (add_field): Don't mark field external if it is being
914 compiled into this object.
915 (make_class_data): Handle situation where class_dtable_decl is
916 created before Class is compiled.
917 (is_compiled_class): Don't assume files in zip are compiled into
918 this object.
919 (layout_class_method): Don't mark method external if it is being
920 compiled into this object.
921
922 2006-06-04 Tom Tromey <tromey@redhat.com>
923
924 * jcf-path.c (jcf_path_compute): New function.
925 * jcf.h (jcf_path_compute): Declare.
926
927 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
928
929 * decl.c: Include langhooks.h.
930 (builtin_function): Remove.
931 (java_init_decl_processing): Replace calls to builtin_function
932 with add_builtin_function.
933 * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
934 (java/decl.o): Depend on langhooks.h.
935 * java-tree.h (builtin_function): Remove.
936
937 2006-10-10 Brooks Moses <bmoses@stanford.edu>
938
939 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
940
941 2006-09-12 Tom Tromey <tromey@redhat.com>
942
943 * expr.c (push_value): Always flush quick stack.
944
945 2006-09-12 Tom Tromey <tromey@redhat.com>
946
947 PR java/29013:
948 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
949 the push of the called method's return result.
950
951 2006-09-12 Tom Tromey <tromey@redhat.com>
952
953 * jvspec.c (lang_specific_driver): Read spec file even if
954 -fsyntax-only.
955
956 2006-09-12 Tom Tromey <tromey@redhat.com>
957
958 PR java/28754:
959 * expr.c (expand_java_field_op): Initialize field's declaring
960 interface if necessary.
961
962 2006-09-12 Tom Tromey <tromey@redhat.com>
963
964 PR java/28892:
965 * expr.c (expand_java_field_op): No error for assignments not in
966 class initializer or constructor.
967
968 2006-08-22 Andrew Haley <aph@redhat.com>
969
970 * decl.c (java_add_stmt): Give the statement list a type.
971
972 2006-08-16 Jakub Jelinek <jakub@redhat.com>
973 Bryce McKinlay <bryce@mckinlay.net.nz>
974
975 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
976
977 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
978
979 PR java/8923
980 * parse.y (build_incdec): Emit an error instead of an ICE if '++'
981 or '--' is used with a constant operand.
982 (java_complete_lhs): When processing a '++' or '--' expression,
983 don't call java_complete_tree but java_complete_lhs, so that a
984 static final variable operand is never replaced by its value. This
985 avoids an ICE later on.
986 (patch_unaryop): Fixed typo in comment.
987
988 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
989
990 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
991
992 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
993
994 * builtins.c (check_for_builtin): If a builtin could result in a
995 direct call being generated, don't use it if flag_indirect_dispatch
996 is set.
997
998 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
999
1000 * gcj.texi (Invocation): Corrections for Invocation API example.
1001
1002 2006-07-04 Andrew Haley <aph@redhat.com>
1003
1004 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1005 entry.
1006
1007 2006-06-21 Andrew Haley <aph@redhat.com>
1008
1009 * java-tree.h (update_aliases): Remove
1010 * expr.c (expand_iinc): Remove call to update_aliases().
1011 (STORE_INTERNAL): Likewise.
1012 * decl.c (update_aliases, initialize_local_variable)
1013 (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1014
1015 2006-06-19 Andrew Haley <aph@redhat.com>
1016
1017 PR java/1305
1018 PR java/27908
1019 * expr.c (java_modify_addr_for_volatile): New function.
1020 (expand_java_field_op): Handle volatile fields.
1021 * java-gimplify.c (java_gimplify_component_ref): Call
1022 java_modify_addr_for_volatile to give the field_ref the correct
1023 volatile type.
1024 (java_gimplify_modify_expr): Likewise.
1025 * java-tree.h (java_modify_addr_for_volatile): New decl.
1026
1027 2006-06-17 Karl Berry <karl@gnu.org>
1028
1029 * gcj.texi (@dircategory): Use "Software development" instead
1030 of "Programming", following the Free Software Directory.
1031
1032 2006-06-16 Andrew Haley <aph@redhat.com>
1033
1034 * class.c (make_class_data): When using flag_indirect_classes,
1035 don't initialize the vtable of Class instances.
1036
1037 2006-06-09 Andrew Haley <aph@redhat.com>
1038
1039 PR java/1305
1040 PR java/27908
1041 * builtins.c (initialize_builtins): Add __sync_synchronize().
1042 * class.c (add_field): Mark volatile fields.
1043 * java-gimplify.c (java_gimplify_expr): Call new functions to
1044 handle self-modifying exprs and COMPONENT_REFs.
1045 (java_gimplify_component_ref): New.
1046 (java_gimplify_modify_expr): Add handling for volatiles.
1047
1048 2006-06-08 Tom Tromey <tromey@redhat.com>
1049
1050 * gcj.texi (libgcj Runtime Properties): Document
1051 gnu.gcj.user.realname.
1052
1053 2006-06-08 Andrew Haley <aph@redhat.com>
1054
1055 * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1056 get_symbol_table_index().
1057 (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1058 private method.
1059 (build_known_method_ref): New arg: special. Pass it to
1060 get_symbol_table_index.
1061 (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1062 the method list.
1063 (build_invokevirtual): New arg: special. Pass it to
1064 get_symbol_table_index.
1065 (expand_invoke): New variable: special.
1066 Pass it to maybe_rewrite_invocation().
1067 Pass it to build_known_method_ref().
1068 * class.c (build_symbol_entry): Add new arg: special. Use it to
1069 build the symbol table conbstructor.
1070 (emit_symbol_table): Extract SPECIAL from the method list and pass
1071 it to build_symbol_entry().
1072 * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1073 special accordingly.
1074
1075 2006-06-06 David Daney <ddaney@avtrex.com>
1076
1077 * gcj.texi (libgcj Runtime Properties): Document
1078 gnu.gcj.runtime.NameFinder.show_raw and
1079 gnu.gcj.runtime.NameFinder.remove_unknown.
1080
1081 2006-06-06 Tom Tromey <tromey@redhat.com>
1082
1083 * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1084 synthetic, enum, annotation.
1085 * jcf.h (ACC_BRIDGE): New macro.
1086 (ACC_VARARGS): Likewise.
1087 (ACC_SYNTHETIC): Likewise.
1088 (ACC_ENUM): Likewise.
1089 (ACC_ANNOTATION): Likewise.
1090
1091 2006-06-06 Mike Stump <mrs@apple.com>
1092
1093 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1094 installing during build.
1095
1096 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
1097
1098 * gcj.texi (Extensions): Document the new gcj-dbtool-based
1099 classname-to-library resolution mechanism.
1100 Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1101 mechanism deprecated.
1102 (libgcj Runtime Properties): Document
1103 gnu.gcj.runtime.VMClassLoader.library_control's new default.
1104
1105 2006-05-29 Jakub Jelinek <jakub@redhat.com>
1106
1107 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1108 bit wide type.
1109 (jword): Define to uint64 on 64-bit arches.
1110 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1111
1112 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1113
1114 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1115 typos.
1116
1117 2006-05-26 Tom Tromey <tromey@redhat.com>
1118
1119 * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1120 * verify-glue.c (vfy_class_type): New function.
1121 * verify-impl.c (check_constant): Allow 'ldc class'.
1122 * verify.h (vfy_class_type): Declare.
1123
1124 2006-05-25 Andrew Haley <aph@redhat.com>
1125
1126 PR java/27756
1127 * decl.c (maybe_pushlevels): When variable ranges are non-nested
1128 update all lifetimes, not just the first one.
1129
1130 2006-05-24 Tom Tromey <tromey@redhat.com>
1131
1132 * java-tree.h: Fixed flag documentation.
1133
1134 2006-05-24 Tom Tromey <tromey@redhat.com>
1135
1136 PR libgcj/27729:
1137 * jcf.h (ACC_INVISIBLE): Changed value.
1138
1139 2006-05-24 Andrew Haley <aph@redhat.com>
1140
1141 PR java/27754
1142 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1143 COMPOUND_EXPR.
1144
1145 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 * lang.opt (femit-class-file): Remove VarExists.
1148
1149 2006-05-16 Tom Tromey <tromey@redhat.com>
1150
1151 * verify-impl.c (verify_instructions_0) <op_return>: Special case
1152 for Object.<init>.
1153
1154 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1155
1156 PR driver/26885
1157 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1158 $(GCC_OBJS).
1159
1160 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1161
1162 * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1163 (java/expr.o): Replace target.h with $(TARGET_H).
1164 (java/parse.o): Likewise.
1165
1166 2006-05-10 Andrew Haley <aph@redhat.com>
1167
1168 * class.c (emit_indirect_register_classes): Fix comment.
1169
1170 2006-05-04 Tom Tromey <tromey@redhat.com>
1171
1172 * java-tree.h (uses_jv_markobj_p): Declare.
1173 * class.c (uses_jv_markobj_p): Removed.
1174 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1175 (get_boehm_type_descriptor): Use it.
1176 (uses_jv_markobj_p): Moved from class.c. Return bool.
1177
1178 2006-05-04 Tom Tromey <tromey@redhat.com>
1179
1180 * java-tree.def (THIS_EXPR): Now a tcc_expression.
1181
1182 2006-05-04 Andrew Haley <aph@redhat.com>
1183
1184 * class.c (make_field_value): Always build_address_of fdecl if
1185 there is an initializer.
1186
1187 2006-05-03 Andrew Haley <aph@redhat.com>
1188
1189 PR libgcj/27352
1190 * expr.c (maybe_rewrite_invocation): New function.
1191 (rewrite_arglist_getclass): Likewise.
1192 (rules): New.
1193 (expand_invoke): Call maybe_rewrite_invocation.
1194 * parse.y (patch_invoke): Likewise.
1195 * java-tree.h: (maybe_rewrite_invocation): New function.
1196
1197 2006-04-21 Andrew Haley <aph@redhat.com>
1198
1199 * lang.c (java_init): Handle flag_indirect_classes.
1200 * jvgenmain.c: Use "class$$" instead of "class$".
1201 * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1202 DECLs.
1203 (mangle_class_field): Special case "class$$" as well as "class$".
1204 * constants.c (build_ref_from_constant_pool): If
1205 flag_indirect_classes, generate a ref into the heap.
1206 * decl.c (constants_field_decl_node,
1207 constants_data_field_decl_node): New.
1208 * class.c (build_static_class_ref): New.
1209 (build_classdollar_field): Factor out from build_class_ref().
1210 (make_field_value): Handle static fields in heap.
1211 (make_class_data): Make sure we get a static ref to class.
1212 Make class initializer const if flag_indirect_classes.
1213 (register_class): Build a class_ref for initialization if
1214 flag_indirect_classes.
1215 (emit_indirect_register_classes): New.
1216
1217 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1218
1219 * expr.c, gjavah.c: Fix comment typos.
1220
1221 2006-04-03 Andrew Haley <aph@redhat.com>
1222
1223 PR java/26858
1224 * expr.c (build_field_ref): Don't check the field offset if
1225 flag_syntax_only.
1226
1227 2006-03-30 Andrew Haley <aph@redhat.com>
1228
1229 PR java/26858
1230 * lang.c (java_attribute_table): New.
1231 (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1232 * expr.c (build_field_ref): Add a null pointer check for all
1233 fields of offset > 4k. Don't do so for accesses via the this
1234 pointer, which we know can never be null.
1235 * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1236 methods nonnull.
1237
1238 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
1239
1240 * Make-lang.in: Rename docdir to gcc_docdir.
1241
1242 2006-03-30 Tom Tromey <tromey@redhat.com>
1243
1244 PR java/26042:
1245 * parse.y (java_reorder_fields): Reset superclass field's size as
1246 well.
1247
1248 2006-03-28 Tom Tromey <tromey@redhat.com>
1249
1250 PR java/26390:
1251 * parse.y (find_most_specific_methods_list): Added 'class'
1252 argument.
1253 (lookup_method_invoke): Updated.
1254
1255 2006-03-15 Tom Tromey <tromey@redhat.com>
1256
1257 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1258 non-static method calls.
1259
1260 2006-03-15 David Daney <ddaney@avtrex.com>
1261
1262 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1263 declaration.
1264
1265 2006-03-15 David Daney <ddaney@avtrex.com>
1266
1267 * lang.opt (-freduced-reflection): New option.
1268 * lang.c (java_post_options): Generate an error if
1269 -freduced-reflection used with -fjni or -findirect-dispatch.
1270 * java-tree.h (flag_reduced_reflection): Declare new variable.
1271 * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1272 if bitmap overflows and flag_reduced_reflection set.
1273 * class.c (uses_jv_markobj_p): New function.
1274 (make_class_data): Moved generation of vtable to before
1275 reflection data, generate less reflection data if
1276 flag_reduced_reflection set.
1277 * gcj.texi: Document -freduced-reflection.
1278
1279 2006-03-15 Tom Tromey <tromey@redhat.com>
1280
1281 PR java/26638:
1282 * class.c (get_interface_method_index): Don't put <clinit> into
1283 interface table.
1284
1285 2006-03-15 Tom Tromey <tromey@redhat.com>
1286
1287 * parse.y (analyze_clinit_body): Ignore empty statements.
1288
1289 2006-03-08 David Daney <ddaney@avtrex.com>
1290
1291 * gcj.texi: Document -static-libgcj option.
1292
1293 2006-02-20 Andrew Haley <aph@redhat.com>
1294
1295 * jcf-parse.c (parse_class_file): Set input_location from
1296 current_class.
1297
1298 2006-02-15 Andrew Haley <aph@redhat.com>
1299
1300 * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1301 (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1302 TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1303
1304 2006-02-09 Andrew Haley <aph@redhat.com>
1305
1306 PR java/26192
1307 * expr.c (expand_invoke): Allow methods in arrays to be resolved
1308 in their superclass.
1309
1310 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1311 array types.
1312
1313 2006-02-08 Tom Tromey <tromey@redhat.com>
1314
1315 PR java/22578:
1316 * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1317 * builtins.c (convert_real): New function.
1318 (java_builtins): Handle Float.intBitsToFloat,
1319 Float.floatToRawIntBits, Double.longBitsToDouble,
1320 Double.doubleToRawLongBits.
1321
1322 2006-02-07 Andrew Haley <aph@redhat.com>
1323
1324 * expr.c (expand_invoke): (BC mode.) If we find a method in a
1325 class other than the one in which we expected to find it, ignore
1326 the result.
1327
1328 PR java/25535
1329 * constants.c (build_constants_constructor): move initializer into
1330 first halfword on a 64-bit big-endian machine.
1331
1332 2006-02-04 Tom Tromey <tromey@redhat.com>
1333
1334 PR java/25676:
1335 * builtins.c (max_builtin): Skip floating point 'max'.
1336 (min_builtin): Skip floating point 'min'.
1337 (check_for_builtin): Never return NULL_TREE.
1338
1339 2006-02-04 Tom Tromey <tromey@redhat.com>
1340
1341 PR java/26097:
1342 * expr.c (push_type): Avoid side effect in gcc_assert.
1343
1344 2006-02-04 Roger Sayle <roger@eyesopen.com>
1345
1346 * decl.c (java_init_decl_processing): Create char_type_node as a
1347 regular INTEGER_TYPE node.
1348 (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1349 * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1350 test for char_type_node and promoted_char_type_node as special
1351 instances of INTEGER_TYPE tree codes.
1352 (promote_type,build_java_signature): Likewise.
1353 * jcf-write.c (adjust_typed_op): Likewise.
1354 * mangle.c (mangle_type): Likewise.
1355 * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1356 * parse.h (JINTEGRAL_TYPE_P): Likewise.
1357
1358 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
1359
1360 * expr.c (java_stack_swap): Revert gcc_assert patch.
1361
1362 2006-02-03 Ben Elliston <bje@au.ibm.com>
1363
1364 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1365 * typeck.c: Likewise.
1366 * verify-impl.c: Likewise.
1367 * class.c: Likewise.
1368 * decl.c: Likewise.
1369 * jcf-parse.c: Likewise.
1370 * constants.c: Likewise.
1371 * check-init.c: Likewise.
1372 * jcf-write.c: Likewise.
1373 * verify-glue.c: Likewise.
1374 * mangle.c: Likewise.
1375 * expr.c: Likewise.
1376 * lang.c: Likewise.
1377 * boehm.c: Likewise.
1378
1379 2006-02-01 Jan Hubicka <jh@suse.cz>
1380
1381 * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1382 * lang.c (java_init_options): Set no_unit_at_a_time_default.
1383
1384 2006-01-30 Andrew Haley <aph@redhat.com>
1385
1386 PR java/21428
1387 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1388
1389 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
1390
1391 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1392 Update copyright notice dates.
1393
1394 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1395
1396 * jvspec.c (lang_specific_spec_functions): Remove.
1397
1398 2006-01-06 Tom Tromey <tromey@redhat.com>
1399
1400 * gcj.texi (Arrays): Added more documentation for
1401 JvNewObjectArray.
1402 (Primitive types): Correct information about primitive classes.
1403 (Reference types): New node.
1404 (Index): New node.
1405
1406 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
1407
1408 * jcf-parse.c (set_source_filename): Set the decl source location
1409 even when returning early.
1410
1411 2005-12-15 Tom Tromey <tromey@redhat.com>
1412 Andrew Haley <aph@redhat.com>
1413
1414 PR java/25429
1415 * parse.y (resolve_expression_name): Don't generate accessor
1416 methods for constant fields.
1417
1418 2005-12-13 Andrew Haley <aph@redhat.com>
1419
1420 PR java/25366
1421 PR java/25368
1422 * class.c (maybe_layout_super_class): Update current_class before
1423 calling do_resolve_class.
1424
1425 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
1426
1427 PR java/25330
1428 * jcf-write.c (write_classfile): Use PID in temporary class
1429 file. Save/restore errno when reporting error.
1430
1431 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
1432
1433 PR java/9861
1434 * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1435 to bare_function_type and including the return type
1436 * builtins.c (initialize_builtins) : Change builtin mangled name
1437 constants to conform to new mangling scheme
1438
1439 2005-12-08 Andrew Haley <aph@redhat.com>
1440
1441 PR libgcj/25265
1442 * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1443 (soft_abstractmethod_node): New.
1444 * expr.c (build_field_ref): Add in-line check for missing field.
1445 * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1446
1447 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1448
1449 * Make-lang.in (java.all.build, java.install-normal): Remove.
1450
1451 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1452
1453 * Make-lang.in: Remove all dependencies on s-gtype, except for
1454 gt-java-parse.h.
1455
1456 2005-12-07 Richard Sandiford <richard@codesourcery.com>
1457
1458 * class.c (build_utf8_ref, emit_register_classes): Use
1459 switch_to_section and get_section.
1460
1461 2005-12-06 Tom Tromey <tromey@redhat.com>
1462
1463 PR java/25283:
1464 * parse.y (patch_new_array_init): Revert previous patch.
1465 (lookup_method_invoke): Use size-less array type when creating an
1466 anonymous constructor.
1467
1468 2005-12-05 Tom Tromey <tromey@redhat.com>
1469
1470 * parse.y (patch_new_array_init): Don't set length on array.
1471
1472 2005-12-02 Richard Guenther <rguenther@suse.de>
1473
1474 * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1475 buildN instead of build.
1476 * class.c (finish_class): Likewise.
1477 * expr.c (java_create_object): Likewise.
1478
1479 2005-11-28 Tom Tromey <tromey@redhat.com>
1480
1481 PR java/18278:
1482 * expr.c (build_jni_stub): Unwrap the return value.
1483 * java-tree.h (soft_unwrapjni_node): New define.
1484 (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1485 * decl.c (java_init_decl_processing): Initialize
1486 soft_unwrapjni_node.
1487
1488 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
1489
1490 * gcj.texi (gij options): Add -Xss documentation.
1491
1492 2005-11-08 Wil Mahan <wmahan@gmail.com>
1493
1494 PR java/23617
1495 * zextract.c (read_zip_archive): Fix out of memory error when
1496 reading jar files with zip-style comments.
1497
1498 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
1499
1500 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1501 formats.
1502 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1503
1504 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
1505 Wil Mahan <wmahan@gmail.com>
1506
1507 PR java/23620
1508 * class.c (make_class): Create empty binfo here.
1509 (set_super_info): Only create binfo if we have superclasses.
1510
1511 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
1512
1513 PR java/24127
1514 * parse.y (method_header): Make the result of the rule a NULL_TREE
1515 when a parsing error occurs.
1516
1517 2005-09-29 Tom Tromey <tromey@redhat.com>
1518
1519 PR java/24120:
1520 * jcf-io.c (memoized_dirlist_hash): New function.
1521 (caching_stat): Use it.
1522
1523 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
1524
1525 PR java/21418
1526 * class.c (inherits_from_p): Try to lay out super class
1527 if it is not already laid out.
1528 (maybe_layout_super_class): Handle the case where SUPER_CLASS
1529 is a NULL_TREE.
1530
1531 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
1532
1533 * builtins.c (max_builtin, min_builtin, abs_builtin,
1534 java_build_function_call_expr): Use fold_buildN.
1535 * class.c (layout_class_method): Likewise.
1536 * expr.c (java_truthvalue_conversion, build_java_jsr,
1537 build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1538 build_java_binop, build_field_ref, expand_compare,
1539 build_known_method_ref, build_invokevirtual,
1540 process_jvm_instruction): Likewise.
1541 * parse.y (patch_binop, patch_exit_expr): Likewise.
1542 * typeck.c (convert_ieee_real_to_integer): Likewise.
1543 (convert): Don't call fold after convert_ieee_real_to_integer.
1544
1545 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
1546
1547 PR java/23891
1548 * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1549 the newly created type. Set import lists here, not in create_class.
1550 (jdep_resolve_class): Set current_class.
1551 (do_resolve_class): Use current_class's TYPE_PACKAGE to determine
1552 the current package context, not ctxp->package.
1553 (cicp_cache): Removed.
1554 (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1555 * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1556 * java-tree.h (TYPE_PACKAGE): New macro.
1557 (struct lang_type): New member 'package'.
1558
1559 2005-09-09 Andrew Haley <aph@redhat.com>
1560
1561 PR libgcj/23182
1562 * expr.c (pop_type_0): If the expected type is object or ptr
1563 (i.e. void*), return the type of the object we just popped from
1564 the stack.
1565
1566 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
1567
1568 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1569 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1570
1571 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
1572
1573 * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1574 jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1575 typos. Follow spelling conventions.
1576
1577 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
1578
1579 PR java/23431
1580 * typeck.c (lookup_do): Look up interfaces for the original class,
1581 not the base class.
1582 * parse.y (java_check_regular_methods): Fix diagnostic message for
1583 more restrictive overriding of a method from an interface.
1584
1585 2005-08-16 Tom Tromey <tromey@redhat.com>
1586
1587 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1588 class' initial state.
1589
1590 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
1591
1592 PR java/22113
1593 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1594 `literal_token' for large numeric input tokens.
1595
1596 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
1597
1598 PR java/19870
1599 * parse.y (nested_field_access_p): Rename to nested_member_access_p
1600 and expand to handle method accesses across nested classes.
1601 (build_outer_method_access_method): Rename to
1602 build_nested_method_access_method. Minor adjustments to comments.
1603 (resolve_expression_name): Use the newly-renamed
1604 nested_member_access_p method.
1605 (resolve_qualified_expression_name): Likewise.
1606 (patch_method_invocation): Also consider static methods for access
1607 method generation. Minor adjustments to comments.
1608 (maybe_use_access_method): Use the more general
1609 nested_memeber_access_p to determine access across nested class
1610 boundaries. Allow THIS_ARG to be NULL (for static methods).
1611
1612 2005-08-15 Tom Tromey <tromey@redhat.com>
1613
1614 PR java/23300.
1615 * expr.c (build_field_ref): Don't generate otable reference when
1616 DECL_FIELD_OFFSET is 0.
1617 * class.c (maybe_layout_super_class): Pass outer class to
1618 do_resolve_class.
1619
1620 2005-08-15 Tom Tromey <tromey@redhat.com>
1621
1622 * java-tree.h (LABEL_IN_SUBR): Removed.
1623 (LABEL_IN_SUBR): Likewise.
1624 (LABEL_IS_SUBR_START): Likewise.
1625 (LABEL_SUBR_START): Likewise.
1626 (LABEL_SUBR_CONTEXT): Likewise.
1627 (LABEL_CHANGED): Likewise.
1628 (LABEL_RETURN_LABEL): Likewise.
1629 (LABEL_RETURN_TYPE_STATE): Likewise.
1630 (LABEL_RETURN_LABELS): Likewise.
1631 (RETURN_MAP_ADJUSTED): Likewise.
1632 (LABEL_PENDING_CHAIN): Likewise.
1633
1634 2005-08-15 Tom Tromey <tromey@redhat.com>
1635
1636 * Make-lang.in (JAVA_OBJS): Removed verify.o
1637 (java/verify.o): Removed.
1638 * verify.c: Removed.
1639 * lang.c (flag_new_verifier): Removed.
1640 (java_post_options): Updated.
1641 * java-tree.h (flag_new_verifier): Removed.
1642 (verify_jvm_instructions): Removed.
1643 * expr.c (pop_type_0): Assume flag_new_verifier is true.
1644 (build_java_check_indexed_type): Likewise.
1645 (expand_java_arraystore): Likewise.
1646 (expand_java_arrayload): Likewise.
1647 (pop_arguments): Likewise.
1648 (expand_byte_code): Likewise.
1649 (process_jvm_instruction): Likewise.
1650
1651 2005-08-10 Andrew Haley <aph@redhat.com>
1652
1653 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1654 type mismatches to make legal GIMPLE.
1655
1656 2005-08-10 Robin Green <greenrd@greenrd.org>
1657
1658 PR java/23230:
1659 * parse.y (maybe_use_access_method): Generalize check from
1660 java.lang.Object to any superclass of current_class
1661
1662 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
1663
1664 * class.c (build_class_ref): Wrap the primary class type in a
1665 NOP_EXPR.
1666 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1667 primary class type from the NOP_EXPR in which it was placed.
1668
1669 2005-07-28 Diego Novillo <dnovillo@redhat.com>
1670
1671 * expr.c (expand_load_internal): Fix missing parens in
1672 predicate.
1673
1674 2005-07-28 Andrew Haley <aph@redhat.com>
1675
1676 * expr.c (expand_load_internal): Convert to destination type.
1677
1678 2005-07-22 Manfred Hollstein <mh@suse.com>
1679
1680 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1681 (check_constant): Likewise.
1682 (check_wide_constant): Likewise.
1683
1684 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1685
1686 Make CONSTRUCTOR use VEC to store initializers.
1687 * check-init.c (check_init): Update to cope with VEC in
1688 CONSTRUCTOR_ELTS.
1689 * class.c (make_field_value, make_method_value, get_dispatch_table,
1690 make_class_data, emit_symbol_table, emit_catch_table,
1691 emit_assertion_table): Use build_constructor_from_list instead of
1692 build_constructor.
1693 * constants.c (build_constants_constructor): Likewise.
1694 * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
1695 VEC in CONSTRUCTOR_ELTS.
1696 * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
1697 PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
1698 of a TREE_LIST.
1699 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
1700 CONSTRUCTOR_ELTS.
1701 * parse.y (build_new_array_init): Use build_constructor_from_list
1702 instead of build_constructor.
1703 (patch_new_array_init): Update to cope with VEC in
1704 CONSTRUCTOR_ELTS.
1705 (array_constructor_check_entry): Likewise.
1706
1707 2005-07-12 Tom Tromey <tromey@redhat.com>
1708
1709 * jvspec.c (lang_specific_driver): Put filelist_filename first on
1710 command line.
1711
1712 2005-07-12 Tom Tromey <tromey@redhat.com>
1713
1714 PR java/19674:
1715 * parse-scan.y (interface_member_declaration): Added
1716 empty_statement.
1717
1718 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1719
1720 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1721 (LABEL_PENDING_CHAIN): Ditto.
1722 (LABEL_PC): Ditto.
1723 (DECL_BIT_INDEX): Ditto.
1724
1725 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
1726
1727 PR java/18119
1728 * parse.y (inner_class_accessible): New function. Logic moved from
1729 check_inner_class_access.
1730 (check_inner_class_access): Use inner_class_accessible.
1731 (resolve_inner_class): Simplify arguments. Create circularity hash
1732 here. Keep looking for classes if we found one that was inaccessible.
1733 Return the inaccessible class only if there is no other match.
1734 (do_resolve_class): Update for new resolve_inner_class arguments.
1735 Don't create circularity_hash here.
1736
1737 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
1738
1739 PR java/21045
1740 * parse.y (add_exception_to_throws): New function.
1741 (purge_unchecked_exceptions): Removed.
1742 (get_constructor_super): Renamed from verify_constructor_super. Now
1743 returns the super constructor after verification.
1744 (java_complete_expand_method): Don't use purge_unchecked_exceptions
1745 or save/restore the exception list.
1746 (check_thrown_exceptions): Add uncaught exceptions in anonymous
1747 class initializers and constructors to the throws clause of the method.
1748
1749 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
1750
1751 PR java/19674
1752 * parse.y (interface_member_declaration): Allow empty statements in
1753 interface declarations.
1754
1755 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
1756
1757 * Makefile.in (parse.o): Adjust dependencies.
1758 * parse.y: Include tree-dump.h.
1759
1760 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1761
1762 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
1763 flag for quoting.
1764
1765 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
1766
1767 * parse.y (issue_warning_error_from_context): Call
1768 pp_output_formatted_text to be able to get the buffer.
1769
1770 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
1771
1772 * parse.y (issue_warning_error_from_context): Update for the
1773 renaming of pp_format_text to pp_format.
1774
1775 2005-06-28 Paul Brook <paul@codesourcery.com>
1776
1777 * decl.c (java_init_decl_processing): Call
1778 default_init_unwind_resume_libfunc.
1779
1780 2005-06-27 Tom Tromey <tromey@redhat.com>
1781
1782 PR java/21540, PR java/13788:
1783 * parse.y (java_complete_lhs) <CASE_EXPR>: Use
1784 fold_constant_for_init.
1785 (patch_binop): Added 'folding' argument. Updated all callers.
1786 (patch_unaryop) <NOP_EXPR>: New case.
1787 (fold_constant_for_init) <NOP_EXPR>: Likewise.
1788 (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
1789
1790 2005-06-25 Jan Hubicka <jh@suse.cz>
1791
1792 * builtins.c (define_builtin): Accept new flags parameter.
1793 (initialize_builtins): Mark the builtins const and nothrow accordingly.
1794
1795 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1796
1797 * all files: Update FSF address in copyright headers.
1798
1799 2005-06-24 Tom Tromey <tromey@redhat.com>
1800
1801 * verify-impl.c (verify_instructions_0): Correctly handle
1802 situation where PC falls off end.
1803
1804 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
1805
1806 PR java/20697
1807 * parse.y (find_most_specific_methods_list): Remove special case for
1808 inner classes.
1809
1810 2005-06-15 Tom Tromey <tromey@redhat.com>
1811
1812 PR libgcj/21906:
1813 * class.c (make_method_value): Use soft_abstractmethod_node for
1814 abstract method.
1815 * java-tree.h (soft_abstractmethod_node): New define.
1816 (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
1817 * decl.c (java_init_decl_processing): Initialize
1818 soft_abstractmethod_node.
1819
1820 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1821
1822 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1823
1824 2005-06-13 Per Bothner <per@bothner.com>
1825
1826 * expr.c (int highest_label_pc_this_method,
1827 start_label_pc_this_method): New globals.
1828 (lookup_label): Add start_label_pc_this_method to pc for label, and
1829 update highest_label_pc_this_method. This prevents conflicts between
1830 labels from different methods.
1831 * java-tree.h: Declare new globals.
1832 * jcf-parse.c (parse_class_file): If needed bump
1833 start_label_pc_this_method and reset highest_label_pc_this_method.
1834
1835 2005-06-13 Tom Tromey <tromey@redhat.com>
1836
1837 PR java/21844:
1838 * parse.y (nested_field_access_p): Handle case where outer field
1839 is inherited by enclosing class.
1840
1841 2005-06-12 Per Bothner <per@bothner.com>
1842
1843 * class.c (inherits_from_p): Do load_class if needed.
1844
1845 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1846
1847 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
1848 * java-tree.h (parse_error_context): Move...
1849 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
1850 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
1851 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
1852
1853 2005-06-08 Roger Sayle <roger@eyesopen.com>
1854
1855 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1856
1857 2005-06-06 Jakub Jelinek <jakub@redhat.com>
1858
1859 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
1860 msgid for argument name.
1861 * gjavah.c (error): Likewise.
1862 * java-tree.h (parse_error_context): Likewise.
1863 * parse.y (parse_error_context, parse_warning_context,
1864 issue_warning_error_from_context): Likewise.
1865
1866 2005-06-01 Tom Tromey <tromey@redhat.com>
1867
1868 PR java/21722:
1869 * class.c (build_static_field_ref): Don't fold constant fields if
1870 current class is from a .class file and we're using indirect
1871 dispatch.
1872
1873 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1874
1875 * java/verify-glue.c: Don't include errors.h and include toplev.h.
1876 * java/Make-lang.in: Updates dependencies.
1877
1878 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
1879
1880 PR java/19870.
1881 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
1882 NESTED_FIELD_ACCESS_IDENTIFIER_P.
1883 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
1884 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
1885 * jcf-write.c (generate_classfile): Use
1886 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1887 OUTER_FIELD_ACCESS_IDENTIFIER_P.
1888 * parse.y (build_outer_field_access): Rename to
1889 build_nested_field_access. Support static fields and outer-to-inner
1890 class accesses.
1891 (outer_field_access_p): Rename to nested_field_access_p. Support
1892 static fields and generalise to outer-to-inner class and sibling
1893 inner class accesses.
1894 (outer_field_expanded_access_p): Rename to
1895 nested_field_expanded_access_p and support static fields.
1896 (outer_field_access_fix): Rename to nested_field_access_fix and
1897 support static fields.
1898 (build_outer_field_access_expr): Rename to
1899 build_nested_field_access_expr and support static fields.
1900 (build_outer_field_access_methods): Rename to
1901 build_nested_field_access_methods and support static fields. For
1902 static fields, generate accessors without class instance parameters.
1903 (build_outer_field_access_method): Rename to
1904 build_nested_field_access_method and support static fields.
1905 (build_outer_method_access_method): Use
1906 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
1907 OUTER_FIELD_ACCESS_IDENTIFIER_P.
1908 (resolve_expression_name): Consider static field accesses across
1909 nested classes.
1910 (resolve_qualified_expression_name): Likewise.
1911 (java_complete_lhs): Use nested_field_access_fix instead of
1912 outer_field_access_fix.
1913 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
1914 Use nested_field_expanded_access_p instead of
1915 outer_field_expanded_access_p. Use nested_field_access_fix instead
1916 of outer_field_access_fix.
1917 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
1918 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
1919
1920 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
1921
1922 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
1923 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
1924 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
1925 MINOR_BINARYCOMPAT_ABI_VERSION): New.
1926 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
1927 (parse_version): Calculate version ID using new method. Use bit-flags
1928 for flag_indirect_dispatch and flag_bootstrap_classes.
1929
1930 2005-05-25 Richard Henderson <rth@redhat.com>
1931
1932 PR libgcj/21692
1933 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
1934 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
1935 DECL_CONTEXT; avoid pushdecl_top_level.
1936 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
1937 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
1938 (layout_class_method): Likewise.
1939 * decl.c (java_mark_cni_decl_local): New.
1940 (java_mark_class_local): Use it.
1941 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
1942 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
1943 (struct lang_decl_func): Add local_cni;
1944 (struct lang_decl_var): Add class_field, vtable.
1945 (java_mangle_decl): Declare.
1946 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
1947 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
1948 (mangle_obstack_1): New.
1949 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
1950 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
1951 lhd_set_decl_assembler_name for things that don't need mangling.
1952 (mangle_class_field): Rename from java_mangle_class_field, make
1953 static, don't call init_mangling or finish_mangling.
1954 (mangle_vtable): Similarly.
1955 (mangle_local_cni_method_decl): New.
1956 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
1957 gcc_assert, and MANGLE_RAW_STRING.
1958 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
1959
1960 2005-05-25 DJ Delorie <dj@redhat.com>
1961
1962 * class.c (set_constant_value): Move warning control from if() to
1963 warning(OPT_*).
1964
1965 2005-05-24 Richard Henderson <rth@redhat.com>
1966
1967 * builtins.c (define_builtin): Don't call make_decl_rtl.
1968 * constants.c (build_constant_data_ref): Likewise.
1969 * class.c (build_utf8_ref): Likewise.
1970 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
1971 (get_dispatch_table, layout_class_method): Likewise.
1972 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
1973 by hand.
1974 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
1975 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
1976 to determine if we need a non-zero address.
1977 * decl.c (builtin_function): Don't call make_decl_rtl.
1978 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
1979 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
1980 * resource.c (compile_resource_data): Likewise.
1981 * parse.y (resolve_field_access): Re-word comment to avoid
1982 building DECL_RTL.
1983
1984 2005-05-24 Richard Henderson <rth@redhat.com>
1985
1986 * class.c (registered_class): Take it out of class_roots; turn into
1987 a vec of trees.
1988 (register_class): Make static. Don't duplicate decl node. Use
1989 VEC_safe_push.
1990 (emit_register_classes): Use VEC_iterate. Use output_constant
1991 instead of assemble_integer. Don't call mark_decl_referenced
1992 directly.
1993 * java-tree.h (register_class): Remove decl.
1994
1995 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
1996
1997 PR java/17845
1998
1999 * parse.y (register_package, package_list): Remove.
2000 (package_declaration): Do not call register_package.
2001 (do_resolve_class): Do not use package_list.
2002
2003 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
2004
2005 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2006 unused variable.
2007
2008 2005-05-15 Tom Tromey <tromey@redhat.com>
2009
2010 PR java/21519:
2011 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2012 NOTE_PUSH.
2013
2014 2005-05-12 Aaron Luchko <aluchko@redhat.com>
2015
2016 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2017
2018 2005-05-11 Tom Tromey <tromey@redhat.com>
2019
2020 * gcj.texi (Code Generation): Document -fbootstrap-classes.
2021 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2022 (parse_version): Use it.
2023 * lang.opt (-fbootstrap-classes): New option.
2024
2025 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
2026
2027 PR java/21436
2028 * class.c (maybe_layout_super_class): Look for imports in this_class.
2029 * parse.h (ctxp_for_generation_last): New.
2030 (do_resolve_class): Add a parameter.
2031 * parse.y (ctxp_for_generation_last): New.
2032 (java_pop_parser_context): Add at end of list.
2033 (find_in_imports, find_in_imports_on_demand): Look in ctxp
2034 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2035 the given type are NULL.
2036 (do_resolve_class): Look into the imports of the new second parameter.
2037 Adjust recursive calls.
2038 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2039 calls to do_resolve_class.
2040 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2041 (java_complete_class): Do not do that here.
2042
2043 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
2044
2045 PR java/20309
2046 * Make-lang.in (java): Add gjnih.
2047 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2048 (GJNIH_OBJS): New variable.
2049 (gjnih$(exeext)): New target.
2050 (JAVA_MANFILES): Add gjnih.1.
2051 (java.uninstall): Add gjnih.1.
2052 (java.mostlyclean): Add gjnih.
2053 (java.maintainer-clean): Add gjnih.1.
2054 (java/gjavah-jni.o): New target.
2055 (.INTERMEDIATE): Add gjnih.pod.
2056 (gjnih.pod): New target.
2057 * config-lang.in (stagestuff): Add gjnih.
2058 * gcj.texi (Top): Add gjnih node.
2059 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2060 -bootclasspath options.
2061 (Invoking gjnih): New node.
2062 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2063 (TOOLNAME): New macro.
2064 (error): Replace hard-coded gcjh with TOOLNAME.
2065 (process_file): Likewise.
2066 (usage): Likewise.
2067 (version): Likewise.
2068 (help): Likewise. Add help output for -force, -old, -trace and -J
2069 options.
2070 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2071 (options): Add force, old, trace and J fields.
2072 (main): Handle -force, -old, -trace and -J options.
2073
2074 2005-05-03 Tom Tromey <tromey@redhat.com>
2075
2076 PR java/21245:
2077 * gjavah.c (main): Unlink output file on error.
2078
2079 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2080
2081 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2082 copyright.
2083
2084 2005-04-29 Tom Tromey <tromey@redhat.com>
2085
2086 * expr.c (build_jni_stub): Updated for change to build_block.
2087
2088 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
2089
2090 * expr.c (force_evaluation_order): Declare 'saved' earlier.
2091
2092 2005-04-28 Andrew Haley <aph@redhat.com>
2093
2094 PR java/19285
2095 * java-tree.h (soft_resolvepoolentry_node): New.
2096 (alloc_constant_fieldref): Declare.
2097 * expr.c (expand_java_field_op): Don't call class_init for
2098 accesses to static fields with indirect dispatch.
2099 * builtins.c (initialize_builtins): Add "__builtin_expect".
2100 * decl.c (soft_resolvepoolentry_node): New variable.
2101 (java_init_decl_processing): Create a decl for
2102 "_Jv_ResolvePoolEntry".
2103 * class.c (build_fieldref_cache_entry): New function.
2104 (build_static_field_ref): Rewrite for indirect dispatch.
2105 * constants.c (find_name_and_type_constant_tree): New function.
2106 (alloc_constant_fieldref): Likewise.
2107 (build_constants_constructor): Handle CONSTANT_Fieldref and
2108 CONSTANT_NameAndType.
2109
2110 PR java/21115
2111 * expr.c (force_evaluation_order): Convert outgoing args smaller
2112 than integer.
2113
2114 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
2115
2116 * gcj.texi (libgcj Runtime Properties): Remove obsolete
2117 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
2118 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2119
2120 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2121
2122 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2123 to `unlock_stream' with `unlock_std_streams'.
2124
2125 2005-04-25 Jakub Jelinek <jakub@redhat.com>
2126
2127 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2128 instead of just expr.h.
2129
2130 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2131
2132 * gjavah.c (main): Unlock the stdio streams.
2133 * jcf-dump.c (main): Likewise.
2134 * jv-scan.c (main): Likewise.
2135 * jvgenmain.c (main): Likewise.
2136
2137 2005-04-23 DJ Delorie <dj@redhat.com>
2138
2139 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2140 parse.y: Adjust warning() callers.
2141
2142 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
2143
2144 * gcj.texi (Object fields): Change "Integer" to "Int" in example
2145 contructor.
2146
2147 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
2148
2149 * gcj.texi: Fix typos and bogus example.
2150
2151 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
2152
2153 * except.c: Fix a comment typo.
2154
2155 2005-04-19 Julian Brown <julian@codesourcery.com>
2156
2157 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2158 indirect dispatch with PIC.
2159
2160 2005-04-18 Andrew Haley <aph@redhat.com>
2161
2162 * java-except.h (struct eh_range.handler): Remove unused field.
2163 (handle_nested_ranges): Remove function declaration.
2164 (sanity_check_exception_range): Add function declaration.
2165 * verify.c (verify_jvm_instructions): Remove call to
2166 handle_nested_ranges.
2167 * verify-glue.c (verify_jvm_instructions_new): Call
2168 sanity_check_exception_range.
2169 * except.c (link_handler, eh_range_freelist, link_handler,
2170 handle_nested_ranges): Remove.
2171 (add_handler): Rewrite.
2172 (sanity_check_exception_range): New function.
2173 (print_ranges): New function.
2174
2175 2005-04-13 Julian Brown <julian@codesourcery.com>
2176
2177 * decl.c (finish_method): Give methods once-only linkage.
2178
2179 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2180
2181 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2182
2183 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2184
2185 * java-tree.h: Don't use PARAMS().
2186
2187 2005-04-07 Per Bothner <per@bothner.com>
2188
2189 * class.c (push_class): By default, suppress debug output.
2190 (finish_class): Enable debug output for classes we're emitting.
2191
2192 2005-04-07 Andrew Haley <aph@redhat.com>
2193
2194 * gcj.texi: Correct gcj-dbtool instructions.
2195
2196 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
2197
2198 * gcj.texi: Fix a typo.
2199 * lang.c: Fix a comment typo.
2200
2201 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
2202
2203 * gcj.texi (Invoking gij): Add descriptions of new -X options.
2204 Mention recognized-and-ignored compatibility options.
2205 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2206 JvFree.
2207 (About CNI): Add Memory allocation section.
2208
2209 2005-04-01 Tom Tromey <tromey@redhat.com>
2210
2211 * decl.c (java_init_decl_processing): Fix types of
2212 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2213 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2214 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2215
2216 2005-03-31 Jan Hubicka <jh@suse.cz>
2217
2218 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2219 * class.c: Include cgraph.h
2220 (make_local_functoin_alias): Mark aslias as needed.
2221 * resource.c: Include cgraph.h
2222 (compile_resource_data): Go via cgraph interface.
2223
2224 2005-03-30 Ian Lance Taylor <ian@airs.com>
2225
2226 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2227
2228 2005-03-30 Tom Tromey <tromey@redhat.com>
2229
2230 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2231 inner_class_info_index==0 or outer_class_info_index==0.
2232
2233 2005-03-29 Tom Tromey <tromey@redhat.com>
2234
2235 * gcj.texi (libgcj Runtime Properties): Document
2236 gnu.gcj.runtime.endorsed.dirs.
2237
2238 2005-03-24 Anthony Green <green@redhat.com>
2239
2240 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2241 'gcj-dbtool -p'.
2242
2243 2005-03-23 Tom Tromey <tromey@redhat.com>
2244
2245 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2246 (parse_version): Use it.
2247
2248 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2249
2250 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2251
2252 2005-03-18 Andrew Haley <aph@redhat.com>
2253
2254 PR java/20522
2255 * decl.c (update_aliases): Don't update variables that are about
2256 to die.
2257 (maybe_poplevels): Add comment.
2258
2259 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
2260
2261 PR java/20502
2262 * jcf-parse.c (duplicate_class_warning): New function.
2263 (java_parse_file): Call duplicate_class_warning if
2264 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2265 (parse_zip_file_entries): Likewise. Also set
2266 CLASS_FROM_CURRENTLY_COMPILED_P.
2267
2268 2005-03-16 Andrew Haley <aph@redhat.com>
2269
2270 * expr.c (expand_java_arrayload): Don't generate a
2271 NullPointerException based on the type of the node.
2272 (build_java_array_length_access): Likewise.
2273
2274 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2275
2276 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2277
2278 2005-03-11 Tom Tromey <tromey@redhat.com>
2279
2280 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2281 (libgcj Runtime Properties): Document the default .db.
2282
2283 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
2284
2285 PR java/20312
2286 * parse.y (checks_throws_clauses): Check exceptions list even when
2287 the base class does not come from a source file being compiled.
2288 (java_complete_lhs): Remove unused variable 'wfl'.
2289
2290 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
2291
2292 PR java/20338
2293 * decl.c (finish_method): Emit _Jv_InitClass for private static
2294 methods inside inner classes as well.
2295
2296 2005-03-08 Julian Brown <julian@codesourcery.com>
2297 * Revert patch from 2005-03-08 for causing bootstrap failure on
2298 ppc-darwin.
2299
2300 2005-03-08 Julian Brown <julian@codesourcery.com>
2301
2302 * decl.c (finish_method): Give methods once-only linkage.
2303
2304 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
2305
2306 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2307
2308 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
2309
2310 * verify-glue.c (vfy_is_assignable_from): Perform static check using
2311 can_widen_reference_to if the C++ ABI is in use.
2312 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2313 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2314 type_isresolved, init_state, set_pc, state_get_pc,
2315 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2316 (verify_fail): Report the current PC from the verifier context.
2317 (free_state): Remove #if 0 block to enable this function.
2318 (free_verifier_context): Call free_state on state_list iterator
2319 values before freeing them.
2320 * expr.c (pop_type_0): Pop correct type for error message when stack
2321 contains a multi-word type.
2322
2323 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
2324
2325 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2326 for known NULL array length access.
2327
2328 2005-03-07 Tom Tromey <tromey@redhat.com>
2329
2330 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2331
2332 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
2333
2334 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2335 typeck.c: Update copyright.
2336
2337 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
2338
2339 Remove xref code.
2340 * xref.c, xref.h: Remove file.
2341 * Make-lang.in (java/xref.o): Remove.
2342 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2343 * lang.c (flag_emit_xref): Remove definition.
2344 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2345 * typeck.c (convert): Remove use of do_not_fold.
2346 * parse.y (do_not_fold): Remove definition.
2347 (parser grammar): Remove xref code.
2348 (maybe_create_class_interface_decl, create_class): Likewise.
2349 (register_fields, method_header, finish_method_declaration): Likewise.
2350 (declare_local_variables, source_end_java_method): Likewise.
2351 (java_complete_expand_classes): Do not set do_not_fold.
2352 (java_complete_expand_method): Remove xref code.
2353 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2354 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2355 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2356 (patch_synchronized_statement, patch_throw_statement): Likewise.
2357 (maybe_build_class_init_for_field): Likewise.
2358
2359 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
2360
2361 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2362 instead of IS_NON_TYPE_CODE_CLASS.
2363
2364 2005-03-04 Andrew Haley <aph@redhat.com>
2365
2366 PR java/18362
2367 * class.c (set_method_index): Don't set method_index if it is
2368 NULL_TREE.
2369 (layout_class_method): Don't complain about "non-static method foo
2370 overrides static method" in the case of indirect dispatch.
2371
2372 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2373
2374 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2375 warning.
2376 * Make-lang.in: Don't elide warnings in jcf-io.c.
2377
2378 2005-03-01 Per Bothner <per@bothner.com>
2379
2380 PR java/8608
2381 * check-init.c (wfl): Remove static.
2382 (final_assign_error, check_init): Replace calls to parse_error_context
2383 by plain error.
2384 (check_init): Save, set, and restore input_location for each exp.
2385
2386 2005-03-01 Per Bothner <per@bothner.com>
2387
2388 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2389 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2390 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2391
2392 2005-03-01 Per Bothner <per@bothner.com>
2393
2394 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2395
2396 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
2397
2398 PR libgcj/16923
2399 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2400 JvVMOption.
2401
2402 2005-02-22 Tom Tromey <tromey@redhat.com>
2403
2404 PR java/20056:
2405 * verify-impl.c (EITHER): New define.
2406 (types_compatible): Handle it.
2407 (check_field_constant): Use it.
2408
2409 2005-02-18 Tom Tromey <tromey@redhat.com>
2410
2411 PR java/20056:
2412 * verify-impl.c (types_equal): Fixed test.
2413
2414 PR java/20056:
2415 * verify-glue.c (vfy_class_has_field): New function.
2416 * verify.h (vfy_class_has_field): Declare.
2417 * verify-impl.c (check_field_constant): Added 'putfield'
2418 argument.
2419 (verify_instructions_0): Updated.
2420 (types_equal): New function.
2421
2422 2005-02-14 Tom Tromey <tromey@redhat.com>
2423
2424 PR java/19921:
2425 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2426 stack effect of multianewarray.
2427
2428 2005-02-14 Andrew Haley <aph@redhat.com>
2429
2430 PR java/19907
2431 * expr.c (expand_byte_code): Call promote_arguments().
2432 (promote_arguments): New function.
2433 * decl.c (check_local_unnamed_variable): Remove special case for
2434 new verifier.
2435 (find_local_variable): Promote all boolean types to int
2436 when searching for local variable decls.
2437
2438 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
2439
2440 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2441 parse-scan.y: Update copyright.
2442
2443 2005-02-11 Per Bothner <per@bothner.com>
2444
2445 PR java/15543
2446 * parse-scan.y (input_location): Remove variable.
2447 (main_input_filename): New - replaces input_filename, which isn't
2448 settable if USE_MAPPED_LOCATION.
2449 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2450 so we don't reference input_location or wfl_operator in that case.
2451 * jv-scan.c (expand_location): Remove - no longer used.
2452 (main): Set main_input_filename rather than input_filename.
2453
2454 2005-02-09 Richard Henderson <rth@redhat.com>
2455
2456 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2457 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2458
2459 2005-02-08 Marcin Dalecki <martin@dalecki.de>
2460
2461 * expr.c (add_type_assertion): Use the proper enumeration type,
2462 since this is what htab_find_slot() is expecting.
2463
2464 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2465
2466 * gcj.texi: Update copyright dates.
2467
2468 2005-02-02 Tom Tromey <tromey@redhat.com>
2469
2470 * gcj.texi (libgcj Runtime Properties): Default library_control
2471 to 'cache'.
2472
2473 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
2474
2475 PR java/15543
2476 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2477 (modifiers) when square brackets are present in a declaration for
2478 a final paramter.
2479 * jv-scan.c (main): Set input_filename and input_line.
2480
2481 2005-02-01 Tom Tromey <tromey@redhat.com>
2482
2483 PR java/19742:
2484 * gjavah.c (get_field_name): Don't override name for JNI header.
2485
2486 2005-02-01 Roger Sayle <roger@eyesopen.com>
2487
2488 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2489 of unsigned types using iushr and lushr JVM bytecodes.
2490
2491 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
2492
2493 PR java/19738
2494 * gjavah.c (jni_print_float): Do not emit floating-point
2495 initialiser for a static final field.
2496 (jni_print_double): Likewise.
2497
2498 2005-02-01 Mark Mitchell <mark@codesourcery.com>
2499
2500 Revert:
2501 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2502 * gjavah.c (print_field_info): Mark static data members of
2503 floating-point type with "__extension__".
2504
2505 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2506
2507 * gjavah.c (print_field_info): Mark static data members of
2508 floating-point type with "__extension__".
2509
2510 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
2511
2512 PR java/9157
2513 * parse.y (build_string_concatenation): Remove redundant if.
2514 (patch_conditional_expr): Attempt to patch_string() the condition
2515 of a ?: as well, in addition to its other operands.
2516
2517 2005-01-25 Tom Tromey <tromey@redhat.com>
2518
2519 * Make-lang.in (java/java-tree-inline.o): Removed.
2520
2521 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
2522
2523 PR java/19070
2524 * parse.y (patch_binop): Allow comparisons against NULL only
2525 if the other operand is of a reference type.
2526
2527 2005-01-24 Tom Tromey <tromey@redhat.com>
2528
2529 * java-tree.h (gcj_abi_version): Declare.
2530 * class.c (make_class_data): Push gcj_abi_version into "next"
2531 field. Renamed field.
2532 * decl.c (gcj_abi_version): New global.
2533 (parse_version): New function.
2534 (java_init_decl_processing): Call it. Renamed 'next' field.
2535 Include version.h.
2536 (GCJ_BINARYCOMPAT_ADDITION): New define.
2537
2538 2005-01-24 Roger Sayle <roger@eyesopen.com>
2539
2540 PR java/19295
2541 * jcf-write.c (generate_bytecode_insns): Conversions between
2542 integer types of the same precision shouldn't generate widening
2543 or narrowing conversion bytecodes.
2544
2545 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
2546
2547 * java-except.h, java-tree.h: Remove unused prototypes.
2548
2549 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
2550
2551 PR java/18091:
2552 * jcf-write.c (perform_relocations): Don't call memcpy if source
2553 and destination are the same.
2554
2555 2005-01-17 Tom Tromey <tromey@redhat.com>
2556
2557 * verify-impl.c (get_short): Sign extend.
2558 (get_int): Likewise.
2559
2560 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
2561
2562 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2563 with TYPE_SIZE.
2564
2565 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
2566
2567 * verify.c: Revert to the version before the BC-ABI merge.
2568
2569 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
2570
2571 PR java/19277
2572 * check-init.c (check_init): Take care of references that do not
2573 have an explicit final variable declaration (e.g. array length
2574 access) for pre/post in/de-crement operators.
2575
2576 2005-01-08 Mark Wielaard <mark@klomp.org>
2577
2578 * parse.y (process_imports): Allocate (and free) original_name only
2579 when not already defined.
2580 * jcf-parse.c (read_class): Free results of find_class() and
2581 lrealpath().
2582 (java_parse_file): Keep pointer to head of file_list and free when
2583 done. Free result of lrealpath().
2584
2585 2005-01-05 Tom Tromey <tromey@redhat.com>
2586
2587 * gcj.texi (Standard Properties): java.ext.dirs is now used.
2588
2589 2004-12-20 Andrew Haley <aph@redhat.com>
2590
2591 * typeck.c: Use fold_convert for ints and booleans.
2592
2593 2004-12-17 Andrew Haley <aph@redhat.com>
2594
2595 PR java/18931
2596 * typeck.c (convert): Use a CONVERT_EXPR when converting to
2597 BOOLEAN_TYPE or CHAR_TYPE.
2598 (convert_to_boolean, convert_to_char) : Remove.
2599 * convert.h (convert_to_boolean, convert_to_char) : Remove.
2600 * expr.c (expand_load_internal): Do type conversion if type is not
2601 as required.
2602
2603 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
2604
2605 PR target/18459
2606 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2607 Update comment.
2608
2609 2004-12-07 Andrew Haley <aph@redhat.com>
2610
2611 PR java/18811:
2612 * jcf-parse.c (load_class): Remove sanity test for missing inner
2613 class file.
2614
2615 2004-12-06 Tom Tromey <tromey@redhat.com>
2616
2617 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2618 (java.uninstall): Likewise.
2619 (java.maintainer-clean): Likewise.
2620 (.INTERMEDIATE): Likewise.
2621 (java.install-man): Likewise.
2622 (gcj-dbtool.pod): New target.
2623 * gcj.texi (Code Generation): Document -findirect-dispatch.
2624 (libgcj Runtime Properties): Document
2625 gnu.gcj.precompiled.db.path.
2626 (Top): Link to "Invoking gcj-dbtool".
2627
2628 2004-12-06 Tom Tromey <tromey@redhat.com>
2629
2630 PR java/14853:
2631 * java-tree.h (extract_field_decl): Declare.
2632 * parse.y (extract_field_decl): Renamed from
2633 strip_out_static_field_access_decl. No longer static.
2634 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2635
2636 2004-12-03 Tom Tromey <tromey@redhat.com>
2637
2638 * lang.c (flag_new_verifier): Define.
2639 (java_post_options): Set flag_new_verifier if indirect dispatch
2640 is being used.
2641 * lang.opt (fnew-verifier): Removed.
2642
2643 2004-12-03 Tom Tromey <tromey@redhat.com>
2644
2645 PR bootstrap/14614:
2646 * Make-lang.in (java.install-common): Only install transformed
2647 gcjh if gcj-cross exists.
2648
2649 2004-12-03 Andrew Haley <aph@redhat.com>
2650
2651 PR java/18812
2652 * except.c (link_handler): Patch 'outer' field of siblings of the
2653 range we're demoting.
2654
2655 2004-12-03 Andrew Haley <aph@redhat.com>
2656
2657 PR java/18697
2658 * class.c (layout_class_method): Don't fail to override a method
2659 simply because it has DECL_ARTIFICIAL set.
2660
2661 2004-12-02 Tom Tromey <tromey@redhat.com>
2662
2663 PR java/16675:
2664 * parse.y (craft_constructor): Special case null_pointer_node.
2665
2666 2004-12-02 Tom Tromey <tromey@redhat.com>
2667
2668 PR java/18741:
2669 * java-gimplify.c (java_gimplify_expr): Don't call
2670 SET_EXPR_LOCATION unless wrapped tree is an expression.
2671
2672 2004-11-27 Per Bothner <per@bothner.com>
2673
2674 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
2675 Fix fencepost error in 'i', which got executed one too many times.
2676 Also, fold memcpy into explicit loop, as originally intended.
2677 Also, free temporary 'buf' which otherwise leaks.
2678
2679 2004-11-27 Per Bothner <per@bothner.com>
2680
2681 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2682 local static variables if not USE_MAPPED_LOCATION.
2683
2684 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2685
2686 * class.c, decl.c, expr.c: Fix comment typos.
2687
2688 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
2689
2690 PR java/18305
2691 * decl.c (end_java_method): Call
2692 attach_init_test_initialization_flags on all the init_decls.
2693 * parse.y (attach_init_test_initialization_flags): Move to ...
2694 * expr.c (attach_init_test_initialization_flags): here and
2695 support BIND_EXPR also.
2696 * java-tree.h (attach_init_test_initialization_flags): Prototype.
2697 * jcf-parse.c (parse_class_file): Don't disable class init
2698 optimization.
2699
2700 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2701
2702 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2703 in diagnostics.
2704
2705 2004-11-24 Richard Henderson <rth@redhat.com>
2706
2707 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2708 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2709
2710 2004-11-24 Tom Tromey <tromey@redhat.com>
2711
2712 * verify.c (defer_merging): Don't use C++-style comment.
2713 * verify.h (java_opcode): Added java_opcode_end.
2714 * class.c (build_class_ref): Remove C++ comment and old FIXME.
2715
2716 * verify-impl.c (vfy_push_type): Removed bogus "return".
2717 (initialize_stack): Use vfy_alloc and vfy_free.
2718 (verify_instructions_0): Likewise.
2719
2720 * Merged gcj-abi-2-dev-branch to trunk.
2721
2722 2004-11-24 Andrew Haley <aph@redhat.com>
2723
2724 * jcf-parse.c (parse_class_file): Set file_start_location.
2725
2726 2004-11-10 Tom Tromey <tromey@redhat.com>
2727
2728 * class.c (make_field_value): Don't call build_static_field_ref.
2729 (build_static_field_ref): Don't emit direct references when using
2730 indirect dispatch.
2731
2732 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
2733 -verbose:class into man page synopsis.
2734
2735 2004-11-09 Tom Tromey <tromey@redhat.com>
2736
2737 * expr.c (build_java_arraystore_check): Still generate check if
2738 element type is itself an array.
2739
2740 2004-11-08 Tom Tromey <tromey@redhat.com>
2741
2742 * java-tree.h (soft_check_assignment_node): Removed.
2743 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
2744 * decl.c (java_init_decl_processing): Don't initialize
2745 soft_check_assignment_node.
2746
2747 2004-11-05 Tom Tromey <tromey@redhat.com>
2748
2749 * class.c (layout_class_methods): Don't add Miranda methods when
2750 using indirect dispatch.
2751
2752 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
2753
2754 * class.c (make_class_data): Call emit_assertion_table to set the
2755 'assertion_table' field.
2756 (build_signature_for_libgcj): Move here from expr.c.
2757 (add_assertion_table_entry): New function. Callback for assertion
2758 hashtable traversal.
2759 (emit_assertion_table): New. Take class argument, and generate
2760 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
2761 * decl.c (init_decl_processing): Define assertion_entry_type record.
2762 Push 'assertion_table' class field instead of 'verify'.
2763 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
2764 (type_assertion_hash): Include 'assertion_code' in hash.
2765 (add_type_assertion): Rewritten. Take class and assertion_code
2766 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
2767 (can_widen_reference_to): Use new add_type_assertion() arguments.
2768 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
2769 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
2770 (verify_identifier_node): Removed.
2771 (assertion_entry_type, assertion_table_type): New.
2772 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
2773 assertion code definitions.
2774 (struct type_assertion): Add assertion_code. Rename 'source_type' and
2775 'target_type' to 'op1' and 'op2'.
2776 (add_type_assertion): Declare.
2777 (lang_printable_name_wls): Remove unused definition.
2778 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
2779 to emit runtime assertion.
2780 (vfy_note_stack_type): Clean up non-C90 declarations.
2781 (vfy_note_local_type): Likewise.
2782 * verify.h (vfy_is_assignable_from): Declare.
2783 * verify-impl.c (is_assignable_from_slow): Remove unused function.
2784 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
2785 instead of is_assignable_from_slow().
2786 (types_compatible): Reinstate ref_compatible() call.
2787
2788 2004-11-04 Tom Tromey <tromey@redhat.com>
2789
2790 * class.c (build_static_field_ref): Reverted previous patch.
2791
2792 * class.c (build_static_field_ref): Don't emit direct references
2793 when using indirect dispatch.
2794
2795 2004-11-03 Tom Tromey <tromey@redhat.com>
2796
2797 * expr.c (expand_java_arrayload): Set lhs_type_node.
2798 (expand_java_arraystore): Set rhs_type_node.
2799
2800 2004-11-02 Tom Tromey <tromey@redhat.com>
2801
2802 * jcf-parse.c (compute_class_name): Use filename length from zip
2803 directory, not strlen.
2804
2805 * expr.c (expand_invoke): Mark new interface methods as abstract.
2806
2807 2004-11-01 Tom Tromey <tromey@redhat.com>
2808
2809 * verify-impl.c (push_jump): Removed check for uninitialized
2810 objects.
2811 (push_exception_jump): Likewise.
2812 (handle_ret_insn): Likewise.
2813 (handle_jsr_insn): Likewise.
2814 (state_check_no_uninitialized_objects): Removed.
2815
2816 * decl.c (check_local_unnamed_variable): Recognize
2817 promoted-to-int parameters when using the new verifier.
2818 * expr.c (expand_java_arraystore): Explicitly request array type
2819 when using new verifier.
2820 (expand_java_arrayload): Likewise.
2821 (invoke_build_dtable): Don't pass object_type_node as
2822 expression argument to build_java_indirect_ref.
2823 (build_java_check_indexed_type): Do nothing.
2824 (build_java_arraystore_check): Handle case where array doesn't
2825 have array type.
2826 (build_java_array_length_access): Likewise.
2827 (expand_invoke): Handle case where interface overrides a method
2828 from Object.
2829 (pop_type_0): Always succeed for reference types.
2830 (process_jvm_instruction): Don't pop a value in a dead
2831 exception handler.
2832 (pop_arguments): Convert arguments to correct types.
2833
2834 2004-10-29 Andrew Haley <aph@redhat.com>
2835
2836 * jcf-parse.c (give_name_to_class): Remove line that was
2837 incorrectly merged.
2838
2839 2004-10-29 Andrew Haley <aph@redhat.com>
2840
2841 * jcf-parse.c (set_source_filename): Add code to build new sfname.
2842
2843 2004-10-20 Andrew Haley <aph@redhat.com>
2844
2845 * decl.c (end_java_method): Don't expand if flag_syntax_only.
2846
2847 2004-10-26 Tom Tromey <tromey@redhat.com>
2848
2849 * verify.h (vfy_notify_verified): Removed.
2850 * verify-glue.c (vfy_notify_verified): Removed.
2851
2852 2004-10-26 Tom Tromey <tromey@redhat.com>
2853
2854 * verify-impl.c (debug_print_state): Declare `i' before code.
2855 (merge_types): Modify `t' when it is null_type.
2856
2857 2004-10-26 Tom Tromey <tromey@redhat.com>
2858
2859 * verify-impl.c (type_print): Renamed from print. Now static and
2860 takes an argument.
2861 (debug_print_state): Use type_print.
2862
2863 2004-10-25 Tom Tromey <tromey@redhat.com>
2864
2865 * expr.c (build_invokeinterface): Compute correct offset for
2866 index into interface methods.
2867
2868 2004-10-20 Tom Tromey <tromey@redhat.com>
2869
2870 * java-tree.h (verify_jvm_instructions_new): Declare.
2871
2872 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2873 command line.
2874
2875 * verify-impl.c (verify_instructions): Correctly handle wide
2876 types on the stack.
2877 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
2878 (vfy_get_component_type): Strip pointer types.
2879 (vfy_find_class): Use get_type_from_signature. Strip pointer
2880 types.
2881 Include java-except.h.
2882
2883 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
2884
2885 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
2886 vfy_push_type_t, set_variable, add_new_state, merge_into,
2887 handle_jsr_insn, branch_prepass, check_class_constant,
2888 check_wide_constant, get_one_type, compute_static_types,
2889 verify_instructions_0): Clean up C99 declarations after statements.
2890
2891 2004-10-20 Tom Tromey <tromey@redhat.com>
2892
2893 * verify-impl.c (merge_refs): Compare reference against iterator,
2894 not ref2.
2895
2896 * verify-glue.c (vfy_tag): Mask off resolved flag.
2897
2898 2004-10-19 Tom Tromey <tromey@redhat.com>
2899
2900 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
2901 (init_state_with_stack): Initialize `this_type' in state.
2902 (verify_method): Use debug_print.
2903 * verify-glue.c (vfy_is_primitive): Removed debugging print.
2904 (vfy_note_stack_depth): Reverted last patch.
2905 (vfy_note_stack_type): Note pointer to Object, not Object.
2906 (vfy_note_local_type): Likewise.
2907
2908 * verify.h (vfy_note_instruction_seen): Declare.
2909 * verify-glue.c (verify_jvm_instructions_new): Set
2910 BCODE_EXCEPTION_TARGET on target instruction.
2911 (vfy_note_instruction_seen): New function.
2912 * verify-impl.c (FLAG_INSN_SEEN): New define.
2913 (verify_instructions_0): Set flag on instruction. Save state for
2914 PC=0 later.
2915 (verify_instructions): Call vfy_note_instruction_seen.
2916
2917 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
2918 (verify_jvm_instructions_new): Call method_init_exceptions,
2919 add_handler, and handle_nested_ranges.
2920 * verify-impl.c (verify_method): Return 1 on success.
2921 (verify_instructions_0): Save the state at PC=0.
2922
2923 * verify-impl.c (init_type_from_class): Set is_resolved and
2924 ref_next on new ref_intersection.
2925 (init_type_from_string): Likewise.
2926
2927 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
2928
2929 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
2930 if flag_new_verifier is set.
2931 * java-tree.h (flag_new_verifier): Declare.
2932 * lang.opt (fnew-verifier): New option.
2933 * verify-impl.c: Work around namespace pollution by undef'ing
2934 'current_class'.
2935 (struct verifier_context): Make 'bytecode' const.
2936 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
2937 (types_compatible): For the BC-ABI, always consider reference types
2938 compatible.
2939 (check_class_constant): Use vfr->current_class.
2940 (check_constant): Likewise.
2941 (check_wide_constant): Likewise.
2942 (check_field_constant): Check for 'L' at start of type name.
2943 (get_one_type): Return pointer instead of type. Set type result in
2944 caller via passed type pointer.
2945 (compute_argument_types): Update to use new get_one_type arguments.
2946 (compute_return_type): Likewise.
2947 (make_verifier_context): New. Allocate and initialize 'vfr'.
2948 (free_verifier_context): New. Free 'vfr' and its contents.
2949 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
2950 and free_verifier_context.
2951
2952 2004-10-15 Tom Tromey <tromey@redhat.com>
2953
2954 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2955 * verify.h (vfy_fail): Fixed formatting.
2956
2957 * verify-impl.c (vfr): Fixed comment formatting.
2958 (collapse_type): New function.
2959 (verify_instructions): Notify compiler about type map.
2960 * verify.h (vfy_note_stack_depth): Updated.
2961 (vfy_note_stack_type): Likewise.
2962 (vfy_note_local_type): Likewise.
2963 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
2964 Declare.
2965 * verify-glue.c (vfy_note_stack_depth): Correctly size type
2966 state. Added `method' argument.
2967 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
2968 argument.
2969 (vfy_note_local_type): New function.
2970 (vfy_unsuitable_type): Likewise.
2971 (vfy_return_address_type): Likewise.
2972 (vfy_null_type): Likewise.
2973
2974 * verify.h (VFY_IN_GCC): Removed.
2975 (VFY_WANT_TYPEMAP): Removed.
2976 * verify-impl.c (verify_instructions_0): Removed useless "\".
2977 (struct state) <next>: Uncomment.
2978
2979 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
2980
2981 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2982 C-style.
2983
2984 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
2985
2986 * Make-lang.in (verify.o): Re-enabled this target.
2987 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
2988 (vfy_get_interface): Likewise.
2989 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
2990 * verify.h (verify_jvm_instructions_new): Declare.
2991 * verify-impl.c (free_state): Temporarily comment out unused
2992 function.
2993
2994 2004-10-06 Tom Tromey <tromey@redhat.com>
2995
2996 * java-tree.h (JV_STATE_READ): New enum value.
2997
2998 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
2999
3000 * verify.h: New file.
3001
3002 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
3003
3004 * verify-impl.c, verify-glue.c, verify.h: New files.
3005 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3006
3007 2004-09-24 Andrew Haley <aph@redhat.com>
3008
3009 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3010 for a slot if it's of pointer type.
3011
3012 2004-09-14 Tom Tromey <tromey@redhat.com>
3013
3014 * class.c (make_class_data): Correctly initialize "state" field.
3015 Initialize "engine" field.
3016 * decl.c (java_init_decl_processing): Add "engine" field.
3017
3018 2004-09-10 Andrew Haley <aph@redhat.com>
3019
3020 PR java/12760
3021 * expr.c (build_invokeinterface): Use fast method for interface
3022 dispatch.
3023 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3024 JTI_ITABLE_PTR_TYPE.
3025 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
3026 (emit_symbol_table): Add new arg, element_size.
3027 * decl.c (java_init_decl_processing): Initialize Class.itable.
3028 * class.c (GEN_TABLE): New macro.
3029 (gen_indirect_dispatch_tables): Use it. Add itable.
3030 (make_class_data): Add new arg for emit_symbol_table().
3031 Emit itable.
3032 (add_miranda_methods): Make sure search_class has been parsed.
3033 (emit_symbol_table): Add new arg, element_size.
3034
3035 2004-09-06 Andrew Haley <aph@redhat.com>
3036
3037 * verify.c (merge_types): Return Object for all merges of
3038 interfaces.
3039 * expr.c (add_type_assertion): Don't generate assertions when
3040 source type is array of Object.
3041
3042 2004-09-03 Andrew Haley <aph@redhat.com>
3043
3044 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3045
3046 * lang.c (java_post_options): Force flag_verify_invocations if
3047 we're not using indirect dispatch.
3048
3049 * expr.c (pop_type_0): Move test for interfaces before call to
3050 can_widen_reference_to().
3051 (build_signature_for_libgcj): Remove generation of canonical array
3052 type.
3053 (add_type_assertion): Canonicalize both arrays.
3054 Don't assert that type X can be assigned to Object.
3055 Don't assert that type X an be assigned to type X.
3056 Don't assert that Object can be assigned to type X.
3057 (can_widen_reference_to): Warn whenever we generate an assertion.
3058 (process_jvm_instruction): Use throwable_type_node for the type of
3059 an exception class.
3060
3061 2004-09-01 Andrew Haley <aph@redhat.com>
3062
3063 * decl.c (java_init_decl_processing): Change
3064 verify_identifier_node to "__verify".
3065 * expr.c (add_type_assertion): Use verify_identifier_node for name.
3066 * java-tree.h (verify_identifier_node): Change to "__verify".
3067
3068 * expr.c (build_signature_for_libgcj): New function.
3069 (add_type_assertion): Use it to construct signatures for
3070 source_type and target_type.
3071
3072 2004-08-27 Andrew Haley <aph@redhat.com>
3073
3074 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3075 (verify_identifier_node): New.
3076 (TYPE_VERIFY_METHOD): New.
3077 (struct type_assertion): New type.
3078 * expr.c (type_assertion_eq): New function.
3079 (type_assertion_hash): New function.
3080 (add_type_assertion): New function.
3081 (can_widen_reference_to): Call add_type_assertion().
3082 * decl.c (java_init_decl_processing): Add verify_identifier_node.
3083 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3084 (finish_class): Output TYPE_VERIFY_METHOD (type).
3085
3086 * decl.c (end_java_method): Nullify unused fields.
3087
3088 2004-08-17 Andrew Haley <aph@redhat.com>
3089
3090 * verify.c (defer_merging): Quieten.
3091 * jcf-parse.c (load_class): Only try to open a class file if it's
3092 java.lang.Object or if it's part of the current compilation.
3093 Check that the class we just tried to load is the class we just
3094 loaded. Quieten.
3095 (java_parse_file): Set flag_verify_invocations off if we're
3096 compiling from .class.
3097 (parse_zip_file_entries): Abort if we try to read a dummy class.
3098 * expr.c (can_widen_reference_to): Quieten.
3099 (build_invokevirtual): Abort if we try to invokevirtual an
3100 interface.
3101 (expand_invoke): Don't build a non-interface call to an interface.
3102 (build_instanceof): Don't do premature optimization if
3103 flag_verify_invocations is not set.
3104 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3105 from superclass.
3106 (build_static_field_ref): Add correct type conversion for
3107 field_address.
3108 (add_miranda_methods): Disable generation of Miranda methods for
3109 dummy classes.
3110 (layout_class_method): Don't complain about non-static method
3111 overrides static method with dummy classes.
3112
3113 2004-08-13 Tom Tromey <tromey@redhat.com>
3114
3115 * class.c (build_static_field_ref): Re-enable atable lookups for
3116 static fields.
3117
3118 * parse.y (strip_out_static_field_access_decl): Indentation fix.
3119
3120 2004-08-11 Tom Tromey <tromey@redhat.com>
3121
3122 * gcj.texi (libgcj Runtime Properties): Document new properties.
3123
3124 2004-08-06 Andrew Haley <aph@redhat.com>
3125
3126 * jcf-parse.c (load_class): Check that we really have loaded the
3127 class we're looking for.
3128
3129 2004-07-19 Andrew Haley <aph@redhat.com>
3130
3131 * verify.c (verify_jvm_instructions): Comment change only.
3132
3133 * typeck.c (build_java_array_type): Add size field to array name.
3134
3135 * java-tree.h (LOCAL_SLOT_P): New.
3136 (update_aliases): Add PC argument.
3137 (pushdecl_function_level): New function.
3138
3139 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3140 MODIFY_EXPR, and SAVE_EXPR.
3141 (java_gimplify_modify_expr): New function.
3142
3143 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3144 (expand_iinc): Pass PC to update_aliases().
3145 (STORE_INTERNAL): Likewise.
3146 (process_jvm_instruction): Likewise.
3147
3148 * decl.c (base_decl_map): New variable.
3149 (uniq): New variable.
3150 (update_aliases): Rewrite with more thorough checking.
3151 (debug_variable_p): New function.
3152 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
3153 (check_local_named_variable): Delete whole function.
3154 (initialize_local_variable): New function.
3155 (check_local_unnamed_variable): Add checks and comments.
3156 (find_local_variable): Rewrite.
3157 (java_replace_reference): New function.
3158 (function_binding_level): New variable.
3159 (pushdecl_function_level): New function.
3160 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3161 (maybe_pushlevels): Call pushdecl() on each of the new decls.
3162 (start_java_method): Reset uniq. Create base_decl_map. Set
3163 function_binding_level.
3164 (end_java_method): Null unused fields to save memory.
3165
3166 2004-06-29 Andrew Haley <aph@redhat.com>
3167
3168 * except.c (expand_start_java_handler): Push a new binding level.
3169 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
3170 register_exception_range() to register where we'll do it.
3171 (expand_end_java_handler): Remove old bogus code. Replace with
3172 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3173 the top of the expression we're curently building.
3174 (maybe_end_try): Delete.
3175 * decl.c (binding_level.exception_range): New field.
3176 (clear_binding_level): Add field exception_range. Reformat.
3177 (poplevel): Call expand_end_java_handler().
3178 (poplevel): Call java_add_stmt only if functionbody is false.
3179 (maybe_poplevels): Don't call maybe_end_try() from here.
3180 (end_java_method): Clear no longer used trees in function decl.
3181 (register_exception_range): New function.
3182 * java-tree.h (register_exception_range, struct eh_range): Declare.
3183
3184 2004-06-22 Andrew Haley <aph@redhat.com>
3185
3186 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3187 the otable.
3188 * check-init.c (get_variable_decl): Teach check-init about
3189 FIELD_DECLs addressed via the otable.
3190 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3191 CLASS_PARSED_P.
3192
3193 2004-05-28 Andrew Haley <aph@redhat.com>
3194
3195 * jcf-parse.c (load_class): Don't try to read a class that we've
3196 already read.
3197
3198 * expr.c (build_invokeinterface): Use the old-fashioned way of
3199 doing indirect dispatch: look up interfaces by name.
3200 * java-tree.h (enum java_tree_index): Add
3201 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3202 * decl.c (java_init_decl_processing): Add
3203 soft_lookupinterfacemethodbyname_node.
3204
3205 * gjavah.c (print_method_info): Final methods have vtable entries,
3206 so gjavah needs to output them.
3207 * class.c (layout_class_method): Generate vtable entries for final
3208 methods.
3209 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3210 dispatch, even if a method is final.
3211
3212 2004-05-25 Andrew Haley <aph@redhat.com>
3213
3214 * class.c (build_symbol_entry): Convert the names of constructors
3215 to init_identifier_node when generating an entry for the indirect
3216 dispatch table.
3217
3218 * expr.c (build_known_method_ref): Generate indirect calls for
3219 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3220
3221 2004-05-24 Andrew Haley <aph@redhat.com>
3222
3223 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3224 atable element is of the right type.
3225
3226 * class.c (build_static_field_ref): Cast pointer to correct type
3227 for field.
3228
3229 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
3230
3231 * Merged with HEAD as of 20040514. Diff against
3232 gcj-abi-2-merge-20040514.
3233
3234 2004-04-16 Andrew Haley <aph@redhat.com>
3235
3236 * verify.c (check_pending_block): Disable subroutine checks.
3237 (defer_merging): New function.
3238 (merge_types): If types are dummy, use defer_merging to combine them.
3239 (verify_jvm_instructions): If invocation is invokeinterface and
3240 target is dummy, assume target really is an interface.
3241
3242 * parse.y (patch_invoke): Break out call to java_create_object.
3243
3244 * lang.c (flag_verify_invocations): New.
3245
3246 * jcf-parse.c (load_class): If we've already failed to load a
3247 class, don't try again.
3248 (load_class): If we can't find a .class file, don't fail, but emit
3249 a warning.
3250 (parse_class_file): Don't act on dummy methods.
3251
3252 * java-tree.h (flag_verify_invocations): New.
3253 (TYPE_DUMMY): New.
3254 (lang_type.dummy_class): New field.
3255 (java_create_object): New function.
3256 (METHOD_DUMMY): New.
3257
3258 * expr.c (build_field_ref): Widen field offset.
3259 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3260 that each of its elements is compatible with the one we're
3261 popping.
3262 (pop_type_0): Issue a warning to say that we need to generate a
3263 runtime check.
3264 (java_create_object): New function.
3265 (build_field_ref): Only generate hard refs if we're not using
3266 indirect dispatch.
3267 (expand_java_field_op): If we're using !verify_invocations and we
3268 see a missing field, generate a decl for it.
3269
3270 (expand_invoke): If a class doesn't have the method we seek and
3271 we're using !flag_verify_invocations, generate a decl for the
3272 method now.
3273
3274 (build_known_method_ref): Always use indirect dispatch via the
3275 atable for static methods.
3276
3277 (expand_java_NEW): Break out object creation into new function,
3278 java_create_object.
3279
3280 (can_widen_reference_to): Issue a warning to say that we need to
3281 generate a runtime check.
3282
3283 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3284 (make_method_value): Also use index for interfaces.
3285 (make_class_data): Skip dummy field for inherited data.
3286 Don't build method array for dummy methods.
3287 Set size_in_byte to -1 when using inirect dispatch
3288 Don't build a hard class ref if we don't have a hard ref to our
3289 superclass, or if we're using inirect dispatch.
3290 Null out dispatch tables.
3291
3292 (layout_class_method): Don't complain about non-static method
3293 overrides static method is method is artificial.
3294
3295 (build_static_field_ref): Disable atable references to static
3296 fields for the time being.
3297
3298 (layout_class_methods): Check for CLASS_INTERFACE as
3299 well as CLASS_ABSTRACT.
3300
3301 2004-11-24 Steven Bosscher <stevenb@suse.de>
3302
3303 * class.c (make_class_data): Don't check flag_inline_functions.
3304 * lang.c (flag_really_inline): Remove unused flag.
3305 (java_handle_option): Don't set it here. Remove special handling
3306 of flag_inline_functions for Java.
3307 (java_init): Don't set flag_inline_trees here. Already done...
3308 (java_post_options): ...here. Don't clear flag_inline_functions.
3309
3310 2004-11-24 Steven Bosscher <stevenb@suse.de>
3311
3312 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3313 (java_gimplify_exit_block_expr): New function.
3314 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3315 LABELED_BLOCK_EXPR.
3316 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3317 (EXIT_BLOCK_EXPR): Likewise.
3318 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3319 (LABELED_BLOCK_BODY): Likewise.
3320 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3321 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3322 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
3323 TREE_OPERAND.
3324 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3325 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3326 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
3327 second operand of EXIT_BLOCK_EXPR.
3328 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3329 TREE_OPERAND.
3330 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3331
3332 2004-11-23 Ben Elliston <bje@au.ibm.com>
3333
3334 * xref.h (xref_flag_value): Remove.
3335 (xref_set_data, xref_get_data): Likewise.
3336 (xref_set_current_fp): Likewise.
3337 (XREF_NONE): Likewise.
3338 (XREF_GET_DATA): Likewise.
3339 * xref.c (xref_flag_value): Remove.
3340 (xref_set_data, xref_get_data): Likewise.
3341 (xref_set_current_fp): Likewise.
3342
3343 2004-11-23 Ben Elliston <bje@au.ibm.com>
3344
3345 * gjavah.c (output_directory): Make static.
3346 (temp_directory): Likewise.
3347
3348 2004-11-15 Tom Tromey <tromey@redhat.com>
3349
3350 * decl.c (instn_ptr_type_node): Removed.
3351 (lineNumbers_ptr_type_node): Removed.
3352 (jint_type): Removed.
3353 (jint_ptr_type): Removed.
3354
3355 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
3356
3357 PR java/15576
3358 * check-init.c (check_init): Ignore DECL_EXPR.
3359 * expr.c (always_initialize_class_p): Reenable.
3360 (build_class_init): Use a variable to store the decl. Also use
3361 boolean_false_node instead of integer_zero_node.
3362 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3363 to the block.
3364
3365 2004-11-08 Tom Tromey <tromey@redhat.com>
3366
3367 PR java/16843:
3368 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3369 generating a JNI header.
3370 (print_field_info): Handle JNI headers.
3371 (jni_print_float): Likewise.
3372 (jni_print_double): Likewise.
3373
3374 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
3375
3376 * decl.c (end_java_method): Remove duplicated code.
3377
3378 2004-11-06 Zack Weinberg <zack@codesourcery.com>
3379 Gerald Pfeifer <gerald@pfeifer.com>
3380
3381 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3382 as well.
3383
3384 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
3385
3386 PR java/17265
3387 * class.c: Reinstate 2004-08-18 patch.
3388 (make_local_function_alias): Don't create an alias for extern (native)
3389 functions.
3390
3391 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
3392
3393 PR java/17265
3394 * class.c (make_local_function_alias): Revert 2004-08-18 change.
3395 (make_method_value): Likewise.
3396
3397 2004-10-21 Andrew Haley <aph@redhat.com>
3398
3399 PR java/18091:
3400 * jcf-parse.c (set_source_filename): Add code to build new sfname.
3401
3402 2004-10-20 Andrew Haley <aph@redhat.com>
3403
3404 * decl.c (end_java_method): Don't expand if flag_syntax_only.
3405 Remove duplicated code block.
3406
3407 2004-10-18 Steven Bosscher <stevenb@suse.de>
3408
3409 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3410 New rules to work around old Bison warnings.
3411
3412 2004-10-17 Steven Bosscher <stevenb@suse.de>
3413
3414 * class.c (ident_subst): Always alloca buffer.
3415 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3416 opcode after including javaop.def.
3417 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3418 conditional expression that exits, to avoid warnings.
3419 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3420 a user of an extension.
3421 * win32-host.c: Move check down to have non-empty file when
3422 WIN32 is not defined.
3423
3424 * Make-lang.in (java-warn): Add STRICT_WARN.
3425 (java/jcf-io.o-warn): Don't have Werror for this file.
3426 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3427
3428 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
3429
3430 * expr.c (expr_add_location): Move declaration to before all
3431 statements.
3432 * parse.y (java_expand_classes): Ditto.
3433 * lex.c (java_peek_unicode): Ditto.
3434
3435 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
3436
3437 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3438 if possible, else convert `foo' to 'foo'.
3439 * class.c: Likewise.
3440 * decl.c: Likewise.
3441 * expr.c: Likewise.
3442 * jcf-io.c: Likewise.
3443 * jcf-parse.c: Likewise.
3444 * lang.c: Likewise.
3445 * lex.c: Likewise.
3446 * parse.h: Likewise.
3447
3448 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
3449
3450 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3451 rename parameter 'msg' to 'msgid' in function declaration.
3452 (issue_warning_error_from_context): Likewise.
3453 (yyerror): Rename parameter 'msg' to 'msgid'.
3454 (all over): Use new quoting style for diagnostics.
3455
3456 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
3457
3458 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3459 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3460 Update copyright.
3461
3462 2004-10-14 Matt Austern <austern@apple.com>
3463
3464 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3465 pointer_set_t* now.
3466
3467 2004-10-13 Tom Tromey <tromey@redhat.com>
3468
3469 PR java/15578:
3470 * lang.opt (--extdirs): Document.
3471 * jvspec.c (lang_specific_driver): Recognize -encoding and
3472 -extdirs.
3473
3474 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
3475
3476 * parse.y (issue_warning_error_from_context): Use va_list *
3477 instead of va_list parameter.
3478 (parse_error_context): Update call.
3479 (parse_warning_context): Likewise.
3480
3481 2004-10-05 Zack Weinberg <zack@codesourcery.com>
3482
3483 * parse.y, parse-scan.y: Add list of diagnostic messages to
3484 insulate translation template from version of yacc/bison used
3485 to compile the grammar.
3486
3487 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
3488
3489 Prepare for %q, %< and %> in diagnostic message strings.
3490 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3491 Name second parameter 'msgid'.
3492 * parse.y: Additionally include pretty-print.h and diagnostic.h.
3493 (issue_warning_error_from_context): Use pretty-printer functions
3494 instead of vsprintf for constructing formatted messages. Rename
3495 parameter 'msg' to 'msgid'.
3496 (parse_error_context): Rename parameter 'msg' to 'msgid'.
3497 (parse_warning_context): Likewise.
3498
3499 2004-10-05 Andrew Haley <aph@redhat.com>
3500
3501 PR java/17779
3502 * jcf-parse.c (parse_zip_file_entries): If a class has a
3503 superclass and a TYPE_SIZE of zero, lay it out.
3504
3505 2004-09-30 Andrew Haley <aph@redhat.com>
3506
3507 PR java/17733
3508 * jcf-parse.c (compute_class_name): Rewrite.
3509
3510 2004-10-01 Jan Hubicka <jh@suse.cz>
3511
3512 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3513
3514 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
3515
3516 * lex.c: Fix a comment typo.
3517
3518 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
3519
3520 * java-tree.h: Fix a comment typo.
3521
3522 2004-09-30 Per Bothner <per@bothner.com>
3523
3524 Simplify lexer. Implement --enable-mapped-location support.
3525 * jcf-parse.c (parse_class_file): Use linemap_line_start.
3526 (parse_source_file_1): Pass filename as extra parameter, so we can call
3527 linemap_add and set input_location here, rather than in both callers.
3528 (read_class): Pass copied filename to parse_source_file_1.
3529 Don't initialize wfl_operator - only needed for source compilation.
3530 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
3531 * lex.h: Remove a bunch of debugging macros.
3532 * lex.h (struct_java_line, struct java_error): Remove types.
3533 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
3534 (struct java_lc_s): Remove prev_col field.
3535 (struct java_lexer): New fields next_unicode, next_columns, and
3536 avail_unicode. New position field, and maybe token_start field.
3537 Don't need hit_eof field - use next_unicode == -1 instead.
3538 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
3539 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
3540 * parse.h: Various changes for USE_MAPPED_LOCATION.
3541 (EXPR_WFL_EMIT_LINE_NOTE): XXX
3542 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3543 (struct parser_ctxt): New file_start_location field.
3544 Remove p_line, c_line fields since we no longer save lines.
3545 Remove elc, lineno, and current_jcf fields - no longer used.
3546 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
3547 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3548 source_location and is probably not needed anymore anyway.
3549 Use new expr_add_Location function.
3550 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
3551 (java_pop_parser_context): Minor cleanup.
3552 (java_parser_context_save_global, java_parser_context_restore_global,
3553 java_pop_parser_context): Save/restore input_location as a unit.
3554 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
3555 a source_location instead of a wfl context node.
3556 (check_class_interface_creation): input_filename is not addressable.
3557 (create_artificial_method): Calling java_parser_context_save_global
3558 and java_parser_context_restore_global is overkill. Instead,
3559 temporarily set input_location from class decl.
3560 (java_layout_seen_class_methods): Set input_location from method decl.
3561 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3562 (finish_loop_body): Likewise.
3563 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
3564 (java_sprint_unicode): Take a character, not index in line.
3565 (java_sneak_uncode): Replaced by java_peek_unicode.
3566 (java_unget_unicode): No longer used.
3567 (java_allocate_new_line. java_store_unicode): Removed, since we
3568 no longer remember "lines".
3569 (java_new_lexer): Update for new data structures.
3570 (java_read_char): Move unget_value checking to java_read_unicode.
3571 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3572 efficient functions that are used directly when lexing.
3573 (java_read_unicode_collapsing_terminators): No longer needed.
3574 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3575 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3576 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
3577 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
3578 combine switch branches, and test for common token kinds earlier.
3579 (java_lex_error): Rewrite.
3580 * jv-scan.c (expand_location): New function, copied from tree.c.
3581 (main): Set ctxp->filename instead of setting input_filename directly.
3582
3583 2004-09-30 Per Bothner <per@bothner.com>
3584
3585 More cleanup for --enable-mapped-location.
3586 * class.c (push_class): If USE_MAPPED_LOCATION don't set
3587 input_location here. Instead do it in give_name_to_class.
3588 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3589 * expr.c (expand_byte_code): Call linemap_line_start.
3590 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
3591 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
3592 (expr_add_location): New function, if USE_MAPPED_LOCATION.
3593 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
3594 to USE_MAPPED_LOCATION case.
3595
3596 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
3597 * jcf-parse.c (java_parse_file): Don't set input_filename.
3598 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3599 Create a list of TRANSLATION_UNIT_DECL.
3600 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
3601 reason is so we can set a DECL_SOURCE_LOCATION for each file.
3602 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3603 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3604 (file_start_location): New static.
3605 (set_source_filename): Avoid extra access to input_filename macro.
3606 Concatenate new name with class's package prefix.
3607 (set_source_filename, give_name_to_class): Update.
3608 (give_name_to_class): Set class's "line 0" input_location here.
3609 (parse_class_file): Set input_location as a unit.
3610
3611 * jcf-parse.c (load_class): Sanity test if missing inner class file.
3612
3613 2004-09-29 Per Bothner <per@bothner.com>
3614
3615 * java-tree.h: Redefine some macros and add some declaration
3616 to handle the USE_MAPPED_LOCATION case.
3617 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
3618 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
3619 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3620 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3621
3622 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3623 * decl.c (finish_method, java_add_stmt): Likewise.
3624 * java-gimplify.c (java-gimplify.c): Likewise.
3625 * jcf-write.c (generate_bytecode_insns): Likewise.
3626 * lang.c (java_post_options): Likewise - call linemap_add.
3627
3628 2004-09-29 Andrew Haley <aph@redhat.com>
3629
3630 PR java/17007
3631 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3632 result of TRUNC_MOD_EXPR.
3633 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3634 * decl.c (java_init_decl_processing): Mark
3635 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3636
3637 2004-09-28 Tom Tromey <tromey@redhat.com>
3638
3639 PR java/15710:
3640 * class.c (add_miranda_methods): Load superinterface if not
3641 already loaded.
3642
3643 2004-09-28 Andrew Haley <aph@redhat.com>
3644
3645 PR java/17586
3646 * jcf-parse.c (load_class): Don't try to read a class that we've
3647 already read.
3648
3649 2004-09-28 Andrew Haley <aph@redhat.com>
3650
3651 * jcf-parse.c (load_class): Back out previous broken patch.
3652
3653 2004-09-28 Andrew Haley <aph@redhat.com>
3654
3655 PR java/17586
3656 * jcf-parse.c (load_class): Don't try to read a class that we've
3657 already read.
3658 Check that we really did read the right class.
3659
3660 2004-09-25 Tom Tromey <tromey@redhat.com>
3661
3662 PR java/17500:
3663 * parse.y (create_artificial_method): Use add_method_1.
3664
3665 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
3666
3667 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3668 comment typos.
3669 * gcj.texi: Fix typos.
3670
3671 2004-09-24 Tom Tromey <tromey@redhat.com>
3672
3673 PR java/15656:
3674 * parse.y (class_instance_creation_expression): Set `$$' to NULL
3675 in error parts of rule.
3676 (unary_expression): Don't call error_if_numeric_overflow when $1
3677 is NULL.
3678
3679 2004-09-24 Tom Tromey <tromey@redhat.com>
3680
3681 PR java/16789:
3682 * parse.y (resolve_qualified_expression_name): Set
3683 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3684 * expr.c (force_evaluation_order): Check for empty argument list
3685 after stripping COMPOUND_EXPR.
3686
3687 2004-09-23 Andrew Haley <aph@redhat.com>
3688
3689 PR java/16927:
3690 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3691 COND_EXPRs.
3692
3693 2004-09-23 Tom Tromey <tromey@redhat.com>
3694
3695 PR java/17329:
3696 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3697 where operand is null.
3698
3699 2004-09-23 Tom Tromey <tromey@redhat.com>
3700
3701 PR java/17380:
3702 * parse.y (not_accessible_p): Allow access to protected members
3703 even when class is not static.
3704
3705 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
3706
3707 * Make-lang.in: Revert the gcc-none.o change.
3708
3709 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3710
3711 * parse.y (patch_anonymous_class): VEC_space returns true if there
3712 is space.
3713
3714 2004-09-21 Matt Austern <austern@apple.com>
3715
3716 Fix bootstrap.
3717 * gjavah.c (free_method_name_list): Fix function definition so
3718 it's a proper C prototype.
3719
3720 2004-09-21 Tom Tromey <tromey@redhat.com>
3721
3722 PR java/17575:
3723 * gjavah.c (free_method_name_list): New method.
3724 (main): Call it.
3725
3726 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3727 Zack Weinberg <zack@codesourcery.com>
3728
3729 * java-tree.def: Use tree_code_class enumeration constants
3730 instead of code letters.
3731 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
3732 new tree-class enumeration constants.
3733
3734 2004-09-13 Tom Tromey <tromey@redhat.com>
3735
3736 PR java/17216:
3737 * class.c (layout_class_method): Put synthetic methods into the
3738 vtable.
3739
3740 2004-09-11 Andrew Pinski <apinski@apple.com>
3741
3742 * Make-lang.in (java/ggc-none.c): Change dependency
3743 for ggc.h into $(GGC_H).
3744
3745 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
3746
3747 * Make-lang.in (java/win32-host.o): Add dependency on
3748 coretypes.h.
3749 * win32-host.c: Add includes for coretypes.h, jcf.h
3750
3751 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
3752
3753 * Make-lang.in (GCJH_OBJS): Change dependency from
3754 ggc-none.o to java/ggc-none.o
3755 (JCFDUMP_OBJS): Likewise.
3756 (java/ggc-none.o): New target.
3757
3758 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3759
3760 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
3761 * class.c (build_utf8_ref, build_static_field_ref,
3762 make_field_value, make_method_value, get_dispatch_table,
3763 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3764 * constants.c (get_tag_node, build_ref_from_constant_pool,
3765 build_constants_constructor): Likewise.
3766 * decl.c (java_init_decl_processing): Likewise.
3767 * expr.c (build_java_array_length_access, build_newarray,
3768 expand_java_multianewarray, expand_java_pushc, expand_iinc,
3769 build_java_binop, build_field_ref, expand_java_add_case,
3770 expand_java_call, build_known_method_ref, build_invokevirtual,
3771 build_invokeinterface, build_jni_stub): Likewise.
3772 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3773 * jcf-parse.c (get_constant): Likewise.
3774 * lex.c (do_java_lex): Likewise.
3775 * parse.y (patch_binop, patch_unaryop, patch_cast,
3776 build_newarray_node, patch_newarray): Likewise.
3777 * resource.c (compile_resource_data): Likewise.
3778 * typeck.c (build_prim_array_type): Likewise.
3779
3780 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3781
3782 * decl.c (java_init_decl_processing): Adjust
3783 initialize_sizetypes call.
3784
3785 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3786
3787 * jv-scan.c (fancy_abort): Add.
3788
3789 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3790
3791 * expr.c (build_java_arrayaccess): Use convert to change
3792 len's type.
3793
3794 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
3795
3796 * class.c (make_local_function_alias): Allocate extra space for 'L'
3797 in name buffer. Reported by Thomas Neumann.
3798
3799 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
3800
3801 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
3802 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
3803 * lex.c (do_java_lex): Adjust.
3804 (error_if_numeric_overflow): Likewise.
3805
3806 2004-08-18 Andrew Pinski <apinski@apple.com>
3807
3808 * class.c (make_local_function_alias): Only make a new decl if we
3809 support alias attribute on all decls.
3810
3811 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
3812
3813 * class.c (make_local_function_alias): New function. Create local
3814 alias for public method DECL.
3815 (make_method_value): Use make_local_function_alias.
3816 * parse.y (craft_constructor): Don't special-case anonymous classes.
3817 Always set ctor_name to init_identifier_node.
3818 (lookup_method_invoke): Call layout_class_method when creating
3819 anonymous class constructor.
3820
3821 2004-08-18 Richard Henderson <rth@redhat.com>
3822
3823 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
3824 default case. Treat '<' similarly. Update for
3825 is_gimple_formal_tmp_var name change.
3826
3827 2004-08-17 Andrew Haley <aph@redhat.com>
3828
3829 * lang.c (lang_printable_name): Obey verbose flag.
3830 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
3831 lang_printable_name().
3832 (verify_constructor_circularity, get_printable_method_name,
3833 check_abstract_method_definitions, java_check_regular_methods,
3834 java_check_abstract_methods, check_inner_class_access,
3835 fix_constructors, patch_method_invocation, patch_return):
3836 Likewise.
3837 * expr.c (pop_type_0): Likewise.
3838
3839 * java-tree.h (lang_printable_name_wls): Delete.
3840
3841 2004-08-16 Tom Tromey <tromey@redhat.com>
3842
3843 PR java/8473:
3844 * parse.y (primary): Changed for initialized and uninitialized
3845 array creations.
3846 (array_access): Handle array_creation_initialized.
3847 (array_creation_expression): Split into
3848 array_creation_initialized and array_creation_uninitialized.
3849
3850 2004-08-16 Andrew Haley <aph@redhat.com>
3851
3852 * jcf-write.c (find_constant_index): Canonicalize NaNs when
3853 generating bytecode.
3854
3855 2004-08-16 Elliot Lee <sopwith@redhat.com>
3856
3857 PR java/9677
3858 * jcf-parse.c (java_parse_file): Handle filenames with embedded
3859 spaces, and quoted filelists.
3860
3861 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3862
3863 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
3864 * class.c (build_utf8_ref, build_static_field_ref,
3865 make_field_value, make_method_value, get_dispatch_table,
3866 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
3867 * constants.c (get_tag_node, build_ref_from_constant_pool,
3868 build_constants_constructor): Likewise.
3869 * decl.c (java_init_decl_processing): Likewise.
3870 * expr.c (build_java_array_length_access, build_newarray,
3871 expand_java_multianewarray, expand_java_pushc, expand_iinc,
3872 build_java_binop, build_field_ref, expand_java_add_case,
3873 expand_java_call, build_known_method_ref, build_invokevirtual,
3874 build_invokeinterface, build_jni_stub): Likewise.
3875 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3876 * jcf-parse.c (get_constant): Likewise.
3877 * lex.c (do_java_lex): Likewise.
3878 * parse.y (patch_binop, patch_unaryop, patch_cast,
3879 build_null_of_type, patch_newarray): Likewise.
3880 * resource.c (compile_resource_data): Likewise.
3881 * typeck.c (build_prim_array_type): Likewise.
3882
3883 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
3884
3885 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
3886 Don't create BLOCK here or call java_gimplify_block.
3887
3888 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
3889
3890 * java-tree.h (flag_deprecated): Removed.
3891 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
3892 * parse.y (check_deprecation): Check warn_deprecated instead of
3893 flag_deprecated.
3894
3895 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
3896
3897 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
3898 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
3899 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
3900 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
3901 flag_force_classes_archive_check, flag_optimize_sci,
3902 flag_indirect_dispatch): Remove explicit declarations.
3903 * lang.opt: Add implicit declare/define/assign. Remove obsolete
3904 final comment.
3905
3906 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
3907
3908 PR bootstrap/14893
3909 * Make-lang.in (java.install-man): Install from either build
3910 tree or source tree, whichever has the file first.
3911
3912 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
3913
3914 * jcf-parse.c (get_constant): Adjust force_fit_type call.
3915 * lex.h (SET_LVAL_NODE_TYPE): Remove.
3916 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
3917 (do_java_lex): Likewise. Adjust force_fit_type call.
3918
3919 2004-08-04 Roger Sayle <roger@eyesopen.com>
3920 Andrew Haley <aph@redhat.com>
3921
3922 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
3923 checking trees as they're being built.
3924 (convert): Call convert_ieee_real_to_integer if we're
3925 converting a constant, even if we're writing a class file.
3926
3927 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
3928
3929 PR java/16701
3930 * parse.y (fold_constant_for_init): Call resolve_field_access with
3931 correct current_class context.
3932
3933 2004-08-01 Roger Sayle <roger@eyesopen.com>
3934
3935 * decl.c (update_aliases, initialize_local_variable): Replace calls
3936 to build with calls to buildN.
3937 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
3938 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
3939 * parse.h (BUILD_THROW): Likewise.
3940 * parse.y (switch_expression, synchronized_statement,
3941 catch_clause_parameter, array_creation_expression,
3942 conditional_expression, make_qualified_name,
3943 resolve_qualified_expression_name, patch_method_invocation,
3944 patch_invoke, build_method_invocation, build_new_invocation,
3945 build_assignment, patch_assignment, build_binop, patch_binop,
3946 build_string_concatenation, build_incdec, patch_unaryop,
3947 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
3948 patch_return, build_if_else_statement, build_labeled_block,
3949 build_new_loop, build_loop_body, build_bc_statement,
3950 build_assertion, encapsulate_with_try_catch, build_try_statement,
3951 build_try_finally_statement, patch_synchronized_statement,
3952 emit_test_initialization): Likewise, replace build with buildN.
3953
3954 2004-07-28 Eric Christopher <echristo@redhat.com>
3955
3956 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3957 (java_unsafe_for_reeval): Ditto.
3958
3959 2004-07-26 <hp@bitrange.com>
3960
3961 * parse.y (build_super_invocation): Adjust declaration order to
3962 avoid declaration after statement.
3963
3964 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3965
3966 * decl.c: Rename all identifiers named `class' to `cl'.
3967
3968 2004-07-25 Richard Henderson <rth@redhat.com>
3969
3970 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3971
3972 2004-07-23 Mike Stump <mrs@apple.com>
3973
3974 * boehm.c (set_bit): Improve type safety wrt unsignedness.
3975 * gjavah.c (throwable_p, decode_signature_piece,
3976 print_full_cxx_name, print_include, add_namelet, add_class_decl,
3977 process_file): Likewise.
3978 * jcf-dump.c (main): Likewise.
3979 * jcf-io.c (read_zip_member): Likewise.
3980 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
3981 give_name_to_class, get_class_constant): Likewise.
3982 * jcf-write.c (find_constant_wide, push_long_const,
3983 generate_classfile): Likewise.
3984 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
3985 * parse.y (read_import_dir): Likewise.
3986 * typeck.c (parse_signature_type): Likewise.
3987 * verify.c (verify_jvm_instructions): Likewise.
3988 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
3989
3990 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3991
3992 * Make-lang.in: Replace rmic and rmiregistry references with
3993 grmic and grmiregistry.
3994 * gcj.texi: Likewise.
3995
3996 2004-07-20 Andrew Haley <aph@redhat.com>
3997
3998 PR java/16431.
3999 * verify.c (verify_jvm_instructions): Comment change only.
4000
4001 * typeck.c (build_java_array_type): Add size field to array name.
4002
4003 * java-tree.h (LOCAL_SLOT_P): New.
4004 (update_aliases): Add PC argument.
4005 (pushdecl_function_level): New function.
4006
4007 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4008 MODIFY_EXPR, and SAVE_EXPR.
4009 (java_gimplify_modify_expr): New function.
4010
4011 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4012 (expand_iinc): Pass PC to update_aliases().
4013 (STORE_INTERNAL): Likewise.
4014 (process_jvm_instruction): Likewise.
4015
4016 * decl.c (base_decl_map): New variable.
4017 (uniq): New variable.
4018 (update_aliases): Rewrite with more thorough checking.
4019 (debug_variable_p): New function.
4020 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
4021 (check_local_named_variable): Delete whole function.
4022 (initialize_local_variable): New function.
4023 (check_local_unnamed_variable): Add checks and comments.
4024 (find_local_variable): Rewrite.
4025 (java_replace_reference): New function.
4026 (function_binding_level): New variable.
4027 (pushdecl_function_level): New function.
4028 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4029 (maybe_pushlevels): Call pushdecl() on each of the new decls.
4030 (start_java_method): Reset uniq. Create base_decl_map. Set
4031 function_binding_level.
4032 (end_java_method): Null unused fields to save memory.
4033
4034 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4035
4036 * class.c (add_interface_do): Remove.
4037 (set_super_info, interface_of_p, maybe_add_interface,
4038 add_interface, make_class_data, layout_class,
4039 add_miranda_methods): Adjust BINFO accessors and addition.
4040 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4041 accessors.
4042 * jcf-write.c (generate_classfile): Likewise.
4043 * parse.y (patch_anonymous_class, check_inner_circular_reference,
4044 check_circular_reference, java_complete_class,
4045 check_abstract_method_definitions,
4046 java_check_abstract_method_definitions,
4047 check_interface_throws_clauses, java_check_abstract_methods,
4048 lookup_java_interface_method2,
4049 find_applicable_accessible_methods_list): Adjust BINFO accessors
4050 and addition.
4051 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4052
4053 2004-07-18 Roger Sayle <roger@eyesopen.com>
4054
4055 * builtins.c (max_builtin, min_builtin,
4056 java_build_function_call_expr): Replace calls to build with buildN.
4057 * class.c (build_class_ref, build_static_field_ref,
4058 get_dispatch_table, make_class_data, layout_class_method): Likewise.
4059 * constants.c (build_ref_from_constant_pool): Likewise.
4060 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4061 add_stmt_to_compound): Likewise.
4062 * except.c (build_exception_object_ref, expand_end_java_handler):
4063 Likewise.
4064 * java-gimplify.c (java_gimplify_case_expr,
4065 java_gimplify_default_expr, java_gimplify_block,
4066 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4067 * jcf-write.c (generate_bytecode_insns): Likewise.
4068 * typeck.c (convert_ieee_real_to_integer): Likewise.
4069
4070 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4071
4072 * java-tree.h (builtin_function): Declare.
4073
4074 2004-07-16 Steven Bosscher <stevenb@suse.de>
4075
4076 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4077 abuse restore_line_number_status.
4078
4079 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
4080
4081 g++/15861
4082 * jcf-parse.c (java_emit_static_constructor): Specify default
4083 priority.
4084
4085 2004-07-13 Per Bothner <per@bothner.com>
4086
4087 * java-tree.h (all_class_filename): Remove useless macro.
4088 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
4089 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
4090 * parse.y (java_parser_context_restore_global): Replace
4091 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4092 * jcf-parse.c (read_class, java_parse_file): Likewise.
4093
4094 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
4095
4096 PR java/16474
4097 gjavah.c (print_field_info): Emit constant only if field is static.
4098
4099 2004-07-11 Roger Sayle <roger@eyesopen.com>
4100
4101 * expr.c (java_truthvalue_conversion, flush_quick_stack,
4102 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4103 build_java_ret, build_java_throw_out_of_bounds_exception,
4104 build_java_array_length_access, java_check_reference,
4105 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4106 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4107 expand_java_arrayload, build_java_monitor, expand_java_return,
4108 expand_load_internal, expand_java_NEW, build_get_class,
4109 build_instanceof, expand_java_CHECKCAST, expand_iinc,
4110 build_java_soft_divmod, build_java_binop, build_field_ref,
4111 expand_compare, expand_java_goto, expand_java_switch,
4112 expand_java_add_case, build_class_init, build_known_method_ref,
4113 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4114 expand_invoke, build_jni_stub, expand_java_field_op,
4115 java_expand_expr, expand_byte_code, STORE_INTERNAL,
4116 force_evaluation_order, emit_init_test_initialization): Convert
4117 calls to "build" into calls to the prefered "buildN" functions.
4118
4119 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4120
4121 * java-tree.h (set_block): Remove.
4122 * lang.c (java_clear_binding_stack): New.
4123 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4124 * decl.c (struct binding_level): Remove this_block.
4125 (clear_binding_level): Likewise.
4126 (poplevel): Don't handle this_block.
4127 (set_block): Remove.
4128
4129 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
4130
4131 * class.c (common_enclosing_context_p): Remove statement with no
4132 side-effects.
4133
4134 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4135
4136 PR java/8618
4137 * parse.y (create_anonymous_class): Remove 'location' argument. Use
4138 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4139 (craft_constructor): Inherit access flags for implicit constructor
4140 from the enclosing class.
4141 (create_class): Fix comment typo.
4142 (resolve_qualified_expression_name): Pass type of qualifier to
4143 not_accessible_p, not the type in which target field was found.
4144 (not_accessible_p): Handle inner classes. Expand protected
4145 qualifier-subtype check to enclosing instances, but don't apply this
4146 check to static members. Allow protected access to inner classes
4147 of a subtype. Allow private access within common enclosing context.
4148 (build_super_invocation): Get WFL line number info from current
4149 class decl.
4150 (build_incomplete_class_ref): Update for new create_anonymous_class
4151 signature.
4152 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4153 common_enclosing_instance_p.
4154 * class.c (common_enclosing_context_p): New. Determine if types
4155 share a common enclosing context, even across static contexts.
4156 (common_enclosing_instance_p): Renamed from
4157 common_enclosing_context_p. Determines if types share a common
4158 non-static enclosing instance.
4159 * java-tree.h (common_enclosing_instance_p): Declare.
4160 * jcf-write.c (get_method_access_flags): New. Surpress private flag
4161 for inner class constructors.
4162 (generate_classfile): Use get_method_access_flags.
4163
4164 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4165
4166 * class.c (interface_of_p): Check for null TYPE_BINFO.
4167
4168 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
4169
4170 * class.c (make_class): Do not create binfo here.
4171 (set_super_info): Create it here.
4172 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4173
4174 2004-07-08 Richard Henderson <rth@redhat.com>
4175
4176 * expr.c (case_identity, get_primitive_array_vtable,
4177 java_expand_expr, emit_init_test_initialization): Remove.
4178 * java-tree.h (java_expand_expr): Remove.
4179 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4180
4181 2004-07-07 Per Bothner <per@bothner.com>
4182
4183 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
4184 get internal error due to mismatched types.
4185
4186 * gcj.texi (Invoking gij): Document new -verbose:class flag.
4187
4188 * gcj.texi (Linking): New node. Document -lgij usage.
4189
4190 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
4191
4192 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4193 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4194 * java/class.c (set_super_info, class_depth, interface_of_p,
4195 maybe_add_interface, add_interface, make_class_data,
4196 layout_class, add_miranda_methods): Adjust BINFO macros.
4197 * expr.c (can_widen_reference_to, lookup_field): Likewise.
4198 * jcf-write.c (generate_classfile): Likewise.
4199 * parse.y (patch_anonymous_class,
4200 check_inner_circular_reference, check_circular_reference,
4201 java_complete_class, check_abstract_method_definitions,
4202 java_check_abstract_method_definitions,
4203 check_interface_throws_clauses, java_check_abstract_methods,
4204 lookup_java_interface_method2,
4205 find_applicable_accessible_methods_list): Likewise.
4206 * typeck.c (find_method_in_interface): Likewise.
4207 * verify.c (merge_types): Likewise.
4208
4209 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4210
4211 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4212 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4213
4214 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
4215
4216 * class.c (make_class): Use make_tree_binfo.
4217 (set_super_info, add_interface_do): Likewise.
4218 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4219
4220 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4221
4222 * verify.c: Correct array element access formatting thinko.
4223
4224 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4225
4226 * verify.c: Insert a short blurb at the start referring to the JVMS.
4227 (merge_type_state): Remove redundant nested if statement.
4228 (verify_jvm_instructions): Ensure current_subr is initialised to
4229 NULL_TREE.
4230 Minor formatting fixes all over the place.
4231
4232 2004-07-02 Richard Henderson <rth@redhat.com>
4233
4234 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4235
4236 2004-07-01 Richard Henderson <rth@redhat.com>
4237
4238 * class.c (registerClass_libfunc): Remove.
4239 (init_class_processing): Don't set it.
4240 (emit_register_classes): Take list_p parameter. Fill it in
4241 with _Jv_RegisterClass calls.
4242 * decl.c (java_init_decl_processing): Don't call
4243 init_resource_processing.
4244 * jcf-parse.c (java_emit_static_constructor): New.
4245 (java_parse_file): Call it.
4246 * resource.c (registerResource_libfunc): Remove.
4247 (init_resource_processing): Remove.
4248 (write_resource_constructor): Take list_p parameter. Fill it in
4249 with _Jv_RegisterResource calls.
4250 * java-tree.h: Update prototypes.
4251
4252 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
4253
4254 PR java/1262
4255 * class.c (layout_class_method): Do not override package-private
4256 method if its in a different package.
4257 (split_qualified_name): Move here from parse.y. Rename from
4258 breakdown_qualified. Add comment.
4259 (in_same_package): Move here from parse.y. Add comment.
4260 * java-tree.h (break_down_qualified, in_same_package): Declare.
4261 (in_same_package): Likewise.
4262 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4263 Callers updated.
4264
4265 2004-06-29 Andrew Haley <aph@redhat.com>
4266
4267 * except.c (expand_start_java_handler): Push a new binding level.
4268 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
4269 register_exception_range() to register where we'll do it.
4270 (expand_end_java_handler): Remove old bogus code. Replace with
4271 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4272 the top of the expression we're curently building.
4273 (maybe_end_try): Delete.
4274 * decl.c (binding_level.exception_range): New field.
4275 (clear_binding_level): Add field exception_range. Reformat.
4276 (poplevel): Call expand_end_java_handler().
4277 (poplevel): Call java_add_stmt only if functionbody is false.
4278 (maybe_poplevels): Don't call maybe_end_try() from here.
4279 (end_java_method): Clear no longer used trees in function decl.
4280 (register_exception_range): New function.
4281 * java-tree.h (register_exception_range, struct eh_range): Declare.
4282
4283 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
4284
4285 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4286
4287 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
4288
4289 Formatting fixes.
4290 * expr.c (class_has_finalize_method): Fix method name indentation.
4291 (expand_java_call): Remove K&R style parameter declaration.
4292 (expand_invoke): Fix statement indentation.
4293 (expand_java_field_op): Likewise.
4294 * parse-scan.y: Fix typo.
4295 (reset_report): Fix method name indentation.
4296 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4297 line. Fix typos.
4298 * verify.c (verify_jvm_instructions): Document parameters, insert
4299 page break.
4300 * lang.c (lang_init_source): Fix method name indentation.
4301 * class.c (common_enclosing_context_p): Likewise.
4302 (emit_symbol_table): Fix parameter list indentation.
4303 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4304 parameter declaration.
4305 * constants.c: Fix copyright notice indentation.
4306 * typeck.c (find_method_in_superclasses): Fix parameter list
4307 indentation.
4308 (find_method_in_interfaces): Likewise.
4309 * zextract.c (makelong): Fix method name indentation.
4310
4311 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4312
4313 PR java/15715.
4314 * parse.y (create_interface): Set correct access modifiers for
4315 interfaces.
4316 * jcf-write.c (get_classfile_modifiers): New function.
4317 (generate_classfile): Use get_classfile_modifiers, not
4318 get_access_flags.
4319
4320 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4321
4322 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4323 dependency to current parser context, not NULL_TREE, for top-level
4324 classes.
4325 (jdep_resolve_class): Enable member access check for all inner
4326 class dependencies.
4327
4328 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4329
4330 * parse.y (qualify_and_find): Pass type decl, not identifier, to
4331 load_class.
4332
4333 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4334
4335 PR java/15734
4336 * expr.c (expand_java_field_op): Ensure that target class for static
4337 field access has been loaded.
4338
4339 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4340 Ranjit Mathew <rmathew@hotmail.com>
4341
4342 PR java/1207, java/16178
4343 * jcf-parse.c (load_class): Return immediately if passed a type decl
4344 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4345 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4346 before calling load_class.
4347 (qualify_and_find): Likewise.
4348 (find_in_imports_on_demand): Likewise.
4349 (find_applicable_accessible_methods_list): Likewise.
4350
4351 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
4352
4353 * parse.y (java_layout_seen_class_methods): Don't call load_class
4354 on class defined by source parser.
4355
4356 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
4357
4358 * parse.y (set_nested_class_simple_name_value): Removed.
4359 (java_complete_expand_class): Remove calls to
4360 set_nested_class_simple_name_value.
4361
4362 2004-06-22 Andrew Haley <aph@redhat.com>
4363 Ranjit Mathew <rmathew@hotmail.com>
4364
4365 Fixes PR java/16113.
4366 * decl.c (force_poplevels): Remove call to expand_end_bindings.
4367
4368 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
4369
4370 * parse.y (create_class): Correct diagnostic message about
4371 java.lang.Object extending anything else.
4372
4373 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4374
4375 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4376 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4377 * constants.c (build_ref_from_constant_pool): Likewise.
4378 * expr.c (build_java_array_length_access): Likewise.
4379 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4380 (invoke_build_dtable, build_invokevirtual): Likewise.
4381 (build_invokeinterface, java_expand_expr): Likewise.
4382 (emit_init_test_initialization): Likewise.
4383 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4384 * parse.y (make_qualifed_name, build_array_ref): Likewise.
4385
4386 2004-06-21 Andrew Haley <aph@redhat.com>
4387
4388 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4389 block.
4390
4391 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4392
4393 * jcf.h (struct JCF): Change java_source, right_zip and finished
4394 to unsigned int.
4395 * lex.h (struct java_lexer): Change hit_eof, read_anything,
4396 byte_swap and use_fallback to unsigned int.
4397 * parse.h (struct _jdep): Change flag0 to unsigned int.
4398
4399 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
4400
4401 Fixes PR java/13948
4402 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4403 before trying to lay out its methods.
4404 * jcf-parse.c (read_class): Track parsed files using canonical paths
4405 obtained via lrealpath from libiberty.
4406 (java_parse_file): Likewise.
4407 (parse_source_file_1): Rename formal parameter to reflect its
4408 modified purpose. Minor formatting fix.
4409
4410 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
4411
4412 * class.c (emit_register_classes): Make the function uninlinable,
4413 do not set current_function_cannot_inline.
4414 * resource.c (write_resource_constructor): Do not reset
4415 flag_inline_functions around rest_of_compilation.
4416
4417 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
4418
4419 PR java/15769
4420 * expr.c (java_truthvalue_conversion): Handle
4421 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4422 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4423 i.e. return the expression.
4424
4425 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
4426
4427 * gjavah.c: Include version.h
4428
4429 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
4430
4431 * jcf-write.c (generate_bytecode_conditional): Correct handling
4432 of unordered conditionals. Add comment.
4433
4434 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
4435 Per Bothner <per@bothner.com>
4436
4437 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4438 local variable was initialised upon declaration.
4439 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4440 variable was final and initialised upon declaration.
4441 * check-init.c (check_final_reassigned): Give error only if a blank
4442 final is not definitely unassigned or if an initialised final is
4443 reassigned.
4444 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4445 assignment expressions. Remove case MODIFY_EXPR, label do_default.
4446 (check_init): Perform initialised-variable-removing-optimisation
4447 only on non-final local variables.
4448
4449 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4450
4451 * jcf-write.c (generate_bytecode_conditional): Handle binops
4452 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4453 and LTGT_EXPR.
4454 (generate_bytecode_insns): Likewise.
4455
4456 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4457
4458 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4459 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4460
4461 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4462
4463 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4464 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4465
4466 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
4467
4468 * decl.c (struct binding_level): Add GTY marker. Compile
4469 binding_depth unconditionally.
4470 (current_binding_level, free_binding_level, global_binding_level):
4471 Likewise.
4472 (clear_binding_level): Unconditionally set binding_depth.
4473 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4474
4475 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
4476
4477 * lex.c (java_new_lexer): Set 'encoding'.
4478 (java_read_char): Improve error message for unrecognized characters.
4479 * lex.h (struct java_lexer): New field 'encoding'.
4480
4481 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4482
4483 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4484
4485 2004-05-21 Mark Wielaard <mark@klomp.org>
4486
4487 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4488 extern.
4489
4490 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
4491
4492 * typeck.c: Remove non-printable character 160.
4493
4494 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
4495
4496 * check-init.c: Correct minor typos.
4497
4498 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4499
4500 * Make-lang.in, expr.c, java-gimplify.c: Rename
4501 tree-simple.[ch] to tree-gimple.[ch].
4502
4503 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
4504
4505 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4506
4507 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4508
4509 Merge from tree-ssa-20020619-branch. See
4510 ChangeLog.tree-ssa for details.
4511
4512 * Make-lang.in, builtins.c, check-init.c, class.c,
4513 constants.c, decl.c, except.c, expr.c, java-except.h,
4514 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4515 lang.c, lang.opt, parse.y, resource.c: Merged.
4516 * java-gimplify.c: New file.
4517
4518 2004-05-10 Andrew Haley <aph@redhat.com>
4519
4520 * parse.y (create_class): Set TYPE_VFIELD.
4521 * decl.c (java_init_decl_processing): Likewise.
4522
4523 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4524 * class.c (make_method_value): Replace DECL_VINDEX with call to
4525 get_method_index().
4526 (get_dispatch_vector): Likewise.
4527 (layout_class_method): Likewise.
4528 Replace set of DECL_VINDEX with call to set_method_index().
4529 (set_method_index): New function.
4530 (get_method_index): New function.
4531 * java-tree.h (set_method_index): New function decl.
4532 (get_method_index): New function decl.
4533
4534 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
4535
4536 * parse.y (check_pkg_class_access): Add new argument
4537 and use it when cl is NULL to call lookup_cl on it.
4538 (parser_check_super_interface): Do not call lookup_cl.
4539 Pass this_decl to check_pkg_class_access and NULL
4540 instead of lookup_cl.
4541 (parser_check_super): Update for change in
4542 check_pkg_class_access.
4543 (do_resolve_class): Likewise.
4544 (process_imports): Likewise.
4545 (find_in_imports_on_demand): Likewise.
4546 (resolve_qualified_expression_name): Likewise.
4547
4548 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
4549
4550 Fixes PR java/9685, PR java/15073
4551 * parse.y (accessibility_string): New method.
4552 (not_accessible_field_error): Use accessibility_string()
4553 instead of java_accstring_lookup().
4554 (resolve_qualified_expression_name): Check with
4555 check_pkg_class_access() before allowing access using
4556 qualified names.
4557 Fix comment typo.
4558 Use check_pkg_class_access() instead of not_accessible_p()
4559 for unqualified types.
4560 (not_accessible_p): Use DECL_CONTEXT (member) instead of
4561 REFERENCE for package-private access checking.
4562 (patch_method_invocation): Use accessibility_string() instead
4563 of java_accstring_lookup().
4564
4565 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
4566
4567 Fixes PR java/15133
4568 * gjavah.c (struct method_name): Add member is_native.
4569 (overloaded_jni_method_exists_p): Match candidate method only if
4570 it is native.
4571 (print_method_info): Initialise is_native flag from the method's
4572 access flags.
4573
4574 2004-04-30 Roger Sayle <roger@eyesopen.com>
4575
4576 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4577 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4578
4579 2004-04-22 Roger Sayle <roger@eyesopen.com>
4580
4581 * resource.c (write_resource_constructor): Guard call to possibly
4582 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4583
4584 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
4585
4586 * class.c (make_class_data): Add new field aux_info.
4587 * decl.c (java_init_decl_processing): Push type and decl for
4588 `aux_info'.
4589
4590 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4591
4592 * expr.c (expand_java_NEW): Don't use size argument for
4593 _Jv_AllocObject calls.
4594 * parse.y (patch_invoke): Likewise.
4595
4596 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
4597
4598 * expr.c (build_invokeinterface): Remove unused variables to
4599 fix warnings.
4600
4601 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
4602
4603 * class.c (get_interface_method_index): New function. Return dispatch
4604 index for interface method.
4605 (make_method_value): For interface methods, set index field to
4606 iface dispatch index, not DECL_VINDEX.
4607 * expr.c (build_invokeinterface): Use get_interface_method_index.
4608
4609 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4610
4611 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4612
4613 2004-03-31 Andrew Haley <aph@redhat.com>
4614
4615 PR java/14104
4616 * jcf-io.c (opendir_in_zip): Tidy up error handling.
4617
4618 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4619
4620 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4621 form of GTY markers.
4622
4623 2004-03-25 Marcus Meissner <meissner@suse.de>
4624
4625 PR java/14689:
4626 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4627
4628 2004-03-23 Tom Tromey <tromey@redhat.com>
4629
4630 PR java/14315:
4631 * jcf-write.c (make_class_file_name): Don't report if mkdir
4632 failed with EEXIST.
4633
4634 2004-03-23 Tom Tromey <tromey@redhat.com>
4635
4636 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4637
4638 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
4639
4640 * class.c, gjavah.c, lang.c: Fix comment typos.
4641 * gcj.texi: Fix typos.
4642
4643 2004-03-19 Per Bothner <per@bothner.com>
4644
4645 * gcj.texi (Code Generation): Document new flags and assert defaults.
4646
4647 * class.c (assume_compiled_node_struct): Rename type to
4648 class_flag_node_struct, as it is now also used for enable_assertions.
4649 Rename assume_compiled_node typedef. Rename excludep field to value.
4650 (find_assume_compiled_node): Rename function to find_class_flag_node.
4651 Minor optimization - avoid needless strlen.
4652 (add_assume_compiled): Some tweaking and optimization.
4653 Rename and generalize to add_class_flag takem an extra parameter.
4654 (add_assume_compled): New just calls add_class_flag.
4655 (add_enable_assert, enable_assertions): New functions.
4656 (enable_assert_tree): New static.
4657 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4658 * lang.opt (fenable-assertions, fenable-assertions=,
4659 fdisable-assertions, fdisable-assertions=): New options.
4660 * lang.c (java_handle_option): Handle new options.
4661 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
4662 class in an interface - create helper class nested in outer interface.
4663 (build_assertion): Short-circuit if enable_assertions is false.
4664
4665 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4666
4667 * java-tree.h: Changes throughout to add checking to macros
4668 and numerous whitespace changes.
4669 (VAR_OR_FIELD_CHECK): New macro.
4670 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4671 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4672
4673 2004-03-16 Per Bothner <per@bothner.com>
4674
4675 * jcf-jump.c (options): New --print-constants option.
4676 * gcj.texi (Invoking jcf-dump): Document --print-constants.
4677
4678 * jcf-dump.c (flag_print_constant_pool): Default to off.
4679 (print_constant_terse_with_index): New helper function.
4680 (various places): Check flag_print_constant_pool where missing.
4681 (main): If verbose set flag_print_constant_pool.
4682 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
4683
4684 2004-03-15 Andrew Haley <aph@redhat.com>
4685
4686 PR java/14581
4687 * parse.y (java_complete_lhs): Check that final variable has an
4688 initializer.
4689
4690 2004-03-12 Andrew Haley <aph@redhat.com>
4691
4692 PR java/14551
4693 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4694 conversion.
4695
4696 2004-02-29 Roger Sayle <roger@eyesopen.com>
4697
4698 * jcf-parse.c (java_parse_file): Handle the case that input_filename
4699 is NULL.
4700
4701 2004-02-27 Per Bothner <per@bothner.com>
4702
4703 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
4704 suggestion: Use build_incomplete_class_ref.
4705 This fixes PR java/13508, java/11714.
4706
4707 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
4708
4709 * java/parse.h: Update copyright.
4710
4711 2004-02-26 Andrew Haley <aph@redhat.com>
4712
4713 PR java/14231:
4714 * parse.y (check_interface_throws_clauses): Check for
4715 !METHOD_INVISIBLE (iface_method).
4716 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
4717 well as CLASS_ABSTRACT.
4718
4719 2004-02-25 Per Bothner <per@bothner.com>
4720
4721 * parse.y (build_assertion): If we're in an inner class, create the
4722 class$ helper routine in the outer class.
4723
4724 2004-02-19 Richard Henderson <rth@redhat.com>
4725
4726 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4727
4728 2004-02-16 Geoffrey Keating <geoffk@apple.com>
4729
4730 * Make-lang.in (java.install-man): Add extra dependencies.
4731
4732 2004-02-13 Geoffrey Keating <geoffk@apple.com>
4733
4734 * Make-lang.in: Install man pages under the same names
4735 (possibly transformed) as the program they document.
4736
4737 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
4738
4739 * gjavah.c: Include "intl.h".
4740 (error): New function.
4741 (main): Call gcc_init_libintl.
4742 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
4743 print_stub_or_jni, process_file, main): Use error rather than
4744 fprintf.
4745 (print_method_info, usage, help, version, main): Mark strings for
4746 translation with _. Avoid splitting up sentences. Send
4747 information messages to stdout.
4748 * jcf-dump.c: Include "intl.h".
4749 (main): Call gcc_init_libintl.
4750 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
4751 Mark error, usage and version messages for translation with _.
4752 Avoid splitting up sentences.
4753 * jv-scan.c: Include "intl.h".
4754 (fatal_error, warning): Change parameter s to msgid. Translate
4755 messages.
4756 (main): Call gcc_init_libintl.
4757 (usage, help, version): Mark error, usage and version messages for
4758 translation with _. Avoid splitting up sentences.
4759 * jvgenmain.c: Include "intl.h".
4760 (main): Call gcc_init_libintl.
4761 (usage, main): Mark error messages for translation with _.
4762 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
4763 JVGENMAIN_OBJS): Add intl.o.
4764 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
4765 java/jvgenmain.o): Update dependencies.
4766
4767 2004-02-08 Per Bothner <per@bothner.com>
4768
4769 * parse.y (resolve_qualified_expression_name): In case of inaccessible
4770 class don't use not_accessible_field_error, which can get confused.
4771
4772 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4773
4774 Make-lang.in (po-generated): Delete.
4775
4776 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4777
4778 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
4779 Depend on target.h.
4780 * decl.c: Include target.h.
4781 (start_java_method): Replace PROMOTE_PROTOTYPES with
4782 targetm.calls.promote_prototypes.
4783 * expr.c: Include target.h.
4784 (pop_arguments): Replace PROMOTE_PROTOTYPES with
4785 targetm.calls.promote_prototypes.
4786 * parse.y: Include target.h.
4787 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
4788 with targetm.calls.promote_prototypes.
4789
4790 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4791
4792 * typeck.c: Update copyright.
4793
4794 2004-02-02 Tom Tromey <tromey@redhat.com>
4795
4796 * decl.c (java_init_decl_processing): Remove duplicate
4797 gnu/gcj/RawData.
4798
4799 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
4800
4801 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4802
4803 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
4804
4805 * expr.c (build_field_ref): Move variable
4806 definition up.
4807
4808 2004-01-28 Andrew Haley <aph@redhat.com>
4809
4810 * expr.c (build_field_ref): Widen field offset.
4811
4812 2004-01-27 Andrew Haley <aph@redhat.com>
4813
4814 java/13273
4815 * parse.y (check_interface_throws_clauses): Make sure class_decl
4816 has been loaded.
4817
4818 2004-01-22 Jeff Sturm <jsturm@one-point.com>
4819
4820 PR java/13733
4821 * parse.y (patch_assignment): Don't modify lhs_type for
4822 reference assignments.
4823
4824 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4825
4826 * Make-lang.in: Replace $(docdir) with doc.
4827 (java.info, java.srcinfo, java.man, java.srcman): New rules.
4828 (java.install-man): Revamp rule.
4829
4830 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
4831
4832 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
4833 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
4834 instead of deferred backquote.
4835
4836 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
4837
4838 * typeck.c (find_method_in_interfaces): Move variable
4839 definition up.
4840
4841 2004-01-16 Andrew Haley <aph@redhat.com>
4842
4843 PR java/13273:
4844 * typeck.c (shallow_find_method): New.
4845 (find_method_in_superclasses): New.
4846 (find_method_in_interfaces): New.
4847 (lookup_do): Rewrite.
4848 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
4849
4850 * jcf-parse.c (read_class): Save and restore output_class.
4851 * decl.c (java_expand_body): Set output_class from fndecl.
4852
4853 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
4854
4855 * class.c (gen_indirect_dispatch_tables): Fix string length
4856 calculations.
4857
4858 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
4859
4860 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
4861 (java.srcextra): Copy above back to source directory if requested.
4862 (po-generated): Delete reference to $(parsedir).
4863 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
4864 Use implicit rule.
4865
4866 2004-01-14 Jan Hubicka <jh@suse.cz>
4867
4868 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4869 estimation.
4870
4871 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4872
4873 * java-tree.h (java_expand_expr): Change prototype.
4874 * expr.c (java_expand_expr): Add alt_rtl parameter.
4875
4876 2004-01-09 Andrew Haley <aph@redhat.com>
4877
4878 PR java/12755:
4879 * parse.y (java_fix_constructors): Set output_class.
4880 (java_reorder_fields): Likewise.
4881 (java_layout_classes): Likewise.
4882 (java_expand_classes): Generate indirect dispatch tables.
4883 (java_expand_classes): Set output_class.
4884 (java_finish_classes): Likewise.
4885 * lang.c (java_init): Turn on always_initialize_class_p if we're
4886 using indirect dis[atch.
4887 (java_decl_ok_for_sibcall): Use output_class, not current_class.
4888 (java_get_callee_fndecl): Use class local atable.
4889 * jcf-parse.c
4890 (always_initialize_class_p): Decl moved to java-tree.h.
4891 (HANDLE_CLASS_INFO): Set output_class.
4892 (read_class): Likewise.
4893 (parse_class_file): Call gen_indirect_dispatch_tables.
4894 (parse_zip_file_entries): Set output_class.
4895 (java_parse_file): Set output_class. Don't emit symbol tables.
4896 * java-tree.h (output_class): New.
4897 Remove global declarations for otable, atable, and ctable.
4898 (always_initialize_class_p): moved here from decl.c.
4899 (DECL_OWNER): New.
4900 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
4901 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
4902 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
4903 (struct lang_type): Add otable_methods, otable_decl,
4904 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
4905 ctable_decl, catch_classes, type_to_runtime_map.
4906 * expr.c (build_field_ref): Make otable, atable, and ctable class
4907 local rather than global.
4908 (build_known_method_ref): Likewise.
4909 (build_invokeinterface): Likewise.
4910 (java_expand_expr): Pass runtime type (rather than actual type) to
4911 expand_start_catch.
4912 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
4913 this class. Look up each class in that map to delete duplicates.
4914 (expand_end_java_handler): Pass runtime type (rather than actual
4915 type) to expand_start_catch.
4916 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
4917 (do_nothing): New.
4918 (java_init_decl_processing): Rearrange things. Remove global
4919 declarations of otable, atable, and ctable.
4920 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
4921 (java_expand_body): Set output_class.
4922 * constants.c (build_constant_data_ref): Use output_class, not
4923 current_class.
4924 (alloc_name_constant): Likewise.
4925 * class.c (gen_indirect_dispatch_tables): New.
4926 (build_class_ref): Generate hard reference to superclass, even if
4927 using indirect dispatch.
4928 (build_static_field_ref): Use class local atable.
4929 (make_class_data): Generate hard reference to superclass, even if
4930 using indirect dispatch.
4931 Generate symbolic references to interfaces when using indirect
4932 dispatch.
4933 (make_class_data): Emit otable, atable, and ctable.
4934 Make otable, atable, and ctable class local rather than global.
4935 (emit_catch_table): Make otable, atable, and ctable class local
4936 rather than global.
4937
4938 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
4939
4940 * parse.y (catch_clause_parameter): Fix typo.
4941
4942 PR java/13404
4943 * parse.y: (catch_clause_parameter): Return early if $3, aka
4944 formal_parameter, is null.
4945
4946 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
4947
4948 * class.c: Remove uses of "register" specifier in
4949 declarations of arguments and local variables.
4950 * decl.c: Likewise.
4951 * expr.c: Likewise.
4952 * gjavah.c: Likewise.
4953 * jcf-dump.c: Likewise.
4954 * jcf-io.c: Likewise.
4955 * jcf-parse.c: Likewise.
4956 * jcf-write.c: Likewise.
4957 * keyword.h: Likewise.
4958 * parse.y: Likewise.
4959 * typeck.c: Likewise.
4960 * verify.c: Likewise.
4961
4962 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
4963
4964 * Make-lang.in (GCJ_CROSS_NAME): Delete.
4965 (java.install_common, java.install-man): Adjust for above.
4966 (java.uninstall): Likewise.
4967
4968 2003-12-03 Michael Koch <konqueror@gmx.de>
4969
4970 * class.c (make_class_data):
4971 Push field value to 'hack_signers' instead of 'signers'.
4972 * decl.c (java_init_decl_processing):
4973 Push field 'hack_signers' instead of 'signers'.
4974
4975 2003-12-03 Zack Weinberg <zack@codesourcery.com>
4976
4977 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4978 including iconv.h.
4979
4980 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
4981
4982 PR java/12374:
4983 * parse.y (qualify_ambiguous_name): Remove lots of broken
4984 field access processing - there's no need to do that here,
4985 because we have resolve_field_access. Remove
4986 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
4987 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
4988 used.
4989
4990 2003-12-01 Jeff Sturm <jsturm@one-point.com>
4991
4992 Fix PR java/13237
4993 * parse.y (java_complete_lhs): Save location prior to patching
4994 CALL_EXPR.
4995
4996 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
4997
4998 PR java/12548
4999 * resource.c (write_resource_constructor): Append
5000 "_resource" to constructor identifier name.
5001
5002 2003-11-25 Jeff Sturm <jsturm@one-point.com>
5003
5004 Fix PR java/13183.
5005 * constants.c (cpool_for_class): New function.
5006 (outgoing_cpool): Remove global variable.
5007 (alloc_name_constant): Use cpool_for_class.
5008 (build_constants_constructor): Likewise.
5009 * decl.c (java_expand_body): Set current_class.
5010 * java-tree.h (outgoing_cpool) Remove declaration.
5011 (init_outgoing_cpool): Likewise.
5012 * jcf-parse.c (init_outgoing_cpool): Remove function.
5013 (parse_class_file): Don't call init_outgoing_cpool.
5014 * parse.y (java_complete_expand_methods): Don't call
5015 init_outgoing_cpool. Don't save outgoing_cpool.
5016 (java_expand_classes): Don't restore outgoing_cpool.
5017 (java_finish_classes): Likewise.
5018
5019 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
5020
5021 * Make-lang.in: (java.install-common) Add
5022 symlink for $(target_noncanonical)-gcjh for
5023 native builds.
5024
5025 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5026
5027 * Make-lang.in (java.extraclean): Delete.
5028
5029 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5030
5031 * Make-lang.in (check-java): Add.
5032
5033 2003-11-19 Jeff Sturm <jsturm@one-point.com>
5034
5035 Fix PR java/13024.
5036 * except.c (prepare_eh_table_type): Allocate variable-sized
5037 buffer `buf' with alloca.
5038
5039 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5040
5041 Fix PR java/12857.
5042
5043 decl.c (java_init_decl_processing): Don't initialize
5044 class_not_found_type_node, no_class_def_found_type_node.
5045
5046 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5047 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5048 (class_not_found_type_node, no_class_def_found_type_node):
5049 Don't define.
5050
5051 parse.y (build_dot_class_method_invocation): Add this_class
5052 argument. Qualify method invocations to a different class.
5053 (create_new_parser_context): Initialize saved_data_ctx to 0.
5054 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5055 (build_dot_class_method): Don't load classes. Register
5056 incomplete types.
5057 (build_incomplete_class_ref): Special cases for interfaces
5058 and inner classes. Move build_dot_class_method call to here...
5059 (patch_incomplete_class_ref): ...from here. Pass current_class
5060 to build_dot_class_method_invocation.
5061 (build_assertion): Pass class_type to
5062 build_dot_class_method_invocation.
5063 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5064
5065 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5066
5067 Fix PR java/12739.
5068 * java-tree.h (BLOCK_EMPTY_P): Define.
5069 * parse.y (java_complete_lhs): Check for empty blocks
5070 in TRY_FINALLY_EXPR case.
5071
5072 2003-11-17 Andrew Haley <aph@redhat.com>
5073
5074 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5075 (struct lang_decl_var:freed): New variable.
5076 * decl.c (poplevel): Mark local vars that have gone out of scope.
5077 (push_jvm_slot): Don't use the RTL of a var that has gone out of
5078 scope.
5079
5080 2003-11-16 Jason Merrill <jason@redhat.com>
5081
5082 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5083 and TAGS files that include them for each front end.
5084
5085 2003-11-15 Tom Tromey <tromey@redhat.com>
5086
5087 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5088
5089 2003-11-12 Jason Merrill <jason@redhat.com>
5090
5091 PR optimization/12547
5092 * lang.c (java_tree_inlining_walk_subtrees): Just walk
5093 BLOCK_EXPR_BODY directly.
5094
5095 2003-11-12 Andrew Haley <aph@redhat.com>
5096
5097 PR java/11045
5098 * parse.y (fold_constant_for_init): Check that we really do have a
5099 constant.
5100
5101 PR java/11533
5102 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5103 init_test_decls being inlined.
5104
5105 PR java/12890:
5106 * parse.y (do_resolve_class): Check return value from
5107 breakdown_qualified().
5108
5109 2003-11-11 Tom Tromey <tromey@redhat.com>
5110
5111 PR java/12915:
5112 * parse.y (merge_string_cste): Handle case where we have a
5113 pointer that happens to be zero, not null_pointer_node.
5114
5115 2003-11-10 Tom Tromey <tromey@redhat.com>
5116
5117 * jcf-parse.c (classify_zip_file): Correctly compare
5118 filename_length against length of manifest file's name.
5119
5120 2003-11-08 Tom Tromey <tromey@redhat.com>
5121
5122 PR java/12894:
5123 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5124
5125 2003-11-06 Andrew Haley <aph@redhat.com>
5126
5127 * expr.c (java_stack_swap): Make sure destination stack slots are
5128 of the correct type.
5129
5130 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
5131
5132 * Make-lang.in (dvi): Move targets to $(docobjdir).
5133 (gcj.dvi): Simplify rule and adjust target.
5134 (gcj.info): Simplify rule.
5135 (gcj.pod): New intermediate rule.
5136 (gcjh.pod): Likewise.
5137 (jv-scan.pod): Likewise.
5138 (jcf-dump.pod): Likewise.
5139 (gij.pod): Likewise.
5140 (jv-convert.pod): Likewise.
5141 (rmic.pod): Likewise.
5142 (rmiregistry.pod): Likewise.
5143 (gcj.1): Delete.
5144 (gcjh.1): Delete.
5145 (jv-scan.1): Delete.
5146 (jcf-dump.1): Delete.
5147 (gij.1): Delete.
5148 (jv-convert.1): Delete.
5149 (rmic.1): Delete.
5150 (rmiregistry.1): Delete.
5151
5152 2003-11-02 Jeff Sturm <jsturm@one-point.com>
5153
5154 Fixes PR java/12866.
5155 * parse.y (resolve_qualified_expression_name): Move test
5156 for outer field access methods from here...
5157 (check_thrown_exceptions) ...to here.
5158
5159 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
5160
5161 * .cvsignore: Delete.
5162
5163 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
5164
5165 * verify.c (verify_jvm_instructions): Don't warn about legal
5166 eh binding regions generated for example by jdk 1.4.1.
5167
5168 2003-10-24 David S. Miller <davem@redhat.com>
5169
5170 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5171
5172 2003-10-22 Andrew Haley <aph@redhat.com>
5173
5174 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5175 (java_get_callee_fndecl): New.
5176
5177 * jcf-parse.c (java_parse_file): Call emit_catch_table().
5178
5179 * java-tree.h (ctable_decl): New.
5180 (catch_classes): New.
5181 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5182
5183 * decl.c (java_init_decl_processing): Add catch_class_type.
5184 Add ctable_decl.
5185 Add catch_classes field.
5186
5187 * class.c (build_indirect_class_ref): Break out from
5188 build_class_ref.
5189 (make_field_value): Check flag_indirect_dispatch.
5190 (make_class_data): Ditto.
5191 Tidy uses of PUSH_FIELD_VALUE.
5192 Add field catch_classes.
5193 (make_catch_class_record): New.
5194
5195 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5196
5197 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5198
5199 * jcf-write.c: Follow spelling conventions.
5200 * parse.y: Likewise.
5201
5202 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5203
5204 * ChangeLog: Fix typos.
5205 * expr.c: Fix comment typos.
5206 * jcf-write.c: Likewise.
5207 * lang.c: Likewise.
5208 * lex.c: Likewise.
5209 * mangle.c: Likewise.
5210 * parse-scan.y: Likewise.
5211 * parse.y: Likewise.
5212
5213 2003-10-22 Tom Tromey <tromey@redhat.com>
5214
5215 * expr.c (expand_byte_code): Only warn about dead bytecode when
5216 extra_warnings is set.
5217
5218 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
5219
5220 Fix for PR java/12586.
5221 * mangle.c (find_compression_record_match): Don't iterate through
5222 package namespace elements unless they all match compression_table
5223 entries.
5224
5225 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
5226
5227 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5228 (generate-manpages): Likewise.
5229 (java.maintainer-clean): Likewise.
5230 (gcj.info): Likewise.
5231 (gcj.1): Likewise.
5232 (gcjh.1): Likewise.
5233 (jv-scan.1): Likewise.
5234 (jcf-dump.1): Likewise.
5235 (gij.1): Likewise.
5236 (jv-convert.1): Likewise.
5237 (rmic.1): Likewise.
5238 (rmiregistry.1): Likewise.
5239 (java.install-man): Likewise.
5240 (parse-scan.o): Move and define complete compile line.
5241 (parse.o): Likewise.
5242 (jcf-tree-inline.o): Move.
5243
5244 2003-10-20 Mark Mitchell <mark@codesourcery.com>
5245
5246 * Make-lang.in (info): Update dependencies.
5247 (java.install-info): Remove.
5248 ($(srcdir)/java/gcj.info): Replace with ...
5249 ($(docobjdir)/gcj.info): ... this.
5250
5251 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
5252
5253 * Make-lang.in: Replace uses of $(target_alias) with
5254 $(target_noncanonical).
5255
5256 2003-10-09 Tom Tromey <tromey@redhat.com>
5257
5258 * decl.c (java_init_decl_processing): Declare signers field.
5259 * class.c (make_class_data): Set signers field.
5260
5261 2003-10-09 Jason Merrill <jason@redhat.com>
5262
5263 * parse.y (patch_assignment): Use make_node to create a BLOCK.
5264 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5265 POINTER_TYPE.
5266
5267 2003-10-06 Mark Mitchell <mark@codesourcery.com>
5268
5269 * Make-lang.in (java.info): Replace with ...
5270 (info): ... this.
5271 (java.dvi): Replace with ...
5272 (dvi): ... this.
5273 (java.generated-manpages): Replace with ...
5274
5275 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
5276
5277 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5278
5279 2003-10-01 Andrew Haley <aph@redhat.com>
5280
5281 * jcf-parse.c (java_parse_file): Write otable and atable.
5282 * java-tree.h (atable_methods): New.
5283 (atable_decl): New.
5284 (atable_syms_decl): New.
5285 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5286 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5287 (symbol_*type): Rename method_symbol* to symbol*type.
5288 (emit_offset_symbol_table): Delete.
5289 (emit_symbol_table): New.
5290 (get_symbol_table_index): New.
5291 (atable_type): New.
5292 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5293 (build_known_method_ref): Likewise.
5294 (get_symbol_table_index): Rename from get_offset_table_index.
5295 Parameterize to allow re-use by differing types of symbol table.
5296 (build_invokevirtual): Pass table to get_offset_table_index.
5297 * decl.c (java_init_decl_processing): Push types and decls for
5298 atable and atable_syyms.
5299 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5300 (make_class_data): Add new fields atable and atable_syms.
5301 (emit_symbol_table): Rename from emit_offset_symbol_table.
5302 Parameterize to allow re-use by different types of symbol table.
5303 (build_symbol_entry): Renamed from build_method_symbols_entry.
5304
5305 2003-09-30 Roger Sayle <roger@eyesopen.com>
5306
5307 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5308 semantics for SAVE_EXPR, by caching the result in a temporary.
5309
5310 2003-09-28 Richard Henderson <rth@redhat.com>
5311
5312 * check-init.c (check_init): Save and restore input_location
5313 instead of file and line separately.
5314 * decl.c (java_expand_body): Likewise.
5315 * jcf-write.c (generate_bytecode_insns): Likewise.
5316 * parse.y (safe_layout_class): Likewise.
5317 * jcf-parse.c (read_class, parse_class_file): Likewise.
5318 (java_parse_file): Use %H for warning locator.
5319
5320 2003-09-28 Roger Sayle <roger@eyesopen.com>
5321
5322 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5323 with void-type branches instead of using a COMPOUND_EXPR.
5324
5325 2003-09-28 Jeff Sturm <jsturm@one-point.com>
5326
5327 * decl.c (java_optimize_inline, dump_function): Remove.
5328 * java-tree.h (java_optimize_inline): Remove declaration.
5329 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5330 * parse.y (source_end_java_method, java_expand_classes):
5331 Likewise. Remove dead code.
5332
5333 2003-09-27 Roger Sayle <roger@eyesopen.com>
5334
5335 * lang.c (java_init_options): Set flag_evaluation_order.
5336 * expr.c (force_evaluation_order): Don't attempt to force
5337 evaluation order of binary operations using save_expr.
5338 * parse.y (java_complete_lhs): No longer need to call
5339 force_evaluation_order when constructing binary operators.
5340
5341 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5342 Bryce McKinlay <bryce@mckinlay.net.nz>
5343
5344 PR java/1333:
5345 * parse.y (not_accessible_field_error): New function.
5346 (resolve_expression_name): Check field access permissions.
5347 (resolve_qualified_expression_name): Use
5348 not_accessible_field_error.
5349 (resolve_qualified_expression_name): Likewise.
5350
5351 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5352
5353 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5354
5355 2003-09-23 Roger Sayle <roger@eyesopen.com>
5356
5357 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5358 with equal operands without side-effects.
5359
5360 2003-09-22 Jeff Sturm <jsturm@one-point.com>
5361
5362 * decl.c (java_init_decl_processing): Don't emit otable decls
5363 if flag_indirect_dispatch is not set.
5364
5365 2003-09-21 Richard Henderson <rth@redhat.com>
5366
5367 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5368 resource.c: Revert.
5369
5370 2003-09-21 Richard Henderson <rth@redhat.com>
5371
5372 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5373 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5374
5375 2003-09-20 Richard Henderson <rth@redhat.com>
5376
5377 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5378
5379 2003-09-18 Roger Sayle <roger@eyesopen.com>
5380
5381 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5382 * check-init.c (check_init): Likewise.
5383
5384 2003-09-18 Roger Sayle <roger@eyesopen.com>
5385
5386 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5387
5388 2003-09-16 Andrew Haley <aph@redhat.com>
5389
5390 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5391
5392 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
5393
5394 Fixes PR java/9577
5395 * mangle.c (find_compression_record_match): Skip
5396 over a "6JArray" (the array template mangled string)
5397 IDENTIFIER_NODE.
5398 (mangle_array_type): Correct minor typo.
5399 (atms): Move definition to the beginning.
5400
5401 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
5402
5403 * class.c (add_miranda_methods): Ensure super-interfaces are laid
5404 out. Fix for PR java/12254.
5405
5406 2003-09-11 Richard Henderson <rth@redhat.com>
5407
5408 * parse.y (source_end_java_method): Update for new
5409 cgraph_finalize_function argument.
5410
5411 2003-09-09 Richard Henderson <rth@redhat.com>
5412
5413 * parse.y (source_end_java_method): Update call to
5414 cgraph_finalize_function.
5415
5416 2003-09-03 Jeff Sturm <jsturm@one-point.com>
5417
5418 * decl.c (java_expand_body): New function.
5419 * expr.c (build_class_init): Set DECL_IGNORED_P.
5420 * java-tree.h (start_complete_expand_method,
5421 java_expand_body): Declare.
5422 * jcf-parse.c (cgraph.h): Include.
5423 (java_parse_file): Handle flag_unit_at_a_time.
5424 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5425 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5426 (java_estimate_num_insns): Use walk_tree_without_duplicates.
5427 (java_start_inlining): New function.
5428 * parse.h (java_finish_classes): Declare.
5429 * parse.y: Include cgraph.h.
5430 (block): Don't special-case empty block production.
5431 (craft_constructor): Set DECL_INLINE.
5432 (source_end_java_method): Handle flag_unit_at_a_time.
5433 Replace inline code with call to java_expand_body.
5434 (start_complete_expand_method): Remove static modifier.
5435 (java_expand_method_bodies): Patch function tree for
5436 class initialization and/or synchronization as needed.
5437 Don't begin RTL expansion yet.
5438 (java_expand_classes): Check flag_unit_at_a_time before
5439 calling finish_class.
5440 (java_finish_classes): New function.
5441 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5442 (patch_assignment): Set DECL_CONTEXT on temporary variable.
5443 (emit_test_initialization): Set DECL_IGNORED_P.
5444
5445 2003-09-03 Roger Sayle <roger@eyesopen.com>
5446
5447 * builtins.c (enum builtin_type): Delete unused enumeration.
5448 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5449
5450 2003-08-28 Tom Tromey <tromey@redhat.com>
5451
5452 * gcj.texi (Extensions): Document gcjlib URLs.
5453
5454 2003-08-20 Tom Tromey <tromey@redhat.com>
5455
5456 * gcj.texi (Extensions): Added xref.
5457 (libgcj Runtime Properties): Document
5458 gnu.gcj.runtime.VMClassLoader.library_control.
5459
5460 2003-08-20 Andrew Haley <aph@redhat.com>
5461
5462 * except.c (prepare_eh_table_type): Use new encoding for exception
5463 handlers when using -fno-assume-compiled.
5464
5465 2003-08-13 Tom Tromey <tromey@redhat.com>
5466
5467 * gcj.texi (Invoking gij): Document -X and -?.
5468
5469 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
5470
5471 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5472 GCJH_OBJS, JCFDUMP_OBJS
5473 * win32-host.c: Removed the unnecessary and broken dependency
5474 on jcf.h
5475
5476 2003-08-11 Tom Tromey <tromey@redhat.com>
5477
5478 * parse.y (java_check_regular_methods): Typo fixes. Call
5479 check_interface_throws_clauses. Use
5480 check_concrete_throws_clauses.
5481 (check_interface_throws_clauses): New function.
5482 (check_concrete_throws_clauses): New function.
5483 (hack_is_accessible_p): New function.
5484 (find_most_specific_methods_list): Added FIXME.
5485 * typeck.c (lookup_do): Use `flags' argument to decide what to
5486 do. Reimplemented.
5487 (lookup_argument_method_generic): New function.
5488 (lookup_argument_method2): Removed.
5489 * jcf.h (ACC_INVISIBLE): New define.
5490 * jcf-write.c (generate_classfile): Skip invisible methods.
5491 * class.c (add_miranda_methods): New function.
5492 (layout_class_methods): Use it.
5493 (get_access_flags_from_decl): Use ACC_INVISIBLE.
5494 * java-tree.h (METHOD_INVISIBLE): New define.
5495 (lang_decl_func) [invisible]: New field.
5496 (lookup_argument_method_generic): Declare.
5497 (SEARCH_INTERFACE): New define.
5498 (SEARCH_SUPER): Likewise.
5499 (SEARCH_ONLY_INTERFACE): Likewise.
5500 (SEARCH_VISIBLE): Likewise.
5501 (lookup_argument_method2): Removed declaration.
5502
5503 2003-08-05 Tom Tromey <tromey@redhat.com>
5504
5505 Fix for PR java/11600:
5506 * parse.y (java_complete_lhs): See whether we're calling a method
5507 on an array.
5508 (check_thrown_exceptions): Added `is_array_call' argument;
5509 fixed `clone' checking; updated all callers.
5510
5511 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
5512
5513 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5514
5515 2003-08-03 Tom Tromey <tromey@redhat.com>
5516
5517 * java-tree.h (METHOD_TRANSIENT): Removed.
5518 * decl.c (pushdecl): Removed some dead code.
5519 * class.c (get_access_flags_from_decl): Can't have transient
5520 method.
5521 (add_method_1): Can't have a transient method.
5522
5523 2003-07-28 Andreas Jaeger <aj@suse.de>
5524
5525 * jvspec.c: Convert to ISO C90 prototypes.
5526
5527 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
5528
5529 * decl.c (force_poplevels): Fix warning call.
5530
5531 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5532
5533 * expr.c (expand_java_field_op): Don't use xxx_with_decl
5534 (expand_java_field_op): Likewise.
5535 * class.c (layout_class_method): Likewise
5536 (emit_register_classes): Likewise.
5537 * decl.c (pushdecl): Likewise.
5538 (poplevel): Likewise.
5539 (force_poplevels): Likewise.
5540 (give_name_to_locals): Likewise.
5541 * check-init.c (check_for_initialization): Likewise.
5542
5543 2003-07-24 Jason Merrill <jason@redhat.com>
5544
5545 * java-tree.h: Move boolean_type_node et al to the back end.
5546
5547 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5548
5549 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5550 casts.
5551
5552 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
5553
5554 * lang.opt: Don't show -MD_ and -MDD_.
5555
5556 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
5557
5558 * lang-options.h: Remove.
5559 * lang.opt: Add help text.
5560
5561 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
5562
5563 * expr.c: Remove the last argument to expand_assignment().
5564
5565 2003-07-09 Jan Hubicka <jh@suse.cz>
5566
5567 * java-tree.h (DECL_NUM_STMTS): Rename to...
5568 (DECL_ESTIMATED_INSNS): ... this.
5569 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5570 New static functions.
5571 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5572 * parser.y (add_stmt_to_compound): Do not account statements.
5573
5574 2003-07-08 Mark Wielaard <mark@klomp.org>
5575
5576 * gcj.texi: CNI now expands to Compiled Native Interface.
5577
5578 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5579
5580 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5581
5582 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
5583
5584 * expr.c (expand_byte_code): Adjist emit_line_note call.
5585
5586 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
5587
5588 * lang.c (java_handle_option): Don't handle filenames.
5589
5590 2003-07-02 Zack Weinberg <zack@codesourcery.com>
5591
5592 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5593 DIR_SEPARATOR.
5594 Use FILENAME_CMP.
5595 * jcf-write.c: Don't default-define DIR_SEPARATOR.
5596 * jcf.h: Delete COMPARE_FILENAMES definition.
5597
5598 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
5599
5600 * lang.c (java_init_options): Update prototype.
5601
5602 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
5603
5604 * decl.c (poplevel): Adjust define_label call.
5605
5606 2003-06-27 Zack Weinberg <zack@codesourcery.com>
5607
5608 * gjavah.c (flag_jni): Make non-static.
5609 * parse-scan.y (ctxp): Make non-static.
5610
5611 * class.c (build_method_symbols_entry)
5612 * expr.c (get_offset_table_index)
5613 * jcf-parse.c (jcf_parse):
5614 Mark the definition static, matching the forward declaration.
5615
5616 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
5617
5618 * lang.c (java_handle_option): Don't check for missing arguments.
5619
5620 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
5621
5622 * class.c (push_class): Use a location_t to save place.
5623 (emit_register_classes): Set input_location. Adjust
5624 expand_function_end call.
5625 * resource.c (write_resource_constructor): Likewise.
5626 * decl.c (end_java_method): Adjust expand_function_end call.
5627 * parse.y (source_end_java_method): Likewise.
5628
5629 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
5630
5631 * lang.c (java_handle_option): Likewise.
5632
5633 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
5634
5635 * lang.c (java_handle_option): Special-casing of optional
5636 joined arguments no longer needed.
5637 * lang.opt: Update switches that take optional argument.
5638
5639 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
5640
5641 * lang.opt: Declare Java.
5642 * lang.c (java_init_options): Update.
5643
5644 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
5645
5646 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5647
5648 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
5649
5650 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5651 * lang.c (java_handle_option): -MD and -MMD have an underscore.
5652 * lang.opt: -MD and -MMD have an underscore.
5653
5654 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
5655
5656 * class.c (emit_register_classes): Adjust init_function_start
5657 call.
5658 * decl.c (complete_start_java_method): Likewise.
5659 * resource.c (write_resource_constructor): Likewise.
5660
5661 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
5662
5663 * Make-lang.in: Update to use options.c and options.h.
5664 * lang.c: Include options.h not j-options.h.
5665 (java_handle_option): Abort on unrecognized option.
5666 (java_init_options): Request Java switches.
5667
5668 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
5669
5670 * Make-lang.in: Handle mostlyclean.
5671
5672 2003-06-11 Tom Tromey <tromey@redhat.com>
5673
5674 * lang.c (java_handle_option): Update dependency_tracking for
5675 OPT_MF case.
5676
5677 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5678 empty argument.
5679
5680 2003-06-10 Andrew Haley <aph@redhat.com>
5681
5682 * resource.c (write_resource_constructor): Use expand_expr to
5683 generate the address of the label attached to a resource.
5684 * Make-lang.in (java/resource.o): Add expr.h
5685
5686 2003-06-10 Andrew Haley <aph@redhat.com>
5687
5688 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5689 (java_decl_ok_for_sibcall): New.
5690
5691 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
5692
5693 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
5694 (java/j-options.c, java/j-options.h): New.
5695 * java-tree.h (resource_name, compile_resource_file,
5696 compile_resource_data): Constify.
5697 * jcf-write.c (jcf_write_base_directory): Similarly.
5698 * jcf.h (jcf_write_base_directory): Similarly.
5699 * lang.c: Include j-options.h.
5700 (cl_options_count, cl_options, string_option, java_decode_option,
5701 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
5702 process_option_with_no): Remove.
5703 (resource_name): Constify.
5704 (LANG_HOOKS_HANDLE_OPTION): Override.
5705 (java_handle_option): New.
5706 (java_init): Don't call jcf_path_init.
5707 (java_init_options): Call jcf_path_init.
5708 * lang.opt: New.
5709 * resource.c (compile_resource_data, compile_resource_file): Constify.
5710
5711 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
5712
5713 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
5714 (struct lang_decl_func): Add last_line field.
5715 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
5716 DECL_SOURCE_LINE_LAST): Remove.
5717 * parse.y (missing_return_error, finish_method_declaration,
5718 lookup_cl, start_artificial_method_body, source_end_java_method,
5719 start_complete_expand_method): Adjust.
5720
5721 2003-06-08 Tom Tromey <tromey@redhat.com>
5722
5723 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5724 fno-assume-compiled.
5725
5726 2003-06-08 Roger Sayle <roger@eyesopen.com>
5727
5728 * builtins.c (define_builtin_type, builtin_types): Delete.
5729 (define_builtin): Rewritten to take just the built-in code,
5730 the function's name, type and fallback library function name.
5731 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
5732 (initialize_builtins): Overhaul to define the GCC builtins
5733 used by gcj manually, providing the Java run-time's
5734 implementations as the fallback library function.
5735
5736 2003-06-08 Anthony Green <green@redhat.com>
5737
5738 * parse.y (patch_cast): Fix conversions from floating-point to
5739 integral types.
5740
5741 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
5742
5743 * Make-lang.in: Update.
5744 * lang.c: Include opts.h. Define cl_options_count and cl_options.
5745
5746 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
5747
5748 * lang.c (java_init_options): Update.
5749
5750 2003-06-05 Jan Hubicka <jh@suse.cz>
5751
5752 * Make-lang.in: Add support for stageprofile and stagefeedback
5753
5754 2003-05-31 Roger Sayle <roger@eyesopen.com>
5755
5756 * lang.c (java_init_options): Prescribe wrap-around two's
5757 complement arithmetic overflow by setting flag_wrapv.
5758
5759 2003-05-29 Roger Sayle <roger@eyesopen.com>
5760
5761 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
5762 (builtin_record): Add an additional builtin_code field to
5763 record which GCC built-in corresponds to the Java function.
5764 (java_builtins): Add new entries for atan, atan2, exp, log,
5765 pow and tan.
5766 (max_builtin, min_builtin, abs_builtin): Perform constant
5767 folding on the resulting tree.
5768 (java_build_function_call_expr): Likewise, perform constant
5769 folding on the resulting tree.
5770 (initialize_builtins): The NULL creators are now allowed in
5771 the java_builtins table, which is now terminated by an entry
5772 with builtin_code == END_BUILTINS.
5773 (check_for_builtin): Likewise. If the matching creator is
5774 NULL, construct the call using java_build_function_call_expr
5775 directly with the decl for the corresponding builtin_code.
5776
5777 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
5778
5779 * win32-host.c: Normalize copyright boilerplate.
5780
5781 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5782
5783 * parse.y (print_int_node): Use string concatentation on
5784 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
5785 function calls into one.
5786
5787 2003-05-13 Zack Weinberg <zack@codesourcery.com>
5788
5789 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
5790 fatal_io_error with calls to fatal_error; add ": %m" to the end of
5791 all the affected error messages.
5792
5793 2003-05-13 Richard Henderson <rth@redhat.com>
5794
5795 * class.c (layout_class_method): Set DECL_EXTERNAL.
5796 * decl.c (java_mark_decl_local, java_mark_class_local): New.
5797 * java-tree.h (java_mark_class_local): Declare.
5798 * jcf-parse.c (parse_class_file): Use it.
5799 * parse.y (java_expand_classes): Likewise.
5800
5801 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
5802
5803 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
5804 * lex.h: #include input.h.
5805 * jv-scan.c (input_filename): Remove.
5806
5807 2003-05-02 Tom Tromey <tromey@redhat.com>
5808
5809 PR java/10491:
5810 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5811 (handle_inner_classes): New function.
5812
5813 2003-05-01 Tom Tromey <tromey@redhat.com>
5814
5815 PR java/10459:
5816 * parse.y (finish_for_loop): Do nothing if update expression is a
5817 EXPR_WFL_NODE wrapping nothing.
5818 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
5819
5820 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
5821
5822 * lex.h (input_lineno): Remove declaration.
5823 * parse-scan.y: #include input.h.
5824 (input_filename): Remove declaration.
5825 (input_location): Add definition.
5826 (input_line): Remove definition.
5827
5828 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
5829
5830 * lex.h (lineno): Rename to ...
5831 (input_line): ... here
5832 * parse-scan.y (lineno): Rename to ...
5833 (input_line): ... here.
5834 (reset_report): Rename lineno to input_line.
5835 * check-init.c (check_init): Likewise.
5836 * class.c (push_class): Likewise.
5837 * decl.c (complete_start_java_method, end_java_method): Likewise.
5838 * expr.c (expand_byte_code): Likewise.
5839 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
5840 * jcf-write.c (generate_bytecode_insns): Likewise.
5841 * lex.c (java_init_lex, java_allocate_new_line,
5842 do_java_lex): Likewise.
5843 * parse.h (YYNOT_TWICE): Likewise.
5844 * parse.y (empty_statement, expression_statement,
5845 java_pop_parser_context, java_parser_context_save_global,
5846 yyerror, register_fields, method_header, safe_layout_class,
5847 find_in_imports_on_demand, create_artificial_method,
5848 source_end_java_method, start_complete_expand_method,
5849 build_thisn_assign, java_complete_lhs,
5850 maybe_absorb_scoping_block): Likewise.
5851
5852 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
5853
5854 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5855 '/' when computing java source filename
5856
5857 2003-04-13 Tom Tromey <tromey@redhat.com>
5858
5859 * gjavah.c (print_c_decl): Indentation fix.
5860
5861 2003-04-12 Zack Weinberg <zack@codesourcery.com>
5862
5863 * class.c (make_field_value, make_method_value, get_dispatch_table)
5864 (make_class_data, emit_offset_symbol_table)
5865 * constants.c (build_constants_constructor)
5866 * java-tree.h (START_RECORD_CONSTRUCTOR)
5867 * parse.y (maybe_build_array_element_wfl):
5868 Use build_constructor.
5869
5870 2003-04-10 Eric Blake <ebb9@email.byu.edu>
5871
5872 PR java/10253:
5873 * parse.y (string_convert_int_cst): Always use at least one digit
5874 in string conversion. Remove ASCII dependence.
5875 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
5876
5877 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
5878
5879 * Make-lang.in: added win32-host.c
5880 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
5881 resolves to open() on non-Win32 platforms and
5882 Win32-specific jcf_open_exact_case() on Win32
5883 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
5884 when trying .java and .class files
5885 * win32-host.c: added to repository. Defines
5886 Win32-specific jcf_open_exact_case()
5887
5888 2003-04-10 Andrew Haley <aph@redhat.com>
5889
5890 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
5891 (maybe_free_localvar): Renamed from localvar_free.
5892 Add new arg, really.
5893 (generate_bytecode_insns): Set new variable, jsrs.
5894 Only free local vars if no jsr insns have been emittted.
5895 Call maybe_free_localvar, not localvar_free.
5896
5897 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
5898
5899 * gcj.texi: Remove @ at start of file.
5900
5901 2003-03-25 Tom Tromey <tromey@redhat.com>
5902
5903 * parse.y (create_interface): Call CHECK_DEPRECATED.
5904
5905 2003-03-23 Zack Weinberg <zack@codesourcery.com>
5906
5907 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
5908
5909 2003-03-21 Zack Weinberg <zack@codesourcery.com>
5910
5911 * javaop.h (jfloat, jdouble): Make them structures mirroring
5912 the bit fields of IEEE float and double respectively.
5913 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
5914 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
5915 (union Word, union DWord): Delete.
5916 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
5917
5918 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
5919 D_NAN_MASK): Delete.
5920 (jni_print_float, jni_print_double): New. Generate
5921 hexadecimal floating constants.
5922 (print_field_info): Use jni_print_float/double.
5923
5924 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
5925 finite floating point numbers for output; special case
5926 non-finite floats.
5927
5928 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
5929
5930 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
5931 Replace 0 and 1 with true and false in return statements.
5932
5933 2003-03-19 Tom Tromey <tromey@redhat.com>
5934
5935 * lex.c (do_java_lex): Renamed from java_lex.
5936 (java_lex): New function.
5937 Include timevar.h.
5938
5939 2003-03-13 Tom Tromey <tromey@redhat.com>
5940
5941 * parse.y (resolve_inner_class): Error if qualifier is a primitive
5942 type.
5943
5944 2003-03-04 Andrew Haley <aph@redhat.com>
5945
5946 * gjavah.c (is_first_data_member): New global variable.
5947 (print_c_decl): If it's the first data member, align it as the
5948 superclass.
5949 (process_file): Set is_first_data_member.
5950
5951 2003-03-11 Tom Tromey <tromey@redhat.com>
5952
5953 * parse.y (resolve_field_access): Initialize class if field is
5954 found in another static field.
5955 * expr.c (build_class_init): Don't optimize out initialization of
5956 implemented interface.
5957
5958 2003-03-11 Andrew Haley <aph@redhat.com>
5959
5960 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5961 warning.
5962
5963 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
5964
5965 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5966 and DIR_SEPARATOR_2 for a target.
5967 Correct minor typos.
5968
5969 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5970 and DIR_SEPARATOR_2 for a target into account.
5971
5972 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
5973
5974 * lang.c (java_init): Update prototype, move code to java_post_options.
5975 (java_post_options): Similarly.
5976
5977 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
5978
5979 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
5980 compare file name components depending on the case-sensitivity
5981 or otherwise of the host file system.
5982
5983 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
5984 "strcmp" to compare file name components.
5985 Use IS_DIR_SEPARATOR instead of comparing directly against
5986 DIR_SEPARATOR.
5987 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5988 comparing directly against DIR_SEPARATOR.
5989
5990 2003-03-04 Tom Tromey <tromey@redhat.com>
5991
5992 * Make-lang.in (java.tags): New target.
5993
5994 2003-03-01 Roger Sayle <roger@eyesopen.com>
5995
5996 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5997 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5998
5999 2003-03-01 Tom Tromey <tromey@redhat.com>
6000
6001 * parse.y (jdep_resolve_class): Only check deprecation if we found
6002 a decl.
6003
6004 2003-02-28 Tom Tromey <tromey@redhat.com>
6005
6006 PR java/9695:
6007 * class.c (maybe_layout_super_class): Always pass a WFL to
6008 do_resolve_class.
6009 * parse.y (do_resolve_class): Updated comment to explain
6010 parameters.
6011
6012 2003-02-26 Tom Tromey <tromey@redhat.com>
6013
6014 * jcf-write.c (generate_classfile): Check whether class is
6015 deprecated before writing attribute count.
6016
6017 2003-02-25 Roger Sayle <roger@eyesopen.com>
6018
6019 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6020 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6021
6022 2003-02-23 Tom Tromey <tromey@redhat.com>
6023
6024 * lang-options.h: Added -Wdeprecated.
6025 * gcj.texi (Warnings): Document -Wdeprecated.
6026 * java-tree.h (flag_deprecated): Declare.
6027 * lang.c (lang_W_options): Added deprecated.
6028 (flag_deprecated): New global.
6029 * chartables.h: Rebuilt.
6030 * gen-table.pl (process_one): Look at whitespace.
6031 (print_tables): Define LETTER_SPACE, LETTER_MASK.
6032 * parse.h (CLEAR_DEPRECATED): New macro.
6033 (CHECK_DEPRECATED_NO_RESET): New macro.
6034 * jcf-parse.c (handle_deprecated): New function.
6035 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6036 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6037 * parse.y (resolve_type_during_patch): Check deprecation.
6038 (jdep_resolve_class): Likewise.
6039 (process_imports): Likewise.
6040 (resolve_expression_name): Likewise.
6041 (check_deprecation): Strip arrays from decl. Check
6042 flag_deprecated.
6043 (patch_method_invocation): Also check the particular constructor
6044 for deprecation.
6045 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6046 * jcf-write.c (append_deprecated_attribute): New function.
6047 (generate_classfile): Generate deprecated attribute when
6048 appropriate.
6049 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
6050 (java_lex) [case '*']: Simplify logic.
6051 (java_start_char_p): Use LETTER_MASK.
6052 (java_part_char_p): Likewise.
6053 (java_space_char_p): New function.
6054
6055 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
6056
6057 Change base class access representation.
6058 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6059 (add_interface_do): Likewise.
6060
6061 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
6062
6063 * decl.c (java_init_decl_processing): Change
6064 soft_lookupjnimethod_node to reflect the change in
6065 signature of _Jv_LookupJNIMethod in libjava/jni.cc
6066 * expr.c (build_jni_stub): Calculate and pass the size
6067 on the stack of the arguments to a JNI function. Use
6068 new target macro MODIFY_JNI_METHOD_CALL to allow a
6069 target to modify the call to a JNI method.
6070
6071 2003-02-08 Roger Sayle <roger@eyesopen.com>
6072
6073 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6074 instead of basename to avoid compiler warnings on Tru64.
6075
6076 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
6077
6078 * gcj.texi: Update to GFDL 1.2.
6079
6080 2003-01-31 Andrew Haley <aph@redhat.com>
6081
6082 * parse.y (java_expand_classes): Scan the whole class list looking
6083 for access methods that haven't yet been expanded.
6084
6085 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6086
6087 Fix for java/4269:
6088
6089 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6090 to fix bootstrap on sparc-unknown-netbsdelf1.5.
6091 * jcf-parse.c: Likewise.
6092
6093 2003-01-31 Mark Wielaard <mark@klomp.org>
6094
6095 * gjavah.c (throwable_p): Allocate 1 more byte for string.
6096
6097 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
6098
6099 * class.c (make_class): Use BINFO_ELTS.
6100 (set_super_info): Likewse.
6101 (add_interface_do): Likewise.
6102
6103 2003-01-30 Tom Tromey <tromey@redhat.com>
6104
6105 * jcf-parse.c (read_class): Update identifier's class value if it
6106 changed during parsing.
6107
6108 2003-01-30 Loren James Rittle <ljrittle@acm.org>
6109
6110 * Make-lang.in (po-generated): Find the targets in $(parsedir).
6111 Propagate change to all other rules as required.
6112 (java/parse-scan.o): Add explicit dependency on
6113 $(parsedir)/java/parse-scan.c .
6114
6115 2003-01-29 Tom Tromey <tromey@redhat.com>
6116
6117 * parse.y (patch_assignment): Only transform the rhs of an
6118 assignment when compiling to native.
6119
6120 2003-01-28 Tom Tromey <tromey@redhat.com>
6121
6122 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6123
6124 2003-01-28 Tom Tromey <tromey@redhat.com>
6125
6126 * lex.c (java_lex): Don't include UEOF as part of token.
6127 (java_read_unicode): Error if \u sequence prematurely terminated.
6128
6129 2003-01-27 Tom Tromey <tromey@redhat.com>
6130
6131 * parse.y (java_check_regular_methods): Check for construct after
6132 checking types in throws clause.
6133
6134 2003-01-24 Tom Tromey <tromey@redhat.com>
6135
6136 * class.c (build_static_field_ref): Only a String or numeric field
6137 can fold to a constant.
6138
6139 2003-01-23 Tom Tromey <tromey@redhat.com>
6140
6141 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6142 file name in resource buffer.
6143
6144 2003-01-23 Tom Tromey <tromey@redhat.com>
6145
6146 * expr.c (build_known_method_ref): Use method's context to find
6147 method table index.
6148
6149 2003-01-23 Tom Tromey <tromey@redhat.com>
6150
6151 * constants.c (set_constant_entry): Allocated cleared memory.
6152
6153 2003-01-22 Tom Tromey <tromey@redhat.com>
6154
6155 * java-tree.h: Don't use PARAMS.
6156 * resource.c: Add prototypes for all functions.
6157 (write_resource_constructor): Use `const char *' to avoid
6158 warning.
6159
6160 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
6161
6162 * jcf-parse.c (process_zip_dir): Remove unused variable.
6163
6164 2003-01-22 Tom Tromey <tromey@redhat.com>
6165
6166 * expr.c (build_invokeinterface): Abort if method's context is not
6167 an interface.
6168
6169 2003-01-22 Tom Tromey <tromey@redhat.com>
6170
6171 * gcj.texi (Input and output files): Mention non-class entries.
6172 * decl.c (java_init_decl_processing): Call
6173 init_resource_processing.
6174 * java-tree.h (compile_resource_data, write_resource_constructor,
6175 compile_resource_file, init_resource_processing): Declare.
6176 * config-lang.in (gtfiles): Added resource.c.
6177 * Make-lang.in (gt-java-resource.h): New target.
6178 (JAVA_OBJS): Added resource.o.
6179 (java/resource.o): New target.
6180 * resource.c: New file.
6181 * class.c (compile_resource_file): Moved to resource.c.
6182 (registerResource_libfunc): Likewise.
6183 (utf8_decl_list): Mark with GTY; now static.
6184 * jcf-parse.c (classify_zip_file): New function.
6185 (parse_zip_file_entries): Use it; compile .properties files.
6186 (process_zip_dir): Use classify_zip_file and compute_class_name.
6187 Don't write class name into zip directory.
6188 (java_parse_file): Call write_resource_constructor.
6189 (compute_class_name): New function.
6190 * jcf-io.c (read_zip_member): Reindented.
6191
6192 2003-01-21 Tom Tromey <tromey@redhat.com>
6193
6194 * class.c (supers_all_compiled): New function.
6195 (make_class_data): Use it.
6196
6197 2003-01-21 Tom Tromey <tromey@redhat.com>
6198
6199 * parse.y (method_header): Native method can't be strictfp.
6200 No method can be transient or volatile.
6201
6202 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6203
6204 Make-lang.in (jvspec.o-warn): Add -Wno-error.
6205
6206 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
6207
6208 * check-init.c: Fix comment typos.
6209 * class.c: Likewise.
6210 * constants.c: Likewise.
6211 * decl.c: Likewise.
6212 * except.c: Likewise.
6213 * expr.c: Likewise.
6214 * java-except.h: Likewise.
6215 * java-tree.h: Likewise.
6216 * javaop.h: Likewise.
6217 * jcf-dump.c: Likewise.
6218 * jcf-io.c: Likewise.
6219 * jcf-parse.c: Likewise.
6220 * jcf-write.c: Likewise.
6221 * lang.c: Likewise.
6222 * mangle.c: Likewise.
6223 * typeck.c: Likewise.
6224 * verify.c: Likewise.
6225
6226 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6227
6228 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6229 * jcf-write.c: Include "tm_p.h".
6230
6231 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6232
6233 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6234
6235 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6236
6237 * builtins.c (java_build_function_call_expr): Renamed from
6238 build_function_call_expr. All callers changed.
6239
6240 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6241 * jcf-parse.c: Include tm_p.h.
6242
6243 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6244 warning.
6245
6246 2003-01-14 Tom Tromey <tromey@redhat.com>
6247
6248 * class.c (make_class_data): Check that super is compiled before
6249 building class reference to it.
6250
6251 2003-01-14 Andrew Haley <aph@redhat.com>
6252
6253 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6254 varargs function -- correct.
6255
6256 2003-01-14 Andrew Haley <aph@redhat.com>
6257
6258 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6259
6260 2003-01-14 Andrew Haley <aph@redhat.com>
6261
6262 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6263 varargs function -- correct.
6264
6265 * parse.y (patch_assignment): Copy the rhs of an assignment into a
6266 temporary if the RHS is a reference.
6267
6268 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6269
6270 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6271 * keyword.h: Regenerated.
6272
6273 * All Files: Convert to ISO C style function definitions.
6274
6275 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6276
6277 * parse.y (check_pkg_class_access): ANSIfy definition.
6278
6279 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6280
6281 * decl.c, parse-scan.y, parse.y: Don't cast return value of
6282 xmalloc et al.
6283
6284 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6285
6286 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6287
6288 Merge from pch-branch:
6289
6290 2002-12-02 Geoffrey Keating <geoffk@apple.com>
6291
6292 * Make-lang.in (java/gjavah.o): Update dependencies.
6293 * gjavah.c: Include ggc.h.
6294
6295 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
6296
6297 * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6298 (JCFDUMP_OBJS): Add ggc-none.o.
6299 (java/jcf-dump.o): Depend on GGC_H.
6300 * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6301 CPool substructures.
6302 * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6303 * jcf-dump.c: Include ggc.h.
6304
6305 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
6306
6307 * jcf.h (union cpool_entry): New.
6308 (struct CPool): Use gengtype to mark. Change field 'data' to be
6309 an array of unions.
6310 (struct JCF): Use gengtype to mark.
6311 (CPOOL_UINT): Update for new cpool_entry type.
6312 (CPOOL_USHORT1): Likewise.
6313 (CPOOL_USHORT2): Likewise.
6314 (CPOOL_FINISH): Use GC to free cpool subfields.
6315 * parse.h (struct parser_ctxt): Mark field current_jcf.
6316 * lex.c (java_init_lex): Use GC to allocate struct JCF.
6317 * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6318 (main_jcf): Use gengtype to mark.
6319 (ggc_mark_jcf): Delete.
6320 (get_constant): Update for new cpool_entry type.
6321 (give_name_to_class): Likewise.
6322 (get_class_constant): Likewise.
6323 (init_outgoing_cpool): Use GGC to allocate struct CPool.
6324 (java_parse_file): Use GGC to allocate struct JCF.
6325 (init_jcf_parse): Don't call ggc_add_root.
6326 * jcf-reader.c (jcf_parse_constant_pool): Update for new
6327 cpool_entry type.
6328 * java-tree.h (current_jcf): Use gengtype to mark.
6329 (CPOOL_UTF): Update for new cpool_entry type.
6330 (outgoing_cpool): Use gengtype to mark.
6331 (struct lang_type): GC struct JCF and struct CPool.
6332 * config-lang.in (gtfiles): Add jcf.h.
6333 * constants.c (find_tree_constant): New.
6334 (set_constant_entry): Allocate cpool subfields using GGC. Update
6335 for new cpool_entry type.
6336 (find_constant1): Update for new cpool_entry type.
6337 (find_constant2): Likewise.
6338 (find_utf8_constant): Use find_tree_constant.
6339 (find_class_or_string_constant): Remove unnecessary cast to jword.
6340 Update for new cpool_entry type.
6341 (count_constant_pool_bytes): Update for new cpool_entry type.
6342 (write_constant_pool): Likewise.
6343 (alloc_name_constant): Use find_tree_constant.
6344 (build_constants_constructor): Update for new cpool_entry type.
6345
6346 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
6347
6348 * parse.y (mark_parser_ctxt): Delete.
6349 (goal): Don't use ggc_add_root.
6350 (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6351 (java_pop_parser_context): Let GC free parser_ctxt.
6352 (java_parser_context_resume): Likewise.
6353 * parse.h (struct parser_ctxt): Use gengtype to mark.
6354 (ctxp): Likewise.
6355 (ctxp_for_generation): Likewise.
6356 * lex.h (struct java_lc_s): Mark for gengtype.
6357 (java_lexer): Rearrange for gengtype.
6358 * config-lang.in (gtfiles): Add lex.h, parse.h.
6359
6360 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6361
6362 * All Files: Remove PARAMS macro.
6363
6364 * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6365 jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6366 `__STDC__' macros.
6367
6368 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6369 VA_CLOSE.
6370
6371 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
6372
6373 * Make-lang.in (java.install-common, java.uninstall,
6374 java.install-info, java.install-man): Prepend $(DESTDIR)
6375 to destination paths in all (un)installation commands.
6376 (java.install-common): Rewrite $(LN) command to support
6377 DESTDIR with "ln" as well as with "ln -s".
6378
6379 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6380
6381 * java-tree.h: Protect against multiple inclusion.
6382
6383 2003-01-07 Tom Tromey <tromey@redhat.com>
6384
6385 * class.c (add_assume_compiled): Don't adjust parent if we're
6386 already at the root of tree.
6387
6388 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6389
6390 * lang.c (dump_compound_expr): Prototype.
6391
6392 2003-01-03 Tom Tromey <tromey@redhat.com>
6393
6394 Fix for PR java/8712:
6395 * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6396 when simply checking against `null'.
6397
6398 2003-01-03 Tom Tromey <tromey@redhat.com>
6399
6400 * gcj.texi (Standard Properties): Document http.proxyHost and
6401 http.proxyPort.
6402
6403 * gcj.texi (GNU Classpath Properties): Document new properties.
6404
6405 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6406
6407 * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6408 java/lang-options.h, java/mangle.c, java/mangle_name.c,
6409 java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6410
6411 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
6412
6413 * Make-lang.in, boehm.c, buffer.c,
6414 buffer.h, builtins.c, class.c,
6415 config-lang.in, constants.c,
6416 convert.h, decl.c, except.c,
6417 expr.c, java-except.h,
6418 java-tree.h, javaop.def,
6419 jcf-parse.c, jcf-write.c,
6420 jv-scan.c, jvgenmain.c,
6421 jvspec.c, keyword.gperf,
6422 keyword.h, lang-options.h,
6423 lang-specs.h, lang.c, lex.c,
6424 lex.h, mangle.c, mangle_name.c,
6425 parse-scan.y, parse.h, parse.y,
6426 typeck.c, verify.c, xref.c,
6427 xref.h: Replace "GNU CC" with
6428 "GCC" in the copyright header.
6429
6430 * check-init.c, gjavah.c, javaop.h,
6431 jcf-depend.c, jcf-dump.c, jcf-io.c,
6432 jcf-path.c, jcf-reader.c, jcf.h,
6433 zextract.c, zipfile.h: These files are
6434 "part of GCC". Also say "GCC" not "GNU CC".
6435
6436 2002-12-30 DJ Delorie <dj@redhat.com>
6437
6438 * Make-lang.in: Protect against texi2pod/pod2man failing.
6439
6440 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
6441
6442 * gcj.texi: Use @copying.
6443
6444 2002-12-27 Mark Mitchell <mark@codesourcery.com>
6445
6446 * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6447 print_cxx_classname.
6448 (print_cxx_classname): Add add_scope parameter.
6449 (print_class_decls): Do not emit a semicolon after the extern
6450 "Java" block.
6451 (process_file): Adjust calls to print_cxx_classname.
6452
6453 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
6454
6455 * gcj.texi: Include Cover Texts in man page.
6456
6457 2002-12-23 Jeff Sturm <jsturm@one-point.com>
6458
6459 * class.c (build_static_field_ref): Check FIELD_FINAL.
6460
6461 * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6462 instead of current_constant_pool_data_ref.
6463 * java-tree.h (current_constant_pool_data_ref): Undefine.
6464 (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6465 * jcf-parse.c (init_outgoing_cpool): Don't initialize
6466 current_constant_pool_data_ref.
6467
6468 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6469 not build_internal_class_name.
6470
6471 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6472 Use it when class ref isn't certain to be compiled.
6473
6474 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
6475
6476 * gcj.texi: Include gcc-common.texi.
6477 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6478 $(srcdir)/doc/include/gcc-common.texi.
6479
6480 2002-12-22 Anthony Green <green@redhat.com>
6481
6482 * gcj.texi (Limitations): Add note about org.xml.sax and
6483 org.w3c.dom.
6484
6485 2002-12-20 Tom Tromey <tromey@redhat.com>
6486
6487 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6488 where minimum case value is Integer.MIN_VALUE.
6489 Fixes PR java/8955.
6490
6491 2002-12-18 Andrew Haley <aph@redhat.com>
6492
6493 * parse.y (patch_invoke): Force evaluation order when `check' is
6494 set. For PR libgcj/8945.
6495
6496 2002-12-16 Mark Mitchell <mark@codesourcery.com>
6497
6498 * gcj.texi: Change version number to 3.4.
6499
6500 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
6501 Andrew Haley <aph@redhat.com>
6502
6503 * parse.y (source_end_java_method): Remove custom encoding of line
6504 numbers for a function decl before passing it to the back end.
6505
6506 2002-12-03 Andrew Haley <aph@redhat.com>
6507
6508 * class.c (make_class_data): New field, "chain".
6509 * decl.c (java_init_decl_processing): Likewise.
6510
6511 2002-12-02 Tom Tromey <tromey@redhat.com>
6512
6513 For PR java/8740:
6514 * parse.y (do_resolve_class): Handle qualified name via
6515 recursion.
6516
6517 2002-11-30 Zack Weinberg <zack@codesourcery.com>
6518
6519 * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6520 constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6521 jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6522 jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6523 parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6524 Include coretypes.h and tm.h.
6525 * Make-lang.in: Update dependencies.
6526
6527 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6528
6529 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6530
6531 2002-11-25 Diego Novillo <dnovillo@redhat.com>
6532
6533 * jcf-reader.c: Don't expand JCF_readu4 inside the
6534 expansion of JCF_SKIP.
6535
6536 2002-11-25 Diego Novillo <dnovillo@redhat.com>
6537
6538 * jcf-reader.c: Don't expand JCF_readu4 inside the
6539 expansion of JCF_SKIP.
6540
6541 2002-11-22 Tom Tromey <tromey@redhat.com>
6542
6543 * parse.y (patch_binop): Cast right hand side of shift expression
6544 to `int'. Fixes PR java/8676.
6545
6546 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
6547 Andrew Haley <aph@redhat.com>
6548
6549 * gcc/java/jcf-write.c (write_classfile): Remove target
6550 class file, if it exists, before renaming the temporary
6551 class file to it.
6552
6553 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6554
6555 * jvspec.c (lang_specific_spec_functions): New.
6556
6557 2002-11-18 Tom Tromey <tromey@redhat.com>
6558
6559 Fix for PR java/7912:
6560 * expr.c (can_widen_reference_to): Allow cast of array to
6561 Cloneable or Serializable.
6562 * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6563 (java_io_serializable_identifier_node): Likewise.
6564 * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6565 (valid_ref_assignconv_cast_p): Use new identifier nodes.
6566 * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6567 java_io_serializable.
6568 * decl.c (java_init_decl_processing): Initialize
6569 java_lang_cloneable_identifier_node and
6570 java_io_serializable_identifier_node.
6571 (java_lang_cloneable_identifier_node): New global.
6572 (java_io_serializable_identifier_node): Likewise.
6573
6574 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
6575
6576 * buffer.c: Remove unnecessary casts.
6577 * check-init.c: Likewise.
6578 * class.c: Likewise.
6579 * constants.c: Likewise.
6580 * decl.c: Likewise.
6581 * except.c: Likewise.
6582 * gjavah.c: Likewise.
6583 * jcf-io.c: Likewise.
6584 * jcf-parse.c: Likewise.
6585 * jcf-path.c: Likewise.
6586 * jvspec.c: Likewise.
6587 * lang.c: Likewise.
6588 * lex.c: Likewise.
6589 * verify.c: Likewise.
6590
6591 2002-11-06 Tom Tromey <tromey@redhat.com>
6592
6593 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6594 a JNI header.
6595
6596 2002-11-05 Tom Tromey <tromey@redhat.com>
6597
6598 Fix for PR java/6388.
6599 * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6600 * java-tree.h (enum java_tree_index): New values
6601 JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6602 (decimal_int_max, decimal_long_max): New defines.
6603 * lex.c (yylex): Rewrote range checking. Sign extend literals.
6604 (error_if_numeric_overflow): Rewrote range checking.
6605 * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6606 decimal_long_max.
6607
6608 2002-11-02 Tom Tromey <tromey@redhat.com>
6609
6610 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6611
6612 * class.c (make_method_value): Put class name, not signature, into
6613 `throws' field. For PR java/8415.
6614
6615 2002-10-24 Tom Tromey <tromey@redhat.com>
6616
6617 * gcj.texi (Invoking gij): Document --showversion.
6618 (Standard Properties): java.library.path now set.
6619
6620 2002-10-23 Tom Tromey <tromey@redhat.com>
6621
6622 * gjavah.c (decode_signature_piece): In JNI mode, print
6623 `jobjectArray' when array depth is nonzero.
6624 Fixes PR java/8296.
6625
6626 2002-10-15 Andrew Haley <aph@redhat.com>
6627
6628 * parse.y (patch_invoke): Call force_evaluation_order on a static
6629 arg list.
6630 (resolve_qualified_expression_name): Call force_evaluation_order
6631 on a arg list that is part of a Qualified Expression Name.
6632
6633 * lang.c (dump_compound_expr): New.
6634 (java_dump_tree): New.
6635
6636 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
6637
6638 * gcj.texi: Added item describing the GCJ runtime property
6639 "gnu.gcj.progname".
6640
6641 2002-10-15 Richard Henderson <rth@redhat.com>
6642
6643 * jcf-parse.c (get_constant): Fix type warning.
6644
6645 2002-10-15 Andrew Haley <aph@redhat.com>
6646
6647 * java-tree.h (java_inlining_merge_static_initializers): Declare.
6648 (java_inlining_map_static_initializers): Declare.
6649
6650 2002-10-14 Andrew Haley <aph@redhat.com>
6651
6652 * tree-inline.c (remap_block): All local class initialization
6653 flags go in the outermost scope.
6654 (expand_call_inline): Call java_inlining_map_static_initializers.
6655 (expand_call_inline): Call java_inlining_merge_static_initializers.
6656 * java/lang.c (merge_init_test_initialization): New.
6657 (java_inlining_merge_static_initializers): New.
6658 (inline_init_test_initialization): New.
6659 (java_inlining_map_static_initializers): New.
6660
6661 2002-10-11 Mark Wielaard <mark@klomp.org>
6662
6663 * gcj.texi (Compatibility): Add Limitations and Extensions section.
6664
6665 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6666
6667 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6668
6669 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6670
6671 * parse.y (merge_string_cste): Add parentheses around & within |.
6672
6673 2002-10-08 Tom Tromey <tromey@redhat.com>
6674
6675 * parse.y (variable_declarator_id): Simplify error path for
6676 array declarator error. For PR java/8003.
6677
6678 2002-10-08 Zack Weinberg <zack@codesourcery.com>
6679
6680 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6681 bug_report_url.
6682
6683 2002-10-08 Andrew Haley <aph@redhat.com>
6684
6685 * parse.y (attach_init_test_initialization_flags): Check for
6686 error_mark_node.
6687
6688 2002-10-07 Anthony Green <green@redhat.com>
6689
6690 * parse.y (merge_string_cste): Fix bug in string concatenation.
6691
6692 2002-10-03 Michael Koch <konqueror@gmx.de>
6693
6694 * gcj.texi (Standard properties):
6695 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6696
6697 2002-10-02 Roger Sayle <roger@eyesopen.com>
6698
6699 PR optimization/6627
6700 * lang.c (java_init): If storing the vbit in function
6701 pointers, ensure that force_align_functions_log is atleast
6702 one to aid compatability with g++ vtables.
6703
6704 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
6705
6706 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6707 foul of type-based aliasing.
6708
6709 2002-09-30 Anthony Green <green@redhat.com>
6710
6711 * gcj.texi (Invoking jv-scan): Fix texinfo.
6712
6713 2002-09-28 Anthony Green <green@redhat.com>
6714
6715 * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
6716 (Code Generation): Add -fno-assert documentation.
6717 * jv-scan.c (flag_assert): New global.
6718 (options): Add assert option.
6719 (help): Add --no-assert documentation.
6720 * parse-scan.y (flag_assert): New global.
6721 * lang.c (lang_f_options): Add -fassert/-fno-assert support.
6722 (flag_assert): New global.
6723 * java-tree.h (flag_assert): New global.
6724 * lex.c (java_lex): Obey flag_assert.
6725 * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
6726 calling cc1.
6727
6728 2002-09-26 Andrew Haley <aph@redhat.com>
6729
6730 * expr.c (build_java_array_length_access): Check for null pointer.
6731 * expr.c (expand_java_arrayload): Likewise.
6732
6733 2002-09-21 Richard Henderson <rth@redhat.com>
6734
6735 * jcf-parse.c (get_constant): Decode from IEEE no matter
6736 what the target format.
6737
6738 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
6739
6740 * ChangeLog: Follow spelling conventions.
6741 * class.c: Likewise.
6742 * decl.c: Likewise.
6743 * expr.c: Likewise.
6744 * gjavah.c: Likewise.
6745 * java-tree.h: Likewise.
6746 * jcf-dump.c: Likewise.
6747 * jcf-parse.c: Likewise.
6748 * jvspec.c: Likewise.
6749 * lang.c: Likewise.
6750 * mangle.c: Likewise.
6751 * parse.y: Likewise.
6752
6753 2002-09-17 Tom Tromey <tromey@redhat.com>
6754
6755 * lex.c (java_read_unicode_collapsing_terminators): Handle case
6756 where \r appears at EOF. Fixes PR java/7950.
6757
6758 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6759
6760 * jvspec.c (lang_specific_driver): Remove unused variable.
6761
6762 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6763
6764 * java-tree.h (union lang_tree_node): Add chain_next option.
6765
6766 2002-09-16 Richard Henderson <rth@redhat.com>
6767
6768 * jcf-parse.c (get_constant): Runtime check for IEEE format;
6769 use new real.h interface.
6770 * jcf-write.c (find_constant_index): Use new real.h interface.
6771 * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
6772
6773 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6774
6775 * lang.c: Follow spelling conventions.
6776
6777 2002-09-11 Per Bothner <per@bothner.com>
6778
6779 * parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
6780 constant to the type of the field.
6781 (java_complete_tree): Remove now-redundant code.
6782
6783 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
6784
6785 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
6786
6787 For PR java/5794:
6788 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6789 return label if a ret instruction for the jsr has been reached.
6790
6791 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
6792
6793 * parse.y (DIR_SEPARATOR): Don't define.
6794 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6795
6796 2002-08-28 Andrew Haley <aph@redhat.com>
6797
6798 * verify.c (verify_jvm_instructions): Allow exception handler
6799 inside code that is being protected, but generate a warning.
6800 * except.c (link_handler): Initialize `expanded' in new eh_range.
6801 (binding_depth, is_class_level, current_pc): Declare extern.
6802
6803 2002-09-01 Mark Wielaard <mark@klomp.org>
6804
6805 * gcj.texi: Add chapter about system properties.
6806 Fixed some typos.
6807
6808 2002-08-26 Tom Tromey <tromey@redhat.com>
6809
6810 * parse.y (try_builtin_assignconv): Allow narrowing primitive
6811 conversion if RHS_TYPE is byte, short, or char.
6812
6813 2002-08-22 Tom Tromey <tromey@redhat.com>
6814
6815 * gcj.texi (Invoking gij): Document -cp and -classpath.
6816
6817 2002-08-21 Tom Tromey <tromey@redhat.com>
6818
6819 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6820 $(prefix)/share. For PR libgcj/7633.
6821
6822 For PR java/6005 and PR java/7611:
6823 * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
6824 (java_can_use_bit_fields_p): New function.
6825
6826 2002-08-16 Tom Tromey <tromey@redhat.com>
6827
6828 * gcj.texi (Class Initialization): Mention class initialization of
6829 arrays.
6830
6831 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
6832
6833 * Make-lang.in (java-tree-inline.o): New.
6834 (JAVA_OBJS): Add java-tree-inline.o.
6835 * parse.y (source_end_java_method): Call java_optimize_inline.
6836 (java_expand_method_bodies): Save method's tree in
6837 DECL_SAVED_TREE.
6838 (add_stmt_to_compound): Keep track of the number of statments.
6839 * lang.c (java_init): Enable flag_inline_trees.
6840 (java_post_options): If flag_inline_functions is on, enable
6841 flag_inline_trees instread.
6842 (decl_constant_value): New.
6843 (java_tree_inlining_walk_subtrees): New.
6844 * java-tree.h (DECL_NUM_STMTS): New macro.
6845 (java_optimize_inline): Declare.
6846 * expr.c (java_expand_expr): Allow a BLOCK to return a value.
6847 Handle a LABEL_EXPR.
6848 * decl.c (build_result_decl): If we already have a DECL_RESULT
6849 don't make another.
6850 (dump_function): New.
6851 (java_optimize_inline): New.
6852 (dump_function): New.
6853
6854 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
6855
6856 For PR java/7483:
6857 * parse.y (build_assertion): Invert return from
6858 desiredAssertionStatus.
6859
6860 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6861
6862 * jcf-write.c (get_access_flags): Return correct access flags for
6863 private and protected inner classes.
6864
6865 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6866
6867 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6868
6869 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
6870
6871 * mangle_name.c: Don't include obstack.h twice.
6872 * xref.c: Don't include obstack.h.
6873
6874 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
6875
6876 * class.c: (permanent_obstack): Delete declaration.
6877 * constants.c: (permanent_obstack): Delete declaration.
6878 * except.c: (permanent_obstack): Delete declaration.
6879 * expr.c: (permanent_obstack): Delete declaration.
6880 * jcf-parse.c: (permanent_obstack): Delete declaration.
6881 (saveable_obstack): Delete declaration.
6882 * parse.h: (permanent_obstack): Delete declaration.
6883 * typeck.c: (permanent_obstack): Delete declaration.
6884
6885 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
6886
6887 * gcj.texi (version-gcc): Increase to 3.3.
6888
6889 2002-07-22 Tom Tromey <tromey@redhat.com>
6890
6891 * lex.c (java_lex): Check for `e' or `E' after 0.
6892
6893 2002-07-21 Richard Henderson <rth@redhat.com>
6894
6895 * lang.c (java_unsafe_for_reeval): New.
6896 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
6897
6898 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
6899
6900 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
6901 (jcf_path_init): Use GET_ENVIRONMENT.
6902
6903 2002-07-10 Roger Sayle <roger@eyesopen.com>
6904 Zack Weinberg <zack@codesourcery.com>
6905
6906 * builtins.c (initialize_builtins): Remove defines that
6907 handled C/C++ specific junk hereby removed from builtins.def.
6908
6909 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
6910
6911 * lang.c (java_post_options): Update prototype.
6912
6913 2002-07-05 Roger Sayle <roger@eyesopen.com>
6914
6915 * builtins.c (initialize_builtins): Ignore the additional
6916 parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
6917 the builtins.def file.
6918
6919 2002-07-01 Tom Tromey <tromey@redhat.com>
6920
6921 For PR libgcj/7073:
6922 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
6923 specially.
6924
6925 2002-07-01 Roger Sayle <roger@eyesopen.com>
6926
6927 * java/decl.c (builtin_function): Accept additional parameter.
6928 (java_init_decl_processing): Pass an additional NULL_TREE
6929 argument to builtin_function.
6930
6931 2002-06-29 T.J. Mather <tjmather@maxmind.com>
6932
6933 * gcj.texi: Fixed gcj invocation example so that it compiles.
6934
6935 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6936
6937 * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
6938 * parse.y (mark_parser_ctxt): Likewise.
6939 (check_modifiers, declare_local_variables): Avoid incorrect
6940 hardcoded constant 10.
6941
6942 * lex.c (java_read_char): Avoid "comparison is always true"
6943 warning.
6944
6945 2002-06-25 Andreas Schwab <schwab@suse.de>
6946
6947 * expr.c (JSR): Avoid undefined operation on PC.
6948
6949 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6950
6951 * decl.c (clear_binding_level): Const-ify.
6952
6953 2002-06-13 Akim Demaille <akim@epita.fr>
6954
6955 * parse.y (class_declaration, interface_declaration): Make sure
6956 all their rules have an action, in order to avoid meaningless `$$
6957 = $1' and their type clashes.
6958
6959 2002-06-11 Tom Tromey <tromey@redhat.com>
6960
6961 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6962 * parse-scan.y (statement_without_trailing_substatement): Added
6963 assert_statement.
6964 (assert_statement): New rule.
6965 * java-tree.h (struct lang_type) [assertions]: New field.
6966 (TYPE_USES_ASSERTIONS): New macro.
6967 (CLASS_USES_ASSERTIONS): Likewise.
6968 (FIELD_SYNTHETIC): New define.
6969 * lex.c (java_lval;): Added ASSERT_TK.
6970 * parse.y (ASSERT_TK): Added.
6971 (statement_without_trailing_substatement): Added assert_statement.
6972 (assert_statement): New rule.
6973 (build_assertion): New function.
6974 (maybe_generate_pre_expand_clinit): Create and initialize
6975 $assertionsDisabled.
6976 (lookup_package_type): Removed decl.
6977 * keyword.h: Rebuilt.
6978 * keyword.gperf (assert): New token.
6979
6980 2002-06-10 Akim Demaille <akim@epita.fr>
6981
6982 * parse.y (interface_type_list, class_member_declaration)
6983 (unary_expression_not_plus_minus): Remove duplicate %type.
6984 Whitespace changes.
6985
6986 2002-06-09 Tom Tromey <tromey@redhat.com>
6987
6988 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6989
6990 * parse.y (method_header): Give error message in all cases.
6991 Fixes PR java/6865.
6992
6993 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6994
6995 Don't use RTL inlining. Fix for PR java/6820.
6996 * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
6997 (flag_really_inline): New.
6998 (java_decode_option): Set flag_really_inline if -finline-functions
6999 is seen.
7000 (java_post_options): New function. Turn off inlining unless
7001 flag_really_inline is set.
7002
7003 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7004
7005 * gjavah.c (throwable_p): Accept argument as either a classname or
7006 signature fragment. Create null-terminated classname string for super
7007 when calling itself recursively.
7008 (decode_signature_piece): Skip first character from class name
7009 signature when calling throwable_p.
7010
7011 2002-06-08 H.J. Lu (hjl@gnu.org)
7012
7013 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7014
7015 2002-06-04 Tom Tromey <tromey@redhat.com>
7016
7017 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7018
7019 2002-06-04 Michael Koch <konqueror@gmx.de>
7020
7021 * gcj.texi (Input Options): Fixed typo.
7022
7023 2002-06-04 Zack Weinberg <zack@codesourcery.com>
7024
7025 * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7026 typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7027 all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7028 and all now-pointless local variables. Rename other local
7029 variables to reflect their not being handles.
7030
7031 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7032 #if JCF_USE_STDIO blocks.
7033
7034 * parse.y: Add missing semicolon at end of rule.
7035
7036 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7037
7038 * check-init.c (attach_initialized_static_class): Delete, unused.
7039 * parse.y: Use htab_t instead of struct hashtable, update
7040 all uses.
7041 * java-tree.h: Include hashtab.h instead of hash.h.
7042 (struct lang_decl_func): Use htab_t, set up for gengtype.
7043 (struct init_test_hash_entry): Delete.
7044 (struct treetreehash_entry): New.
7045 (java_treetreehash_find): New
7046 (java_treetreehash_new): New prototype.
7047 (java_treetreehash_create): New prototype.
7048 (java_mark_tree): Delete prototype.
7049 (java_hash_hash_tree_node): Delete prototype.
7050 (java_hash_compare_tree_node): Delete prototype.
7051 (attach_initialized_static_class): Delete prototype.
7052 * expr.c (build_class_init): Update to use java_treetreehash
7053 functions.
7054 (java_expand_expr): Update to use htab_t.
7055 (emit_init_test_initialization): Likewise.
7056 * decl.c (java_mark_tree): Delete.
7057 * class.c (init_test_hash_newfunc): Delete.
7058 (java_hash_hash_tree_node): Delete.
7059 (java_hash_compare_tree_node): Delete.
7060 (add_method_1): Update to use java_treetreehash functions.
7061 (JAVA_TREEHASHHASH_H): New macro.
7062 (java_treetreehash_hash): New function.
7063 (java_treetreehash_compare): New function.
7064 (java_treetreehash_find): New function.
7065 (java_treetreehash_new): New function.
7066 (java_treetreehash_create): New function.
7067 * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7068
7069 * Make-lang.in (java/parse.o): Depend on debug.h.
7070 * java-tree.h (struct lang_identifier): Use gengtype.
7071 (union lang_tree_node): New.
7072 (struct lang_decl_func): Use gengtype.
7073 (struct lang_decl_var): Likewise.
7074 (struct lang_decl): Likewise.
7075 * parse.y: Include debug.h.
7076 * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7077
7078 * lang.c (struct language_function): New dummy structure.
7079
7080 * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7081 descriminator for DECL_LANG_SPECIFIC.
7082 (struct lang_decl_func): Rename from struct lang_decl.
7083 (enum lang_decl_desc): New.
7084 (struct lang_decl): Make it a union. Update all the accessor macros.
7085 (struct lang_type): Use gengtype.
7086 * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7087 * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7088 are now the same size.
7089 (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7090 use discriminator to mark DECL_LANG_SPECIFIC.
7091
7092 * Make-lang.in (gt-java-builtins.h): New rule.
7093 (java/builtins.o): Add dependency on gt-<filename>.h.
7094 * builtins.c: Use gengtype for roots.
7095 (union string_or_tree): Use gengtype.
7096 (struct builtin_record): Use gengtype.
7097 * config-lang.in (gtfiles): Add builtins.c.
7098
7099 * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7100 gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7101 gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7102 gt-java-parse.h, gtype-java.h): Add rules to generate.
7103 (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7104 (class.o): Add dependency on gt-*.h.
7105 (constants.o): Likewise.
7106 (decl.o): Likewise.
7107 (expr.o): Likewise.
7108 (jcf-parse.o): Likewise.
7109 (jcf-write.o): Likewise.
7110 (lang.o): Likewise.
7111 * config-lang.in (gtfiles): New.
7112 * class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7113 * constants.c: Replace uses of ggc_add_* with GTY markers.
7114 Include gt-*.h.
7115 * decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7116 * expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7117 * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7118 * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7119 Include gt-*.h.
7120 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7121 Include gt-*.h.
7122 * lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7123 * mangle.c: Replace uses of ggc_add_* with GTY markers. Include
7124 gt-*.h.
7125 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7126 Include gtype-java.h.
7127
7128 2002-06-02 Tom Tromey <tromey@redhat.com>
7129
7130 Fix for PR java/5913:
7131 * parse.y (patch_binop): Call patch_string on op1.
7132
7133 2002-06-02 Tom Tromey <tromey@redhat.com>
7134
7135 Fix for PR java/1343, PR java/6336:
7136 * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7137 formatting. Changed return type.
7138 (anonymous_class_counter): Moved to top of file.
7139 (maybe_make_nested_class_name): Append number to class name for
7140 function-local classes.
7141
7142 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7143
7144 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7145 * Make-lang.in: Update dependency lists.
7146
7147 2002-05-18 Mark Mitchell <mark@codesourcery.com>
7148
7149 * gjavah.c (throwable_p): Do not free the name of the class after
7150 passing it to find_class.
7151 * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7152 * jcf-io.c (dirent.h): Include it.
7153 (fnmatch.h): Likewise.
7154 (compare_path): New function.
7155 (java_or_class_file): Likewise.
7156 (memoized_dirlist_entry): New type.
7157 (memoized_dirlist_lookup_eq): New function.
7158 (memoized_dirlists): New variable.
7159 (caching_stat): New function.
7160 (memoized_class_lookup_eq): New function.
7161 (memoized_class_lookups): Likewise.
7162 (find_class): Use memoized_class_lookups and caching_stat.
7163 * jcf.h (JCF_USE_SCANDIR): Define.
7164 * parse.y (java_expand_classes): Write the class files in reverse
7165 order.
7166
7167 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7168
7169 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7170
7171 2002-05-13 Mark Mitchell <mark@codesourcery.com>
7172
7173 * jcf-write.c (write_classfile): Unlink the temporary file if it
7174 cannot be renamed. Use concat to build up the name of the
7175 temporary file.
7176
7177 2002-05-08 Mark Mitchell <mark@codesourcery.com>
7178
7179 * jcf-write.c (write_classfile): Write the file to a
7180 temporary file and then rename it.
7181
7182 2002-05-07 Tom Tromey <tromey@redhat.com>
7183
7184 * gjavah.c (throwable_p): Use xstrdup, not strdup.
7185
7186 Fix for PR java/1200:
7187 * gjavah.c (throwable_p): New function.
7188 (decode_signature_piece): Use it. A `WeakReference' isn't the
7189 same as a `jweak'.
7190 Include hashtab.h.
7191 (gcjh_streq): New function.
7192
7193 2002-05-07 Andreas Jaeger <aj@suse.de>
7194
7195 * parse.y (finish_for_loop): Fix if statement.
7196
7197 2002-05-06 Tom Tromey <tromey@redhat.com>
7198
7199 Fix for PR java/5941:
7200 * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7201 loop update expression.
7202 (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7203 * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7204
7205 2002-05-04 Mark Wielaard <mark@klomp.org>
7206
7207 For PR java/6519:
7208 * parse.y (build_string_concatenation): Return just op1 only when op2
7209 is null and op1 is a STRING_CST, otherwise always construct a
7210 StringBuffer.
7211
7212 2002-04-27 Tom Tromey <tromey@redhat.com>
7213
7214 For PR java/6382:
7215 * parse.y (string_convert_int_cst): New function.
7216 (merge_string_cste): Use it.
7217
7218 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
7219
7220 * java-tree.h (java_parse_file): Update.
7221 (java_set_yydebug): Remove.
7222 * jcf-parse.c (yydebug): Remove.
7223 (java_set_yydebug): Die.
7224 (java_parse_file): Update.
7225 * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7226
7227 2002-04-24 Tom Tromey <tromey@redhat.com>
7228
7229 For PR java/6425:
7230 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7231 EXPR_WFL_QUALIFICATION of qual_wfl.
7232
7233 2002-04-23 Per Bothner <per@bothner.com>
7234
7235 * expr.c (PRE_JSR): Call NOTE_LABEL for return address.
7236 * java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
7237 (BCODE_TARGET): Remove BCODE_RETURN_TARGET.
7238
7239 2002-04-23 Tom Tromey <tromey@redhat.com>
7240
7241 For PR java/6314:
7242 * jvspec.c (lang_specific_driver): Use --resource, not -R. Also
7243 recognize `-fcompile-resource='.
7244 * gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
7245 a bit.
7246
7247 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
7248
7249 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7250 paths. Fixes PR java/2791.
7251
7252 2002-04-19 Andrew Haley <aph@redhat.com>
7253
7254 * jcf-write.c (push_long_const): lo, hi: New variables.
7255 Use rshift_double to extract the high part of a 64-bit long.
7256 Use WORD_TO_INT to extract the low part.
7257
7258 * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7259 HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
7260 CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7261
7262 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7263
7264 * typeck.c (incomplete_type_error): Remove.
7265
7266 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7267
7268 * class.c (make_class_data): Set DECL_ALIGN on static class data,
7269 for hash synchronization.
7270 * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7271 * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7272 class_type_node.
7273
7274 2002-04-16 Mark Wielaard <mark@klomp.org>
7275
7276 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7277 negative zero.
7278
7279 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7280
7281 Fix for PR java/6294:
7282 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7283 interfaces.
7284
7285 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7286
7287 Fix for PR java/6085:
7288 * parse.y (patch_method_invocation): Always use build_access_to_thisn
7289 to get enclosing "this" argument for inner-class constructor
7290 invocation. Pass correct arguments to build_access_to_thisn.
7291
7292 2002-04-10 Andreas Jaeger <aj@suse.de>
7293
7294 * gcj.texi (Input Options): Fix extdirs patch.
7295
7296 2002-04-10 Anthony Green <green@redhat.com>
7297
7298 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7299
7300 2002-04-09 Anthony Green <green@redhat.com>
7301
7302 * gcj.texi (Input Options): Add --extdirs documentation.
7303 * jcf-dump.c (OPT_extdirs): New macro.
7304 (options): Add extdirs option.
7305 (help): Describe --extdirs.
7306 (main): Handle OPT_extdirs.
7307 * gjavah.c (OPT_extdirs): New macro.
7308 (options): Add extdirs option.
7309 (help): Describe --extdirs.
7310 (main): Handle OPT_extdirs.
7311 * jcf-path.c (jcf_path_init): Add extdirs support.
7312 (jcf_path_extdirs_arg): New function.
7313 (extensions): New variable to hold extensions path entries.
7314 * jvspec.c: Remove -fextdirs= when compiling main().
7315 * lang.c (java_decode_option): Handle -fextdirs=.
7316 * jcf.h (jcf_path_extdirs_arg): Declare new function.
7317 * Make-lang.in: Compile jcf-path with version info for use in
7318 identifying the appropriate libgcj.jar.
7319
7320 2002-04-08 Tom Tromey <tromey@redhat.com>
7321
7322 For PR libgcj/5303:
7323 * .cvsignore: Added rmic.1 and rmiregistry.1.
7324 * gcj.texi (Top): Link to new nodes.
7325 (Invoking rmic): New node.
7326 (Invoking rmiregistry): Likewise.
7327 * Make-lang.in (java.generated-manpages): Added rmic.1 and
7328 rmiregistry.1.
7329 (java.maintainer-clean): Likewise.
7330 ($(srcdir)/java/rmic.1): New target.
7331 ($(srcdir)/java/rmiregistry.1): Likewise.
7332 (java.install-man): Handle rmic.1 and rmiregistry.1.
7333
7334 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7335
7336 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7337 Add note about handling uncaught exceptions. Add an exception handler
7338 to example.
7339
7340 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7341
7342 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7343 after using it to patch CALL_EXPR.
7344
7345 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7346
7347 * gcj.texi (Invocation): Document CNI invocation API.
7348
7349 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
7350
7351 * expr.c (truthvalue_conversion): Rename. Update.
7352 (expand_compare): Update.
7353 * java-tree.h (java_truthvalue_conversion): New.
7354 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7355
7356 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7357
7358 * java-tree.h (java_mark_addressable): New.
7359 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7360 * typeck.c (mark_addressable): Rename, update.
7361
7362 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7363
7364 * expr.c (build_java_binop): Update.
7365 * java-tree.h (java_signed_type, java_unsigned_type,
7366 java_signed_or_unsigned_type): Update.
7367 * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7368 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7369 * parse.y (patch_binop): Update.
7370 * typeck.c (signed_or_unsigned_type, unsigned_type,
7371 signed_type): Update.
7372
7373 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
7374
7375 * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7376 (java_dummy_print): Remove.
7377 (lang_print_error): Rename. Exit early if inhibiting output.
7378 (inhibit_error_printing_function): New.
7379 (java_init): Don't set hook.
7380 (lang_init_source): Use new boolean.
7381
7382 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
7383
7384 * parse.y (do_resolve_class): Fix infinite recursion.
7385
7386 2002-03-29 Tom Tromey <tromey@redhat.com>
7387
7388 * parse.y (check_inner_circular_reference): Ignore incomplete
7389 types.
7390
7391 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
7392
7393 * Make-lang.in (builtins.o): Update.
7394 * boehm.c (get_boehm_type_descriptor): Update.
7395 * builtins.c: Include langhooks.h.
7396 * decl.c (java_init_decl_processing): Update.
7397 * java-tree.h (java_type_for_mode, java_type_for_size): New.
7398 * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7399 Redefine.
7400 * typeck.c (type_for_mode, type_for_size): Update.
7401
7402 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
7403
7404 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7405
7406 2002-03-28 Tom Tromey <tromey@redhat.com>
7407
7408 * except.c (expand_end_java_handler): If the handler type is NULL,
7409 use java.lang.Throwable. Fixes PR java/5986.
7410
7411 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
7412
7413 Fix for PR java/4715:
7414 * jcf-parse.c (parse_source_file_3): New function.
7415 (read_class): Call it.
7416 (java_parse_file): Likewise.
7417
7418 2002-03-28 Jan Hubicka <jh@suse.cz>
7419
7420 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7421
7422 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7423
7424 * parse.y (resolve_package): Initialize "decl".
7425 (lookup_package_type): Remove unused function.
7426
7427 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7428
7429 Fix for PR java/5993:
7430 * parse.y (resolve_package): Return the decl if resolution was
7431 successful. Don't special case "java.lang" and "java.lang.reflect"
7432 packages. Set type_name to the merged identifier.
7433 (resolved_qualified_expression_name): Print error using "name" if
7434 resolve_package returns NULL_TREE.
7435
7436 2002-03-27 Tom Tromey <tromey@redhat.com>
7437
7438 * expr.c (expand_invoke): Don't generate null pointer check if
7439 we're calling <init>.
7440
7441 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7442
7443 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7444 fix prototype.
7445 * java-tree.h (java_lang_expand_expr): Similarly.
7446 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7447 (java_init): Don't set hook.
7448
7449 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7450
7451 Fix for PR java/5850:
7452 * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7453 context if field was not found in the current scope.
7454 * expr.c (lookup_field): Don't look in enclosing contexts.
7455
7456 2002-03-26 Tom Tromey <tromey@redhat.com>
7457
7458 Fix for PR java/5942:
7459 * parse.y (init_src_parse): Added sanity check.
7460 * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7461 elements, not 11.
7462
7463 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
7464
7465 * decl.c (lang_mark_tree): Rename java_mark_tree.
7466 * java-tree.h (java_mark_tree): New.
7467 * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7468
7469 2002-03-25 Zack Weinberg <zack@codesourcery.com>
7470
7471 * lex.c: Change java_perform_atof to take normal parameters
7472 instead of a pointer to a parameter block. Call it directly
7473 from java_lex.
7474
7475 2002-03-22 Mark Wielaard <mark@klomp.org>
7476
7477 Fix for PR java/5368:
7478 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7479 when printing error message.
7480
7481 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7482
7483 * decl.c (maybe_build_cleanup): Remove.
7484
7485 2002-03-22 Tom Tromey <tromey@redhat.com>
7486
7487 Andrew Haley <aph@cambridge.redhat.com>
7488
7489 * expr.c (build_field_ref): Don't build a check if the field is a
7490 member of `this'.
7491
7492 2002-03-21 Eric Blake <ebb9@email.byu.edu>
7493
7494 Fix for PR java/6026:
7495 * lex.c (java_lex): Fix parsing of consecutive floats.
7496
7497 2002-03-21 Tom Tromey <tromey@redhat.com>
7498
7499 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7500 class.
7501
7502 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7503
7504 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7505 insert_block, getdecls, kept_level_p, global_bindings_p): New.
7506
7507 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7508
7509 * gcj.texi: @code{gcj} becomes @command{gcj}.
7510 @code{gcc} becomes @command{gcc}.
7511 GcjRaw changed to gnu.gcc.RawData.
7512
7513 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7514
7515 * decl.c (start_java_method): Use new hook.
7516 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7517 (java_init): Remove old hook.
7518
7519 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
7520
7521 * builtins.c (define_builtin): Do nothing if `type' is null.
7522 Fixes PR java/5876.
7523
7524 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7525
7526 * parse.y (parser_check_super_interface): Fix error message
7527 grammar/order.
7528
7529 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7530
7531 * jcf-parse.c (get_constant): Delete unused variables.
7532
7533 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
7534
7535 * java-tree.h (java_parse_file): New.
7536 * jcf-parse.c (yyparse): Rename java_parse_file.
7537 * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7538
7539 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7540
7541 * parse.y (craft_constructor): Return the constructor decl.
7542 (java_expand_classes): Update comments.
7543 (lookup_method_invoke): Call fix_constructors immediately for
7544 anonymous class. Fixes PR java/5935.
7545
7546 2002-03-15 Anthony Green <green@redhat.com>
7547
7548 * jcf-parse.c (yyparse): Don't emit class registration
7549 constructor when compiling resource files.
7550
7551 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7552
7553 * lang.c (java_tree_code_type, java_tree_code_length,
7554 tree_code_name): Delete.
7555 (tree_code_type, tree_code_length, tree_code_name): Define.
7556 (java_init): Don't try to copy into the various tree_code
7557 arrays.
7558
7559 2002-03-12 Tom Tromey <tromey@redhat.com>
7560
7561 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7562 UTF-8, not UCS-2. Fixes PR java/5923.
7563
7564 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7565 a call_expr wrapped in a convert. Fixes PR java/5848.
7566
7567 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7568
7569 * jcf-write.c (write_classfile): Improve error strings.
7570
7571 2002-03-11 Eric Blake <ebb9@email.byu.edu>
7572
7573 * lex.c: Adjust comments to GNU standards.
7574
7575 2002-03-11 Eric Blake <ebb9@email.byu.edu>
7576
7577 Fix for PR java/5902:
7578 * lex.c (java_lex): Fix parsing of literals.
7579
7580 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7581
7582 * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7583 to prevent it getting evaluated twice in the store checking case.
7584 * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7585 examining OBJECT.
7586
7587 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7588
7589 * decl.c (java_init_decl_processing): Make sure class_type_node
7590 alignment is not less than 64 bits if hash synchronization is enabled.
7591
7592 2002-03-08 Per Bothner <per@bothner.com>
7593
7594 * parse.y (java_complete_lhs): Check if patch_assignment
7595 returned an error-mark.
7596
7597 * parse.y (try_builtin_assignconv): Don't special-case zero.
7598
7599 2002-03-08 Per Bothner <per@bothner.com>
7600
7601 Fix for PR java/5812.
7602 * expr.c (build_java_jsr): Take pc arguments, and do lookup_label
7603 here instead of in JSR macro. Likewise with load_type_state call.
7604 Do the latter on if the return_pc has been verified (the jsr returns).
7605 (JSR): Now just call build_java_jsr.
7606
7607 2002-03-07 Jeff Sturm <jsturm@one-point.com>
7608
7609 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7610 (java.install-common): Link native driver to
7611 JAVA_TARGET_INSTALL_NAME.
7612
7613 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
7614
7615 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7616 * builtins.c(sin_builtin): Likewise
7617 * builtins.c(sqrt_builtin): Likewise
7618
7619 2002-03-03 Zack Weinberg <zack@codesourcery.com>
7620
7621 * java/expr.c, java/jcf-parse.c, java/lex.c:
7622 Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7623 REAL_ARITHMETIC blocks unconditional. Delete some further
7624 #ifdef blocks predicated on REAL_ARITHMETIC.
7625
7626 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7627
7628 * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7629 explicit sizeof/sizeof.
7630 * decl.c (java_init_decl_processing): Likewise.
7631 * jcf-parse.c (init_jcf_parse): Likewise.
7632 * parse.y (init_src_parse): Likewise.
7633
7634 2002-03-02 Per Bothner <per@bothner.com>
7635
7636 Make --CLASSPATH by a synonym for --classpath and -classpath.
7637 Implement --bootclasspath.
7638 * jcf-path.c (classpath_u): Rename static variable to classpath_user.
7639 (classpath_l): Remove.
7640 (jcf_path_CLASSPATH_arg): Remove.
7641 (jcf_path_bootclasspath_arg): New function.
7642 (jcf_path_seal): Simplify accordingly.
7643
7644 * jcf.h (jcf_path_bootclasspath_arg): New declarations.
7645 (jcf_path_CLASSPATH): Remove declaration.
7646 * jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
7647 (lang_specific_driver): Translate -bootclasspath.
7648 * lang-options.h: Add --bootclasspath. Update --CLASSPATH.
7649 * lang.c (decode_lang_options): Do jcf_path_init first.
7650 Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
7651 * gjavah.c: Also handle --bootclasspath.
7652 Handle --CLASSPATH as a synonum for --classpath.
7653 * jcf-dump.c: Likewise.
7654
7655 "." is not part of system path, but is the default for --classpath.
7656 * jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
7657 (jcf_path_seal): Add "." if no CLASSPATH specified.
7658
7659 * gcj.texi: Document changes.
7660
7661 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7662
7663 * expr.c (build_java_arraystore_check): Fix formatting.
7664
7665 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
7666
7667 Fix for PR java/5758, java/5632:
7668 * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7669 inner-class separator too.
7670 * parse.y (do_resolve_class): New local `decl_result.'
7671 Progressively build a name for what can have been loaded.
7672
7673 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7674
7675 * expr.c (java_array_data_offset): Removed function.
7676 (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7677 (build_java_array_length_access): Obtain "length" value using a
7678 COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7679 (build_java_arrayaccess): Correct comment. Access "data" using a
7680 COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7681 (build_java_arraystore_check): New function.
7682 (expand_java_arraystore): Use build_java_arraystore_check.
7683 * parse.y (patch_assignment): Simplify code to insert a store check
7684 when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7685 * check-init.c (check_init): Update to reflect that an array length
7686 access is now a COMPONENT_REF.
7687 * gcj.texi (Code Generation): Improve documentation of
7688 -fno-bounds-check. Add documentation for -fno-store-check.
7689 * java-tree.h (flag_store_check): Declare.
7690 (build_java_arraystore_check): Declare.
7691 * lang.c (flag_store_check): Initialize to 1.
7692 (lang_f_options): Add store-check option.
7693 * jvspec.c: Don't pass store-check option to jvgenmain.
7694 * lang-options.h: Add help string for -fno-store-check.
7695
7696 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
7697
7698 * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
7699 * java-tree.h (java_dup_lang_specific_decl): New.
7700 * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
7701
7702 2002-02-27 Zack Weinberg <zack@codesourcery.com>
7703
7704 * builtins.c, decl.c: Delete traditional-mode-related code
7705 copied from the C front end but not used, or used only to
7706 permit the compiler to link.
7707
7708 2002-02-22 Tom Tromey <tromey@redhat.com>
7709
7710 Fix for PR java/2369:
7711 * jvspec.c (verify_class_name): New function.
7712 (lang_specific_driver): Call it.
7713 (JAVA_START_CHAR_P): New macro.
7714 (JAVA_PART_CHAR_P): Likewise.
7715
7716 2002-02-22 Per Bothner <per@bothner.com>
7717
7718 * class.c: Change vtable to be more compatible with g++ v3 abi.
7719 (get_dispatch_table): Prepend offset-to-top (always 0) and
7720 type_info pointer (currently unimplemented hence NULL) to vtable.
7721 Specifically, prepend offset-to-top and typeinfo ptr (currently null).
7722 (make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
7723 Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
7724 (build_dtable_decl): Add declarations for new fields.
7725
7726 2002-02-20 Per Bothner <per@bothner.com>
7727
7728 * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
7729 to finit$ (otherwise generate_bytecode_insns drops it). However, we
7730 don't need to set it on the COMPOUND_EXPR - the caller does that.
7731
7732 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7733
7734 * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
7735 `--CLASSPATH' becomes `--classpath.'
7736 * gjavah.c: Likewise.
7737 * jcf-dump.c: Likewise.
7738 * lang-options.h: Likewise.
7739 * lang.c: Likewise.
7740 * jcf-path.c: Updated comment.
7741 (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
7742 (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
7743 * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
7744 (jcf_path_CLASSPATH_arg): Ditto.
7745 (classpath_u): Updated leading comment.
7746
7747 2002-02-20 Per Bothner <per@bothner.com>
7748
7749 * builtins.c (check_for_builtin): New function.
7750 (build_call_or_builtin): Remove.
7751 * java-tree.h: Update accordingly.
7752 * expr.c (expand_invoke): Use build + check_for_builtin instead
7753 of build_call_or_builtin.
7754 * parse.y (patch_invoke): Likewise. This avoids needlessly creating
7755 a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
7756 flag (which had caused jcf-write to incorrectly emit invokevirtual).
7757
7758 2002-02-17 Tom Tromey <tromey@redhat.com>
7759
7760 * java-tree.h (TYPE_STRICTFP): New macro.
7761 (struct lang_type) [strictfp]: New field.
7762 (CLASS_STRICTFP): New macro.
7763 (METHOD_STRICTFP): New macro.
7764 (struct lang_decl) [strictfp]: New field.
7765 * parse.y (method_header): Disallow strictfp constructor or
7766 abstract method.
7767 (STRICT_TK): Move before MODIFIER_TK.
7768 * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
7769 (METHOD_MODIFIERS): Likewise.
7770 (INTERFACE_MODIFIERS): Likewise.
7771 * jcf-write.c (get_access_flags): Likewise.
7772 * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
7773 (add_method_1): Likewise.
7774 (get_access_flags_from_decl): Likewise.
7775 * jcf-dump.c (print_access_flags): Print in standard order. Also,
7776 recognize strictfp flag.
7777 * jcf.h (ACC_STRICT): New define.
7778
7779 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
7780
7781 * class.c(build_utf8_ref): Move declaration of decl_size
7782
7783 2002-02-07 Tom Tromey <tromey@redhat.com>
7784
7785 * gcj.texi (Input Options): --CLASSPATH does not suppress system
7786 path.
7787
7788 2002-02-04 Anthony Green <green@redhat.com>
7789
7790 * class.c (build_utf8_ref): Put UTF-8 constants into merged
7791 sections if available.
7792
7793 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7794
7795 * parse.y (java_expand_classes): Fix typo in static field loop.
7796
7797 2002-02-02 Richard Henderson <rth@redhat.com>
7798
7799 * class.c (add_field): Mark static fields external.
7800 (build_class_ref): Remove redundant set.
7801 * parse.y (java_expand_classes): Mark static fields of classes
7802 to be compiled as local.
7803 * jcf-parse.c (parse_class_file): Likewise.
7804
7805 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7806
7807 * gcj.texi (About CNI): New node.
7808
7809 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
7810
7811 PR java/5080
7812 * jcf-parse.c : Check for HAVE_LOCALE_H before using
7813 setlocale() with LC_CTYPE as a parameter.
7814 * jv-scan.c: Same.
7815
7816 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
7817
7818 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7819 Follow GNU Coding Standards for --version.
7820
7821 2002-01-28 Tom Tromey <tromey@redhat.com>
7822
7823 * expr.c (build_jni_stub): Ensure storage for `meth' is
7824 generated.
7825 * parse.y (java_complete_expand_methods): Set
7826 current_function_decl before building JNI stub.
7827
7828 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7829
7830 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7831 BUILT_IN_SQRTF.
7832
7833 2002-01-22 Tom Tromey <tromey@redhat.com>
7834
7835 * decl.c (java_init_decl_processing): Use add_predefined_file.
7836 Predefine RawData.java.
7837 (predef_filenames): Removed.
7838 (java_init_decl_processing): Don't register predef_filenames.
7839 * jcf-parse.c (add_predefined_file): New function.
7840 (predefined_filename_p): Rewrote.
7841 (predefined_filename_p): No longer static.
7842 * decl.c (java_init_decl_processing): Call initialize_builtins.
7843 * Make-lang.in (JAVA_OBJS): Added builtins.o.
7844 (java/builtins.o): New target.
7845 * builtins.c: New file.
7846 * parse.y (patch_invoke): Use build_call_or_builtin.
7847 * java-tree.h (build_call_or_builtin): Declare.
7848 (initialize_builtins): Declare.
7849 (java_set_exception_lang_code): Removed unused declaration.
7850 (PREDEF_FILENAMES_SIZE): Removed.
7851 (java_tree_index): Added JTI_PREDEF_FILENAMES.
7852 (predef_filenames): New define.
7853 (add_predefined_file): Declare.
7854 (predefined_filename_p): Declare.
7855 * expr.c (expand_invoke): Use build_call_or_builtin.
7856
7857 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7858
7859 * parse.y (patch_switch_statement): Fix format specifier.
7860
7861 2002-01-16 Tom Tromey <tromey@redhat.com>
7862
7863 More for PR java/5365:
7864 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7865 default.
7866 (process_file): Generate include for
7867 java.lang.UnsupportedOperationExceptions.
7868
7869 2002-01-15 Andreas Jaeger <aj@suse.de>
7870
7871 * .cvsignore: Add man pages.
7872
7873 2002-01-15 Tom Tromey <tromey@redhat.com>
7874
7875 Fix for PR java/5365:
7876 * gjavah.c (process_file): Turn class name into a file name.
7877
7878 2002-01-14 Matthias Klose <doko@debian.org>
7879
7880 * gcj.texi: Fix whitespace and formatting errors in the
7881 synopsis of the man pages. Update copyright.
7882
7883 2002-01-14 Tom Tromey <tromey@redhat.com>
7884
7885 For PR libgcj/5303:
7886 * Make-lang.in (java.install-man): Handle jv-convert man page.
7887 (java.generated-manpages): Added jv-convert.1.
7888 (java.uninstall): Remove jv-convert.1.
7889 (java.maintainer-clean): Likewise.
7890 ($(srcdir)/java/jv-convert.1): New target.
7891 * gcj.texi (Top): Link to jv-convert node.
7892 (Individual utilities): Likewise.
7893 (Invoking jv-convert): New node.
7894
7895 2001-01-10 Jeff Sturm <jsturm@one-point.com>
7896 Martin Kahlert <martin.kahlert@infineon.com>
7897
7898 * jcf-parse.c (get_constant): Don't swap lo/hi for big
7899 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
7900
7901 2002-01-03 Graham Stott <grahams@redhat.com>
7902
7903 * class.c (compile_resource_file): Update copyright date.
7904 Constify filename parameter.
7905 (java-tree.h): Update copyright date.
7906 (compile_resource_file): Constify filename parameter.
7907
7908 2002-01-03 Graham Stott <grahams@redhat.com>
7909
7910 * gcc/jcf-parse.c: Update copyright date.
7911 (yyparse): Constify resource_filename.
7912
7913 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7914
7915 * parse.y (src_parse_roots): Don't needlessly zero init.
7916
7917 2001-12-31 Tom Tromey <tromey@redhat.com>
7918
7919 * parse.y (dump_java_tree): New function.
7920 (source_end_java_method): Call it.
7921 (end_class_declaration): Likewise.
7922 * lang.c (java_decode_option): Call dump_switch_p.
7923
7924 2001-12-28 Tom Tromey <tromey@redhat.com>
7925
7926 * gen-table.pl: Don't process characters after \uffff. Added
7927 comment pointing to input file.
7928
7929 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7930
7931 * gen-table.pl: Const-ify output. Document the location of a
7932 suitable unicode input file.
7933
7934 * chartables.h: Regenerate.
7935
7936 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7937
7938 * chartables.h: Const-ify.
7939 * gjavah.c (options): Likewise.
7940 * jcf-dump.c (options): Likewise.
7941 * jv-scan.c (options): Likewise.
7942 * lex.c (java_start_char_p, java_part_char_p): Likewise.
7943 * parse.y (binop_lookup): Likewise.
7944
7945 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7946
7947 * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
7948 the static arrays that are output.
7949 * jvspec.c (jvgenmain_spec): Make static.
7950 * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
7951 * keyword.h: Regenerate.
7952 * lang.c (string_option, process_option_with_no, lang_f_options,
7953 lang_W_options): Const-ify.
7954 * lex.c (java_lex): Likewise.
7955
7956 2001-12-21 Richard Henderson <rth@redhat.com>
7957
7958 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7959 (get_boehm_type_descriptor): ... here. Arrange for the
7960 TREE_TYPE to get set properly.
7961
7962 2001-12-21 Richard Henderson <rth@redhat.com>
7963
7964 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7965 only if the target requires collect2.
7966
7967 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7968
7969 2001-12-20 Tom Tromey <tromey@redhat.com>
7970
7971 For PR java/4509:
7972 * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
7973 CAN_COMPLETE_NORMALLY for the node.
7974 * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
7975 generate code for second branch if first branch can't complete
7976 normally.
7977 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7978 the loop head if the loop body can't complete normally.
7979
7980 2001-12-20 Tom Tromey <tromey@redhat.com>
7981
7982 For PR java/4766:
7983 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7984 case where `finally' clause can't complete normally.
7985
7986 2001-12-20 Tom Tromey <tromey@redhat.com>
7987
7988 Fixes PR java/5057:
7989 * parse.y (analyze_clinit_body): Added this_class parameter.
7990 Check for more cases where we must keep <clinit>.
7991 (maybe_yank_clinit): Cleaned up flow control.
7992
7993 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7994
7995 * decl.c (java_init_decl_processing): Don't initialize
7996 finit_leg_identifier_node.
7997 * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
7998 (finit_leg_identifier_node): Remove.
7999 (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8000
8001 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8002
8003 * mangle.c (mangle_member_name): Don't special-case for
8004 NO_DOLLAR_IN_LABEL.
8005 * mangle_name.c (unicode_mangling_length): Likewise.
8006 (append_unicode_mangled_name): Likewise.
8007 * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8008 code.
8009
8010 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8011
8012 * expr.c (build_java_array_length_access): Don't force null pointer
8013 check unless flag_check_references is set.
8014
8015 2001-12-20 Tom Tromey <tromey@redhat.com>
8016
8017 Fix for PR java/3417:
8018 * parse.y (patch_assignment): Added special processing for
8019 `return'.
8020 (patch_return): Don't convert booleans to integers, and don't
8021 special-case `null'.
8022
8023 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8024
8025 * config-lang.in (diff_excludes): Remove.
8026
8027 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
8028
8029 * gcj.texi: Update link to GCC manual.
8030
8031 2001-12-17 Tom Tromey <tromey@redhat.com>
8032
8033 * parse.y (link_nested_class_to_enclosing): Removed useless
8034 statement.
8035
8036 2001-12-16 Tom Tromey <tromey@redhat.com>
8037
8038 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8039 Fixes PR java/5088.
8040
8041 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
8042
8043 * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8044 jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8045 spelling errors.
8046
8047 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8048
8049 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8050
8051 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8052
8053 * decl.c (java_init_decl_processing): Build otable_type correctly.
8054 otable_decl is an otable_type.
8055
8056 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8057
8058 * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8059 otable_type, otable_ptr_type, method_symbol_type,
8060 method_symbols_array_type, method_symbols_array_ptr_type): New
8061 field/global tree definitions.
8062 (flag_indirect_dispatch): New flag.
8063 * decl.c (java_init_decl_processing): Initialize new otable and
8064 otable_syms type nodes and decls. Add new field "index" to
8065 method_type_node.
8066 * class.c (build_method_symbols_entry): New function.
8067 (make_method_value): Set "index" to to method's vtable index for
8068 virtual methods when indirect-dispatch is not used.
8069 (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8070 and set vtable_method_count to -1. Set otable and otable_syms field
8071 if indirect-dispatch is used and there was something to put in them.
8072 (build_method_symbols_entry): New function.
8073 (emit_offset_symbol_table): New function.
8074 * expr.c (get_offset_table_index): New function.
8075 (build_invokevirtual): Build array reference to otable at the index
8076 returned by get_offset_table_index, and use the result as the vtable
8077 offset.
8078 (build_invokeinterface): Similar.
8079 * jcf-parse.c (yyparse): If indirect-dispatch, call
8080 emit_offset_symbol_table at the end of compilation, after all classes
8081 have been generated.
8082 * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8083 * lang.c (flag_indirect_dispatch): Define.
8084 (lang_f_options): Add indirect-dispatch flag.
8085
8086 2001-12-14 Matthias Klose <doko@debian.org>
8087
8088 * gcj.texi: Markup for man page generation. Document missing
8089 options printed by <tool> --help.
8090 Terminate description of gij's -ms option with a dot.
8091 * Make-lang.in ($(srcdir)/java/*.1): New targets.
8092 (java.generated-manpages java.install-man, java.uninstall,
8093 java-maintainer-clean) Updated.
8094
8095 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
8096
8097 * class.c (get_dispatch_table): Fix java vtable layout
8098 for TARGET_VTABLE_USES_DESCRIPTORS.
8099 * decl.c (java_init_decl_processing): Initialize
8100 alloc_no_finalizer_node, finalize_identifier_node.
8101 * expr.c (class_has_finalize_method): New function.
8102 (expand_java_NEW): Generate calls for finalizer-free allocation.
8103 (build_invokevirtual): Fix java vtable layout for
8104 TARGET_VTABLE_USES_DESCRIPTORS.
8105 * java-tree.h (enum java_tree_index): New entries:
8106 JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8107 (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8108 (class_has_finalize_method): declare.
8109 (HAS_FINALIZER_P): New macro.
8110 * parse.y (patch_invoke): Generate calls for finalizer-free
8111 allocation.
8112
8113 2001-12-12 Matthias Klose <doko@debian.org>
8114
8115 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8116 whitespace at end of line.
8117
8118 2001-12-11 Tom Tromey <tromey@redhat.com>
8119
8120 * lex.c (java_init_lex): Define wfl_to_string as
8121 gnu.gcj.runtime.StringBuffer unless generating bytecode.
8122
8123 2001-12-11 Jeff Sturm <jsturm@one-point.com>
8124
8125 * class.c (make_method_value): Use null_pointer_node to
8126 represent empty exception table.
8127
8128 2001-12-10 Tom Tromey <tromey@redhat.com>
8129
8130 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8131
8132 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
8133
8134 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8135
8136 2001-12-09 Per Bothner <per@bothner.com>
8137
8138 * check-init.c (current_switch_has_default): New static field.
8139 (check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
8140 Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
8141 DEFAULT_EXPR seen, simulate a default alternative that copies state.
8142
8143 2001-12-09 Tom Tromey <tromey@redhat.com>
8144
8145 * check-init.c (check_init): Don't allow pre- or post- increment
8146 or decrement of final variable.
8147 (final_assign_error): Minor error message rewording.
8148
8149 2001-12-08 Tom Tromey <tromey@redhat.com>
8150
8151 * java-tree.h: Fixed typo.
8152
8153 * gjavah.c (decompile_method): Don't decompile to `return this'
8154 for static methods.
8155
8156 * gjavah.c (cxx_keywords): Re-sorted.
8157 * lex.c (cxx_keywords): Re-sorted.
8158
8159 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8160 else.
8161
8162 * gjavah.c (print_namelet): Clear subnamelets.
8163 (HANDLE_METHOD): Set `method_printed' earlier.
8164
8165 2001-12-07 Tom Tromey <tromey@redhat.com>
8166
8167 * lang.c (lang_f_options): Added
8168 optimize-static-class-initialization.
8169 (java_decode_option): Removed special case.
8170
8171 2001-12-07 Per Bothner <per@bothner.com>
8172
8173 * check-init.c (check_init): Fix typo freeing memory twice.
8174
8175 2001-12-05 Per Bothner <per@bothner.com>
8176
8177 Restore support for static class initialization optimization.
8178 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8179 * check-init.c (check_int): At end of BLOCK handle initialization
8180 blocks, which used to be done in java_complete_expand_method but did
8181 not handle the case where check_for_initialization might allocate
8182 more than a word of bits.
8183 * decl.c (lang_make_tree): The smic field is now a tree.
8184 * expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
8185 * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
8186
8187 * parse.y (emit_test_initialization): Combine hash_lookup calls.
8188
8189 * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8190 Change from a hash table to a list.
8191 (struct_lang_decl): Change field 'smic' to match.
8192 * class.c (add_method_1): Initialize
8193 DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8194 * parse.y (adjust_init_test_initialization): Removed - inlined into -
8195 (java_expand_method_bodies): -here, since 'smic' is now a list.
8196 (patch_invoke): Add to 'smic' list, instead of hash_lookup.
8197
8198 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
8199
8200 * class.c (java_hash_compare_tree_node): Fix casts.
8201
8202 2001-12-04 Per Bothner <per@bothner.com>
8203
8204 * check-init.c: Handle definite unassignment to finals in addition
8205 to definite assignment.
8206 (loop_current_locals): New field.
8207 (num_current_locals, int start_current_locals, num_current_words):
8208 Make static.
8209 (SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
8210 (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8211 CLEAR_ASSIGNED, CLEAR_UNASSIGNED): New macros.
8212 (get_variable_decl, check_final_reassigned): New functions.
8213 (check_init, check_bool_init): Modify as needed for checking finals.
8214 (check_for_initialization): Take extra parameter and return void.
8215 Do extra start-up logic to check final fields for assignment.
8216 * parse.y (check_static_final_variable_assignment_flag,
8217 reset_static_final_variable_assignment_flag, check_final_assignment,
8218 check_final_variable_local_assignment_flag,
8219 reset_final_variable_indirect_assignment_flag,
8220 reset_final_variable_global_assignment_flag): Remove functions.
8221 (java_complete_expand_methods, outer_field_access_fix,
8222 patch_assignment): Remove no-longer used logic.
8223 * java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
8224 * parse.y (register_fields, java_complete_tree): Update accordingly.
8225
8226 * check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
8227 (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER): New.
8228 (check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
8229
8230 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
8231
8232 * java-tree.h (DECL FINAL): New bit-field.
8233 (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL): Define as DECL_FINAL.
8234 (LOCAL_FINAL_P): Use DECL_FINAL rather than old LOCAL_FINAL.
8235 (DECL_INIT_CALLS_THIS): New macro.
8236 (struct lang_decl): New bit-field init_calls_this.
8237 (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8238 DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8239 (DECL_BIT_INDEX): Change to use pointer_alias_set since we now
8240 use it for both local variables and final fields.
8241 (struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
8242 and local_final.
8243 (struct lang_type): Remove hfv bit-field.
8244 (check_for_initialization): Change to return void.
8245
8246 * java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
8247 * expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
8248 * check-init.c (final_assign_error): New helper function.
8249 (check_final_reassigned, check_init): Use it.
8250 (check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8251
8252 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
8253 bit-fields to unsigned.
8254
8255 2001-12-03 Per Bothner <per@bothner.com>
8256
8257 * parse.y (patch_binop): Minor constant folding.
8258
8259 * parse.y (build_current_thisn): Shorter 'buffer'.
8260
8261 2001-12-03 Per Bothner <per@bothner.com>
8262
8263 * decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
8264 instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8265 * jcf-write.c (generate_bytecode_insns): Remove support for
8266 CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8267 * check-init.c (check_init): Likewise.
8268
8269 2001-12-03 Per Bothner <per@bothner.com>
8270
8271 * verify.c (subroutine_nesting): New function.
8272 (verify_jvm_instructions): Use it to fix logic for checking that
8273 we're done with the current subroutine.
8274
8275 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8276 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8277
8278 2001-12-03 Per Bothner <per@bothner.com>
8279
8280 * jcf.h: Fix obvious typo in comment.
8281 * typeck.c (build_null_signature): Add comment.
8282
8283 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
8284
8285 * expr.c: Remove leading capital from diagnostic messages, as
8286 per GNU coding standards.
8287 * jcf-io.c: Similarly.
8288 * jcf-parse.c: Similarly.
8289 * jv-scan.c: Similarly.
8290 * jvspec.c: Similarly.
8291 * mangle.c: Similarly.
8292
8293 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
8294 Alexandre Petit-Bianco <apbianco@redhat.com>
8295
8296 * expr.c (build_java_arrayaccess): Call save_expr on array for
8297 correct evaluation order, modified comment, fixed indentation.
8298 * parse.y: (patch_assignment): Correctly extract the array base
8299 from the tree generate by build_java_arrayaccess, added comments.
8300 (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8301 Fixes PR java/3096, PR java/3803, PR java/3965.
8302
8303 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
8304
8305 * expr.c (expand_byte_code): Remove trailing periods from messages.
8306 * jcf-parse.c (load_class, jcf_parse): Similarly.
8307 * jcf-write.c (generate_classfile): Similarly.
8308 * lex.c (java_lex): Similarly.
8309
8310 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8311
8312 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8313
8314 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
8315
8316 * Make-lang.in (java.generated-manpages): New dummy target.
8317
8318 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8319
8320 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8321 ASM_FINAL_SPEC.
8322 (lang_specific_pre_link): Use set_input to set input_filename.
8323 Append `main' here.
8324 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8325 (main): Fix definition.
8326 Strip `main' from classname.
8327 Fixes PR java/227.
8328
8329 2001-11-18 Roger Sayle <roger@eyesopen.com>
8330
8331 * parse.h (java_expand_switch): Remove old prototype.
8332
8333 2001-11-18 Tom Tromey <tromey@redhat.com>
8334
8335 Fix for PR java/1401:
8336 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8337 arg0 is null.
8338 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8339 correctly.
8340
8341 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
8342
8343 * lang.c (finish_parse): Rename to java_finish.
8344 (LANG_HOOKS_FINISH, java_finish): New.
8345
8346 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
8347
8348 * decl.c (init_decl_processing): Rename java_init_decl_processing.
8349 * java-tree.h: New prototype.
8350 * lang.c (java_init): Update prototype. Combine with old init_parse.
8351
8352 2001-11-13 Tom Tromey <tromey@redhat.com>
8353
8354 * gjavah.c (method_signature): New global.
8355 (HANDLE_METHOD): Set it.
8356 (decompile_return_statement): New function.
8357 (decompile_method): Use it.
8358 (print_method_info): Removed `synth' argument.
8359
8360 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8361
8362 * java-tree.h (java_set_yydebug): New.
8363 * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8364 * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8365 (print_lang_decl, print_lang_type, print_lang_identifier,
8366 print_lang_statistics, lang_print_xnode): Remove.
8367
8368 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
8369
8370 * jcf-parse.c (init_lex): Remove.
8371 * lang.c (language_string, lang_identify): Remove.
8372 (struct lang_hooks): Constify.
8373 (LANG_HOOKS_NAME): Override.
8374 (init_parse): Update.
8375
8376 2001-11-08 Andreas Franck <afranck@gmx.de>
8377
8378 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8379 program_transform_name the way suggested by autoconf.
8380 (java.install-common): Also transform auxiliary program names with
8381 program_transform_name.
8382
8383 2001-11-08 Tom Tromey <tromey@cygnus.com>
8384
8385 * parse.y (trap_overflow_corner_case): New rule.
8386 (unary_expression): Use it.
8387 * lex.c (java_init_lex): Don't set minus_seen.
8388 (yylex): Don't use minus_seen. Communicate overflow to parser for
8389 it to handle.
8390 (error_if_numeric_overflow): New function.
8391 * parse.h (minus_seen): Removed field.
8392 (JAVA_RADIX10_FLAG): New define.
8393
8394 2001-11-07 Tom Tromey <tromey@redhat.com>
8395
8396 Patch for PR java/1414:
8397 * parse.y (case_label_list): New global.
8398 (goal): Register case_label_list with GC.
8399 (java_complete_lhs): Save new case on case_label_list.
8400 (patch_switch_statement): Check for duplicate case labels.
8401
8402 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
8403
8404 * parse.y (patch_assignment): Removed unused third argument.
8405 (java_complete_lhs): Removed unused third argument to patch_assignment.
8406
8407 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8408
8409 * lang.c: Include langhooks-def.h.
8410 * Make-lang.in: Update.
8411
8412 2001-10-31 Zack Weinberg <zack@codesourcery.com>
8413
8414 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8415
8416 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8417
8418 * mangle.c (find_compression_record_match): Don't match compression
8419 records for package name elements unless they occur at the start of
8420 the name. Fix for PR java/4717.
8421
8422 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8423
8424 * expr.c (expand_java_field_op): Don't special-case references to
8425 java.lang.PRIMTYPE.TYPE.
8426 (build_primtype_type_ref): Removed.
8427 * java-tree.h (build_primtype_type_ref): Remove prototype.
8428 * parse.y (maybe_build_primttype_type_ref): Removed.
8429 (complete_function_arguments): Don't special-case references to
8430 java.lang.PRIMTYPE.TYPE.
8431 (patch_assignment): Likewise.
8432 (array_constructor_check_entry): Likewise.
8433
8434 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
8435
8436 * mangle.c (static tree compression_table): Fixed leading comment.
8437 * parse.h (struct parser_ctxt): Fixed field comment.
8438 * parse.y (check_pkg_class_access): New prototype, fixed leading
8439 comment, new parameter used to emit error only if passed as true.
8440 (parse_check_super): Pass extra argument to check_pkg_class_access.
8441 (do_resolve_class): Likewise.
8442 (process_imports): Likewise.
8443 (read_import_dir): Fixed indentation.
8444 (find_in_imports_on_demand): New local class_type_name. Local
8445 node_to_use deleted. while loop changed into for loop. Report
8446 multiple definition only for accessible classes. Improved error
8447 message.
8448 (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8449 assigned to parameter list, fixed indentation. while loop changed
8450 into for loop, restore TREE_CHAIN on local `tem' before the next
8451 iteration.
8452
8453 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8454
8455 * lang.c (lang_get_alias_set): Deleted.
8456
8457 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8458
8459 * gjavah.c (jni_print_char): Fix thinko in last change.
8460
8461 * gjavah.c (jni_print_char, decode_signature_piece): Use
8462 safe-ctype macros and/or fold extra calls into fewer ones.
8463 * lex.c (java_read_unicode, java_lex): Likewise.
8464 * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8465 JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8466 * mangle_name.c (append_unicode_mangled_name,
8467 unicode_mangling_length): Likewise.
8468
8469 2001-10-17 Richard Henderson <rth@redhat.com>
8470
8471 * Make-lang.in (java/lang.o): Depend on langhooks.h.
8472
8473 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
8474
8475 * lang.c (langhooks.h): Included.
8476 (LANG_HOOKS_INIT): Redefined.
8477 (LANG_HOOKS_INIT_OPTIONS): Likewise.
8478 (LANG_HOOKS_DECODE_OPTION): Likewise.
8479 (struct lang_hooks lang_hooks): New initialization.
8480
8481 2001-10-11 Per Bothner <per@bothner.com>
8482
8483 * parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
8484 rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8485 The former is simpler, and jcf-write.c handles it better.
8486 (java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
8487 or WITH_CLEANUP_EXPR.
8488 * jcf-write.c: Revert Alex's change from 2000-10-18. It is no
8489 longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8490
8491 * parse.y (patch_if_else_statement): If the condition is constant,
8492 optimize away the test.
8493
8494 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
8495
8496 * parse.y (patch_cast): Call patch_string on the first operand of
8497 the incoming node, update it if necessary. Fixes PR java/4510.
8498
8499 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8500
8501 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8502 when name qualifier matches a package name.
8503
8504 2001-10-08 Tom Tromey <tromey@redhat.com>
8505
8506 Fix for PR java/4489:
8507 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8508 force a new label when computing `body_block'.
8509
8510 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8511
8512 * jcf-io.c (format_uint): Const-ify.
8513 * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8514 * lex.c (java_get_line_col): Likewise.
8515 * parse.y (build_incdec): Likewise.
8516
8517 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
8518
8519 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8520 a NULL enclosing context if appropriate. Fixes PR java/4466.
8521
8522 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
8523
8524 * parse.y (patch_assignment): Use lvalue's original TYPE when
8525 building the final COMPOUND_EXPR.
8526 (try_reference_assignconv): Fixed leading comment.
8527
8528 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
8529
8530 * parse.y (check_final_variable_indirect_assignment): For
8531 COMPOUND_EXPR, return only if finals were found initialized
8532 properly, if not, keep on checking.
8533 (check_final_variable_global_assignment_flag): New local
8534 error_found, set when appropriate and used to decide whether to
8535 report uninitialized finals. Fixed typo in comment.
8536
8537 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8538
8539 * decl.c (init_decl_processing): Fixed typo in predef_filenames
8540 last three initializations. Fixes PR java/4360.
8541
8542 2001-09-21 Richard Henderson <rth@redhat.com>
8543
8544 * class.c (get_dispatch_table): Handle function descriptors.
8545 (build_dtable_decl): Likewise.
8546 * expr.c (build_invokevirtual): Likewise.
8547
8548 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
8549
8550 * parse.y (patch_method_invocation): Build class initialization
8551 when static finals are used to qualify method invocation.
8552 Fixes PR java/4366.
8553
8554 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
8555
8556 * parse.h: (WFL_STRIP_BRACKET): Re-written using
8557 build_type_name_from_array_name.
8558 (STRING_STRIP_BRACKETS): New macro.
8559 * parse.y (build_type_name_from_array_name): New function.
8560 (array_creation_expression:): Accumulate []s instead of [s.
8561 (cast_expression:): Accumulate []s instead of [s after cast type
8562 name.
8563 (build_array_from_name): Local string deleted, use
8564 build_type_name_from_array_name.
8565 (build_unresolved_array_type): Accumulate []s instead of [s after
8566 type name.
8567 (register_fields): Fixed comment.
8568 (resolve_class): Local name, base deleted, new locals tname and
8569 array_dims. Use build_type_name_from_array_name. Use array_dims to
8570 build array type.
8571 (purify_type_name): Use STRING_STRIP_BRACKETS.
8572
8573 2001-09-18 Andreas Jaeger <aj@suse.de>
8574
8575 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8576 * jv-scan.c: Likewise.
8577
8578 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
8579
8580 * parse.y (patch_method_invocation): Inner class creation context
8581 check not enforced within constructors. Fixes PR java/1873.
8582
8583 2001-09-16 Tom Tromey <tromey@redhat.com>
8584
8585 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8586 NOTE_PUSH for single-case push. Fixes PR java/4189.
8587
8588 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
8589
8590 * java-tree.h (TYPE_IMPORT_LIST): New macro.
8591 (TYPE_IMPORT_DEMAND_LIST): Likewise.
8592 (struct lang_type): New fields import_list and import_demand_list.
8593 * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8594 TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8595 (do_resolve_class): New local saved_enclosing_type, initialized,
8596 passed as parameter to find_in_imports and find_in_imports_on_demand.
8597 (find_in_imports): Added paramater enclosing_type, use its
8598 TYPE_IMPORT_LIST when applicable.
8599 (find_in_imports_on_demand): Added parameter enclosing_type, use
8600 its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8601 declaration and initialization.
8602 (fold_constant_for_init): Switch/restore current_class to the
8603 appropriate context.
8604
8605 2001-09-13 Mark Mitchell <mark@codesourcery.com>
8606
8607 * verify.c (verify_jvm_instructions): Fix typo.
8608
8609 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8610
8611 * expr.c (expand_invoke): Const-ification.
8612 * parse.y (patch_method_invocation): Likewise.
8613
8614 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8615
8616 * gjavah.c (cxx_keywords): Const-ification.
8617 * keyword.gperf (java_keyword): Likewise.
8618 * lang.c (java_tree_code_name): Likewise.
8619 * lex.c (cxx_keywords): Likewise.
8620 * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8621
8622 2001-09-11 Richard Henderson <rth@redhat.com>
8623
8624 * parse.h (ctxp_for_generation): Mark extern.
8625
8626 2001-09-10 Richard Henderson <rth@redhat.com>
8627
8628 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8629
8630 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
8631
8632 * typeck.c (java_array_type_length, build_prim_array_type):
8633 Represent empty arrays by NULL index.
8634
8635 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
8636
8637 * java-tree.h (compile_resource_file): Grouped with other prototypes.
8638 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8639
8640 2001-09-06 Anthony Green <green@redhat.com>
8641
8642 * class.c (O_BINARY): Define if necessary.
8643 (registerResource_libfunc): Declare.
8644 (init_class_processing): Initilize registerResource_libfunc.
8645 (compile_resource_file): New function.
8646 * java-tree.h (resource_name): Declare.
8647 (compile_resource_file): Declare.
8648 * jcf-parse.c (yyparse): Handle compiling java resource files.
8649 * lang.c (java_decode_option): Handle -fcompile-resource option.
8650 * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8651 resource files.
8652 * gcj.texi (Code Generation): Add documentation for -R flag.
8653
8654 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
8655
8656 * jcf-write.c (generate_classfile): Issue an error in case of
8657 field/initial value mismatch.
8658 * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8659 being initialized and we're generating bytecode.
8660 (java_complete_lhs): In MODIFY_EXPR section: added comments,
8661 set DECL_INITIAL properly when appropriate.
8662 Fixes PR java/4230
8663 Fixes PR java/4204
8664
8665 2001-09-01 Per Bothner <per@bothner.com>
8666
8667 * parse.y (maybe_yank_clinit): A field without an initializer is not
8668 relevant. All initializers except static final and constant require
8669 <clinit>, regardless of flag_emit_class_files.
8670
8671 2001-08-31 Per Bothner <per@bothner.com>
8672
8673 * class.c (set_constant_value): When not emitting class files, then a
8674 String ConstantValue is a utf8const_ptr_type.
8675
8676 2001-08-30 Per Bothner <per@bothner.com>
8677
8678 * jcf-write.c (generate_classfile): Check that field is primitive
8679 or string before emitting ConstantValue attribute.
8680
8681 2001-08-30 Per Bothner <per@bothner.com>
8682
8683 * parse.y (resolve_qualified_expression_name): If creating a
8684 COMPOUND_EXPR, set it's type correctly.
8685
8686 2001-08-30 Per Bothner <per@bothner.com>
8687
8688 * jcf-io.c (open_class): Set filename field.
8689
8690 * jcf-parse,c (parse_class_file): Set current_function_decl
8691 for better error message when Code attribute is missing.
8692
8693 * lang.c (put_decl_node, lang_print_error): Re-arrange for
8694 better diagnostics, especially for constructors.
8695
8696 2001-08-30 Per Bothner <per@bothner.com>
8697
8698 * jcf-write.c (generate_classfile): Don't write ConstantValue
8699 attribute if field is not final, for compatibility with jdk.
8700
8701 * jcf-write.c (generate_classfile): Convert ConstantValue values
8702 to correct type. Work-around for front-end bug.
8703 * class.c (set_constant_value): Error if constant has wrong type.
8704
8705 2001-08-30 Per Bothner <per@bothner.com>
8706
8707 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
8708 "Double" are printed at verbosity 1.
8709
8710 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
8711
8712 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
8713
8714 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
8715
8716 * parse.y (patch_assignment): Don't verify final re-assignment here.
8717 (java_complete_lhs): Verify assignments to finals calling
8718 patch_assignment. Verify re-assignments to finals before calling
8719 patch_assignment.
8720
8721 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
8722
8723 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8724 Fixes PR java/1413
8725
8726 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
8727
8728 * lex.c (java_lex): new local found_hex_digits. Set and then used
8729 in test to reject invalid hexadecimal numbers.
8730 * parse.y (java_complete_tree): Prevent unwanted cast with
8731 initialized floating point finals.
8732 (patch_binop): Emit a warning when detecting a division by zero,
8733 mark result not constant, don't simplify non integer division.
8734
8735 2001-08-28 Per Bothner <per@bothner.com>
8736
8737 * jcf-write.c (generate_bytecode_insns): For increments and
8738 decrements just recurse to push constant. Improvement on Mark's patch.
8739
8740 2001-08-28 Mark Mitchell <mark@codesourcery.com>
8741
8742 * jcf-write.c (generate_bytecode_insns): Generate an integer to
8743 real conversion for increments and decrements of reals.
8744
8745 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
8746
8747 * parse.y (resolve_qualified_expression_name): Handle unresolved
8748 qualified expressions, prevent numerical qualifiers, fixed typo.
8749 Fixes PR java/4141
8750
8751 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
8752
8753 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8754 don't report anything but deprecated class when marked so. Handle
8755 VAR_DECL.
8756 (patch_method_invocation): Check deprecation on methods and types.
8757 (patch_binop): code becomes an enum tree_code, added default: to
8758 switch to handle that. Detect division by zero, try to fold and
8759 return before using a subroutine.
8760
8761 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
8762
8763 * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
8764 file smaller than 4 bytes.
8765 * parse.y (check_inner_circular_reference): New function.
8766 (check_circular_reference): Likewise.
8767 (array_initializer:): Accept {,}.
8768 (java_check_circular_reference): Rewritten using
8769 check_circular_reference and check_inner_circular_reference.
8770 (java_complete_expand_method): Unconditionally save and restore
8771 the unpurged exception list.
8772 (build_dot_class_method_invocation): Unmangle signature parameter.
8773
8774 2001-08-21 Tom Tromey <tromey@redhat.com>
8775
8776 * decl.c (init_decl_processing): Add `throws' field to method
8777 descriptor.
8778 * class.c (make_method_value): Compute `throws' field for method.
8779
8780 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8781
8782 * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
8783 circularity is detected.
8784 (ctors_unchecked_throws_clause_p): Fixed leading comment.
8785
8786 2001-08-17 Richard Henderson <rth@redhat.com>
8787
8788 * class.c (emit_register_classes): Add align parameter to
8789 call to assemble_integer.
8790
8791 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
8792
8793 * jcf-parse.c (load_class): New locals saved and class_loaded. If
8794 loading a class_or_name fails, try considering an innerclass name
8795 and load the enclosing context.
8796 * parse.y (resolve_inner_class): New function.
8797 (find_as_inner_class): Added leading comment.
8798 (register_incomplete_type): Keep the current context as enclosing
8799 context for JDEP_FIELD dependencies.
8800 (do_resolve_class): Locals new_class_decl and super initialized to
8801 NULL. Call resolve_inner_class, explore the enclosing context
8802 superclass if necessary.
8803 Fixes PR java/4007
8804
8805 2001-08-16 Tom Tromey <tromey@redhat.com>
8806
8807 * jcf-dump.c (main): Updated for change to jcf_path_seal.
8808 * gjavah.c (main): Updated for change to jcf_path_seal.
8809 * lang.c (version_flag): New global.
8810 (java_decode_option): Recognize `-version'.
8811 (java_init): Update for change to jcf_path_seal.
8812 * jcf.h (jcf_path_seal): Added `print' argument.
8813 * jcf-path.c (jcf_path_seal): Added `print' argument.
8814
8815 2001-08-13 Zack Weinberg <zackw@panix.com>
8816
8817 * Make-lang.in (java/decl.o): Update dependencies.
8818 * decl.c: Include libfuncs.h, don't include toplev.h.
8819
8820 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
8821
8822 * decl.c (init_decl_processing): exception_type_node,
8823 class_not_found_type_node, and no_class_def_found_type_node
8824 initialized. predef_filenames augmented accordingly.
8825 instinit_identifier_node initialized.
8826 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
8827 * java-tree.h (enum java_tree_index): New entries
8828 JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
8829 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
8830 (exception_type_node): New macro.
8831 (class_not_found_type_node): Likewise.
8832 (no_class_def_found_type_node): Likewise.
8833 (instinit_identifier_node): Likewise.
8834 (PREDEF_FILENAMES_SIZE): Adjusted.
8835 (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
8836 (struct lang_type): Fixed typo in bitfield name.
8837 (DECL_INSTINIT_P): New macro.
8838 (ID_INSTINIT_P): Likewise.
8839 * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
8840 attribute.
8841 * parse.y (encapsulate_with_try_catch): New function.
8842 (generate_instinit): Likewise.
8843 (build_instinit_invocation): Likewise.
8844 (ctors_unchecked_throws_clause_p): Likewise.
8845 (add_instance_initializer): Deleted.
8846 (build_instance_initializer): Likewise.
8847 (in_instance_initializer): Likewise.
8848 (check_method_redefinition): instinit$ not to be verified.
8849 (java_complete_expand_methods): Generate instinit$, simplified code.
8850 (build_dot_class_method): Eliminated unnecessary locals. Use
8851 encapsulate_with_try_catch, removed unnecessary code.
8852 (fix_constructors): New local iii. Use build_instinit_invocation.
8853 (patch_method_invocation): Added comment.
8854 (maybe_use_access_method): Don't consider instinit$.
8855 (find_applicable_accessible_methods_list): Shorten the search for
8856 instinit$ too.
8857 (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
8858 (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
8859 (patch_throw_statement): Likewise. Fixed typo.
8860
8861 2001-08-12 David Edelsohn <edelsohn@gnu.org>
8862
8863 Revert:
8864 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8865 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8866 ASM_FINAL_SPEC.
8867 (lang_specific_pre_link): Use set_input to set input_filename.
8868 Append `main' here.
8869 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8870 (main): Fix definition.
8871 Strip `main' from classname.
8872 Fixes PR java/227.
8873
8874 2001-08-11 Zack Weinberg <zackw@panix.com>
8875
8876 * lex.h: Don't include setjmp.h. Don't define
8877 SET_FLOAT_HANDLER or prototype set_float_handler.
8878
8879 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
8880
8881 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8882 `poplevel' in the right order.
8883
8884 2001-08-09 Richard Henderson <rth@redhat.com>
8885
8886 * Make-lang.in (class.o): Depend on TARGET_H.
8887 * class.c (emit_register_classes): Use target hooks instead of
8888 assemble_constructor and assemble_destructor.
8889
8890 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
8891
8892 * check-init.c (flags.h): Include
8893 (check_init): Don't report uninitialized static class
8894 initialization flags, don't free bit index when doing static class
8895 initialization optimization.
8896 (check_for_initialization): Return type changed to `unsigned int.'
8897 (attach_initialized_static_class): New function.
8898 * class.c (add_method_1): Create the initialized static class
8899 table if necessary.
8900 (finish_class): Always emit deferred inline methods.
8901 * decl.c (emit_init_test_initialization): Moved to expr.c
8902 (complete_start_java_method): Don't traverse
8903 DECL_FUNCTION_INIT_TEST_TABLE.
8904 (lang_mark_tree): Mark hash tables in function decls.
8905 * expr.c (emit_init_test_initialization): Moved from decl.c.
8906 (build_class_init): Create LAG_DECL_SPECIFIC for the static class
8907 initialization flag, set DECL_CONTEXT and
8908 LOCAL_CLASS_INITIALIZATION_FLAG.
8909 (java_lang_expand_expr): Emit initialization code for static class
8910 initialized flags when entering block, if necessary.
8911 * gcj.texi (-fno-optimize-static-class-initialization): Documented.
8912 * java-tree.h (flag_optimize_sci): New global variable declaration.
8913 (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
8914 (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
8915 (LOCAL_FINAL_P): Fixed typo in comment.
8916 (FINAL_VARIABLE_P): Likewise.
8917 (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
8918 (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
8919 (struct lang_decl): New fields `ict', `smic' and `cif.'
8920 (check_for_initialization): New returned value for global.
8921 (attach_initialized_static_class): New global function.
8922 (STATIC_CLASS_INIT_OPT_P): New macro.
8923 * lang-options.h (-fno-optimize-static-class-initialization): New flag.
8924 * lang.c (java_decode_option): Handle
8925 `-fno-optimize-static-class-initialization'
8926 * parse.y (start_complete_expand_method): New function.
8927 (java_expand_method_bodies): Likewise.
8928 (attach_init_test_initialization_flags): Likewise.
8929 (adjust_init_test_initialization): Likewise.
8930 (emit_test_initialization): Likewise.
8931 (java_complete_expand_methods): Nullify abstract and native method
8932 bodies.
8933 (java_complete_expand_method): New locals `fbody', `block_body'
8934 and `exception_copy.' Reorganized: directly return on empty method
8935 bodies, call `start_complete_expand_method', remember definitely
8936 initialized static class in function, don't expand method bodies.
8937 (java_expand_classes): Call `java_expand_method_bodies' before
8938 `finish_class' when compiling to native.
8939 (resolve_expression_name): Use `orig' after building outer class
8940 field access.
8941 (patch_invoke): Remember static method invocations.
8942
8943 2001-08-06 Richard Henderson <rth@redhat.com>
8944
8945 * class.c (emit_register_classes): Pass a symbol_ref and priority
8946 to assemble_constructor.
8947
8948 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
8949
8950 * java-tree.h (all_class_filename): New macro.
8951 (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
8952 (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
8953 newly created IDENTIFIER_NODE to `all_class_filename.'
8954
8955 2001-08-01 Jeff Sturm <jsturm@one-point.com>
8956
8957 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8958 Use ggc_add_tree_root to register roots.
8959
8960 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
8961
8962 * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
8963 second operand calling check_init.
8964 * decl.c (complete_start_java_method): Swaped second and third
8965 arguments while creating WITH_CLEANUP_EXPR node.
8966 * jcf-write.c (generate_bytecode_insns): Use second operand
8967 instead of third when handling WITH_CLEANUP_EXPR.
8968 * parse.y (java_complete_lhs): Expand second operand of
8969 WITH_CLEANUP_EXPR nodes.
8970 (patch_synchronized_statement): Swaped second and third arguments
8971 while creating WITH_CLEANUP_EXPR node.
8972
8973 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8974
8975 * parse.y (create_interface): Avoid cyclic inheritance report when
8976 syntax error encountered during class definition.
8977 Fixes PR java/2956
8978
8979 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8980
8981 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8982 ASM_FINAL_SPEC.
8983 (lang_specific_pre_link): Use set_input to set input_filename.
8984 Append `main' here.
8985 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8986 (main): Fix definition.
8987 Strip `main' from classname.
8988 Fixes PR java/227.
8989
8990 2001-07-18 Tom Tromey <tromey@redhat.com>
8991
8992 For PR java/2812:
8993 * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
8994 * lex.c (java_new_lexer): Use ICONV_CONST.
8995 (java_read_char): Likewise.
8996 * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
8997 (jv-scan$(exeext)): Likewise.
8998
8999 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9000
9001 * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9002 * parse.y (check_class_interface_creation): Allow `private' if the
9003 enclosing is not an interface.
9004 (create_interface): Interface tagged public if the enclosing
9005 context is an interface.
9006 (create_class): Class tagged public if the enclosing context
9007 is an interface.
9008 Fixes PR java/2959
9009
9010 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9011
9012 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9013 Fixes PR java/2665
9014
9015 2001-07-14 Tim Josling <tej@melbpc.org.au>
9016
9017 * check-init.c (check_init): Remove references to EXPON_EXPR.
9018
9019 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9020
9021 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9022 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9023 Fixes PR java/3602
9024
9025 2001-07-13 Tom Tromey <tromey@redhat.com>
9026
9027 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9028 invocation.
9029
9030 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9031
9032 * parse.y (patch_method_invocation): Don't override primary if one
9033 is already provided, but let this$<n> be built. Fixed comment.
9034
9035 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9036
9037 * parse.y (empty_statement:): Report empty statement error only
9038 when found at class declaration level.
9039 Fixes PR java/3635
9040
9041 2001-07-12 Tom Tromey <tromey@redhat.com>
9042
9043 * expr.c (expand_load_internal): New function.
9044 (LOAD_INTERNAL): Use it.
9045
9046 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
9047
9048 * parse.y (verify_constructor_super): Compare anonymous class ctor
9049 args with `valid_method_invocation_conversion_p.'
9050 Fixes PR java/3285
9051
9052 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9053
9054 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9055 `-fsyntax-only.' Fixes PR java/3248
9056
9057 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9058
9059 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9060
9061 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9062
9063 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9064 current function is static. Fixes PR java/1970
9065
9066 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9067
9068 * parse.y (patch_method_invocation): Add enclosing context to ctor
9069 calls if necessary. Fixes PR java/2953
9070
9071 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9072
9073 * parse.y (resolve_package): Abort if qualified expression member
9074 isn't right.
9075 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9076 Fixes PR java/1391
9077
9078 2001-07-07 Zack Weinberg <zackw@stanford.edu>
9079
9080 * verify.c: Don't use // comments.
9081
9082 2001-07-05 Tom Tromey <tromey@redhat.com>
9083
9084 * lang.c (flag_assume_compiled): Removed.
9085 * java-tree.h (flag_assume_compiled): Removed.
9086 * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9087 -fhash-synchronization, -fuse-divide-subroutine,
9088 -fcheck-references, -femit-class-file, -femit-class-files,
9089 -fassume-compiled. Updated --encoding information. Changed
9090 -foutput-class-dir to `-d'.
9091
9092 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
9093
9094 * jcf-parse.c (parse_class_file): Add lineno parameter to
9095 debug_start_source_file call.
9096
9097 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
9098
9099 * gcj.texi: Use gpl.texi.
9100 * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9101 dependencies and use doc/include in search path.
9102
9103 2001-07-03 Jeff Sturm <jsturm@one-point.com>
9104
9105 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9106 `this'. If so, don't build instance initializers.
9107
9108 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9109
9110 * parse.y (resolve_expression_name): Improved error message for
9111 inner class cases. Fixes PR java/1958
9112
9113 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
9114
9115 * lang.c: #include diagnostic.h
9116 (lang_print_error): Add a `diagnostic_context *' parameter.
9117 (java_dummy_print): Likewise.
9118 * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9119
9120 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9121
9122 * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9123 * jcf.h (typedef struct JCF): New bitfield `finished.'
9124 (JCF_FINISH): Set `finished.'
9125 (JCF_ZERO): Reset `finished.'
9126 Fixes PR java/2633
9127
9128 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9129
9130 * parse.y (class_body_declaration:): Don't install empty instance
9131 initializers.
9132 Fixes PR java/1314
9133
9134 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9135
9136 * class.c (set_super_info): Call `set_class_decl_access_flags.'
9137 (set_class_decl_access_flags): New function.
9138 * java-tree.h (set_class_decl_access_flags): New prototype.
9139 * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9140 (parse_class_file): New local `decl_max_locals.' Take wide types
9141 into account to compute DECL_MAX_LOCALS.
9142 * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9143 imports on demand.
9144
9145 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
9146
9147 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9148
9149 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9150
9151 * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9152 * parse.y (do_resolve_class): Moved comments out to leading comment
9153 section. Removed local `start', New local `_ht' and
9154 `circularity_hash.' Record `enclosing' in hash table and search
9155 it to detect circularity. Use `enclosing' as an argument to
9156 `lookup_cl.' Free the hash table when done.
9157
9158 2001-06-19 Tom Tromey <tromey@redhat.com>
9159
9160 * lex.c (java_read_char): Disallow invalid and overlong
9161 sequences. Fixes PR java/2319.
9162
9163 2001-06-05 Jeff Sturm <jsturm@one-point.com>
9164
9165 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9166
9167 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9168
9169 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9170 arguments accordingly.
9171
9172 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
9173
9174 * gcj.texi: Move contents to just after title page.
9175
9176 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
9177
9178 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9179 builtin type.
9180 (patch_incomplete_class_ref): Build the class ref, build the class
9181 init if necessary, complete the tree.
9182 Fixes PR java/2605
9183
9184 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
9185
9186 * parse.y (lookup_field_wrapper): Test `name' code.
9187 (resolve_qualified_expression_name): Test `qual_wfl' code.
9188 (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9189 handle `qual_wfl' by code.
9190 (maybe_build_primttype_type_ref): Test `wfl' code.
9191
9192 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9193
9194 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9195 fdl.texi.
9196 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
9197 the dvi file in the java directory.
9198
9199 2001-05-25 Sam TH <sam@uchicago.edu>
9200
9201 * gen-table.pl javaop.h jcf.h lex.h,
9202 parse.h: Fix header include guards.
9203
9204 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
9205
9206 * jv-scan.c (version): Update copyright year.
9207
9208 2001-05-21 Per Bothner <per@bothner.com>
9209
9210 * jcf-parse.c (read_class): If class is from .class or .zip file
9211 and it's already been read, don't push/pop parser context.
9212
9213 2001-05-18 Per Bothner <per@bothner.com>
9214
9215 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9216 command line so the jvgenmain-generated main program comes first.
9217
9218 2001-05-15 Tom Tromey <tromey@redhat.com>
9219
9220 * class.c (build_utf8_ref): Don't generate identifier based on
9221 utf8const contents.
9222
9223 2001-05-12 Richard Henderson <rth@redhat.com>
9224
9225 * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9226 * expr.c (java_lang_expand_expr): Expand it.
9227 (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9228 calling build_exception_object_ref.
9229 * parse.y (catch_clause_parameter): Likewise.
9230 (build_dot_class_method): Likewise.
9231 (try_reference_assignconv): Likewise.
9232 * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9233 * jcf-write.c (generate_bytecode_insns): Likewise.
9234
9235 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9236
9237 * parse.y (build_unresolved_array_type): Set
9238 EXPR_WFL_QUALIFICATION on the newly created wfl.
9239 Fixes PR java/2538. Fixes PR java/2535.
9240
9241 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9242
9243 * parse.y (fix_constructors): Removed unnecessary assignment to
9244 local. Moved assignment to `this$<n>', fixed comments and
9245 indentation.
9246 (build_wfl_wrap): Fixed indentation.
9247 Fixes PR java/2598, java/2579 and java/2658.
9248
9249 2001-05-03 Mo DeJong <mdejong@redhat.com>
9250
9251 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9252 check for byte swap.
9253
9254 2000-05-02 Jeff Sturm <jsturm@one-point.com>
9255
9256 * expr.c (build_class_init): Move MODIFY_EXPR
9257 outside of COND_EXPR. Remove variable `call'.
9258
9259 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9260
9261 * decl.c: NULL_PTR -> NULL.
9262 * jcf-write.c: Likewise.
9263
9264 2001-05-01 Tom Tromey <tromey@redhat.com>
9265
9266 * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9267 (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9268 * gcj.texi: Updated copyright text. Include fdl.texi.
9269 (Top): Link to new node.
9270
9271 2001-05-01 Per Bothner <per@bothner.com>
9272
9273 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
9274
9275 2001-05-01 Per Bothner <per@bothner.com>
9276
9277 * parse.y (java_pop_parser_context): The TREE_VALUE of a link in the
9278 import_list contains the name, not the TREE_PURPOSE.
9279
9280 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9281
9282 * jcf-io.c (read_zip_member): Cast to long in comparison with
9283 signed value.
9284
9285 * jvspec.c (lang_specific_driver): Initialize variables.
9286
9287 * mangle.c (find_compression_record_match): Likewise.
9288
9289 * typeck.c (build_null_signature): Provide static prototype. Mark
9290 parameter with ATTRIBUTE_UNUSED.
9291
9292 * verify.c (verify_jvm_instructions): Initialize variable.
9293
9294 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9295
9296 * parse.y (do_resolve_class): Check for cyclic inheritance during
9297 inner class resolution.
9298
9299 2001-04-27 Per Bothner <per@bothner.com>
9300
9301 * parse.y (java_expand_classes): Don't change ctxp_for_generation
9302 while iterating, since that could cause gc to lose stuff.
9303
9304 2001-04-26 Per Bothner <per@bothner.com>
9305
9306 Fix method search wrt scope of inner classes to match JLS2.
9307 * typeck.c (build_null_signature): New static function.
9308 (has_method): New function. Uses build_null_signature and lookup_do.
9309 * java-tree.h (has_method): New declaration.
9310 * parse.y (find_applicable_accessible_methods_list): Do not search
9311 context of inner classes here.
9312 (patch_method_invocation): Search scope, ie. current and outer clases,
9313 for method matching simple name, to find class.
9314
9315 2001-04-26 Per Bothner <per@bothner.com>
9316
9317 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9318 Fix thinko: If a single case, use if_icmpeq, not ifeq.
9319
9320 * constants.c (find_methodref_with_class_index): New function.
9321 (find_methodref_index): Use find_methodref_with_class_index.
9322 * java-tree.h (find_methodref_with_class_index): New declaration.
9323 * jcf-write.c (generate_bytecode_insns case CALL_EXPR): Don't change
9324 DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9325 If context changed from interface to class, don't use invokeinterface.
9326
9327 2001-04-25 Per Bothner <per@bothner.com>
9328
9329 * verify.c (verify_jvm_instructions): For field instructions,
9330 check that field index is valid. For invoke instructions, check that
9331 method index is valid.
9332
9333 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
9334
9335 * config-lang.in (target_libs): Copy from $libgcj_saved.
9336
9337 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9338
9339 * decl.c (init_decl_processing): Add new class "protectionDomain"
9340 field.
9341 * class.c (make_class_data): Set initial value for "protectionDomain".
9342
9343 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9344
9345 * jvspec.c (lang_specific_driver): Fix memory allocation
9346 deficit, by using concat in lieu of xmalloc/sprintf.
9347
9348 2001-04-20 Per Bothner <per@bothner.com>
9349
9350 Fixes to compile multiple .class files at once.
9351 * decl.c (init_decl_processing): Don't set CLASS_LOADED_P.
9352 * java-tree.h (CLASS_PARSED_P): New macro.
9353 (CLASS_LOADED_P): Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9354 * jcf-parse.c (jcf_parse_source): Inline into read_class.
9355 (read_class): Avoid some code duplication.
9356 Don't call JCF_FINISH for a .class file - might be needed later.
9357 (jcf_parse): Don't call layout_class here. Check/set CLASS_PARSED_P
9358 rather than CLASS_LOADED_P, since latter implies class laid out.
9359 (yyparse): Do layout_class and JCF_FINISh here instead, in pass 2.
9360 * parse.y: Don't need to set CLASS_LOADED_P for array types.
9361
9362 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9363
9364 * Make-lang.in (java/boehm.o): Depend on toplev.h.
9365
9366 * boehm.c: Include toplev.h.
9367
9368 2001-04-06 Tom Tromey <tromey@redhat.com>
9369 Alexandre Petit-Bianco <apbianco@redhat.com>
9370
9371 Fix for PR gcj/1404 and PR gcj/2332:
9372 * parse.y (build_array_from_name): If we use the type_wfl then
9373 accumulate dimensions from the original type as well.
9374 (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9375
9376 2001-04-06 Tom Tromey <tromey@redhat.com>
9377
9378 * parse.y (analyze_clinit_body): Return true if the second operand
9379 of a METHOD_EXPR is nonzero.
9380
9381 2001-04-06 Tom Tromey <tromey@redhat.com>
9382
9383 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9384 directory.
9385 ($(srcdir)/java/parse.c): Likewise.
9386
9387 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9388
9389 * gcj.texi: Use `which-gcj' instead of `which-g77.'
9390 (version-gcc): Initialized.
9391 (which-gcj): Likewise.
9392
9393 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9394
9395 * java-tree.h (struct lang_decl): New macro
9396 `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9397 * parse.y (build_instance_initializer): New function.
9398 (add_instance_initializer): Use it.
9399 (java_fix_constructors): Set `current_class' before fix pass.
9400 (fix_constructors): Just return if already fixed. Move `super()'
9401 invocation ahead. Use `build_instance_initializer.'
9402 Fixes PR java/1315.
9403
9404 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9405
9406 * parse.y (resolve_qualified_expression_name): Pass field's
9407 DECL_CONTEXT to `not_accessible_p.'
9408 (not_accessible_p): Changed parameters order in `inherits_from_p'
9409 invocation.
9410
9411 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
9412
9413 * lang-options.h: Add flag_check_references.
9414
9415 2001-04-04 Per Bothner <per@bothner.com>
9416
9417 * java-tree.h (CONSTANT_VALUE_P): New macro.
9418 * jcf-write.c (generate_classfile): Use CONSTANT_VALUE_P.
9419 * parse.y (maybe_build_class_init_for_field): New static function.
9420 (resolve_expression_name, resolve_field_access): Use
9421 maybe_build_class_init_for_field instead of build_class_init
9422 This does not do the init if the field is compile-time-constant.
9423 (resolve_field_access): Simplify.
9424
9425 * parse.y (fold_constant_for_init): Merge test into switch.
9426
9427 2001-04-03 Zack Weinberg <zackw@stanford.edu>
9428
9429 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9430 on gansidecl.h.
9431 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9432
9433 2001-04-02 Zack Weinberg <zackw@stanford.edu>
9434
9435 * expr.c (pop_type_0): Save the result of the first
9436 lang_printable_name call in a scratch buffer, so it
9437 won't be clobbered by the second call.
9438
9439 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
9440
9441 * parse-scan.y (array_type:): Rewritten.
9442 (type_declaration:): `empty_statement' replaces `SC_TK.'
9443 (class_member_declaration:): `empty statement' added.
9444 (method_body:): Simplified.
9445 (static_initializer:): Likewise.
9446 (primary_no_new_array:): Use `type_literals.'
9447 (type_literals:): New rule.
9448 (dims:): Set and update `bracket_count.'
9449 Fixes PR java/1074. Fixes PR java/2412.
9450
9451 2001-03-28 Hans Boehm <boehm@acm.org>
9452
9453 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9454 (get_boehm_type_descriptor): Set type on returned value to be a
9455 pointer length integer.
9456
9457 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9458
9459 * expr.c (pop_type_0): Call `concat' rather than building the
9460 string manually.
9461 (pop_type): Add format specifier in call to `error'.
9462
9463 * parse.y (patch_method_invocation): Avoid casting away
9464 const-ness.
9465
9466 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
9467
9468 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9469
9470 2001-03-28 Richard Henderson <rth@redhat.com>
9471
9472 IA-64 ABI Exception Handling:
9473 * Make-lang.in (except.o): Don't depend on eh-common.h.
9474 * check-init.c (check_init): Handle EXC_PTR_EXPR.
9475 * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9476 [soft_exceptioninfo_call_node]: Remove.
9477 [eh_personality_libfunc, lang_eh_runtime_type]: New.
9478 (end_java_method): No emit_handlers.
9479 * except.c (java_set_exception_lang_code): Remove.
9480 (method_init_exceptions): Don't call it.
9481 (prepare_eh_table_type): No CATCH_ALL_TYPE.
9482 (build_exception_object_ref): New.
9483 (expand_end_java_handler): Update for except.h name changes.
9484 (emit_handlers, expand_resume_after_catch): Remove.
9485 * expr.c (java_lang_expand_expr): Update for except.h name changes.
9486 (process_jvm_instruction): Use build_exception_object_ref.
9487 * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9488 (soft_exceptioninfo_call_node): Remove.
9489 (build_exception_object_ref): Declare.
9490 * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9491 soft_exceptioninfo_call_node. Move processing ...
9492 [EXC_PTR_EXPR]: ... here.
9493 * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9494 * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9495 (source_end_java_method): No java_set_exception_lang_code or
9496 emit_handlers.
9497 (build_dot_class_method): Use build_exception_object_ref.
9498 (try_reference_assignconv): Check EXC_PTR_EXPR not
9499 soft_exceptioninfo_call_node.
9500
9501 2001-03-28 Richard Henderson <rth@redhat.com>
9502
9503 * java-tree.h (throw_node): Define as a single member of
9504 java_global_trees instead of a separate array.
9505 (JTI_THROW_NODE): New.
9506 * decl.c (throw_node): Don't declare.
9507 (init_decl_processing): Init a scalar throw_node.
9508 Don't register it for gc.
9509 * check-init.c (check_init): Reference scalar throw_node.
9510 * expr.c (build_java_athrow): Likewise.
9511 * jcf-write.c (generate_bytecode_insns): Likewise.
9512 * parse.h (BUILD_THROW): Likewise.
9513
9514 2001-03-28 Richard Henderson <rth@redhat.com>
9515
9516 * decl.c (end_java_method): Do not save and restore
9517 flag_non_call_exceptions.
9518 * parse.y (source_end_java_method): Likewise.
9519 * lang.c (flag_exceptions): Don't declare.
9520 (java_init_options): Set flag_non_call_exceptions. Set
9521 flag_exceptions here ...
9522 (java_init): ... not here.
9523
9524 2001-03-27 Richard Henderson <rth@redhat.com>
9525
9526 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9527 exceptions_via_longjmp.
9528
9529 * lang.c (flag_new_exceptions): Don't declare it.
9530 (java_init_options): Or set it.
9531
9532 2001-03-27 Richard Henderson <rth@redhat.com>
9533
9534 * decl.c (end_java_method): Rename asynchronous_exceptions to
9535 flag_non_call_exceptions.
9536 * parse.y (source_end_java_method): Likewise.
9537
9538 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9539
9540 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9541
9542 2001-03-26 Mark Mitchell <mark@codesourcery.com>
9543
9544 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9545
9546 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9547
9548 * parse.y (find_as_inner_class): Follow current package
9549 indications not to mistakingly load an unrelated class.
9550
9551 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9552
9553 * constants.c (PUTN): Use memcpy, not bcopy.
9554
9555 * lex.c (java_read_char): Use memmove, not bcopy.
9556
9557 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9558
9559 2001-03-23 Per Bothner <per@bothner.com>
9560
9561 * verify.c (verify_jvm_instructions): Replace 3 pop_type by POP_TYPE
9562 macro for better error pin-pointing.
9563 * java-tree.h: Fix typo in comment.
9564
9565 * jcf-write.c (generate_bytecode_insns): Changes to TRY_FINALLY_EXPR.
9566 Don't include jsr/goto in exception range.
9567 Check if start and end of exception range are the same (also TRY_EXPR).
9568 Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9569 However, do emit the following goto even if try_block is empty.
9570 Defer freeing exception_decl until after the finalizer, to make
9571 sure the local isn't reused in the finalizer. Fixes PR java/1208.
9572
9573 * parse.y (java_complete_lhs): If the try-clause is empty, just
9574 return the finally-clause and vice versa.
9575
9576 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
9577
9578 * gcj.texi (Input Options): documented the check for attribute
9579 `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9580 * java-tree.h (flag_force_classes_archive_check): Declared extern.
9581 * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9582 (jcf_parse): Check for the right classes archive if necessary.
9583 * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9584 (jcf_parse_fields): Fixed indentation.
9585 * jcf-write.c (append_gcj_attribute): New function.
9586 (generate_classfile): Compute the attribute count, invoke
9587 `append_gcj_attribute'.
9588 * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9589 turned into bit-fields. New bit-field `right_zip.'
9590 (JCF_ZERO): Set `right_zip' to zero.
9591 * lang-options.h (-fforce-classes-archive-check): Added flag.
9592 * lang.c (flag_force_classes_archive_check): New flag.
9593 (lang_f_options): New entry `force-classes-archive-check.'
9594 Fixes PR java/1213.
9595
9596 2001-02-07 Andrew Haley <aph@redhat.com>
9597
9598 * gcj.texi (Configure-time Options): Add -fcheck-references.
9599 * expr.c (build_java_indirect_ref): New function.
9600 (java_check_reference): New function.
9601 (build_java_array_length_access): Use build_java_indirect_ref to
9602 check for null references.
9603 (build_java_arrayaccess): Likewise.
9604 (build_get_class): Likewise.
9605 (build_field_ref): Likewise.
9606 (invoke_build_dtable): Likewise.
9607 (build_invokeinterface): Likewise.
9608 * lang.c (lang_f_options): Add flag_check_references.
9609 * jvspec.c (jvgenmain_spec): Add flag_check_references.
9610 * java-tree.h (flag_check_references): New variable.
9611 * lang.c (flag_check_references): Likewise.
9612 * parse.y (patch_invoke): Use java_check_reference.
9613 (patch_assignment): Allow for extra nesting in
9614 _Jv_CheckArrayStore.
9615
9616 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
9617
9618 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9619 * lex.c (cxx_keywords): Likewise.
9620
9621 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
9622
9623 * parse.y (qualify_ambiguous_name): Broaden `length'
9624 recognition. Help MODIFY_EXPR be resolved as expression names.
9625 Fixes PR java/2066. Fixes PR java/2400.
9626
9627 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
9628
9629 * gjavah.c (process_file): Mark interface definitions with
9630 "__attribute__ ((java_interface))".
9631
9632 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
9633
9634 * class.c (layout_class): Fixed push_super_field's second
9635 argument. Fixes PR java/2333.
9636 (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9637 too early to lay innerclasses out.
9638
9639 2001-03-20 Tom Tromey <tromey@redhat.com>
9640 Alexandre Petit-Bianco <apbianco@redhat.com>
9641
9642 * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9643 inside an array reference. Insertion of the array store check
9644 rewritten. Fixes PR java/2299.
9645
9646 2001-03-20 Tom Tromey <tromey@redhat.com>
9647
9648 * lex.c (java_read_unicode): Only accept leading `u's.
9649
9650 2001-03-20 Tom Tromey <tromey@redhat.com>
9651
9652 * jcf-parse.c (read_class): Initialize `class'.
9653
9654 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9655
9656 * jcf_parse.c (jcf_parse): Eliminate unused variable.
9657
9658 2001-03-19 Mark Mitchell <mark@codesourcery.com>
9659
9660 * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9661 (layout_class): Likewise.
9662 (layout_class_method): Likewise.
9663 (emit_register_classes): Likewise.
9664 * decl.c (builtin_function): Likewise.
9665 (give_name_to_locals): Likewise.
9666
9667 2001-03-19 Per Bothner <per@bothner.com>
9668
9669 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
9670 before trying to load an inner class.
9671
9672 Fixes to process to command-line .class files in two passes.
9673 * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P): New flags.
9674 (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P): Rename to ..
9675 (CLASS_FROM_CURRENTLY_COMPILED_P): ... because it is more general now.
9676 * class.c (is_compiled_class): Fix for renamed flag.
9677 * parse.y (maybe_create_class_interface_decl): Likewise.
9678 * jcf-parse.c (yyparse): Also set if compiling .class files.
9679 * jcf-parse.c (read_class); Read current_class.
9680 (jcf_parse): Make static.
9681 (load_inner_classes): New function, with code moved from jcf_parse,
9682 because we need to inner classes after the command-line files are read.
9683 (yyparse): Set finput to NULL when it doesn't need to be closed.
9684 Reduce use of main_jcf (basically only for archive) and
9685 use finput instead of main_jcf->read_state.
9686 Inline jcf_figure_file_type into yyparse.
9687 Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
9688 Defer load_inner_classes and parse_class_file to a second pass,
9689 after we've correctly mapped command-line .clas fiels to classes.
9690 (jcf_figure_file_type): Removed.
9691 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): Removed flags.
9692 (JCF_ZERO): Also clear zipd field.
9693 * zipfile.h: Conditionalize on JCF_H insread of JCF_ZIP.
9694
9695 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9696
9697 * jcf-parse.c (yyparse): Change ch from char * to char.
9698
9699 2001-03-19 Per Bothner <per@bothner.com>
9700
9701 * jvspec.c (lang_specific_driver): Check for .zip and .jar files.
9702 Add constructed filelist-file at end, following -xjava. Thus any .o
9703 and library files are not affected by the -xjava. Also wrap
9704 explicit @FILE with -xjava and -xnone.
9705
9706 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
9707
9708 * class.c (build_static_field_ref): Call make_decl_rtl() after
9709 setting the DECL_EXTERNAL flag.
9710
9711 2001-03-17 Per Bothner <per@bothner.com>
9712
9713 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
9714
9715 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
9716 when result is is needed (target is STACK_TARGET).
9717
9718 * parse.h (JDEP_SOLV): Removed.
9719 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
9720
9721 * parse.y (incomplete_class_list): Removed.
9722 (obtain_incomplete_type): Don't use or set incomplete_class_list.
9723 It doesn't work if resolve_class changes the name of an array type
9724 that is on the list and then someone else looks for the modified name.
9725 Also, seems liable to break when compiling multiple source files at
9726 once. So the simplest is to just remove incomplete_class_list -
9727 it is only a minor space win and it is not even clear it saves time.
9728
9729 * parse.y (resolve_class): Remove unneeded promote_type.
9730
9731 2001-03-15 Per Bothner <per@bothner.com>
9732
9733 * java-tree.h (BLOCK_IS_IMPLICIT): New flag.
9734 * parse.h (BLOCK_EXPR_ORIGIN): Removed macro.
9735 * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
9736 Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
9737
9738 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
9739 * parse.y (java_expand_classes): Likewise.
9740
9741 * parse.y (expand_start_java_method): Was only called once and had a
9742 misleading name, so inline in caller java_complete_expand_method.
9743 (enter_a_block): Likewise inline in enter_block and remove.
9744
9745 Remove junk from when gcc/java was created (by copying from C/C++).
9746 * decl.c (keep_next_level_flag, keep_next_if_subblocks): Remove.
9747 (struct binding_level): Remove fields keep, keep_if_subblocks,
9748 more_cleanups_ok, have_cleanups (which have never been used).
9749 (pushlevel, poplevel): Remove related useless code.
9750
9751 * class.c (make_class_data): The class_dtable_decl (i.e. the
9752 vtable for Class) should be external, except when compiling Class.
9753
9754 * jvspec.c (lang_specific_driver): Fix -C handling.
9755 Check -save-temps to see if temp @FILE should be deleted.
9756 Follow-up to/fix for February 16 patch.
9757
9758 * verify.c (verify_jvm_instructions): Better error msgs for dup.
9759 (type_stack_dup): Remove no-longer neded error check.
9760
9761 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
9762
9763 * mangle.c (mangle_record_type): Rename 'from_pointer' argument
9764 to 'for_pointer'. If this type is for a pointer (argument) mangling,
9765 don't surround the element with 'N..E' if the type name is
9766 unqualified.
9767
9768 2001-03-14 Mark Mitchell <mark@codesourcery.com>
9769
9770 * class.c (build_static_field_ref): Use COPY_DECL_RTL,
9771 DECL_RTL_SET_P, etc.
9772 (make_method_value): Likewise.
9773 (get_dispatch_table): Likewise.
9774
9775 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9776
9777 2001-03-07 Tom Tromey <tromey@redhat.com>
9778
9779 * config-lang.in (lang_requires): Define.
9780
9781 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
9782
9783 * typeck.c (convert): Check flag_unsafe_math_optimizations,
9784 not flag_fast_math.
9785
9786 2001-03-05 Per Bothner <per@bothner.com>
9787
9788 Fix a problem where rest_of_decl_compilation applied to
9789 class_dtable_decl causes problems because it was done too early,
9790 before output file was opened.
9791 * decl.c (init_decl_processing): Remove init of class_dtable_decl.
9792 * class.c (class_dtable_decl): Add macro - element of class_roots.
9793 (make_class_data): Define class_dtable_decl.
9794 * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl): Removed.
9795
9796 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9797
9798 * java/class.c, java/decl.c, java/java-tree.h: Replace all
9799 uses of 'boolean' with 'bool'.
9800
9801 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9802
9803 * lang-specs.h: Add zero initializer for cpp_spec field to all
9804 array elements.
9805
9806 2001-02-16 Per Bothner <per@bothner.com>
9807
9808 Handle compiling multiple input files at once, and @FILE syntax.
9809 * gcj.texi: Updated documentation to match.
9810 * java-tree.h (flag_filelist_file, init_src_parse): New declarations.
9811 * jcf-parse.c (parse_source_file): Split into ...
9812 (parse_source_file_1): New function - and:
9813 (parse_source_file_2): New function.
9814 (yyparse): On -ffilelist-file, open and scan named file.
9815 On first pass over files, only do parse_source_file_1.
9816 A new second pass calls parse_source_file_2 for each file to compile.
9817 (init_jcf_parse): Call init_src_parse.
9818 * jvspec.c (INDIRECT_FILE_ARG): New flag.
9819 (lang_specific_driver): Support @FILELIST-FILE syntax, as well
9820 as multiple input file combined in one compilation.
9821 * lang-options.h: Add -ffilelist-file
9822 * lang.c (flag_filelist_file): New flag variable.
9823 (lang_f_options): Handle -ffilelist-file.
9824 * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
9825 * parse.h (struct parse_ctxt): Remove fields incomplete_class and
9826 gclass_list - use global fields of src_parse_roots instead.
9827 * parse.y (src_parse_roots): New array.
9828 (incomplete_class_list, gclass_list): New macros.
9829 (push_parser_context, java_pop_parser_context,
9830 java_parser_context_resume): Don't fiddle with deleted fields.
9831 (various): Use incomplete_class gclass_list and global macros
9832 instead of parse_ctxt fields - the lists are global.
9833 (init_src_parse): New function.
9834
9835 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9836
9837 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9838
9839 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9840
9841 * parse.y (check_inner_class_access): Moved declaration of local
9842 `enclosing_decl_type' to the right location.
9843
9844 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
9845
9846 * parse.y (parser_check_super_interface): Don't call
9847 check_pkg_class_access for an inner interface.
9848 (parser_check_super): Don't call check_pkg_class_access for inner
9849 class.
9850 (do_resolve_class): Simplify enclosing type loop. Don't call
9851 check_pkg_class_access if CL and DECL are not set.
9852 (find_in_imports_on_demand): Set DECL if class_type needed to be
9853 loaded. Don't call check_pkg_class_access for an inner class.
9854 (check_inner_class_access): Rewritten to implement member access
9855 rules as per spec 6.6.1.
9856 (check_pkg_class_access): Handle the empty package correctly.
9857 (in_same_package): New function. Determine if two classes are in the
9858 same package.
9859
9860 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
9861
9862 * typeck.c (build_java_array_type): Don't try to poke a public `clone'
9863 method into array types.
9864 * parse.y (patch_method_invocation): Bypass access check on clone call
9865 to array instance.
9866
9867 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9868
9869 * expr.c (build_instanceof): Check for arrays when trying fold to
9870 false.
9871
9872 2001-02-15 Jim Meyering <meyering@lucent.com>
9873
9874 * Make-lang.in (java.install-common): Depend on `installdirs'.
9875 (java.install-info): Likewise.
9876
9877 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
9878
9879 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9880
9881 2001-02-14 Tom Tromey <tromey@redhat.com>
9882 Alexandre Petit-Bianco <apbianco@cygnus.com>
9883
9884 Fix for PR java/1261.
9885 * typeck.c (build_java_array_type): Add public `clone' method to
9886 arrays.
9887 * parse.y (resolve_qualified_expression_name): Use current_class
9888 when checking for inaccessibility.
9889 (patch_method_invocation): Fixed error message when accessibility
9890 denied. Added `from_super' argument.
9891
9892 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
9893
9894 * parse.y (resolve_class): Don't build a fake decl. Use the one
9895 already built.
9896 * typeck.c (build_java_array_type): Build and assign decl to array
9897 type.
9898
9899 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
9900
9901 * parse.y (not_accessible_p): Changed leading comment. Added extra
9902 `where' argument. Use it to enforce protected access rules.
9903 (resolve_qualified_expression_name): Added extra argument to
9904 not_accessible_p.
9905 (patch_method_invocation): Use argument `primary' to provide
9906 not_accessible_p with an extra argument.
9907 (lookup_method_invoke): Added extra argument to not_accessible_p.
9908 (search_applicable_method_list): Likewise.
9909
9910 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9911
9912 * parse.y (resolve_qualified_expression_name): Try to resolve as
9913 an inner class access only if `decl' is a TYPE_DECL.
9914
9915 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
9916
9917 * decl.c (classdollar_identifier_node): Initialize.
9918 * java-tree.h (enum java_tree_index): New entry
9919 `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
9920 (classdollar_identifier_node): New macro.
9921 (ID_CLASSDOLLAR_P): Likewise.
9922 * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
9923 (build_dot_class_method_invocation): Likewise.
9924 (find_applicable_accessible_methods_list): `class$' can't be
9925 inherited.
9926
9927 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
9928
9929 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
9930
9931 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9932
9933 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
9934 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
9935 gone.
9936
9937 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9938
9939 * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
9940 outside of the `__U' sequence too.
9941 (unicode_mangling_length): Count `_' or `U' outside of the `__U'
9942 sequence too.
9943
9944 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9945
9946 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9947
9948 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
9949
9950 * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
9951 (JVGENMAIN_OBJS): Likewise.
9952 * java-tree.h (append_gpp_mangled_name): New prototype.
9953 * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
9954 Removed cast calling `gcc_add_root.'
9955 * jvgenmain.c (mangle_obstack): New global, initialized.
9956 (main): Use it.
9957 (do_mangle_class): Constify local `ptr.'
9958 Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
9959 append_gpp_mangle_name and update `count' if necessary.
9960 Use `mangle_obstack.'
9961 * mangle.c (append_unicode_mangled_name): Removed.
9962 (append_gpp_mangled_name): Likewise.
9963 (unicode_mangling_length): Likewise.
9964 (mangle_member_name): Return type set to `void.'
9965 (mangle_field_decl): Don't append `U' in escaped names.
9966 (mangle_method_decl): Likewise.
9967 (mangle_member_name): Just use `append_gpp_mangled_name.'
9968 * mangle_name.c: New file.
9969
9970 2001-02-07 Per Bothner <per@bothner.com>
9971
9972 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
9973
9974 * check-init.c (check_init): Don't call done_alternative after
9975 processing loop code, as a LOOP_EXPR never terminates normally.
9976
9977 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
9978
9979 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9980
9981 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9982
9983 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9984 DECLs.
9985
9986 2001-02-06 Tom Tromey <tromey@redhat.com>
9987
9988 * lex.c (java_new_lexer): Longer error message.
9989
9990 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
9991 Alexandre Petit-Bianco <apbianco@cygnus.com>
9992
9993 * typeck.c (build_prim_array_type): Added leading comment.
9994 (build_java_array_type): Moved locals out of
9995 block. Always create the `data' field, fixed alignment to match
9996 C++.
9997
9998 2001-02-04 Tom Tromey <tromey@redhat.com>
9999
10000 * expr.c (java_lang_expand_expr): Don't bother recomputing
10001 `length'. Use rest_of_decl_compilation, not make_decl_rtl.
10002 Fixes PR java/1866.
10003
10004 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10005
10006 * parse.y (process_imports): Save the original name of the import
10007 for better error report.
10008
10009 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
10010
10011 * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10012 of macros used when compiling jvspec.c.
10013 * jvspec.c (lang_specific_driver): Link with the shared
10014 libgcc by default.
10015
10016 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10017
10018 * check-init.c (check_init): Call internal_error instead of fatal.
10019 * expr.c (java_lang_expand_expr): Likewise.
10020 * jcf-parse.c (get_constant): Likewise.
10021 * mangle.c (java_mangle_decl): Likewise.
10022 * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10023 (operator_string): Likewise.
10024 * check-init.c (check_init): Call abort instead of fatal.
10025 * class.c (build_class_ref): Likewise.
10026 * constants.c (write_constant_pool): Likewise.
10027 * decl.c (start_java_method): Likewise.
10028 * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10029 (java_stack_dup, encode_newarray_type): Likewise.
10030 (build_java_array_length_access): Likewise.
10031 (build_java_check_indexed_type, expand_java_pushc): Likewise.
10032 (build_java_soft_divmod, build_invokeinterface): Likewise.
10033 * java-tree.h (INNER_CLASS_P): Likewise.
10034 * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10035 (give_name_to_class, get_class_constant): Likewise.
10036 * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10037 (find_constant_index, generate_bytecode_conditional): Likewise.
10038 (generate_bytecode_insns, perform_relocations): Likewise.
10039 * lex.c (java_unget_unicode, java_lex): Likewise.
10040 * mangle.c (mangle_type, mangle_record_type): Likewise.
10041 (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10042 (finish_mangling): Likewise.
10043 * parse.h (MARK_FINAL_PARMS): Likewise.
10044 * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10045 (obtain_incomplete_type, java_complete_class): Likewise.
10046 (java_check_regular_methods, java_complete_expand_method): Likewise.
10047 (cut_identifier_in_qualified, check_deprecation): Likewise.
10048 (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10049 (java_complete_lhs, lookup_name_in_blocks): Likewise.
10050 (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10051 * typeck.c (set_local_type, parse_signature_type): Likewise.
10052 (parse_signature_string, build_java_signature): Likewise;
10053 (set_java_signature): Likewise.
10054 * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10055 * class.c (add_method): Call fatal_error instead of fatal.
10056 (build_static_field_ref): Likewise.
10057 * expr.c (build_known_method_ref, expand_invoke): Likewise.
10058 * jcf-parse.c (get_constant, jcf_parse): Likewise.
10059 * lex.c (java_new_new_lexer): Likewise.
10060 * jv-scan.c (main): Likewise.
10061 (fatal_error): Renamed from fatal.
10062 * jcf-parse.c (yyparse): Call fatal_io_error instead of
10063 pfatal_with_name.
10064 * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10065 (yyparse): Likewise.
10066 * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10067 * lex.c (java_get_line_col): Likewise.
10068 * jcf-parse.c (load_class): Make errors non-fatal.
10069 * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10070
10071 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
10072
10073 * jvgenmain.c (class_mangling_suffix): Remove unused string.
10074 (error): Remove unused function.
10075 (main): Don't use "__attribute__ alias" on generated class symbol.
10076
10077 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10078
10079 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10080 argument.
10081 * parse.y (finish_method_declaration): Code accounting for WFLed
10082 method DECL_NAMEs deleted.
10083 (check_abstract_method_definitions): Likewise.
10084 (resolve_type_during_patch): Layout resolved type.
10085 * typeck.c (lookup_do): Removed unused local.
10086
10087 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
10088
10089 * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10090 * decl.c (init_decl_processing): Use integer_minus_one_node, not
10091 integer_negative_one_node.
10092 * expr.c (build_java_binop): Likewise.
10093
10094 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
10095
10096 * zextract.c (read_zip_archive): Read file_offset before writing
10097 zipd and consequently clobbering the header contents.
10098
10099 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10100
10101 * Make-lang.in: Remove all dependencies on defaults.h.
10102 * decl.c: Don't include defaults.h.
10103 * expr.c: Likewise.
10104 * parse.y: Likewise.
10105
10106 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10107
10108 * ChangeLog (2001-01-21): Fixed typo.
10109 * class.c (layout_class_method): Code accounting for WFLed
10110 method DECL_NAMEs deleted.
10111 * constant.c (find_methodref_index): Likewise.
10112 * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10113 * java-tree.h (DECL_FUNCTION_WFL): New macro.
10114 (struct lang_decl): New field `wfl'.
10115 (java_get_real_method_name): Prototype deleted.
10116 * mangle.c (mangle_method_decl): Code accounting for WFLed
10117 method DECL_NAMEs deleted.
10118 * parse.h (GET_METHOD_NAME): Macro deleted.
10119 * parse.y (reset_method_name): Deleted.
10120 (method_header): Set DECL_FUNCTION_WFL.
10121 (check_abstract_method_header): Code accounting for WFLed method
10122 DECL_NAMEs deleted.
10123 (java_get_real_method_name): Deleted.
10124 (check_method_redefinition): Code accounting for WFLed method
10125 DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10126 (java_check_regular_methods): Likewise.
10127 (java_check_abstract_methods): Likewise.
10128 (java_expand_classes): Don't call `reset_method_name.'
10129 (search_applicable_method_list): Use DECL_NAMEs instead of
10130 GET_METHOD_NAME.
10131 * typeck.c (lookup_do): Code accounting for WFLed method
10132 DECL_NAMEs deleted.
10133
10134 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
10135
10136 * lex.c (java_read_char): Check for EOF from getc first.
10137
10138 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10139
10140 * class.c (layout_class): Don't lay the superclass out if it's
10141 already being laid out.
10142 * jcf-parse.c (handle_innerclass_attribute): New function.
10143 (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10144 handle_innerclasses_attribute.
10145 (jcf_parse): Don't load an innerclasses if it's already being
10146 laid out.
10147 * jcf-write.c (append_innerclass_attribute_entry): Static
10148 `anonymous_name' and its initialization deleted. `ocii' and `ini'
10149 to be zero for anonymous classes.
10150
10151 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10152
10153 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10154 necessary.
10155 * jcf-parse.c (set_source_filename): Use
10156 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10157
10158 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10159
10160 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10161 gets a unique asm name.
10162
10163 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10164
10165 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10166 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10167 if necessary.
10168 (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10169 * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10170 * parse.y (lookup_package_type_and_set_next): Deleted.
10171 (resolve_package): Removed unnecessary code.
10172 (find_applicable_accessible_methods_list): `finit$' can't be
10173 inherited.
10174 * verify.c (pop_argument_types): Added missing prototype.
10175
10176 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
10177
10178 * config-lang.in: Disable java by default.
10179
10180 2001-01-23 Tom Tromey <tromey@redhat.com>
10181
10182 * gcj.texi (Copying): New node.
10183 Added copyright information.
10184
10185 2001-01-21 Per Bothner <per@bothner.com>
10186
10187 Various fixes to allow compiling a compressed .jar/.zip archive.
10188 * zipfile.h (struct ZipFileCache): Replace by struct ZipFile.
10189 (struct ZipFile): Add fields name and next (from ZipFileCache).
10190 (struct ZipDirectory): New field zipf points to owning ZipFile.
10191 * jcf.h (struct ZipDirectory): Add forward declaration.
10192 (struct JCF): Declare zipd field to have type struct ZipDirectory.
10193 Remove seen_in_zip and zip_offset fields.
10194 (JCF_SEEN_IN_ZIP): New macro.
10195 * zextract.c (read_zip_archive): Set ZipDirectory's zipf field.
10196 * jcf-io.c: Change all ZipFileCache to ZipFile.
10197 (read_zip_member): New function.
10198 (open_in_zip): Call read_zip_member.
10199 * jcf-parse.c (find_in_current_zip): Remove function.
10200 (read_class): Merge in find_in_current_zip functionality.
10201 Call read_zip_member if needed.
10202 (parse_zip_file_entries): Use read_zip_member.
10203 (process_zip_dir): Update for removed and added JCF fields.
10204 (jcf_figure_file_type): Re-use, don't copy initial ZipFile struct.
10205
10206 2001-01-21 Per Bothner <per@bothner.com>
10207
10208 Minor optimization of static ggc roots.
10209 * jcf-parse.c (parse_roots): New static field.
10210 (current_field, current_method, current_file_list): Replace by macros
10211 naming fields of parse_roots.
10212 (init_jcf_parse): Combine 3 ggc_add_tree_root calls to 1.
10213 * class.c (class_roots): New static field.
10214 (registered_class, fields_ident, info_ident, class_list):
10215 New macros naming fields of parse_roots.
10216 (build_static_field_ref): Don't register roots here.
10217 (layout_class): Static field list replaced by macro class_list.
10218 (init_class_processing): Call ggc_add_tree_root for 4 roots.
10219 Initialize fields_ident and info_ident here.
10220
10221 2001-01-21 Per Bothner <per@bothner.com>
10222
10223 * jcf-parse.c (ggc_mark_jcf): New function.
10224 (init_jcf_parse): Register current_jcf as ggc root.
10225
10226 2001-01-21 Per Bothner <per@bothner.com>
10227
10228 * lang.c (put_decl_node): Print method's name.
10229
10230 2001-01-21 Per Bothner <per@bothner.com>
10231
10232 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
10233 (verify_jvm_instructions): Use it, for better error messages on loads.
10234
10235 2001-01-21 Per Bothner <per@bothner.com>
10236
10237 * verify.c (merge_type_state): Still may have to merge even if
10238 LABEL_VERIFIED (label).
10239
10240 2001-01-21 Per Bothner <per@bothner.com>
10241
10242 * parse.y (method_header): Don't set the DECL_NAME of a FUNCTION_DECL
10243 to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10244
10245 2001-01-19 Per Bothner <per@bothner.com>
10246
10247 * expr.c (pop_type_0): Only return object_ptr_type_node on mismatch
10248 if expeting an interface type. Refines Tom's change of 2000-09-12.
10249
10250 2001-01-18 Per Bothner <per@bothner.com>
10251
10252 * gcj.texi (Input Options): Mention .java files.
10253
10254 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10255
10256 * lang-options.h (-Wunsupported-jdk11): Removed.
10257 * lang.c (flag_not_overriding): Deleted.
10258 (flag_static_local_jdk1_1): Likewise.
10259 (lang_W_options): Removed "unsupported-jdk11" entry.
10260 * parse.y (java_check_methods): Removed dead code.
10261
10262 2001-01-17 Tom Tromey <tromey@redhat.com>
10263
10264 Changes suggested by Per Bothner:
10265 * gcj.texi (Input Options): Don't mention input files.
10266 (Code Generation): Updated --main information.
10267 (Invoking jcf-dump): Mention that --javap is incomplete.
10268 From Alexandre Petit-Bianco:
10269 (Warnings): Don't mention -Wunsupported-jdk11.
10270 My stuff:
10271 (Compatibility): Mention JDK 1.2-ness of libraries.
10272 (Resources): Mention resources used when writing gcj.
10273
10274 2001-01-17 Tom Tromey <tromey@redhat.com>
10275
10276 * gcj.texi: New file.
10277 * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10278 (java.info): Depend on gcj.info.
10279 (java/gcj.dvi): New target.
10280 (java.dvi): Depend on gcj.dvi.
10281 (java.install-info): Wrote.
10282
10283 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
10284
10285 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10286 having called make_decl_rtl.
10287
10288 2001-01-14 Per Bothner <per@bothner.com>
10289
10290 Various patches to emit better messages on verification errors.
10291 * expr.c (push_type_0): Return error indication on stack overflow,
10292 instead of callinfg fatal.
10293 (push_type): Now just call push_type_0 (nd fatal on overflow).
10294 (pop_type_0): Return detailed error message (in a char** argument).
10295 (pop_type): If pop_type_0 fails, print error message.
10296 (pop_argument_types): Moved to verify.c.
10297 * verify.c (pop_argument_types): Moved from expr.c.
10298 Return a (possible) error message, rather than void.
10299 (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING): New macros.
10300 (verify_jvm_instruction): Use new macros, improving error messages.
10301 For case OPCODE_astore use object_ptr_type_node.
10302 * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED): New macros.
10303 (pop_type_0, push_type_0, pop_argument_types): Update accordingly.
10304
10305 * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10306 constant, return body without wrapper. (Improves constant folding.)
10307 * lex.c (build_wfl_node): Clear TREE_TYPE from returned node.
10308
10309 2001-01-13 Per Bothner <per@bothner.com>
10310
10311 * expr.c (expand_java_field_op): Assigning to a final field outside
10312 an initializer does not violate JVM spec, so should be warning, not
10313 error. (Sun's verifier does not complain - though MicroSoft's does.)
10314
10315 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
10316
10317 * gjavah.c (version), jcf-dump.c (version): Update copyright year
10318 to 2001.
10319
10320 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
10321
10322 * parse.y (resolve_expression_name): Permit instance variables from
10323 enclosing context in super constructor call.
10324 (resolve_qualified_expression_name): Permit enclosing class's qualified
10325 "this" in super constructor call.
10326
10327 2001-01-10 Mark Mitchell <mark@codesourcery.com>
10328
10329 * class.c (build_utf8_ref): Remove last argument in call to
10330 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10331 (build_class_ref): Likewise.
10332 (build_static_field_ref): Likewise.
10333 (get_dispatch_table): Likewise.
10334 (layout_class_method): Likewise.
10335 (emit_register_classes): Likewise.
10336 * constants.c (build_constant_data_ref): Likewise.
10337 * decl.c (builtin_function): Likewise.
10338 (create_primitive_vtable): Likewise.
10339 * expr.c (build_known_method_def): Likewise.
10340 (build_jni_stub): Likewise.
10341 (java_lang_expand_expr): Likewise.
10342
10343 2001-01-10 Tom Tromey <tromey@redhat.com>
10344
10345 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10346
10347 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
10348
10349 * java-tree.h (lang_printable_name_wls): New prototype.
10350 * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10351 rather than `current_class' to print type name. Don't prepend type
10352 names when printing constructor names.
10353 (lang_printable_name_wls): New function.
10354 * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10355 `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10356 * parse.y (patch_method_invocation): Message tuned for constructors.
10357 (not_accessible_p): Grant `private' access from within
10358 enclosing contexts.
10359
10360 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
10361
10362 All files with updated copyright when applicable.
10363 * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10364 * class.c (mangle_class_field): Function removed.
10365 (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10366 (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10367 (build_class_ref): Call `java_mangle_class_field' instead of
10368 `mangle_class_field.'
10369 (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10370 (layout_class): Call `java_mangle_decl' instead of
10371 `mangle_static_field.'
10372 (cxx_keywords): Initialized static array moved to `lex.c.'
10373 (layout_class_method): Changed leading comment. Simplified to
10374 call `java_mangle_decl.' Local `ptr' moved in for loop body.
10375 * decl.c (lang_mark_tree): Mark field `package_list.'
10376 * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10377 (struct lang_type): New field `package_list.'
10378 (unicode_mangling_length): Prototype removed.
10379 (append_gpp_mangled_name, append_gpp_mangled_classtype,
10380 emit_unicode_mangled_name): Likewise.
10381 (cxx_keyword_p): New prototype.
10382 (java_mangle_decl, java_mangle_class_field,
10383 java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10384 * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10385 `build_expr_wfl.'
10386 * jvgenmain.c (main_method_prefix): Global variable removed.
10387 (main_method_suffix): Likewise.
10388 (do_mangle_classname): New function.
10389 (main): Call it. Format changed to accommodate new mangling scheme.
10390 * lex.c: (utf8_cmp): Conditionally prototyped.
10391 (cxx_keywords): Moved from class.c, conditionally defined.
10392 (utf8_cmp, cxx_keyword_p): Likewise.
10393 * mangle.c (obstack.h, ggc.h): Included.
10394 (mangle_field_decl): New function.
10395 (mangle_method_decl, mangle_type, mangle_pointer_type,
10396 mangle_array_type, mangle_record_type,
10397 find_compression_pointer_match, find_compression_array_match,
10398 find_compression_record_match,
10399 find_compression_array_template_match, set_type_package_list,
10400 entry_match_pointer_p, emit_compression_string, init_mangling,
10401 finish_mangling, compression_table_add, mangle_member_name): Likewise.
10402 (mangle_obstack): New global.
10403 (MANGLE_RAW_STRING): New macro.
10404 (unicode_mangling_length): Turned static.
10405 (append_unicode_mangled_name): Renamed from
10406 `emit_unicode_mangled_name.' Turned static. `mangle_obstack'
10407 replaces `obstack', removed from the parameter list.
10408 (append_gpp_mangled_name): Turned static. `mangle_obstack'
10409 replaces parameter `obstack', removed from the parameter list. Call
10410 `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10411 (append_gpp_mangled_classtype): Removed.
10412 (compression_table, compression_next): New static variables.
10413 * parse.y (temporary_obstack): Extern declaration removed.
10414
10415 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10416
10417 * parse.y (patch_binop): Compute missing type in error situations.
10418
10419 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
10420
10421 * class.c (make_class_data): Push initial value for "arrayclass".
10422 * decl.c (init_decl_processing): Add new class field "arrayclass".
10423
10424 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
10425
10426 From patha@softlab.ericsson.se:
10427 * parse.y (switch_label): Use build, not build1, to construct
10428 DEFAULT_EXPR.
10429
10430 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
10431
10432 * lang.c (lang_decode_option): Change -MA to -MP.
10433 * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10434 Update to new prototype; do quote targets.
10435 (jcf_dependency_write): Update.
10436
10437 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
10438
10439 Shorten primitive array allocation path:
10440 * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10441 to create new primitive arrays.
10442 * expr.c (build_newarray): If generating native code, call
10443 soft_newarray_node with a reference to the primitive TYPE identifier
10444 instead of type_value.
10445
10446 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
10447
10448 Fix for PRs gcj/312 and gcj/253:
10449 * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10450 dest if they arn't already.
10451 * class.c (layout_class): Call maybe_layout_super_class on
10452 superinterfaces also, but only if compiling from bytecode.
10453
10454 Fix for PR gcj/373:
10455 * parse.y (create_class): Set ACC_STATIC if class is declared in an
10456 interface.
10457
10458 2000-12-15 Tom Tromey <tromey@redhat.com>
10459
10460 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10461 set.
10462
10463 2000-12-14 Andrew Haley <aph@redhat.com>
10464
10465 * boehm.c (mark_reference_fields): Change test to correctly detect
10466 bitmap overflow.
10467
10468 2000-12-15 Andreas Jaeger <aj@suse.de>
10469
10470 * config-lang.in (lang_dirs): Added.
10471
10472 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10473
10474 * parse.y (end_artificial_method_body): Fixed undefined behavior.
10475 Credits go to rth for finding it.
10476
10477 2000-12-13 Mike Stump <mrs@wrs.com>
10478
10479 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10480
10481 2000-11-07 Tom Tromey <tromey@cygnus.com>
10482
10483 * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10484 * lex.c (java_ignorable_control_p): Removed.
10485 (java_letter_or_digit_p): Removed.
10486 (java_start_char_p): New function.
10487 (java_read_char): Return `int', not `unicode_t'. Changed
10488 callers.
10489 (java_read_unicode): Likewise.
10490 (java_read_unicode_collapsing_terminators): Likewise.
10491 (java_get_unicode): Likewise.
10492 (java_new_lexer): Initialize hit_eof.
10493 (java_parse_end_comment): Take `int' argument.
10494 (java_parse_doc_section): Likewise.
10495 (java_parse_escape_sequence): Don't allow backlash-newline.
10496 Return `int'.
10497 * lex.h (JAVA_DIGIT_P): Removed.
10498 (_JAVA_LETTER_OR_DIGIT_P): Removed.
10499 (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10500 (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10501 (JAVA_PART_CHAR_P): New macro.
10502 (UEOF): Now -1.
10503 (JAVA_CHAR_ERROR): Now -2.
10504 (java_lexer): New field `hit_eof'.
10505 * chartables.h: New file.
10506 * gen-table.pl: new file.
10507
10508 2000-11-20 Tom Tromey <tromey@cygnus.com>
10509 Alexandre Petit-Bianco <apbianco@cygnus.com>
10510
10511 * parse.y (java_complete_lhs): Only allow compound assignment of
10512 reference type if type is String.
10513
10514 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10515
10516 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10517 jcf-path.c: Likewise.
10518
10519 2000-12-09 Anthony Green <green@redhat.com>
10520
10521 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10522 filestart and filename_length as int values.
10523
10524 2000-12-07 Mo DeJong <mdejong@redhat.com>
10525
10526 * jcf-io.c (find_class): Correct the logic that tests to see if a
10527 .java file is newer than its .class file. The compiler was
10528 incorrectly printing a warning when file mod times were equal.
10529
10530 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
10531
10532 * jvgenmain.c: Use ISPRINT not isascii.
10533
10534 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
10535
10536 * parse.y (end_artificial_method_body): Fixed typo.
10537
10538 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
10539
10540 * parse.y (patch_method_invocation): Pick the correct enclosing
10541 context when creating inner class instances.
10542 Fixes gcj/332.
10543
10544 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
10545
10546 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10547 Update copyright year to 2000.
10548
10549 2000-11-23 Anthony Green <green@redhat.com>
10550
10551 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10552 Move current_file_list out of yyparse and make it static.
10553
10554 * expr.c: Declare quick_stack and tree_list_free_list as static
10555 (init_expr_processing): Register quick_stack and
10556 tree_list_free_list roots.
10557
10558 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
10559
10560 * parse.y (build_outer_field_access): New local `decl_ctx', use
10561 it. Check for field's context and current class immediate outer
10562 context inheritance.
10563 (outer_field_access_p): Consider fields inherited from the last
10564 enclosing context.
10565 (build_access_to_thisn): Stop at the last enclosing context if
10566 necessary.
10567 Fixes gcj/367.
10568
10569 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
10570
10571 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10572
10573 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
10574
10575 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10576 scratch buffer.
10577
10578 2000-11-20 Tom Tromey <tromey@cygnus.com>
10579
10580 * jv-scan.c (help): Document --complexity.
10581 (options): Added --complexity.
10582 (flag_complexity): New global.
10583 (main): Call `report'.
10584 * parse-scan.y (complexity): New global.
10585 (if_then_statement, if_then_else_statement,
10586 if_then_else_statement_nsi, switch_block_statement_group,
10587 while_expression, do_statement, for_begin, continue_statement,
10588 throw_statement, catch_clause, finally, method_invocation,
10589 conditional_and_expression, conditional_or_expression,
10590 conditional_expression): Update complexity.
10591 (reset_report): Reset complexity.
10592 (report): New function.
10593
10594 2000-11-20 Tom Tromey <tromey@cygnus.com>
10595
10596 * lex.c (yylex): Added STRICT_TK case.
10597 * parse.y (STRICT_TK): Added.
10598 * parse-scan.y (STRICT_TK): Added.
10599 * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10600 `;'. Use 4, not 3, with -k option. Correctly rename resulting
10601 file.
10602 * keyword.h: Rebuilt.
10603 * keyword.gperf (strictfp): Added.
10604
10605 2000-11-20 Tom Tromey <tromey@cygnus.com>
10606
10607 * lex.c (yylex): Recognize floating point constants with leading
10608 0.
10609
10610 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10611
10612 * java-tree.h (cyclic_inheritance_report): Constify.
10613 * parse.y (cyclic_inheritance_report): Likewise.
10614
10615 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
10616
10617 * parse.y (goal): Remove call to ggc_add_string_root.
10618
10619 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
10620
10621 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10622 Create string in scratch buffer, then pass to build_string.
10623
10624 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
10625
10626 * parse.y (issue_warning_error_from_context): Add
10627 ATTRIBUTE_PRINTF.
10628
10629 2000-11-11 Anthony Green <green@redhat.com>
10630
10631 * jcf-parse.c (process_zip_dir): Add finput parameter.
10632 (jcf_figure_file_type): Call process_zip_dir with appropriate
10633 argument.
10634
10635 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10636
10637 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10638 * jcf-parse.c (jcf_figure_file_type): Likewise.
10639
10640 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
10641
10642 * parse.y (create_new_parser_context): Use memset () instead of
10643 bzero ().
10644
10645 2000-11-08 Tom Tromey <tromey@cygnus.com>
10646
10647 * gjavah.c (process_file): Only include gcj/cni.h when generating
10648 CNI stubs.
10649
10650 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
10651
10652 * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10653 (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10654 instead of bzero ().
10655
10656 2000-11-05 Tom Tromey <tromey@cygnus.com>
10657
10658 * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10659 * lex.c (IS_ZERO): New define.
10660 (java_perform_atof): Error on floating point underflow.
10661
10662 2000-11-04 Tom Tromey <tromey@cygnus.com>
10663
10664 * lex.c (java_parse_escape_sequence): Only read two octal
10665 characters if the first one is greater than 3. Don't allow
10666 "octal" numbers to include the digits 8 or 9.
10667
10668 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
10669
10670 * Make-lang.in (java.distdir): Remove.
10671
10672 2000-11-03 Tom Tromey <tromey@cygnus.com>
10673
10674 * Make-lang.in (java.dvi): New target.
10675 Partial fix for PR other/567.
10676
10677 * lang-options.h: Mention -Wout-of-date.
10678 * jcf-dump.c (flag_newer): New global.
10679 * gjavah.c (flag_newer): New global.
10680 * jcf-io.c (find_class): Only warn when flag_newer set.
10681 * lang.c (flag_newer): New global.
10682 (struct string_option): New declaration.
10683 (lang_W_options): New global.
10684 (process_option_with_no): New function.
10685 (lang_decode_option): Use it.
10686
10687 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10688 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
10689 `$'.
10690
10691 * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
10692 (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
10693 * lex.c (java_read_unicode): Removed `term_context' argument.
10694 Recognize any number of `u' in `\u'.
10695 (java_read_unicode_collapsing_terminators): New function.
10696 (java_get_unicode): Use it.
10697 (java_lineterminator): Removed.
10698 (yylex): Produce error if character literal is newline or single
10699 quote. Return if eof found in middle of `//' comment. EOF in
10700 `//' comment is only an error if pedantic.
10701 (java_ignorable_control_p): New function.
10702 (java_parse_end_comment): Return if eof found in middle of
10703 comment.
10704 Include flags.h.
10705 * jv-scan.c (pedantic): New global.
10706
10707 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
10708
10709 * parse.y (outer_field_access_p): Inherited fields aren't
10710 consider outer fields.
10711 (maybe_build_thisn_access_method): Use
10712 PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
10713 (resolve_expression_name): Trigger an error if a static field
10714 is being accessed as an outer field.
10715
10716 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10717
10718 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10719 Fixes gcj/365.
10720
10721 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
10722
10723 * Make-lang.in: Move all build rules here from Makefile.in,
10724 adapt to new context. Wrap all rules that change the current
10725 directory in parentheses. Expunge all references to $(P).
10726 When one command depends on another and they're run all at
10727 once, use && to separate them, not ;. Add OUTPUT_OPTION to
10728 all object-file generation rules. Delete obsolete variables.
10729
10730 * Makefile.in: Delete.
10731 * config-lang.in: Delete outputs= line.
10732
10733 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10734
10735 * parse.y (patch_method_invocation): NULLify this_arg when already
10736 inserted.
10737 (maybe_use_access_method): Handle call to methods unrelated to the
10738 current class. Fixed comment.
10739 Fixes gcj/361.
10740
10741 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10742
10743 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10744 scope.
10745
10746 2000-10-24 Tom Tromey <tromey@cygnus.com>
10747
10748 * lex.c (java_new_lexer): Initialize new fields. Work around
10749 broken iconv() implementations.
10750 (java_read_char): Swap bytes if required. Use fallback decoder if
10751 required.
10752 (byteswap_init, need_byteswap): New globals.
10753 (java_destroy_lexer): Only close iconv handle if it is in use.
10754 * lex.h (java_lexer): New fields read_anything, byte_swap,
10755 use_fallback.
10756 Made out_buffer unsigned.
10757
10758 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10759
10760 * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
10761 where an enclosing context can be set on the jdep.
10762 (do_resolve_class): Fixed identation.
10763
10764 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10765
10766 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10767
10768 * jcf-reader.c (peek_attribute, skip_attribute): Only define
10769 when requested.
10770
10771 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10772
10773 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10774
10775 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10776
10777 * jcf-write.c (OP1): Update `last_bc'.
10778 (struct jcf_block): Fixed indentation and typo in comments. New
10779 field `last_bc'.
10780 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10781 follows `monitorenter'.
10782 * parse.y (patch_synchronized_statement): New local `tmp'. Call
10783 `patch_string'.
10784 Fixes gcj/232.
10785
10786 2000-10-16 Tom Tromey <tromey@cygnus.com>
10787
10788 * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
10789 * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
10790 * lang-options.h: Added -MA, -MT, -MF..
10791 * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
10792 (DEPEND_TARGET_SET): New macro.
10793 (DEPEND_FILE_ALREADY_SET): Likewise.
10794 (init_parse): Handle new flags.
10795 * jcf.h (jcf_dependency_print_dummies): Declare.
10796 * Make-lang.in (s-java): Added mkdeps.o.
10797 * Makefile.in (BACKEND): Added mkdeps.o.
10798 (../gcjh$(exeext)): Added mkdeps.o.
10799 (../jcf-dump$(exeext)): Added mkdeps.o.
10800 * jcf-depend.c: Include mkdeps.h.
10801 (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
10802 add_entry): Removed.
10803 (jcf_dependency_reset): Rewrote.
10804 (dependencies): New global.
10805 (jcf_dependency_set_target): Rewrote.
10806 (jcf_dependency_add_target): Likewise.
10807 (jcf_dependency_add_file): Likewise.
10808 (munge): Removed.
10809 (print_ents): Removed.
10810 (jcf_dependency_write): Rewrote.
10811 (print_dummies): New global.
10812 (jcf_dependency_print_dummies): New function
10813 (jcf_dependency_write): Call deps_dummy_targets if required.
10814
10815 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10816
10817 * gjavah.c (add_class_decl): Removed unused variables `tname',
10818 `tlen' and `name_index'.
10819 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
10820 * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
10821 in `wfl_operator' with value.
10822 (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
10823 (jcf_figure_file_type): Fixed identation.
10824 * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
10825 * parse.y (analyze_clinit_body): New function.
10826 (static_initializer:): Reset `current_static_block'.
10827 (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
10828 `wfl_operator' with new value.
10829 (lookup_cl): Use EXPR_WFL_FILENAME.
10830 (maybe_yank_clinit): Handle bogus <clinit> bodies, call
10831 analyze_clinit_body.
10832 (build_outer_field_access): Access to this$<n> built from
10833 current_class, not its outer context.
10834 (build_access_to_thisn): Fixed leading comment. Tidied things up.
10835 (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
10836 (patch_method_invocation): Use `is_static_flag' when already
10837 initialized.
10838 (patch_newarray): Removed assignment in ternary operator.
10839
10840 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10841
10842 * except.c (free_eh_ranges): Don't free `whole_range'.
10843
10844 2000-10-15 Anthony Green <green@redhat.com>
10845
10846 * decl.c (init_decl_processing): Call init_class_processing before
10847 anything else.
10848
10849 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10850
10851 * check-init.c (check_init): Fixed leading comment. Use
10852 LOCAL_FINAL_P.
10853 * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10854 (give_name_to_locals): Likewise.
10855 (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
10856 fields in lang_decl_var.
10857 * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
10858 DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
10859 (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
10860 (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
10861 DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
10862 (LOCAL_FINAL): Rewritten.
10863 (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
10864 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
10865 (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
10866 `init_final' fields.
10867 (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
10868 `final_uid', `final_liic', `final_ierr' and `local_final' fields.
10869 (TYPE_HAS_FINAL_VARIABLE): New macro.
10870 (struct lang_type): Added `afv' field.
10871 * parse.y (check_static_final_variable_assignment_flag): New function.
10872 (reset_static_final_variable_assignment_flag): Likewise.
10873 (check_final_variable_local_assignment_flag): Likewise.
10874 (reset_final_variable_local_assignment_flag): Likewise.
10875 (check_final_variable_indirect_assignment): Likewise.
10876 (check_final_variable_global_assignment_flag): Likewise.
10877 (add_inner_class_fields): Use LOCAL_FINAL_P.
10878 (register_fields): Handle local finals and final variables.
10879 (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
10880 (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10881 (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10882 on local finals.
10883 (java_complete_expand_methods): Loop to set
10884 TYPE_HAS_FINAL_VARIABLE. Call
10885 `reset_final_variable_local_assignment_flag' and
10886 `check_final_variable_local_assignment_flag' accordingly before
10887 and after constructor expansion. Call
10888 `reset_static_final_variable_assignment_flag'
10889 before expanding <clinit> and after call
10890 `check_static_final_variable_assignment_flag' if the
10891 current_class isn't an interface. After all methods have been
10892 expanded, call `check_final_variable_global_assignment_flag' and
10893 `check_static_final_variable_assignment_flag' if the current class
10894 is an interface.
10895 (maybe_yank_clinit): Fixed typo in comment.
10896 (build_outer_field_access_methods): Removed old sanity check. Use
10897 FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
10898 Don't create access methods for finals.
10899 (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
10900 (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
10901 existing DECL_INIT has been processed.
10902 (java_complete_lhs): Likewise.
10903 (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
10904 Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
10905 logic.
10906 (patch_assignment): Use LOCAL_FINAL_P.
10907 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
10908 DECL_INITIAL is nullified.
10909 Fixes gcj/163.
10910
10911 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10912
10913 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
10914
10915 * Makefile.in (parse.c, parse-scan.c): Likewise.
10916
10917 2000-10-12 Mark Mitchell <mark@codesourcery.com>
10918
10919 * class.c (temporary_obstack): Remove.
10920 (make_class): Don't mess with obstascks.
10921 (push_class): Likewise.
10922 (set_super_info): Likewise.
10923 (add_method_1): Likewise.
10924 (add_method): Likewise.
10925 (add_field): Likewise.
10926 (build_utf8_ref): Likewise.
10927 (build_class_ref): Likewise.
10928 (build_static_field_ref): Likewise.
10929 (finish_class): Likewise.
10930 (push_super_field): Likewise.
10931 (layout_class): Likewise.
10932 (layout_class_methods): Likewise.
10933 (init_class_processing): Likewise.
10934 * constants.c (get_tag_node): Likewise.
10935 (build_constant_data_ref): Likewise.
10936 * decl.c (ggc_p): Remove.
10937 (copy_lang_decl): Use ggc_alloc.
10938 (complete_start_java_method): Don't mess with obstacks.
10939 (start_java_method): Likewise.
10940 (end_java_method): Likewise.
10941 * except.c (link_handler): Use xmalloc.
10942 (free_eh_ranges): New function.
10943 (method_init_exceptions): Use it.
10944 (add_handler): Use xmalloc.
10945 (expand_start_java_handler): Don't mess with obstacks.
10946 (prepare_eh_table_type): Likewise.
10947 (expand_end_java_handler): Likewise.
10948 * expr.c (push_value): Likewise.
10949 (create_label_decl): Likewise.
10950 (build_jni_stub): Likewise.
10951 (java_lang_expand_expr): Likewise.
10952 (note_instructions): Use xrealloc.
10953 (java_push_constant_from_pool): Don't mess with obstacks.
10954 (process_jvm_instruction): Likewise.
10955 * java-tree.h (cyclic_inheritance_report): Remove duplicate
10956 declaration.
10957 * jcf-parse.c (get_constant): Don't mess with obstacks.
10958 (read_class): Likewise.
10959 (jcf_parse): Likewise.
10960 * lex.c (expression_obstack): Remove.
10961 (java_lex): Don't use obstack_free.
10962 * parse.h (exit_java_complete_class): Don't mess with obstacks.
10963 (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
10964 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
10965 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
10966 * parse.y (gaol): Add more GC roots.
10967 (add_inner_class_fields): Adjust calls to MANGLE_* macros.
10968 (lookup_field_wrapper): Likewise.
10969 (obtain_incomplete_type): Don't mess with obstacks.
10970 (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
10971 macros.
10972 (craft_constructor): Don't mess with obstacks.
10973 (safe_layout_class): Likewise.
10974 (java_complete_class): Likewise.
10975 (source_end_java_method): Likewise.
10976 (build_outer_field_access_methods): Likewise.
10977 (build_outer_method_access_method): Likewise.
10978 (maybe_build_thisn_access_method): Likewise.
10979 (build_dot_class_method_invocation): Likewise.
10980 (java_complete_tree): Likewise.
10981 (java_complete_lhs): Likewise.
10982 (do_merge_string_cste): Likewise.
10983 (patch_string_cst): Likewise.
10984 (array_constructor_check_entry): Likewise.
10985 * typeck.c (build_java_array_type): Likewise.
10986 (parse_signature_string): Likewise.
10987 (build_java_signature): Likewise.
10988
10989 2000-10-12 Tom Tromey <tromey@cygnus.com>
10990
10991 Fix for PR gcj/356:
10992 * gjavah.c (add_class_decl): Don't special-case inner classes.
10993 (add_namelet): Likewise.
10994
10995 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
10996
10997 * java-tree.h: Constify current_encoding.
10998 * lang.c: Constify current_encoding.
10999
11000 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
11001
11002 * jvgenmain.c (class_mangling_suffix): Omit `.'.
11003 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11004
11005 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11006
11007 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11008 patch. Fixes gcj/340.
11009
11010 2000-10-10 Tom Tromey <tromey@cygnus.com>
11011
11012 * lex.c (java_new_lexer): Initialize out_first and out_last
11013 fields.
11014 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11015
11016 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
11017
11018 * parse.y (pop_current_osb): New function.
11019 (array_type:): Use `dims:', changed actions
11020 accordingly. Suggested by Anthony Green.
11021 (array_creation_expression:): Used pop_current_osb.
11022 (cast_expression:): Likewise.
11023 (search_applicable_method_list): Fixed indentation.
11024
11025 2000-10-08 Anthony Green <green@redhat.com>
11026
11027 * parse.y (array_type_literal): Remove production.
11028 (type_literals): Refer to array_type, not array_type_literal.
11029
11030 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11031
11032 Patch contributed by Corey Minyard.
11033 * decl.c (check_local_named_variable): New function.
11034 (tree check_local_unnamed_variable): Likewise.
11035 (find_local_variable): Splitted. Call check_local_{un}named_variable.
11036
11037 2000-10-07 Anthony Green <green@redhat.com>
11038
11039 * class.c (layout_class): Handle case where superclass can't be
11040 layed out yet.
11041
11042 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
11043
11044 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11045 gperf.
11046
11047 2000-10-05 Tom Tromey <tromey@cygnus.com>
11048
11049 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11050 * jvgenmain.c (class_mangling_prefix): Removed.
11051 (class_mangling_suffix): New global.
11052 (main): Use it.
11053 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11054 `$'.
11055 (print_method_info): Handle overrides for static and final
11056 methods.
11057 (process_file): Generate declaration for class object field.
11058 * class.c (cxx_keywords): New array.
11059 (utf8_cmp): New function.
11060 (cxx_keyword_p): New function.
11061 (layout_class_method): Mangle C++ keywords by appending `$'.
11062 (mangle_field): New function.
11063 (mangle_class_field): Use mangle_field. Mangle class name as
11064 `class$'.
11065 (mangle_static_field): Use mangle_field.
11066
11067 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
11068
11069 * decl.c (find_local_variable): Removed uncessary type check and
11070 fixed range check typo. From Corey Minyard.
11071
11072 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11073
11074 * decl.c (give_name_to_locals): New local `code_offset'. Call
11075 `maybe_adjust_start_pc'.
11076 * expr.c (note_instructions): New function.
11077 (expand_byte_code): Don't collect insn starts here.
11078 (peek_opcode_at_pc): New function.
11079 (maybe_adjust_start_pc): Likewise.
11080 * java-tree.h (maybe_adjust_start_pc): Declare.
11081 (note_instructions): Likewise.
11082 * jcf-parse.c (parse_class_file): Call `note_instructions'.
11083
11084 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11085
11086 * parse.y (field_access:): Fixed indentation.
11087 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11088
11089 2000-09-07 Tom Tromey <tromey@cygnus.com>
11090
11091 Fix for PR gcj/307:
11092 * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11093 JPRIMITIVE_TYPE_P, for arithmetic operators.
11094 (patch_method_invocation): Indentation fix.
11095 (try_builtin_assignconv): Handle boolean specially. Fixed typo.
11096 (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11097 (do_unary_numeric_promotion): Cleaned up code.
11098 (valid_cast_to_p): Handle boolean correctly.
11099
11100 2000-09-27 Tom Tromey <tromey@cygnus.com>
11101
11102 * lex.c (java_read_unicode): Reset bs_count when finished with
11103 `\u' sequence.
11104
11105 2000-10-01 Mark Mitchell <mark@codesourcery.com>
11106
11107 Convert to GC.
11108 * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11109 * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11110 (typeck.o): Depend on ggc.h.
11111 * class.c (add_method_1): Use GC functions for allocation.
11112 (init_class_processing): Register roots.
11113 * decl.c (ggc_p): Set to 1.
11114 (pending_local_decls): Make it static.
11115 (push_jvm_slot): Use GC functions for allocation.
11116 (init_decl_processing): Register roots.
11117 (give_name_to_locals): Use GC functions for allocation.
11118 (lang_mark_tree): New function.
11119 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11120 functions for allocation.
11121 * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11122 * lex.c (java_lex): Use build_string, rather than replicating it
11123 inline.
11124 * parse.y (goal): Add more roots.
11125 (mark_parser_ctxt): New function.
11126 * typeck.c: Include ggc.h.
11127
11128 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11129
11130 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11131 contains something else than MODIFY_EXPR.
11132
11133 2000-09-23 Mark Mitchell <mark@codesourcery.com>
11134
11135 * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11136 * Makefile.in (parse.o): Depend on ggc.h.
11137 (class.o): Likewise.
11138 (constants.o): Likewise.
11139 (decl.o): Likewise.
11140 (expr.o): Likewise.
11141 (jcf-parse.o): Likewise.
11142 (jcf-write.o): Likewise.
11143 (mangle.o): Likewise.
11144 * class.c: Include ggc.h.
11145 (build_static_field_ref): Register GC roots.
11146 (layout_class): Likewise.
11147 (init_class_processing): Likewise.
11148 * constants.c: Include ggc.h.
11149 (current_constant_pool_data_ref): Remove.
11150 (tag_nodes): Move it to ...
11151 (get_tag_node): ... here. Register GC roots.
11152 * decl.c: Include ggc.h. Remove many global tree definitions.
11153 (throw_node): Define.
11154 (java_global_trees): Likewise.
11155 (predef_filenames): Make the size a constant.
11156 (init_decl_processing): Adjust accordingly.
11157 (init_decl_processing): Call init_jcf_parse. Register GC roots.
11158 * expr.c: Include ggc.h.
11159 (init_expr_processing): Register GC roots.
11160 (build_invokeinterface): Likewise.
11161 * java-tree.h: Replace extern tree declarations with macros.
11162 (java_global_trees): New variable.
11163 (java_tree_index): New enumeration.
11164 (init_jcf_parse): Declare.
11165 * jcf-parse.c: Include ggc.h.
11166 (current_class): Remove declaration.
11167 (main_class): Likewise.
11168 (all_class_list): Likewise.
11169 (predefined_filename_p): Adjust for constant size of
11170 predef_filenames.
11171 (init_jcf_parse): New function.
11172 * jcf-write.c: Include ggc.h.
11173 (generate_classfile): Register GC roots.
11174 (append_synthetic_attribute): Likewise.
11175 (append_innerclass_attribute_entry): Likewise.
11176 * lang.c: Include ggc.h.
11177 (lang_print_error): Register GC roots.
11178 * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11179 with macros.
11180 * parse.y: Include ggc.h.
11181 (wfl_operator): Remove.
11182 (goal): Register GC roots.
11183 (java_pop_parser_context): Adjust for new field names.
11184 (java_parser_context_save_global): Likewse.
11185 (java_parser_context_restore_global): Likewise.
11186 (java_parser_context_suspend): Likewise.
11187 (java_parser_context_resume): Likewise.
11188 (verify_constructor_circularity): Register GC roots.
11189 (lookup_cl): Likewise.
11190 (java_reorder_fields): Likewise.
11191 (build_current_this): Likewise.
11192 (class_in_current_package): Likewise.
11193 (argument_types_convertible): Likewise.
11194 (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11195
11196 2000-09-14 Tom Tromey <tromey@cygnus.com>
11197
11198 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11199
11200 2000-09-13 Tom Tromey <tromey@cygnus.com>
11201
11202 * jcf-parse.c: Include <locale.h>.
11203 * jv-scan.c: Include <locale.h>.
11204
11205 2000-09-12 Tom Tromey <tromey@cygnus.com>
11206
11207 * expr.c (pop_type_0): Return `Object' if trying to merge two
11208 interface types.
11209 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11210 interface types; `Object' is always a valid supertype.
11211
11212 2000-09-12 Tom Tromey <tromey@cygnus.com>
11213
11214 Fix for PR gcj/33:
11215 * jv-scan.c (help): Document --encoding.
11216 (options): Added `encoding' entry.
11217 (OPT_ENCODING): New define.
11218 (main): Handle --encoding.
11219 Include <langinfo.h> if nl_langinfo exists.
11220 * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11221 --encoding.
11222 * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11223 (parse_source_file): Correctly call java_init_lex. Added `finput'
11224 argument. Use nl_langinfo to determine default encoding.
11225 * java-tree.h (current_encoding): Declare.
11226 * parse.y (java_parser_context_restore_global): Don't restore
11227 `finput'.
11228 (java_parser_context_save_global): Don't set `finput' field.
11229 (java_pop_parser_context): Don't restore `finput'. Free old lexer
11230 if required.
11231 * lang.c (current_encoding): New global.
11232 (lang_decode_option): Recognize `-fencoding='.
11233 (finish_parse): Don't close finput.
11234 * parse.h (struct parser_ctxt): Removed `finput' and
11235 `unget_utf8_value' fields. Added `lexer' field.
11236 (java_init_lex): Fixed declaration.
11237 * lex.c (java_new_lexer): New function.
11238 (java_destroy_lexer): Likewise.
11239 (java_read_char): Added `lex' argument. Handle iconv case.
11240 (java_read_unicode): Added `lex' argument. Count backslashes in
11241 lexer structure.
11242 (java_init_lex): Added `finput' and `encoding' arguments. Set
11243 `lexer' field in ctxp.
11244 (BAD_UTF8_VALUE): Removed.
11245 (java_lex): Handle seeing UEOF in the middle of a string literal.
11246 * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11247 (java_lexer): New structure.
11248 (UNGETC): Removed.
11249 (GETC): Removed.
11250 (DEFAULT_ENCODING): New define.
11251 (java_destroy_lexer): Declare.
11252
11253 2000-09-12 Tom Tromey <tromey@cygnus.com>
11254
11255 Fix for PR gcj/343:
11256 * lex.c (java_init_lex): Initialize java_io_serializable.
11257 * parse.y (java_io_serializable): New global.
11258 (valid_ref_assignconv_cast_p): An array can be cast to
11259 serializable.
11260
11261 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
11262
11263 * decl.c, expr.c: Include defaults.h if not already included.
11264 Don't define the *_TYPE_SIZE macros.
11265
11266 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
11267
11268 * typeck.c (build_java_array_type): Correct first parameter
11269 in ADJUST_FIELD_ALIGN invocation.
11270
11271 2000-09-06 Tom Tromey <tromey@cygnus.com>
11272
11273 * lang-specs.h: Also recognize `-femit-class-files'.
11274
11275 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11276
11277 * verify.c (merge_types): Load the types to merge if necessary.
11278
11279 2000-09-02 Anthony Green <green@redhat.com>
11280
11281 * jcf-io.c: Include zlib.h.
11282 (open_in_zip): Read compressed class file archives.
11283 * zipfile.h (ZipDirectory): Add uncompressed_size and
11284 compression_method fields.
11285 * zextract.c (read_zip_archive): Collect file compression info.
11286
11287 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
11288
11289 * parse.y (do_resolve_class): Also explore superclasses of
11290 intermediate enclosing contexts when searching for inner classes.
11291
11292 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11293
11294 * parse.y (variable_declarator_id:): Better error message.
11295 (expression_statement:): Use YYNOT_TWICE.
11296 (cast_expression:): Likewise.
11297 (assignment:): Likewise.
11298
11299 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11300
11301 * parse.y (do_merge_string_cste): New locals. Create new
11302 STRING_CSTs each time, use memcpy. Fixes gcj/311.
11303
11304 2000-08-07 Hans Boehm <boehm@acm.org>
11305
11306 * boehm.c (mark_reference_fields): Set marking bits for all words in
11307 a multiple-word record.
11308 (get_boehm_type_descriptor): Use the procedure marking descriptor for
11309 java.lang.Class.
11310
11311 2000-08-31 Mike Stump <mrs@wrs.com>
11312
11313 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11314 jcf-dump$(exeext)): Make parallel safe.
11315
11316 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
11317
11318 * jcf-parse.c (set_source_filename): Constify a char *.
11319 * jcf-write.c (append_innerclasses_attribute,
11320 make_class_file_name): Constify a char *. Don't recycle a
11321 variable for an unrelated purpose.
11322 * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11323 (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11324
11325 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11326
11327 * expr.c (can_widen_reference_to): Fixed indentation.
11328 * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11329 * parse.y: `finit$' replaces `$finit$' in comments.
11330 (try_builtin_assignconv): Fixed leading comment.
11331
11332 2000-08-25 Greg McGary <greg@mcgary.org>
11333
11334 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11335
11336 2000-08-24 Greg McGary <greg@mcgary.org>
11337
11338 * lang.c (lang_decode_option): Use ARRAY_SIZE.
11339 * parse.y (BINOP_LOOKUP): Likewise.
11340
11341 2000-08-22 Andrew Haley <aph@cygnus.com>
11342
11343 * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11344 sign extending. Fixes gcj/321.
11345 * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11346 combining to make a jlong. Fixes gcj/321.
11347
11348 2000-08-21 Nix <nix@esperi.demon.co.uk>
11349
11350 * lang-specs.h: Do not process -o or run the assembler if
11351 -fsyntax-only.
11352
11353 2000-08-16 Andrew Haley <aph@cygnus.com>
11354
11355 * typeck.c (build_java_array_type): Rewrite code to do array
11356 alignment. Take into account back-end macros when aligning array
11357 data. Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11358 user to set alignment. Fixes gcj/252 and 160.
11359
11360 2000-08-09 Tom Tromey <tromey@cygnus.com>
11361
11362 * parse.y (check_abstract_method_definitions): Now return `int'.
11363 Check implemented interfaces. Fixes PR gcj/305.
11364
11365 * parse.y (patch_switch_statement): Disallow `long' in switch
11366 expressions. Fixes PR gcj/310.
11367
11368 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
11369
11370 * decl.c (finit_leg_identifier_node): New global.
11371 (init_decl_processing): Use `finit$' to initialize
11372 finit_identifier_node. Use `$finit$' to initialize
11373 finit_leg_identifier_node.
11374 * expr.c (expand_java_field_op): Use ID_FINIT_P.
11375 * java-tree.h (finit_identifier_node): Changed attached comment.
11376 (finit_leg_identifier_node): New declaration.
11377 (ID_FINIT_P): Take finit_identifier_node and
11378 finit_leg_identifier_node into account. This is a backward
11379 compatibility hack.
11380
11381 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11382
11383 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11384 Jan 6 2000 patch.
11385 (generate_bytecode_insns): Check `nargs' before emitting it.
11386 * verify.c (merge_type_state): Fixed typo.
11387 * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11388 generate_bytecode_{conditional,insns}.
11389
11390 2000-08-13 Anthony Green <green@redhat.com>
11391
11392 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11393 for -pg builds).
11394
11395 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11396
11397 * class.c (maybe_layout_super_class): Fixed indentation.
11398 * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11399 (java_check_methods): New function declaration.
11400 * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11401 instead of `str_ptr'.
11402 * jcf-write.c (generate_bytecode_insns): Emit number the of args
11403 of a `invokeinterface' at the right time.
11404 * parse.h (WFL_STRIP_BRACKET): New macro.
11405 (SET_TYPE_FOR_RESOLUTION): Use it.
11406 * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11407 (check_class_interface_creation): Don't check for cross package
11408 innerclass name clashes.
11409 (method_header): Behave properly if MDECL is `error_mark_node'.
11410 (method_declarator): Return `error_mark_node' if bogus current
11411 class.
11412 (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11413 (resolve_and_layout): New local `decl_type', set and used. Call
11414 java_check_methods.
11415 (java_check_methods): New method.
11416 (java_layout_classes): Use it.
11417 (resolve_qualified_expression_name): No EH check necessary in
11418 access$<n>.
11419 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11420 `case' statement.
11421 (patch_assignment): Set DECL_INITIAL on integral final local.
11422
11423 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
11424
11425 * java-tree.h (flag_extraneous_semicolon): New extern.
11426 * lang-options.h: (-Wextraneous-semicolon): New option.
11427 * lang.c (flag_redundant): Fixed typo in leading comment.
11428 (flag_extraneous_semicolon): New global.
11429 (lang_decode_option): Set `flag_extraneous_semicolon' when
11430 -Wall. Decode `-Wextraneous-semicolon'.
11431 * parse.y (type_declaration:): Removed `SC_TK' hack, added
11432 `empty_statement' rule.
11433 (class_body_declaration): Likewise.
11434 (method_body:): Accept `;' as a method body.
11435 (static_initializer:): Removed `SC_TK' hack.
11436 (constructor_block_end:): Likewise.
11437 (empty_statement:): Report deprecated empty declaration. Fixes
11438 gcj/295
11439
11440 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11441
11442 * parse.y (build_dot_class_method_invocation): Changed parameter
11443 name to `type'. Build signature from `type' and convert it to a
11444 STRING_CST if it's an array.
11445 (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11446 to use `ref_type' directly.
11447
11448 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
11449
11450 * lang-options.h: Added a comma after the last element to avoid
11451 syntax errors when other languages define additional options.
11452
11453 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
11454
11455 * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11456 * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11457 (jc1): Link with $(BACKEND).
11458 (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11459
11460 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
11461
11462 * jvspec.c: Adjust type of second argument to
11463 lang_specific_driver, and update code as necessary.
11464
11465 * class.c (build_dtable_decl): Initialize dummy.
11466
11467 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11468
11469 * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11470 method bodies not to rule out discarding `<clinit>'; don't use
11471 <clinit> to initialize static fields with constant initializers.
11472
11473 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11474
11475 * gjavah.c (print_method_info): Added `synth' parameter. Skip
11476 synthetic methods.
11477 (method_synthetic): New global.
11478 (HANDLE_METHOD): Recognize synthetic method and tell
11479 `print_method_info' about it.
11480 (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11481 processing a synthetic method.
11482 * jcf-reader.c (skip_attribute): New function.
11483 ( skip_attribute): Likewise.
11484
11485 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11486
11487 * parse.y (build_outer_field_access): Fixed comments.
11488 (fix_constructors): Emit the initialization of this$<n> before
11489 calling $finit$.
11490 (resolve_qualified_expression_name): Build an access to `decl' if
11491 necessary.
11492
11493 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11494
11495 * parse-scan.y (curent_class): Non longer const.
11496 (inner_qualifier, inner_qualifier_length): Deleted.
11497 (current_class_length): New global.
11498 (bracket_count): Fixed typo in leading comment.
11499 (anonymous_count): New global.
11500 (class_instance_creation_expression:): Handle anonymous classes.
11501 (anonymous_class_creation:): New rule.
11502 (push_class_context): Rewritten.
11503 (pop_class_context): Likewise.
11504 (INNER_QUALIFIER): Macro deleted.
11505 (report_class_declaration): call `push_class_context' when
11506 entering the function. `fprintf' format modified not to use
11507 INNER_QUALIFIER.
11508 (report_class_declaration): Assign `package_name' and
11509 `current_class' to NULL separately.
11510
11511 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11512
11513 * expr.c (build_invokeinterface): Call layout_class_methods on
11514 target interface.
11515
11516 2000-07-27 Tom Tromey <tromey@cygnus.com>
11517 Anthony Green <green@cygnus.com>
11518 Alexandre Petit-Bianco <apbianco@cygnus.com>
11519
11520 * class.c (make_class_data): Create vtable for abstract classes.
11521 (get_dispatch_table): Changed to cope with abstract classes.
11522
11523 2000-07-27 Tom Tromey <tromey@cygnus.com>
11524
11525 * parse.y (patch_method_invocation): Don't reverse the argument
11526 list when dealing with anonymous class constructors. Fixed typo in
11527 comment.
11528
11529 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11530
11531 * parse.y (build_alias_initializer_parameter_list): Reverse
11532 crafted list when building aliases for anonymous class
11533 constructors.
11534
11535 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11536
11537 * parse.y (jdep_resolve_class): Don't bother checking potential
11538 innerclass access if `decl' is NULL.
11539 (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11540 WFL.
11541
11542 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11543
11544 * parse.c: Remove (again.)
11545
11546 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
11547
11548 * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11549 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11550 outside the `if' statement, alias to innerclass removed, `decl'
11551 used to mark the class complete.
11552
11553 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11554
11555 * parse.y (simple_name:): Fixed typo in error message.
11556
11557 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11558
11559 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11560 or its first operand can be error marks.
11561
11562 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11563
11564 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11565 * parse.y (method_header): Likewise.
11566
11567 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11568
11569 * parse.y (process_imports): Consider that one might be trying to
11570 import an innerclass. Fixes gcj/254
11571
11572 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11573
11574 * parse.y (find_as_inner_class): Handle the case where the
11575 enclosing context of an innerclass has been loaded as bytecode.
11576
11577 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11578
11579 * parse.y (simple_name:): Reject `$' in type names.
11580 (resolve_type_during_patch): Use `type' as a second
11581 argument to resolve_no_layout. Fixes gcj/257.
11582
11583 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
11584
11585 * parse.y (find_most_specific_methods_list): Select the only
11586 non-abstract method even if max has been set.
11587 Fixes gcj/285, gcj/298.
11588
11589 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
11590
11591 * lang-specs.h: Added %(jc1) to java compiler options.
11592
11593 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
11594
11595 * .cvsignore: New file.
11596
11597 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11598
11599 * parse.y (not_accessible_p): Access granted to innerclasses
11600 (indirectly) extending the reference type. Fixes gcj/249.
11601
11602 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11603
11604 * parse.y (patch_method_invocation): Fixed comment.
11605 (maybe_use_access_method): Build this$<n>s to the context of the
11606 target method, or a type that extends it. Fixes gcj/242.
11607
11608 2000-07-13 Mark Mitchell <mark@codesourcery.com>
11609
11610 * parse.c: Remove.
11611
11612 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11613
11614 * parse.y (fold_constant_for_init): Avoid bullish conversion.
11615
11616 2000-07-13 Tom Tromey <tromey@cygnus.com>
11617
11618 * lang-specs.h: Added %{I*}.
11619
11620 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
11621
11622 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
11623
11624 2000-07-12 Mark Mitchell <mark@codesourcery.com>
11625
11626 * parse-scan.c: Remove.
11627
11628 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11629
11630 * class.c (set_super_info): Handled protected inner classes.
11631 (common_enclosing_context_p): Bail early if arguments aren't both
11632 inner classes.
11633 (get_access_flags_from_decl): Handle private and protected inner
11634 classes.
11635 * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11636 (CLASS_PROTECTED): Likewise.
11637 (struct lang_type): New bitfield `poic'.
11638 * parse.y (jdep_resolve_class): Call check_inner_class_access on
11639 inner classes only.
11640 (check_inner_class_access): Renamed arguments, added
11641 comments. Handles protected inner classes (fixes gcj/225)
11642 (not_accessible_p): Fixed comments. Avoid handling inner classes.
11643
11644 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11645
11646 * parse.y (resolve_qualified_expression_name): Verify qualified
11647 access to `this'. Fixes gcj/239.
11648
11649 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11650
11651 * jcf-write.c (generate_classfile): Don't install ConstantValue
11652 for null pointers.
11653
11654 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11655
11656 * parse.y (resolve_qualified_expression_name): Handle inner class
11657 access. Fixes gcj/256.
11658
11659 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11660
11661 * jcf-write.c (generate_classfile): Properly install the
11662 ConstantValue attribute and the initial value constant pool index
11663 on string constants.
11664 * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11665 class files.
11666
11667 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11668
11669 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11670 construct.
11671 * parse.y (find_as_inner_class): Fixed typo.
11672 (do_resolve_class): Explore enclosing contexts when searching for
11673 innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11674 (check_inner_class_access): Check `decl' which can be null in case
11675 of previous errors.
11676
11677 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11678
11679 * java-tree.h (java_debug_context): Declared `extern'.
11680 (safe_layout_class): Likewise.
11681 * parse.y (resolve_field_access): Field must be `static' in order
11682 to be replaced by its initial value. Added comments.
11683 (find_applicable_accessible_methods_list): Fixed typo.
11684 (find_most_specific_methods_list): Methods found in innerclasses
11685 take over methods founds in the enclosing contexts.
11686 (java_complete_tree): Loosen restrictions on the type of DECLs
11687 that can be replaced by their initialization values.
11688 (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
11689
11690 2000-07-05 Tom Tromey <tromey@cygnus.com>
11691
11692 * Make-lang.in (PARSE_DIR): New macro.
11693 (PARSE_RELDIR): Likewise.
11694 (PARSE_C): Likewise.
11695 (PARSE_SCAN_C): Likewise.
11696 ($(PARSE_C)): New target.
11697 ($(PARSE_SCAN_C)): Likewise.
11698 (SET_BISON): New macro.
11699 (BISONFLAGS): Likewise.
11700 (JAVABISONFLAGS): Likewise.
11701
11702 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
11703
11704 * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
11705 argument on the first pass for CNI as well as JNI.
11706 (print_method_info): Set up method name on the first pass only.
11707
11708 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11709
11710 * parse.y (parser_qualified_classname): Removed parameter
11711 `is_static'.
11712 (create_interface): Removed first passed parameter to
11713 parser_qualified_classname.
11714 (create_class): Likewise. Don't install alias on static
11715 innerclasses. Fixes gcj/275.
11716
11717 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11718
11719 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11720 debugable statement with empty_stmt_node. Fixes gcj/272
11721
11722 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11723
11724 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11725 gcj/271.
11726
11727 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11728
11729 * jcf-write.c (push_long_const): Appropriately cast short negative
11730 constant to jword.
11731
11732 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11733
11734 * parse.y (verify_constructor_super): Use loop variable
11735 `m_arg_type' initialized with `mdecl_arg_type'.
11736
11737 2000-06-29 Tom Tromey <tromey@cygnus.com>
11738
11739 * parse.y (resolve_field_access): Handle case where `type_found'
11740 is NULL.
11741
11742 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11743
11744 * expr.c (lookup_field): The same field can be found through two
11745 different interface. Don't declare it ambiguous in that case.
11746
11747 2000-06-27 Tom Tromey <tromey@cygnus.com>
11748
11749 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
11750 follows \r, then unget it at a lower level.
11751
11752 2000-06-26 Tom Tromey <tromey@cygnus.com>
11753
11754 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11755 java_complete_tree.
11756
11757 2000-06-25 Tom Tromey <tromey@cygnus.com>
11758
11759 * parse.y (for_statement): Wrap expression in a WFL if it is a
11760 constant. For PR gcj/268.
11761
11762 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11763
11764 * parse.y (do_resolve_class): Minor optimiztion in the package
11765 list search. Removed unnecessary test and return statement.
11766 (valid_ref_assignconv_cast_p): Order of arguments to
11767 enclosing_context_p fixed.
11768
11769 2000-06-24 Tom Tromey <tromey@cygnus.com>
11770
11771 * expr.c (lookup_field): Print error and return error_mark_node if
11772 field reference is ambiguous.
11773
11774 * parse.y (check_abstract_method_definitions): Also check if
11775 `other_method' is abstract.
11776
11777 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11778
11779 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
11780 classes.
11781 * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
11782 (struct lang_type): New field `pic'.
11783 (CLASS_PRIVATE): New macro.
11784 * parse.y (check_inner_class_access): New function.
11785 (jdep_resolve_class): Call it.
11786
11787 2000-06-23 Tom Tromey <tromey@cygnus.com>
11788
11789 * parse.y (patch_incomplete_class_ref): Initialize the returned
11790 class. For PR gcj/260.
11791
11792 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11793
11794 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11795
11796 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11797
11798 * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11799 Java specific checks.
11800 * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
11801 screened by DECL_P.
11802 * java-tree.def (CASE_EXPR): Marked 'e'.
11803 (DEFAULT_EXPR): Likewise.
11804 * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
11805 screened by DECL_P.
11806 * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
11807 Java specific checks.
11808 (generate_bytecode_insns): Test try_block for BLOCK before using
11809 BLOCK_EXPR_BODY.
11810 * parse.y (build_wfl_wrap): Added `location' argument. Set
11811 EXPR_WFL_LINECOL accordingly.
11812 (dim_expr:): Wrap constants with WFLs.
11813 (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
11814 (resolve_package): Check for `stmt' not being a BLOCK before
11815 building a debuggable statement with it.
11816 (make_qualified_primary): Added extra parameter to build_wfl_wrap
11817 invocation.
11818 (resolve_field_access): Make sure `decl' is a DECL before treating
11819 it as such.
11820 (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
11821 IDENTIFIER_NODE before treating it as such.
11822 (patch_new_array_init): Make sure `elt' is a TREE_LIST before
11823 treating it as such.
11824 (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
11825 to be applied only on non array types.
11826
11827 2000-06-16 Per Bothner <per@bothner.com>
11828
11829 * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN): Don't
11830 define in terms of DECL_RESULT, as that fails when --enable-checking.
11831
11832 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11833
11834 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
11835 types the same in comparison.
11836 (CHECK_OP): Add static prototype.
11837
11838 2000-06-13 Jakub Jelinek <jakub@redhat.com>
11839
11840 * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
11841 * parse.y (java_complete_class): Set DECL_USER_ALIGN.
11842 * parse.c: Rebuilt.
11843
11844 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11845
11846 * decl.c (create_primitive_vtable): Prototype.
11847
11848 * jcf-write.c (generate_bytecode_insns): Initialize variable
11849 `saved_context'.
11850
11851 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11852
11853 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
11854
11855 * parse.y (find_applicable_accessible_methods_list): Use a hashtable
11856 to track searched classes, and do not search the same class more than
11857 once. Call find_applicable_accessible_methods_list on immediate
11858 superclass, instead of search_applicable_method_list on all ancestors.
11859 Fix for PR gcj/238.
11860
11861 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
11862
11863 * parse.y (register_fields): Permit static fields in inner classes
11864 if they are final. Fix for PR gcj/255.
11865
11866 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11867
11868 * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
11869 * parse.y (find_in_imports): Returned type changed to void,
11870 leading comment fixed.
11871 (register_package): New function.
11872 (qualify_and_find): Likewise.
11873 (package_declaration:): Use `register_package'.
11874 (single_type_import_declaration:): Removed local variable
11875 `node'. Added missing `;' for consistency.
11876 (type_import_on_demand_declaration:): Use `chainon' to link new
11877 entries.
11878 (lookup_field_wrapper): Lookup local variables defined in outer
11879 contexts first.
11880 (java_complete_class): Don't reverse the list of imported on demand.
11881 (do_resolve_class): Reorganized. Removed local variable
11882 `original_name'. Call `qualify_and_find' with the current package
11883 name, invoke `find_in_imports_on_demand' right after. Call
11884 `qualify_and_find' with the packages we've seen so far. Fixed
11885 operations numbering in comments.
11886 (java_expand_class): Don't reverse `package_list'.
11887 (find_most_specific_methods_list): New local variables `abstract'
11888 and `candidates'. Use them to pick the right method.
11889
11890 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
11891
11892 * parse.y (check_modifiers_consistency): Don't subtract out
11893 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
11894
11895 2000-06-04 Philipp Thomas <pthomas@suse.de>
11896
11897 * Makefile.in (INTLLIBS): New.
11898 (LIBS): Add above.
11899 (DEPLIBS): Ditto.
11900
11901 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
11902
11903 * class.c (get_dispatch_table): Build the vtable dummy entry list
11904 element with a null purpose. Fixed leading comment.
11905 (build_dtable_decl): Build an accurate dtable type when appropriate
11906 and use it.
11907
11908 2000-06-02 Richard Henderson <rth@cygnus.com>
11909
11910 * lang.c (lang_get_alias_set): New.
11911
11912 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11913
11914 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
11915 before using it as the accessed field.
11916
11917 2000-05-31 Tom Tromey <tromey@cygnus.com>
11918
11919 * java-tree.h (boolean_array_vtable, byte_array_vtable,
11920 char_array_vtable, short_array_vtable, int_array_vtable,
11921 long_array_vtable, float_array_vtable, double_array_vtable):
11922 Declare.
11923 * expr.c (get_primitive_array_vtable): New function.
11924 (create_primitive_vtable): New function.
11925 (java_lang_expand_expr): Enable code to statically generate
11926 arrays.
11927 * decl.c (init_decl_processing): Create primitive vtables.
11928 (boolean_array_vtable, byte_array_vtable, char_array_vtable,
11929 short_array_vtable, int_array_vtable, long_array_vtable,
11930 float_array_vtable, double_array_vtable): Define.
11931
11932 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
11933
11934 * java/parse.y (find_applicable_accessible_methods_list):
11935 Don't add an uninitialized value to the list.
11936
11937 2000-05-25 Tom Tromey <tromey@cygnus.com>
11938
11939 * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
11940 when trying to see if field's class should be initialized. Always
11941 initialize field's declaring class, not qualified class.
11942 For PR gcj/162.
11943
11944 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11945 `wfl_operator', to maybe_build_primttype_type_ref.
11946 Fixes PR gcj/235.
11947
11948 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
11949
11950 * parse.y (patch_method_invocation): Don't try to lookup methods
11951 in primitive types.
11952
11953 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
11954
11955 * parse.y (resolve_field_access): Call the appropriate <clinit>
11956 before accessing the length of a static array. Craft a decl for
11957 the field while its time. Fixes PR gcj/129.
11958
11959 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11960
11961 * parse.y (resolve_package): Correctly set `*next' (was off by
11962 one.)
11963 (resolve_qualified_expression_name): Fixed comment.
11964
11965 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11966
11967 * jcf-parse.c (jcf_parse_source): Reset current_class and
11968 current_function_decl to NULL before parsing a new file.
11969
11970 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11971
11972 * parse.y (block_end:): If the collected block doesn't feature a
11973 statement, insert an empty statement.
11974
11975 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11976
11977 * parse.y (maybe_yank_clinit): New function.
11978 (maybe_generate_pre_expand_clinit): Always link <clinit> at the
11979 end of the list of methods belonging to a class.
11980 (java_complete_expand_method): Check whether <clinit> is really
11981 necessary and expand it accordingly.
11982
11983 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11984
11985 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11986 processed by the method's switch statement.
11987
11988 2000-05-19 Tom Tromey <tromey@cygnus.com>
11989
11990 * java-tree.h: Added init state enum.
11991 * decl.c (emit_init_test_initialization): Initialize class
11992 initialization check variable by looking at class' state.
11993
11994 2000-05-19 Tom Tromey <tromey@cygnus.com>
11995
11996 * java-tree.h (build_instanceof): Declare.
11997 (build_get_class): Declare.
11998 * parse.y (patch_binop): Use build_instanceof.
11999 * expr.c (build_instanceof): New function. If class is final,
12000 don't make a function call.
12001 (expand_java_INSTANCEOF): Use it.
12002 (build_get_class): New function.
12003
12004 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
12005
12006 * jcf-write.c (generate_classfile): Scan the source_file for
12007 slashes with the right pointer variable.
12008
12009 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
12010
12011 * lang.c (lang_decode_option): Update -Wunused flags by calling
12012 set_Wunused.
12013 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12014
12015 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
12016
12017 * check_init.c (check_init): Constify local char *.
12018 * class.c (push_class): Constify local char *.
12019 * java_tree.h: Update prototypes.
12020 * jcf-io.c (open_class): Constify filename parameter and
12021 return value.
12022 (find_class): Remove redundant string copy. Cast return from
12023 open_class.
12024 * jcf-parse.c (read_class, parse_class_file, yyparse):
12025 Constify local char *.
12026 * jcf-write.c (generate_bytecode_insns, generate_classfile):
12027 Constify local char *.
12028 * jcf.h (JCF): Constify filename and classname.
12029 (JCF_FINISH): Cast args to FREE to char * when appropriate.
12030 * lang.c (init_parse): Constify parameter and return value.
12031 * lex.c (java_get_line_col): Constify filename parameter.
12032 * parse.h: Constify parser_ctxt.filename. Update prototypes.
12033 * parse.y (java_parser_context_suspend,
12034 issue_warning_error_from_context, safe_layout_class): Constify
12035 local char *.
12036 * parse.c: Regenerate.
12037
12038 2000-05-08 Tom Tromey <tromey@cygnus.com>
12039
12040 * expr.c (build_jni_stub): Cache the result of
12041 _Jv_LookupJNIMethod.
12042
12043 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12044
12045 * decl.c (predef_filenames_size): Now 7.
12046 (predef_filenames): New seventh entry.
12047
12048 2000-05-04 Tom Tromey <tromey@cygnus.com>
12049
12050 * boehm.c (mark_reference_fields): Don't mark RawData fields.
12051 Keep track of when we've seen a reference field after a
12052 non-reference field.
12053 (get_boehm_type_descriptor): Handle case where we see
12054 non-reference fields but no trailing reference field.
12055 * decl.c (rawdata_ptr_type_node): Define.
12056 (init_decl_processing): Initialize rawdata_ptr_type_node.
12057 * java-tree.h (rawdata_ptr_type_node): Declare.
12058
12059 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12060
12061 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12062 specifiers in calls to fprintf.
12063
12064 2000-05-03 Andrew Haley <aph@cygnus.com>
12065
12066 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12067
12068 * javaop.h (WORD_TO_INT): New function.
12069 (IMMEDIATE_s4): Use WORD_TO_INT.
12070 * jcf.h (JPOOL_INT): Ditto.
12071
12072 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12073 separator.
12074
12075 2000-04-19 Tom Tromey <tromey@cygnus.com>
12076
12077 * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12078 on native function.
12079 * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12080 JNI methods.
12081 * expr.c (build_jni_stub): New function.
12082 * lang-specs.h: -fjni and -femit-class-file are incompatible.
12083 * parse.c: Rebuilt.
12084 * parse.y (java_complete_expand_methods): Expand a native method
12085 and call build_jni_stub if -fjni given.
12086 * lang-options.h: Document -fjni.
12087 * lang.c (flag_jni): New global.
12088 (lang_f_options): Added `jni' entry.
12089 * java-tree.h (soft_lookupjnimethod_node,
12090 soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12091 Declare.
12092 (flag_jni): Declare.
12093 (build_jni_stub): Declare.
12094 (struct lang_decl): Added `native' flag.
12095 (METHOD_NATIVE): Redefined to use `native' field of lang specific
12096 structure.
12097 * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12098 soft_jnipopsystemframe_node): New globals.
12099 (init_decl_processing): Set them. _Jv_InitClass only takes one
12100 argument.
12101
12102 * java-tree.def: Put into `C' mode.
12103
12104 2000-04-27 Tom Tromey <tromey@cygnus.com>
12105
12106 Fix for PR gcj/2:
12107 * expr.c (expand_invoke): Generate check to see if object pointer
12108 is null in nonvirtual invocation case.
12109 * java-tree.h (soft_nullpointer_node): Declare.
12110 * decl.c (soft_nullpointer_node): New global.
12111 (init_decl_processing): Initialize soft_nullpointer_node.
12112 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12113 or `private' methods.
12114 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12115
12116 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12117
12118 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12119 from <clinit>
12120
12121 2000-04-26 Tom Tromey <tromey@cygnus.com>
12122
12123 * zextract.c (find_zip_file_start): New function.
12124 (read_zip_archive): Use it.
12125
12126 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12127
12128 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12129
12130 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12131
12132 * class.c (common_enclosing_context_p): New function.
12133 * java-tree.h (common_enclosing_context_p): Added prototype.
12134 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12135 classes sharing an outer context with the current instance.
12136 * parse.y (build_access_to_thisn): Fixed leading comment.
12137 (verify_constructor_super): New local `supper_inner'. Skip
12138 enclosing context argument in the case of inner class constructors.
12139 (patch_method_invocation): Insert proper context as second
12140 parameter to pure inner class constructor super invocations.
12141
12142 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12143
12144 * parse.y (end_class_declaration): Reset the interface number
12145 counter.
12146
12147 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12148
12149 * parse.y (source_start_java_method): Deleted unnecessary code.
12150 (patch_method_invocation): Fixed comment.
12151
12152 2000-04-24 Robert Lipe <robertlipe@usa.net>
12153
12154 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12155
12156 2000-04-23 Tom Tromey <tromey@cygnus.com>
12157
12158 * boehm.c (mark_reference_fields): Use int_byte_position.
12159
12160 2000-04-22 Tom Tromey <tromey@cygnus.com>
12161
12162 * boehm.c (mark_reference_fields): Only call byte_position on
12163 non-static fields.
12164
12165 2000-04-22 Tom Tromey <tromey@cygnus.com>
12166
12167 * boehm.c (mark_reference_fields): Added `last_view_index'
12168 argument. Use DECL_FIELD_OFFSET to determine field's offset.
12169
12170 2000-04-20 Mo DeJong <mdejong@cygnus.com>
12171
12172 * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12173 * parse.y (check_class_interface_creation): Fixed comments. Select
12174 permitted modifiers for (inner) interfaces. Changed error message
12175 to report rejected modifiers used with local classes.
12176
12177 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12178
12179 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12180 of directly inherited type considered in scope.
12181 * parse.y (do_resolve_class): Search inherited classes for inner
12182 classes.
12183
12184 2000-04-20 Tom Tromey <tromey@cygnus.com>
12185
12186 * parse.y (not_accessible_p): Use member's class, not current
12187 class, when doing inheritance check for protected reference.
12188 Fixes PR gcj/124.
12189
12190 2000-04-20 Jason Schroeder <shrode@subnature.com>
12191
12192 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12193
12194 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12195
12196 * parse.y (lookup_field_wrapper): Search for final local aliases.
12197 (resolve_expression_name): Let lookup_field_wrapper search for
12198 final local aliases. Force the value of `name' if one is found.
12199 (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12200 an expression name. Fixed comments.
12201
12202 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12203
12204 * parse.y (yyerror): `msg' can be null, don't use it in that case.
12205
12206 2000-04-19 Tom Tromey <tromey@cygnus.com>
12207
12208 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12209
12210 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12211
12212 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12213
12214 2000-04-18 Tom Tromey <tromey@cygnus.com>
12215
12216 PR gcj/211:
12217 * gjavah.c (utf8_cmp): Changed return value.
12218 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
12219 result.
12220 (cxx_keywords): New global.
12221 (get_field_name): Handle new result of cxx_keyword_subst.
12222 (print_method_info): Likewise.
12223
12224 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
12225
12226 * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12227 with a newline, for CNI.
12228 (print_stub_or_jni): Print a space or newline before method name for
12229 CNI as well as JNI.
12230 (print_cxx_classname): Don't write leading "::" in CNI stub method.
12231 (process_file): Include gcj/cni.h if generating CNI stubs.
12232
12233 2000-04-16 Tom Tromey <tromey@cygnus.com>
12234
12235 * gjavah.c (decompile_method): Use print_field_name.
12236 Fixes PR gcj/205.
12237
12238 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12239
12240 * parse.y (java_expand_classes): Reverse the package list once.
12241 (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12242 reduction.
12243 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12244 the `==' and `!=' operators.
12245
12246 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12247
12248 * jcf-write.c (generate_bytecode_insns): At invocation time,
12249 always relate an interface method to the type of its selector.
12250
12251 2000-04-05 Tom Tromey <tromey@cygnus.com>
12252
12253 Fix for PR gcj/2:
12254 * expr.c (expand_invoke): Generate check to see if object pointer
12255 is null in nonvirtual invocation case.
12256 * java-tree.h (soft_nullpointer_node): Declare.
12257 * decl.c (soft_nullpointer_node): New global.
12258 (init_decl_processing): Initialize soft_nullpointer_node.
12259 * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12260 or `private' methods.
12261 (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12262
12263 2000-04-05 Tom Tromey <tromey@cygnus.com>
12264
12265 Fix for PR gcj/140:
12266 * parse.y (check_final_assignment): Recognize assignments to the
12267 `length' field of an array when generating class files.
12268
12269 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12270
12271 * class.c (decl_hash): Prototype removed.
12272 (decl_compare): Likewise.
12273
12274 2000-04-05 Tom Tromey <tromey@cygnus.com>
12275
12276 * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12277 * parse.y (check_modifiers_consistency): Check for final/volatile
12278 clash. Fixes PR gcj/164.
12279
12280 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12281
12282 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12283 made global.
12284 (java_hash_compare_tree_node): Renamed from `decl_compare, made
12285 global.
12286 (add_method_1): Use `java_hash_hash_tree_node' and
12287 `java_hash_compare_tree_node'.
12288 * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12289 (java_hash_compare_tree_node): Likewise.
12290 * parse.y (find_applicable_accessible_methods_list): Create,
12291 delete and use a hash table to remember already searched interfaces.
12292
12293 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
12294
12295 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12296 with latest entry.
12297
12298 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12299
12300 * boehm.c (mark_reference_fields, set_bit): Prototype.
12301 (set_bit): Un-ANSI-fy definition.
12302
12303 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12304 Prototype.
12305
12306 * decl.c (emit_init_test_initialization): Likewise.
12307
12308 * gjavah.c (jni_print_char): Likewise.
12309
12310 * parse.y (create_new_parser_context): Likewise.
12311
12312 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12313
12314 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12315 patch missing hunk. Fixed indentation.
12316
12317 2000-03-30 Tom Tromey <tromey@cygnus.com>
12318
12319 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12320 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12321
12322 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12323
12324 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12325 when negative *before* using it as an array index.
12326 * ChangeLog: Fixed typo.
12327
12328 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12329
12330 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12331 to 0 when it reaches -1.
12332
12333 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
12334
12335 * jcf-parse.c (get_constant): Properly cast `num' during the
12336 invocation of `add_double'.
12337 * jcf-write.c (push_long_const): Properly cast `lo' before
12338 comparing it to short bounds.
12339 * parse-scan.y (interface_declaration:): Rule re-arrange so that
12340 `interface_body:' is reduced after the current interface is
12341 pushed.
12342
12343 2000-03-26 Tom Tromey <tromey@cygnus.com>
12344
12345 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12346 Java-specific `-f' option.
12347
12348 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12349
12350 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12351 Adjust order of making types.
12352 Make bitsize_*_node values.
12353
12354 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12355
12356 * class.c (make_field_value): Use byte_position.
12357 * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12358 (java_array_data_offset): Likewise.
12359 * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12360 bzero call.
12361
12362 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12363
12364 * parse.y (check_abstract_method_definitions): New local
12365 `end_type_reached'. Make sure we also consider `end_type'.
12366 (java_check_abstract_method_definitions): Make sure we eventually
12367 consider `java.lang.Object'.
12368 (maybe_use_access_method): Don't use access method if not in the
12369 context of a pure inner class or if the method's context is right.
12370 (find_applicable_accessible_methods_list): New static flag
12371 `object_done'. Don't search abstract classes as interfaces. Fixed
12372 indentation. Fixed the `java.lang.Object' only search. Search
12373 class interface(s) first, then fully search enclosing contexts.
12374 (find_most_specific_methods_list): Pick the closest candidate when
12375 they're all abstract.
12376
12377 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12378
12379 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12380 properly initialize `finished_label'. Don't emit gotos for empty
12381 try statements.
12382
12383 2000-03-19 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12384
12385 * except.c (emit_handlers): Clear catch_clauses_last.
12386
12387 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12388
12389 * parse.y (check_method_types_complete): New function.
12390 (create_class): Reset anonymous class counter only when seeing an
12391 non inner classe.
12392 (java_complete_class): JDEP_METHOD: Don't recompute signature
12393 if incomplete.
12394
12395 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12396
12397 * class.c (build_static_ref): Fixed indentation in comment.
12398 * java-tree.def (TRY_EXPR): Fixed typo in name.
12399 (CLASS_LITERAL): Likewise.
12400 * java-tree.h: (TYPE_DOT_CLASS): New macro.
12401 (struct lang_type): New field `dot_class'.
12402 * jcf-write.c (generate_bytecode_insns): Fixed error message.
12403 (generate_classfile): Method `class$' is synthetic.
12404 * parse.y (build_do_class_method): New function.
12405 (build_dot_class_method_invocation): Likewise.
12406 (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12407 (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12408 (qualify_ambiguous_name): Likewise.
12409 (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12410 (build_try_statement): Fixed leading comment.
12411
12412 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12413
12414 * class.c (make_field_value): Properly handle sizes.
12415 (get_dispatch_vector): Use tree_low_cst and host_integerp.
12416 (layout_class_method): Count using trees.
12417 * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12418 * expr.c (java_array_data_offset): Use int_bit_position.
12419 (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12420 (build_invokevirtual): Use tree_low_cst and do computations with trees.
12421
12422 2000-03-16 Tom Tromey <tromey@cygnus.com>
12423
12424 * lang.c (flag_hash_synchronization): New global.
12425 (lang_f_options): Added `hash-synchronization'.
12426 * lang-options.h: Mention -fhash-synchronization.
12427 * java-tree.h (flag_hash_synchronization): Declare.
12428 * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12429 hash table synchronization is disabled.
12430 * decl.c (init_decl_processing): Only push `sync_info' value when
12431 hash table synchronization is disabled.
12432 * class.c (make_class_data): Only push `sync_info' field when hash
12433 table synchronization is disabled. Removed dead code.
12434
12435 2000-03-16 Tom Tromey <tromey@cygnus.com>
12436
12437 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12438
12439 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12440
12441 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12442 classes.
12443 * parse.y (patch_method_invocation): Handle anonymous classes
12444 creation in static context.
12445
12446 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12447
12448 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12449 * parse.y (resolve_qualified_expression_name): Use it.
12450 (patch_method_invocation): Likewise.
12451
12452 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12453
12454 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12455 depending on the type of dependency which dictates what the
12456 current class is.
12457 (unresolved_type_p): Resolved types limited to the current class.
12458
12459 2000-03-15 Tom Tromey <tromey@cygnus.com>
12460
12461 * decl.c (init_decl_processing): Set type of `sync_info' to be
12462 pointer to Object.
12463
12464 * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12465 Correctly compute bit number for current slot. Zero `high' and
12466 `low' in DS_LENGTH case. Don't skip inherited fields. Use
12467 mark_reference_fields.
12468 (mark_reference_fields): New function.
12469
12470 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12471
12472 * parse.y (register_incomplete_type): Fixed initialization of
12473 JDEP_ENCLOSING.
12474
12475 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12476
12477 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12478 static globals.
12479 (push_class_context, pop_class_context): New function.
12480 (class_body:): Call pop_class_context.
12481 (interface_body:): Likewise.
12482 (INNER_QUALIFIER): New macro.
12483 (report_class_declaration): Changed output format and use
12484 INNER_QUALIFIER. Call push_class_context.
12485
12486 2000-02-14 Andrew Haley <aph@cygnus.com>
12487
12488 * check-init.c (check_init): Add new cases for unary and binary
12489 tree nodes.
12490
12491 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12492
12493 * parse.y (resolve_package): Set `next' once a type name has been
12494 progressively discovered.
12495 (resolve_qualified_expression_name): Propagate resolution only if
12496 there are remaining qualifiers. Take into account `q' might have
12497 been cleared after re-qualification.
12498 * parse.y (patch_method_invocation): New local `resolved'.
12499 Section dealing with qualified expression rewritten to use
12500 resolve_field_access.
12501
12502 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
12503
12504 * parse.h (PUSH_CPC): Fixed indentation.
12505 (DEBUG_CPC): New macro.
12506 (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12507 SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12508 * parse.y (class_body_declaration:): Use
12509 SET_CPC_INSTANCE_INITIALIZER_STMT.
12510 (method_declaration:): Check for null current_function_decl.
12511 (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12512 (java_parser_context_pop_initialized_field): Better handling of
12513 empty lists.
12514 (maybe_make_nested_class_name): Mark nested class name as
12515 qualified when necessary.
12516 (end_class_declaration): Don't call java_parse_context_resume when
12517 one or more error occurred.
12518 (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12519 (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12520 SET_CPC_INITIALIZER_STMT.
12521 (method_header): Check for inner classes declaring static methods.
12522 (resolve_qualified_expression_name): Handle situation where `this'
12523 is implied.
12524
12525 2000-03-13 Hans Boehm <boehm@acm.org>
12526
12527 * typeck.c (build_prim_array_type): Correctly set the high word too.
12528
12529 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12530
12531 * parse.y (java_complete_expand_methods): Leave <clinit> out of
12532 ordinary methods.
12533 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12534 list of methods for interfaces.
12535
12536 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12537
12538 * parse.y (qualify_ambiguous_name): Properly handle expressions
12539 using `null'.
12540
12541 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12542
12543 * parse.y (check_final_assignment): Extended to process
12544 COMPOUND_EXPR.
12545 (patch_assignment): Have check_final_assignment called only once.
12546
12547 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12548
12549 * java-tree.h (IS_INIT_CHECKED): New flag.
12550 * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12551 * parse.y (patch_string): Call force_evaluation_order on the
12552 completed string concatenation tree.
12553 * expr.c (force_evaluation_order): Call force_evaluation_order on
12554 function's arguments too.
12555
12556 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12557
12558 * decl.c (emit_init_test_initialization): Mark KEY as unused.
12559 * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12560 (build_anewarray): Likewise.
12561 * parse.y (patch_newarray): Likewise.
12562 * parse.c: Regenerated.
12563
12564 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
12565
12566 * decl.c (init_decl_processing): Added new class fields `depth',
12567 `ancestors', and `idt' to class_type_node. Use
12568 _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12569 * class.c (make_class_data): Push initial values for new fields.
12570 * java-tree.h: Updated prototype for `build_invokeinterface'.
12571 * expr.c (build_invokeinterface): Changed parameters to accept
12572 `method' tree. Calculate index of `method' in its declaring
12573 interface. Build call to _Jv_LookupInterfaceMethodIdx.
12574 (expand_invoke): Call `build_invokeinterface' with new parameters.
12575 * parse.y (patch_invoke): Call `build_invokeinterface' with new
12576 parameters.
12577
12578 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
12579
12580 * typeck.c (lookup_do): Search superinterfaces first
12581 when looking up an interface method. From Godmar Back
12582 <gback@cs.utah.edu>
12583
12584 2000-03-06 Tom Tromey <tromey@cygnus.com>
12585
12586 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12587
12588 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12589
12590 * java-tree.h (lookup_argument_method2): Declared.
12591 (safe_layout_class): Prototype moved from parse.h.
12592 * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12593 * parse.y (java_check_regular_methods): Local `super_class' gone.
12594 Call lookup_argument_method2 instead of lookup_argument_method.
12595 Perform modifier match for methods found declared in implemented
12596 interfaces. Fixed indentation problem. Overriding/hiding error
12597 report to take place only for methods found in classes.
12598 * typeck.c (lookup_argument_method): Changed leading
12599 comment. Re-written by calling lookup_do.
12600 (lookup_argument_method2): New function.
12601 (lookup_java_method): Re-written by calling lookup_do.
12602 (lookup_do): New function.
12603
12604 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12605
12606 * check-init.c (check_init): Removed dead code. Handle (blank)
12607 final variables.
12608 * parse.y (declare_local_variables): New local `final_p', set it
12609 and use it to initialize LOCAL_FINAL.
12610 (check_final_assignment): Only check FIELD_DECLs.
12611
12612 2000-02-17 Tom Tromey <tromey@cygnus.com>
12613
12614 * Makefile.in (JAVA_OBJS): Added boehm.o.
12615 (boehm.o): New target.
12616 * Make-lang.in (JAVA_SRCS): Added boehm.c.
12617 * java-tree.h (flag_use_boehm_gc): Declare.
12618 (get_boehm_type_descriptor): Declare.
12619 * lang.c (lang_f_options): Added `use-boehm-gc'.
12620 (flag_use_boehm_gc): New global.
12621 * lang-options.h: Added -fuse-boehm-gc.
12622 * boehm.c: New file.
12623 * class.c (get_dispatch_table): If class uses a Boehm type
12624 descriptor, put it in the vtable.
12625 (make_class_data): Removed dead code.
12626
12627 2000-03-03 Per Bothner <per@bothner.com>
12628
12629 * decl.c (init_decl_processing): Initialize sizetype properly.
12630
12631 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
12632
12633 * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12634 (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12635 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12636 * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12637 (jcf_parse): New local `current'. Load innerclasses seen in outer
12638 context being processed.
12639 * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12640 * jcf-write.c (append_innerclasses_attribute): New function.
12641 (append_innerclasses_attribute_entry): Likewise.
12642 (get_access_flags): Handle static classes. Set anonymous and local
12643 classes to be private.
12644 (generate_classfile): Attribute count adjusted. Call
12645 append_innerclasses_attribute.
12646 * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12647 PURE_INNER_CLASS_TYPE_P.
12648 * parse.y (parser_qualified_classname): New parameter `is_static',
12649 produce non qualified name accordingly.
12650 (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12651 (create_interface): Added argument to parser_qualified_classname.
12652 (create_class): Added argument to parser_qualified_classname. Setup
12653 alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12654 (add_inner_class_fields): Fixed indentation.
12655 (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12656 (method_declarator): Fixed typo in comment.
12657 (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12658 (build_current_thisn): Likewise.
12659 (patch_method_invocation): Likewise.
12660
12661 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
12662
12663 * decl.c (current_function_decl): Move to toplev.c.
12664
12665 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12666
12667 * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12668 (DECL_BIT_INDEX): Use underlying representation.
12669 * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12670
12671 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12672
12673 * expr.c (build_java_ret): Pass proper type to size_binop.
12674
12675 2000-02-25 Anthony Green <green@cygnus.com>
12676
12677 * expr.c (build_class_init): Mark the decl to be ignored by
12678 check_init.
12679 * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12680 * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12681 * class.c (init_test_hash_newfunc): New function.
12682 (decl_hash): New function.
12683 (decl_compare): New function.
12684 * decl.c (emit_init_test_initialization): New function.
12685 (complete_start_java_method): Traverse the init test hashtable,
12686 calling emit_init_test_initialization.
12687 (always_initialize_class_p): Define.
12688 * expr.c (build_class_init): Use initialization tests when
12689 emitting class initialization code.
12690 (always_initialize_class_p): Declare.
12691 * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
12692 1.
12693 * java-tree.h: Include hash.h.
12694 (DECL_FUNCTION_INIT_TEST_TABLE): Define.
12695 (struct lang_decl): Add init_test_table field.
12696 (init_test_hash_entry): Define.
12697
12698 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12699
12700 * gjavah.c (main): Avoid using `argi' to report unimplemented
12701 options.
12702
12703 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12704
12705 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12706 initialize locals to avoid warnings. Local `exception_type' moved
12707 into if statement.
12708
12709 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12710
12711 * parse.y (resolve_expression_name): Use `orig' as a second
12712 argument to resolve_field_access.
12713 (resolve_field_access): Removed unnecessary code when dealing with
12714 static fields.
12715
12716 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
12717
12718 * class.c (push_super_field): Don't push the field twice.
12719 * jcf-parse.c (parse_source_file): Call java_reorder_fields.
12720 * parse.h (java_reorder_fields): Prototyped.
12721 * parse.y (java_reorder_fields): New function.
12722 (java_layout_class): Simplified not to worry about re-ordering.
12723
12724 2000-02-23 Tom Tromey <tromey@cygnus.com>
12725
12726 * gjavah.c (print_name): In JNI case, correctly quote string.
12727 (print_method_info): Don't handle overrides in JNI mode.
12728
12729 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12730
12731 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12732 value type set to `boolean_type_node'.
12733
12734 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
12735
12736 * jcf-dump.c (main): Test for correct condition after
12737 output file creation.
12738
12739 2000-02-19 Anthony Green <green@cygnus.com>
12740
12741 * jcf-depend.c (add_entry): Fix test for first list entry.
12742
12743 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12744
12745 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12746 * constants.c (build_constants_constructor): Likewise.
12747
12748 2000-02-19 Anthony Green <green@cygnus.com>
12749
12750 * jcf-depend.c (add_entry): Add entries to the end of the list.
12751
12752 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
12753
12754 * decl.c (INT_TYPE_SIZE): Define if necessary.
12755 (expand_java_return): Handle the case of a native integer smaller
12756 than a JVM integer.
12757
12758 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
12759
12760 * gjavah.c (help): Use GCCBUGURL.
12761 * jv-scan.c (help): Likewise.
12762 * jcf-dump.c (help): Likewise.
12763
12764 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12765
12766 * jcf-write.c (generate_bytecode_insns): Don't generate empty
12767 `finally' clauses.
12768
12769 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12770
12771 * jcf-parse.c (load_class): Call `fatal' if no file containing
12772 the target class are found.
12773
12774 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
12775
12776 * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
12777 lex.c, lex.h, and PARSE_H to...
12778 (parse.o, parse-scan.o): ...here, respectively.
12779
12780 * lex.c: Split out code that may trigger SIGFPE from yylex()
12781 to its own function.
12782 * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
12783
12784 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12785
12786 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12787
12788 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12789
12790 * parse.y (outer_field_access_p): Stop in time when outer contexts
12791 are exhausted.
12792 (resolve_qualified_expression_name): Properly qualify *everything*
12793 after a package.type to be resoled as expression names.
12794 (find_applicable_accessible_methods_list): Save/restore `class' to
12795 isolate it from a possible outer context search.
12796
12797 2000-02-15 Tom Tromey <tromey@cygnus.com>
12798
12799 * gjavah.c (jni_print_char): New function.
12800 (print_full_cxx_name): Use it.
12801 (decode_signature_piece): Likewise.
12802 (print_cxx_classname): Likewise.
12803
12804 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12805
12806 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12807 version.o.
12808 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12809
12810 * gjavah.c: Include version.h.
12811
12812 * jcf-dump.c: Likewise.
12813
12814 * jv-scan.c: Likewise.
12815
12816 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
12817
12818 * parse.y (outer_field_access_fix): First parameter now a tree
12819 node. Check for assignment to final. First argument to
12820 build_outer_field_access_fix modified to accommodate prototype.
12821 (build_outer_field_access): Don't check for assignment to final
12822 here.
12823 (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
12824 possibly returned by outer_field_access_fix. Changed
12825 outer_field_access_fix's first argument.
12826 (check_final_assignment): $finit$'s context is OK.
12827 (patch_unaryop): Use node instead of its line/column value when
12828 calling outer_field_access_fix.
12829
12830 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
12831
12832 * parse.y (interface_declaration:): No longer tagged
12833 <node>. Re-installed default action.
12834 (class_member_declaration:): Handle inner interfaces.
12835 (interface_member_declaration): Handle inner interfaces and
12836 classes.
12837 (create_interface): Push error if one seen. Suspend parsing
12838 context when processing an inner interface.
12839 (register_fields): Inner class static field limitations not to
12840 apply to inner interfaces.
12841
12842 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12843
12844 * jcf-parse.c (load_class): Update `java_error_count' when a
12845 class' file can't be found.
12846 (parse.y): Avoid (byte)code generation when errors seen.
12847
12848 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12849
12850 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12851 decodes a valid node.
12852 (patch_binop): Handle TRUNC_DIV_EXPR.
12853
12854 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12855
12856 * parse.y (resolve_package): New local `acc'. Try to progressively
12857 build and guess a package and type name.
12858
12859 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12860
12861 * parse.y (find_applicable_accessible_methods_list): Load and
12862 layout the search class if necessary.
12863 (java_complete_tree): Keep to original type of the folded initial
12864 value.
12865
12866 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12867
12868 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12869 Generate error message if circularity is detected. New static
12870 local `list'.
12871 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
12872 * jcf-write.c (generate_bytecode_insns): Very simply handle
12873 SAVE_EXPR.
12874 * parse.y (java_check_circular_reference): Use
12875 `cyclic_inheritance_report' during report, if necessary.
12876 (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
12877 walking NEW_ARRAY_INIT twice.
12878
12879 2000-02-09 Tom Tromey <tromey@cygnus.com>
12880
12881 * parse.y (check_class_interface_creation): Allow inner classes to
12882 be `private' or `protected', check modifiers' consistency. Prevent
12883 block local classes from bearing any modifiers.
12884
12885 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12886
12887 * except.c (check_start_handlers): Re-add prototype lost in last
12888 patch.
12889 (maybe_start_try): Remove excess argument to `check_start_handlers'.
12890
12891 2000-02-09 Andrew Haley <aph@cygnus.com>
12892
12893 * decl.c (clear_binding_level): Remove excess initializer.
12894 (maybe_poplevels): Remove unused variable.
12895 (force_poplevels): Ditto.
12896 (struct binding_level): Add comment.
12897
12898 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12899
12900 * jcf-write.c (generate_classfile): Don't consider
12901 pre-initialization with reference value (use <clinit> instead.)
12902 * parse.y (java_fix_constructors): No generated constructor for
12903 interfaces.
12904 (build_outer_field_access): Removed debug message.
12905 (outer_field_expanded_access_p): Adapted to bytecode generation.
12906 (build_outer_field_access_method): Use fix_method_argument_names.
12907 (build_outer_method_access_method): Fixed indentation. Added
12908 comment. Handle access method generation for static and also void
12909 methods.
12910 (build_access_to_thisn): Inserted debug message.
12911 (maybe_build_thisn_access_method): Use fix_method_argument_names.
12912 (resolve_qualified_expression_name): Fixed comment.
12913 (not_accessible_p): Adapted to bytecode generation. Added comment.
12914 (patch_method_invocation): Added comment.
12915 (maybe_use_access_method): Fixed leading comment. Handle static
12916 methods.
12917 (java_complete_lhs): Don't shortcut handling of initialized upon
12918 declaration String type static fields when generating bytecode.
12919 (patch_unaryop): Handle outer field access when generating
12920 bytecode.
12921
12922 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
12923
12924 * java-tree.h (FIELD_THISN): New macro.
12925 * jcf-write.c (append_synthetic_attribute): New function.
12926 (generate_classfile): Set "Synthetic" attribute on this$<n>,
12927 val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
12928 * parse.y (add_inner_class_fields): Set FIELD_THISN for created
12929 this$<n> fields.
12930 (build_outer_field_access): Turned on access functions usage and
12931 generation when compiling to bytecode.
12932 (maybe_use_access_method): Likewise.
12933
12934 2000-01-25 Andrew Haley <aph@cygnus.com>
12935
12936 * java-except.h (struct eh_range): Add `expanded' field.
12937 (maybe_start_try): Add end_pc arg.
12938 (maybe_end_try): Ditto.
12939 * java-tree.h (force_poplevels): new function.
12940 * expr.c (expand_byte_code): Don't call maybe_start_try or
12941 maybe_end_try.
12942 * except.c (add_handler): Reset expanded.
12943 (expand_start_java_handler): Set expanded.
12944 (check_start_handlers): Don't expand a start handler that's
12945 already been expanded.
12946 (maybe_start_try): Add end_pc arg. Only expand a handler which
12947 ends after end_pc.
12948 (expand_end_java_handler): call force_poplevels.
12949 (force_poplevels): new function.
12950 * decl.c (binding_level): Add start_pc of binding level.
12951 (maybe_pushlevels): Call maybe_start_try when pushing binding
12952 levels.
12953 (maybe_poplevels): Call maybe_end_try when popping binding levels.
12954 (LARGEST_PC): Define.
12955 (clear_binding_level): Use LARGEST_PC.
12956
12957 * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
12958 * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
12959 (binding_depth, is_class_level, current_pc): new variables.
12960 (struct binding_level): ditto.
12961 (indent): new function.
12962 (push_jvm_slot): add debugging info.
12963 (maybe_pushlevels): ditto.
12964 (maybe_poplevels): ditto.
12965 (pushlevel): ditto.
12966 (poplevel): ditto.
12967 (start_java_method): ditto.
12968 (give_name_to_locals): comment only.
12969 * except.c (binding_depth, is_class_level, current_pc):
12970 new variables.
12971 (expand_start_java_handler): add debugging info.
12972 (expand_end_java_handler): ditto.
12973
12974 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12975
12976 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12977 (print_name_for_stub_or_jni, process_file): Constify a char*.
12978
12979 2000-02-03 Tom Tromey <tromey@cygnus.com>
12980
12981 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12982
12983 2000-01-31 Scott Bambrough <scottb@netwinder.org>
12984
12985 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12986 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12987 defined to be 1.
12988
12989 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12990
12991 * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
12992 * java-tree.h (TYPE_II_STMT_LIST): New macro.
12993 (struct lang_type): New field `ii_block'.
12994 * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
12995 CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
12996 * parse.h (struct parser_ctxt): New field `instance_initializers'.
12997 (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
12998 CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
12999 CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13000 macros.
13001 * parse.y (add_instance_initializer): New function.
13002 (in_instance_initializer): New static global.
13003 (class_body_declaration:): Link instance initializer block.
13004 (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13005 (array_creation_expression:): Remove unused local.
13006 (java_parser_context_push_initialized_field): Fixed leading
13007 comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13008 CPC_INSTANCE_INITIALIZER_LIST.
13009 (java_parser_context_pop_initialized_field): Likewise.
13010 (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13011 (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13012 CPC_INITIALIZER_STMT.
13013 (fix_constructors): New local `class_type'. Use it. Call
13014 add_instance_initializer.
13015 (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13016 (patch_return): Forbid return in instance initializers.
13017 (patch_throw_statement): Enforce exception handling in the context
13018 of instance initializers.
13019
13020 2000-02-03 Tom Tromey <tromey@cygnus.com>
13021
13022 * Make-lang.in (java.mostlyclean): Remove executables in
13023 `mostlyclean'.
13024
13025 2000-01-31 Scott Bambrough <scottb@netwinder.org>
13026
13027 * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13028 HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13029 (java_float_finite): Convert to use union Word from javaop.h.
13030 (java_double_finite): Convert to use union DWord from javaop.h.
13031
13032 2000-02-02 Tom Tromey <tromey@cygnus.com>
13033
13034 * gjavah.c (options): Added `jni' entry.
13035 (help): Document -jni.
13036 (flag_jni): New global.
13037 (process_file): Handle JNI output. Don't print text from
13038 -prepend, -add, etc, when generating stubs. Only remove `.class'
13039 suffix if it actually exists.
13040 (main): Create a `.c' file when run with `--jni --stubs'. Create
13041 correct output file name with `--jni'.
13042 (print_include): Mangle header name differently in JNI case.
13043 (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13044 method list.
13045 (print_method_info): Handle JNI case. Put signature info into
13046 method name. Handle case when STREAM is NULL.
13047 (print_name_for_stub_or_jni): New function.
13048 (print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
13049 (print_cxx_classname): Handle JNI.
13050 (print_full_cxx_name): Likewise.
13051 (decode_signature_piece): Likewise.
13052 (overloaded_jni_method_exists_p): New function.
13053 (struct method_name): Added `signature' and `sig_length' fields.
13054 (HANDLE_END_FIELD): Do nothing in JNI mode.
13055
13056 2000-02-02 Tom Tromey <tromey@cygnus.com>
13057
13058 * jv-scan.c: Include version.c, <getopt.h>.
13059 (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13060 (options): New array.
13061 (usage): New function.
13062 (version): New function.
13063 (main): Use getopt_long to parse command line.
13064 * jcf-dump.c: Include version.c, <getopt.h>.
13065 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13066 OPT_JAVAP): New macros.
13067 (options): New array.
13068 (usage): Return `void'. Changed message.
13069 (help): New function.
13070 (version): New function.
13071 (main): Use getopt_long_only to parse command line.
13072 * gjavah.c: Include <getopt.h>.
13073 (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13074 OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13075 OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13076 (options): New array.
13077 (java_no_argument): Removed.
13078 (help): Updated with missing options.
13079 (main): Use getopt_long_only to parse command line.
13080 (usage): Changed message.
13081
13082 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13083
13084 * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13085 * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13086 ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13087 * parse.y (array_creation_expression:): Handle anonymous arrays.
13088 (build_array_from_name): Don't set `ret_name' if null.
13089 (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13090 (qualify_ambiguous_name): Likewise.
13091 (java_complete_expand_class): Likewise.
13092
13093 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13094
13095 * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13096 * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13097 (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13098 (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13099 (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13100 AIPL_FUNCTION_COMPLETED_INVOCATION.
13101 (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13102 AIPL_FUNCTION_INVOCATION_READY.
13103 (AIPL_FUNCTION_DECLARATION): New enum entry.
13104 * parse.y (reorder_static_initialized): New function.
13105 (java_parser_context_pop_initialized_field): Use it.
13106 (add_inner_class_fields): Use
13107 MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13108 augmented. Install marker after last alias initializer, if any.
13109 (generate_finit): Fixed typo. Don't try to retain only the used
13110 fields.
13111 (method_header): Compute and set DECL_FUNCTION_NAP.
13112 (method_declarator): Fixed comment. Insert alias initializer in
13113 parameter list.
13114 (build_alias_initializer_parameter_list): Fixed leading
13115 comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13116 replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13117 (java_complete_expand_class): Code to retain only used aliases
13118 removed.
13119 (java_complete_expand_methods): New local `first_decl'. Generate
13120 $finit$ first, then expand the constructors, regular methods and
13121 <clinit>.
13122 (java_complete_expand_method): Don't report error on missing
13123 return statement if previously detected bogus.
13124 (fix_constructors): Don't patch constructor parameters list.
13125 (patch_method_invocation): Use new AIPL enum values. Reverse
13126 alias initializer list for anonymous classes.
13127
13128 2000-01-30 Anthony Green <green@redhat.com>
13129
13130 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13131 determine how many stack slots to pop.
13132
13133 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13134
13135 * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13136 error handling/recovery.
13137 * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13138
13139 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
13140
13141 * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13142 FIELD_LOCAL_ALIAS_USED): New macros.
13143 (DECL_FUNCTION_NAP): New macro.
13144 (struct lang_decl): New field `nap'.
13145 (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13146 (struct lang_type): New fields `finit_stmt_list' and
13147 `clinit_stmt_list'.
13148 (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13149 * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13150 (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13151 UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13152 (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13153 AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13154 (BUILD_THROW): Macro line separator re-indented.
13155 * parse.y (end_class_declaration): New function.
13156 (maybe_generate_pre_expand_clinit): New name for
13157 java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13158 pre-expand static fields.
13159 (maybe_generate_clinit): Function deleted.
13160 (check_for_static_method_reference): Prototype's parameter list
13161 indented.
13162 (generate_finit): New name for maybe_generate_finit. Changed
13163 leading comment. Function rewritten to use
13164 TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13165 (build_alias_initializer_parameter_list): New function.
13166 (java_parser_context_pop_initialized_field): Likewise.
13167 (add_inner_class_fields): Likewise.
13168 (type_declaration:): Call end_class_declaration.
13169 (class_member_declaration:): Likewise.
13170 (formal_parameter_list:): Fixed typos.
13171 (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13172 element. Improved error handling.
13173 (block_statement:): Call end_class_declaration.
13174 (anonymous_class_creation:): Likewise.
13175 (create_anonymous_class): Fixed comments.
13176 (create_class): Call add_inner_class_fields.
13177 (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13178 (method_header): Use MARK_FINAL_PARMS.
13179 (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13180 (method_declarator): Propagate final argument flag.
13181 (craft_constructor): New local `artificial'. Call
13182 build_alias_initializer_parameter_list. Use
13183 CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13184 (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13185 necessary.
13186 (complete_expand_class): Get rid of unused outer context local
13187 alias fields.
13188 (java_complete_expand_methods): Fixed leading
13189 comment. Generate/pre-expand <clinit> first. Changed method
13190 expansion order to regular, $finit$, constructors, <clinit>.
13191 (java_complete_expand_method): Set current_function_decl.
13192 (fix_constructors): Fix constructor parameter list to account for
13193 outer context local alias initializers.
13194 (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13195 (resolve_expression_name): Lookup outer context local aliases. New
13196 local `access', use it.
13197 (patch_method_invocation): Patch inner class ctor invocation with
13198 outer context local aliases initialization values. $finit$
13199 invocation patching now includes things generated with
13200 build_alias_initializer_parameter_list.
13201 (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13202 (build_super_invocation): Likewise.
13203 (patch_assignment): Changed comment.
13204
13205 2000-01-27 Andrew Haley <aph@cygnus.com>
13206
13207 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13208 (emit_if): Ditto.
13209 (emit_jsr): Ditto.
13210
13211 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13212
13213 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13214 concatenation.
13215 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13216
13217 * parse.y (register_fields): Don't pass a format specifier to
13218 OBSOLETE_MODIFIER_WARNING.
13219 (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13220 instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13221 specifier.
13222 (check_modifiers): Change function into a macro.
13223 (check_class_interface_creation): Pass a literal format string.
13224
13225 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13226
13227 * buffer.h: PROTO -> PARAMS.
13228 * check-init.c: Likewise.
13229 * class.c: Likewise.
13230 * constants.c: Likewise.
13231 * convert.h: Likewise.
13232 * decl.c: Likewise.
13233 * except.c: Likewise.
13234 * expr.c: Likewise.
13235 * gjavah.c: Likewise.
13236 * java-except.h: Likewise.
13237 * java-tree.h: Likewise.
13238 * jcf-depend.c: Likewise.
13239 * jcf-dump.c: Likewise.
13240 * jcf-parse.c: Likewise.
13241 * jcf-path.c: Likewise.
13242 * jcf-reader.c: Likewise.
13243 * jcf-write.c: Likewise.
13244 * jcf.h: Likewise.
13245 * jv-scan.c: Likewise.
13246 * jvgenmain.c: Likewise.
13247 * jvspec.c: Likewise.
13248 * lang.c: Likewise.
13249 * lex.c: Likewise.
13250 * lex.h: Likewise.
13251 * parse-scan.y: Likewise.
13252 * parse.h: Likewise.
13253 * parse.y: Likewise.
13254 * typeck.c: Likewise.
13255 * verify.c: Likewise.
13256 * xref.c: Likewise.
13257 * xref.h: Likewise.
13258 * zextract.c: Likewise.
13259 * zipfile.h: Likewise.
13260
13261 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
13262
13263 * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13264 (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13265 * constants.c (build_constant_data_ref): Check for cached
13266 current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13267 in TYPE_CPOOL_DATE_REF.
13268 * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13269 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13270 (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13271 (LOCAL_FINAL): New macro.
13272 * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13273 constant pool -- don't try to reuse.
13274 (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13275 TYPE_LANG_SPECIFIC.
13276 (find_in_current_zip): Use TYPE_JCF.
13277 * parse.h (java_check_final): Prototype removed.
13278 * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13279 (maybe_create_class_interface_decl,
13280 check_class_interface_creation): Likewise.
13281 (java_expand_finals): Function removed.
13282 (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13283 (block_statement:): Fixed comment.
13284 (anonymous_class_creation:): Likewise.
13285 (check_class_interface_creation): Reversed Jan 12, 2000 extra
13286 argument patch.
13287 (check_class_interface_creation): Loosened error report on (inner)
13288 public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13289 (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13290 (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13291 argument patch.
13292 (create_interface): Likewise.
13293 (anonymous_class_counter): New static global.
13294 (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13295 patch. Fixed comments.
13296 (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13297 anonymous_class_counter when declaring a toplevel class.
13298 (craft_constructor): Fixed constructor name when handling
13299 anonymous classes. Anonymous class constructors to feature hidden
13300 this$<n> parameter.
13301 (java_fix_constructors): Added comment.
13302 (java_check_final): Function removed.
13303 (java_complete_expand_methods): Fixed comment. Don't generate
13304 class data, save its outgoing constant pool instead.
13305 (verify_constructor_super): Skip anonymous class constructor
13306 hidden this$<n> parameter.
13307 (java_expand_classes): New local `saved_ctxp'. Removed call to
13308 java_expand_finals and java_check_final. Expand anonymous class
13309 constructors. Generate class data.
13310 (build_super_invocation): Skip anonymous class hidden this$<n>
13311 parameter.
13312 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13313 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13314 (set_java_signature): Likewise.
13315
13316 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13317
13318 * gjavah.c: Delete ACC_VISIBILITY define.
13319 * jcf.h: Add ACC_VISIBILITY define.
13320 * parse.y: final: rule tagged <value>.
13321 (java_check_regular_methods): Use ACC_VISIBILITY define for
13322 default package access check.
13323 (local_variable_declaration_statement): Use final: rule.
13324
13325 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13326
13327 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13328 (final:): New rule.
13329
13330 2000-01-17 Tom Tromey <tromey@cygnus.com>
13331
13332 * gjavah.c (print_field_info): Allow non-static final fields.
13333
13334 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13335
13336 * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13337 * parse.y (patch_anonymous_class): New function.
13338 (create_anonymous_class): Register incomplete type when the
13339 class/interface to extends/implement isn't known yet.
13340 (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13341 (verify_constructor_super): Tuned error message.
13342
13343 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13344
13345 * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13346 (ANONYMOUS_CLASS_P): New macro.
13347 (TYPE_SIGNATURE, TYPE_JCF): New macros.
13348 (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13349 * parse.y (create_class): Added leading argument.
13350 (maybe_create_class_interface_decl,
13351 check_class_interface_creation): Likewise.
13352 (craft_constructor): New function.
13353 (verify_constructor_super): Added argument in prototype.
13354 (class_declaration:): Inserted leading argument.
13355 (for_begin:): Use FOR_LOOP_P.
13356 (anonymous_class_creation): Create WFL of the anonymous class to
13357 instantiate. Call build_new_invocation. Added comments.
13358 (check_class_interface_creation): Handle parameter `anonymous' in
13359 verbose mode class creation announce.
13360 (link_nested_class_to_enclosing): Exclude anonymous classes.
13361 (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13362 anonymous class, even though they appear to have an enclosing
13363 context.
13364 (create_interface): Pass extra argument to
13365 check_class_interface_creation.
13366 (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13367 (create_class): Call check_class_interface_creation and
13368 maybe_create_class_interface_decl with extra new argument. Don't
13369 add private this$<n> to anonymous classes.
13370 (method_declarator): Insert hidden this$<n> to anonymous class
13371 constructors.
13372 (java_fix_constructors): Deleted code creating default
13373 constructor. Call craft_constructor instead.
13374 (java_check_regular_methods): Set `saw_constructor' to 1 for
13375 anonymous classes.
13376 (fix_constructors): Pass extra argument to verify_constructor_super.
13377 (verify_constructor_super): New local `sdecl', use it. Search for
13378 matching constructor (possibly featuring arguments) in super
13379 class.
13380 (lookup_method_invoke): Craft constructor according to arguments
13381 list when dealing with anonymous class constructors.
13382 (build_super_invocation): Pass arguments to anonymous class super
13383 constructors.
13384 (search_loop): Use FOR_LOOP_P.
13385 (labeled_block_contains_loop_p): Likewise.
13386
13387 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13388
13389 * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13390 (enclosing_context_p): New function.
13391 (get_access_flags_from_decl): Handle CLASS_STATIC.
13392 (maybe_layout_super_class): Extra first argument passed to
13393 do_resolve_class.
13394 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13395 ID_INIT_P.
13396 * decl.c (access0_identifier_node): New global.
13397 (init_decl_processing): access0_identifier_node initialized.
13398 (pushdecl): Set DECL_CONTEXT only on non type decls.
13399 * expr.c (lookup_field): Lookup inner class fields in enclosing
13400 contexts.
13401 (expand_invoke): Use ID_INIT_P.
13402 (expand_java_field_op): Use DECL_CLINIT_P.
13403 * java-tree.def (CLASS_LITERAL): New tree code.
13404 * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13405 DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13406 (struct lang_decl): New field `inner_access'.
13407 (enclosing_context_p): Prototyped.
13408 (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13409 ID_CLINIT_P): New macros.
13410 (CLASS_STATIC): New macro.
13411 (CLASS_ACCESS0_GENERATED_P): New macro.
13412 (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13413 TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13414 INNER_CLASS_P): New macros.
13415 (DECL_INNER_CLASS_LIST): New macro.
13416 * jcf-parse.c (yyparse): Avoid the use of ANSI string
13417 concatenation.
13418 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13419 the shift value to int. Fixed typo in comment.
13420 * lex.c (inst_id, wpv_id): Initialize.
13421 * mangle.c (unicode_mangling_length): Take `$' into account.
13422 * parse.h (DRECOVER, RECOVER): Terminate properly.
13423 (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13424 (typedef struct _jdep): New field `enclosing'.
13425 (JDEP_ENCLOSING): New macro.
13426 (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13427 (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13428 (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13429 GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13430 GET_ENCLOSING_CPC_CONTEXT): New macros.
13431 (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13432 (do_resolve_class): Added extra argument in prototype.
13433 * parse.y (resolve_class): Added extra argument in prototype.
13434 (maybe_create_class_interface_decl): Likewise.
13435 (maybe_use_access_method, build_wfl_wrap): New functions.
13436 (java_complete_expand_classes, java_complete_expand_class):
13437 Likewise.
13438 (java_parser_context_push_initialized_field,
13439 java_parser_context_suspend, java_parser_context_resume):
13440 Likewise.
13441 (maybe_make_nested_class_name, make_nested_class_name,
13442 set_nested_class_simple_name_value,
13443 link_nested_class_to_enclosing, find_as_inner_class,
13444 find_as_inner_class_do, check_inner_class_redefinition,
13445 build_thisn_assign, build_current_thisn, build_access_to_thisn,
13446 maybe_build_thisn_access_method, build_outer_field_access,
13447 build_outer_field_access_methods, build_outer_field_access_expr,
13448 build_outer_method_access_method, build_new_access_id,
13449 build_outer_field_access_method, outer_field_access_p,
13450 outer_field_expanded_access_p, outer_field_access_fix,
13451 build_incomplete_class_ref, patch_incomplete_class_ref,
13452 create_anonymous_class): Likewise.
13453 (inst_id, wpv_id): New static global variables.
13454 (synchronized:): New rule, tagged <node>.
13455 (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13456 rules.
13457 (anonymous_class_creation:): New rule, tagged <node>.
13458 (NEW_TK): Tagged <node>.
13459 (type_literals, array_type_literal): New rules, tagged <node>.
13460 (class_declaration:): Removed action when reducing by class_body:
13461 (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13462 using GET_CPC in sub-rules.
13463 (class_member_declaration): Handle inner classes.
13464 (method_declaration): When reducing method_header:, reset
13465 current_function_decl when appropriate.
13466 (method_declarator:): Set the number of formal parameter to 0 for
13467 method declared without arguments.
13468 (constructor_declarator:): Likewise.
13469 (static_initializer:): List of elements kept in a list.
13470 (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13471 use of the keyword `static' for type declarations.
13472 (block_statement:): Handle inner class declarations.
13473 (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13474 type qualified `this'.
13475 (class_instance_creation_expression): Use anonymous_class_creation:
13476 to handle inner class instances creation. Handle qualified `new'.
13477 (something_dot_new): Added appropriate actions.
13478 (create_new_parser_context): New function.
13479 (java_push_parser_context, java_parser_context_save_global,
13480 java_parser_context_suspend): Use create_new_parser_context.
13481 (check_modifiers): Changed leading comment.
13482 (check_class_interface_creation): Handle interclasses.
13483 (add_superinterfaces): Fixed comment.
13484 (create_interface): Build qualified name from the raw_name instead
13485 of its matching WFL. Push the initialized fields list. raw_name added
13486 as an extra argument to maybe_create_class_interface_decl.
13487 (create_class): Build qualified name from the raw_name instead of
13488 its matching WFL. Removed assignment to current_parsed_class_un.
13489 Call PUSH_ERROR before returning an error. Suspend the current
13490 parser context when processing an inner class. Push the
13491 initialized fields list. raw_name added as an extra argument to
13492 maybe_create_class_interface_decl. Add the private this$<n>
13493 field.
13494 (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13495 (register_fields): Get the class type from GET_CPC and handle
13496 previous errors. Added code to handle the creation of static
13497 fields in inner classes. Initialized fields initialization
13498 statements kept in a list of lists.
13499 (maybe_generate_finit): Initialized fields initialization
13500 statements kept in a list of lists. Use GET_CPC.
13501 (maybe_generate_clinit): Likewise.
13502 (method_header): Use GET_CPC and GET_CPC_UN.
13503 (parser_qualified_classname): Handle inner classes.
13504 (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13505 (java_fix_constructors): Hide pointer to enclosing context
13506 instance in constructor list when dealing with inner classes.
13507 (jdep_resolve_class): Call resolve_class with extra first argument
13508 JDEP_ENCLOSING.
13509 (resolve_class): Add enclosing context as a first extra argument
13510 to do_resolve_class.
13511 (do_resolve_class): Call find_as_inner_class. Handle WFLs
13512 properly.
13513 (resolve_no_layout): Extra argument added to resolve_class
13514 invocation.
13515 (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13516 (java_get_real_method_name): Use GET_CPC_UN.
13517 (check_abstract_method_definitions): Use DECL_CLINIT_P.
13518 (java_check_abstract_methods): Handle static method declared in
13519 inner classes by an error.
13520 (java_check_regular_methods): Use DECL_CLINIT_P.
13521 (source_start_java_method): Also set DECL_MAX_LOCALS.
13522 (create_artificial_method): Call java_parser_context_save_global
13523 and java_parser_context_restore_global instead of saving/restoring
13524 the context by hand.
13525 (expand_start_java_method): Improved verbose mode message.
13526 (java_complete_expand_methods): Fixed leading comment. Use
13527 DECL_CLINIT_P.
13528 (fix_constructors): Added assignment to this$<n> if necessary.
13529 (java_expand_classes): Call java_complete_expand_classes instead
13530 of java_complete_expand_methods.
13531 (make_qualified_primary): Simplified.
13532 (merge_qualified_name): Optimized for missing left or right parts.
13533 (resolve_expression_name): Handle access to outer class fields from
13534 interclasses.
13535 (resolve_qualified_expression_name): New macro
13536 RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13537 classes. Report error on non appropriate qualification of
13538 `new'. Handle qualified `this'.
13539 (not_accessible_p): Allow access to outer class private fields from
13540 inner classes.
13541 (patch_method_invocation): Handle method invocations through
13542 access methods and inner class constructor invocations.
13543 (find_applicable_accessible_methods_list): Search enclosing
13544 contexts of an inner class.
13545 (search_applicable_methods_list): Fixed typo.
13546 (argument_types_convertible): Handle inner class constructors'
13547 hidden outer context reference argument.
13548 (qualify_ambiguous_name): Handle qualified `this'.
13549 (java_complete_lhs): Handle use of field accessed through
13550 artificial access methods in various cases of assignments. Handle
13551 CLASS_LITERAL node.
13552 (check_final_assignment): Use DECL_CLINIT_P.
13553 (valid_ref_assignconv_cast_p): Handle the destination being an
13554 enclosing context of the source.
13555 (patch_unaryop): Handle use of field accessed through artificial
13556 access methods.
13557 (patch_return): Use DECL_CLINIT_P.
13558 (patch_throw_statement): Use DECL_CLINIT_P.
13559 (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13560 * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13561 ID_INIT_P.
13562
13563 2000-01-16 Anthony Green <green@cygnus.com>
13564
13565 * parse.y (build_string_concatenation): Only use
13566 StringBuffer(String) shortcut if String arg is constant.
13567
13568 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13569
13570 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13571 the shift value to int. Fixed typo in comment.
13572
13573 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
13574
13575 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13576 * jcf-write.c: Likewise.
13577 * parse.y: Likewise.
13578 * parse.c: Regenerate.
13579
13580 2000-01-09 Anthony Green <green@cygnus.com>
13581
13582 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13583 bytecodes in the correct order.
13584
13585 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13586
13587 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13588
13589 2000-01-06 Anthony Green <green@cygnus.com>
13590
13591 * expr.c (java_lang_expand_expr): Switch to permanent obstack
13592 before building constant array decl.
13593
13594 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
13595
13596 * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13597 method invocation and typo in conditional expression.
13598 (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13599 the appropriate NOTE_POP.
13600 * parse.y (patch_binop): Shift value mask to feature the right
13601 type.
13602
13603 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13604
13605 * class.c (assume_compiled, assume_compiled_node): Add static
13606 prototype.
13607 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13608
13609 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13610
13611 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13612
13613 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13614 to `__modifier' to avoid stringifying it.
13615
13616 * parse.y (verify_constructor_circularity): Don't call a variadic
13617 function with a non-literal format string.
13618 (java_check_abstract_methods): Move unreachable code inside
13619 `continue' statement.
13620 (lookup_method_invoke): Call xstrdup, not strdup.
13621
13622 * expr.c (expand_java_field_op): Avoid the use of ANSI string
13623 concatenation.
13624
13625 * jcf-parse.c (yyparse): Likewise.
13626
13627 * jv-scan.c (main): Likewise.
13628
13629 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13630
13631 * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13632 ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13633 ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13634 concatenation.
13635
13636 * parse.y (synchronized, variable_redefinition_error,
13637 check_class_interface_creation, create_interface, create_class,
13638 method_header, finish_method_declaration,
13639 check_modifiers_consistency, method_declarator,
13640 complete_class_report_errors, check_abstract_method_definitions,
13641 java_check_regular_methods, check_throws_clauses,
13642 java_check_abstract_methods, read_import_dir,
13643 check_pkg_class_access, declare_local_variables, fix_constructors,
13644 cut_identifier_in_qualified, resolve_expression_name,
13645 resolve_qualified_expression_name, patch_method_invocation,
13646 java_complete_lhs, patch_assignment, try_builtin_assignconv,
13647 patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13648 patch_exit_expr, patch_exit_expr, patch_switch_statement,
13649 patch_try_statement, patch_synchronized_statement,
13650 patch_throw_statement, check_thrown_exceptions,
13651 patch_conditional_expr): Likewise.
13652
13653 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13654
13655 * Makefile.in (LIBDEPS): Added gcc's errors.o
13656 (../jcf-dump$(exeext):): Link with gcc's errors.o
13657 (../gcjh$(exeext):): Likewise.
13658 * expr.c (expand_java_NEW): Layout the entire target type instead of
13659 laying out its methods only.
13660 (lookup_field): Layout the class after having loaded it.
13661 * java-tree.h (java_debug_context): Declared.
13662 * jcf-io.c (toplev.h): Included.
13663 (find_class): Removed assignment to jcf's outofsynch
13664 field. Force source file to be read if newer than its matching
13665 class file. Tweaked debug messages.
13666 * jcf-parse.c (jcf_out_of_synch): Deleted.
13667 (read_class): Call to jcf_out_of_synch removed.
13668 * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13669 (jcf_out_of_synch): Prototype deleted.
13670 * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13671 `deprecated' and `class_err': integer turned into bit-fields.
13672 New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13673 * parse.y (package_list): New global.
13674 (package_declaration:): Record newly parsed package name.
13675 (extra_ctxp_pushed_p): Static global deleted.
13676 (java_parser_context_save_global): Create buffer context for the
13677 purpose of saving globals, if necessary.
13678 (java_parser_context_restore_global): Pop context pushed for the
13679 purpose of saving globals, if necessary.
13680 (java_debug_context_do): New prototype and function.
13681 (java_debug_context): Likewise.
13682 (do_resolve_class): Use already parsed package names to qualify
13683 and lookup class candidate.
13684 (java_pre_expand_clinit): Removed unnecessary local variable.
13685
13686 1999-12-17 Tom Tromey <tromey@cygnus.com>
13687
13688 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
13689 fixes PR gcj/119.
13690 (process_file): Use `\n\' at end of each line in string.
13691
13692 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
13693
13694 * expr.c (expand_invoke): Layout the loaded class before
13695 attempting to use it.
13696 (expand_java_field_op): Allow final field assignments to take
13697 place in $finit$.
13698 * typeck.c (convert): Return error_mark_node if expr is null.
13699
13700 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13701
13702 * class.c (class_depth): Return -1 if the class doesn't load
13703 properly.
13704 * expr.c (can_widen_reference_to): Check for errors during depth
13705 computation and return 0 accordingly.
13706 * jcf-parse.c (parse_source_file): Call java_fix_constructors to
13707 create default constructors and add an other error check.
13708 * parse.h (java_fix_constructors): Prototyped.
13709 * parse.y (java_pre_expand_clinit): Likewise.
13710 (build_super_invocation): Re-prototyped to feature one argument.
13711 (java_check_circular_reference): Directly use `current'.
13712 (java_fix_constructors): New function.
13713 (java_check_regular_methods): Don't create default constructors
13714 here, but abort if none were found.
13715 (java_complete_expand_methods): Pre-process <clinit> calling
13716 java_pre_expand_clinit.
13717 (java_pre_expand_clinit): New function.
13718 (fix_constructors): build_super_invocation invoked with the
13719 current method declaration as an argument.
13720 (build_super_invocation): Use the context of the processed method
13721 decl argument instead of current_class.
13722 * typeck.c (lookup_java_method): Take WFLs in method names into
13723 account.
13724
13725 1999-12-14 Per Bothner <per@bothner.com>
13726
13727 * class.c (make_class_data): flag_keep_inline_functions to keep
13728 private methods in the method array.
13729
13730 1999-12-15 Anthony Green <green@cygnus.com>
13731
13732 * check-init.c (check_init): Take into account both types of
13733 `throw's when checking for uninitialized variables.
13734
13735 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13736
13737 * parse.y (java_complete_lhs): Force conversion of array
13738 dimensions to int_type_node, that's what runtime's ABI expects.
13739
13740 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13741
13742 * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
13743 operand of a WFL, until the Java front-end gets fixed with regard
13744 to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
13745
13746 1999-12-10 Andrew Haley <aph@cygnus.com>
13747
13748 * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
13749 decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
13750 expr.c (build_java_athrow): Add support for sjlj-exceptions.
13751 java-tree.h: Ditto.
13752 jcf-write.c: Ditto.
13753
13754 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
13755
13756 * expr.c (java_lang_expand_expr): Switch to permanent obstack
13757 before calling expand_eh_region_start and expand_start_all_catch.
13758 * except.c (expand_start_java_handler): Switch to permanent
13759 obstack before calling expand_eh_region_start.
13760 (expand_end_java_handler): Switch to permanent obstack before
13761 calling expand_start_all_catch.
13762
13763 1999-12-5 Anthony Green <green@cygnus.com>
13764
13765 * decl.c (init_decl_processing): Mark throw_node as a noreturn
13766 function with side effects.
13767 (init_decl_processing): Mark all memory allocating DECLs with
13768 DECL_IS_MALLOC.
13769
13770 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13771
13772 * except.c (expand_end_java_handler): Call
13773 expand_resume_after_catch and end_catch_handler.
13774
13775 1999-11-30 Anthony Green <green@cygnus.com>
13776
13777 * verify.c (verify_jvm_instructions): Create new return label
13778 chain if non existent (don't rely on the verified state of the jsr
13779 target.)
13780
13781 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13782
13783 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13784 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13785
13786 * parse.y (patch_assignment): Removed bogus final class test on
13787 lhs when checking on whether to emit an ArrayStoreException runtime
13788 check.
13789 * expr.c (expand_java_arraystore): Likewise.
13790
13791 1999-11-28 Anthony Green <green@cygnus.com>
13792
13793 * decl.c (find_local_variable): Reuse single slot decls when
13794 appropriate.
13795
13796 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
13797
13798 * jcf-parse.c (saw_java_source): Global variable removed.
13799 (read_class): Don't use `saw_java_source'. Added extra braces.
13800 (yyparse): Code setting `saw_java_source' removed.
13801
13802 1999-11-24 Mark Mitchell <mark@codesourcery.com>
13803
13804 * except.c (emit_handlers): Zero catch_clauses after emitting them.
13805
13806 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13807
13808 * verify.c (merge_type_state): Non verified subroutines being
13809 considered more than once to trigger passive type merge.
13810
13811 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13812
13813 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13814 in case of error. Error message tuned.
13815
13816 1999-11-21 Anthony Green <green@cygnus.com>
13817
13818 * constants.c (find_methodref_index): Unwrap method names before
13819 inserting them in the constant pool.
13820
13821 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
13822
13823 * class.c (assume_compiled_node): New typedef.
13824 (assume_compiled_tree): New static data.
13825 (find_assume_compiled_node): New function.
13826 (add_assume_compiled): New function.
13827 (assume_compiled): New function.
13828 * class.c (make_class_data): Use assume_compiled.
13829 (is_compiled_class): Use assume_compiled.
13830
13831 * java-tree.h (add_assume_compiled): Declare.
13832
13833 * lang.c (lang_decode_option): Parse new options.
13834
13835 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13836
13837 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13838 int_type_node: that's what `_Jv_AllocObject' expects.
13839
13840 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13841
13842 * parse.y (lookup_method_invoke): Use lang_printable_name to
13843 reliably build the type name during error report. Fixes PR gcj/97.
13844
13845 1999-11-09 Tom Tromey <tromey@cygnus.com>
13846
13847 * jcf-path.c: Include <sys/stat.h>.
13848 (jcf_path_init): Search for libjava.zip. Fixes PR gcj/84.
13849 (DIR_UP): New macro.
13850
13851 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
13852
13853 * parse.y (source_end_java_method): Resume permanent allocation,
13854 reversing Apr 27 1998 patch.
13855 (patch_string_cst): Pop obstacks after having pushed the permanent
13856 ones.
13857
13858 1999-11-05 Tom Tromey <tromey@cygnus.com>
13859
13860 * class.c (finish_class): Emit inlined methods if any native
13861 methods exist in the class. Fixes PR gcj/85.
13862
13863 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
13864
13865 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13866 (qualify_ambiguous_name): Likewise.
13867
13868 1999-11-03 Godmar Back <gback@cs.utah.edu>
13869
13870 * typeck.c: (lookup_java_method): search all inherited
13871 interfaces when looking up interface method.
13872
13873 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13874
13875 * parse.y (method_header:): Issue error message for rule `type
13876 error'.
13877 (synchronized:): Error report when not using synchronized.
13878
13879 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13880
13881 * parse.y (resolve_qualified_expression_name): Prevent `this' from
13882 being used before the superclass constructor has been called.
13883 (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
13884 instead of `CALL_THIS_CONSTRUCTOR_P'.
13885
13886 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
13887
13888 * check-init.c: Fix typo in comment.
13889
13890 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13891
13892 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
13893 and final method.
13894
13895 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13896
13897 * parse.y (expression_statement:): Call function to report
13898 improper invocation of a constructor.
13899 (parse_ctor_invocation_error): New function.
13900
13901 1999-10-26 Mark Mitchell <mark@codesourcery.com>
13902
13903 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
13904 remember_end_note.
13905
13906 1999-10-21 Tom Tromey <tromey@cygnus.com>
13907
13908 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
13909 in generated `main'.
13910
13911 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13912
13913 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
13914 (qualify_ambiguous_name): Likewise.
13915
13916 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13917
13918 * parse.y (java_complete_tree): fold_constant_for_init to work on
13919 permanent_obstack.
13920 (java_complete_lhs): Likewise.
13921 (array_constructor_check_entry): Complete an initializer element
13922 on permanent_obstack.
13923
13924 1999-10-19 Tom Tromey <tromey@cygnus.com>
13925
13926 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
13927 From Mike Moreton <mike@pillim.demon.co.uk>.
13928
13929 1999-10-15 Greg McGary <gkm@gnu.org>
13930
13931 * java-tree.h (flag_bounds_check): Remove extern decl.
13932 * lang.c (flag_bounds_check): Remove global variable.
13933 (lang_f_options): Remove "bounds-check" entry.
13934 (lang_init_options): Default flag_bounds_check to "on".
13935
13936 1999-10-14 Tom Tromey <tromey@cygnus.com>
13937
13938 * jvgenmain.c (usage): New function.
13939 (main): Use it. Also, handle `-D' options.
13940 * jvspec.c (lang_specific_driver): Recognize -D.
13941 (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
13942
13943 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13944
13945 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13946
13947 * jcf-dump.c (print_constant, disassemble_method): Don't call a
13948 variadic function with a non-literal format string.
13949
13950 * parse-scan.y (report_main_declaration): Likewise.
13951
13952 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13953
13954 * parse.y (read_import_dir, patch_assignment, patch_binop,
13955 patch_array_ref): Likewise.
13956
13957 * typeck.c (build_java_array_type): Likewise.
13958
13959 * verify.c (verify_jvm_instructions): Likewise.
13960
13961 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13962
13963 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13964
13965 1999-10-07 Anthony Green <green@cygnus.com>
13966
13967 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13968 where CHECK_PUT may fail for valid reasons.
13969
13970 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13971 UNSAFE_PUTN): New macros.
13972
13973 1999-10-04 Tom Tromey <tromey@cygnus.com>
13974
13975 * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
13976 well. Fixes Java PR gcj/59.
13977 * parse-scan.y (yyerror): Report errors.
13978
13979 1999-09-24 Glenn Chambers <GChambers@provsol.com>
13980
13981 * decl.c (insert_block): Remove unconditional `abort'.
13982
13983 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
13984
13985 * decl.c (builtin_function): No longer static. New arg CLASS. Arg
13986 FUNCTION_CODE now of type int. All callers changed.
13987 Set the builtin's DECL_BUILT_IN_CLASS.
13988
13989 1999-09-23 Tom Tromey <tromey@cygnus.com>
13990
13991 * jvspec.c (lang_specific_driver): Don't read spec file if
13992 -fsyntax-only given.
13993
13994 1999-09-22 Tom Tromey <tromey@cygnus.com>
13995
13996 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13997
13998 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13999 (WORDS_TO_LONG): Likewise.
14000 (WORDS_TO_DOUBLE): Likewise.
14001
14002 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14003
14004 * jcf-write.c (RELOCATION_VALUE_0): New macro.
14005 (RELOCATION_VALUE_1): Likewise.
14006 (emit_iinc, emit_reloc, push_constant1, push_constant2,
14007 push_in_const, push_long_const): Prototyped.
14008 (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14009 (push_constant2): Likewise.
14010 (push_int_const): Cast find_constant1's integer arguments to `jword'.
14011 (find_constant_wide): Cast find_constant2's integer arguments to
14012 `jword'.
14013 (find_constant_index): Cast find_constant2's and find_constant2's
14014 integer arguments to `jword'.
14015 (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14016 (emit_switch_reloc): Use RELOCATION_VALUE_0.
14017 (emit_if): Use RELOCATION_VALUE_1.
14018 (emit_goto): Likewise.
14019 (emit_jsr): Likewise.
14020 (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14021 argument to push_long_const to HOST_WIDE_INT.
14022
14023 1999-09-15 Andreas Schwab <schwab@suse.de>
14024
14025 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14026
14027 1999-09-20 Nick Clifton <nickc@cygnus.com>
14028
14029 * lang.c (lang_decode_option): Extend comment.
14030
14031 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14032
14033 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14034 instead of fndecl.
14035
14036 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14037
14038 * gjavah.c (get_field_name, print_method_info, print_include,
14039 add_namelet): Use xmalloc, not malloc.
14040
14041 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
14042 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14043 NULL pointer.
14044
14045 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14046
14047 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14048
14049 * jcf-path.c (add_entry): Likewise.
14050
14051 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14052
14053 * jv-scan.c (xmalloc): Remove definition.
14054
14055 * jvgenmain.c (xmalloc): Likewise.
14056
14057 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14058
14059 * lex.c (java_store_unicode): Use xrealloc, not realloc.
14060
14061 * parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
14062 concat, not xmalloc/sprintf.
14063 (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14064 (xstrdup): Remove definition.
14065
14066 * parse.y (duplicate_declaration_error_p,
14067 constructor_circularity_msg, verify_constructor_circularity,
14068 check_abstract_method_definitions, java_check_regular_methods,
14069 java_check_abstract_methods, patch_method_invocation,
14070 check_for_static_method_reference, patch_assignment, patch_binop,
14071 patch_cast, array_constructor_check_entry, patch_return,
14072 patch_conditional_expr): Use xstrdup, not strdup.
14073
14074 * zextract.c (ALLOC): Use xmalloc, not malloc.
14075
14076 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14077
14078 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14079
14080 * jvspec.c: Include gcc.h. Don't include gansidecl.h.
14081 (do_spec, lang_specific_pre_link, lang_specific_driver,
14082 input_filename, input_filename_length): Don't declare.
14083 (main_class_name, jvgenmain_spec, lang_specific_driver):
14084 Constify a char*.
14085 (lang_specific_driver): All calls to the function pointer
14086 parameter now explicitly call `fatal'.
14087
14088 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14089
14090 * parse.y (find_applicable_accessible_methods_list): Search
14091 abstract classes as interfaces.
14092
14093 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14094
14095 * class.c (finish_class): We're now outside a valid method
14096 declaration. Tell the rest of gcc so.
14097
14098 1999-09-08 Bruce Korb autogen@linuxbox.com
14099
14100 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14101
14102 1999-09-07 Tom Tromey <tromey@cygnus.com>
14103
14104 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14105 java-array.h.
14106 (decode_signature_piece): Don't emit "::" in JArray<>.
14107 (print_namelet): Only print trailing `;' when printing a class.
14108
14109 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
14110
14111 * java-tree.h: Delete declarations for all tree nodes now moved to
14112 global_trees.
14113 * decl.c: Delete their definitions.
14114
14115 1999-09-04 Mark Mitchell <mark@codesourcery.com>
14116
14117 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14118 * Makefile.in (OBJS): Add ggc-callbacks.o.
14119 (OBJDEPS): Likewise.
14120
14121 1999-09-03 Tom Tromey <tromey@cygnus.com>
14122
14123 * parse.y (strip_out_static_field_access_decl): Return operand if
14124 it satisfies JDECL_P.
14125
14126 1999-09-02 Tom Tromey <tromey@cygnus.com>
14127
14128 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14129 Handle nested arrays, like `[[I'.
14130
14131 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14132
14133 * class.c (finish_class): Remove unused parameter, all callers
14134 changed.
14135
14136 * expr.c (build_java_athrow): Change return type to void.
14137 (java_lang_expand_expr): Make sure each case in switch returns a
14138 value.
14139
14140 * java-tree.h (finish_class): Fix prototype to take void args.
14141
14142 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14143 (main): Issue return from main, not exit.
14144
14145 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14146
14147 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14148
14149 * jv-scan.c (main): Issue return from main, not exit.
14150
14151 * parse.y (check_abstract_method_definitions,
14152 java_check_abstract_method_definitions): Add static prototypes.
14153 (java_complete_expand_methods): Fix call to `finish_class'.
14154
14155 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14156 and `prevpc'.
14157
14158 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14159
14160 * lang.c (language_string): Constify.
14161
14162 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14163
14164 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14165 Remove hacks for stuff which comes from libiberty.
14166
14167 * Make-lang.in: Likewise.
14168
14169 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
14170
14171 * Makefile.in (xref.o): Depend on xref.c explicitly.
14172
14173 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14174
14175 * java-tree.h (lang_printable_name): Constify a char*.
14176
14177 * lang.c (lang_printable_name): Likewise.
14178
14179 1999-08-27 Jeffrey A Law (law@cygnus.com)
14180
14181 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14182 comments in C code.
14183
14184 1999-08-26 Tom Tromey <tromey@cygnus.com>
14185
14186 * gjavah.c (print_cxx_classname): Print "::" before qualified
14187 name.
14188
14189 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14190
14191 * parse.y (lookup_cl): Changed leading comment. Now does its best
14192 to set the column number.
14193 (qualify_ambiguous_name): Take WFL wrappers into account.
14194
14195 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
14196
14197 * verify.c (verify_jvm_instructions): Don't check instruction
14198 validity beyond end of method.
14199
14200 1999-08-25 Tom Tromey <tromey@cygnus.com>
14201
14202 * jvspec.c (lang_specific_driver): Correctly handle --help again.
14203
14204 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14205
14206 * gjavah.c (print_name, print_base_classname, utf8_cmp,
14207 cxx_keyword_subst, generate_access, name_is_method_p,
14208 get_field_name, print_field_name, super_class_name, print_include,
14209 decode_signature_piece, print_class_decls, usage, help,
14210 java_no_argument, version, add_namelet, print_namelet): Add static
14211 prototype.
14212 (print_base_classname, utf8_cmp, cxx_keyword_subst,
14213 name_is_method_p): Constify a char*.
14214 (get_field_name): Likewise. Prefer xstrdup over malloc/strcpy.
14215 Provide a final else clause in an if-else-if.
14216 (print_field_info): Add missing final arg in function call to
14217 `print_field_name'.
14218 (print_method_info, decompile_method, decode_signature_piece,
14219 print_c_decl, print_full_cxx_name, print_stub,
14220 print_mangled_classname, super_class_name, print_include,
14221 add_namelet, add_class_decl, print_class_decls, process_file,
14222 help): Constify a char*.
14223
14224 * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14225 push_int_const, find_constant_wide, find_constant_index,
14226 push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14227 emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14228 emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14229 emit_if, emit_goto, emit_jsr, call_cleanups,
14230 make_class_file_name): Add static prototypes.
14231 (generate_bytecode_return, generate_bytecode_insns): Pass a
14232 NULL_PTR, not a NULL_TREE.
14233
14234 * jv-scan.c: Include "jcf.h".
14235 (main): Declare using DEFUN macro.
14236
14237 * jvspec.c (find_spec_file, lang_specific_pre_link,
14238 lang_specific_driver): Add prototypes.
14239 (find_spec_file): Constify a char*.
14240
14241 * keyword.gperf (hash, java_keyword): Add prototypes.
14242
14243 * lang.c (lang_print_error): Add static prototype.
14244 (lang_init): Prefer memcpy over bcopy to avoid casts.
14245
14246 * lex.c (yylex): Add static prototype.
14247
14248 * parse-scan.y: Include "lex.c" earlier.
14249
14250 * parse.h: Remove redundant declaration for `yylex'.
14251
14252 * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14253 labeled_block_contains_loop_p): Add static prototypes.
14254 (not_accessible_p): Make static to match prototype.
14255
14256 * verify.c (start_pc_cmp): Don't needlessly cast away const.
14257
14258 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14259
14260 * parse.y (check_method_redefinition): Changed leading comment.
14261 (check_abstract_method_definitions): New function.
14262 (java_check_abstract_method_definitions): New function.
14263 (java_check_regular_methods): Call it.
14264 (verify_constructor_super): Fixed indentation.
14265 (lookup_method_invoke): Likewise.
14266
14267 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
14268
14269 * parse.y (method_header): Return a null pointer if the current
14270 class node is null.
14271 (finish_method_declaration): Return if the current function decl
14272 is null.
14273 (source_start_java_method): Likewise.
14274 (java_method_add_stmt): Likewise.
14275
14276 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14277
14278 * class.c (emit_register_class): Removed unnecessary call to
14279 start_sequence.
14280 * parse.y (labeled_block_contains_loop_p): Removed unused local
14281 variable.
14282
14283 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14284
14285 * parse.y (java_refold): Added prototype.
14286
14287 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14288
14289 * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14290 (java_stabilize_reference): Removed unnecessary `else'.
14291 (java_complete_lhs): Set flag to remember boolean. Call
14292 java_refold. Added comments.
14293 (java_decl_equiv): New function.
14294 (binop_compound_p): Likewise.
14295 (java_refold): Likewise.
14296 (patch_unaryop): Striped static field access assigned to decl and
14297 op. Changed promotion scheme for ++/-- operators.
14298 (search_loop): New function.
14299 (labeled_block_contains_loop_p): Likewise.
14300 (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14301 comment.
14302 (patch_bc_statement): Call search_loop. Fixed comment.
14303
14304 1999-08-14 Anthony Green <green@cygnus.com>
14305
14306 * expr.c (java_lang_expand_expr): Mark static array data as
14307 referenced.
14308
14309 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
14310
14311 * jvgenmain.c (main): NUL-terminate name_obstack.
14312
14313 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14314
14315 * check-init.c (check_bool2_init, done_alternative): Add static
14316 prototypes.
14317
14318 * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14319 (add_method, build_utf8_ref, build_class_ref,
14320 append_gpp_mangled_type, layout_class_method): Constify a char*.
14321
14322 * decl.c (push_promoted_type, make_binding_level): Add static
14323 prototypes.
14324 (push_promoted_type, pushdecl): Constify a char*.
14325
14326 * except.c (find_handler_in_range, link_handler,
14327 check_start_handlers): Add static prototypes.
14328
14329 * expr.c (process_jvm_instruction): Constify a char*.
14330
14331 * gjavah.c (main): Constify a char*.
14332
14333 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14334 Constify a char*.
14335
14336 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14337 static prototypes.
14338 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14339 munge, print_ents): Constify a char*.
14340
14341 * jcf-dump.c (disassemble_method): Constify a char*.
14342 (print_constant_pool, print_exception_table): Add static prototypes.
14343 (print_constant, print_exception_table, main, disassemble_method):
14344 Constify a char*.
14345
14346 * jcf-io.c (find_classfile, find_class): Likewise.
14347
14348 * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14349 (set_source_filename, predefined_filename_p): Add static prototypes.
14350 (set_source_filename, get_constant, get_class_constant,
14351 find_in_current_zip): Constify a char*.
14352
14353 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14354 static prototypes.
14355 (add_entry, add_path, jcf_path_classpath_arg,
14356 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14357
14358 * jcf-reader.c (get_attribute, jcf_parse_preamble,
14359 jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14360 jcf_parse_one_method, jcf_parse_methods,
14361 jcf_parse_final_attributes): Add static prototypes.
14362 (get_attribute): Constify a char*.
14363
14364 * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14365 jcf_dependency_add_target, jcf_path_classpath_arg,
14366 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14367
14368 * jv-scan.c (main): Constify a char*.
14369 (gcc_obstack_init): Add prototype arguments.
14370
14371 * jvgenmain.c (gcc_obstack_init): Likewise.
14372 (main): Constify a char*.
14373
14374 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14375 static prototypes.
14376 (put_decl_string, lang_print_error): Constify a char*.
14377 (lang_init): Remove redundant extern prototype.
14378
14379 * mangle.c (emit_unicode_mangled_name): Constify a char*.
14380
14381 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14382 Add static prototypes.
14383 (get_type_from_signature): Constify a char*.
14384
14385 * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14386 Add static prototypes.
14387 (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14388 (verify_jvm_instructions): Constify a char*.
14389
14390 * xref.c (xref_flag_value): Likewise.
14391
14392 * xref.h (xref_flag_value): Likewise.
14393
14394 * zextract.c (makeword, makelong): Add static prototypes.
14395 (makeword, makelong): Constify a uch*.
14396
14397 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14398
14399 * lang.c (java_dummy_print): Constify a char*.
14400 (lang_print_error): Likewise.
14401 (lang_init): Remove redundant prototype for `print_error_function'.
14402 (lang_init_source): Likewise.
14403 (lang_identify): Constify a char*.
14404
14405 1999-08-09 Tom Tromey <tromey@cygnus.com>
14406
14407 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14408 (WORDS_TO_LONG): Likewise.
14409 (WORDS_TO_DOUBLE): Likewise.
14410
14411 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14412
14413 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14414
14415 * expr.c (java_stack_pop, java_array_data_offset,
14416 build_java_throw_out_of_bounds_exception, case_identity,
14417 build_java_check_indexed_type): Add static prototypes.
14418 (linenumber_table, expand_invoke, expand_java_field_op,
14419 build_primtype_type_ref, expand_byte_code): Constify a char*.
14420
14421 * java-tree.h (build_primtype_type_ref, linenumber_table):
14422 Constify a char*.
14423 (java_lang_expand_expr): Add prototype.
14424
14425 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
14426 `java_lang_expand_expr'.
14427
14428 * lex.c (java_lex_error): Constify a char*.
14429 (java_get_unicode, java_read_char, java_allocate_new_line,
14430 java_unget_unicode, java_sneak_unicode): Prototype.
14431
14432 * parse-scan.y (current_class, package_name, method_declarator,
14433 report_class_declaration, yyerror): Constify a char*.
14434
14435 * parse.h (java_report_errors): Prototype.
14436 (yyerror): Constify a char*.
14437
14438 * parse.y (classitf_redefinition_error, check_modifiers,
14439 parse_jdk1_1_error, lookup_package_type,
14440 lookup_package_type_and_set_next, get_printable_method_name,
14441 purify_type_name): Constify a char*.
14442 (build_super_invocation, maybe_generate_finit,
14443 verify_constructor_super, parser_add_interface,
14444 add_superinterfaces, jdep_resolve_class, note_possible_classname,
14445 java_complete_expand_methods, java_expand_finals,
14446 cut_identifier_in_qualified, java_stabilize_reference,
14447 do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14448 merge_string_cste): Prototype.
14449 (single_type_import_declaration, yyerror,
14450 variable_redefinition_error, build_array_from_name,
14451 build_unresolved_array_type, check_class_interface_creation,
14452 resolve_class, complete_class_report_errors,
14453 note_possible_classname, read_import_dir,
14454 find_in_imports_on_demand, resolve_package, fix_constructors,
14455 check_deprecation, lookup_method_invoke,
14456 maybe_build_primttype_type_ref, array_constructor_check_entry):
14457 Constify a char*.
14458 (java_complete_expand_methods, java_expand_finals): Make static.
14459 (convert_narrow): Remove static prototype.
14460
14461 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
14462
14463 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14464
14465 1999-08-02 Richard Henderson <rth@cygnus.com>
14466
14467 * decl.c: Include defaults.h instead of expr.h.
14468 * parse.y: Likewise.
14469
14470 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
14471
14472 * java/decl.c (start_java_method): Change all uses of
14473 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14474 Ensure expr.h is included.
14475 * java/expr.c (pop_arguments): Ditto.
14476 * java/parse.y (expand_start_java_method): Ditto.
14477
14478 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14479
14480 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14481
14482 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
14483
14484 * decl.c: Include "function.h".
14485 * except.c: Likewise.
14486 * parse.y: Likewise.
14487 * Makefile.in: Update dependencies.
14488
14489 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14490
14491 * expr.c (build_java_soft_divmod): Provide a default case in switch.
14492 (java_lang_expand_expr): Mark parameters `target', `tmode' and
14493 `modifier' with ATTRIBUTE_UNUSED.
14494
14495 * gjavah.c (process_file): Add braces around ambiguous `else'.
14496
14497 * jcf-dump.c (print_access_flags, localvar_free): Change return
14498 type to void.
14499
14500 * parse.y (java_complete_expand_method): Initialize variable
14501 `exception_copy'.
14502 (resolve_qualified_expression_name): Likewise for `field_decl'.
14503 (patch_method_invocation): Likewise for `class_to_search'.
14504 (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14505 (patch_assignment): Likewise for `lhs_type'.
14506
14507 * verify.c (verify_jvm_instructions): Remove unused variable
14508 `caller'.
14509
14510 1999-07-25 Richard Henderson <rth@cygnus.com>
14511
14512 * decl.c (va_list_type_node): New.
14513
14514 1999-07-25 Anthony Green <green@cygnus.com>
14515
14516 * gjavah.c (print_stub): New function.
14517 (METHOD_IS_NATIVE): New macro.
14518 (print_mangled_classname): Make static.
14519 (HANDLE_END_FIELD): Don't emit fields during stub generation.
14520 (process_file): Perform stub generation.
14521 (HANDLE_METHOD): Don't emit class decls during stub
14522 generation.
14523 (HANDLE_END_METHOD): Take into account stub generation.
14524 (print_method_info): Handle stub generation.
14525 (print_stub): New function.
14526 (print_cxx_classname): Make signature consistant with others.
14527 (help): Describe -stubs option.
14528 (main): Create stub file.
14529 (version): Use version.c.
14530 (print_full_cxx_name): New function.
14531 (print_c_decl): Use print_full_cxx_name.
14532
14533 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14534
14535 * check-init.c (check_init): Handle MAX_EXPR.
14536
14537 1999-07-15 Andrew Haley <aph@cygnus.com>
14538
14539 * lang.c (flag_use_divide_subroutine): New variable.
14540 * typeck.c: (convert_ieee_real_to_integer): Bounds check
14541 fp-to-integer conversion.
14542 (convert): Call convert_ieee_real_to_integer when flag_fast_math
14543 is not set.
14544
14545 * expr.c (build_java_soft_divmod): New function.
14546 (build_java_binop): Call build_java_soft_divmod if
14547 flag_use_divide_subroutine is set.
14548 * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14549 soft_lrem_node: new builtin functions.
14550 (init_decl_processing) Initialize the new builtins.
14551 * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14552 soft_lrem_node: new builtin functions.
14553 (build_java_soft_divmod): New function.
14554 * parse.y: Call build_java_soft_divmod if
14555 flag_use_divide_subroutine is set.
14556 * parse.c: Rebuilt.
14557
14558 * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14559 a --specs= arg) even if not linking.
14560 * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14561 -fuse-divide-subroutine
14562
14563 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14564
14565 * parse.y (resolve_and_layout): Check methods only once.
14566 (resolve_qualified_expression_name): Verify thrown exceptions
14567 compatibility.
14568 (check_thrown_exceptions): Reject exceptions thrown in
14569 initializer. Error message tuned.
14570
14571 1999-07-14 Andrew Haley <aph@cygnus.com>
14572
14573 * expr.c (expand_expr): Do not return the last statement in a
14574 block as the block's value.
14575
14576 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14577
14578 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14579 CALL_EXPR, to avoid order of evaluation changes.
14580
14581 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14582
14583 * parse.y (qualify_ambiguous_name): Do not use
14584 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14585
14586 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
14587
14588 * check-init.c (check_init): Handle MAX_EXPR.
14589 * expr.c (force_evaluation_order): Force method call arguments to
14590 be evaluated in left-to-right order.
14591 * parse.y (qualify_ambiguous_name): Loop again to qualify
14592 NEW_ARRAY_EXPR properly.
14593
14594 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14595
14596 * parse.y (patch_invoke): Resolve unresolved invoked method
14597 returned type.
14598 (qualify_ambiguous_name): STRING_CST to qualify expression for
14599 type name resolution.
14600
14601 1999-06-24 Andrew Haley <aph@cygnus.com>
14602
14603 * class.c (finish_class): Whenever a deferred method is
14604 output, rescan the list of methods to see if a new candidate for
14605 output can be found.
14606
14607 1999-06-28 Tom Tromey <tromey@cygnus.com>
14608
14609 * jvspec.c (lang_specific_driver): Recognize --help.
14610
14611 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14612
14613 * parse.y (resolve_package): Fixed bogus return statement.
14614 (patch_method_invocation): Resolve method invocation beginning with
14615 a package name qualifier.
14616
14617 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14618
14619 * Make-lang.in (java.stage1): Depend on stage1-start.
14620 (java.stage2): Likewise for stage2-start.
14621 (java.stage3): Likewise for stage3-start.
14622 (java.stage4): Likewise for stage4-start.
14623
14624 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14625
14626 * parse.y (java_complete_lhs): When doing cross referencing, don't
14627 try to keep file location on a WFL expanded as a CALL_EXPR.
14628
14629 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
14630
14631 * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14632 compiling to class file a void method with an empty method body.
14633 As a side effect, the bytecode backend will generate the
14634 appropriate `return' instruction.
14635
14636 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14637
14638 * parse.y (lookup_package_type_and_set_next): New function prototype.
14639 (resolve_package): Search current and imported packages.
14640 (lookup_package_type_and_set_next): New function.
14641
14642 1999-06-22 Andrew Haley <aph@cygnus.com>
14643
14644 * verify.c (verify_jvm_instructions): Check for pending blocks
14645 before invalid PC test and opcode switch, not after.
14646
14647 1999-06-21 Andrew Haley <aph@cygnus.com>
14648
14649 * except.c (find_handler_in_range): The upper limit for exception
14650 ranges is exclusive, not inclusive: (start <= pc < end).
14651 (link_handler): find child pointer which points to outer by
14652 searching sibling list: previous code incorrectly assumed that
14653 outer->outer->first_child must point to outer.
14654 * verify.c (verify_jvm_instructions): FIXME added to code for
14655 `athrow'.
14656 (verify_jvm_instructions): Do not assume that the last block
14657 processed in a subroutine is a block which ends with a `ret'
14658 instruction. With some control flows it is possible that the last
14659 block ends with an `athrow'.
14660
14661 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14662
14663 * parse.y (qualify_ambiguous_name): Reorganized the post
14664 evaluation of non WFL leading expression nodes.
14665
14666 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14667
14668 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14669 CONVERT_EXPR.
14670
14671 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14672
14673 * parse.y (qualify_ambiguous_name): Handle qualified expression
14674 beginning with a STRING_CST.
14675
14676 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14677
14678 * parse.y (register_fields): Set DECL_INITIAL on both
14679 pre-initialized static and public fields.
14680 (resolve_field_access): Static field access expressions to always
14681 use pointer types.
14682 (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14683 qualification. CONVERT_EXPR to be resolved as an expression name.
14684 (java_complete_lhs): Identify and access qualified final
14685 initialized field in switch statement case expression.
14686 (fold_constant_for_init): Pre-initialized field decl constant to
14687 be folded.
14688
14689 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14690
14691 * parse.y (note_possible_classname): Mark returned node with
14692 QUALIFIED_P only if the original class name contained a '/'.
14693
14694 1999-06-05 Anthony Green <green@cygnus.com>
14695
14696 * Make-lang.in (gcjh): More parallel build fixes.
14697
14698 1999-06-03 Mike Stump <mrs@wrs.com>
14699
14700 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14701
14702 1999-06-02 Anthony Green <green@cygnus.com>
14703
14704 * except.c (link_handler): Chain exception handlers in order.
14705
14706 1999-06-02 Anthony Green <green@cygnus.com>
14707
14708 * expr.c (expand_byte_code): Fill unreachable bytecode regions
14709 with nops and process as usual in order to always set correct EH
14710 ranges. Emit detailed warnings about unreachable bytecodes.
14711
14712 1999-06-02 Anthony Green <green@cygnus.com>
14713
14714 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14715 constant.
14716
14717 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14718
14719 * parse.y (lookup_field_wrapper): Unified returned value to NULL
14720 or the searched field decl.
14721
14722 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14723
14724 * parse.y (fold_constant_for_init): Convert numerical constant
14725 values to the type of the assigned field.
14726
14727 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14728
14729 * expr.c (lookup_field): Relaxed the test on class loading error
14730 detection.
14731 * parse.y (fold_constant_for_init): Enabeled old code.
14732
14733 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14734
14735 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14736 decide the validity of the cast of a java.lang.Cloneable reference
14737 to an array.
14738 (patch_conditional_expr): Fixed first argument passed to
14739 binary_numeric_promotion.
14740
14741 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14742
14743 * parse.y (qualify_ambiguous_name): Take into account that a
14744 CONVERT_EXPR might specify a type as a WFL.
14745
14746 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14747
14748 * parse.y (patch_assignment): Save the rhs before using it as an
14749 argument to _Jv_CheckArrayStore.
14750
14751 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14752
14753 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14754
14755 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14756
14757 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14758 floating point literal only when the exponent indicator has been
14759 parsed.
14760
14761 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14762
14763 * parse.y (formal_parameter:): Construct argument tree list
14764 element even if a yet unsupported final parameter was encountered.
14765
14766 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14767
14768 * parse.y (finish_method_declaration): Issue errors for native or
14769 abstract methods declared with a method body, as well as for non
14770 native or non abstract methods with no method body.
14771
14772 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14773
14774 * class.c (build_utf8_ref): Initialize variable `field'.
14775
14776 * decl.c (init_decl_processing): Initialize variable `field'.
14777
14778 * expr.c (build_known_method_ref): Mark parameters `method_type',
14779 `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
14780 (process_jvm_instruction): Likewise for parameter `length'.
14781
14782 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14783 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
14784 ATTRIBUTE_UNUSED.
14785
14786 * parse.y (maybe_generate_clinit): Remove unused variable
14787 `has_non_primitive_fields'.
14788 (find_in_imports_on_demand): Initialize variables `node_to_use'
14789 and `cl'.
14790 (patch_binop): Likewise for variable `prom_type'.
14791 (patch_unaryop): Likewise for variable `prom_type'.
14792
14793 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14794
14795 * xref.c (xref_table): Add missing initializer.
14796
14797 1999-05-14 Tom Tromey <tromey@cygnus.com>
14798
14799 * java-except.h (struct eh_range): Removed unused `next' member.
14800 * verify.c (verify_jvm_instructions): Call check_nested_ranges
14801 after adding all exception handlers. Sort exception ranges in
14802 order of start PC.
14803 (struct pc_index): New structure.
14804 (start_pc_cmp): New function.
14805 * except.c (add_handler): Return `void'. Don't call link_handler;
14806 instead construct an ordinary linked list and do range
14807 coalescing.
14808 (check_nested_ranges): New function.
14809 (link_handler): Changed interface to allow merging of eh_ranges.
14810 Split overlapping ranges. Return `void'.
14811
14812 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14813
14814 * parse.y (constructor_block_end:): New rule, tagged <node>.
14815 (constructor_body:): Use `constructor_block_end' instead of
14816 `block_end'.
14817
14818 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14819
14820 * parse.y (statement_nsi:): Pop `for' statement block.
14821 (java_complete_lhs): Labeled blocks containing no statement are
14822 marked as completing normally.
14823
14824 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14825
14826 * xref.c (xref_set_current_fp): New function, defined.
14827 * xref.h (xref_set_current_fp): New function, prototyped.
14828
14829 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14830
14831 * check-init.c (check_init): Take into account that
14832 LABELED_BLOCK_STMT can be empty.
14833
14834 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14835
14836 * parse.y (java_check_regular_methods): Warning check on not
14837 overriding methods with default access in other packages does not
14838 apply to `<clinit>'.
14839 (java_complete_lhs): If block body is an empty_stmt_node, replace
14840 it by NULL_TREE. This prevents gcc from generating an irrelevant
14841 warning.
14842
14843 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
14844
14845 * check-init.c (check_init): Removed code accepting to see things
14846 falling through default:, when doing xrefs.
14847 * java-tree.h (do_not_fold): New global variable, declared.
14848 * parse.y (do_not_fold): New global variable, defined.
14849 (java_complete_expand_method): Set `do_not_fold' to the value of
14850 `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
14851 and reinstall them after them have been purged; do not check for
14852 initializations; do not issue missing return errors.
14853 (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
14854 when doing xrefs.
14855 (patch_binop): Skip the fold part when doing xrefs.
14856 (build_string_concatenation): Skip the concatenation part when
14857 doing xrefs.
14858 (patch_synchronized_statement): Do not generate a try-finally when
14859 doing xrefs.
14860 (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
14861 and keep the location where the throw was seen.
14862 * typeck.c (convert): When `do_not_fold' is set, do not attempt
14863 any treatment on the converted node an simply return a NOP_EXPR of
14864 the targeted type.
14865 * xref.c (xref_get_data): New function, defined.
14866 * xref.h (xref_get_data): New function, declared.
14867 (XREF_GET_DATA): Use xref_get_data.
14868
14869 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14870
14871 * gjavah.c (print_include): Cast the result of `strlen' to int
14872 when comparing against a signed value.
14873 (add_namelet): Likewise.
14874
14875 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14876
14877 * expr.c (expand_invoke): Mark parameter `nargs' with
14878 ATTRIBUTE_UNUSED.
14879 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14880
14881 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14882 ATTRIBUTE_UNUSED.
14883
14884 * jcf-reader.c (get_attribute): Cast a value to long
14885 when comparing against a signed expression. Likewise.
14886
14887 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
14888 HOST_BITS_PER_CHAR.
14889
14890 1999-05-11 Andrew Haley <aph@cygnus.com>
14891
14892 * parse.y (source_end_java_method): If the current method contains
14893 any exception handlers, force asynchronous_exceptions: this is
14894 necessary because signal handlers in libjava may throw exceptions.
14895 * decl.c (end_java_method): Ditto.
14896
14897 1999-05-11 Tom Tromey <tromey@cygnus.com>
14898
14899 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
14900 flags.
14901 * jvspec.c (THREAD_NAME): Removed.
14902 (GC_NAME): Likewise.
14903 (MATHLIB): Likewise.
14904 (WITHLIBC): Likewise.
14905 (GCLIB): Likewise.
14906 (THREADLIB): Likewise.
14907 (MATH_LIBRARY): Likewise.
14908 (lang_specific_driver): Don't add `-l' options to command line.
14909 Instead, add a single --specs option. Recognize `-L' options and
14910 use them to search for spec file.
14911 (find_spec_file): New function.
14912 (SPEC_FILE): New define.
14913
14914 1999-05-11 Dave Brolley <brolley@cygnus.com>
14915
14916 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
14917 cpplib-enabled build.
14918
14919 1999-05-05 Per Bothner <bothner@cygnus.com>
14920
14921 * class.c (make_field_value): DECL_INITIAL may be a string literal;
14922 temporarily zero it while calling rest_of_decl_compilation.
14923
14924 * java-tree.h (string_ptr_type_node): Add declaration.
14925 * decl.c: Define and initialize string_ptr_type_node.
14926 * parse.y (patch_string_cst): Use string_ptr_type_node.
14927
14928 * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P): Removed.
14929 * parse.y (for_statement): Now unconditionally exit_block.
14930 (finish_labeled_statement): No longer exit_block if for-loop.
14931 (patch_loop_statement): Check harder if the loop is already labeled.
14932
14933 * parse.y (patch_initialized_static_field): Removed function.
14934 (maybe_generate_clinit): Removed special handling for interfaces.
14935 (java_complete_expand_methods): Do a preliminary java_complete_tree
14936 on <clinit> to determine if it can be removed.
14937 (java_complete_expand_method): Remove special handling for <clinit>.
14938 (java_complete_lhs): For BLOCK and EXPR_WITH_FILE_LOCATION
14939 optimize if we get back empty_stmt_node.
14940 For MODIFY_EXPR, re-do checking of static initializers.
14941 (fold_constant_for_init): Don't return immediate if VAR_DECL.
14942 For VAR_DECL, pass correct context.
14943
14944 * verify.c (verify_jvm_instructions): Better error messages.
14945
14946 1999-05-03 Tom Tromey <tromey@cygnus.com>
14947
14948 * parse-scan.y (interface_declaration): Call
14949 report_class_declaration for interfaces.
14950
14951 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
14952
14953 * Makefile.in: Remove -v from bison command lines.
14954
14955 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14956
14957 * check-init.c (check_init): Exclude a case of error when doing
14958 xrefs.
14959 * class.c (layout_class_method): Don't generate the error message
14960 twice when compiling from source.
14961 * lang-options.h: Added `-Wredundant-modifers' and
14962 `-Wunusupported-jdk11' flags and help text.
14963 * lang.c (lang_decode_option): Added support for
14964 `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
14965 flag_static_local_jdk11 and flag_redundant set accordingly.
14966 * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
14967 * parse.h (EXPR_WFL_ADD_COL): New macro.
14968 (DECL_END_SOURCE_LINE): Likewise.
14969 (DECL_INHERITED_SOURCE_LINE): Likewise.
14970 * parse.y (static_ref_err): New function, prototyped.
14971 (CCB_TK): Now tagged <operator>.
14972 (class_body:): Remember the location of the closing '}' of a class
14973 definition when doing xrefs.
14974 (block:): Likewise.
14975 (block_end:): Likewise.
14976 (create_class): Remember the location of the inherited class
14977 identifier when doing xrefs.
14978 (register_fields): Added test on first operand of `init' before
14979 testing it TREE_CODE.
14980 (method_header): Store the location of the class identifier in the
14981 class decl when doing xrefs.
14982 (finish_method_declaration): Don't combine first/last method line
14983 when doing xref.
14984 (java_check_regular_methods): Warning check on not overriding
14985 methods with default access on other packages move before check on
14986 static methods. Initialization of `aflags' also moved up.
14987 (resolve_expression_name): Call static_ref_err to report the error.
14988 (static_ref_err): New function, implemented.
14989 (resolve_field_access): Returned simplified static field access
14990 when doing xrefs.
14991 (resolve_qualified_expression_name): Check for illegal use of
14992 static fields in a non static context. Call static_ref_err to
14993 report error in various places.
14994 (java_complete_tree): Do not fold initialized static fields when
14995 doing xrefs.
14996 (java_complete_lhs): Likewise.
14997
14998 1999-04-29 Anthony Green <green@cygnus.com>
14999
15000 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15001 create internal labels.
15002 (lookup_label): Ditto.
15003
15004 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15005
15006 * class.c (layout_class_method): Generate <clinit>'s rtl for
15007 interfaces.
15008 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15009 for interfaces' <clinit>.
15010 * expr.c (lookup_field): Search for fields in interfaces.
15011 (expand_invoke): Fixed indentation.
15012 (expand_java_field_op): Likewise. Use IS_CLINIT.
15013 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15014 (IS_CLINIT): New macro.
15015 * parse.y (type_declaration:): Call maybe_generate_clinit after an
15016 interface was parsed.
15017 (maybe_generate_clinit): Don't generate if the current class is an
15018 interface with only fields of primitive types.
15019 (reset_method_name): Use IS_CLINIT.
15020 (java_complete_expand_method): Expand <clinit> when it exists for
15021 interfaces. Use IS_CLINIT.
15022 (resolve_expression_name): Use DECL_CONTEXT instead of
15023 current_class to build static field references.
15024 (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15025 ARRAY_REF when doing xreferencing.
15026 (check_final_assignment): Fixed typo in leading comment. Use
15027 IS_CLINIT.
15028 (patch_array_ref): Don't fully expand array references when
15029 xreferencing.
15030 (patch_return): Use IS_CLINIT.
15031 (patch_throw_statement): Likewise.
15032
15033 1999-04-22 Tom Tromey <tromey@cygnus.com>
15034
15035 * Make-lang.in (JAVA_SRCS): Added check-init.c.
15036
15037 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15038
15039 * decl.c (predef_filenames, predef_filenames_size): New globals
15040 (init_decl_processing): predef_filenames and predef_filenames_size
15041 initialized.
15042 * java-tree.h (predef_filenames, predef_filenames_size): Declared
15043 extern.
15044 * jcf-parse.c (predefined_filename_p): New function.
15045 (yyparse): Check that files on the command line are specified only
15046 once and issue a warning otherwise.
15047 * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15048 * parse.y (source_end_java_method): Nullify NOP method bodies, to
15049 avoid a gcc warning with -W -Wall turned on.
15050 (java_expand_classes): Abort if errors were encountered.
15051 (java_complete_lhs): If the cross reference flag is set, wrap
15052 field DECL node around a WFL when resolving expression name.
15053
15054 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15055
15056 * lang.c (lang_decode_option): Fixed returned value when parsing
15057 `-fxref=...' and `-Wall'.
15058 * parse.y (source_end_java_method): Do not generate code when
15059 flag_emit_xref is set.
15060 (resolve_expression_name): Do not build static field access when
15061 flag_emit_xref is set.
15062 (resolve_field_access): No special treatment on `length' when
15063 flag_emit_xref is set. Do not build qualified static field access
15064 when flag_emit_xref is set.
15065 (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15066 when flag_emit_xref is set.
15067 (patch_assignment): Do not generate array store runtime check when
15068 flag_emit_xref is set.
15069 * xref.c (xref_flag_value): Fixed function declaration
15070 indentation.
15071 (xset_set_data): New function.
15072 * xref.h (xref_set_data): Added prototype for new function.
15073 (typedef struct xref_flag_table): New field data.
15074 (XREF_GET_DATA): New macro.
15075
15076 1999-04-19 Tom Tromey <tromey@cygnus.com>
15077
15078 * xref.h (enum): Removed trailing comma.
15079
15080 * parse.y (resolve_qualified_expression_name): Added missing
15081 `break'.
15082
15083 1999-04-15 Anthony Green <green@cygnus.com>
15084
15085 * gjavah.c: New prototypes for java_float_finite and
15086 java_double_finite.
15087
15088 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15089
15090 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15091 references.
15092
15093 1999-04-06 Jeffrey A Law (law@cygnus.com)
15094
15095 * Makefile.in (TREE_H): Add tree-check.h.
15096 (RTL_H): Add genrtl.h.
15097
15098 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15099
15100 * parse.y (patch_assignment): Added ArrayStoreException runtime
15101 check.
15102
15103 1999-04-06 Per Bothner <bothner@cygnus.com>
15104
15105 * expr.c (pop_type_0): New function.
15106 (pop_type): Use pop_type_0.
15107 * java-tree.h (pop_type_0): New declaration.
15108 * verify.c (verify_jvm_instructions): Check return instructions.
15109
15110 * parse.y (patch_binop): Don't fold if non-constant and emiting
15111 class files.
15112
15113 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15114
15115 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15116
15117 * gjavah.c: Include math.h earlier. Include tree.h/java-tree.h.
15118 (main_jcf): Don't define.
15119 (process_file): Don't set `main_jcf'.
15120
15121 * java-tree.h (main_jcf): Don't declare.
15122
15123 * jcf-parse.c (main_jcf): Add static definition.
15124
15125 * lang.c (main_jcf): Don't define.
15126
15127 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15128
15129 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15130
15131 * decl.c (copy_lang_decl): Likewise for `bcopy'.
15132
15133 * jcf-depend.c: Include "config.h", not <config.h>.
15134
15135 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15136 `bcopy' to PTR.
15137
15138 * jcf-path.c: Include "config.h", not <config.h>.
15139
15140 * lex.c: Don't include various system header files.
15141 (java_init_lex): Cast the argument of `bzero' to PTR
15142
15143 * parse-scan.y (java_push_parser_context): Likewise.
15144
15145 * parse.y (java_push_parser_context): Likewise.
15146 (patch_bc_statement): Match format specifier to variable argument.
15147
15148 * xref.c: Don't include <stdio.h>.
15149
15150 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
15151
15152 * parse.y (struct parser_ctxt *ctxp): Now global.
15153 (declare_local_variables): Use WFL compound value for the
15154 declaration source line value, when doing cross-referencing.
15155
15156 1999-03-31 Tom Tromey <tromey@cygnus.com>
15157
15158 * gjavah.c (print_field_info): Allow constants of other types.
15159 (print_include): Generate include when new name is proper prefix
15160 of already printed name.
15161 (add_namelet): Likewise.
15162 (cxx_keyword_subst): New function.
15163 (print_method_info): Use it.
15164 (print_field_name): New function.
15165 (get_field_name): New function.
15166 (print_field_info): Use get_field_name and print_field_name.
15167
15168 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15169
15170 * Makefile.in (keyword.h): Generate using gperf language 'C', not
15171 'KR-C', so gperf uses the `const' keyword on strings.
15172
15173 * keyword.gperf (java_keyword): Const-ify a char*.
15174
15175 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15176
15177 * parse.y (patch_bc_statement): Fixed identation and a bogus
15178 `printf' format.
15179
15180 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15181
15182 * parse.y (patch_assignment): Allow static variables in other
15183 classes to be assigned.
15184
15185 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15186
15187 * class.c (maybe_add_interface): Remove unused variable
15188 `interface_binfo'.
15189 (make_class_data): Use = for assignment, not ==. Likewise.
15190 (emit_register_classes): Remove unused variable `decl'.
15191
15192 * lex.c: Fix comment so as not to contain an embedded `/*'.
15193
15194 * verify.c (verify_jvm_instructions): Remove unused variable
15195 `self_type'.
15196
15197 1999-03-27 Per Bothner <bothner@cygnus.com>
15198
15199 * parse.y (complete_loop_body): Rename to finish_loop_body.
15200 (complete_labeled_statement): Rename to finish_labeled_statement.
15201 (complete_for_loop): Rename to finish_for_loop.
15202 (complete_method_declaration): Rename to finish_method_declaration.
15203
15204 * java-tree.h (continue_identifier_node): New global node.
15205 * decl.c: Define and initialize continue_identifier_node.
15206 * parse.y (generate_labeled_block): Remove - no longer needed.
15207 (build_loop_body): Use continue_identifier_node for continue block.
15208 (finish_labeled_statement): Also do pop_labeled_block actions.
15209 (java_complete_lhs): POP_LOOP even if error.
15210 (build_labeled_block): Special handling for continue_identifier_node.
15211 (patch_loop_statement): Re-organize.
15212 (patch_bc_statement): Re-write.
15213
15214 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15215
15216 * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15217 using a WFL compound value.
15218 * parse.y (xref.h): Include.
15219 (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15220 WFL compound value.
15221 (register_fields): Set WFL compound value to lineno if doing
15222 xrefs.
15223 (java_complete_expand_method): Call expand_xref if flag_emit_xref
15224 is set.
15225 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15226 * xref.h (expand_xref): Prototype renamed from xref_generate.
15227
15228 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15229
15230 * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15231 (GET_CURRENT_BLOCK): New macro.
15232 * parse.y (current_static_block): New global variable.
15233 (method_body:): Define action.
15234 (complete_method_declaration): Set current_function_decl to NULL
15235 when work on the current method is done.
15236 (declare_local_variables): Use GET_CURRENT_BLOCK.
15237 (java_method_add_stmt): Likewise.
15238 (java_complete_expand_method): Disable the use of `this' when
15239 expanding <clinit>.
15240 (enter_a_block): If no current method exist, use
15241 current_static_block to link static initializer blocks.
15242 (exit_block): Rewritten to use current_static_block when no current
15243 method decl exists.
15244 (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15245 (patch_return): Forbid the use of `return' in static initializers.
15246 (patch_throw_statement): Fixed indentation. Issue specific error
15247 for uncaught thrown checked exception in static initializer
15248 blocks. Removed FIXME.
15249
15250 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
15251
15252 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15253 Link gcj from gcc.o.
15254
15255 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
15256
15257 * parse.y (find_applicable_accessible_methods_list): When dealing
15258 with interface: ensure that a given interface or java.lang.Object
15259 are searched only once.
15260
15261 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15262
15263 * gjavah.c (print_c_decl): Remove unused argument `flags'.
15264
15265 * jcf-dump.c (print_access_flags): Add braces around if-else.
15266
15267 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15268 COMBINE_INPUTS.
15269
15270 * lex.c (build_wfl_node): Add static prototype.
15271
15272 * lex.h (build_wfl_node): Remove static prototype.
15273
15274 * parse.y: Include lex.c early enough to declare everything needed.
15275 Ensure calls to `build_wfl_node' pass the proper arguments.
15276 (create_class): Remove unused variable `super_decl'.
15277 (get_printable_method_name): Initialize variable `name'.
15278
15279 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15280
15281 * Changelog: Fixed 1999-03-22 typos.
15282 * lang.c (lang_decode_option): Fixed typo in error string in the
15283 XARG section.
15284
15285 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15286
15287 * Makefile.in (JAVA_OBJS): Added entry xref.o.
15288 (xref.o): New rule.
15289 * java-tree.h (flag_emit_xref): Declared extern.
15290 * lang.c (xref.h): Included.
15291 (flag_emit_xref): New global variable.
15292 (lang_decode_option): Added support for -fxref.
15293 * xref.c: Created.
15294 * xref.h: Likewise.
15295
15296 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
15297
15298 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15299 linked with.
15300
15301 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15302
15303 * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15304 $(srcdir)/../system.h and $(JAVA_TREE_H).
15305 (jcf-io.o): Depend on $(JAVA_TREE_H).
15306 (mangle.o): Likewise.
15307
15308 * check-init.c (check_cond_init): Add static prototype.
15309
15310 * class.c (build_java_method_type, hashUtf8String,
15311 make_field_value, get_dispatch_vector, get_dispatch_table,
15312 append_gpp_mangled_type, mangle_static_field): Likewise.
15313 (strLengthUtf8): Hide unused definition.
15314 (hashUtf8String): Const-ify.
15315 (make_field_value): Un-ANSI-fy.
15316
15317 * constants.c: Move inclusion of jcf.h above java-tree.h.
15318 (set_constant_entry, find_class_or_string_constant,
15319 find_name_and_type_constant, get_tag_node,
15320 build_constant_data_ref): Add static prototype.
15321
15322 * decl.c (push_jvm_slot, builtin_function,
15323 lookup_name_current_level): Likewise.
15324 (builtin_function): Const-ify.
15325
15326 * except.c (expand_start_java_handler, expand_end_java_handler):
15327 Add static prototype.
15328
15329 * expr.c (flush_quick_stack, push_value, pop_value,
15330 java_stack_swap, java_stack_dup, build_java_athrow,
15331 build_java_jsr, build_java_ret, expand_java_multianewarray,
15332 expand_java_arraystore, expand_java_arrayload,
15333 expand_java_array_length, build_java_monitor, expand_java_pushc,
15334 expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15335 expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15336 expand_compare, expand_test, expand_cond, expand_java_goto,
15337 expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15338 expand_java_field_op, java_push_constant_from_pool): Likewise.
15339
15340 (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15341 (build_java_arraynull_check): Mark parameters `node' and `type'
15342 with ATTRIBUTE_UNUSED.
15343 (note_label): Likewise for parameter `current_pc'.
15344 (expand_java_call, expand_java_ret): Hide unused definition.
15345
15346 * java-tree.h (make_class, build_constants_constructor,
15347 java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15348 init_outgoing_cpool, register_class, emit_register_classes,
15349 java_layout_seen_class_methods): Prototype.
15350 (unicode_mangling_length): Const-ify.
15351 (append_gpp_mangled_name, append_gpp_mangled_classtype,
15352 emit_unicode_mangled_name, format_int, format_uint,
15353 jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15354 jcf_print_utf8_replace, open_class): Prototype.
15355
15356 * jcf-dump.c: Include "config.h", not <config.h>. Don't include
15357 <stdio.h>. Include tree.h/java-tree.h.
15358 (utf8_equal_string usage, process_class): Add static prototype.
15359 (open_class): Don't prototype this here.
15360 (utf8_equal_string): Match arguments to format specifiers.
15361 (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15362 TABLE_SWITCH, disassemble_method): Likewise.
15363
15364 * jcf-io.c: Include tree.h/java-tree.h.
15365 (open_class, find_classfile, jcf_print_utf8,
15366 jcf_print_utf8_replace): Const-ify.
15367
15368 * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15369 parse_class_file): Add static prototype.
15370 (find_in_current_zip): Match definition to existing static
15371 prototype.
15372
15373 * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15374 (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15375 finish_jcf_block, define_jcf_label, get_jcf_label_here,
15376 put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15377 write_chunks, adjust_typed_op, generate_bytecode_conditional,
15378 generate_bytecode_return, perform_relocations, init_jcf_state,
15379 init_jcf_method, release_jcf_state, generate_classfile):
15380 Add static prototype.
15381 (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15382 (make_class_file_name): Const-ify.
15383
15384 * jcf.h (find_classfile): Const-ify.
15385
15386 * jv-scan.c (reset_report): Remove prototype.
15387
15388 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15389 (error): Rewrite to allow varargs.
15390
15391 * lang.c (lang_f_options): Const-ify.
15392
15393 * lex.c (java_parse_escape_sequence): Add static prototype.
15394 (java_allocate_new_line): Match definition to existing static
15395 prototype.
15396
15397 * mangle.c Include tree.h/java-tree.h.
15398 (unicode_mangling_length, emit_unicode_mangled_name,
15399 append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15400
15401 * parse.h (jdep_code): Remove trailing comma in enumeration.
15402 (java_get_line_col): Move prototype outside of !JC1_LITE test.
15403 (reset_report): Add prototype.
15404
15405 * verify.c (push_pending_label, merge_types): Add static
15406 prototypes.
15407
15408 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15409
15410 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15411
15412 * parse.y (find_applicable_accessible_methods_list): Extend the
15413 search to superinterfaces when relevant.
15414 (search_applicable_methods_list): New function.
15415
15416 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15417
15418 * class.c (unmangle_classname): Implemented stricter testing
15419 before setting the QUALIFIED_P flag on an identifier.
15420
15421 1999-03-16 Per Bothner <bothner@cygnus.com>
15422
15423 * parse.y (java_complete_lhs): Call force_evaluation_order
15424 after patch_newarray.
15425 (patch_binop): Don't call fold if there are side effects.
15426
15427 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
15428
15429 * parse.y (java_stabilize_reference): Use save_expr instead of
15430 building a SAVE_EXPR node.
15431 (java_complete_lhs): Patch the resulting string of the `+='
15432 operator (if necessary) and complete the RHS after having built
15433 the cast.
15434
15435 1999-03-15 Per Bothner <bothner@cygnus.com>
15436
15437 * class.c (make_class): Don't set CLASS_P here (because
15438 this function is also called by build_java_array_type).
15439 (push_class): Set CLASS_P here instead.
15440 * parse.h (TYPE_CLASS_P): Check for TYPE_ARRAY_P is redundant.
15441
15442 * jcf-dump.c (print_access_flags): Take extra parameter to indicate
15443 context. If the context is class, perfer "super" over "synchronized".
15444 * jcf-write.c (generate_classfile): Don't add ACC_SUPER if interface.
15445
15446 * parse.y (create_class): Don't call parser_check_super here;
15447 it is not robust. Always wait until later.
15448
15449 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
15450 match what JDK 1.2 does), but don't set ACC_PUBLIC.
15451
15452 1999-03-13 Per Bothner <bothner@cygnus.com>
15453
15454 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
15455 * lex.h (UNGETC): Change misleading macro.
15456
15457 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15458
15459 * parse.y (java_stabilize_reference): Return NODE when patching a
15460 COMPOUND_EXPR.
15461 (java_complete_lhs): Put parenthesis around truth values.
15462
15463 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15464
15465 * class.c (layout_class_method): Don't make rtl for interface
15466 methods.
15467 * parse.h (GET_TYPE_NAME): New macro.
15468 * parse.y (if_then_statement:): Fixed indentation.
15469 (if_then_else_statement:): Likewise.
15470 (for_statement:): Fixed spacing.
15471 (try_statement:): Fixed indentation.
15472 (create_interface): Don't force interfaces to be abstract.
15473 (method_header): Abstract methods are OK in interfaces.
15474 (declare_local_variables): Fixed typo in comment.
15475 (java_complete_expand_method): Fixed indentation.
15476 (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15477 non accessible fields.
15478 (java_stabilize_reference): New function.
15479 (java_complete_lhs): Fixed indentation. Use
15480 java_stabilize_reference in compound assignment. Insert the
15481 cast. If not processing `+' fix string constants before processing
15482 binop.
15483
15484 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15485
15486 * constants.c (find_class_or_string_constant): Cast variable `j'
15487 to a `jword' when comparing against one.
15488
15489 * expr.c (java_lang_expand_expr): Remove unused variables
15490 `has_finally_p' and `op0'.
15491
15492 * gjavah.c (print_field_info): Cast a value to jint when comparing
15493 against one. Likewise for a jlong.
15494 (add_namelet): Likewise cast a `sizeof' to an int when comparing
15495 against a signed quantity.
15496
15497 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15498 (print_signature): Don't needlessly dereference variable `str'
15499
15500 * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15501 `max_locals' with ATTRIBUTE_UNUSED.
15502 (jcf_parse_class): Likewise for variable `index'.
15503
15504 * parse.h (reverse_jdep_list): Remove static prototype.
15505
15506 * parse.y (build_jump_to_finally): Remove prototype and definition.
15507 (reverse_jdep_list): Add static prototype.
15508
15509 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15510 `assignment' and `expr_decl'.
15511
15512 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15513
15514 1999-03-12 Andrew Haley <aph@cygnus.com>
15515
15516 * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15517 we'll need a directory separator and a null character.
15518
15519 1999-03-10 Per Bothner <bothner@cygnus.com>
15520
15521 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
15522
15523 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
15524
15525 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15526 interfaces.
15527
15528 1999-03-05 Per Bothner <bothner@cygnus.com>
15529
15530 * lex.c (java_parse_end_comment): Take extra parameter (next char).
15531
15532 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
15533
15534 * class.c (layout_class_method): A static method in a base class
15535 is never overridden, so treat it like it doesn't exist.
15536 However, do complain about private non-static method overriding
15537 public static method.
15538
15539 * parse.y: Don't set unused INITIALIZED_P flag.
15540 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
15541
15542 * parse.y (find_expr_with_wfl): Optimize tail-calls.
15543 (build_array_from_name): Re-order &index[string] to &string[index].
15544
15545 * parse.y (java_complete_lhs): Don't call patch_assignment if rhs is
15546 error_mark (it might catch more errors, but it is more likely to lose).
15547
15548 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15549
15550 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15551 (parse-scan.o): Depend on toplev.h.
15552
15553 * class.c (make_method_value): Add prototype. Make it static.
15554 Remove unused second argument, caller changed.
15555
15556 * expr.c (java_lang_expand_expr): Remove unused variable
15557 `return_label'.
15558
15559 * java-tree.h: Don't prototype find_in_current_zip.
15560 Add prototypes for verify_constant_pool, start_java_method,
15561 end_java_method, give_name_to_locals, expand_byte_code,
15562 open_in_zip, set_constant_value, find_constant1, find_constant2,
15563 find_utf8_constant, find_string_constant, find_class_constant,
15564 find_fieldref_index, find_methodref_index, write_constant_pool,
15565 count_constant_pool_bytes and encode_newarray_type.
15566
15567 * jcf-dump.c: Remove unused variable `LONG_temp'.
15568
15569 * jcf-parse.c: Include parse.h.
15570 (jcf_parse_source): Remove unused parameter, all callers changed.
15571 (jcf_figure_file_type): Add static prototype.
15572 (find_in_current_zip): Likewise. Also remove unused parameter,
15573 all callers changed.
15574 (read_class): Initialize variable `saved_pos'.
15575
15576 * jcf-reader.c (jcf_parse_preamble): Mark variables
15577 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15578
15579 * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15580 (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15581 (java_parse_doc_section): Initialize variable `seen_star'.
15582 (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15583 (java_lex_error): Mark parameters `msg' and `forward' with
15584 ATTRIBUTE_UNUSED.
15585 (java_get_line_col): Mark parameters `filename' and `line' with
15586 ATTRIBUTE_UNUSED.
15587
15588 * parse-scan.y: Include toplev.h.
15589 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15590
15591 * parse.h: use `struct JCF', not plain `JCF'.
15592 (java_parser_context_save_global, java_expand_classes
15593 java_parser_context_restore_global, java_parse): Add prototypes.
15594
15595 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15596 `node'.
15597
15598 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
15599
15600 * check-init.c (check_init): COPYN takes word count, not bit count.
15601
15602 1999-02-26 Per Bothner <bothner@cygnus.com>
15603
15604 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
15605 explicit build_decl. (Avoids crash in reload when optimizing.)
15606
15607 1999-02-25 Per Bothner <bothner@cygnus.com>
15608
15609 * decl.c (complete_start_java_method): Handle synchronized method
15610 even when compiling from bytecode.
15611
15612 1999-02-26 Tom Tromey <tromey@cygnus.com>
15613
15614 * gjavah.c (add_class_decl): Only generate `#include' if outer
15615 class is not the name of the class we are processing. Correctly
15616 append `.h' in #include.
15617 (process_file): Clean up newlines around generated `#include's.
15618 (decode_signature_piece): Correctly handle inner classes.
15619 (struct include): New structure.
15620 (all_includes): New global.
15621 (print_include): New function.
15622 (add_class_decl): Use it.
15623 (process_file): Likewise.
15624 (add_class_decl): Generate include for java-array.h if array
15625 seen.
15626 (process_file): Don't generate java-array.h include.
15627
15628 * gjavah.c (add_namelet): Check for standard package names here.
15629 (add_class_decl): Don't check for standard package names here.
15630
15631 1999-02-25 Tom Tromey <tromey@cygnus.com>
15632
15633 * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15634 When reading a zip file, only use strncmp if both strings are
15635 bigger than the buffer length. Initialize `k' when looping
15636 through zip file.
15637
15638 1999-02-24 Tom Tromey <tromey@cygnus.com>
15639
15640 * gjavah.c (struct namelet): New structure.
15641 (add_namelet): New function.
15642 (print_namelet): New function.
15643 (print_class_decls): Use add_namelet and print_namelet to generate
15644 namespaces and not classes.
15645 (method_printed): New global.
15646 (HANDLE_END_METHOD): Examine method_printed.
15647 (print_method_info): Set method_printed when required. Print
15648 error if function to be ignored is marked virtual. Handle $finit$
15649 method.
15650 (METHOD_IS_FINAL): New macro.
15651 (print_field_info): Use it.
15652 (HANDLE_METHOD): Clear method_printed.
15653 (method_pass): New global.
15654 (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15655 (process_file): Do two passes over both fields and methods.
15656 (HANDLE_METHOD): Examine method_pass.
15657 (root): New global.
15658 (add_class_decl): New function.
15659 (print_class_decls): Don't scan over entire constant pool.
15660
15661 1999-02-23 Tom Tromey <tromey@cygnus.com>
15662
15663 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15664 disable linking in that case.
15665
15666 1999-02-20 Tom Tromey <tromey@cygnus.com>
15667
15668 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15669 not 0x1f.
15670
15671 1999-02-21 Per Bothner <bothner@cygnus.com>
15672
15673 * decl.c (build_result_decl), java-tree.h: New method.
15674 (complete_start_java_method): Handle synchronized methods.
15675 Don't build DECL_RESULT here. (Ordering dependency problem.)
15676 (start_java_method): Call build_result_decl here instead ...
15677 * parse.y (java_complete_expand_method): ... and here.
15678 (expand_start_java_method): Don't call complete_start_java_method here.
15679 (java_complete_expand_method): Call it here instead.
15680 * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Moved to ..
15681 * java-tree.h: ... here.
15682
15683 * expr.c (force_evaluation_order): Fix typo, don't handle ARRAY_REF.
15684 * parse.y (java_complete_lhs): Don't call force_evaluation_order
15685 for ARRAY_REF - it doesn't work when array bounds are checked.
15686 (patch_array_ref): Handle it here instead.
15687
15688 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
15689
15690 1999-02-19 Per Bothner <bothner@cygnus.com>
15691
15692 Force left-to-right evaluation of binary operations etc.
15693 * expr.c (force_evaluation_order), java-tree.h: New function.
15694 * parse.y (java_complete_lhs): Pass binary operations, procedure
15695 calls, and ARRAY_REFs to force_evaluation_order.
15696 (various): Set TREE_SIDE_EFFECTS more carefully.
15697
15698 Tolerate random (non-UTF8) encoding in comments without complaining.
15699 * lex.c (java_read_char): Return 0xFFFE if bad UTF8 encoding.
15700 (java_is_eol): Handle '\r' followed by '\n' instead of vice versa.
15701
15702 * parse.y (resolve_qualified_expression_name): Handle error_mark.
15703 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
15704
15705 * parse.y (java_complete_lhs): Ignore an empty statement in a
15706 COMPOUND_EXPR. Don't complain about empty statement after return.
15707
15708 1999-02-19 Per Bothner <bothner@cygnus.com>
15709
15710 * parse.y (obtain_incomplete_type): Don't wrap unknown types
15711 in TREE_LIST - just chain the POINTER_TYPEs together.
15712 (resolve_class): If type already resolved, return decl.
15713 After resolving, update TREE_TYPE(class_type), and name (if array).
15714 * parse.h (do_resolve_class), parse.y: Make non-static.
15715 * class.c (maybe_layout_super_class): Take this_class argument.
15716 Do do_resolve_class if necessary.
15717 (layout_class, layout_class_methods): Adjust calls appropriately.
15718 * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
15719 JDEP_RESOLVED_P): Redefined for new TREE_LIST-less convention.
15720 * typeck.c (build_java_array_type): Don't call layout_class.
15721
15722 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
15723
15724 * parse.y (check_pkg_class_access): Allow private class access
15725 within the same package.
15726 (strip_out_static_field_access_decl): New function.
15727 (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
15728 operator argument before testing its nature.
15729
15730 1999-02-03 Per Bothner <bothner@cygnus.com>
15731
15732 * java-tree.def (FINALLY_EXPR): Removed. (Now uses TRY_FINALLY_EXPR.)
15733 (TRY_EXPR): Simplify - it no longer has a finally clause.
15734 * check-init.c (check_init): Handle TRY_FINALLY_EXPR.
15735 Simpler handling of TRY_EXPR, which no longer has a finally clause.
15736 * expr.c (java_lang_expand_expr): Likewise.
15737 * java-tree.h (CATCH_EXPR_GET_EXPR): Removed - no longer needed.
15738 * parse.h (java_get_catch_block), parse.y: Removed - no longer needed.
15739 * parse.y (java_complete_lhs): Add support for TRY_FIANLLY_EXPR.
15740 (build_try_statement): Remove finally parameter and handling.
15741 (build_try_finally_statement): New function.
15742 (patch_try_statement): No longer need to support finally clause.
15743 (try_statement): Update grammar action rules.
15744 * jcf-write.c (generate_bytecode_insns): Handle TRY_FINALLY_EXPR.
15745 Simpler handling of TRY_EXPR, which no longer has a finally clause.
15746
15747 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
15748
15749 * jcf-parse.c (get_constant): Add braces around computation of 'd'
15750 when REAL_ARITHMETIC is not defined. [Oct 26 fix got overwritten -PB]
15751
15752 1999-02-17 Andrew Haley <aph@cygnus.com>
15753
15754 * class.c (build_utf8_ref): Back out broken patch which was
15755 intended to to output signatures using '.' as a separator.
15756
15757 * class.c (make_class_data): Output signatures using '.' as a
15758 separator, rather than '/'.
15759 (mangled_classname): Likewise.
15760 (make_field_value): Likewise.
15761 (make_method_value): Likewise.
15762 * constants.c (alloc_class_constant): Likewise.
15763 * expr.c (build_invokeinterface): Likewise.
15764
15765 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15766
15767 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15768 of an ancient workaround.
15769
15770 1999-02-10 Jeffrey A Law (law@cygnus.com)
15771
15772 * jvspec.c (xmalloc): Kill the prototype. It does not belong
15773 here anymore.
15774
15775 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15776
15777 * lex.c (yylex): Encode \0 as UTF8.
15778
15779 1999-02-10 Tom Tromey <tromey@cygnus.com>
15780
15781 * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
15782 * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
15783 (libgcj_zip): Renamed.
15784 * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
15785 LIBJAVA_ZIP_FILE.
15786 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15787
15788 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15789 (GC_NAME): Renamed -lgc to -lgcjgc.
15790
15791 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
15792
15793 * lex.c (java_lang_cloneable): Initialize.
15794 * parse.y (java_lang_cloneable): New static variable.
15795 (qualify_ambiguous_name): Take CONVERT_EXPR into account when
15796 doing one more qualification round.
15797 (valid_ref_assignconv_cast_p): Reject null source or
15798 destination. Allow an array to be cast into java.lang.Cloneable.
15799 (patch_cast): Swapped two first arguments to first call to
15800 valid_ref_assignconv_cast_p.
15801
15802 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
15803
15804 * parse.h: DECL_P renamed JDECL_P.
15805 * parse.y: DECL_P replaced by JDECL_P.
15806 (build_array_from_name): Always use pointer's type.
15807 (patch_bc_statement): Extra code to search continue target in a
15808 for loop. Fixed comments. Continue target is current loop when
15809 unlabeled.
15810
15811 1999-02-05 Andrew Haley <aph@cygnus.com>
15812
15813 * class.c (make_class_data): The superclass of an interface should
15814 be null, not class Object.
15815
15816 * lex.c (java_lex): Sign extend hex literals.
15817
15818 1999-02-04 Andrew Haley <aph@cygnus.com>
15819
15820 * class.c (build_utf8_ref): Output signatures using '.' as a
15821 separator, rather than '/'.
15822 (make_class_data): Likewise.
15823
15824 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
15825
15826 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15827 mkstemp.o. Get them from libiberty now.
15828
15829 1999-02-02 Jeffrey A Law (law@cygnus.com)
15830
15831 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15832
15833 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15834
15835 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15836 from libiberty.h
15837
15838 1999-02-02 Per Bothner <bothner@cygnus.com>
15839
15840 Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
15841 * jcf-write.c (generate_bytecode_return): New function.
15842 (generate_bytecode_insns): Use it, for RETURN_EXPR.
15843
15844 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
15845 generate special [fd]const_[01] instructions.
15846
15847 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
15848
15849 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
15850 handling OPCODE_lookupswitch or OPCODE_tableswitch.
15851
15852 1999-02-01 Per Bothner <bothner@cygnus.com>
15853
15854 * parse.y (patch_method_invocation): Handle calling static methods,
15855 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15856
15857 * parse.y (java_complete_lhs): Don't complain about unreachable
15858 exit condition in a do-while statement.
15859
15860 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15861
15862 * lex.c (java_read_char): Fixed utf8 decoding.
15863 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
15864 range.
15865 * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
15866 comments. Local variable `all_primitive' is gone. Broadened
15867 acceptance of `0' to floating point targets. `long' can now be
15868 widened to `double' or `float'.
15869 (valid_method_invocation_conversion_p): Added leading
15870 comment. Fixed tabulation.
15871 (build_string_concatenation): Optimize out left or right empty
15872 string constants.
15873
15874 1999-01-28 Per Bothner <bothner@cygnus.com>
15875
15876 * jcf-write.c (localvar_alloc): Only emit entry for
15877 LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
15878 (generate_bytecode_insns): Only call put_linenumber if
15879 debug_info_level > DINFO_LEVEL_NONE.
15880 * jvspec.c (lang_specific_driver): If no -O* or -g* option
15881 is specified, add -g1 (for compatibility wih javac).
15882
15883 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
15884
15885 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
15886 gjavah.o, check-init.o, jv-scan.o
15887
15888 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15889
15890 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
15891
15892 * gjavah.c: Include config.h and system.h.
15893
15894 * javaop.h (inline): Don't define, its handled by system.h.
15895 (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
15896 from `inline' to `static inline'.
15897
15898 * jcf.h (inline): Don't define, its handled by system.h.
15899
15900 * lex.c (inline): Likewise.
15901
15902 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
15903
15904 * lang-specs.h: Map -Qn to -fno-ident.
15905
15906 1999-01-29 Richard Henderson <rth@cygnus.com>
15907
15908 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
15909
15910 1999-01-29 Tom Tromey <tromey@cygnus.com>
15911
15912 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
15913 then cast it to Object before calling `append' method.
15914
15915 1999-01-28 Per Bothner <bothner@cygnus.com>
15916
15917 * check-init.c (check_bool2_init, check_bool_init, check_init):
15918 Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
15919 * jcf-write.c (generate_bytecode_insns): Likewise.
15920
15921 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
15922
15923 * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
15924 * parse.y (patch_cast): Allow a boolean to be cast into a
15925 boolean.
15926
15927 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15928
15929 * parse.y: (class_declaration:): Fixed indentation.
15930 (class_member_declaration:): Extra `;' after field declaration now
15931 accepted.
15932 (interface_declaration:): Removed debug messages in error reports.
15933 (patch_binop): Nodes created and returned inherit the orignal
15934 node's COMPOUND_ASSIGN_P flag value.
15935 (patch_cast): Fix cast from char to floating point.
15936
15937 1999-01-25 Andrew Haley <aph@cygnus.com>
15938
15939 * except.c, java-except.h (expand_resume_after_catch): new
15940 function.
15941 * expr.c (java_lang_expand_expr): call expand_resume_after_catch
15942 to branch back to main flow of control after a catch block.
15943
15944 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15945
15946 * Makefile.in (parse.o): Depend on $(CONFIG_H) and
15947 $(srcdir)/../system.h.
15948 (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
15949 (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
15950 (jcf-write.o): Likewise.
15951 (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15952 (mangle.o): Depend on $(srcdir)/../toplev.h.
15953 (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15954 (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15955
15956 * class.c: Include output.h and parse.h.
15957 (mangled_classname): Add the `const' keyword to a char*.
15958 (find_named_method): Hide unused function definition.
15959 (build_utf8_ref): Change type of variable `c' to unsigned char.
15960 Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
15961 (build_class_ref): Add the `const' keyword to a char*.
15962 (layout_class_method): Remove unused variable `buf'.
15963
15964 * decl.c (find_local_variable): Remove unused variable `rtl'.
15965 (pushdecl): Likewise for variables `different_binding_level' and
15966 `oldglobal'.
15967 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15968 (maybe_build_cleanup): Likewise for parameter `decl'.
15969
15970 * except.c (expand_start_java_handler): Mark parameter `range'
15971 with ATTRIBUTE_UNUSED.
15972
15973 * expr.c: Include except.h.
15974 (pop_type): Remove unused variable `i'.
15975 (pop_value): Likewise for variables `n_words' and `i'.
15976 (expand_java_arrayload): Likewise for variable `convert'.
15977 (java_lang_expand_expr): Likewise for variables `op0', `type',
15978 `mode', `unsignedp', `node' and `elements'.
15979 (expand_byte_code): Likewise for variables `prev_eh_ranges' and
15980 `eh_ranges'.
15981 (process_jvm_instruction): Add a `const' qualifier to a char*.
15982
15983 * gjavah.c (output_directory): Add the `const' keyword to a char*.
15984 (temp_directory): Likewise.
15985 (print_c_decl): Likewise.
15986 (print_method_info): Likewise.
15987 (decode_signature_piece): Likewise.
15988 (print_mangled_classname): Likewise.
15989
15990 * java-except.h: Provide prototypes for maybe_start_try,
15991 maybe_end_try and add_handler.
15992
15993 * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
15994 (parse_error_context): Likewise. Also add ATTRIBUTE_PRINTF_2.
15995 (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
15996 init_expr_processing, push_super_field, init_class_processing,
15997 can_widen_reference_to, class_depth, verify_jvm_instructions,
15998 maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
15999 set_local_type, merge_type_state, push_type, load_type_state,
16000 add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16001 emit_unicode_mangled_name): Add prototypes.
16002
16003 * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16004 (print_signature_type): Use ISDIGIT, not isdigit.
16005 (print_signature): Remove unused variable `j'.
16006
16007 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16008 int when comparing against one.
16009
16010 * jcf-parse.c: Include toplev.h.
16011
16012 * jcf-write.c: Likewise. Don't include <string.h> or <sys/stat.h>.
16013 (localvar_free): Remove unused variable `i'.
16014 (generate_bytecode_conditional): Likewise for variable `kind'.
16015
16016 * jv-scan.c: Include config.h and system.h. Remove redundant
16017 OS header and gansidecl.h includes.
16018 (warning): Add the `const' keyword to a char*. Also add
16019 ATTRIBUTE_PRINTF_1 to the prototype. Check ANSI_PROTOTYPES, not
16020 __STDC__, when determining whether to use ANSI-isms.
16021 (fatal): Likewise. Also add ATTRIBUTE_UNUSED.
16022 (xmalloc): Don't redundantly prototype here.
16023 (main): Remove unused parameter `envp'. Also fix the arguments
16024 passed to function `fatal' to match the format specifier.
16025
16026 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16027
16028 * mangle.c: Include toplev.h.
16029 (emit_unicode_mangled_name): Declare parameter `len'.
16030
16031 * parse.y (parse_warning_context): Add the `const' keyword to a
16032 char*. Also add ATTRIBUTE_PRINTF_2 to the prototype. Check
16033 `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16034 (issue_warning_error_from_context): Add the `const' keyword to
16035 a char*.
16036 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
16037 not `__STDC__' for whether to use ANSI-isms.
16038
16039 * typeck.c (incomplete_type_error): Mark parameters `value' and
16040 `type' with ATTRIBUTE_UNUSED.
16041 (parse_signature_type): Use ISDIGIT, not isdigit.
16042
16043 * verify.c (check_pending_block): Add the `const' keyword to a char*.
16044 (verify_jvm_instructions): Likewise. Remove unused variables
16045 `field_name' and `default_val'.
16046
16047 * zextract.c: Include config.h and system.h. Remove redundant
16048 OS header includes.
16049
16050 * zipfile.h: Prototype `read_zip_archive'.
16051
16052 1999-01-21 Andrew Haley <aph@cygnus.com>
16053
16054 * typeck.c (convert): Allow conversions to void type: some
16055 optimizations in gcc do this.
16056
16057 1999-01-21 Andrew Haley <aph@cygnus.com>
16058
16059 * typeck.c (convert_ieee_real_to_integer): New function.
16060 (convert): When not using fast-math and using hardware fp, convert
16061 an IEEE NaN to zero.
16062
16063 1999-01-18 Andrew Haley <aph@cygnus.com>
16064
16065 * parse.y (patch_binop): Do a type conversion from signed to
16066 unsigned and then back to signed when a ">>>" is found.
16067
16068 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
16069
16070 * java-tree.h: (check_for_initialization): Added prototype.
16071 * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16072 * parse.y (do_resolve_class): Removed unused locals.
16073 (read_import_dir): Likewise.
16074 (resolve_qualified_expression_name): Array creation
16075 expressions are valid primary expressions.
16076 (qualify_ambiguous_name): Likewise.
16077 (patch_synchronized_statement): Removed unused local.
16078
16079 1999-01-17 Jeffrey A Law (law@cygnus.com)
16080
16081 * Makefile.in (zextract.o): Add dependencies.
16082
16083 * Makefile.in: Do not put ^Ls at the start of a line.
16084
16085 1999-01-15 Per Bothner <bothner@cygnus.com>
16086
16087 * expr.c (process_jvm_instruction): Coerce to correct Throwable
16088 sub-type the result of the call that gets the exception value.
16089
16090 * parse.y (java_complete_expand_methods): If flags_syntax_only,
16091 don't call finish_class.
16092
16093 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
16094 clear found before continuing.
16095
16096 * verify.c (verify_jvm_instructions): On an array load, allow
16097 and handle top of stack to be TYPE_NULL.
16098
16099 * gjavah.c (generate_access): Translate Java package private or
16100 protected access to C++ public, but with a comment.
16101
16102 1999-01-13 Andrew Haley <aph@cygnus.com>
16103
16104 * expr.c (generate_name): Name prefix changed to avoid clashes
16105 with assembler temp labels.
16106
16107 * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16108 MODIFY_EXPR. Without this, code for the assignment may not be
16109 generated at all and the synchronized statement will read an
16110 uninitialized variable.
16111
16112 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
16113
16114 * class.c (maybe_layout_super_class): Fixed returned value.
16115 * lex.c: Added 1999 to the copyright.
16116 (java_init_lex): Initialize java_lang_imported.
16117 * lex.h: Added 1999 to the copyright.
16118 * parse.h: Added 1999 to the copyright.
16119 (REGISTER_IMPORT): Fixed typo in trailing macro.
16120 (CURRENT_OSB): New macro.
16121 (struct parser_ctxt): New fields osb_depth, osb_limit.
16122 * parse.y (java_lang_id): New global variable.
16123 (type_import_on_demand_declaration): Don't import java.lang.* twice.
16124 (array_creation_expression:): Use CURRENT_OSB.
16125 (dims:): Uses a stack to keep track of array dimensions.
16126 (cast_expression:): Use CURRENT_OSB.
16127 (find_expr_with_wfl): Return NULL if node found doesn't meet the
16128 conditions.
16129 (register_fields): Fixed typos in comment.
16130 (check_method_redefinition): Fixed comment indentation.
16131 (java_check_regular_methods): Set saved found wfl to NULL after
16132 having reinstalled it in the previously found DECL_NAME.
16133
16134 1999-01-10 Richard Henderson <rth@cygnus.com>
16135
16136 * gjavah.c (java_float_finite): Use a union to do type punning.
16137 (java_double_finite): Likewise.
16138
16139 1999-01-09 Per Bothner <bothner@cygnus.com>
16140
16141 * parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL
16142 on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16143 (patch_new_array_init): Clear TREE_CONSTANT also if INDIRECT_REF.
16144 (register_fields): Set TREE_STATIC on NEW_ARRAY_INIT, not on
16145 CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16146 * expr.c (java_lang_expand_expr): Check TREE_STATIC of NEW_ARRAY_INIT.
16147
16148 1999-01-08 Per Bothner <bothner@cygnus.com>
16149
16150 * check-init.c (check_init): If compiling to native, we don't
16151 see THROW_EXPR. Instead, look for a call to throw_node (_Jv_Throw).
16152
16153 1999-01-08 Tom Tromey <tromey@cygnus.com>
16154
16155 * parse-scan.y (variable_declarator_id): Set or increment
16156 bracket_count.
16157 (bracket_count): New global.
16158 (formal_parameter): Handle case where bracket pairs trail variable
16159 declarator id.
16160
16161 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
16162
16163 * jcf-parse.c (yyparse): variable len changed from a char to an
16164 int to prevent overflow.
16165
16166 1999-01-06 Per Bothner <bothner@cygnus.com>
16167
16168 * java-tree.h: Declare read_class.
16169 * jcf-parse.c (read_class): New function.
16170 (load_class): Now just call read_class.
16171
16172 * java-tree.h (java_parse_abort_on_error): Only return if new errors.
16173 * jcf-parse.c (parse_source_file): Declare save_error_count,
16174 which is needed by java_parse_abort_on_error macro,
16175 * parse.y (java_layout_classes, java_expand_classes): Likewise.
16176
16177 * parse.y (register_fields): Set TREE_STATIC flag of NEW_ARRAY_INIT
16178 constructor, if initializing a static field.
16179 (patch_new_array_init): Set TREE_CONSTANT if it is.
16180 * expr.c (java_lang_expand_expr): For a static array constructor
16181 of primitive elements, allocate the array itself statically.
16182 Disabled until we can set the vtable field statically.
16183
16184 * check-init.c: New file. Checks for definite assignment.
16185 * Makefile.in (JAVA_OBJS): Add check-init.o.
16186 * parse.y (java_complete_expand_method): Call check_for_initialization.
16187 * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY): Moved to java-tree.h.
16188
16189 1999-01-06 Graham <grahams@rcp.co.uk>
16190
16191 * parse.y : include system.h instead of including
16192 standard headers directly with the exception of <dirent.h>.
16193
16194 1999-01-06 Per Bothner <bothner@cygnus.com>
16195
16196 * lex.h: Moved static function declarations to lex.c,
16197 to shut up some -Wall warnings.
16198 * lex.c: Static function declarations moved here.
16199 * jcf-dump.c: Small fixes to shut up -Wall warnings.
16200
16201 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16202
16203 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16204
16205 1998-12-22 Per Bothner <bothner@cygnus.com>
16206
16207 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
16208 * verify.c (verify_jvm_instructions): Fix off-by-one error.
16209
16210 * jcf-write.c (CHECK_PUT): Add (void) cast to avoid -Wall warnings.
16211 (localvar_alloc): Change return type to void,
16212 (emit_unop): Remove unused variable size.
16213
16214 * jcf-write.c (struct jcf_block): Add new union.
16215 (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC): New macros.
16216 (call_cleanups): New functions.
16217 (struct jcf_partial): New fields num_finalizers and return_value_decl.
16218 (generate_bytecode_insns): Support CLEANUP_POINT_EXPR and
16219 WITH_CLEANUP_EXPR. Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16220 * lang.c (lang_init): Call using_eh_for_cleanups.
16221 * parse.y (java_complete_lhs): For SYNCHRONIZED_EXPR, defer
16222 completing operands to patch_synchronized_statement.
16223 Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16224 (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16225 WITH_CLEANUP_EXPR instead of TRY_EXPR.
16226
16227 1998-12-20 John F. Carr <jfc@mit.edu>
16228
16229 * Make-lang.in: Comment out control-Ls; they upset some makes.
16230
16231 1998-12-18 Tom Tromey <tromey@cygnus.com>
16232
16233 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16234 consistently.
16235
16236 1998-12-17 Tom Tromey <tromey@cygnus.com>
16237
16238 * parse.y (DIR_SEPARATOR): New define.
16239 (check_class_interface_creation): Use it.
16240
16241 * parse-scan.y (report_main_declaration): Recognize
16242 `java.lang.String' in argument to main.
16243
16244 1998-12-16 Per Bothner <bothner@cygnus.com>
16245
16246 * parse.y (create_interface): Remove bogus test.
16247
16248 1998-12-16 Per Bothner <bothner@cygnus.com>
16249
16250 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
16251 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
16252
16253 1998-12-16 Tom Tromey <tromey@cygnus.com>
16254
16255 * parse-scan.y (qualified_name): Use correct sprintf format.
16256
16257 1998-12-15 Tom Tromey <tromey@cygnus.com>
16258
16259 * gjavah.c (print_field_info): Changed how most negative number is
16260 printed.
16261
16262 1998-12-14 Per Bothner <bothner@cygnus.com>
16263
16264 * parse.y (fold_constant_for_init): New function.
16265 (resolve_expression_name): Don't replace static final
16266 constant-initialized fields by its value.
16267 (java_complete_lhs): New. Same as java_complete_tree, except does
16268 not replace static final constant-initialized fields by their values.
16269 (register_fields): If there is an initializer, set DECL_INITIAL and
16270 MODIFY_EXPR_FROM_INITIALIZATION_P.
16271 (java_complete_tree): For MODIFY_EXPR, use java_complete_lhs for lhs.
16272 Only call patch_initialized_static_field if
16273 MODIFY_EXPR_FROM_INITIALIZATION_P.
16274 (patch_initialized_static_field): If not valid constant, clear
16275 DECL_INITIAL.
16276
16277 * parse.y (lookup_field_wrapper): Fix thinko.
16278
16279 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
16280 set and restore global lineno.
16281
16282 1998-12-14 Tom Tromey <tromey@cygnus.com>
16283
16284 * gjavah.c (print_field_info): If value to print is the smallest
16285 value of its size, then print as hex to avoid later warnings from
16286 C++ compiler.
16287
16288 1998-12-14 Tom Tromey <tromey@cygnus.com>
16289
16290 * gjavah.c (decompile_method): Decompile `return null'.
16291 (process_file): Generate `#pragma interface'.
16292 (method_declared): New global.
16293 (print_method_info): Set it.
16294 (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16295 (print_method_info): Handle abstract methods.
16296
16297 1998-12-13 Per Bothner <bothner@cygnus.com>
16298
16299 * parse.y (patch_method_invocation): If class_decl is null
16300 (e.g. an array type), use original type.
16301
16302 * parse.y (check_thrown_exceptions): Temporary hack to suppress
16303 errors about uncaught exception from clone (of array, specifically).
16304
16305 1998-12-13 Tom Tromey <tromey@cygnus.com>
16306
16307 * gjavah.c (decompile_method): Handle all types of `return'
16308 opcode. Decompile `return this' and `return'.
16309 (method_access): New global.
16310 (print_method_info): Set it.
16311 (decompile_method): Don't decompile a synchronized method.
16312
16313 1998-12-13 Tom Tromey <tromey@cygnus.com>
16314
16315 * jcf-reader.c (jcf_parse_one_method): Recognize
16316 HANDLE_END_METHOD.
16317 * gjavah.c (HANDLE_END_METHOD): New macro.
16318 (HANDLE_CODE_ATTRIBUTE): New macro.
16319 (decompile_method): New function.
16320 (print_method_info): Don't print `;\n' at end of function decl.
16321 Include java-opcodes.h.
16322 (decompiled): New global.
16323
16324 1998-12-12 Per Bothner <bothner@cygnus.com>
16325
16326 * class.c (build_class_ref): Handle PRIMTYPE.class if
16327 flag_emit_class_files.
16328 * expr.c (expand_java_field_op): Don't optimize java.lang.XXX.TYPE
16329 if flag_emit_class_files.
16330 * parse.y (java_complete_tree): Pre-liminary support for
16331 COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16332
16333 * parse.y (patch_synchronized_statement): Don't call monitorexit
16334 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
16335
16336 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
16337
16338 * zipfile.h (opendir_in_zip): New declaration.
16339 * jcf-io.c (saw_java_source): Moved to jcf-parse.c.
16340 (opendir_in_zip): New function, using code from open_in_zip.
16341 (open_in_zip): Call opendir_in_zip.
16342 (find_class): Remove no-longer-used do_class_file parameter,
16343 but add source_ok parameter. Change logic so if we find a .java file,
16344 we don't look for .class in later classpath emtries.
16345 * jcf-parse.c (load_class): Pass saw_java_source to find_class.
16346 (jcf_figure_file_type): Only call open_in_zip if correct magic number.
16347 * gjavah.c: Update call to find_class.
16348 * jcf-dump.c: Likewise.
16349
16350 * jcf-write.c (put_linenumber): Handle duplicate line numbers.
16351 (generate_bytecode_insns): For EXPR_WITH_FILE_LOCATION, do
16352 nothing if body is empty_stmt_node.
16353 Various little fixes so SP gets correctly adjusted.
16354 For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16355 For CALL_EXPR, test if static first.
16356 (generate_classfile): Ignore fields that are DECL_ARTIFICIAL,
16357 such as the ones we create for Object and Class.
16358 Set and restore current_function_decl.
16359 * parse.y: Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16360 (note_possible_classname): New function.
16361 (read_import_entry): Removed. Merged with read_import_dir.
16362 (read_import_dir): Don't call find_class - that only gives us
16363 the first classpath entry having the needed package.
16364 Use the struct buffer data structure from buffer.h.
16365 (read_import_dir, find_in_imports_on_demand): The remembered
16366 class names now use '.' (not '/') as package separator.
16367
16368 * parse.y (java_complete_expand_methods): Call write_classfile
16369 here, and not in java_expand_classes (which only gets first class).
16370
16371 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
16372
16373 * parse.y (<type_declaration>): Do maybe_generate_clinit last.
16374 (register_fields): If a static fields has an initializer, just
16375 chain it on ctxp->static_initialized, and handle later.
16376 (java_complete_expand_methods): Force <clinit> first.
16377 (resolve_expression_name, resolve_field_access): Just get DECL_INITIAL
16378 - it's already been completed.
16379 (patch_initialized_static_field): New function.
16380 (java_complete_field): Call it.
16381
16382 1998-12-12 Per Bothner <bothner@cygnus.com>
16383
16384 * expr.c (encode_newarray_type, build_new_array): New functions.
16385 * java-tree.h: Declare build_new_array.
16386 * jcf-write.c (patch_newarray): Use build_new_array.
16387
16388 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
16389 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
16390
16391 * parse.y (patch_new_array_init): Re-organize.
16392 Now is passed the actual array (pointer) type of the value.
16393 Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16394 (patch_array_constructor): Removed - merged into patch_new_array_init.
16395 (java_complete_tree): Update patch_new_array_init.
16396
16397 * jcf-write.c (find_constant_index): New function.
16398 (generate_bytecode_insns): Use find_constant_index.
16399 (generate_classfile): Use find_constant_index for ConstantValue.
16400
16401 1998-12-11 Tom Tromey <tromey@cygnus.com>
16402
16403 * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16404 * decl.c (init_decl_processing): Renamed dtable -> vtable.
16405 * class.c (make_class_data): Renamed dtable -> vtable, and
16406 dtable_method_count -> vtable_method_count.
16407
16408 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16409
16410 * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16411 global variables, initialized.
16412 * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16413 Declared new global variables.
16414 * lex.c (java_lex): Return long_zero_node, float_zero_node,
16415 double_zero_node, integer_zero_node upon direct matching.
16416 * parse.y (purify_type_name): Added function prototype.
16417 (duplicate_declaration_error_p): Consider new_type as potentially
16418 being a incomplete type. Use purify_type_name on type string.
16419 (method_header): saved_type: unused variable removed. Don't figure
16420 return type if method name is invalid.
16421 (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16422 processed by patch_unaryop.
16423 (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16424 increment/decrement node into its original type after binary
16425 numeric promotion on its operands.
16426
16427 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
16428
16429 * parse.y (array_initializer:): Array init operand is NULL_TREE
16430 instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16431 now an error. Fixed indentation problems.
16432 (patch_string): Handle error_mark_node as an argument.
16433 (patch_new_array_init): Fixed indentation problems.
16434 (array_constructor_check_entry): Removed check on null wfl_value.
16435 Return an error if wfl_value's walk returns an error.
16436
16437 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
16438
16439 * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16440 * lex.c (java_lex): Remember column position before advancing one
16441 token. Retain location information on OCB_TK.
16442 * lex.h (typedef struct java_lc): Added new field.
16443 * parse.h (GET_SKIP_TYPE): New macro.
16444 (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16445 * parse.y (build_new_array_init, patch_new_array_init,
16446 patch_array_constructor, maybe_build_array_element_wfl,
16447 array_constructor_check_entry): New function prototypes.
16448 (switch_block:): Tagged <node>.
16449 (OCB_TK): Tagged <operator>.
16450 (array_initializer:): Installed actions.
16451 (variable_initializer): Build location information on element if
16452 necessary.
16453 (switch_statement:): Fixed indentation typo.
16454 (switch_block:): Redefined default action.
16455 (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16456 (patch_assignment): Removed duplicate code.
16457 (maybe_build_array_element_wfl, build_new_array_init,
16458 patch_new_array_init, patch_array_constructor,
16459 array_constructor_check_entry): New functions.
16460
16461 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
16462
16463 * parse.y (array_initializer): Tagged <node>.
16464 (variable_initializer:): Use default rule.
16465 (array_initializer:): Defined actions.
16466 (variable_initializers:): Likewise.
16467 (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16468 non-static field accesses.
16469 (patch_invoke): Fixed indentation typo.
16470 (java_complete_tree): Likewise.
16471 (build_labeled_block): Changed leading comment. Generate an error
16472 in case of duplicate loop labels.
16473 (patch_conditional_expr): Patch results of string concatenation
16474 operations.
16475
16476 1998-12-06 Per Bothner <bothner@cygnus.com>
16477
16478 * constants.c (find_methodref_index): When the class is an interface,
16479 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16480
16481 * decl.c (finit_identifier_node): Use "$finit$", rather than
16482 "<finit>" (which Sun's verifier rejects).
16483 * parse.y (maybe_generate_finit): Leave out meaningless final flag.
16484 (generate_field_initialization_code): Removed.
16485 (fix_constructors) Don't add call to $finit$ here (wrong order).
16486 (patch_method_invocation): Add $finit$ call here.
16487
16488 * java-tree.h (CALL_USING_SUPER): New macro.
16489 * parse.y (patch_invoke): Remove im local variable.
16490 (patch_method_invocation, patch_invoke): Don't pass super parameter.
16491 (patch_invoke): Use CALL_USING_SUPER instead of from_super parameter.
16492 (resolve_qualified_expression_name): Maybe set CALL_USING_SUPER.
16493
16494 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
16495
16496 * parse.y (java_complete_tree): Don't complain about unreachable
16497 statement if it is empty_stmt_node.
16498
16499 * jcf-write.c (find_constant_wide): New function.
16500 (push_long_const): Use find_constant_wide.
16501
16502 * jcf-write.c (generate_bytecode_insn): Fix bug in switch handling.
16503 (generate_bytecode_insn): Use correct dup variant for MODIFY_EXPR.
16504 Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16505 Emit invokeinterface when calling an interface method.
16506 Emit invokespecial also when calling super or private methods.
16507
16508 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
16509
16510 1998-12-06 Per Bothner <bothner@cygnus.com>
16511
16512 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
16513
16514 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16515
16516 * java-tree.h (java_layout_seen_class_methods): New function
16517 prototype.
16518 (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16519 * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16520 * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16521 * parse.y (method_declarator:): Defined action.
16522 (issue_warning_error_from_context): input_filename saved, set to
16523 the appropriate value and restored after java_error is called.
16524 (build_unresolved_array_type): Fixed comment.
16525 (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16526 (method_header): Deal with return type the same way type are
16527 handled for fields and method's parameters and local variables
16528 types are handled.
16529 (check_method_redefinition): Removed extra CR.
16530 (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16531 (java_layout_seen_class_methods): New function.
16532 (java_layout_classes): Call java_layout_seen_class_methods.
16533
16534 1998-12-03 Per Bothner <bothner@cygnus.com>
16535
16536 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
16537
16538 1998-12-03 Per Bothner <bothner@cygnus.com>
16539
16540 * jcf-dump.c (main): Fix error message.
16541 * jcf-path.c (add_entry): Style fix.
16542
16543 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
16544
16545 * class.c (layout_class_method): Call build_java_argument_signature
16546 on constructors too.
16547 * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16548 (patch_method_invocation): Define a primary when resolving an
16549 expression name. Augmented comment on code checking illegal `this'
16550 usage. Loosened it test by accepting NEW_CLASS_EXPR.
16551
16552 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
16553
16554 * class.c (layout_class_method): Don't report error on non-static
16555 overriding static if the method is private.
16556 * java-tree.h (finish_class): Prototype added.
16557 * lex.c (java_get_line_col): Handle col argument -2 value.
16558 * parse.h: All static method declarations moved to parse.y.
16559 * parse.y: Now contains all static method declarations previously
16560 found in parse.h.
16561 (find_expr_with_wfl, missing_return_error,
16562 unreachable_stmt_error): New functions.
16563 (java_get_real_method_name): Identify constructors bearing class
16564 names in source code compiled classes only.
16565 (java_complete_expand_methods): Call missing_return_error.
16566 (invocation_mode): Private methods invoked as static methods.
16567 (java_complete_tree): Call unreachable_stmt_error.
16568
16569 1998-12-01 Tom Tromey <tromey@cygnus.com>
16570
16571 * Makefile.in (+target): Removed.
16572 (+xmake_file): Likewise.
16573 (+tmake_file): Likewise.
16574 (.NOEXPORT): Removed duplicate.
16575
16576 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16577
16578 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16579
16580 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
16581
16582 * jvgenmain.c: Remove the xmalloc prototype, we get it from
16583 libiberty.h. Provide an xmalloc definition.
16584
16585 * jvspec.c: Remove the xmalloc prototype.
16586
16587 * parse-scan.y: Include config.h and system.h. Don't include
16588 OS headers or gansidecl.h. Don't prototype xmalloc/xstrdup.
16589 Provide an xstrdup definition.
16590
16591 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
16592
16593 * jcf-path.c (add_entry): Recognize ".jar" too.
16594 * lang-specs.h: Likewise.
16595
16596 1998-11-26 Per Bothner <bothner@cygnus.com>
16597
16598 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
16599 soft_monitorenter_node, soft_monitorexit_node, throw_node.
16600
16601 * jcf-write.c (generate_bytecode_insns):
16602 Handle pre/post-increment/decrement of long.
16603
16604 * jcf-write.c (generate_bytecode_insns):
16605 Handle missing exception handler (finally for synchronized).
16606
16607 1998-11-25 Per Bothner <bothner@cygnus.com>
16608
16609 * java-tree.h (end_params_node): Declare global.
16610 * decl.c (end_params_node): New global.
16611 (init_decl_processing, start_java_method): Use end_params_node for
16612 end of list of parameter types. Follows correct gcc conventions.
16613 * expr.c (pop_argument_types, pop_arguments): Likewise.
16614 * lang.c (put_decl_node): Likewise.
16615 * typeck.c (various places): Likewise.
16616 * class.y (various places): Likewise.
16617 * parse.y (various places): Likewise.
16618
16619 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
16620 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
16621
16622 * class.c: Add #include flags.h, remove no-longer needed declaration.
16623
16624 * class.c (layout_class_method): Remove commented-out code, re-format.
16625 Don't add vtable entry (or index) for private methods.
16626 * expr.c (expand_invoke): A private method is implicitly final.
16627 * class.c (make_class_data): If inlining or optimizing,
16628 skip private methods.
16629
16630 * class.c (finish_class): New function. Calls existing methods,
16631 but alls emits deferred inline functions.
16632 * jcf-parse.c (parse_class_file): Call finish_class.
16633 * parse.y (java_complete_expand_methods): Likewise.
16634
16635 * expr.c (build_java_binop): Explicit default, to silence -Wall.
16636
16637 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
16638
16639 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
16640
16641 * jcf-write.c (generate_bytecode_conditional): Fix typo.
16642
16643 1998-11-24 Per Bothner <bothner@cygnus.com>
16644
16645 * (generate_classfile): Always write class access flag with
16646 ACC_SUPER set.
16647
16648 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
16649
16650 * class.c (maybe_layout_super_class): New function.
16651 (layout_class): Reorganized. Loop on class methods dispatched into
16652 a new function. Call maybe_layout_super_class.
16653 (layout_class_methods, layout_class_method): New functions.
16654 * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16655 class.
16656 (expand_invoke): Likewise.
16657 * java-tree.h (all_class_list): New global variable declared.
16658 (layout_class_methods, layout_class_method): New function
16659 prototypes.
16660 (LAYOUT_SEEN_CLASS_METHODS): New macro.
16661 * jcf-parse.c (all_class_list): New global variable.
16662 (load_class): Extended what class_or_name can be. Use parser
16663 context mechanism to save globals before calling jcf_parse.
16664 (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16665 is set on the file name.
16666 (jcf_parse): Layout class methods when Object is loaded, otherwise
16667 record class in all_class_list for delayed method layout.
16668 (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16669 * lang.c (put_decl_node): Decode <init> into the decl context
16670 class name.
16671 * lex.c (java_allocate_new_line): Use xmalloc.
16672 * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16673 pointers, not TREE_LIST elements.
16674 (struct parser_ctxt): Fixed comment indentations, added comments
16675 and reordered some fields.
16676 (java_check_methods): Function prototype removed.
16677 * parse.y (java_push_parser_context): Use xmalloc.
16678 (java_parser_context_restore_global): Pop extra pushed ctxp only
16679 when there's nothing next.
16680 (maybe_create_class_interface_decl): Fixed comment, add new
16681 created class decl to all_class_list.
16682 (method_header): Use GET_REAL_TYPE on argument's types.
16683 (method_declarator): Use GET_REAL_TYPE, change type to the real
16684 type in TREE_LIST dependency node. Build argument list with the
16685 real type.
16686 (create_jdep_list): Use xmalloc. Removed allocation error message.
16687 (obtain_incomplete_type): Fixed leading comment. Broadened
16688 incoming argument meaning.
16689 (register_incomplete_type): Use xmalloc. Removed allocation error
16690 message.
16691 (safe_layout_class): Fixed leading comment.
16692 (jdep_resolve_class): Reversed if statement condition and switch
16693 if and else bodies.
16694 (resolve_and_layout): Fixed leading comment. Broadened incoming
16695 argument meaning.
16696 (complete_class_report_errors): New local variable name, for
16697 clarity. purify_type_name used for all error cases.
16698 (java_get_real_method_name): Stricter check on constructors.
16699 (java_check_regular_methods): Reverse methods list only if not
16700 already laid out. Layout artificial constructor.
16701 (java_check_methods): Deleted.
16702 (source_start_java_method): Obtain incomplete type for patchable
16703 method arguments.
16704 (java_layout_classes): Fixed leading comment. Use
16705 LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
16706 statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
16707 before returning. Fixed comments.
16708 (java_expand_classes): Check for errors up front.
16709 (patch_method_invocation): Class to search is resolved and laid
16710 out.
16711
16712 1998-11-24 Per Bothner <bothner@cygnus.com>
16713
16714 * expr.c (java_lang_expand_expr): Add missing emit_queue.
16715
16716 * javaop.h (int8): Removed - not used.
16717 (jbyte): Redefine portably with correct signedness.
16718
16719 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
16720
16721 * jcf-write.c (generate_bytecode_insns): Fix typo
16722 OPCODE_getstatic to OPCODE_getfield.
16723
16724 * java-tree.def (CASE_EXPR, DEFAULT_EXPR): Kind is 'x', not '1'.
16725 * parse.y (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR,
16726 set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
16727
16728 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
16729
16730 * jcf-parse.c (jcf_parse_source): Function returned type is
16731 void. Added prototype.
16732 (jcf_parse): Function returned type is void.
16733 (yyparse): Remove call to fclose on the last parsed file.
16734
16735 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16736
16737 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
16738
16739 * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
16740 (layout_class): Cope with methods featuring WFL in decl names.
16741 * decl.c (unqualified_object_id_node): New global variable,
16742 initialized.
16743 (build_decl_no_layout): Removed.
16744 * expr.c (build_primtype_type_ref): Handle Double.
16745 (java_lang_expand_expr): Fixed indentations.
16746 * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
16747 (flag_wall, flag_redundant, flag_not_overriding,
16748 flag_static_local_jdk1_1, unqualified_object_id_node): Global
16749 variable declarations.
16750 (build_decl_no_layout): Removed prototype.
16751 (java_get_real_method_name): Added prototype.
16752 (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
16753 (java_parse_abort_on_error): Macro now just returns.
16754 * jcf-parse.c (jcf_parse_source): Check fclose returned
16755 value. Call emit_register_classes if java_report_errors returns
16756 zero.
16757 * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
16758 flag_static_local_jdk1_1): New integer flags.
16759 (lang_decode_option): New flags set here.
16760 * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
16761 (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
16762 the flag_redundant variable.
16763 (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
16764 when parsing java.lang.Object class.
16765 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
16766 NULL_TREE to build.
16767 (resolve_qualified_expression_name): Fixed indentation.
16768 (patch_array_ref): Changed prototype.
16769 (not_initialized_as_it_should_p): Prototype removed.
16770 (java_report_errors): Added function prototype.
16771 * parse.y (formal_parameter:): Changed error message for not yet
16772 supported final parameters.
16773 (class_type_list:): Set both PURPOSE and VALUE of created
16774 TREE_LIST to be class_type.
16775 (primary_no_new_array:): Handle class literals on primitive types.
16776 (parse_warning_context): Reinstalled correct force_error and
16777 do_warning flags setups.
16778 (java_report_errors): Changed prototype. Return java_error_count
16779 value.
16780 (variable_redefinition_error): Consider treating variable type as
16781 a fake pointer.
16782 (create_interface): Warn about redundant abstract modifier if
16783 flag_redundant is set. Changed error message.
16784 (lookup_field_wrapper): Save/restore globals before/after looking
16785 up field.
16786 (duplicate_declaration_error_p): Consider treating declaration
16787 type as a fake pointer.
16788 (register_fields): Extract real type from dependency node. Check
16789 for duplicate field declaration after type adjustment. Use
16790 DECL_INITIAL to store static final initialized values.
16791 (method_header): Extract real function type from dependency node.
16792 (check_abstract_method_header): Use GET_METHOD_NAME.
16793 (obtain_incomplete_type): Layout fake pointer type.
16794 (safe_layout_class): Don't try to check for methods before layout.
16795 (java_complete_class): Don't check for correct throws clause
16796 elements inheritance here.
16797 (resolve_and_layout): Broadened name parameter meaning.
16798 (reset_method_name): Use GET_METHOD_NAME.
16799 (java_get_real_method_name): New function.
16800 (java_check_regular_methods): Don't check methods in
16801 java.lang.Object. Verify lineage of throws clause elements. Use
16802 flag_no_overriding in warning report.
16803 (check_throws_clauses): Don't check if class was from
16804 bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
16805 (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
16806 (declare_local_variables): Use flag_static_local_jdk1_1 to report
16807 warning on unsupported final local variables. Use build_decl
16808 instead of build_decl_no_layout. Get real local variable type from
16809 dependency node.
16810 (source_start_java_method): Get real parameter type from
16811 dependency node. Call build_decl instead of build_decl_no_layout.
16812 (java_layout_classes): Reverse tree and layout type and class as
16813 required. Mark class as loaded when done.
16814 (resolve_field_access): Fixed indentation. Restricted condition
16815 leading to static field access code generation. Set field_type
16816 decl's TREE_TYPE if QUAL_DECL_TYPE not available.
16817 (resolve_qualified_expression_name): Initialize type_found to
16818 null. Handle static field resolved during qualification. Fixed
16819 layout on non primitive field decl types.
16820 (not_accessible_p): Fixed typo in comment.
16821 (patch_method_invocation): Resolve and layout class to search from
16822 type.
16823 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16824 layout non primitive type, if necessary. Make method node only to
16825 report errors.
16826 (find_applicable_accessible_methods_list): Consider WFL'ed method
16827 decl names. Fixed indentation.
16828 (argument_types_convertible): Resolve and layout target type if
16829 necessary.
16830 (java_complete_tree): Fixed indentation problems. Rewrote
16831 CALL_EXPR thrown exceptions check. Re-installed further processing
16832 of the assignment in certain cases.
16833 (patch_assignment): Call maybe_build_primttype_type_ref to perform
16834 inlining on class literals.
16835 (valid_builtin_assignconv_identity_widening_p): Cope with constant
16836 0 literal.
16837 (valid_method_invocation_conversion_p): Likewise.
16838 (patch_string): Temporary disable forbidden use of `this' in
16839 explicit constructor invocations when doing string concatenation
16840 within their scope.
16841 (patch_unaryop): Added comment. Reinstalled code to disable
16842 further check on assignment operation with cast expression RHS.
16843 (patch_switch_statement): Fixed indentation.
16844 (build_try_statement): Call build_decl instead of
16845 build_decl_no_layout.
16846 (patch_synchronized_statement): Likewise.
16847 (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
16848 IS_UNCHECKED_EXPRESSION_P.
16849 (check_thrown_exceptions_do): Changed leading comment. Resolve and
16850 layout argument exception type.
16851 (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
16852 of IS_UNCHECKED_EXPRESSION_P.
16853
16854 1998-11-18 Anthony Green <green@cygnus.com>
16855
16856 * jcf-parse.c (yyparse): Open class file in binary mode.
16857
16858 1998-11-15 Per Bothner <bothner@cygnus.com>
16859
16860 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
16861
16862 * jcf-write.c (perform_relocations): Move check out one loop.
16863
16864 1998-11-15 Anthony Green <green@hoser.cygnus.com>
16865
16866 * Make-lang.in: Fix reference to srcdir.
16867 * jv-scan.c: Add missing xmalloc prototype.
16868 * jvgenmain.c: Ditto.
16869
16870 1998-11-15 Per Bothner <bothner@cygnus.com>
16871
16872 * decl.c (error_mark_node), java-tree.h: New global.
16873 * parse.y: Use empty_stmt_node instead of size_zero_node.
16874 (build_if_else_statement): If missing else, use empty_stmt_node.
16875
16876 * parse.y (not_initialized_as_it_should_p): Removed, with its callers.
16877 (java_complete_expand_method): Complain if return is missing.
16878 (java_check_regular_methods): Comment out incorrect error check.
16879 (not_accessible_p): Fix incorrect handling of protected methods.
16880 (patch_method_invocation): Pass correct context to not_accessible_p.
16881 (find_applicable_accessible_methods_list): Likewise.
16882 (qualify_ambiguous_name): If ARRAY_REF, it's an expression name.
16883 (java_complete_tree): For CASE_EXPR and DEFAULT_EXPR, set
16884 TREE_TYPE (to void_type_node); otherwise expand_expr crashes.
16885 (patch_if_else_statement): Fix setting of CAN_COMPLETE_NORMALLY.
16886
16887 * jcf-write.c (CHECK_OP, CHECK_PUT): Add some error checking.
16888 (push_int_const): Remove reundant NOTE_PUSH.
16889 (generate_bytecode_insns - case STRING_CST): Do NOTE_PUSH.
16890 (- case SWITCH_EXPR): Fix code generation bug.
16891 (- case PREDECREMENT_EXPR etc): Remove redundant NOTE_PUSH.
16892 (generate_classfile): More robust for abstract methods.
16893
16894 1998-11-15 Anthony Green <green@cygnus.com>
16895
16896 * Makefile.in: jv-scan and jvgenmain all require libiberty.
16897 * Make-lang.in: Ditto.
16898
16899 * jv-scan.c: Remove xmalloc and xstrdup definitions.
16900 * jvgenmain: Ditto.
16901
16902 1998-11-15 Per Bothner <bothner@cygnus.com>
16903
16904 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
16905
16906 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
16907
16908 1998-11-14 Per Bothner <bothner@cygnus.com>
16909
16910 Allow uses of interface types to verify. This is not really
16911 type-safe, but it matches what Sun does, and is OK as long as
16912 there are appropriate run-time checks.
16913 * verify.c (merge_types): If merging two interface types,
16914 just set the result to java.lang.Object.
16915 * expr.c (pop_type): Any interface is matches by java.lang.Object.
16916
16917 1998-11-13 Tom Tromey <tromey@cygnus.com>
16918
16919 * gjavah.c (main): Handle --output-class-directory argument.
16920 * jvspec.c (lang_specific_driver): Translate `-d' into
16921 -foutput-class-dir.
16922 * jcf.h (jcf_write_base_directory): Declare.
16923 * lang.c (lang_decode_option): Recognize -foutput-class-dir.
16924 * lang-options.h: Mention -foutput-class-dir.
16925 * jcf-write.c (jcf_write_base_directory): New global.
16926 (make_class_file_name): Put generated .class file into `-d'
16927 directory, or into source directory if -d not given. Function now
16928 static.
16929 (write_classfile): Free class file name. Handle case where class
16930 file name is NULL.
16931 (DIR_SEPARATOR): New macro.
16932 Include <sys/stat.h>
16933
16934 * Makefile.in (prefix): New macro.
16935
16936 1998-11-12 Per Bothner <bothner@cygnus.com>
16937
16938 * parse.y (patch_invoke): Do less if flag_emit_class_files.
16939 * expr.c (build_known_method_ref): Don't check flag_emit_class_files
16940 here (done in patch_invoke instead).
16941 (case_identity): Moved here from parse.y.
16942
16943 * java-tree.h (CAN_COMPLETE_NORMALLY): New macro.
16944 * parse.y (java_complete_tree etc): Maybe set CAN_COMPLETE_NORMALLY.
16945 * parse.y (java_complete_tree): Re-order COMPOUND_EXPR in BLOCK
16946 so they can be efficiently scanned without recursion.
16947 Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
16948 * expr.c (java_lang_expand_expr): Expand statements of COMPOUND_EXPR
16949 in BLOCK iteratively, rather than recursively.
16950
16951 * parse.y (do_unary_numeric_promotion): New function.
16952 (patch_unaryop, patch_binop, patch_array_ref): Use it.
16953
16954 * parse.y (patch_newarray): Various fixes.
16955
16956 Re-do handling of switch statements (for proper block scoping).
16957 * parse.y: Add just a single block for the enture switch block,
16958 but don't create any "case blocks".
16959 (group_of_labels): Rmeoved unneeded non-terminal.
16960 CASE_EXPR and DEFAULT_EXPR are added to current block.
16961 * expr.c (java_lang_expand_expr): Inline SWITCH_EXPR here.
16962 Now also need to handle CASE_EXPR and DEFAULT_EXPR.
16963 * java-tree.h (SWITCH_HAS_DEFAULT): New macro.
16964 * parse.y (wfl_operator, print_int_node): Make non-static.
16965 (java_complete_tree): CASE_EXPR and DEFAULT_EXPR are now processed
16966 as part of recursive scan of block.
16967 (java_expand_switch ): Removed - inlined into java_lang_expand_expr.
16968 (patch_switch_statement): Most tests move dinto java_complete_tree.
16969
16970 * parse.y: Make various production be non-typed (void).
16971 * parse.y (parse_error): Merged into issue_warning_error_from_context.
16972 * parse.y (add_stmt_to_compound): Don't create/change extra node.
16973 (patch_method_invocation_stmt): Renamed to patch_method_invocation.
16974
16975 * jcf-write.c (struct jcf_handler): New type.
16976 (struct jcf_switch_state): New type.
16977 (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC): New relocation kinds.
16978 (alloc_handler, emit_unop, emit_reloc): New functions.
16979 (adjust_typed_op): Add extra parameter ("max type" offset).
16980 (emit_switch_reloc, emit_case-reloc): New function.
16981 (generate_bytecode_conditional): Handle REAL_TYPE comparisons.
16982 (generate_bytecode_insns): Support REAL_CST, switch statements,
16983 exception handling, method calls, object/array creation, and more.
16984
16985 * class.c: Remove some unused variables.
16986 * constants.c (find_string_constant): New function.
16987 (count_constant_pool_bytes): Fix to correctly handle wide constants.
16988 * decl.c (complete_start_java_method): Don't _Jv_InitClass
16989 if flag_emit_class_files.
16990
16991 1998-11-12 Tom Tromey <tromey@cygnus.com>
16992
16993 * jcf-io.c (find_class): Added explanatory comment.
16994
16995 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
16996 trailing slash to `.zip' entries.
16997
16998 * jvspec.c (lang_specific_driver): Correctly handle case where
16999 GC_NAME not defined.
17000
17001 1998-11-11 Tom Tromey <tromey@cygnus.com>
17002
17003 * jvspec.c (GC_NAME): New define.
17004 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
17005 if required.
17006 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17007
17008 1998-11-11 Per Bothner <bothner@cygnus.com>
17009
17010 * jcf-dump.c (TABLE_SWITCH): Fix typos.
17011
17012 1998-11-11 Tom Tromey <tromey@cygnus.com>
17013
17014 * jcf-dump.c (main): Correctly recognize `--'-style long options.
17015
17016 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
17017
17018 * class.c (is_compiled_class): Call safe_layout_class for class
17019 compiled from source.
17020 * conver.h (convert_to_integer, convert_to_real,
17021 convert_to_pointer): Added prototypes.
17022 * decl.c (init_decl_processing): Non longer push the decls of
17023 `methodtable', `constants', `Class', `Field', `dispatchTable'
17024 `jexception' and `Method'.
17025 * expr.c (build_invokeinterface): New function.
17026 (expand_invoke): static variable CLASS_IDENT now in
17027 build_invokeinterface. Use build_invokeinterface.
17028 (expand_java_field_op): Moved code to inline
17029 java.lang.PRIMTYPE.TYPE into a function.
17030 (build_primtype_type_ref): New function.
17031 * java-tree.def (INSTANCEOF_EXPR): New tree code.
17032 * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17033 FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17034 (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17035 (DECL_LOCAL_STATIC_VALUE): New macro.
17036 (build_invokeinterface, build_primtype_type_ref): New function
17037 prototypes.
17038 (java_parse_abort_on_error): Macro rewritten.
17039 * jcf-parse.c (current_method): Add comment to declaration.
17040 (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17041 Function prototypes fixed.
17042 (jcf_parse_source): push/pop parser context. save/restore global.
17043 (parse_source_file): Fixed leading comment. Now take a
17044 IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17045 classes and pop the parser context anymore.
17046 (yyparse): Push parser context, save globals, parse the source
17047 file, restore globals and pop the parser context when processing a
17048 source file.
17049 * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17050 * lex.c (java_parse_doc_section): New function.
17051 (java_lex): Call java_parse_doc_section when appropriate. Build an
17052 operator around INSTANCEOF_TK.
17053 * lex.h (java_lineterminator, java_sprint_unicode,
17054 java_unicode_2_utf8, java_lex_error, java_store_unicode):
17055 Prototypes rewritten.
17056 (java_parse_escape_sequence, java_letter_or_digit_p,
17057 java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17058 java_read_unicode, java_store_unicode, java_read_char,
17059 java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17060 Added function prototypes.
17061 * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17062 define.
17063 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17064 New macros
17065 (struct parser_ctxt): New fields: deprecated,
17066 current_parsed_class_un, gclass_list.
17067 (fix_method_argument_names, issue_warning_error_from_context,
17068 resolve_package, lookup_package_type): New function prototypes.
17069 (resolve_expression_name): Fixed function prototype.
17070 (find_applicable_accessible_methods_list): Fixed indentation, added
17071 extra argument in prototype.
17072 (check_final_assignment, build_null_of_type, check_deprecation,
17073 check_method_redefinition, reset_method_name,
17074 java_check_regular_methods, java_check_abstract_methods,
17075 maybe_build_primttype_type_ref): New function prototype.
17076 * parse.y (conver.h): Include.
17077 (INSTANCEOF_TK): Tagged <operator>.
17078 (single_type_import_declaration): Use REGISTER_IMPORT macro.
17079 (relational_expression:): Build binop for instanceof.
17080 (java_push_parser_context): Remember ctxp->gclass_list across
17081 contexts.
17082 (java_pop_parser_context): Simply return if no context
17083 exists. Remember gclass_list across contexts.
17084 (issue_warning_error_from_context): New function.
17085 (parse_error_context): Don't setup ctxp->elc here. Call
17086 issue_warning_error_from_context instead.
17087 (parse_warning_context): Likewise.
17088 (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17089 setup. Link new class/interface to ctxp->gclass_list.
17090 (add_superinterfaces): Register interface as incomplete if not
17091 loaded.
17092 (create_class): Remember class unqualified name in
17093 ctxp->current_parsed_class_un. Check class deprecation.
17094 (register_fields): Check field deprecation. Remember static final
17095 field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17096 processing INIT.
17097 (method_header): New local variable ORIG_ARG. Use unqualified
17098 current class name for check on constructor errors. Promote return
17099 type if of record type. Argument list fix moved in
17100 fix_method_argument_names, called here. Check method deprecation.
17101 (fix_method_argument_names): New function.
17102 (method_declarator): Promote record typed arguments.
17103 (safe_layout_class): Check class methods before layout.
17104 (java_complete_class): Compute field layout when patched.
17105 (do_resolve_class): Try to load class after having it renamed
17106 after the package name.
17107 (get_printable_method_name): Use DECL_CONTEXT.
17108 (reset_method_name): New function.
17109 (check_method_redefinition): Use reset_method_name.
17110 (java_check_regular_methods): New local variable
17111 SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17112 names for error report. Check for compile-time error when method
17113 found has default (package) access.
17114 (java_check_abstract_methods): Now takes an interface DECL node as
17115 an argument. Also reinstall real name on unchecked
17116 overriding/hiding methods for error report.
17117 (java_check_methods): Fixed leading comment. Get classes to verify
17118 from ctxp->gclass_list. Use CHECK_METHODS macro and set
17119 CLASS_METHOD_CHECKED_P on class verification.
17120 (lookup_java_method2): Get real method name if necessary.
17121 (find_in_imports): Don't check package class access here.
17122 (resolve_package, lookup_package_type): New functions.
17123 (java_layout_classes): Fixed leading comment. Take classes to be
17124 laid out from ctxp->gclass_list.
17125 (java_complete_expand_methods): Don't expand native and abstract
17126 methods.
17127 (java_expand_classes): New function.
17128 (resolve_expression_name): Use additional argument ORIG. Retrieve
17129 values of static final field of primitive types.
17130 (resolve_field_access): Handles static final field of promotive
17131 type.
17132 (resolve_qualified_expression_name): Handle STRING_CST as
17133 primaries and package name resolution. Check deprecation on found
17134 decls. Set where_found and type_found on non static field resolved
17135 during qualification. Layout non primitive field decl types.
17136 (check_deprecation): New function.
17137 (maybe_access_field): Simplified.
17138 (patch_method_invocation_stmt): Local variable CLASS_TYPE
17139 removed. Reverse method's argument when primary is a type. Don't
17140 use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17141 instead. Include abstract class in the list of class searchable
17142 for constructors. Use DECL_CONTEXT of found method for access
17143 checks. Check method deprecation.
17144 (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17145 converting arguments. Handle INVOKE_INTERFACE.
17146 (lookup_method_invoke): Search constructor using existing
17147 infrastructure (don't rely on lookup_java_constructor anymore).
17148 (find_applicable_accessible_methods_list): Extra argument flag
17149 LC. Now include constructor in the search.
17150 (qualify_ambiguous_name): Conditional expression are primaries.
17151 (not_initialized_as_it_should_p): static final are always
17152 initialized.
17153 (java_complete_tree): Pass extra NULL argument to
17154 resolve_expression_name. Stricter test to carry on patching
17155 assignments. New case for INSTANCEOF_EXPR.
17156 (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17157 (check_final_assignment, maybe_build_primttype_type_ref): New
17158 functions.
17159 (patch_assignment): Detect resolved static finals and carry normal
17160 assignment error check on them. Inline PRIMTYPE.TYPE read access.
17161 (try_builtin_assignconv): Access constant 0 on all primitive
17162 types.
17163 (valid_builtin_assignconv_identity_widening_p): Accept identical
17164 types. Accept all promoted type on int type.
17165 (valid_ref_assignconv_cast_p): Accept a null pointer to be
17166 assigned to a reference.
17167 (valid_method_invocation_conversion_p): Accept to check null
17168 pointers.
17169 (build_binop): Merge declaration and initialization of local
17170 variable BINOP.
17171 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17172 numeric types. Improved validity test for qualify operators on
17173 references.
17174 (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17175 and PREINCREMENT_EXPR. Also detect resolved static finals of a
17176 primitive type and issue the appropriate error message.
17177 (resolve_type_during_patch): Mark class loaded when resolved.
17178 (patch_cast): Allow null to be cased to reference types.
17179 (build_null_of_type): New function.
17180 (patch_array_ref): Handle array on references correctly.
17181 (patch_return): Removed unused local variable MODIFY. Force
17182 boolean to be returned as integers. Allows null to be returned by
17183 a function returning a reference.
17184 * typeck.c (convert_to_integer, convert_to_real,
17185 convert_to_pointer): Prototypes moved to convert.h
17186 (lookup_argument_method): Use method real name, if necessary.
17187
17188 1998-10-30 Tom Tromey <tromey@cygnus.com>
17189
17190 * class.c (build_class_ref): Changed name of primitive classes to
17191 start with `_Jv_'.
17192
17193 * class.c (make_class_data): Renamed fields: nmethods to
17194 method_count, method_count to dtable_method_count. Always set
17195 `state' field to 0.
17196 * decl.c (init_decl_processing): Likewise.
17197
17198 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
17199
17200 * class.c (layout_class): Don't mangle <finit>, produce
17201 __finit<class> instead. Don't verify artificial methods.
17202 * decl.c (finit_identifier_node): New declared global.
17203 (init_decl_processing): finit_identifier_node initialized.
17204 * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17205 * java-tree.h (finit_identifier_node): Declared as extern.
17206 (struct lang_decl): New field called_constructor.
17207 (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17208 (CLASS_HAS_FINIT_P): New macro.
17209 (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17210 explicit constructor invocation.
17211 (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17212 CALL_SUPER_CONSTRUCTOR_P): New macros.
17213 (write_classfile): Added prototype.
17214 * jcf-parse.c (jcf_parse_source): Parse and remember for
17215 generation if the file was seen on the command line.
17216 (parse_source_file): Don't write the class file here.
17217 (yyparse): Loop on files rewritten. Set current_jcf.
17218 (parse_zip_file_entries): Parse class file only if it was found.
17219 * lang.c (init_parse): Don't open command line provided filename
17220 here.
17221 (lang_parse): Don't set main_jcf anymore.
17222 * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17223 (JCONSTRUCTOR_CHECK): New macro.
17224 (JBSC_TYPE_P): New macro.
17225 (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17226 (COMPLETE_CHECK_OP_2): New macro.
17227 (struct parse_ctxt): New field explicit_constructor_p.
17228 (check_class_interface_creation): Fixed prototype indentation.
17229 (patch_method_invocation_stmt): Prototype reflects added argument.
17230 (patch_invoke): Likewise.
17231 (complete_method_declaration, build_super_invocation,
17232 verify_constructor_circularity,
17233 build_this_super_qualified_invocation, get_printable_method_name,
17234 patch_conditional_expr, maybe_generate_finit, fix_constructors,
17235 verify_constructor_super, create_artificial_method,
17236 start_artificial_method_body, end_artificial_method_body,
17237 generate_field_initialization_code): New function prototypes.
17238 * parse.y: Fixed leading comment
17239 (constructor_header:, constructor_body:, block_end:): Rules tagged
17240 <node>.
17241 (type_declaration:): Call maybe_generate_finit.
17242 (method_declaration:): Action for method_body: placed in new
17243 function complete_method_declaration, called here.
17244 (constructor_declaration:): Defined actions. Removed leading
17245 FIXME.
17246 (constructor_header:): New rule with action.
17247 (constructor_body:): Rule rewritten using block_begin: and
17248 block_end:. Defined actions.
17249 (constructor_declarator:, explicit_constructor_invocation:):
17250 Defined actions.
17251 (block:): Use new rules block_begin: block_end:.
17252 (block_begin:, block_end:): New rules and actions.
17253 (block_statements:): Fixed error message for explicit
17254 constructors.
17255 (method_invocation:): Call build_this_super_qualified_invocation
17256 if primary is `this' or `super' was seen.
17257 (conditional_expression:): Action defined.
17258 (extra_ctxp_pushed_p): New static global flag.
17259 (java_parser_context_save_global): Create parser context if
17260 necessary. Use extra_ctxp_pushed_p to remember it.
17261 (java_parser_context_restore_global): Pop extra parser context if
17262 one exists.
17263 (build_array_from_name): Array on primitive types are marked
17264 loaded.
17265 (register_fields): Restore new name in field initializer
17266 expression if type was altered. Non static fields initialized upon
17267 declaration marked initialized.
17268 (maybe_generate_finit): New function.
17269 (maybe_generate_clinit): Use create_artificial_method,
17270 start_artificial_method_body, end_artificial_method_body. Generate
17271 debug info for enclosed initialization statements.
17272 (method_header): Fixed leading comment. Check constructor
17273 flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17274 accordingly.
17275 (complete_method_declaration, constructor_circularity_msg,
17276 verify_constructor_circularity): New functions.
17277 (get_printable_method_name): New function.
17278 (check_method_redefinition): Don't rename <finit> methods. Fix
17279 declared constructor names. Error message for
17280 constructors modified.
17281 (java_check_regular_methods): Local variable seen_constructor
17282 renamed saw_constructor. Skip verification on constructors. Create
17283 default constructor with create_artificial_method.
17284 (java_check_methods): Removed unnecessary empty line.
17285 (create_artificial_method, start_artificial_method_body,
17286 end_artificial_method_body): New functions.
17287 (java_layout_classes): Changed leading comment. Reverse fields
17288 list if necessary. Always layout java.lang.Object if being
17289 defined.
17290 (java_complete_expand_methods): Verify constructor circularity.
17291 (java_complete_expand_method): Call fix_constructor on
17292 constructors. Local variable no_ac_found removed. Restore
17293 bindings if method body expansion failed.
17294 (fix_constructors, verify_constructor_super,
17295 generate_field_initialization_code): New function.
17296 (java_expand_classes): Fixed leading comment. Write class file
17297 here.
17298 (resolve_expression_name): Check for illegal instance variable
17299 usage within the argument scope of an explicit constructor
17300 invocation.
17301 (resolve_qualified_expression_name): Pass extra from_super flag
17302 when invoking patch_method_invocation_stmt. New case for
17303 conditional expression when used as a primary. Check for error
17304 when acquiring super.
17305 (patch_method_invocation_stmt): Added extra argument super. New
17306 local variable is_static_flag. Set class_to_search according to
17307 the nature of the constructor invocation. Don't add `this'
17308 argument when expanding NEW_CLASS_EXPR. Check for illegal method
17309 invocation within the argument scope of explicit constructor
17310 invocation. Set is_static according to is_static_flag. Provide
17311 extra `super' argument to patch_invoke invocation.
17312 (patch_invoke): New argument from_super. Loop on arguments
17313 indentation fixed. Pass from_super to invocation_mode. New switch
17314 case INVOKE_SUPER. Fixed error message in switch default case.
17315 Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17316 value.
17317 (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17318 (lookup_method_invoke): Fixed prototypes in candidates list. Error
17319 message takes constructors into account.
17320 (find_applicable_accessible_methods_list): Fixed indentation.
17321 (qualify_ambiguous_name): Take explicit constructor invocation
17322 into account. Deal with a conditional expression as a primary to
17323 a method call.
17324 (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17325 case. Added extra argument to patch_method_invocation_stmt.
17326 Register calls made to explicit constructor `this'. Don't call
17327 save_expr in ARRAY_REF case when emitting class files. Check for
17328 illegal use of this when expanding explicit constructor invocation
17329 arguments.
17330 (complete_function_arguments): Set and reset parser context
17331 explicit_constructor_p field value when appropriate.
17332 (build_super_invocation, build_this_super_qualified_invocation):
17333 New functions.
17334 (patch_assignment): Fixed typo.
17335 (patch_unaryop): Check on final fields occurs only when a decl
17336 exits.
17337 (patch_return): Take constructors into account.
17338 (patch_conditional_expr): New function.
17339 * typeck.c (build_java_signature): Removed unnecessary empty line.
17340
17341 1998-10-28 Jeffrey A Law (law@cygnus.com)
17342
17343 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17344
17345 1998-10-28 Tom Tromey <tromey@cygnus.com>
17346
17347 * decl.c (init_decl_processing): Renamed fields.
17348 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17349 interface_len, msize fields.
17350
17351 * class.c (make_class_data): Removed subclass_head and
17352 subclass_next fields.
17353 * decl.c (init_decl_processing): Removed subclass_head and
17354 subclass_next fields.
17355
17356 1998-10-28 Jeffrey A Law (law@cygnus.com)
17357
17358 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17359 * mangle.c (emit_unicode_mangled_name): Similarly.
17360
17361 1998-10-26 Nick Clifton <nickc@cygnus.com>
17362
17363 * jcf-parse.c (get_constant): Place braces around code to compute
17364 'd' when REAL_ARITHMETIC is not defined.
17365
17366 1998-10-25 H.J. Lu (hjl@gnu.org)
17367
17368 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17369 dependency.
17370
17371 1998-10-23 Tom Tromey <tromey@cygnus.com>
17372
17373 * lang-specs.h: `.zip' files are input to jc1.
17374
17375 1998-10-22 Per Bothner <bothner@cygnus.com>
17376
17377 * jvspecs.c: Add (but don't enable) support for combining multiple
17378 .class and .java input filenames to a single jc1 invocation.
17379 Add support for -C flag (copile to .class files).
17380 Translate -classpath and -CLASSPATH arguments.
17381 * lang-specs.h: Don't set %2 spec.
17382
17383 1998-10-22 Tom Tromey <tromey@cygnus.com>
17384
17385 * jcf-path.c (add_entry): Don't add trailing separator if entry is
17386 a .zip file.
17387 (add_path): Don't add trailing separator to non-empty path
17388 elements.
17389
17390 * lang.c (lang_decode_option): Check for -fclasspath and
17391 -fCLASSPATH before examining other `-f' options.
17392
17393 * java-tree.h (finalize_identifier_node): Don't declare.
17394 * class.c (make_class_data): Don't push "final" field.
17395 * decl.c (init_decl_processing): Don't push "final" field.
17396 (finalize_identifier_node): Removed.
17397 (init_decl_processing): Don't set finalize_identifier_node.
17398
17399 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17400
17401 1998-10-11 Anthony Green <green@cygnus.com>
17402
17403 * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17404 (JV_SCAN_SOURCES): New macro.
17405 (JCF_DUMP_SOURCES): Likewise.
17406 (jcf-dump$(exeext)): New target.
17407 (jv-scan$(exeext)): New target.
17408
17409 1998-10-22 Tom Tromey <tromey@cygnus.com>
17410
17411 * Makefile.in (LEX): Removed.
17412 (LEXFLAGS): Likewise.
17413 (SET_BISON): New macro.
17414 (BISON): Removed.
17415 ($(PARSE_C)): Use SET_BISON. Run bison from srcdir to avoid
17416 spurious diffs in parse.c.
17417 ($(PARSE_SCAN_C)): Likewise.
17418 (PARSE_DIR): New macro.
17419 (PARSE_C): Use it.
17420 (PARSE_SCAN_C): Likewise.
17421 (PARSE_RELDIR): New macro.
17422
17423 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17424
17425 * jcf-io.c (find_class): Use saw_java_source to determine when to
17426 look for `.java' file.
17427 * jcf-parse.c (saw_java_source): New global.
17428 (yyparse): Set it if `.java' file seen.
17429
17430 * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17431 (GCJH_SOURCES): Likewise.
17432 * Makefile.in (datadir): New macro.
17433 (libjava_zip): Likewise.
17434 (JAVA_OBJS): Added jcf-path.o.
17435 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17436 (../gcjh$(exeext)): Likewise.
17437 (jcf-path.o): New target.
17438 * java-tree.h (fix_classpath): Removed decl.
17439 * jcf-parse.c (fix_classpath): Removed.
17440 (load_class): Don't call fix_classpath.
17441 * parse.y (read_import_dir): Don't call fix_classpath.
17442 * lex.h: Don't mention classpath.
17443 * lex.c (java_init_lex): Don't initialize classpath.
17444 * jcf-io.c (classpath): Removed global.
17445 (find_class): Use jcf_path iteration functions. Correctly search
17446 class path for .java file.
17447 (open_in_zip): New argument `is_system'.
17448 * jcf-dump.c (main): Call jcf_path_init. Recognize all new
17449 classpath-related options.
17450 * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17451 and -I.
17452 (lang_init): Call jcf_path_init.
17453 * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17454 * lang-specs.h: Handle -I. Minor cleanup to -M options.
17455 Correctly put braces around second string in each entry.
17456 * gjavah.c (main): Call jcf_path_init. Recognize all the new
17457 classpath-related options.
17458 (help): Updated for new options.
17459 * jcf.h: Declare functions from jcf-path.c. Don't mention
17460 `classpath' global.
17461 * jcf-path.c: New file.
17462
17463 * jcf-depend.c: Include jcf.h.
17464
17465 * jcf-write.c (localvar_alloc): Returns `void'.
17466 (localvar_free): Removed unused variable.
17467
17468 * lang.c (OBJECT_SUFFIX): Define if not already defined.
17469 (init_parse): Use OBJECT_SUFFIX, not ".o".
17470
17471 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
17472
17473 * class.c (emit_register_classes): Renamed from
17474 emit_register_class.
17475 * java-tree.h (emit_register_classes): Prototype renamed from
17476 emit_register_class.
17477 * jcf-parse.c (yyparse): Call emit_register_classes once before
17478 returning.
17479 * parse.y (java_expand_classes): No longer register classes.
17480
17481 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17482
17483 * class.c (is_compiled_class): New local variable
17484 seen_in_zip. Identify classes found in currently compiled source
17485 file(s).
17486 * decl.c (complete_start_java_method): Fixed typo.
17487 * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17488 HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17489 (CLASS_P): Moved around.
17490 (java_parse_abort_on_error): Macro moved from jcf-parse.c
17491 * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17492 java-tree.h
17493 (jcf_parse_source): Changed leading comment. Removed unnecessary
17494 fclose and CLASS_FROM_SOURCE_P marking.
17495 (parse_source_file): New local variables remember_for_generation
17496 and filename. Mark parsed file name identifier node. Removed block
17497 executed when parse_only was null. Set remember_for_generation.
17498 Use it as an argument to java_pop_parser_context.
17499 (yyparse): New local variables several_files, list, next node and
17500 current_file_list. Split ampersand separated file names into
17501 current_file_list. Iterate through the list and parse accordingly.
17502 * parse.h (java_pop_parser_context): New function prototype.
17503 * parse.y (ctxp_for_generation): New static global variable.
17504 (java_pop_parser_context): New argument generate. Link popped ctxp
17505 to ctxp_for_generation list accordingly.
17506 (java_complete_expand_methods): Fixed indentation.
17507 (java_expand_classes): New function.
17508
17509 1998-10-17 Per Bothner <bothner@cygnus.com>
17510
17511 * Makefile.in: Link with libiberty.a instead of memmove.o.
17512
17513 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
17514
17515 * lex.c (setjmp.h): No longer included.
17516 * lex.h (setjmp.h): Included.
17517 * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17518 (duplicate_declaration_error_p): Renamed from
17519 duplicate_declaration_error.
17520 (build_array_from_name): New function prototype.
17521 * parse.y (setjmp.h): No longer included.
17522 (variable_declarator_id): Define action.
17523 (build_array_from_name): New function.
17524 (duplicate_declaration_error_p): Renamed from
17525 duplicate_declaration_error. Fixed leading comment.
17526 (register_fields): Main `for' loop reorganized. Uses
17527 SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17528 (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17529 build_array_from_name.
17530 (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17531 types.
17532 (read_import_dir): Don't try to skip `.' and `..'.
17533 (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17534 build_array_from_name. Main `for' loop reorganized.
17535 (resolve_qualified_expression_name): When building access to a
17536 field, use the type where the field was found, not its own type.
17537 (maybe_access_field): Use field DECL_CONTEXT if the type where the
17538 field was found is null.
17539 (qualify_ambiguous_name): Sweep through all successive array
17540 dimensions.
17541
17542 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
17543
17544 * java-tree.h (pop_labeled_block, lang_printable_name,
17545 maybe_add_interface, set_super_info, get_access_flags_from_decl,
17546 interface_of_p, inherits_from_p, fix_classpath,
17547 complete_start_java_method, emit_handlers, init_outgoing_cpool,
17548 make_class_data, register_class, alloc_name_constant): New
17549 function prototypes.
17550 * lang.c (lang_decode_option): Set argc argument unused. Fixed
17551 indentation. Added cast to remove warning.
17552 (lang_printable_name): Set v argument unused.
17553 (lang_print_error): Added argument to lang_printable_name call.
17554 (java_dummy_print, print_lang_decl, print_lang_type,
17555 print_lang_identifier, lang_print_xnode): All argument marked
17556 unused.
17557 * lex.c (java_unget_unicode): Removed unnecessary argument.
17558 (java_allocate_new_line): Unused local variable is gone.
17559 (java_read_char): Added parenthesis in expressions to remove
17560 warnings. Added final return statement.
17561 (java_read_unicode): Added parenthesis in expression to remove
17562 warning.
17563 (java_parse_end_comment): Fixed java_unget_unicode invocation.
17564 (java_parse_escape_sequence): Likewise.
17565 (java_lex): Unused local variables are gone. Fixed
17566 java_unget_unicode invocation.
17567 * lex.h (set_float_handler): Prototype added when JC1_LITE not
17568 defined.
17569 * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17570 lang_printable_name invocation in macro.
17571 (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17572 Likewise.
17573 (duplicate_declaration_error): Suppressed unused argument in
17574 prototype.
17575 (identical_subpath_p): Function declaration is gone.
17576 (patch_invoke): Suppressed unused argument in prototype.
17577 (patch_cast, build_labeled_block, check_thrown_exceptions):
17578 Likewise.
17579 * parse.y (setjmp.h): Included
17580 (toplev.h): Likewise.
17581 (field_declaration:): Suppressed unused local
17582 (label_decl:): Fixed build_labeled_block invocation.
17583 (java_pop_parser_context): Put extra parenthesis around assignment
17584 in if.
17585 (yyerror): Suppressed unused local variables.
17586 (variable_redefinition_error): Fixed lang_printable_name
17587 invocation.
17588 (create_interface): Suppressed unused local variables.
17589 (create_class): Likewise.
17590 (duplicate_declaration_error): Suppressed unused argument. Fixed
17591 lang_printable_name invocation.
17592 (register_fields): Suppressed unused local variable. Fixed
17593 duplicate_declaration_error invocation.
17594 (method_header): Suppressed unused local variable.
17595 (method_declarator, parser_check_super): Likewise.
17596 (java_complete_class): Suppressed unused local variable. Fixed
17597 fatal error message.
17598 (complete_class_report_errors): Added default: in switch.
17599 (java_check_regular_methods): Fixed lang_printable_name
17600 invocations.
17601 (check_throws_clauses): Likewise.
17602 (java_check_abstract_methods): Suppressed unused local
17603 variable. Fixed lang_printable_name invocation.
17604 (read_import_entry): Added supplemental return statement.
17605 (read_import_dir): Suppressed unused local variables.
17606 (check_pkg_class_access, declare_local_variables): Likewise.
17607 (source_start_java_method): Suppressed unused extern variable
17608 declarations
17609 (expand_start_java_method): Suppressed unused extern and local
17610 variable declarations.
17611 (java_complete_expand_methods): Likewise.
17612 (java_complete_expand_method): Suppressed unused local variables.
17613 (make_qualified_name): Likewise.
17614 (resolve_qualified_expression_name): Added default: in
17615 switch. Fixed lang_printable_name invocation.
17616 (class_instance_creation_expression): Added parenthesis around
17617 expressions.
17618 (patch_method_invocation_stmt): Fixed lang_printable_name and
17619 patch_invoke invocations.
17620 (check_for_static_method_reference): Fixed lang_printable_name
17621 invocation.
17622 (patch_invoke): Suppressed unused arguments and local variables.
17623 (lookup_method_invoke): Suppressed unused local variables.
17624 (qualify_ambiguous_name): Added default: in switch.
17625 (identical_subpath_p): Function removed.
17626 (patch_assignment): Suppressed unused local variables. Suppressed
17627 unnecessary if statement. Fixed lang_printable_name invocations.
17628 (try_builtin_assignconv): Fixed lang_printable_name invocations.
17629 (valid_ref_assignconv_cast_p): Parenthesis around
17630 expression. Suppressed unused local variables.
17631 (build_binop): Suppressed unused local variables. fixed
17632 lang_printable_name invocations.
17633 (string_constant_concatenation): Suppressed unused local
17634 variables.
17635 (patch_unaryop): Fixed lang_printable_name invocation.
17636 (patch_cast): Suppressed unnecessary argument. Fixed
17637 lang_printable_name invocation.
17638 (patch_array_ref): Fixed lang_printable_name invocation.
17639 (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17640 (build_labeled_block): Suppressed unused argument.
17641 (generate_labeled_block): Fixed build_labeled_block invocation.
17642 (build_loop_body): Suppressed unused local variables.
17643 (patch_loop_statement): Likewise.
17644 (patch_exit): Fixed lang_printable_name invocation.
17645 (patch_switch_statement): Likewise.
17646 (case_identity): First argument marked unused.
17647 (patch_try_statement): Fixed lang_printable_name invocations.
17648 (patch_synchronized_statement, patch_throw_statement): Likewise.
17649 (check_thrown_exceptions): Fixed check_thrown_exceptions and
17650 lang_printable_name invocations.
17651 (check_thrown_exceptions_do): Suppressed unused argument.
17652
17653 1998-10-14 Tom Tromey <tromey@cygnus.com>
17654
17655 * jcf-write.c (write_classfile): Add output class file as target.
17656 * lang-options.h: Added -MD, -MMD, -M, and -MM.
17657 * jcf.h: Added declarations for dependency-tracking functions.
17658 * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17659 * lang.c (lang_decode_option): Recognize -MD and -MMD.
17660 (finish_parse): Call jcf_dependency_write.
17661 (dependency_tracking): New global.
17662 (DEPEND_SET_FILE): New define.
17663 (DEPEND_ENABLE): New define.
17664 (init_parse): Enable dependency tracking if required.
17665 Include "flags.h".
17666 * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17667 (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17668 (../gcjh$(exeext)): Likewise.
17669 (jcf-depend.o): New target.
17670 * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17671 (GCJH_SOURCES): Likewise.
17672 * jcf-io.c (open_class): Call jcf_dependency_add_file. Added
17673 dep_name argument.
17674 (find_classfile): Added dep_name argument.
17675 (find_class): Compute name of dependency.
17676 (open_in_zip): Call jcf_dependency_add_file.
17677 * gjavah.c (output_file): No longer global.
17678 (usage): Don't mention "gjavah".
17679 (help): Likewise.
17680 (java_no_argument): Likewise.
17681 (version): Likewise.
17682 (main): Recognize and handle -M family of options.
17683 (print_mangled_classname): Return is void.
17684 (process_file): Handle case where output is suppressed.
17685 (HANDLE_END_FIELD): Likewise.
17686 (HANDLE_METHOD): Likewise.
17687 * jcf-depend.c: New file.
17688
17689 1998-10-13 Jeffrey A Law (law@cygnus.com)
17690
17691 * java-tree.def: Add missing newline at EOF.
17692
17693 1998-10-13 Tom Tromey <tromey@cygnus.com>
17694
17695 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17696 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
17697 function.
17698 Include <config.h> and "system.h".
17699 (disassemble_method): Undefine RET to avoid clash with
17700 config/i386/i386.h.
17701
17702 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
17703
17704 * decl.c (runtime_exception_type_node, error_exception_type_node):
17705 New global variables.
17706 (init_decl_processing): Initialized.
17707 * expr.c (java_lang_expand_expr): Set caught exception type to
17708 null if catch handler argument doesn't exit.
17709 * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
17710 tree codes.
17711 * java-tree.h (runtime_exception_type_node,
17712 error_exception_type_node): Global variables declared.
17713 (DECL_FUNCTION_THROWS): New macro.
17714 (DECL_FUNCTION_BODY): Modified comment.
17715 (DECL_SPECIFIC_COUNT): Likewise.
17716 (struct lang_decl): New field throws_list.
17717 (IS_UNCHECKED_EXPRESSION_P): New macro.
17718 * lex.c (java_lex): Generate location information for THROW_TK.
17719 * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
17720 EXCEPTIONS_P): New macros.
17721 (enum jdep_code): New value JDEP_EXCEPTION.
17722 (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
17723 BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
17724 PATCH_METHOD_RETURN_ERROR): New macros.
17725 (patch_method_invocation_stmt): Added new argument to prototype.
17726 (patch_synchronized_statement, patch_throw_statement,
17727 check_thrown_exceptions, check_thrown_exceptions_do,
17728 purge_unchecked_exceptions, check_throws_clauses): New function
17729 prototypes.
17730 * parse.y Fixed typo in keyword section.
17731 (throw:): Rule tagged <node>.
17732 (THROW_TK): Keyword tagged <operator>.
17733 (method_header:): Last argument to call to method_header passed
17734 from throws: rule.
17735 (throws:, class_type_list:, throw_statement:,
17736 synchronized_statement:, synchronized:): Defined actions.
17737 (method_header): New local variable current. Register exceptions
17738 from throws clause.
17739 (java_complete_tree): Complete and verify exceptions from throws
17740 clause.
17741 (complete_class_report_errors): Error message on exceptions not
17742 found
17743 (java_check_regular_methods): Fixed typo. Shortcut on private
17744 overriding methods. Changed error message on method
17745 redefinition. Check for throws clause compatibility.
17746 (check_throws_clauses): New function.
17747 (java_check_abstract_methods): Use DECL_NAME for wfl or current
17748 method. Changed error message on method redefinition.
17749 (currently_caught_type_list): New static variable.
17750 (java_complete_expand_methods): Purge unchecked exceptions from
17751 throws clause list. Call PUSH_EXCEPTIONS before walk and
17752 POP_EXCEPTIONS after.
17753 (resolve_qualified_expression_name): Pass new argument as NULL to
17754 patch_method_invocation_stmt.
17755 (patch_method_invocation_stmt): New argument ref_decl. Invoke
17756 PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
17757 argument list when appropriate. Use new argument if non null to
17758 store selected method decl.
17759 (patch_invoke): Convert if necessary args of builtin types before
17760 forming CALL_EXPR. Argument list no longer reversed here.
17761 (invocation_mode): Treat final methods as static methods.
17762 (java_complete_tree): New cases for THROW_EXPR: and
17763 SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
17764 function call.
17765 (complete_function_arguments): No more RECORD_TYPE
17766 conversion. Function parameter nodes no longer saved.
17767 (valid_ref_assignconv_cast_p): Avoid handling null type.
17768 (patch_binop): Fixed null constant reference handling.
17769 (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
17770 BUILD_THROW macros.
17771 (patch_try_statement): Fixed comments. Record caught types in
17772 list, push the list, expand try block and pop the list.
17773 (patch_synchronized_statement, patch_throw_statement,
17774 check_thrown_exceptions, check_thrown_exceptions_do,
17775 purge_unchecked_exceptions): New functions.
17776 * typeck.c (lookup_argument_method): Allow WFL in place of method
17777 DECL_NAME during method definition check
17778
17779 1998-10-09 Tom Tromey <tromey@cygnus.com>
17780
17781 * gjavah.c (decode_signature_piece): New function.
17782 (print_c_decl): Use it. Added `name_override' argument.
17783 (print_method_info): Use name_override argument to print_c_decl.
17784 (seen_fields): Removed.
17785 (print_field_info): Don't update seen_fields.
17786 (struct method_name): New structure.
17787 (method_name_list): New global.
17788 (print_method_info): Add new method to list of methods.
17789 (name_is_method_p): New function.
17790 (print_field_info): If field name has same name as method, then
17791 change field name.
17792 (process_file): Parse methods before fields.
17793 (field_pass): New global.
17794 (HANDLE_END_FIELD): Take field_pass into account.
17795
17796 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17797
17798 * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
17799 (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
17800
17801 1998-10-03 Anthony Green <green@cygnus.com>
17802
17803 * jvspec.c: Fix bug in jvgenmain_spec patch.
17804
17805 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
17806
17807 * Makefile.in (lang.o:): Install dependency on java-tree.def.
17808 * decl.c (soft_exceptioninfo_call_node): New global variable.
17809 (init_decl_processing): Fixed indentation. soft_badarrayindex_node
17810 takes extra integer argument. soft_exceptioninfo_call_node
17811 initialized.
17812 * except.c (java_set_exception_lang_code): New function
17813 (method_init_exceptions): Called here.
17814 (prepare_eh_table_type): New function.
17815 (expand_end_java_handler): Called here.
17816 * expr.c (build_java_throw_out_of_bounds_exception): Now features
17817 one argument. Modified generation of call to
17818 soft_badarrayindex_node to use new argument.
17819 (build_java_arrayaccess): Pass faulty index value to
17820 build_java_throw_out_of_bounds_exception.
17821 (generate_name): New function.
17822 (java_lang_expand_expr): New local variables node, current,
17823 has_finally_p. Expand TRY_EXPR node.
17824 (process_jvm_instruction): Replace top of the stack with thrown
17825 object reference when entering exception handler.
17826 * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
17827 specific tree codes.
17828 * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
17829 global.
17830 (DECL_SPECIFIC_COUNT): New macro.
17831 (prepare_eh_table_type, java_set_exception_lang_code,
17832 generate_name): New function declarations.
17833 (match_java_method): Declaration deleted.
17834 (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
17835 macros.
17836 * lex.c (TRY_TK, CATCH_TK): Generate location information.
17837 * parse.h (redefinition_error, refine_accessible_methods_list,
17838 can_cast_to_p): Function declaration removed.
17839 (classitf_redefinition_error, variable_redefinition_error,
17840 parse_jdk1_1_error, find_applicable_accessible_methods_list,
17841 find_most_specific_methods_list, argument_types_convertible,
17842 enter_a_block, valid_builtin_assignconv_identity_widening_p,
17843 valid_cast_to_p, valid_method_invocation_conversion_p,
17844 try_reference_assignconv, add_stmt_to_compound,
17845 build_jump_to_finally, build_tree_list, patch_try_statement,
17846 java_get_catch_block): New function declarations.
17847 * parse.y (string_buffer_type): Global variable deleted.
17848 (group_of_labels, catches, catch_clause, catch_clause_parameter,
17849 finally): Rules tagged <node>.
17850 (TRY_TK, CATCH_TK): Token tagged <operator>.
17851 (class_body_declaration:, class_member_declaration:,
17852 formal_parameter:, explicit_constructor_invocation:,
17853 interface_member_declaration:, constant_declaration:,
17854 primary_no_new_array:, class_instance_creation_expression:,
17855 array_creation_expression:): Issue error on unsuported JDK1.1
17856 features.
17857 (try_statement:, catches:, finally:): Define actions.
17858 (catch_clause_parameter): New rule.
17859 (catch_clause:): Use new rule catch_clause_parameter.
17860 (parse_jdk1_1_error): New function.
17861 (redefinition_error): Renamed classitf_redefinition_error.
17862 (variable_redefinition_error): New function.
17863 (check_class_interface_creation): Call
17864 classitf_redefinition_error.
17865 (java_complete_tree): Added error message on JDEP_TYPE: case.
17866 (complete_class_report_errors): Fixed indentation.
17867 (declare_local_variables): Call variable_redefinition_error.
17868 (source_end_java_method): Call java_set_exception_lang_code and
17869 emit_handlers where appropriate.
17870 (java_method_add_stmt): Call add_stmt_to_block.
17871 (add_stmt_to_block): New function.
17872 (lookup_method_invoke): Fixed outside comment. new local variable
17873 candicates. Call find_applicable_accessible_methods_list and
17874 find_most_specific_methods_list when searching for a
17875 method. Modified error report to list possible candidates when
17876 applicable.
17877 (find_applicable_accessible_methods_list,
17878 find_most_specific_methods_list, argument_types_convertible): New
17879 function.
17880 (refine_accessible_methods_list): Function deleted.
17881 (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
17882 expr (if applicable) before calling patch_array_ref.
17883 (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
17884 (enter_block): Fixed comment.
17885 (enter_a_block): New function.
17886 (patch_assignment): Reorganized. Call try_reference_assignconv for
17887 references. Call valid_cast_to_p instead of can_cast_to_p.
17888 (try_reference_assignconv,
17889 valid_builtin_assignconv_identity_widening_p): New functions.
17890 (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
17891 (valid_cast_to_p, valid_method_invocation_conversion_p): New
17892 functions.
17893 (build_string_concatenation): Don't resolve StringBuffer.
17894 (patch_cast): Fixed inverted arguments.
17895 (patch_array_ref): Code to save array expr deleted. Call
17896 valid_cast_to_p instead of can_cast_to_p.
17897 (generate_labeled_block): Call generate_name.
17898 (build_jump_to_finally, build_try_statement, java_get_catch_block,
17899 patch_try_statement): New functions.
17900 * typeck.c (match_java_method): Function deleted.
17901
17902 1998-10-02 Anthony Green <green@cygnus.com>
17903
17904 * jvspec.c: jvgenmain_spec uses different temporary file names.
17905
17906 1998-10-02 Anthony Green <green@cygnus.com>
17907
17908 * jvspec.c (lang_specific_driver): Fail if user specifies
17909 --main= when not linking.
17910
17911 1998-09-28 Tom Tromey <tromey@cygnus.com>
17912
17913 * class.c (make_class_data): Push value for `thread' field.
17914 * decl.c (init_decl_processing): Added `thread' field to class.
17915
17916 * class.c (add_field): Always make static fields externally
17917 visible.
17918
17919 1998-09-26 Anthony Green <green@cygnus.com>
17920
17921 * expr.c (build_java_athrow,
17922 build_java_throw_out_of_bounds_exception, expand_invoke,
17923 build_newarray, expand_java_multianewarray, build_java_monitor):
17924 Update comments to reflect _Jv_* function names.
17925
17926 1998-09-25 Per Bothner <bothner@cygnus.com>
17927
17928 * decl.c (complete_start_java_method): DECL_RESULT is always promoted.
17929 * decl.c (start_java_method): Handle PROMOTE_PROTOTYPES target macro.
17930 * parse.y (expand_start_java_method): Likewise.
17931
17932 1998-09-24 Per Bothner <bothner@cygnus.com>
17933
17934 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
17935
17936 * class.c (push_class): IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
17937 (add_field): No longer need to convert from RECORD_TYPE to pointer,
17938 * expr.c: Remove no-longer-needed calls to promote_type.
17939 * decl.c (give_name_to_locals): Liekwise.
17940 * jcf-parse.c (get_class_constant): Compensate for new signatures.
17941 * parse.y: Add/remove promote_type calls as appropriate.
17942 * typeck.c (parse_signature_type): Returns POINTER_TYPE for objects.
17943 (parse_signature_string): Likewise.
17944 (build_java_array_type): Fix for now signature convenions.
17945
17946 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
17947
17948 1998-09-23 Tom Tromey <tromey@cygnus.com>
17949
17950 * class.c (init_class_processing): libjava function renamed to
17951 _Jv_RegisterClass.
17952
17953 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
17954
17955 * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
17956 * java-tree.def: Fixed DEFTREECODE third argument.
17957 (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
17958 CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
17959 * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
17960 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17961 JAVA_THIS_EXPR): Now replaced by tree code definitions.
17962 (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
17963 * lang.c (java_tree_code_type, java_tree_code_length,
17964 java_tree_code_name): New arrays.
17965 (lang_init): Append Java tree node definitions to Gcc ones.
17966 * lex.c (expression_obstack): Declared as extern when JC1_LITE
17967 defined.
17968 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
17969 wfl_to_string.
17970 (java_lex): Allow declaration of empty string constants. Retain
17971 location information on CASE_TK and DEFAULT_TK.
17972 * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
17973 JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
17974 Modified to be more robust.
17975 (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
17976 (build_new_invocation, try_builtin_assignconv,
17977 patch_switch_statement, string_constant_concatenation,
17978 build_string_concatenation, patch_string_cst, patch_string,
17979 java_expand_switch): New function declarations.
17980 * parse.y: Rules related to switch and EH tagged <node>.
17981 (label_id): Set to NULL_TREE
17982 (wfl_string_buffer, wfl_append, wfl_to_string): New static global
17983 tree nodes.
17984 (this_or_super:): Fixed indentation.
17985 (statement:, statement_nsi:, statement_without_trailing_substatement:,
17986 statement_expression:): Removed call to RULE on all sub-rules.
17987 (switch_expression:, switch_labels:): New rules.
17988 (switch_statement:, switch_block:, switch_block_statement_groups:,
17989 switch_block_statement_group:, switch_labels:, switch_label:):
17990 Defined actions.
17991 (throw_statement:, synchronized_statement:, try_statement:):
17992 Defined temporary actions.
17993 (class_instance_creation_expression:): Call
17994 build_new_invocation. Fixed indentation.
17995 (field_access): Fixed indentation.
17996 (method_invocation): Likewise.
17997 (make_qualified_primary): Use THIS_EXPR.
17998 (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
17999 resolving from SUPER, set *type_found.
18000 (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18001 (java_complete_tree): Removed unused local variable `location'. Case
18002 for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18003 NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18004 on MODIFY_EXPR: and all binary operator tree code cases. Removed
18005 STRING_CST: case. default: checks for patchable strings.
18006 (complete_function_arguments): Transform string constant or
18007 crafted StringBuffer if necessary.
18008 (build_method_invocation): Fixed comments.
18009 (build_new_invocation): New function.
18010 (patch_assignment): Call try_builtin_assignconv to figure a valid
18011 assignment conversion between builtin types.
18012 (try_builtin_assignconv): New function.
18013 (build_binop): Use URSHIFT_EXPR directly to call build.
18014 (operator_string): Use UNARY_PLUS_EXPR.
18015 (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18016 operator.
18017 (do_merge_string_cste, merge_string_cste,
18018 string_constant_concatenation, build_string_concatenation,
18019 patch_string, patch_string_cst): New function.
18020 (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18021 (patch_unaryop): Likewise. New test of valid ++/-- operands.
18022 (build_newarray_node): Use NEW_ARRAY_EXPR.
18023 (build_this): Use THIS_EXPR.
18024 (build_return): Enable debug information on return statement.
18025 (build_if_else_statement): Likewise.
18026 (complete_labeled_statement): Fixed related comment.
18027 (build_loop_body): Fixed comment.
18028 (build_bc_statement): Enable debug information on break/continue
18029 statements.
18030 (patch_bc_statement): Fixed typos. Handle SWITCH statement
18031 context.
18032 (patch_switch_statement, case_identity, java_expand_switch): New
18033 functions.
18034
18035 1998-09-21 Per Bothner <bothner@cygnus.com>
18036
18037 * buffer.h (BUFFER_INIT): New macro.
18038 * jcf-write.c (struct jcf_partial): New type. Put global stuff here.
18039 Pass (struct jcf_partial *state) to most functions.
18040 (jcf_block, jcf_relocation): New types.
18041 Support labels, branches, conditionals, loops.
18042
18043 1998-09-21 Tom Tromey <tromey@cygnus.com>
18044
18045 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18046
18047 1998-09-21 Per Bothner <bothner@cygnus.com>
18048
18049 * decl.c (integer_type_node): Make it have INT_TYPE_SIZE.
18050 * verify.c (verify_jvm_instructions): Use int_type_not (32 bits),
18051 not integer_type_node (INT_TYPE_SIZ bits).
18052
18053 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
18054
18055 * jcf-reader.c (get_attribute): New HANDLE_EXCEPTION_TABLE hook.
18056 * jcf-dump.c (print_exception_table): New function.
18057 (disassemble_method): Better handling of wide instructions.
18058 Make more robust for bad input.
18059
18060 1998-09-30 Jeffrey A Law (law@cygnus.com)
18061
18062 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18063 FreeBSD.
18064
18065 1998-09-17 Jeffrey A Law (law@cygnus.com)
18066
18067 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18068
18069 1998-09-17 Tom Tromey <tromey@cygnus.com>
18070
18071 * Makefile.in ($(PARSE_H)): Removed target.
18072
18073 1998-09-17 Jeffrey A Law (law@cygnus.com)
18074
18075 * Makefile.in (JAVA_OBJS): Add memmove.o
18076 (memmove.o): New target & rules.
18077
18078 1998-09-15 Tom Tromey <tromey@cygnus.com>
18079
18080 * expr.c (expand_invoke): Don't generate a call to the class init
18081 code.
18082
18083 1998-09-14 Jeffrey A Law (law@cygnus.com)
18084
18085 * Makefile.in: Add many missing dependencies.
18086 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18087 as appropriate.
18088 * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18089 * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18090
18091 1998-09-11 Per Bothner <bothner@cygnus.com>
18092
18093 * decl.c (complete_start_java_method): If method is static (and
18094 not private) call _Jv_InitClass.
18095 * expr.c (expand_invoke): Don't call build_class_init.
18096
18097 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
18098
18099 1998-09-10 Jeffrey A Law (law@cygnus.com)
18100
18101 * Make-lang.in (GCJ): Define before using.
18102
18103 1998-09-09 Jeffrey A Law (law@cygnus.com)
18104
18105 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18106 losing due to namespace pollution in GNU getopt.h
18107
18108 1998-09-09 Tom Tromey <tromey@cygnus.com>
18109
18110 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18111 (java.all.cross): Likewise.
18112 (java.rest.encap): Likewise.
18113
18114 1998-09-08 Jeffrey A Law (law@cygnus.com)
18115
18116 * gjavah.c (print_class_decls): Fix thinko in arglist
18117 * jcv-io.c (find_classfile): Similarly.
18118
18119 1998-09-07 Jeffrey A Law (law@cygnus.com)
18120
18121 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18122
18123 1998-09-05 Tom Tromey <tromey@cygnus.com>
18124
18125 * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18126 (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18127 * Makefile.in (PARSE_C): New macro.
18128 (PARSE_H): Likewise.
18129 (PARSE_SCAN_C): Likewise.
18130 ($(PARSE_C)): Target renamed from parse.c.
18131 ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18132 (clean): Remove parse-scan.c as well.
18133 (parse.o): Depend on $(PARSE_C).
18134
18135 1998-09-05 Anthony Green <green@cygnus.com>
18136
18137 * README, license.terms: Removed.
18138
18139 * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18140 decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18141 javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18142 jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18143 keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18144 lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18145 verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18146 and Java trademark attribution.
18147
18148 1998-09-04 Tom Tromey <tromey@cygnus.com>
18149
18150 * Makefile.in: Use gcjh, not gjavah.
18151 * config-lang.in (stagestuff): Use gcjh, not gjavah.
18152 * Make-lang.in: Changed gjavah to gcjh everywhere.
18153
18154 1998-09-03 Per Bothner <bothner@cygnus.com>
18155
18156 * gjavah.c: Support new -prepend -add -append flags.
18157 (print_method_info): Method is not virtual if class is final.
18158
18159 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
18160
18161 * jv-scan.c: Fixed copyright assignment.
18162 * keyword.gperf: Likewise.
18163 * keyword.h: Likewise.
18164 * lex.c: Fixed copyright assignment.
18165 (java_lex): Push unicode back when parsing '<'.
18166 * lex.h: Fixed copyright assignment.
18167 * parse-scan.y: Likewise.
18168 * parse.h: Fixed copyright assignment.
18169 (build_debugable_stmt, complete_for_loop): New function prototypes.
18170 * parse.y: Fixed copyright assignment.
18171 (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18172 size_zero_node when completing a loop with no exit condition.
18173 (for_statement_nsi:): Define action.
18174 (for_init:, for_update:): Return size_zero_node when empty.
18175 (declare_local_variables): Call build_debugable_stmt.
18176 (build_debugable_stmt): New function.
18177 (build_loop_body): Build debugable statement around loop
18178 condition part.
18179 (complete_loop_body): Take into account the debugable statement
18180 around the EXIT_EXPR.
18181 (complete_loop_body): New function.
18182 (patch_exit_expr): Fixed condition inversion.
18183
18184 1998-09-02 Tom Tromey <tromey@cygnus.com>
18185
18186 * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18187 name of thread define.
18188 * jvspec.c (THREAD_NAME): New macro.
18189 (GCLIB): Likewise.
18190 (THREADLIB): Likewise.
18191 (lang_specific_driver): Recognize attempt to link with thread
18192 library or gc library. Recognize -ljava on command line so it
18193 isn't linked against more than once.
18194
18195 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18196
18197 * parse-scan.y (report_main_declaration): Name of the class
18198 containing `main' can be a qualified name.
18199
18200 1998-08-31 Tom Tromey <tromey@cygnus.com>
18201
18202 * config-lang.in: Changed gjavac to gjc everywhere.
18203 * Make-lang.in: Changed gjavac to gjc everywhere.
18204
18205 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
18206
18207 * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18208 (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18209 and install the files.
18210 * Makefile.in (JAVA_OBJS_LITE): New variable.
18211 (compiler:): Now include jv-scan as a dependency.
18212 (../jv-scan$(exeext), parse-scan.c): New targets.
18213 (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18214 * config-lang.in (compilers): Removed gcj, gjavah from the list.
18215 * jcf-parse.c (parse_source_file): Call java_layout_classes and
18216 check for errors even if parse_only.
18217 * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18218 defined.
18219 (yylex): New function. Uses java_lex body.
18220 (java_lex): Removed commented out statement. Remove local variable
18221 literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18222 appropriate. Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18223 DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18224 SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18225 if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18226 SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18227 where appropriate.
18228 (java_lex_error): Empty if JC1_LITE is defined.
18229 (java_get_line_col): Return 0 if JC1_LITE is defined.
18230 * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18231 SET_MODIFIER_CTX): Moved into the section containing the macros
18232 conditionally defined by JC1_LITE.
18233 (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18234 argument if JC1_LITE is defined.
18235 (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18236 REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18237 is defined.
18238 (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18239 FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18240 SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18241 to different values according to JC1_LITE.
18242 * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18243 declared if JC1_LITE set.
18244 (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18245 defined if JC1_LITE not set.
18246 (struct parser_ctx): Reorganized and skip the jc1 front end part
18247 if JC1_LITE set.
18248 (java_layout_classes): New function definition.
18249 (java_push_parser_context, java_init_lex, yyparse, yylex,
18250 yyerror): Prototype always declared. All other static function
18251 prototypes declared only if JC1_LITE is not set.
18252 * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18253 declared in parse.h.
18254 (java_layout_classes): New function.
18255 (java_complete_expand_methods): No longer layout the class here.
18256 * parse-scan.y: New file.
18257 * jv-scan.c: New file.
18258
18259 1998-08-25 Tom Tromey <tromey@cygnus.com>
18260
18261 * gjavah.c (main): Handle -friend option.
18262 (friend_specs): New global.
18263 (generate_access): Handle friend_specs.
18264 (process_file): Likewise.
18265 (MAX_FRIENDS): New macro.
18266 (friend_count): New global.
18267 (print_cxx_classname): Added `prefix' argument. Ignore arrays.
18268 Changed all callers.
18269
18270 1998-08-24 Per Bothner <bothner@cygnus.com>
18271
18272 * jcf-dump.c (process_class): Move JCF_FINISH use to main,
18273 (main): Handle processing all the entries of a named .zip archive.
18274 * jcf-io.c (jcf_trim_old_input): New function.
18275 * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le): New macros.
18276
18277 1998-08-24 Per Bothner <bothner@cygnus.com>
18278
18279 * lang.c (flag_assume_compiled): Make default be on.
18280
18281 1998-08-21 Per Bothner <bothner@cygnus.com>
18282
18283 * jcf-dump.c: Add bunches of flags to control output more.
18284 (process_class): New function; support printing more than one class.
18285 (main): Support new --print-main and --javap flags.
18286 * jcf-reader.c (IGNORE_ATTRIBUTE): New hook.
18287 * jcf.h (CPOOL_INDEX_IN_RANGE): New macro.
18288
18289 1998-08-20 Per Bothner <bothner@cygnus.com>
18290
18291 Change mangling of dispatch table to match C++ vtable (w/thunks).
18292 * class.c (build_dtable_decl), java-tree.h: New function.
18293 (make_class_data): Call it.
18294 * decl.c (init_decl_processing): Likewise.
18295
18296 1998-08-19 Warren Levy <warrenl@cygnus.com>
18297
18298 * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18299 soft_anewarray; adjust args passed.
18300 * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18301 match _Jv_NewObjectArray.
18302
18303 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
18304
18305 * decl.c (push_labeled_block, pop_labeled_block): New functions.
18306 * expr.c (loopup_label): Call create_label_decl.
18307 (create_label_decl): New function.
18308 (java_lang_expand_expr): Call expand_start_bindings with argument
18309 set to zero.
18310 * java-tree.h Added space after PROTO in function declarations
18311 when necessary.
18312 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18313 (create_label_decl, push_labeled_block): New function
18314 declarations.
18315 * lex.c (label_id): Initialize.
18316 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18317 switch.
18318 * parse.h Added space after PROTO in function declarations when
18319 necessary.
18320 (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18321 LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18322 LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18323 PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18324 macros.
18325 (struct parser_ctxt): New fields current_loop,
18326 current_labeled_block.
18327 (build_if_else_statement, patch_if_else_statement,
18328 add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18329 generate_labeled_block, complete_labeled_statement,
18330 build_bc_statement, patch_bc_statement, patch_loop_statement,
18331 build_new_loop, build_loop_body, complete_loop_body): New function
18332 declarations.
18333 * parse.y (java_warning_count): New global variable.
18334 (label_id): New static variable.
18335 (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18336 (block:): Return size_zero_node when block is empty.
18337 (empty_statement:): Return size_zero_node.
18338 (statement:): Implement supplemental action when for_statement: is
18339 reduced.
18340 (label_decl:): New rule.
18341 (labeled_statement:): Rewritten using label_decl. Actions
18342 implemented.
18343 (labeled_statement_nsi:): Likewise.
18344 (if_then_statement): Actions implemented.
18345 (while_expression): New rule.
18346 (while_statement:): Rewritten using while_expression. Actions
18347 implemented.
18348 (while_statement_nsi:): Likewise.
18349 (do_statement_begin:): New rule.
18350 (do_statement:): Rewritten using do_statement_begin. Actions
18351 implemented.
18352 (for_statement:): Rewritten using for_begin. Actions implemented.
18353 (for_statement_nsi:): Likewise.
18354 (for_header:, for_begin:): New rules.
18355 (for_init:): Actions implemented.
18356 (statement_expression_list:, break_statement:,
18357 continue_statement:): Likewise.
18358 (yyerror): Count number of issued warning(s).
18359 (java_report_errors): Report error(s) and/or warning(s).
18360 (java_complete_class): Use build_java_argument_signature to
18361 recompute completed method signature.
18362 (java_check_regular_methods): New locals method_wfl and aflags.
18363 Use method_wfl instead of lookup_cl during error reports. Fixed
18364 indentation and modified some error messages. Use
18365 lang_printable_name in method instead of the DECL_NAME. New code
18366 to issue warnings on methods not overriding corresponding methods
18367 private to a different package.
18368 (java_method_add_stmt): Call add_stmt_to_compound.
18369 (add_stmt_to_compound): New function.
18370 (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18371 LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18372 (build_if_else_statement, patch_if_else_statement,
18373 build_labeled_block, generate_labeled_block,
18374 complete_labeled_statement, build_new_loop, build_loop_body,
18375 complete_loop_body, patch_loop_statement, build_bc_statement,
18376 patch_bc_statement, patch_exit_expr): New functions.
18377 * typeck.c (build_java_signature): Build argument signature before
18378 enclosing it in between parenthesis.
18379
18380 1998-08-17 Warren Levy <warrenl@cygnus.com>
18381
18382 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18383 (JAVA_OBJS): Added reminder comment
18384
18385 1998-08-13 Nick Clifton <nickc@cygnus.com>
18386
18387 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18388 be interpreted as a long long.
18389
18390 1998-08-13 Warren Levy <warrenl@cygnus.com>
18391
18392 * decl.c (init_decl_processing): Use _Jv_InitClass, not
18393 soft_initialise_class. Use _Jv_NewMultiArray, not
18394 soft_multianewarray. Use _Jv_ThrowBadArrayIndex, not
18395 soft_badarrayindex. Use _Jv_CheckCast, not soft_checkcast. Use
18396 _Jv_CheckArrayStore, not soft_checkarraystore. Use
18397 _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18398
18399 1998-08-12 Per Bothner <bothner@cygnus.com>
18400
18401 * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18402 length_identifier_node): New global tree node constants.
18403 * parse.y (kw_super, kw_this, kw_length): Removed globals.
18404 Replace uses by super_identifier_node etc.
18405 * lex.c (kw_super, kw_this, kw_length): Don't initialize.
18406
18407 * parse.y (resolve_field_access): Don't special-case ".length" if
18408 flag_emit_class_files.
18409 (patch_array_ref): Leave as ARRAY_REF if flag_emit_class_files.
18410 * jcf-write.c (generate_bytecode_insns): Handle ARRAY_REF opcode
18411 and ARRAY.length.
18412
18413 1998-08-11 Per Bothner <bothner@cygnus.com>
18414
18415 * decl.c (init_decl_processing): Remove unused method_type_node fields.
18416 * class.c (make_method_value): Remove init for removed fields.
18417
18418 * class.c (layout_class): Use build_java_argument_signature.
18419 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
18420
18421 * typeck.c (push_java_argument_signature): Removed. Merged into ...
18422 (build_java_argument_signature): Use TYPE_ARGUMENT_SIGNATURE cache.
18423 (build_java_signature): Don't use push_java_argument_signature.
18424
18425 * typeck.c (lookup_argument_method): New function.
18426 * parse.y (java_check_regular_methods): Use lookup_argument_method
18427 instead of lookup_java_method2 followed by lookup_java_method.
18428
18429 * parse.y (check_method_redefinition): Minor optimization.
18430
18431 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
18432 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18433
18434 1998-08-10 Tom Tromey <tromey@cygnus.com>
18435
18436 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18437 c-pragma.o.
18438
18439 * gjavah.c (java_float_finite): Use K&R-style definition.
18440 (java_double_finite): Likewise.
18441 (generate_access): Now returns void. Changed all callers.
18442 (last_access_generated): Removed.
18443 (process_file): Only make a single pass over the .class file.
18444
18445 1998-07-29 Per Bothner <bothner@cygnus.com>
18446
18447 * class.c (get_dispatch_table): Add extra dummy vtable entry,
18448 for compatibility for G++ (with -fvtable-thunks).
18449 * expr.c (build_invokevirtual): Add one for extra dummy vtable entry.
18450
18451 * gjavah.c (process_file): Use public inheritance for super-class.
18452
18453 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
18454
18455 * lex.c (java_init_lex): Initialize ctxp->package.
18456 * parse.h (struct parser_ctxt): package and package_len replaced
18457 by tree package, an identifier node. Field method_decl_list is
18458 gone. Fixed comments.
18459 (lookup_field_wrapper, merge_qualified_name, not_accessible,
18460 class_in_current_package): New function prototypes.
18461 * parse.y (array_type:): Set class loaded flag on primitive type
18462 arrays.
18463 (package_declaration:): Assign ctxp->package to the
18464 identifier node.
18465 (method_invocation:): Handle invocation of method qualified by
18466 `super'.
18467 (single_type_import_declaration:): Removed ambiguity check.
18468 (java_pop_parser_context): New local variable `next'. Reset and
18469 set IMPORT_CLASSFILE_NAME flags on current and previous import
18470 list.
18471 (java_accstring_lookup): Use new local macro COPY_RETURN.
18472 (lookup_field_wrapper): New function.
18473 (parser_qualified_classname): Use merge_qualified_name.
18474 (parser_check_super_interface): Broaden error message.
18475 (do_resolve_class): Check for qualified class name in the current
18476 compilation unit if appropriate.
18477 (process_imports): Check for already defined classes.
18478 (check_pkg_class_access): Got rid of call to
18479 get_access_flags_from_decl.
18480 (java_complete_expand_methods): Call safe_layout_class based on
18481 the current class size.
18482 (make_qualified_primary): Build a WFL qualification on primary if
18483 none exists.
18484 (merge_qualified_name): New function.
18485 (make_qualified_name): Use merge_qualified_name.
18486 (resolve_expression_name): Use safe_lookup_field.
18487 (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18488 (resolve_qualified_expression_name): Likewise. Check on resolved
18489 element accessibility.
18490 (not_accessible_p, class_in_current_package): New functions.
18491 (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18492 (patch_method_invocation_stmt): Merged common pieces. Check
18493 accessibility of invoked method.
18494 (check_for_static_method_reference): Add returned type in error
18495 message.
18496 (invocation_mode): Get rid of bogus check on PRIVATE methods.
18497 (refine_accessible_methods_list): Merged two conditions in test.
18498 (java_complete_class): Sanity check on stabilize_ref gone.
18499 * zextract.c (read_zip_archive): Cast lseek second argument to long.
18500
18501 1998-07-28 Per Bothner <bothner@cygnus.com>
18502
18503 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
18504
18505 1998-07-24 Tom Tromey <tromey@cygnus.com>
18506
18507 * gjavah.c (F_NAN): Removed.
18508 (F_NAN_MASK): New macro.
18509 (F_POSITIVE_INFINITY): Removed.
18510 (F_NEGATIVE_INFINITY): Likewise.
18511 (java_float_finite): Rewrote.
18512 (D_NAN_MASK): Renamed.
18513 (java_double_finite): Rewrote.
18514 (D_POSITIVE_INFINITY): Removed.
18515 (D_NEGATIVE_INFINITY): Likewise.
18516
18517 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18518 If verbose, print underlying representation of value in hex.
18519
18520 1998-07-24 Per Bothner <bothner@cygnus.com>
18521
18522 * buffer.h, buffer.c: New files.
18523 * Makefile.in (JAVA_OBJS): Add buffer.o.
18524
18525 Support locals variables and writing their debug entries to .class.
18526 * jcf-write.c: Simplify some by user new buffer type.
18527 (vode_buffer_grow): Removed.
18528 (struct localvar_info): New type.
18529 (localsvars, localvartable): New buffers.
18530 (localvar_alloc, localvar_free): New functions.
18531 (generate_bytecode_insns): Handle local variables.
18532 (generate_classfile): Write LocalVariableTable attribute.
18533
18534 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18535
18536 * jcf-io.c (open_in_zip): Check the zipfile magic number.
18537 * zipfile.h (ZIPMAGIC): New macro.
18538
18539 1998-07-24 Tom Tromey <tromey@cygnus.com>
18540
18541 * Makefile.in (gjavah.o): Updated dependencies.
18542 (jcf-dump.o): Likewise.
18543 (all.indirect): Use ../gjavah.
18544 (../gjavah$(exeext)): Likewise.
18545 (clean): Don't remove gjavah.
18546 (clean): Remove parse.c, not java/parse.c.
18547 * Make-lang.in (java): Added gjavah.
18548 (gjavah$(exeext)): New target.
18549 (GJAVAH_SOURCES): New macro.
18550 (java.all.build): Added gjavah.
18551 (java.all.cross): Likewise.
18552 (java.rest.encap): Likewise.
18553 * config-lang.in (compilers, stagestuff): Added gjavah.
18554
18555 1998-07-23 Tom Tromey <tromey@cygnus.com>
18556
18557 * gjavah.c (java_float_finite): New function.
18558 (java_double_finite): Likewise.
18559 (F_POSITIVE_INFINITY): New macro.
18560 (F_NEGATIVE_INFINITY): Likewise.
18561 (F_NAN): Likewise.
18562 (D_POSITIVE_INFINITY): Likewise.
18563 (D_NEGATIVE_INFINITY): Likewise.
18564 (D_NAN): Likewise.
18565 (print_field_info): Use java_float_finite and java_double_finite.
18566
18567 1998-07-23 Per Bothner <bothner@cygnus.com>
18568
18569 * parse.y (method_header): Name "this" implicit argument.
18570
18571 1998-07-22 Per Bothner <bothner@cygnus.com>
18572
18573 * jcf-write.c: Write out LineNumberTable attribute in .class file.
18574 (linenumber_buffer, linenumber_ptr, linenumber_limit): New statics.
18575 (put_linenumber): New function.
18576 (generate_bytecode_insns, generate_classfile): Write line numbers.
18577
18578 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
18579
18580 * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18581 (lookup_name, build_known_method_ref, build_class_init,
18582 build_invokevirtual, invoke_build_dtable, match_java_method,
18583 build_field_ref, pushdecl_force_head, build_java_binop,
18584 binary_numeric_promotion, build_decl_no_layout,
18585 build_java_arrayaccess, build_newarray, build_anewarray,
18586 build_java_array_length_access, build_java_arraynull_check): New
18587 extern function prototypes.
18588 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18589 JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18590 java-tree.h.
18591 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18592 to NULL
18593 * jcf.h (jcf_out_of_synch): New extern function prototype.
18594 * parse.h: Static/global function implemented in parse.y
18595 prototyped and declarations moved at the end of the file.
18596 (DECL_P): Check that the argument isn't null.
18597 (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18598 JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18599 (QUAL_DECL_TYPE): New macro.
18600 (PARAMS): Macro definition removed.
18601 * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18602 (return_statement:): Call build_return.
18603 (field_access:): Call make_qualified_primary in sub rule.
18604 (method_invocation:): Build method invocation and call
18605 make_qualified_primary when processing primaries.
18606 (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18607 get_type_from_signature.
18608 (java_check_regular_method): Extra integer 0 argument when calling
18609 lookup_java_method2.
18610 (lookup_java_interface_method2): Extra method DECL argument when
18611 calling lookup_java_interface_method2.
18612 (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18613 COMPOUND_EXPR node.
18614 (java_complete_expand_method): Layout current class iff not
18615 already done. Don't process interface's methods.
18616 (java_complete_expand_method): Use super class only if it
18617 exists. Use current class otherwise.
18618 (make_qualified_primary): New function.
18619 (resolve_expression_name): Process qualified expression or
18620 expression from primary the same way.
18621 (resolve_expression_name): Two last arguments to
18622 resolve_field_access are now NULL_TREEs.
18623 (resolve_field_access): New variable is_static. Local field must
18624 be DECLs. is_static computed on field DECLs only. Append code in
18625 where_found to the field access if necessary. Use QUAL_DECL_TYPE
18626 to initialize field_type.
18627 (resolve_qualified_expression_name): New local variable,
18628 previous_call_static and is_static. Handle primaries with function
18629 calls, casts, array references and `this'. `super' now handled as
18630 `(super_class)this'. Use is_static to clarify boolean expressions.
18631 Added code to handle case where a proper handle is required to
18632 access a field. Use QUAL_DECL_TYPE where applicable.
18633 (maybe_access_field): New function.
18634 (patch_method_invocation_stmt): New arguments primary, where,
18635 is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18636 deleted. Use `where' as a type to search from if specified. Check
18637 for static method reference where forbidden. Append primary or
18638 current_this to the argument list if not calling constructor nor
18639 static methods.
18640 (check_for_static_method_reference): New function.
18641 (patch_invoke): Layout the class on which new is done if
18642 necessary.
18643 (lookup_method_invoke): Changed format to report errors on
18644 methods.
18645 (qualify_ambiguous_name): New local variable this_found. Now
18646 handle things from primaries. Method call are considered
18647 expression names.
18648 (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18649 changed into NULLs.
18650 (not_initialized_as_it_should_p): Comply with the new DECL_P.
18651 (java_complete_tree): New case fo RETURN_EXPR. Process function
18652 call arguments in separate function.
18653 (complete_function_arguments): New function.
18654 (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18655 anymore.
18656 (patch_assignment): Take the return function slot into account as
18657 a RHS. Distinguish assignment from a return.
18658 (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18659 when checking methods in interfaces.
18660 (resolve_type_during_patch): NULL argument to unresolve_type_p
18661 instead of NULL_TREE.
18662 (patch_newarray): Fixed typo in comment.
18663 (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18664 (build_return, patch_return): New functions.
18665 * typeck.c (lookup_java_constructor): Fixed typo in comment.
18666
18667 1998-07-21 Per Bothner <bothner@cygnus.com>
18668
18669 * constants.c (find_name_and_type_constant, find_fieldref_index,
18670 find_methodref_index): New methods.
18671 * expr.c (build_invoke_non_interface): If flag_emit_class_files,
18672 just return given method. Also, rename to build_known_method_ref.
18673 (expand_invoke): Rename call to build_invoke_non_interface.
18674 * java-tree.h, parse.h: Update prototype.
18675 * parse.y, decl.c, jcf-parse.c: Suppress calls to back-end functions
18676 (such as expand_expr_stmt) if flag_emit_class_files.
18677 * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18678 STACK_TARGET, IGNORE_TARGET): New macros.
18679 (code_buffer, code_ptr, code_limit, code_S, code_SP_max): New globals.
18680 (generate_bytecode_insn): New function to generate method's bytecode.
18681 (generate_classfile): Node generate Code attribute for a method.
18682 (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18683 push_long_const, field_op, adjust_typed_op, maybe_wide):
18684 New functions used by generate_bytecode_insn.
18685
18686 * typeck.c (signature_include_return): Remove variable.
18687 (push_java_argument_signature, build_java_argument_signature): New.
18688 (build_java_signature): Use push_java_argument_signature.
18689 * parse.y: Use build_java_argument_signature instead of fiddling
18690 with signature_include_return.
18691
18692 1998-07-17 Tom Tromey <tromey@cygnus.com>
18693
18694 * gjavah.c (print_c_decl): Always generate JArray<>* for array
18695 types.
18696
18697 * Makefile.in (all.indirect): Added gjavah$(exeext).
18698 (gjavah$(exeext)): Added $(exeext).
18699 (clean): Likewise.
18700
18701 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
18702
18703 * class.c (layout_class): Call to java_layout_parsed_class replace
18704 by safe_layout_class.
18705 * expr.c (build_java_array_length_access): Removed static storage
18706 class in the function definition.
18707 (build_java_arraynull_check): Likewise.
18708 Also fixed typos in two comments.
18709 * lex.c (java_init_lex): Initialize static global kw_length.
18710 (java_lex): Use BUILD_OPERATOR on RETURN_TK.
18711 * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
18712 java_lex_error.
18713 (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
18714 * parse.h (resolve_no_layout): New static function declaration.
18715 (get_identifier_in_static): Declaration removed.
18716 (java_layout_parsed_class): Function name declaration changed to
18717 safe_layout_class.
18718 (build_newarray_node, patch_newarray, resolve_type_during_patch,
18719 not_initialized_as_it_should_p, build_this): New static function
18720 declarations.
18721 (pushdecl_force_head, build_java_binop, int_fits_type_p,
18722 binary_numeric_promotion, stabilize_reference,
18723 build_decl_no_layout, build_java_arrayaccess): Extern function
18724 declarations moved into their own section.
18725 (build_newarray, build_anewarray, build_java_array_length_access,
18726 build_java_arraynull_check): New extern function declarations.
18727 (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
18728 (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
18729 fake tree codes.
18730 (CALL_CONSTRUCTOR_P): New macro.
18731 * parse.y (kw_length): New static global tree node.
18732 (return_statement): Tagged <node>.
18733 (RETURN_TK): Tagged <operator>.
18734 (variable_declarator_id:): Build variable declaration with an
18735 empty initialization value if a syntax error was found in the
18736 initialization part of the variable declaration.
18737 (statement_without_trailing_substatement:): return_statement: now
18738 uses the default rule.
18739 (return_statement:): Temporarily fixed to return NULL_TREE.
18740 (primary_no_new_array:): Call build_this when THIS_TK was parsed.
18741 (class_instance_creation_expression:): Class creation rules now
18742 call build_method_invocation upon reduction.
18743 (array_creation_expression:): Rules call build_newarray_node upon
18744 reduction.
18745 (dim_exprs:): Build a list of dimension expressions.
18746 (dim_expr:): Store location of the OSB_TK in the dimension
18747 expression node.
18748 (method_invocation:): Added a new error rule.
18749 (build_unresolved_array_type): WFL argument may also be an array
18750 on a primitive type. Name of the argument changed to reflect this.
18751 (method_declarator): Insert argument type at the beginning of the
18752 argument type list and later reverse the list.
18753 (unresolved_type_p): Argument 'returned' may be optionally
18754 NULL_TREE.
18755 (java_layout_class_from_source): Function renamed
18756 safe_layout_class.
18757 (resolve_and_layout): Now call resolve_no_layout and
18758 safe_layout_class.
18759 (resolve_no_layout): New function.
18760 (purify_type_name): New function.
18761 (complete_class_report_errors): Call purify_type_name during error
18762 report on a type not found.
18763 (process_imports): error_found local variable doesn't need to be
18764 initialized to zero.
18765 (declare_local_variables): New local type_wfl. Fixed typo in error
18766 message. type_wfl assigned to unresolved type and used to register
18767 incomplete type. Build a WFL around the variable initialization
18768 statement so that debug info can be generated on it.
18769 (source_start_java_method): Reverse argument list after they've
18770 been processed.
18771 (current_this): New static global variable.
18772 (java_complete_expand_methods): Set current_this when appropriate.
18773 (resolve_expression_name): Build correct static and non static
18774 field access bearing a simple name.
18775 (resolve_field_access): Resolve the length field of arrays. Handle
18776 f.m() cases.
18777 (patch_method_invocation_stmt): Set the type of the method
18778 invocation to error_mark_node. This value is later overridden by a
18779 valid type, if any. Don't handle qualified constructor invocation
18780 as qualified method invocation. Call lookup_method_invoke with its
18781 new flag. It's no longer necessary to access the selected method
18782 as the value of a tree list. Handle constructor invocation.
18783 (patch_invoke): Reverse argument list when invoking non interface
18784 methods. Insert call to new as the first argument of the
18785 constructor.
18786 (invocation_mode): Return a INVOKE_STATIC is the invoked method is
18787 defined within a final class. Return INVOKE_STATIC if the invoked
18788 method is a constructor.
18789 (lookup_method_invoke): New lc argument is a flag to indicate a
18790 constructor lookup. Now handle constructor lookup. Choose the most
18791 specific method in case several were matching the invocation
18792 requirements. Return a method decl instead of a tree list featuring
18793 one single method decl element.
18794 (refine_accessible_methods_list): New lc flag argument to
18795 indicate that a constructor is being looked up.
18796 (not_initialized_as_it_should_p): New function.
18797 (java_complete_tree): Now process fake tree codes
18798 JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
18799 save_expr on resolved function call arguments. Case on
18800 UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
18801 (patch_assignment): LHS can be a field access expression. When
18802 dealing with reference, lhs_type is the promoted type of the
18803 rhs_type, not the RHS. Use not_initialized_as_it_should_p where
18804 applicable.
18805 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18806 (patch_binop): Use not_initialized_as_it_should_p where
18807 applicable.
18808 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18809 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
18810 where applicable.
18811 (resolve_type_during_patch): New function.
18812 (patch_cast): Call resolve_type_during_patch to resolve type and
18813 report error accordingly.
18814 (patch_array_ref): Use not_initialized_as_it_should_p where
18815 applicable. Array base expression is saved before being
18816 used. Promote the type of an array elements if it contains non
18817 builtin types.
18818 (build_newarray_node, patch_newarray, build_this): New functions.
18819
18820 1998-07-16 Tom Tromey <tromey@cygnus.com>
18821
18822 * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
18823 increment it in `for' statement.
18824 (print_field_info): If number is inf or nan, don't print it.
18825 (print_method_info): If method name is `delete', just ignore it.
18826 (print_c_decl): Special-case jstringArray.
18827
18828 * gjavah.c (help): New function.
18829 (no_argument): New function.
18830 (usage): Changed text.
18831 (main): Rewrote argument handling. Now handles -v, --help,
18832 --version.
18833 (version): New function.
18834 (found_error): New global.
18835 (main): Return found_error.
18836 (generate_access): Set found_error.
18837 (print_c_decl): Likewise.
18838
18839 1998-07-15 Tom Tromey <tromey@cygnus.com>
18840
18841 * gjavah.c (print_c_decl): Don't print "," when examining field.
18842 Skip type name when looking at "[L" types.
18843 (process_file): Now static.
18844 (generate_access): Now returns int.
18845 (last_access_generated): New global.
18846 (process_file): Clear last_access_generated; make multiple passes
18847 over the class.
18848 (print_field_info): Just return if generate_access returns true.
18849 (print_method_info): Likewise. Also, allow <init> functions to
18850 pass through.
18851 (print_c_decl): Added is_init argument. Print constructors
18852 properly.
18853 (print_cxx_classname): Use UTF8_GET to extract characters from
18854 string.
18855 (print_base_classname): New function.
18856 (print_class_decls): New function.
18857 (process_file): Use it.
18858 (utf8_cmp): New function.
18859
18860 1998-07-13 Nick Clifton <nickc@cygnus.com>
18861
18862 * lang-options.h: Format changed to match changes in gcc/toplev.c
18863 to implement a --help option.
18864
18865 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
18866
18867 * decl.c (init_decl_processing): Revert change to dtable_type.
18868
18869 1998-07-09 Per Bothner <bothner@cygnus.com>
18870
18871 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18872
18873 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
18874
18875 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18876
18877 * lang.c (lang_init): Default flag_exceptions to 1, without
18878 checking to see if it's 2 first.
18879
18880 1998-07-08 Jeffrey A Law (law@cygnus.com)
18881
18882 * constants.c: Include "system.h".
18883 * decl.c: Likewise.
18884 * lang.c (flag_new_exceptions): Get via extern now.
18885 (lang_init_options): New functions. Turn on flag_new_exceptions.
18886
18887 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18888
18889 * lex.c (java_lex): Return 0 when we see an invalid character in
18890 the input.
18891
18892 * lex.c (java_read_char): Specify extra argument when calling
18893 java_lex_error.
18894 (java_read_unicode, java_parse_end_comment,
18895 java_parse_escape_sequence): Likewise,
18896 (java_lex): Specify extra argument when calling
18897 java_lex_error. Test that IDs are beginning with a legal character
18898 for IDs. Handle invalid characters with an error message and a
18899 call to java_lex_error.
18900 (java_lex_error): Adjust column position by new argument
18901 `forward'. Issue an error even if in the middle of reporting an
18902 other error.
18903
18904 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
18905
18906 * jcf-io.c (find_class): Zero out BUFFER before we use it, since
18907 we don't explicitly put a null pointer when we're copying it.
18908
18909 1998-07-07 Tom Tromey <tromey@cygnus.com>
18910
18911 * gjavah.c (print_cxx_classname): New function.
18912 (super_class_name): Likewise.
18913 (print_super_fields): Removed.
18914 (in_super): Removed.
18915 (print_field_info): Never generate #defines.
18916 (print_c_decl): Changed generated types to match JNI. No longer
18917 print class name before method name.
18918 (print_method_info): Print "static" before static methods.
18919 Print "virtual" before non-final methods.
18920 (usage): Use exit(1), not exit(-1).
18921 (main): Likewise.
18922 (print_field_info): Use %.17g to print a double.
18923 (last_access): New globals.
18924 (process_file): Initialize last_access.
18925 (usage): Now static.
18926 (ACC_VISIBILITY): New define.
18927 (generate_access): New function.
18928 (print_field_info): Call it.
18929 (print_method_info): Likewise. Also, generate information for all
18930 methods, not just native methods. Return void.
18931 (print_c_decl): Return void.
18932 (print_field_info): Return void.
18933
18934 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18935
18936 * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
18937 processing the jc1 grammar file. Prefix bison functions and
18938 variables with java_.
18939 (parse.c): Dependencies on parse.h and lex.h
18940 * expr.c (build_java_arrayaccess): Function now global.
18941 * java-tree.h: Comment reorganized to carry on previous
18942 classification effort.
18943 (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
18944 RESOLVE_TYPE_NAME_P): New flags on WFLs.
18945 * jcf-parse.c (parse_source_file): java_parse_source_file renamed
18946 java_parse (new prefix java_ generated by bison).
18947 (java_layout_parsed_class, java_register_parsed_class): Function
18948 call removed.
18949 (yyparse): Removed unnecessary call to init_outgoing_cpool.
18950 * lex.c (static tree wfl_op): Variable deleted.
18951 (java_init_lex): Initialize kw_super and kw_this. Initialize more
18952 ctxp fields to NULL_TREE.
18953 (java_lex): No longer create WFL for operators. Filename caching
18954 mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
18955 created as STRING_CST and later expanded. Removed extra argument
18956 to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
18957 and SUPER.
18958 (build_wfl_node): Removed code in comments.
18959 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
18960 store token and location data in the current bison token.
18961 * parse.h: Removed pre-processor based symbol prefixes hack. Moved
18962 static/extern function declaration at the beginning of the file.
18963 (struct qualification): Data structure definition deleted.
18964 (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
18965 (qualify_ambiguous_name): Function declaration modified. Function
18966 now returns nothing.
18967 (build_array_ref, patch_array_ref, make_qualified_name,
18968 resolve_qualified_expression_name, maybe_generate_clinit,
18969 resolve_field_access): New static function declarations.
18970 (build_java_arrayaccess): New extern function declaration.
18971 (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
18972 (CALL_EXPR_PRIMARY): Macro deleted.
18973 (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
18974 (struct parser_ctxt): Field initialized_final
18975 removed. non_static_initialized, static_initialized: New fields.
18976 * parse.y (static tree kw_super, static tree kw_this): New global
18977 static.
18978 (%union): tree wfl field of operator member replaced by int
18979 location. WFLs are non longer created for operators.
18980 (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
18981 (qualified_name:): Now calls make_qualified_name to build the
18982 identifier.
18983 (type_declaration:): Consider generating <clinit> when class
18984 parsing completed.
18985 (variable_declarator:): Directly build an assignment node when the
18986 variable is initialized when declared.
18987 (this_or_super:): Build a WFL and set current location when THIS
18988 or SUPER are parsed.
18989 (expression_statement:): Wrap statement around a WFL.
18990 (primary_no_new_array:): Fixed typo. Changed value returned by
18991 THIS_TK because of its new type (temporary).
18992 (dim_exprs:): Temporary fix because of OSB_TK's new type.
18993 (field_access:): Build qualified name with SUPER.
18994 (method_invocation:): Fixed returned value because of SUPER's new
18995 type.
18996 (array_access:): Use OSB_TK location information.
18997 (post_increment_expression:, post_decrement_expression:,
18998 unary_expression:, pre_increment_expression:,
18999 pre_decrement_expression:, unary_expression_not_plus_minus:,
19000 cast_expression:, multiplicative_expression:,
19001 additive_expression:, shift_expression:, relational_expression:,
19002 equality_expression:, and_expression:, exclusive_or_expression:,
19003 inclusive_or_expression:, conditional_and_expression:,
19004 conditional_or_expression:, assignment:): Use new location/token
19005 information available on operators.
19006 (create_class): Set super_decl_type to NULL_TREE when processing
19007 java.lang.Object.
19008 (register_fields): Field initialization is now a MODIFY_EXPR
19009 node. Chain initialization code to the matching lists (according
19010 to the field declaration modifiers).
19011 (maybe_generate_clinit): New function.
19012 (method_header): Don't set method's DECL_NAME to a WFL when adding
19013 methods to java.lang.Object.
19014 (resolve_and_layout): Now can return NULL_TREE if the type
19015 resolution fails. Otherwise, return the class DECL instead of its
19016 TYPE.
19017 (check_method_redefinition): Don't patch method DECL_NAME if it
19018 belongs to java.lang.Object.
19019 (process_imports): Simply assign error_found to the value returned
19020 by check_pkg_class_access.
19021 (declare_local_variables): Don't use their init statements (if
19022 any) when parsing error were previously found. Reuse MODIFY_EXPR
19023 build during parsing as an init statement.
19024 (java_method_add_stmt): Now return the current method body.
19025 (java_layout_parsed_class, java_register_parsed_class): Functions
19026 removed.
19027 (java_complete_expand_methods): Initialize the constant pool on a
19028 per class basis. Layout the classes before expanding their method
19029 bodies. Don't try expand artificial constructor code if error were
19030 found. Make the classes data and register them if no error were
19031 found.
19032 (java_complete_expand_method): Retrieve an artificial constructor
19033 argument list before entering its body. Assign the top block to
19034 the artificial constructor function body and set types of declared
19035 blocks and compound statements to void. Walk method body if not an
19036 artificial constructor.
19037 (make_qualified_name, cut_identifier_in_qualified): New functions.
19038 (resolve_expression_name): Fixed comments. Save/restore the
19039 current class CLASS_LOADED_P flag value. Build non qualified
19040 static field access and handle qualified expression names.
19041 (resolve_field_access, resolve_qualified_expression_name): New
19042 functions.
19043 (patch_method_invocation_stmt): Use the new expression resolution
19044 scheme, calling resolve_field_access when the function call is
19045 resolved as an expression.
19046 (qualify_ambiguous_name): Function rewritten to work on qualified
19047 expression produced by make_qualified_name.
19048 (java_complete_tree): Promote type when function's argument are
19049 RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19050 the assignment to discover further errors if RHS is a expression
19051 name that fails to evaluate. Declare LHS initialized even though
19052 the assignment failed. Don't use the location variable and removed
19053 extra argument in patch function calls. Now handle the ARRAY_REF
19054 case and build internal string representation when STRING_CSTs are
19055 walked.
19056 (build_method_invocation): Don't wrap function call around a WFL.
19057 (build_assignment): Likewise. Use the operator location
19058 information.
19059 (patch_assignment): Handle array access LHSs. Handle error
19060 provenance, resulting in a better error report.
19061 (build_binop): Use op_location from operator as binop location
19062 information.
19063 (build_unaryop, build_incdec, build_cast): Likewise.
19064 (patch_binop): Extract location information from the node. Fixed
19065 typo in error message.
19066 (patch_unary_op): Extract location information from the node.
19067 (build_array_ref, patch_array_ref): New functions.
19068
19069 1998-07-01 Tom Tromey <tromey@cygnus.com>
19070
19071 * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19072 match _Jv_IsInstanceOf.
19073 * decl.c (init_decl_processing): Use _Jv_NewArray, not
19074 soft_newarray. Use _Jv_IsInstanceOf, not soft_instanceof.
19075
19076 1998-06-30 Tom Tromey <tromey@cygnus.com>
19077
19078 * decl.c (init_decl_processing): Functions are now named
19079 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19080
19081 1998-06-29 Per Bothner <bothner@cygnus.com>
19082
19083 * java-tree.h (load_class): Add prototype.
19084 * class.c (is_compiled_class): Add missing arg to load_class.
19085 * expr.c (expand_java_NEW): Call load_class.
19086 * parse.y (process_import): Removed bogus use of void return value.
19087
19088 1998-06-25 Per Bothner <bothner@cygnus.com>
19089
19090 * decl.c, java-tree.h (soft_athrow_node): Renamed to soft_node.
19091 Function name is "_Jv_Throw" instead of "soft_athrow".
19092 * decl.c, java-tree.h (soft_new_node): Renamed to alloc_object_node.
19093 Function name is "_Jv_AllocObject" instead of "soft_new".
19094 Takes an extra parameter (object size).
19095 * expr.c: Update calls.
19096
19097 1998-06-24 Per Bothner <bothner@cygnus.com>
19098
19099 * lex.c (java_get_line_col): Handle end-of-file.
19100 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
19101
19102 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
19103
19104 * lang.c (lang_init): Make -fexceptions the default.
19105 * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19106 exception handling is not turned on.
19107
19108 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
19109
19110 * lang.c (flag_new_exceptions): Make this this default.
19111 * decl.c (end_java_method): Call emit_handlers.
19112 * except.c (method_init_exceptions): Set language code and version.
19113 (expand_start_java_handler): Enable exception, and call
19114 expand_eh_region_start.
19115 (expand_end_java_handler): Enable exception, and set up catch blocks.
19116 (emit_handlers): New routine to generate the saved handlers.
19117 * java-except.h (emit_handlers): Add prototype.
19118
19119 1998-06-12 Per Bothner <bothner@cygnus.com>
19120
19121 We used to have three different representations of the constant pool:
19122 the CPool structure, the tree_constant_pool, and the constructures
19123 used to build the Class object (which may need class and string
19124 constants) in compiled code. None were appropriate for compiling
19125 to .class files, so I did a major overhaul.
19126
19127 First, the tree_constant_pool array was removed. Things were
19128 modified to the CPool structure in the JCF could be used.
19129 Second, a "capacity" field was added to the CPool, and functions
19130 written to search for a matching constant, adding one if not found.
19131 The code that generated the Class object was changed to use a CPool.
19132 The actual TREE_LISTs used to build the CONSTRUCTORs used for
19133 the static Class object are now only in build_constants_constructor.
19134 Finally, I wrote code which can generate a .class file (including its
19135 constant pool) from the RECORD_TYPE of a class. This is a big step
19136 on the way to compiling Java source into .class files.
19137
19138 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
19139 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
19140
19141 * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19142 CONSTANT_ResolvedString, CONSTANT_ResolvedClass): New macros.
19143 (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19144 COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19145 (COMPONENT_REF_CLASS): Replaced by COMPONENT_REF_CLASS_INDEX.
19146 (lang_type): Removed constant_pool field.
19147 * jcf.h (CPool): Renamed size to count. Added field capacity.
19148 (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19149 CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT): New macros.
19150 Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19151
19152 * constants.c (current_constant_pool_tags, current_constant_pool_data,
19153 current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19154 * constants.c (build_constants_constructor): Use new outgoing_cpool.
19155 (set_constant_entry, find_constant1, find_constant2,
19156 find_class_constant, count_constant_pool_bytes, write_constant_pool,
19157 find_utf8_constant, find_class_or_string_constant): New functions.
19158
19159 * jcf-parse.c (load_class): Don't save/restore tree-constant_pool.
19160 (get_constant): Use current_jcf.cpool instead of tree_constant_pool.
19161 (give_name_to_class, get_class_constant): Likewise.
19162 * jcf-parse.c, java-tree.h (tree_constant_pool): Removed.
19163 (get_name_and_type_constant, get_ref_constant): Removed.
19164 * parse.h (parser_ctxt): Remove field tree_constant_pool.
19165 * parse.y: Don't save/restore tree_constant_pool.
19166 * verify.c (verify_jvm_instructions): Update for new approach.
19167 * expr.c (expand_invoke, expand_java_field_op): Likewise.
19168
19169 * lang-options.h: Added -femit-class-file, -femit-class-files.
19170 * lang.c (flag_emit_class_files), java-tree.h: New flag.
19171 (lang_f_options): Added "emit-class-file(s)".
19172
19173 * expr.c (build_java_arrayaccess): Generate more efficient array
19174 bounds checking, by using unsigned compare.
19175
19176 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
19177
19178 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
19179
19180 * parse.h: New comment on the handling of unresolved type
19181 identifiers. JDEPs are now part of the jdep_code enum.
19182 (typedef struct jdep): Now use enum jdep_code or int, depending on
19183 availability. Both are narrowed down to an 8 bits bitfield.
19184 (CALL_EXPR_PRIMARY): Fixed comment.
19185
19186 1998-06-10 Tom Tromey <tromey@cygnus.com>
19187
19188 * Make-lang.in (java): Added gjavac and jvgenmain.
19189 (java.start.encap): Depend on gjavac.
19190 (java.rest.encap): Depend on jvgenmain.
19191
19192 * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19193 (JAVA_CROSS_NAME): Likewise.
19194 (java.all.build): Depend on jvgenmain and gjavac.
19195 (java.all.cross): Depend on jvgenmain and gjavac-cross.
19196 (jvgenmain$(exeext)): New target.
19197 (java.install-common): Wrote.
19198 * config-lang.in (compilers, stagestuff): Added gjavac and
19199 jvgenmain.
19200
19201 1998-06-10 Dave Brolley <brolley@cygnus.com>
19202
19203 * lang.c (lang_decode_option): New argc/argv interface.
19204
19205 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
19206
19207 * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19208 * decl.c (build_decl_no_layout): New function.
19209 * expr.c (java_lang_expand_expr): Layout declarations found in
19210 blocks before they're pushed.
19211 * jcf-parse.c (load_class): Save current line when parsing class
19212 file.
19213 (parse_source_file): Register class before expanding their
19214 methods.
19215 * lang.c (put_decl_node): Produce `null' when `void *' is
19216 processed.
19217 * lex.c (static tree wfl_op): New static global, for error report
19218 on casts.
19219 (java_init_lex): wfl_operator and wfl_op initialized
19220 here. Filename caching added for wfl_op. Return wfl_op when `(' is
19221 parsed.
19222 * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19223 patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19224 build_unresolved_array_type): New static function definitions.
19225 (build_decl_no_layout): New extern function declared.
19226 (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19227 faulty modifier exists.
19228 (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19229 (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19230 (UNARY_PLUS_EXPR): New fake operator.
19231 (struct parser_ctxt): New field osb_number.
19232 * parse.y (static tree wfl_operator): New static WFL for operator
19233 bound error messages.
19234 (DECR_TK, INCR_TK): Moved.
19235 (OP_TK): Tagged <operator>.
19236 (array_type:): Now call build_unresolved_array_type.
19237 (dim_expr:): Count the number of '[' seen.
19238 (post_increment_expression, post_decrement_expression,
19239 pre_increment_expression, pre_decrement_expression,
19240 unary_expression_not_plus_minus, unary_expression:): Actions are
19241 now building the corresponding unary expressions.
19242 (cast_expression:): Actions are now building cast expressions.
19243 (build_unresolved_array_type): New function.
19244 (create_interface): Reset the number of declared interfaces.
19245 (create_class): Likewise.
19246 (method_header): Methods declared within the scope of an interface
19247 are now implicitly set public and abstract.
19248 (java_complete_class): Variable's and parameter's type are patched
19249 with a promoted type.
19250 (declare_local_variables): Resolved non builtin types are promoted
19251 before being used to build a variable decl. Removed type patch
19252 posted on variable initialization statement.
19253 (source_start_java_method): Use build_decl_no_layout to build the
19254 decl of a parameter of incomplete type.
19255 (java_register_parsed_class): Process interfaces too. Call
19256 rest_of_decl_compilation on each processed class declarations.
19257 (java_complete_expand_methods): Don't attempt to expand things in
19258 interfaces.
19259 (java_complete_tree): Process CONVERT_EXPR, even though it always
19260 has a type. Propagate error_mark_node to node's type too. Promote
19261 method's call argument type and return error_mark_node if
19262 argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19263 RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19264 handle unary operator nodes.
19265 (build_assignment): Added comment.
19266 (print_int_node): New function.
19267 (patch_assignment): New second argument. New error handling. Use
19268 print_int_node. Handle references. Use can_cast_to_p to issue
19269 different error message according to the context and check upon
19270 the initialization of the RHS.
19271 (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19272 (operator_string): Handle more operators.
19273 (patch_binop): No longer use a function static
19274 wfl_operator. Improved error message on shift distance.
19275 (build_unaryop, build_incdec, build_cast, patch_unaryop,
19276 patch_cast): New functions.
19277
19278 1998-06-05 Per Bothner <bothner@cygnus.com>
19279
19280 * jvspec.c: New file.
19281 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
19282
19283 * java-tree.h (identifier_subst): Add declaration.
19284
19285 1998-06-04 Tom Tromey <tromey@cygnus.com>
19286
19287 * jvgenmain.c (main): Generate call to JvRunMain.
19288
19289 * class.c (make_class_data): Push value for "sync_info" field.
19290 * decl.c (init_decl_processing): Push "sync_info" field.
19291
19292 1998-06-03 Per Bothner <bothner@cygnus.com>
19293
19294 * typeck.c (build_java_array_type): Set TYPE_NAME to actual
19295 Java (source) name, not signature.
19296 Set TYPE_ALIGN to (at least) that of element_type.
19297
19298 1998-06-02 Per Bothner <bothner@cygnus.com>
19299
19300 * class.c: Moved classname-mangling-rekated code to ...
19301 * mangle.c: ... this new file.
19302 * jvgenmain.c: New program (needs mangle.c) to generate main program.
19303 * Makefile.in: Update for above changes.
19304
19305 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
19306
19307 * expr.c (truthvalue_conversion): Convert integer and floating
19308 point value to their truth value.
19309 * lex.c (java_lex): Handle the `null' literal.
19310 * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19311 (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19312 ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19313 New macros.
19314
19315 * parse.y: Reorganization/documentation on token declaration.
19316 (binop_lookup[]): New added new tree codes.
19317 (relational_expression): Build corresponding binary operators.
19318 (equality_expression, conditional_and_expression,
19319 conditional_or_expression): Likewise.
19320 (java_complete_class): Fix crash in debug message.
19321 (java_complete_tree): Check initialization of method call
19322 arguments. Further bogus node evaluation to detect more error
19323 during assignments. Handles more binary operators.
19324 (patch_assignment): Use DECL_P.
19325 (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19326 code.
19327 (operator_string): Handle more case. Compacted source.
19328 (patch_binop): Changed function comment. Checking for
19329 uninitialized first operand takes the compound assignment into
19330 account and uses DECL_P. Checking for uninitialized second operand
19331 delayed to routine's end. Use macros to issue type bound error
19332 messages and issue messages on both operands if their types are
19333 different. Force fixed type into node. Handle all binary
19334 operators.
19335
19336 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19337
19338 * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19339 * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19340 build operator node and return tokens.
19341 * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19342 * parse.h (java_complete_tree): Changed returned type in prototype.
19343 (build_method_invocation, build_assignment, patch_assignment,
19344 patch_binop): New static function declarations.
19345 (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19346 BUILD_EXPR_WFL): New macros.
19347 * parse.y (enum tree_code binop_lookup[]): New static for token to
19348 TREE_CODE lookup.
19349 (%union): Parser union has new sub-structure `operator'.
19350 (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19351 PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19352 ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19353 ASSIGN_ANY_TK): Tokens tagged `operator'.
19354 (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19355 AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19356 MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19357 REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19358 (assignment_operator:): Rule tagged `operator'.
19359 (expression_statement:): Re-installed default rule.
19360 (method_invocation:): Sub rules call build_method_invocation.
19361 (postfix_expression:): Don't attempt to resolve name here. Just
19362 return an ID.
19363 (multiplicative_expression:): Sub-rules build corresponding binop
19364 expression node.
19365 (additive_expression:, shift_expression:, and_expression:,
19366 exclusive_or_expression:, inclusive_or_expression:): Likewise.
19367 (assignment:): Sub rule invoke build_assignment.
19368 (assignment_operator:): Default rules on sub rules.
19369 (force_error): Added documentation on this variable.
19370 (declare_local_variables): Build initialization calling
19371 build_assignment.
19372 (expand_start_java_method): Removed unused rtx declaration. Mark
19373 arguments as already initialized.
19374 (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19375 (java_complete_expand_methods): Don't process next method if
19376 completion of the previous one triggered errors.
19377 (java_complete_expand_method): Call source_end_java_method if no
19378 error were found during completion.
19379 (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19380 locals declaratilon. Handle names found within a class. Return
19381 error_mark_node when things aren't found.
19382 (patch_method_invocation_stmt): Return error_mark_node on failures.
19383 (patch_invoke): Removed unused local. Return the correct node.
19384 (java_complete_tree): Now returns a value. The BLOCK section binds
19385 local identifiers and the type of a BLOCK is now void. Assign the
19386 result of operand completion on COMPOUND_EXPR. Assign the
19387 encapsulated node of a WFL to the result of its completion, except
19388 when the node is an identifier. Now handle MODIFY_EXPR and several
19389 binary operators. Return error_mark_node on errors.
19390 (build_method_invocation, build_assignment, patch_assignment,
19391 build_binop, operator_string, patch_binop): New functions.
19392 * typeck.c (binary_numeric_promotion): New function.
19393
19394 1998-05-21 Per Bothner <bothner@cygnus.com>
19395
19396 * class.c (identifier_subst): New convenience wrapper for ident_subst.
19397 Replace most uses of ident_subst by identifier_subst.
19398
19399 * class.c (push_class_static_dummy_field): Removed function.
19400 (build_class_ref): Find Class object decl by looking up "CNAME.class",
19401 instead of looking got "class" static field. Create that decl here.
19402 (class_identifier_node): Removed; no longer needed.
19403 (init_class_processing): Don't init class_identifier_node.
19404 * jcf-parse.c (jcf_parse): Don't call push_class_static_dummy_field.
19405 Do nreverse 0 times (instead of twice) for Object and Class.
19406 * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19407
19408 1998-05-20 Per Bothner <bothner@cygnus.com>
19409
19410 * jcf-parse.c (parse_class-file): Set lino to smallest line number,
19411 while initializing linenumber_count and linenumber_table.
19412 Do it before init_function_start (which calls emit_line_note).
19413 * expr.c (expand_byte_code): Don't need to clear lineno here.
19414
19415 1998-05-18 Tom Tromey <tromey@cygnus.com>
19416
19417 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19418 then mangle number as _N_.
19419
19420 * class.c (mangle_class_field): New function.
19421 (build_class_ref): Set assembler name of class reference using
19422 mangle_class_field.
19423 (push_class_static_dummy_field): Likewise.
19424
19425 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
19426
19427 * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19428 of assigning to TREE_CODE. The latter method exploits a feature
19429 of GCC that is not ANSI compliant.
19430
19431 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
19432
19433 * decl.c (pushdecl_force_head): New function.
19434 (pushlevel): Removed conditional printf.
19435 (complete_start_java_method): Don't enter local variable scope if
19436 function is compiled from source code.
19437 * expr.c: parse.h now included
19438 (java_lang_expand_expr): New function.
19439 * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19440 printf. Terminate buffer when doing directories.
19441 * jcf-parse.c (parse_source_file): Call lang_init_source before
19442 parsing and before code generation.
19443 * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19444 use printf if the macro is defined.
19445 * lang.c (lang_init): Install lang_expand_expr hook on
19446 java_lang_expand_expr.
19447 (java_dummy_print): New function.
19448 (lang_init_source): New function.
19449 * lex.c (java_lex): Remember location of an opening brace at the
19450 second nesting level.
19451 (java_is_eol): Unget character seen after a CR if it is EOF.
19452 * parse.h: Now includes lex.h
19453 (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19454 printf if the macro is defined.
19455 (expand_start_java_method, build_expr_block, enter_block,
19456 exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19457 New static function declarations.
19458 (pushdecl_force_head): New extern function declaration.
19459 (INCOMPLETE_TYPE_P): New macro.
19460 (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19461 (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19462 BLOCK_EXPR_ORIGIN): New macros.
19463 (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19464 DECL_SOURCE_LINE_LAST): New macros.
19465 (struct parser_ctxt): Removed field current_method_decl, redundant
19466 with the field current_function_decl. Added fields
19467 first_ccb_indent1 and pending_block.
19468 * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19469 BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19470 tagged <node>
19471 (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19472 (compilation_unit:): Cosmetic on sub rule.
19473 (type_declaration:): Cosmetic on sub rules. Added an error rule.
19474 (variable_initializer:): Installed default rule on expression:.
19475 (method_declaration:): method_header: starts a new
19476 method. method_body: installs the function body, absorbs blocks
19477 emitted for temporary variable scopings, pops function's body block
19478 and merges function's last statement lineno in DECL_SOURCE_LINE.
19479 (method_body:): Installed default rules.
19480 (block:): Call enter_block when an opening brace is seen. Absorb
19481 scoping blocks and call exit_block when a closing brace is seen.
19482 (block_statement:): Cosmetic changes.
19483 (method_invocation:): Create WFL around CALL_EXPR node.
19484 (patch_stage): Added comment around definition.
19485 (method_header): Try to use first_ccb_indent1 as the first line of
19486 the method, so BP debug info are emitted at the first opening
19487 brace of the function. If the function has no body, use the
19488 location of the function's name. Override currently defined method
19489 name with the matching WFL so we can point redefinition errors
19490 using the location where the function's name was declared.
19491 (check_abstract_method_header): Interprets DECL_NAME as an
19492 identifier or as a WFL, accordingly.
19493 (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19494 (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19495 location and name information out of it and reinstall DECL_NAME to
19496 its original identifier node value.
19497 (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19498 function's source code).
19499 (read_import_dir): Test the value returned by find_class and issue
19500 a fatal accordingly.
19501 (declare_local_variables): Push a new block for the scope of the
19502 new variable(s) if code has been already generated at that nesting
19503 level. Pinpoint redefinition errors using the variable id
19504 WFLs. Generate initialization code if necessary. If the variable
19505 type is incomplete, register a patch on its decl.
19506 (source_start_java_method): Rewritten. Define a new block for the
19507 function's parameters. Build parameter decl out of function's
19508 arguments and register them for a patch if their types are
19509 incomplete.
19510 (expand_start_java_method): Includes the part of
19511 source_start_java_method that was pushing the parameter decls and
19512 completing the method start code.
19513 (source_end_java_method): Removed call the expand_end_bindings and
19514 poplevel (already taken care of). Reinstall function's arguments
19515 and get function's last line of code before calling
19516 expand_function_end.
19517 (java_method_add_stmt): New comment before the function's
19518 code. Complement the second operand of the current COMPOUND_EXPR
19519 if necessary.
19520 (java_complete_expand_methods): Don't generate debug info on line
19521 zero when expanding a generated constructor.
19522 (java_complete_expand_method): Set start and end line numbers for
19523 a artificially generated constructor to one and manually call
19524 enter_block and exit_block when defining it. For all methods:
19525 expand function's start calling the new expand_start_java_method
19526 and invoke java_complete_tree on the effective method's body, if
19527 any.
19528 (resolve_expression_name): Now use lookup_name_in_blocks to search
19529 local variable decls and print out an error when variables are
19530 undefined.
19531 (patch_method_invocation_stmt): Inserted comment before the
19532 function's code.
19533 (lookup_method_invoke): Chain method's arguments using chainon
19534 with the current arg list as a second argument. Inserted missing
19535 IDENTIFIER_POINTER when reporting an error on methods not found.
19536 (refine_accessible_methods_list): Don't retain constructors.
19537 (patch_arguments): Function removed.
19538 (java_complete_tree): Inserted comment before the function's
19539 code. New case for BLOCKs. Moved the WFL case a bit
19540 further. Complete function's arguments.
19541 (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19542 maybe_absorb_scoping_blocks): New functions.
19543
19544 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19545
19546 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19547 previously set.
19548 * jcf-parse.c (parse_source_file, java_error_count): New forward
19549 and extern declarations.
19550 (java_parse_abort_on_error): Macro moved.
19551 (jcf_parse_source): fatal called if fopen fails. Now calls
19552 parse_source_file.
19553 (parse_source_file): New parse_only parameter. Reflects the
19554 elimination of the second pass.
19555 (yyparse): parse_source_file called with argument set to 0.
19556 * jcf.h (JCF_ZERO): Sets java_source to zero.
19557 * lex.c (java_init_lex): pass argument is gone. Function modified
19558 to be called once during the analysis of a file.
19559 (java_unget_unicode): Fixed typo in fatal message.
19560 (java_get_line_col): Likewise.
19561 (java_lval): Likewise. String literals no longer built during
19562 second pass.
19563 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19564 account.
19565 * parse.h (MODIFIER_WFL): New macro.
19566 (parse_check_super, parser_check_super_interface): Now return int.
19567 (parser_chain_incomplete_item, not_builtin_p,
19568 complete_method_decl): Declarations removed.
19569 (build_method_invocation_stmt, build_invoke): Renamed using the
19570 `patch' instead of `build'
19571 (register-incomplete_type, obtain_incomplete_type,
19572 java_complete_tree, java_complete_expand_method,
19573 unresolved_type_p, create_jdep_list): New function declarations.
19574 (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19575 END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19576 (jdep): New typedef on new struct _jdep.
19577 (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19578 JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19579 JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19580 JDEP_RESOLVED_P): New macros.
19581 (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19582 JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19583 JDEP_VARIABLE): New enum values and jdep kinds.
19584 (jdeplist): New typedef on struct _jdeplist.
19585 (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19586 macros.
19587 (CALL_EXPR_PRIMARY): New macro.
19588 (struct parser_ctxt): Fields java_pass, current_method_decl,
19589 method_decl_list deleted. New field jdeplist.
19590 (INCOMPLETE_P): Macro deleted.
19591 * parse.y (single_type_import_declaration:): Removed pass switch.
19592 (type_import_on_demand_declaration): Likewise.
19593 (field_declaration:): Removed pass switch on all sub rules.
19594 (class_declaration:): Call the complete_class_decl removed on
19595 class_body rules.
19596 (method_declaration:): Removed second pass switch. No longer chain
19597 methods decl when method_header reduced.
19598 (method_header:): Sub rules no longer depend on pass switch.
19599 (method_declarator:): Likewise.
19600 (method_body:): Likewise.
19601 (abstract_method_declaration:): Likewise.
19602 (block_statement:): Likewise.
19603 (local_variable_declaration:): Likewise.
19604 (argument_list:): Likewise.
19605 (method_invocation:): Likewise. Call to build_method_invocation_stmt
19606 removed. Partial CLASS_EXPR tree node built instead.
19607 (postfix_expression:): Removed pass switch on all sub rules.
19608 (java_pop_parser_context): Free classd_list content.
19609 (yyerror): Call obstrack_grow0 to finalize error message.
19610 (check_class_interface_creation): Comment modified to reflect new
19611 returned value meaning. Removed second pass switch. Return 1 if an
19612 error was found, 0 otherwise. Adjust pointer on filename if a
19613 leading path separator was found.
19614 (maybe_create_class_interface_decl): Removed first pass switch
19615 when linking the class decl to the class_list. Install a new
19616 jdep_list for the class.
19617 (add_superinterfaces): List of unresolved interfaces is
19618 gone. Unresolved interfaces are directly added to the current
19619 dependencies list.
19620 (create_interface): Second pass shortcut removed.
19621 ctpx->modifier_ctx access through MODIFIER_WFL.
19622 (create_class): Second pass shortcut removed. Call to
19623 register_incomplete_type replaces the call to
19624 parser_chain_incomplete_item.
19625 (complete_class_decl): Function removed.
19626 (duplicate_declaration_error): New way of retrieving redeclared
19627 item type.
19628 (register_fields): Call to lookup_modifier_cl replaced by
19629 MODIFIER_WFL. New way of handling unresolved type, using
19630 unresolved_type_p and obtain_incomplete_type.
19631 register_incomplete_type replaces call to parser_chain_incomplete_item.
19632 (patch_stage): New static global variable.
19633 (method_header): New way of handling unresolved type, using
19634 unresolved_type_p and obtain_incomplete_type. patch_stage used to
19635 indicates that the method decl needs to be patched.
19636 (check_abstract_method_header): Call to lookup_modifier_cl
19637 replaced by MODIFIER_WFL.
19638 (method_declarator): Incomplete argument type are registered
19639 calling register_incomplete_type. Patch on the declared method is
19640 issued in that case.
19641 (unresolved_type_p): New function.
19642 (parser_check_super_interface): New comment to reflect function's
19643 modified returned type (int). Function and has a new argument
19644 this_wfl. Call to parse_error_context uses this_wfl instead of
19645 relying on lookup_cl.
19646 (parser_check_super): Comment reflects function's new returned
19647 type (int). Function returns nonzero value on error.
19648 (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19649 register_incomplete_type, jdep_resolve_class): New functions to
19650 handle incomplete types in declarations.
19651 (java_complete_class): Rewritten to work with the new incomplete
19652 type handling scheme.
19653 (complete_class_report_errors): Likewise.
19654 (complete_method_decl): Removed: it jobs is now handled by
19655 java_complete_class.
19656 (do_resolve_class): Class loaded in not already loaded and not
19657 found in Java source code.
19658 (java_check_regular_methods, java_check_abstract_methods): Don't
19659 call complete_method_decl anymore.
19660 (lookup_modifier_cl, not_builtin_p): Functions deleted.
19661 (read_import_dir): Got rid of the pass number dependency.
19662 (declare_local_variables): New handling of unresolved types (patch
19663 issued).
19664 (source_start_java_method): New parameter level. Function called
19665 with level set to 1 when argument types are potentially
19666 unresolved. Called to complete the job with level set to 2 once
19667 types are complete.
19668 (source_end_java_method): Call to permanent_allocation
19669 removed. Waiting to be replaced by a more suitable obstack
19670 management.
19671 (java_complete_expand_methods, java_complete_expand_method,
19672 java_expand_finals): New functions.
19673 (build_method_invocation_stmt): Renamed
19674 patch_method_invocation_stmt. Extracts function call expression
19675 (wfl) and arguments (args) from CALL_EXPR tree operands.
19676 (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19677 call. Patch the function and argument operand of the CALL_EXPR
19678 tree argument.
19679 (patch_argument, java_complete_tree): New functions.
19680
19681 1998-04-20 Per Bothner <bothner@cygnus.com>
19682
19683 Recover from missing fields and methods (i.e. error instead of fatal).
19684 * decl.c, java-tree.h (TYPE_identifier_node): New global constant.
19685 * expr.c (expand_invoke): Recover from missing method.
19686 (expand_java_field_op): Recover from missing field.
19687 Inline references to java.lang.{Integer,Char,...}.TYPE.
19688 * typeck.c (get_type_from_signature), java-tree.h: New function.
19689 * class.c (add_method): Use get_type_from_signature.
19690 (build_class_ref): Handle a class that was not found.
19691 * typeck.c (convert): Handle conversion to pointers (for convenience).
19692 * verify.c (verify_jvm_instructions): Use get_type_from_signature
19693 instead of lookup_field to handle missing fields.
19694
19695 * jcf-parse.c (process_zip_dir): Set java_source.
19696
19697 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
19698
19699 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19700
19701 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19702
19703 * jcf-parse.c (load_class): Don't change input_filename before
19704 calling jcf_parse_source (but still do it before calling
19705 jcf_parse).
19706 (jcf_parse_source): Assign input_filename after having saved the
19707 parser context.
19708 * lex.c (java_init_lex): Chain a WFL node to the import on demand
19709 list. ctxp->modifier_ctx zeroed according to its new
19710 definition. ctxp->filename initialized. Removed
19711 JAVA_MODIFIER_CTX_UNMARK.
19712 (java_unget_unicode): Update the character based column position.
19713 (java_allocate_new_line): ref_count not used anymore. Always free
19714 ctxp->p_line. Initialize c_line->char_col to 0.
19715 (java_get_unicode): Update the character based column position.
19716 (java_lex): Use ctxp->elc to store current position in source
19717 file, at the beginning of the parsed token. Set modifier_ctx entry
19718 corresponding to the parse modifier to a WFL node. Return a WFL
19719 node when an identifier is parsed.
19720 (java_lex_error): Now uses ctxp->elc to store current position in
19721 source.
19722 (build_wfl_node, java_is_eol, java_get_line_col): New functions.
19723 * lex.h (build_wfl_node): New function definitions.
19724 (struct java_line): ref_count and next fields are gone. New field
19725 char_col.
19726 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19727 JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
19728 (JAVA_COLUMN_DELTA): New macro.
19729 (java_lc): New typedef on new struct _java_lc.
19730 * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
19731 (parse_error_context, parse_warning_context): Changed prototypes.
19732 (java_get_line_col): Added as an available global function.
19733 (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
19734 (IC_DECL): Replaced by macro IC_TYPE
19735 (DEPEND_WFL): New macro.
19736 (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
19737 wrong modifier.
19738 (exit_java_complete_class): Removed a commented out statement.
19739 (struct parser_ctxt): Added comments on fields. modifier_ctx is
19740 now an array of tree nodes. Deleted fields line_list and
19741 e_line. New field elc, to replace e_line.
19742 * parse.y (array_type:): Build WFL node.
19743 (qualified_name:): Build a single WFL node out of two. Retain
19744 the location information of the first node in the resulting node.
19745 (package_declaration:): Use package name as a WFL node
19746 (single_type_import_declaration:): Use imported name as a WFL node.
19747 (type_import_on_demand_declaration:): Use root of the imported
19748 packages as a WFL node.
19749 (field_declaration:): Removed unused local variable cl.
19750 (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
19751 (yyerror): New static elc. Removed static error_line, error_pos.
19752 New local code_from_source. Save ctxp->elc into elc at the first
19753 pass. Call java_get_line_col to get a string of the line where
19754 the error occurred.
19755 (debug_line): Removed static function.
19756 (parse_error_context, parse_warning_context): Parameter cl is now
19757 a WFL node. Use its value to initialize ctxp->elc.
19758 (redefinition_error): Parameter cl is now a WFL node.
19759 (parse_add_interface): New parameter wfl. No longer call
19760 lookup_cl, use wfl instead.
19761 (check_class_interface_creation): Parameter cl is now a WFL node.
19762 (maybe_create_class_interface_decl): Likewise.
19763 (add_superinterfaces): New function.
19764 (create_interface): Removed local cl, node, super_decl,
19765 super_decl_type. Function now uses id as a WFL node. Better
19766 warning/error report on obsolete or forbidden mix of
19767 modifiers. Now calls add_superinterfaces to register interfaces.
19768 (create_class): Removed local cl, node. Local variable id is used
19769 as a WFL node. Better error report on forbidden modifier
19770 mix. Uses add_superinterfaces to register interfaces.
19771 (find_field): Argument cl is now a WFL node. Now store the WFL
19772 node of a fields that needs to be checked for their
19773 initialization.
19774 (method_header): Local variable node non longer used. Local
19775 variable id replaces cl.
19776 (check_modifiers_consistency): Local variable cl is now a WFL
19777 node.
19778 (method_declarator): Local variable cl replaced by parameter id.
19779 (parser_qualified_name): Now uses parameter name as a WFL node.
19780 (parser_check_super_interface): New parameter wfl, for achieve
19781 greater accuracy during error reports.
19782 (parser_chain_incomplete_item): New parameter named location. Used,
19783 along the decl, to construct the incomplete item node.
19784 (java_complete_class): resolve_class now uses WFL node extracted
19785 from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
19786 where appropriate.
19787 (complete_method_decl): Unresolved function's argument types are WFL.
19788 (resolve_class): Parameter cl is now a WFL node.
19789 (resolve_and_layout): Likewise.
19790 (do_resolve_class): Likewise. Try first to use cl and then do the
19791 lookup on the decl when calling check_pkg_class_access.
19792 (complete_class_report_errors): Use IC_TYPE in place of
19793 TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
19794 instead of doing a lookup over the decl.
19795 (java_check_final): Use WFL info from field tree list.
19796 (lookup_cl): Rewritten and returns a statically defined WFL node.
19797 (lookup_modifier_cl): Now uses information from WFL nodes.
19798 (process_imports): Likewise.
19799 (read_import_dir): name and cl arguments replaced by a single WFL
19800 node. Function modified accordingly.
19801 (find_in_imports_on_demand): Now uses WFL node.
19802 (check_pkg_class_access): cl argument is now a WFL node.
19803 (declare_local_variables): Fixed to use WFL nodes.
19804 (resolve_expression_name): Likewise.
19805 (build_method_invocation_stmt): name_combo argument renamed
19806 wfl. Function modified to use WFL nodes.
19807 (build_invoke): cl used as a WFL node when calling build_expr_wfl.
19808 (lookup_method_invoke): cl is now a WFL node. Added missing
19809 IDENTIFIER_POINTER to class type decl name.
19810
19811 1998-04-14 Dave Brolley <brolley@cygnus.com>
19812
19813 * lang.c (init_parse): Now returns char* containing the filename.
19814
19815 1998-04-10 Per Bothner <bothner@cygnus.com>
19816
19817 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
19818
19819 * decl.c, java-tree.h (integer_four_node): New INTEGER_CST node.
19820 * class.c (make_class_data): If flag_assume_compiled, initial class
19821 state is CSTATE_PREPARED; make superclass and interfaces direct
19822 references, rather than constant pool indexes.
19823
19824 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
19825
19826 * parser.y: Include flags.h. Removed debug variable pl.
19827 (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
19828 (block:): Likewise.
19829 (labeled_statement_nsi:): Generate debug info when reducing
19830 expression_statement:.
19831 (check_pkg_class_access): get_access_flags_from_decl invocation
19832 fixed for new CLASS_* flags location.
19833 (source_end_java_method): Save/restore parser context when
19834 entering/leaving this routine. Restore lineno to its right value
19835 before calling expand_end_bindings.
19836 (build_method_invocation_stmt): build_invoke called with the
19837 current line information.
19838 (build_invoke): New argument cl. Wrap the function call around a
19839 wfl node.
19840 (refine_accessible_methods_list): Changed comment, removed
19841 unnecessary code.
19842 * parse.h: Fixed typo in comments.
19843 (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
19844 (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
19845 (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
19846 parser_ccb_indent.
19847 * lex.c (java_lex): Record the last closing curly bracket of a
19848 function.
19849 * jcf-parse.c (jcf_parse_source): Now calls
19850 java_check_methods. Clarified comment, fixed typo.
19851
19852 1998-04-09 Dave Brolley <brolley@cygnus.com>
19853
19854 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19855 (finish_parse): Expose for non USE_CPPLIB builds.
19856
19857 1998-04-08 Jeffrey A Law (law@cygnus.com)
19858
19859 * lang.c (lang_print_xnode): New function.
19860
19861 1998-04-03 Per Bothner <bothner@cygnus.com>
19862
19863 * decl.c (class_dtable_decl), java-tree.h: New tree node.
19864 * class.c (get_dispatch_vector, get_dispatch_table): New functions
19865 used to build a class's dispatch table.
19866 (make_class_data): Generate dispatch table if flag_assume_compiled.
19867 Set dtable of class object to address of class_dtable_decl.
19868
19869 * decl.c (int_decl_processing): Make soft_badarrayindex_node
19870 be volatile and have side effects - generates better code.
19871
19872 * class.c, expr.c, parse.y: CLASS_INTERFACE, CLASS_FINAL, etc:
19873 These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
19874
19875 * expr.c (expand_invoke): If class is final, method is
19876 effectively final, so can call it directly.
19877
19878 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
19879
19880 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
19881
19882 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19883
19884 * parse.y (build_method_invocation_stmt): Removed extra argument
19885 to build_invoke.
19886
19887 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
19888
19889 * expr.c (dtable_indent): Now static global.
19890 (expand_invoke): Now call invoke_build_dtable and
19891 build_invokevirtual.
19892 (invoke_build_dtable, build_invokevirtual): New functions.
19893 * jcf-io.c (find_class): Defer issuing a warning by setting
19894 jcf->outofsynch to 1.
19895 * jcf-parse.c (jcf_out_of_synch): New function.
19896 (load_class): Test this_jcf.outofsynch flag and call
19897 jcf_out_of_synch accordingly.
19898 * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
19899 comment indentation.
19900 * lex.c (java_get_unicode): Fixed code indentation.
19901 (java_lex): Create string literal. Fixed typo. Removed several
19902 premature obstack_free.
19903 * parse.h: New enums for name resolution and invocation mode.
19904 (struct qualification): New data structure.
19905 (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
19906 (do_resolve_class, build_method_invocation_stmt,
19907 breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
19908 debug_line, identical_subpath_p, invocation_mode,
19909 refine_accessible_methods_list, build_invoke,
19910 lookup_method_invoke): New functions declared.
19911 (build_invokevirtual, invoke_build_dtable, match_java_method,
19912 build_field_ref, jcf_out_of_synch): New references to external
19913 functions.
19914 (struct parse_ctxt): Removed artificial_constructor field.
19915 * parse.y: (array_type:): Type defined for this rule.
19916 (class_type:): Installed default rule for interface_type:.
19917 (array_type:): Now build Java array type.
19918 (qualified_name:): Now use obstack_grow0.
19919 (method_declaration:): Skip the artificial constructor added to
19920 the list, if any.
19921 (abstract_method_declaration:): Execute the code only during pass 1.
19922 (block:): Installed default rule in block_statements:.
19923 (block_statement:): Add the statement to the method during pass 2.
19924 (statement_expression): Installed default rule for
19925 method_invocation:.
19926 (argument_list:): Added code to build the argument list.
19927 (method_invocation:): Added call to create the method invocation
19928 node.
19929 (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
19930 (debug_line): New function for debug.
19931 (complete_class_decl): No longer do something during pass 1.
19932 (method_header): Use BUILD_PTR_FROM_NAME.
19933 (parser_qualified_classname): Use obstack_grow0. Removed bogus
19934 obstack_free.
19935 (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
19936 function's main comment.
19937 (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
19938 classes.
19939 (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
19940 (resolve_class): Now works with arrays.
19941 (do_resolve_class, resolve_and_layout): New functions.
19942 (java_check_regular_methods): Reverse method list before and after
19943 having processed it. No longer set ctxp->artificial_constructor.
19944 (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
19945 accordingly. Fixed typo in issued error message. Now use
19946 obstack_grow0.
19947 (find_in_imports_on_demand): Now use obstack_grow0.
19948 (declare_local_variables): Use BUILD_PTR_FROM_NAME.
19949 (source_end_java_method): Call expand_expr_stmt instead of
19950 expand_expr. Calls it before calling expand_function_end.
19951 (java_method_add_stmt): Do nothing if errors were found during
19952 parsing.
19953 (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
19954 (build_method_invocation_stmt, build_invoke, invocation_mode,
19955 lookup_method_invoke, refine_accessible_methods_list,
19956 qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
19957 New functions.
19958 * typeck.c (build_java_signature): Properly end method signature
19959 if return type skipped.
19960 (match_java_method): New function.
19961
19962 1998-03-16 Per Bothner <bothner@cygnus.com>
19963
19964 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
19965
19966 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
19967
19968 * expr.c (build_invoke_non_interface): New function.
19969 (methods_ident, ncode_ident): Now static globals.
19970 (expand_invoke): Use build_invoke_non_interface.
19971 * java-tree.h (struct lang_decl): New field function_decl_body.
19972 (DECL_FUNCTION_BODY): New macro.
19973 * jcf-parse.c (jcf_parse_source): Deeper check before setting
19974 CLASS_FROM_SOURCE_P.
19975 (parse_source_file): Fixed typos. Call java_layout_parsed_class
19976 before starting pass 2. Call to java_generate_parsed_class replaced
19977 by java_register_parsed_class.
19978 * lex.c: Fixed typo in header. Some line width related formating.
19979 * lex.h: Some line width related formating.
19980 * parse.h (source_end_java_method, resolve_expression_name,
19981 complete_class_decl, maybe_create_class_interface_decl,
19982 check_class_interface_creation): New static function declarations.
19983 (java_layout_parsed_class, java_method_add_stmt): New function
19984 declarations.
19985 (struct parser_ctxt): Field mark_class_generate removed. New
19986 fields class_list and artificial_constructor.
19987 * parse.y: Fixed typo in header.
19988 (class_declaration:): Call complete_class_decl when class body
19989 parsed.
19990 (method_declaration:): Call source_end_java_method in pass 2 when
19991 the method body is defined.
19992 (postfix_expression:): Do expression name resolution on sub-rule
19993 name during pass 2.
19994 (create_class, create_interface): Merged common pieces.
19995 (check_class_interface_creation, maybe_create_class_interface_decl):
19996 New functions.
19997 (complete_class_decl): New function.
19998 (register_fields): Fixed line width related typo.
19999 (method_header): Correctly skip first argument when fixing
20000 argument line. Changed the loop.
20001 (java_check_circular_reference): Now use ctxp->class_list.
20002 (java_complete_class): Removed start/stop marking.
20003 (java_check_regular_methods): Now takes a class decl as an
20004 argument. Add default constructor if none were encountered.
20005 (java_check_methods): Now use ctxp->class_list. Changed call to
20006 java_check_regular_methods.
20007 (source_start_java_method): Set DECL_ARG_TYPE for each function
20008 arguments.
20009 (source_end_java_method, java_method_add_stmt): New functions.
20010 (java_generate_parsed_class): No longer exists.
20011 (java_layout_parsed_class, java_register_parsed_class): New functions.
20012 (resolve_expression_name): New function.
20013
20014 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
20015
20016 * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20017 * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20018 until pass initializations are done. Call read_import_dir with
20019 pass set to 0.
20020 * parse.h: (lookup_modifier_cl): New function declared.
20021 (INTERFACE_FIELD_MODIFIERS): New macro.
20022 (OBSOLETE_MODIFIER_WARNING): New macro.
20023 * parse.y: (register_fields): Class type and current field name in
20024 local variables. Check modifier(s) if adding field(s) to an interface.
20025 (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20026 and report errors using the faulty modifier line context.
20027 (lookup_modifier_cl): New function.
20028 (read_import_dir): Detect and report default import processing
20029 failure.
20030
20031 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
20032
20033 Add a pair of -fassume-compiled/-fno-assume-compiled options.
20034 * class.c (is_compiled_class): Return 1 after making sure it
20035 qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20036 * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20037 * java-tree.h (flag_assume_compiled): Add decl.
20038 * lang.c (lang_f_options): Add the flag.
20039 (flag_assume_compiled): Add decl, default to 0.
20040
20041 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
20042
20043 * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20044 (is_compiled_class): Likewise.
20045 (layout_class): Likewise.
20046 (layout_class): Detect and lay out classes defined in source code.
20047 (interface_of_p, add_interface_do, may_add_interface): New
20048 function.
20049 (add_interface): Now use add_interface_do.
20050 (add_method_1): New function.
20051 (add_method): Now use add_method_1.
20052 (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20053 (complete_start_java_method): New function.
20054 (start_java_mehod): Now call complete_start_java_method.
20055 * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20056 (expand_invoke): Likewise and fixed typo.
20057 *gjava.c: (print_super_field): Use new argument to find_class
20058 DO_CLASS_FILE.
20059 (main): Likewise.
20060 *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20061 (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20062 QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20063 IDENTIFIER_NODE.
20064 (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20065 (add_method_1, push_class): New prototypes.
20066 *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20067 *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20068 directory where the class was found.
20069 (find_class): New argument DO_CLASS_FILE. Function find_class
20070 modified accordingly.
20071 *jcf-parse.c: (fix_class_path): New function.
20072 (load_class): Use new VERBOSE argument. load_class now finds and
20073 loads/parses .class/.java files. Save read_state of current_jcf
20074 if necessary.
20075 (java_parser_abort_on_error): New macro.
20076 (jcf_parse_source, parse_source_file): New function.
20077 (jcf_parse): Fixed typo.
20078 (yyparse): Call parse_source_file () only.
20079 (process_zip_dir): Fixed typo, fix zdir->filename_length when
20080 writing the real class name back in the zip directory entry.
20081 (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20082 (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20083 *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20084 (find_class): Prototype fixed.
20085 *lex.c: Added 1998 time stamp.
20086 Removed all static global variables, moved into the parser
20087 context data structure.. Now include unistd.h if SEEK_SET not
20088 defined.
20089 (java_init_lex): Rewritten.
20090 (java_sneak_unicode): Modified current unicode access in current line.
20091 (java_unget_unicode): Likewise.
20092 (java_allocate_new_line): New allocation management.
20093 (java_read_char): Modified access and storage of unget_utf8_value.
20094 New way of processing current unicode.
20095 (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20096 (java_get_unicode): Now use the parser context.
20097 (java_lineterminator): Likewise.
20098 (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20099 of the reentrant parser implementation. Function now use the
20100 parser context data structure and java_lval. Fixed production of
20101 the float and double constant "out of range" error message. Fixed
20102 obstack use. Return integer value when hitting a modifier. Now
20103 return type for TRUE, FALSE and other predefined types. Return
20104 identifier as a TREE_LIST list containing the current line context
20105 as the TREE_VALUE sub-node.
20106 (java_unicode_2_utf8): Fixed typo in declaration.
20107 (java_lex_error): Now use the parser context data structure.
20108 *lex.h: Added 1998 time stamp.
20109 (struct java_line): New fields ref_count and next.
20110 (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20111 JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20112 (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20113 *parse.h: Added 1998 time stamp.
20114 (java_parse_source_file): Renamed from parse_source_file.
20115 (YYERROR_NOW, YYNOT_TWICE): Fixed.
20116 (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20117 INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20118 JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20119 THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20120 END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20121 CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20122 (struct parser_ctxt): New data structure to keep the parser context.
20123 *parse.y: Added 1998 time stamp, got rid of static global variables.
20124 (java_error_count, ctxp): New global variables.
20125 (%union): New value field.
20126 (numeric_type, integral_type): Rules removed.
20127 (primitive_type): Rule defined to handle integral, float, double and
20128 boolean types.
20129 (qualified_name, package_declaration,
20130 single_type_import_declaration, type_import_on_demand_declaration,
20131 modifiers, class_declaration, super, interfaces,
20132 interface_type_list, class_body, field_declaration,
20133 field_declaration, variable_declarators, variable_declarator,
20134 variable_declarator_id, method_declaration, method_header,
20135 formal_parameter_list, formal_parameter, method_body, block,
20136 static, interface_declaration, extends_interfaces,
20137 abstract_method_declaration, local_variable_declarators): Rules now
20138 define actions.
20139 (force_error, do_warning): New global statics.
20140 (push_parser_context, parser_context_save_global,
20141 parser_context_restore_global, pop_parser_context): New functions.
20142 (yyerror): Now uses the global parser context. Fixed use of obstack.
20143 (parse_error, parse_error_context, parse_warning_context,
20144 java_accstring_lookup, redefinition_error, check_modifiers,
20145 parser_add_interface, create_interface, create_class, find_field,
20146 duplicate_declaration_error, register_fields, method_header,
20147 check_modifiers_consistency, check_abstract_method_header,
20148 method_declarator, parser_qualified_classname,
20149 parser_check_super_interface, parser_check_super,
20150 parser_chain_incomplete_item, java_check_circular_reference,
20151 layout_class_from_source, java_complete_class,
20152 complete_method_decl, resolve_class, complete_class_report_errors,
20153 java_check_final, check_method_redefinition,
20154 java_check_regular_methods, java_check_abstract_methods,
20155 java_check_methods, lookup_java_interface_method2,
20156 lookup_java_method2, lookup_cl, find_name_in_single_imports,
20157 process_imports, find_in_imports, read_import_entry,
20158 read_import_dir, find_in_imports_on_demand,
20159 check_pkg_class_access, not_builtin_p, declare_local_variables,
20160 source_start_java_method, java_generate_parsed_class): New
20161 functions.
20162 *typeck.c: (signature_include_return): New global variable.
20163 (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20164 to add the function returned type in the signature.
20165
20166 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
20167
20168 * jcf-io.c (open_in_zip): Use strncmp and LEN.
20169
20170 1998-01-29 Dave Brolley <brolley@cygnus.com>
20171
20172 * Make-lang.in (java.info): Added.
20173 (java.install-info): Added
20174
20175 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
20176
20177 * Makefile.in (clean): Also remove java/parse.c.
20178
20179 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
20180
20181 Add a pair of -fbounds-check/-fno-bounds-check options.
20182 * lang.c (lang_decode_option): Add code to grok arguments.
20183 (flag_bounds_check): Add decl.
20184 (lang_f_options): New array w/ the option in it.
20185 * java-tree.h (flag_bounds_check): Add decl.
20186 * lang-options.h: New file.
20187 * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20188 of a static macro value.
20189 (JAVA_ARRAY_EXCEPTION): Delete macro.
20190
20191 1998-01-23 Per Bothner <bothner@cygnus.com>
20192
20193 * typeck.c (build_java_array_type): Fix two bugs in previous change.
20194 * expr.c (build_anewarray): Add missing promote_type.
20195
20196 1998-01-22 Per Bothner <bothner@cygnus.com>
20197
20198 Add array types with known length to optimize bounds checking.
20199 * typeck.c (build_java_array_type): Take length parameter.
20200 (java_array_type_length, build_prim_array_type): New functions.
20201 * java-tree.h: Update for new functions.
20202 * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20203 * class.c: Use build_prim_array_type.
20204 * expr.c (can_widen_reference_to): Handle known-length array types.
20205 (verify_jvm_instructions): Keep track of integer push instructions
20206 followed by newarray/anewarray, so we can build known-length arrays.
20207 (JAVA_ARRAY_DATA_OFFSET): Replace by ...
20208 (java_array_data_offset): New function.
20209 (build_java_array_length_access): New function. Optimize if constant.
20210 (build_java_arrayaccess): Constant fold bounds check.
20211 (expand_java_newarray, expand_java_anewarray): Replaced by ...
20212 (build_newarray, build_anewarray): New functions.
20213 (ARRAY_NEW_NUM, ARRAY_NEW_PTR): Use build_{a,}newarray.
20214 * verify.c (merge_types): Handle known-lengh array types.
20215
20216 1998-01-19 Per Bothner <bothner@cygnus.com>
20217
20218 * expr.c (expand_byte_code): Fix performace bug, which caused
20219 searching linenumber_table to be linear rather than constant.
20220
20221 1997-12-12 Per Bothner <bothner@cygnus.com>
20222
20223 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
20224
20225 * decl.c, java-tree.h (soft_fmod_node): New global.
20226 * decl.c (init_decl_processing): Define __builtin_fmod.
20227 * expr.c (build_java_binop): Implement TRUNC_MOD_EXPR for REAL_TYPE
20228 using __builtin_fmod.
20229
20230 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
20231
20232 * keyword.h: New file, output of keyword.gperf as processed by
20233 gperf.
20234 * lex.c (java_lex_init): Initialize java_error_flag.
20235 * parse.c (YYERROR_NOW): Uses java_error_flag.
20236 * parse.y: New static java_error_flag. Useless definition of
20237 buffer_error gone.
20238 * parse.y (java_error): Portable error recovery using
20239 java_error_flag (not yet completely tuned).
20240
20241 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
20242
20243 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20244
20245 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20246
20247 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20248 (parse.c, lex.c, keyword.h): New rules for Java source code
20249 front-end.
20250 * parse.c: Renamed into jcf-parse.c.
20251 * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20252 * keyword.gperf: New file, Java keywords.
20253 * parse.y: New file, Java language grammar.
20254 * parse.h: New file, Java language grammar definitions.
20255 * lex.c: New file, Java language lexer.
20256 * lex.h: New file, Java language lexer definitions.
20257
20258 1997-12-03 Per Bothner <bothner@cygnus.com>
20259
20260 * decl.c (clinit_identifier_node), java-tree.h: New global.
20261 * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P): Removed.
20262 * verify.c (verify_jvm_instructions): Inline use of removed macros.
20263 * expr.c (expand_java_field_op): Check for invalid assignment
20264 to final field.
20265
20266 * jcf-reader.c (get_attribute): Test for wrong attribute length.
20267
20268 1997-10-27 Per Bothner <bothner@cygnus.com>
20269
20270 * verify.c (verify_jvm_instructions): When processing a handler,
20271 attempt to set the current_subr to the right value.
20272 (More complicated code combines Sep 17 and Oct 22 versions.)
20273
20274 1997-10-24 Per Bothner <bothner@cygnus.com>
20275
20276 * class.c (push_class): Figure out (guess) name of source file.
20277 * parse.c (set_source_filename): Set DECL_SOURCE_FILE of class decl.
20278 (give_name_to_class): Don't guess source name; use DECL_SOURCE_FILE.
20279 (parse_class_file): Change return type from int to void.
20280 Call debug_start_source_file/debug_end_source_file.
20281
20282 * expr.c (build_java_binop): Fix masking 2nd operand.
20283 * decl.c (init_decl_processing): Set sizetype first.
20284
20285 1997-10-22 Per Bothner <bothner@cygnus.com>
20286
20287 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
20288 (Revert Sep 17 change.)
20289
20290 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
20291
20292 * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20293 .class extension in their name and fix thing so we don't process
20294 them parse_zip_file_entries().
20295 (parse_zip_file_entries): Cleaned unused local variables.
20296
20297 1997-10-20 Per Bothner <bothner@cygnus.com>
20298
20299 * expr.c (can_widen_reference_to): Allows equal array element types.
20300 (expand_byte_code): PRE_RET must expand OPERAND_VALUE (to get index).
20301 * jcf-dump.c (RET): Get (and print) index.
20302
20303 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20304 Promote element type to POINTER_TYPE.
20305
20306 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
20307
20308 * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20309 find_in_current_zip, jcf_figure_file_type): Moved from
20310 jcf-reader.c to parse.c.
20311 * zextract.c: (read_zip_archive): takes file_comment_length possible
20312 field into account.
20313
20314 1997-10-20 Per Bothner <bothner@cygnus.com>
20315
20316 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
20317
20318 * verify.c (merge_types): Handle array types even better ...
20319
20320 1997-10-17 Per Bothner <bothner@cygnus.com>
20321
20322 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
20323
20324 * java-tree.h (PUSH_FIELD): Set DECL_ARTIFICIAL.
20325 * class.c (make_class_data): Don't build fields_decl if no fields.
20326 When building fields_decl, skip if DECL_ARTIFICIAL.
20327
20328 * expr.c (java_stack_swap): Update stack_type_map.
20329 * verify.c (merge_types): Handle array types better.
20330
20331 1997-10-15 Per Bothner <bothner@cygnus.com>
20332
20333 * class.c (add_field): Don't promote short integral fields to
20334 int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20335 * expr.c (push_value): Promote and convert short integral values.
20336
20337 * decl.c, java-tree.h (integer_two_node): New constant node.
20338 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
20339
20340 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
20341
20342 * class.c (append_gpp_mangled_type): Use function argument
20343 unpromoted type to generate mangled name.
20344
20345 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
20346
20347 * constants.c (build_constant_data_ref): Now uses current_class
20348 instead of main_class.
20349 (build_constants_constructor): Now uses current_class instead of
20350 main_class.
20351 * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20352 of the global variable SeepZipFiles done here.
20353 * zextract.c (read_zip_archive): extra_field optional field taken
20354 into account while computing the position of the class file in the
20355 archive.
20356 * verify.c (verify_jvm_instructions): Use current_jcf to search
20357 the constant pool.
20358 * parse.c (load_class): First search for the class to load in the
20359 current zip file. Saves current_jcf (restored before returning
20360 from that function). Don't call JCF_FINISH in the class was found
20361 in the current ZIP file.
20362 (jcf_parse): If the class was found in the current ZIP file, save
20363 its tree_constant_pool (for later reuse).
20364 (parse_class_file): New function. Process each method defined in
20365 the current class and record the class as to be later registered.
20366 (yyparse): Rewritten. Figure the type of the current file and switch
20367 accordingly.
20368 * lang.c: New global variable current_jcf.
20369 (lang_init): Removed compiling_from_source test (done later, in
20370 yyparse). Removed call the jcf_parse ().
20371 * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20372 (typedef struct JCF): New fields seen_in_zip (to mark a class found
20373 in the current ZIP file) and zip_offset (offset to the class data in
20374 the current zip file).
20375 * jcf-reader.c: zipfile.h included.
20376 localToFile: New ZipFileCache static global variable
20377 (parse_zip_file_entries): New function. Browse the current ZIP
20378 file directory and process each class found.
20379 (process_zip_dir): New function. Register each class found in the
20380 ZIP file directory. The class aren't parsed but a valid JCF is
20381 link to each of them.
20382 (find_in_current_zip): New function. Search for a class in the
20383 current ZIP file directory. If found, prepare the class so that it
20384 can be loaded.
20385 (jcf_figure_file_type): New function. Examine the file structure
20386 to figure a class file, a ZIP file. If none of these categories are
20387 matched, a source file is assumed.
20388 * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20389 SeenZipFile: New global variable.
20390 (open_in_zip): Use zipmember's length to accelerate the search for
20391 a member. If zipmember was NULL and zip file successfully read,
20392 return 0.
20393 * java-tree.h: New global variable current_jcf declared. Added
20394 declaration for current_constant_pool_tags, current_constant_pool_data,
20395 current_constant_pool_length, current_constant_pool_data_ref.
20396 (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20397 store the JCF of classes seen in a zip file) and tree *constant_pool
20398 (to save a loaded class constant pool). current_class declared here.
20399 * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20400 retrieve method_ref_constant.
20401 (PUSHC): java_push_constant_from_pool now uses current_jcf.
20402 (OBJECT): get_class_constant now uses current_jcf.
20403 (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20404 (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20405 (expand_invoke): Now uses current_class instead of main_class
20406 (build_class_init): Now uses current_class instead of main_class
20407 * class.c: New static global variable registered_class.
20408 (register_class): New function.
20409 (emit_register_class): Modified to use registered_class instead of
20410 main_class
20411 (is_compiled_class): Now take into account class seen in the archive.
20412
20413 1997-10-06 Per Bothner <bothner@cygnus.com>
20414
20415 * except.h: Renamed to: java-except.h.
20416 * parse.c, except.c, expr.c, verify.c: Update #include accordingly.
20417 * except.c: Add semi-working (commented out) implementation.
20418
20419 * expr.c (expand_iinc): Add needed flush_quick_stack.
20420 * parse.c (set_source_filename): New function.
20421 (give_name_to_class): Set input_filename from package.classname.java.
20422
20423 * jcf-io.c (find_class): Don't look first in ".".
20424
20425 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20426
20427 * zextract.c (read_zip_archive): Now takes into account the
20428 extra_field field.
20429 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20430
20431 1997-09-20 Per Bothner <bothner@cygnus.com>
20432
20433 * constants.c, java-tree.h (build_internal_class_name): New function.
20434 (alloc_class_constant): Re-implement using build_internal_class_name.
20435 * class.c (make_class_data): Likewise.
20436 * class.c (hashUtf8String): Make hash algorithm match String.hashCode.
20437
20438 1997-09-17 Per Bothner <bothner@cygnus.com>
20439
20440 * verify.c (verify_jvm_instructions): Temporarily set current_subr
20441 to NULL before pushing an exception handler target.
20442
20443 * expr.c (flush_quick_stack): Save from low stack indexes to high.
20444 (java_stack_swap, java_stack_dup): Re-write to be safe from
20445 clobbering registers.
20446 (build_class_init): New function.
20447
20448 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
20449
20450 * typeck.c (build_java_array_type): Temporary use
20451 permanent_obstack to create the array 'length' field.
20452 * expr.c (lookup_label): Temporay use permanent_obstack to create
20453 label if not found.
20454 * class.c (push_super_field): Tempory use permanent_obstack.
20455
20456 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
20457
20458 * typeck.c (type_for_mode): Now handles double_type_node and
20459 float_type_node.
20460 * verify.c (verify_jvm_instructions): The instruction following
20461 the wide bytecode is checked. OPCODE_ret added to the list of
20462 wide.
20463
20464 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
20465
20466 * class.c (make_class): Temporary use permanent_obstack. Set the
20467 class CLASS_P field to 1.
20468 (push_class): Temporary use permanent_obstack.
20469 (set_super_info): Temporary use permanent_obstack.
20470 (add_method): Temporary use permanent_obstack, set
20471 METHOD_TRANSIENT().
20472 (add_field): Temporary use permanent_obstack. Sets
20473 FIELD_VOLATILE() and FIELD_TRANSIENT().
20474 (build_class_ref): Temporary use permanent_obstack if the class
20475 isn't compiled.
20476 (build_static_field_ref): Temporary use permanent_obstack when
20477 creating field's rtl.
20478 (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20479 ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20480 and fields. Function finalized, as far as flag handling.
20481 (push_class_static_dummy_field): Temporary use permanent_obstack.
20482 (emit_register_class): Force generation of class registration at
20483 -O3 or deeper.
20484 * decl.c (end_java_method): Call permanent_allocation() before
20485 returning.
20486 * expr.c (can_widen_reference_to): Added comment to interface
20487 handling, fixed typo.
20488 (lookup_field): Now uses CLASS_P() to correct FIXME
20489 (expand_invoke): Verification on public && !static &&
20490 !abstract moved into soft_lookupinterfacemethod (kaffe).
20491 Use Object class dtable if objectref is an array when expanding
20492 invokeinterface.
20493 (java_push_constant_from_pool): Temporary use permanent_obstack
20494 for CONSTANT_string
20495 * parse.c (get_ref_constant): Temporary use permanent_obstack to
20496 create constant references.
20497 (get_constant): Temporary use permanent_obstack to create constant.
20498 (load_class): Temporary use permanent_obstack to load class.
20499 (jcf_parse): Temporary use permanent_obstack to perform class
20500 layout.
20501 * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20502 (build_java_signature): Temporary use permanent_obstack.
20503 * verify.c: (verify_jvm_instruction): removed unnecessary verification
20504 on ACC_SUPER flag.
20505 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20506 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20507 (CLASS_P): Defined
20508
20509 1997-09-11 Per Bothner <bothner@cygnus.com>
20510
20511 * class.c (append_gpp_mangled_type): Fix typo.
20512 (emit_register_class): Use main_class to get class object, rather
20513 than looking for no-longer-existing static decl starting with _CL.
20514 * typeck.c (parse_signature_type): Promote array element type
20515 if it is a RECORD_TYPE.
20516
20517 1997-09-10 Per Bothner <bothner@cygnus.com>
20518
20519 * class.c (push_class_static_dummy_field): New function.
20520 (mangle_static_field): New. Do G++-style mangling of static fields.
20521 (layout_class): Mandle static fields here, not in add_field.
20522 (build_class_ref): The class object is now a dummy static field.
20523 * decl.c (find_local_variable): Look for best, instead of first match.
20524 * expr.c (push_type): Always promote_type, not just for RECORD_TYPE.
20525 (build_java_athrow): Don't check here if exception is Throwable.
20526 * java-tree.h (TYPE_UNSET): Renamed to TYPE_UNKNOWN.
20527 (TYPE_USED): Removed. No longer used ...
20528 * parse.c (jcf_parse): Call push_class_static_dummy_field.
20529 * verify.c (push_pending_label): New function.
20530 (push_pending_block): Renamed to check_pending_block.
20531 (merge_types): Remove unneeded suuport for TYPE_UNUSED.
20532 (verify_jvm_instructions): Only reset prev_eh_ranges (to force
20533 re-checking possible handlers) after a store (less wasted work).
20534 Check for null handler (finally) before calling add_handler.
20535 Various changes to (finally?) correctly handle try/finally.
20536
20537 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
20538
20539 * class.c: Include stdio.h.
20540
20541 1997-09-04 Per Bothner <bothner@cygnus.com>
20542
20543 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20544 to make sure class is initialized before static/special invoke.
20545
20546 * verify.c (verify_jvm_instructions): On a store instruction,
20547 call find_local_variable to force pre-allocation of decl and rtx.
20548 * decl.c (push_jvm_slot): Set DECL_REGISTER on stack slots.
20549
20550 1997-09-03 Per Bothner <bothner@cygnus.com>
20551
20552 * class.c (build_class_ref): Strip off "promoted_" if need be.
20553 (make_field_value): Call build_java_signature when needed.
20554 (layout_class): Don't make_function_rtl if METHOD_ABSTRACT.
20555 * expr.c (build_java_athrow): Don't push_value of exception.
20556 (build_java_binop): Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20557 match specification of [fd]cmp[lg] for NaNs.
20558 (expand_byte_code): Add support for exception handler ranges.
20559 * except.c: Add skeleton for EH code-generation.
20560 * verify.c (merge_types): Treat all promoted integral types as equal.
20561 * constants.c (build_constants_constructor): To force creation of
20562 current_constant_pool_data_ref, call build_constant_data_ref.
20563
20564 * javaop.def (lload): Fix typo.
20565 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
20566
20567 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
20568
20569 * parse.c: Don't include function.h.
20570
20571 1997-08-27 Per Bothner <bothner@cygnus.com>
20572
20573 * except.[ch]: New files.
20574 * Makefile.in (JAVA_OBJS): Add except.o
20575 * expr.c: Temporary warning about unimplemented exceptions.
20576 * verify.c: Verify exception handlers.
20577
20578 * jcf-dump.c (disassemble_method): Print exception table.
20579
20580 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
20581
20582 * expr.c (verify_jvm_instructions): Started a thorough
20583 verification of invoke* bytecodes.
20584 (expand_byte_code): flush quick stack if PC is the target of a
20585 branch. and undef RET (conflicting with config/i386/i386.h).
20586 (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20587 used.
20588 (expand_invoke): Now handles invokeinterface and do more
20589 verification according to the bytecode.
20590 (lookup_field): Don't try to load the class if processing
20591 dtable_type.
20592 (can_widen_reference_to): Now handles interfaces.
20593 * decl.c (init_decl_processing): New global variable
20594 soft_lookupinterfacemethod_node, declared in java-tree.h.
20595 Call set_super_info on string_type_node.
20596 * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20597 defined.
20598 * class.c (set_super_info): Fills the CLASS_* flags according to
20599 access_flags.
20600 (get_access_flags_from_decl): Handles all class flags.
20601
20602 1997-08-26 Per Bothner <bothner@cygnus.com>
20603
20604 * class.c (add_method): Zero out newly-allocated DECL_LANG_SPECIFIC.
20605 * parse.c (yyparse): Check for abstract method, and missing code.
20606 * expr.c (expand_byte_code): Change interface.
20607 * lang.c (put_decl_node): Print promoted types prettier.
20608 * verify.c (verify_jvm_instruction): Change interface.
20609 Partial support for scanning exception table.
20610 For load instructions, handle promoted integral types.
20611
20612 1997-08-21 Per Bothner <bothner@cygnus.com>
20613
20614 * verify.c: New file, with contents moved from expr.c.
20615 * expr.c: Bunch of stuff (mostly verification) moved to verify.c.
20616 * typeck.c (is_array_type_p): Moved here from expr.c.
20617 * java-tree.h: Add some now-needed function declarations.
20618 * Makefile.in (JAVA_OBJS): Added verify.o.
20619
20620 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
20621
20622 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20623 METHOD_ABSTRACT flag.
20624
20625 * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20626 (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20627 (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20628
20629 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20630 variables.
20631 (start_java_method): Hook for SYNCHRONIZED methods.
20632
20633 * expr.c (build_java_jsr, build_java_ret): New functions
20634 (JSR,PRE): New macros
20635 (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20636 (verify_jvm_instructions): tableswitch, lookupswitch,
20637 monitorenter, monitorexit, goto_w: verified.
20638 (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20639 (build_java_monitor): New function.
20640 (MONITOR_OPERATION): Modified to call build_java_monitor()
20641 (verify_jvm_instructions): Started a thorough verification of
20642 invoke* bytecodes.
20643
20644 1997-08-19 Per Bothner <bothner@cygnus.com>
20645
20646 Support verification of jsr/ret subroutines (used for try/finally).
20647 * decl.c (return_address_type_node): New type node.
20648 * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20649 RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20650 LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED): New macros.
20651 (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20652 TYPE_USED): New macros for special types in type_map.
20653
20654 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
20655 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
20656 BCODE_JUMP_TARGET.
20657 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
20658
20659 * expr.c (can_widen_reference_to): New function.
20660 (pop_type): Use it.
20661 (merge_type_state): Support handling start of subroutine.
20662 (push_pending_block): Return char* error message, instead of calling
20663 fatal on an error. Also handle subroutines.
20664 (verify_jvm_instructions): Handle errors from push_poending_block.
20665 Support jsr and ret instructions.
20666
20667 1997-08-19 Per Bothner <bothner@cygnus.com>
20668
20669 * jcf-io.c (find_classfile): Fix thinko.
20670 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
20671
20672 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
20673
20674 * Makefile.in (BISON): Remove.
20675
20676 1997-08-07 Per Bothner <bothner@cygnus.com>
20677
20678 * Makefile.in: Convert to autoconf.
20679 * config-lang.in (outputs): Added java/Makefile.
20680
20681 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20682 Rename cc1java to jc1.
20683
20684 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
20685 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
20686
20687 * class.c (class_depth): Do load_class if needed.
20688
20689 Mostly better verification.
20690 * decl.c (pushdecl): Set TYPE_STUB_DECL for a type.
20691 (init_decl_processing): Change return type of soft_checkcast.
20692 * expr.c (expand_java_CHECKCAST): Do push_value of the "casted" value.
20693 * lang.c (put_decl_string, put_decl_node, lang_printable_name,
20694 lang_print_error): New functions.
20695 (lang_init): Set global hook print_error_function to lang_print_error.
20696 * expr.c: In the type_map ptr_type_node is only used for null now.
20697 (pop_type, merge_types): Hence ptr_type_node matches any reference.
20698 (merge_types): Dererence pointer to record types before comparing.
20699 (decode_newarray_type, merge_types): On error just return NULL.
20700 (build_java_binop): Add preliminary implementation (with warning)
20701 for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
20702 (lookup_label): Set DECL_IGNORED_P (for dwarf2out).
20703 (expand_compare, expand_java_goto, expand_java_call): Don't
20704 push_pending_block, since that only makes sense when verifying.
20705 (merge_type_state): Different return codes.
20706 (push_pending_block): A block may need to be verified more than once.
20707 (expand_byte_code): Warn about unused code at code generation time.
20708 (verify_jvm_instruction): Changed logic, since code may need to be
20709 re-verified if type-state has changed. Also, better error handling.
20710 Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
20711 Improve newarray, anewarray, ?aload, athrow,
20712 * java-tree.h (LABEL_CHANGED): New macro.
20713
20714 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
20715
20716 * decl.c (soft_athrow_node): New global variable initialized.
20717 * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
20718 * typeck.c (convert): Added support for REAL_TYPE.
20719 (convert_to_char): New function.
20720 (convert): Handle CHAR_TYPE.
20721 * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
20722 SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
20723 (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
20724 promoted type.
20725 (verify_jvm_instructions): Added break a the end of bogus unop: label.
20726 (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
20727 (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
20728 (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
20729 (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
20730 to Use The Right Things.
20731 (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
20732 compatible with INT. BOOLEAN is made equivalent to BYTE.
20733 (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
20734 OPCODE_ifnonnull): Now supported.
20735 (build_java_athrow): New function.
20736
20737 1997-08-04 Per Bothner <bothner@cygnus.com>
20738
20739 Rename method name <init> to match G++ (and fix mangling).
20740 * class.c (layout_class): Replace method name of <init> by class name.
20741 (make_method_value): Do inverse renaming of constructor from <init>.
20742 * java-tree.h (DECL_CONSTRUCTOR_P): New macro.
20743 * typeck.c (lookup_java_constructor): New function.
20744 * expr.c (expand_invoke): If method_name is <init>, call
20745 lookup_java_constructor to find constructor.
20746
20747 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
20748
20749 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20750
20751 * parse.c (get_class_constant): Modified to handle array "classes"
20752 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
20753 wide type.
20754 (convert): Modified to handle real type.
20755 * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
20756 soft_multianewarray, soft_newarray_node, soft_throw_node): New global
20757 variables declared.
20758 * decl.c (soft_badarrayindex_node, soft_anewarray_node,
20759 soft_multianewarray, soft_newarray_node, soft_throw_node): New
20760 global variables initialized.
20761 (find_local_variable): Handles the case of a pointer
20762 (end_java_method): Restore the use of one more scope
20763 * expr.c (build_java_arraynull_check, build_java_arrayaccess,
20764 build_java_array_length_access, expand_java_arrayload,
20765 expand_java_arraystore, expand_java_array_length,
20766 expand_java_multianewarray, expand_java_anewarray,
20767 build_java_check_indexed_type, is_array_type_p,
20768 build_java_throw_out_of_bound_exception): New functions.
20769 (STORE_INTERNAL): Now forces type of the decl to be type of the value.
20770 (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
20771 OPCODE_<t>aload): Implemented code for verification.
20772 (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
20773 ARRAY_NEW_MULTI): Macro defined.
20774 (CONVERT): Modified to invoke convert().
20775 (case OPCODE_aload2): Fixed index typo from 2 to 1.
20776
20777 1997-07-31 Per Bothner <bothner@cygnus.com>
20778
20779 * class.c (push_class): Set DECL_ARTIFICIAL (for dbxout.c).
20780 (build_class_ref, is_compiled_class): Handle pointer-to-record types.
20781 (make_class_data): Field name needs '/' as package prefix.
20782 * expr.c (type_stack_dup, java_stack_dup): Fix fencepost errors.
20783
20784 1997-07-25 Per Bothner <bothner@cygnus.com>
20785
20786 Implement debug information for local variables.
20787 * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
20788 DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
20789 DECL_LOCAL_SLOT_CHAIN): New macros.
20790 (struct lang_decl_var): New type.
20791 * parse.c (give_name_to_locals): Move to decl.c.
20792 * decl.c (give_name_to_locals): Re-written to Do The Right Thing.
20793 (start_java_method): Re-write parameter handling.
20794 (pending_local_decls): New global variable.
20795 (push_jvm_slot, maybe_pushlevels, maybe_poplevels): New functions.
20796 (find_local_variable): Accept pc so we can skips decls not in range.
20797 (struct binding_level): Add end_pc field.
20798 * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
20799 (various): Change so current pc gets passed to find_local_variable.
20800
20801 * decl.c (init_decl_processing): Re-arrange fields in
20802 class_type_node and and method_type_node to match kaffe 0.9.1.
20803 * class.c (make_method_value, make_class_data): Update
20804 initializations to match.
20805
20806 1997-07-16 Per Bothner <bothner@cygnus.com>
20807
20808 * class.c (unicode_mangling_length, emit_unicode_mangled_name,
20809 append_gpp_mangled_name, append_gpp_mangled_type): New functions.
20810 (push_super_field): New function.
20811 (make_class_data): Handle inheritance of class static initializer.
20812 (layout_class): New name mangling.
20813 * constants.c (build_constant_data_ref): Init type of data array
20814 to a one-element array.
20815 (build_constants_constructor): Set DECL_SIZE from complete array type.
20816 * decl.c: Rename class_type, object_type etc to class_type_node,
20817 object_type_node etc. Make former inherit from latter.
20818 * expr.c (expand_invoke): Add cast of function address.
20819 * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE): New.
20820 * parse.c (yyparse): Don't call layout_class here.
20821 * typeck.c (build_java_array_type): Set TYPE_ARRAY_ELEMENT.
20822
20823 1997-06-14 Per Bothner <bothner@cygnus.com>
20824
20825 * decl.c, class.c: Update method type to match latest Kaffe snapshot.
20826 * constants.c (lookup_name_constant): Renamed to alloc_name_constant.
20827 (alloc_class_constant): New.
20828 * expr.c (expand_invoke): Make sure method's class is initialized.
20829 * class.c (interits_from_p, emit_register_class): New functions.
20830 * parse.c (yyparse): Call emit_register_class.
20831
20832 1997-06-09 Per Bothner <bothner@cygnus.com>
20833
20834 * constants.c: New file, to handle constant pool.
20835 * Makefile.in (JAVA_OBJS): Add constants.o.
20836 * decl.c (init_decl_processing): Update, fix, finish various structs.
20837 (pushdecl_top_level): New.
20838 * parse.c (layout_class): Moved to class.c.
20839 * expr.c (java_push_constant_from_pool): New function.
20840 * class.c (build_class_ref): Make work fully
20841 (make_class_data): Emit super-class, constant pool, interface vector.
20842
20843 1997-06-03 Per Bothner <bothner@cygnus.com>
20844
20845 java-tree.h (DECL_SIGNATURE, BCODE_EMITTED): Remove.
20846 (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P): New.
20847 * class.c (class_depth): New function.
20848 (lookup_named_class): Replaced by new function lookup_class.
20849 * decl.c (object_type_node, string_type_node): New.
20850 Remove various types that we no longer need.
20851 * expr.c (verify_jvm_instructions): New separate verifier pass.
20852 (push_type, pop_type): New functions for verifier.
20853 (type_stack_dup, pop_argument_types, merge_types): Likewise.
20854 (expand_byte_code): Simplify, since we assume already verified.
20855 (expand_invoke): Now mostly works.
20856 * javaop.def: Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
20857 * lang.c (main_class): Move to parse.c. Don't make_class yet.
20858 * parse.c: Wait to allocate class object until we know its name.
20859 (layout_class): Calculate DECL_VINDEX for each virtual method.
20860 * typeck.c (get_array_type): Rename to ...
20861 (build_java_array_type): ... and provide working implementation.
20862 (build_java_signature): New function - build Java signature of type.
20863 (set_java_signature): New function - cache signature with type.
20864 (lookup_java_method): New function.
20865
20866 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
20867
20868 * class.c (ident_subst): Take extra SUFFIX parameter.
20869 (add_field): Set DECL_ASSEMBLER_NAME of static fields; more.
20870 (set_constant_value, build_static_field_ref, is_compiled_class): New.
20871 (build_class_ref): Actually implement.
20872 * decl.c, java-tree.h: Renamed some xx_type to xx_type_node.
20873 * decl.c (builtin_function): New.
20874 (init_decl_processing): Update for current Kaffe. Declare some
20875 builtin Kaffe functions.
20876 * expr.c (build_address_of): New.
20877 (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
20878 Renamed (from expand_java_new etc), and added working implementations.
20879 (build_field_ref): Now also handle static fields.
20880 (expand_invoke): Implement invokestatic, and start implement rest.
20881 * java-opcodes.h: Use javaop.def to avoid duplicated list.
20882 * javaop.def: Rename invokevirt -> invokevirtual.
20883 * lang.c (use_handles): Removed.
20884 * parse.c: Add support for ConstantValue attribute.
20885 Handle nested loading of a class. (JPOOL_UTF): New.
20886
20887 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
20888
20889 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
20890
20891 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
20892
20893 * Make-lang.in (java.install-man): New empty rule.
20894 * typeck.c (set_local_type): New function.
20895 * expr.c (STORE_INTERNAL): Call find_local_variable,
20896 not find_stack_slot. Call set_local_type.
20897
20898 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
20899
20900 * java-tree.h: Various new macros for constructing RECORD_TYPEs,
20901 and building RECORD_TYPE CONSTRUCTORs.
20902 Also support for creating Utf8Const objects from an INDETIFIER_NODE.
20903
20904 * lang.c (use_handles): Change the default to 0.
20905 * decl.c: Define and build class_type, field_type, utf8const_type.
20906 * class.c (make_class_data, make_field_value,
20907 get_access_flags_from_decl, build_class_ref, build_utf8_ref,
20908 hashUtf8String, strLengthUtf8, mangled_classname:
20909 Functions to build reflective data structures.
20910 * parse.c (yyparse): Call make_class_data.
20911
20912 * jcf-io.c (open_class, find_classfile): New functions.
20913 * jcf-dump.c: Support reading classfile from explicitly-named
20914 class file (without CLASSPATH searching).
20915
20916 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
20917
20918 * jcf-reader.c: Add parameter list to HANDLE_CONSTANT_Utf8.
20919 * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
20920 Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
20921 (get_constant): Now trivial for CONSTANT_Utf8.
20922
20923 * jcf.h: Make NEW_CPOOL the default.
20924 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
20925
20926 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
20927
20928 New directory.