1 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3 * typeck.c (java_signed_type): Remove.
4 * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
5 * java-tree.h (java_signed_type): Remove.
7 2007-05-18 Geoffrey Keating <geoffk@apple.com>
9 * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
10 (print_constant): Likewise.
12 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
14 * expr.c (build_java_binop): Use unsigned_type_for instead of
16 * java-tree.h (java_unsigned_type): Remove.
17 * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
18 * typeck.c (java_unsigned_type): Remove.
20 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
22 * java-tree.h (lang_tree_node): Use GENERIC_NEXT
23 instead of checking GIMPLE_STMT_P in chain_next.
25 2007-04-06 Colin Walters <walters@redhat.com>
27 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
28 * jcf-io.c (open_class): Copy 'filename'.
30 2007-04-03 Andrew Haley <aph@redhat.com>
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
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.
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.
47 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
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.
56 2007-03-26 Tom Tromey <tromey@redhat.com>
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.
70 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
72 * Make-lang.in: Add install-pdf target as copied from
75 2007-02-27 Brooks Moses <brooks.moses@codesourcery.com>
77 * gcj.texi: Standardize title page.
79 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
81 * class.c: Fix a comment typo.
83 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
84 Brooks Moses <brooks.moses@codesourcery.com>
85 Lee Millward <lee.millward@codesourcery.com>
87 * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
89 (BUILD_MONITOR_EXIT): Likewise.
91 * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
92 (java_gimplify_modify_expr): Likewise.
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.
99 * resource.c (write_resource_constructor): Use build_call_expr.
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
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
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.
148 * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
150 2007-02-15 David Daney <ddaney@avtrex.com>
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.
159 2007-02-07 Andrew Haley <aph@redhat.com>
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
166 2007-02-06 Tom Tromey <tromey@redhat.com>
169 * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
171 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
173 * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
175 2007-02-02 Andrew Haley <aph@redhat.com>
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.
190 2007-02-02 David Daney <ddaney@avtrex.com>
192 * class.c (is_compiled_class): Move check to avoid reloading
194 (layout_class_method): Don't calculate DECL_EXTERNAL if it is
197 2007-02-01 Andrew Haley <aph@redhat.com>
200 * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
202 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
204 * class.c, jcf-parse.c: Fix comment typos.
206 2007-01-30 Tom Tromey <tromey@redhat.com>
208 * gcj.texi (Strings): Fix documentation for JvNewString.
210 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
212 * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
215 2007-01-30 Ben Elliston <bje@au.ibm.com>
217 * jvspec.c (lang_specific_driver): Remove unused classpath_args.
219 2007-01-29 Tom Tromey <tromey@redhat.com>
222 * jvspec.c (lang_specific_driver): Handle separate -I argument.
223 * lang.opt (-I): Add 'Separate'.
225 2007-01-29 Andrew Haley <aph@redhat.com>
227 * class.c (add_method_1): Mark fndecl as external unless we are
228 compiling it into this object file.
230 2007-01-24 Andrew Haley <aph@redhat.com>
232 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
233 type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
235 2007-01-22 Andrew Haley <aph@redhat.com>
237 * builtins.c (VMSupportsCS8_builtin): New function.
239 2007-01-23 Andrew Pinski <pinskia@gmail.com>
242 * jcf-io.c (opendir_in_zip): Close the file
243 and free zipf before returning after an error.
245 2007-01-16 Tom Tromey <tromey@redhat.com>
247 * java-tree.def: Added copyright header.
249 2007-01-15 Tom Tromey <tromey@redhat.com>
251 * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
253 * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
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.
279 2007-01-12 Tom Tromey <tromey@redhat.com>
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
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.
297 2007-01-11 Tom Tromey <tromey@redhat.com>
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
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.
319 2007-01-10 Tom Tromey <tromey@redhat.com>
321 * lang.c (java_can_use_bit_fields_p): Removed.
322 (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
324 2007-01-09 Andrew Haley <aph@redhat.com>
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
331 2007-01-03 Andrew Haley <aph@redhat.com>
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.
338 2007-01-02 Tom Tromey <tromey@redhat.com>
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):
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>:
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.
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.
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):
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
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.
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.
493 2007-01-02 Andrew Haley <aph@redhat.com>
495 * expr.c (expand_java_arraystore): Make sure we perform a bounds
496 check at runtime before we perform a type check.
498 2006-12-19 Andrew Haley <aph@redhat.com>
500 * decl.c: Bump minor BC ABI version.
502 2006-12-13 Gary Benson <gbenson@redhat.com>
504 * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
506 2006-12-12 Tom Tromey <tromey@redhat.com>
508 * lang-specs.h: Pass -M options to jc1.
509 * jcf-depend.c (jcf_dependency_add_file): Don't emit
512 2006-12-07 Mohan Embar <gnustuff@thisiscool.com>
514 * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
516 2006-12-06 Mohan Embar <gnustuff@thisiscool.com>
518 * lang-specs.h: Pass '%U'-based options as separate arguments.
520 2006-12-05 Tom Tromey <tromey@redhat.com>
523 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
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,
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'.
537 2006-12-04 Andrew Haley <aph@redhat.com>
539 * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
542 2006-11-29 Gary Benson <gbenson@redhat.com>
544 * expr.c (rewrite_arglist_getcaller): Reorder.
546 2006-11-29 Andrew Haley <aph@redhat.com>
548 * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
549 * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
551 2006-11-23 Andrew Haley <aph@redhat.com>
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
559 Add __builtin_return_address.
561 2006-11-22 Andrew Haley <aph@redhat.com>
563 * jcf-reader.c (get_attribute): Mark attr_type unused.
565 * builtins.c (compareAndSwapObject_builtin): Fix declaration.
567 2007-01-08 Richard Guenther <rguenther@suse.de>
569 * lex.c (do_java_lex): Use build_int_cst_wide_type.
570 * jcf-parse.c (get_constant): Likewise.
572 2006-11-12 Jan Hubicka <jh@suse.cz>
574 * resource.c (compile_resource_data): Update for new varpool names.
575 * java/class.c (build_utf8_ref): Likewise.
577 2006-11-12 David Daney <ddaney@avtrex.com>
580 * typeck.c (build_java_array_type): Increase buffer sizes.
582 2006-11-11 Richard Guenther <rguenther@suse.de>
584 * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
585 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
587 2006-11-06 Andrew Haley <aph@redhat.com>
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
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.
603 2006-11-02 Andrew Haley <aph@redhat.com>
605 * java-tree.h (FIELD_ENUM): New.
606 (lang_decl_var.field_enum): New.
607 (lang_type.enum_class): 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.
613 * class.c (make_class_data): Put reflection_data into rodata.
615 2006-11-01 Andrew Haley <aph@redhat.com>
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
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.
648 2006-10-20 Tom Tromey <tromey@redhat.com>
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.
677 2006-10-20 Tom Tromey <tromey@redhat.com>
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.
690 2006-10-20 Tom Tromey <tromey@redhat.com>
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.
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.
712 2006-10-17 Tom Tromey <tromey@redhat.com>
714 * jcf-dump.c (print_element_value): Expect a utf8 constant in the
717 2006-10-17 Tom Tromey <tromey@redhat.com>
719 * jvgenmain.c (main): Handle -findirect-dispatch.
720 * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
723 2006-10-06 Andrew Haley <aph@redhat.com>
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.
730 2006-10-04 Andrew Haley <aph@redhat.com>
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.
746 2006-06-08 Andrew Haley <aph@redhat.com>
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
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
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
768 2006-09-08 Andrew Haley <aph@redhat.com>
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.
774 2006-08-16 Jakub Jelinek <jakub@redhat.com>
775 Bryce McKinlay <bryce@mckinlay.net.nz>
777 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
779 2006-07-18 Tom Tromey <tromey@redhat.com>
781 * lang.opt: Added missing -W options.
783 2006-07-12 Tom Tromey <tromey@redhat.com>
786 * lang-specs.h: Pass '%U'-based options as separate arguments.
788 * lang.c (java_handle_option): Handle OPT_faux_classpath.
789 * lang.opt (faux-classpath): New option.
791 2006-07-07 Tom Tromey <tromey@redhat.com>
793 * class.c (make_class_data): Set value for reflection_data field.
794 * decl.c (java_init_decl_processing): Add reflection_data field.
796 2006-07-07 Tom Tromey <tromey@redhat.com>
798 * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
800 (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
802 2006-07-07 Andrew Haley <aph@redhat.com>
804 * jcf-parse.c (set_source_filename): Don't check for
805 CLASS_FROM_CURRENTLY_COMPILED_P.
808 2006-07-07 Andrew Haley <aph@redhat.com>
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
820 2006-06-27 Tom Tromey <tromey@redhat.com>
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.
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):
838 (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
839 (print_annotations): New function.
841 2006-06-23 Tom Tromey <tromey@redhat.com>
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.
848 2006-06-21 Tom Tromey <tromey@redhat.com>
851 * expr.c (expand_java_field_op): Initialize field's declaring
854 2006-06-20 Tom Tromey <tromey@redhat.com>
856 * expr.c (push_value): Always flush quick stack.
858 2006-06-19 Tom Tromey <tromey@redhat.com>
860 * expr.c (push_value): Also flush quick stack if value is a
863 2006-06-19 Tom Tromey <tromey@redhat.com>
865 * expr.c (push_value): Flush quick stack if value has side
868 2006-06-13 Tom Tromey <tromey@redhat.com>
870 * class.c (is_compiled_class): Explicitly check for current
873 2006-06-09 Tom Tromey <tromey@redhat.com>
875 * gjavah.c (decompile_method): Don't decompile a static field
878 2006-06-06 Tom Tromey <tromey@redhat.com>
880 * lang-specs.h <jc1>: Add .jar file to command line if
881 -fsaw-java-file. Also, remove -ffilelist-file in this case.
883 2006-06-05 Tom Tromey <tromey@redhat.com>
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.
893 2006-06-04 Tom Tromey <tromey@redhat.com>
895 * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
896 * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
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.
903 2006-06-04 Tom Tromey <tromey@redhat.com>
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
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
919 (layout_class_method): Don't mark method external if it is being
920 compiled into this object.
922 2006-06-04 Tom Tromey <tromey@redhat.com>
924 * jcf-path.c (jcf_path_compute): New function.
925 * jcf.h (jcf_path_compute): Declare.
927 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
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.
937 2006-10-10 Brooks Moses <bmoses@stanford.edu>
939 * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
941 2006-09-12 Tom Tromey <tromey@redhat.com>
943 * expr.c (push_value): Always flush quick stack.
945 2006-09-12 Tom Tromey <tromey@redhat.com>
948 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
949 the push of the called method's return result.
951 2006-09-12 Tom Tromey <tromey@redhat.com>
953 * jvspec.c (lang_specific_driver): Read spec file even if
956 2006-09-12 Tom Tromey <tromey@redhat.com>
959 * expr.c (expand_java_field_op): Initialize field's declaring
960 interface if necessary.
962 2006-09-12 Tom Tromey <tromey@redhat.com>
965 * expr.c (expand_java_field_op): No error for assignments not in
966 class initializer or constructor.
968 2006-08-22 Andrew Haley <aph@redhat.com>
970 * decl.c (java_add_stmt): Give the statement list a type.
972 2006-08-16 Jakub Jelinek <jakub@redhat.com>
973 Bryce McKinlay <bryce@mckinlay.net.nz>
975 * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
977 2006-08-10 Simon Martin <simartin@users.sourceforge.net>
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.
988 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
990 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
992 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
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
998 2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
1000 * gcj.texi (Invocation): Corrections for Invocation API example.
1002 2006-07-04 Andrew Haley <aph@redhat.com>
1004 * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1007 2006-06-21 Andrew Haley <aph@redhat.com>
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.
1015 2006-06-19 Andrew Haley <aph@redhat.com>
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
1024 (java_gimplify_modify_expr): Likewise.
1025 * java-tree.h (java_modify_addr_for_volatile): New decl.
1027 2006-06-17 Karl Berry <karl@gnu.org>
1029 * gcj.texi (@dircategory): Use "Software development" instead
1030 of "Programming", following the Free Software Directory.
1032 2006-06-16 Andrew Haley <aph@redhat.com>
1034 * class.c (make_class_data): When using flag_indirect_classes,
1035 don't initialize the vtable of Class instances.
1037 2006-06-09 Andrew Haley <aph@redhat.com>
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.
1048 2006-06-08 Tom Tromey <tromey@redhat.com>
1050 * gcj.texi (libgcj Runtime Properties): Document
1051 gnu.gcj.user.realname.
1053 2006-06-08 Andrew Haley <aph@redhat.com>
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
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
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.
1075 2006-06-06 David Daney <ddaney@avtrex.com>
1077 * gcj.texi (libgcj Runtime Properties): Document
1078 gnu.gcj.runtime.NameFinder.show_raw and
1079 gnu.gcj.runtime.NameFinder.remove_unknown.
1081 2006-06-06 Tom Tromey <tromey@redhat.com>
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.
1091 2006-06-06 Mike Stump <mrs@apple.com>
1093 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1094 installing during build.
1096 2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
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.
1105 2006-05-29 Jakub Jelinek <jakub@redhat.com>
1107 * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1109 (jword): Define to uint64 on 64-bit arches.
1110 * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1112 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1114 * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1117 2006-05-26 Tom Tromey <tromey@redhat.com>
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.
1124 2006-05-25 Andrew Haley <aph@redhat.com>
1127 * decl.c (maybe_pushlevels): When variable ranges are non-nested
1128 update all lifetimes, not just the first one.
1130 2006-05-24 Tom Tromey <tromey@redhat.com>
1132 * java-tree.h: Fixed flag documentation.
1134 2006-05-24 Tom Tromey <tromey@redhat.com>
1137 * jcf.h (ACC_INVISIBLE): Changed value.
1139 2006-05-24 Andrew Haley <aph@redhat.com>
1142 * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1145 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1147 * lang.opt (femit-class-file): Remove VarExists.
1149 2006-05-16 Tom Tromey <tromey@redhat.com>
1151 * verify-impl.c (verify_instructions_0) <op_return>: Special case
1154 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1157 * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1160 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
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.
1166 2006-05-10 Andrew Haley <aph@redhat.com>
1168 * class.c (emit_indirect_register_classes): Fix comment.
1170 2006-05-04 Tom Tromey <tromey@redhat.com>
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.
1178 2006-05-04 Tom Tromey <tromey@redhat.com>
1180 * java-tree.def (THIS_EXPR): Now a tcc_expression.
1182 2006-05-04 Andrew Haley <aph@redhat.com>
1184 * class.c (make_field_value): Always build_address_of fdecl if
1185 there is an initializer.
1187 2006-05-03 Andrew Haley <aph@redhat.com>
1190 * expr.c (maybe_rewrite_invocation): New function.
1191 (rewrite_arglist_getclass): Likewise.
1193 (expand_invoke): Call maybe_rewrite_invocation.
1194 * parse.y (patch_invoke): Likewise.
1195 * java-tree.h: (maybe_rewrite_invocation): New function.
1197 2006-04-21 Andrew Haley <aph@redhat.com>
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
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.
1217 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1219 * expr.c, gjavah.c: Fix comment typos.
1221 2006-04-03 Andrew Haley <aph@redhat.com>
1224 * expr.c (build_field_ref): Don't check the field offset if
1227 2006-03-30 Andrew Haley <aph@redhat.com>
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
1238 2006-03-30 Carlos O'Donell <carlos@codesourcery.com>
1240 * Make-lang.in: Rename docdir to gcc_docdir.
1242 2006-03-30 Tom Tromey <tromey@redhat.com>
1245 * parse.y (java_reorder_fields): Reset superclass field's size as
1248 2006-03-28 Tom Tromey <tromey@redhat.com>
1251 * parse.y (find_most_specific_methods_list): Added 'class'
1253 (lookup_method_invoke): Updated.
1255 2006-03-15 Tom Tromey <tromey@redhat.com>
1257 * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1258 non-static method calls.
1260 2006-03-15 David Daney <ddaney@avtrex.com>
1262 * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1265 2006-03-15 David Daney <ddaney@avtrex.com>
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.
1279 2006-03-15 Tom Tromey <tromey@redhat.com>
1282 * class.c (get_interface_method_index): Don't put <clinit> into
1285 2006-03-15 Tom Tromey <tromey@redhat.com>
1287 * parse.y (analyze_clinit_body): Ignore empty statements.
1289 2006-03-08 David Daney <ddaney@avtrex.com>
1291 * gcj.texi: Document -static-libgcj option.
1293 2006-02-20 Andrew Haley <aph@redhat.com>
1295 * jcf-parse.c (parse_class_file): Set input_location from
1298 2006-02-15 Andrew Haley <aph@redhat.com>
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.
1304 2006-02-09 Andrew Haley <aph@redhat.com>
1307 * expr.c (expand_invoke): Allow methods in arrays to be resolved
1308 in their superclass.
1310 * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1313 2006-02-08 Tom Tromey <tromey@redhat.com>
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.
1322 2006-02-07 Andrew Haley <aph@redhat.com>
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
1329 * constants.c (build_constants_constructor): move initializer into
1330 first halfword on a 64-bit big-endian machine.
1332 2006-02-04 Tom Tromey <tromey@redhat.com>
1335 * builtins.c (max_builtin): Skip floating point 'max'.
1336 (min_builtin): Skip floating point 'min'.
1337 (check_for_builtin): Never return NULL_TREE.
1339 2006-02-04 Tom Tromey <tromey@redhat.com>
1342 * expr.c (push_type): Avoid side effect in gcc_assert.
1344 2006-02-04 Roger Sayle <roger@eyesopen.com>
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.
1358 2006-02-04 Andreas Tobler <a.tobler@schweiz.ch>
1360 * expr.c (java_stack_swap): Revert gcc_assert patch.
1362 2006-02-03 Ben Elliston <bje@au.ibm.com>
1364 * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1365 * typeck.c: Likewise.
1366 * verify-impl.c: Likewise.
1367 * class.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.
1377 * boehm.c: Likewise.
1379 2006-02-01 Jan Hubicka <jh@suse.cz>
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.
1384 2006-01-30 Andrew Haley <aph@redhat.com>
1387 * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1389 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
1391 * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1392 Update copyright notice dates.
1394 2006-01-16 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1396 * jvspec.c (lang_specific_spec_functions): Remove.
1398 2006-01-06 Tom Tromey <tromey@redhat.com>
1400 * gcj.texi (Arrays): Added more documentation for
1402 (Primitive types): Correct information about primitive classes.
1403 (Reference types): New node.
1406 2005-12-16 Alexandre Oliva <aoliva@redhat.com>
1408 * jcf-parse.c (set_source_filename): Set the decl source location
1409 even when returning early.
1411 2005-12-15 Tom Tromey <tromey@redhat.com>
1412 Andrew Haley <aph@redhat.com>
1415 * parse.y (resolve_expression_name): Don't generate accessor
1416 methods for constant fields.
1418 2005-12-13 Andrew Haley <aph@redhat.com>
1422 * class.c (maybe_layout_super_class): Update current_class before
1423 calling do_resolve_class.
1425 2005-12-12 H.J. Lu <hongjiu.lu@intel.com>
1428 * jcf-write.c (write_classfile): Use PID in temporary class
1429 file. Save/restore errno when reporting error.
1431 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
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
1439 2005-12-08 Andrew Haley <aph@redhat.com>
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.
1447 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1449 * Make-lang.in (java.all.build, java.install-normal): Remove.
1451 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
1453 * Make-lang.in: Remove all dependencies on s-gtype, except for
1456 2005-12-07 Richard Sandiford <richard@codesourcery.com>
1458 * class.c (build_utf8_ref, emit_register_classes): Use
1459 switch_to_section and get_section.
1461 2005-12-06 Tom Tromey <tromey@redhat.com>
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.
1468 2005-12-05 Tom Tromey <tromey@redhat.com>
1470 * parse.y (patch_new_array_init): Don't set length on array.
1472 2005-12-02 Richard Guenther <rguenther@suse.de>
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.
1479 2005-11-28 Tom Tromey <tromey@redhat.com>
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.
1488 2005-11-24 Bryce McKinlay <mckinlay@redhat.com>
1490 * gcj.texi (gij options): Add -Xss documentation.
1492 2005-11-08 Wil Mahan <wmahan@gmail.com>
1495 * zextract.c (read_zip_archive): Fix out of memory error when
1496 reading jar files with zip-style comments.
1498 2005-11-07 Terry Laurenzo <tlaurenzo@gmail.com>
1500 * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1502 * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1504 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
1505 Wil Mahan <wmahan@gmail.com>
1508 * class.c (make_class): Create empty binfo here.
1509 (set_super_info): Only create binfo if we have superclasses.
1511 2005-10-03 Ranjit Mathew <rmathew@gcc.gnu.org>
1514 * parse.y (method_header): Make the result of the rule a NULL_TREE
1515 when a parsing error occurs.
1517 2005-09-29 Tom Tromey <tromey@redhat.com>
1520 * jcf-io.c (memoized_dirlist_hash): New function.
1521 (caching_stat): Use it.
1523 2005-09-21 Ranjit Mathew <rmathew@gcc.gnu.org>
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
1531 2005-09-18 James A. Morrison <phython@gcc.gnu.org>
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.
1545 2005-09-14 Bryce McKinlay <mckinlay@redhat.com>
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'.
1559 2005-09-09 Andrew Haley <aph@redhat.com>
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
1566 2005-09-06 Andrew Pinski <pinskia@physics.uc.edu>
1568 * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1569 BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1571 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
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.
1577 2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
1580 * typeck.c (lookup_do): Look up interfaces for the original class,
1582 * parse.y (java_check_regular_methods): Fix diagnostic message for
1583 more restrictive overriding of a method from an interface.
1585 2005-08-16 Tom Tromey <tromey@redhat.com>
1587 * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1588 class' initial state.
1590 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
1593 * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1594 `literal_token' for large numeric input tokens.
1596 2005-08-16 Ranjit Mathew <rmathew@hotmail.com>
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).
1612 2005-08-15 Tom Tromey <tromey@redhat.com>
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
1620 2005-08-15 Tom Tromey <tromey@redhat.com>
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.
1634 2005-08-15 Tom Tromey <tromey@redhat.com>
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.
1651 2005-08-10 Andrew Haley <aph@redhat.com>
1653 * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1654 type mismatches to make legal GIMPLE.
1656 2005-08-10 Robin Green <greenrd@greenrd.org>
1659 * parse.y (maybe_use_access_method): Generalize check from
1660 java.lang.Object to any superclass of current_class
1662 2005-08-08 Nathan Sidwell <nathan@codesourcery.com>
1664 * class.c (build_class_ref): Wrap the primary class type in a
1666 * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1667 primary class type from the NOP_EXPR in which it was placed.
1669 2005-07-28 Diego Novillo <dnovillo@redhat.com>
1671 * expr.c (expand_load_internal): Fix missing parens in
1674 2005-07-28 Andrew Haley <aph@redhat.com>
1676 * expr.c (expand_load_internal): Convert to destination type.
1678 2005-07-22 Manfred Hollstein <mh@suse.com>
1680 * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1681 (check_constant): Likewise.
1682 (check_wide_constant): Likewise.
1684 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1686 Make CONSTRUCTOR use VEC to store initializers.
1687 * check-init.c (check_init): Update to cope with VEC in
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
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
1699 * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
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
1705 (array_constructor_check_entry): Likewise.
1707 2005-07-12 Tom Tromey <tromey@redhat.com>
1709 * jvspec.c (lang_specific_driver): Put filelist_filename first on
1712 2005-07-12 Tom Tromey <tromey@redhat.com>
1715 * parse-scan.y (interface_member_declaration): Added
1718 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1720 * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
1721 (LABEL_PENDING_CHAIN): Ditto.
1723 (DECL_BIT_INDEX): Ditto.
1725 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
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.
1737 2005-07-07 Bryce McKinlay <mckinlay@redhat.com>
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.
1749 2005-07-05 Bryce McKinlay <mckinlay@redhat.com>
1752 * parse.y (interface_member_declaration): Allow empty statements in
1753 interface declarations.
1755 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
1757 * Makefile.in (parse.o): Adjust dependencies.
1758 * parse.y: Include tree-dump.h.
1760 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1762 * class.c, decl.c, expr.c: Use '+' flag instead of %J. Use 'q'
1765 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu>
1767 * parse.y (issue_warning_error_from_context): Call
1768 pp_output_formatted_text to be able to get the buffer.
1770 2005-06-30 Andrew Pinski <pinskia@physics.uc.edu>
1772 * parse.y (issue_warning_error_from_context): Update for the
1773 renaming of pp_format_text to pp_format.
1775 2005-06-28 Paul Brook <paul@codesourcery.com>
1777 * decl.c (java_init_decl_processing): Call
1778 default_init_unwind_resume_libfunc.
1780 2005-06-27 Tom Tromey <tromey@redhat.com>
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.
1790 2005-06-25 Jan Hubicka <jh@suse.cz>
1792 * builtins.c (define_builtin): Accept new flags parameter.
1793 (initialize_builtins): Mark the builtins const and nothrow accordingly.
1795 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1797 * all files: Update FSF address in copyright headers.
1799 2005-06-24 Tom Tromey <tromey@redhat.com>
1801 * verify-impl.c (verify_instructions_0): Correctly handle
1802 situation where PC falls off end.
1804 2005-06-23 Bryce McKinlay <mckinlay@redhat.com>
1807 * parse.y (find_most_specific_methods_list): Remove special case for
1810 2005-06-15 Tom Tromey <tromey@redhat.com>
1813 * class.c (make_method_value): Use soft_abstractmethod_node for
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.
1820 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1822 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
1824 2005-06-13 Per Bothner <per@bothner.com>
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.
1835 2005-06-13 Tom Tromey <tromey@redhat.com>
1838 * parse.y (nested_field_access_p): Handle case where outer field
1839 is inherited by enclosing class.
1841 2005-06-12 Per Bothner <per@bothner.com>
1843 * class.c (inherits_from_p): Do load_class if needed.
1845 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
1853 2005-06-08 Roger Sayle <roger@eyesopen.com>
1855 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
1857 2005-06-06 Jakub Jelinek <jakub@redhat.com>
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.
1866 2005-06-01 Tom Tromey <tromey@redhat.com>
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
1873 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1875 * java/verify-glue.c: Don't include errors.h and include toplev.h.
1876 * java/Make-lang.in: Updates dependencies.
1878 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
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
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
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.
1920 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
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.
1930 2005-05-25 Richard Henderson <rth@redhat.com>
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.
1960 2005-05-25 DJ Delorie <dj@redhat.com>
1962 * class.c (set_constant_value): Move warning control from if() to
1965 2005-05-24 Richard Henderson <rth@redhat.com>
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
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
1984 2005-05-24 Richard Henderson <rth@redhat.com>
1986 * class.c (registered_class): Take it out of class_roots; turn into
1988 (register_class): Make static. Don't duplicate decl node. Use
1990 (emit_register_classes): Use VEC_iterate. Use output_constant
1991 instead of assemble_integer. Don't call mark_decl_referenced
1993 * java-tree.h (register_class): Remove decl.
1995 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
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.
2003 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
2005 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2008 2005-05-15 Tom Tromey <tromey@redhat.com>
2011 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2014 2005-05-12 Aaron Luchko <aluchko@redhat.com>
2016 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2018 2005-05-11 Tom Tromey <tromey@redhat.com>
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.
2025 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
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.
2043 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
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.
2067 (version): Likewise.
2068 (help): Likewise. Add help output for -force, -old, -trace and -J
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.
2074 2005-05-03 Tom Tromey <tromey@redhat.com>
2077 * gjavah.c (main): Unlink output file on error.
2079 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2081 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2084 2005-04-29 Tom Tromey <tromey@redhat.com>
2086 * expr.c (build_jni_stub): Updated for change to build_block.
2088 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
2090 * expr.c (force_evaluation_order): Declare 'saved' earlier.
2092 2005-04-28 Andrew Haley <aph@redhat.com>
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.
2111 * expr.c (force_evaluation_order): Convert outgoing args smaller
2114 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
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.
2120 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2122 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2123 to `unlock_stream' with `unlock_std_streams'.
2125 2005-04-25 Jakub Jelinek <jakub@redhat.com>
2127 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2128 instead of just expr.h.
2130 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
2137 2005-04-23 DJ Delorie <dj@redhat.com>
2139 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2140 parse.y: Adjust warning() callers.
2142 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
2144 * gcj.texi (Object fields): Change "Integer" to "Int" in example
2147 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
2149 * gcj.texi: Fix typos and bogus example.
2151 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
2153 * except.c: Fix a comment typo.
2155 2005-04-19 Julian Brown <julian@codesourcery.com>
2157 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2158 indirect dispatch with PIC.
2160 2005-04-18 Andrew Haley <aph@redhat.com>
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.
2175 2005-04-13 Julian Brown <julian@codesourcery.com>
2177 * decl.c (finish_method): Give methods once-only linkage.
2179 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2181 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2183 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2185 * java-tree.h: Don't use PARAMS().
2187 2005-04-07 Per Bothner <per@bothner.com>
2189 * class.c (push_class): By default, suppress debug output.
2190 (finish_class): Enable debug output for classes we're emitting.
2192 2005-04-07 Andrew Haley <aph@redhat.com>
2194 * gcj.texi: Correct gcj-dbtool instructions.
2196 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
2198 * gcj.texi: Fix a typo.
2199 * lang.c: Fix a comment typo.
2201 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
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
2207 (About CNI): Add Memory allocation section.
2209 2005-04-01 Tom Tromey <tromey@redhat.com>
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.
2216 2005-03-31 Jan Hubicka <jh@suse.cz>
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.
2224 2005-03-30 Ian Lance Taylor <ian@airs.com>
2226 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2228 2005-03-30 Tom Tromey <tromey@redhat.com>
2230 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2231 inner_class_info_index==0 or outer_class_info_index==0.
2233 2005-03-29 Tom Tromey <tromey@redhat.com>
2235 * gcj.texi (libgcj Runtime Properties): Document
2236 gnu.gcj.runtime.endorsed.dirs.
2238 2005-03-24 Anthony Green <green@redhat.com>
2240 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2243 2005-03-23 Tom Tromey <tromey@redhat.com>
2245 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2246 (parse_version): Use it.
2248 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2250 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2252 2005-03-18 Andrew Haley <aph@redhat.com>
2255 * decl.c (update_aliases): Don't update variables that are about
2257 (maybe_poplevels): Add comment.
2259 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
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.
2268 2005-03-16 Andrew Haley <aph@redhat.com>
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.
2274 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2276 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2278 2005-03-11 Tom Tromey <tromey@redhat.com>
2280 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2281 (libgcj Runtime Properties): Document the default .db.
2283 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
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'.
2290 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
2293 * decl.c (finish_method): Emit _Jv_InitClass for private static
2294 methods inside inner classes as well.
2296 2005-03-08 Julian Brown <julian@codesourcery.com>
2297 * Revert patch from 2005-03-08 for causing bootstrap failure on
2300 2005-03-08 Julian Brown <julian@codesourcery.com>
2302 * decl.c (finish_method): Give methods once-only linkage.
2304 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
2306 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2308 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
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.
2323 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
2325 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2326 for known NULL array length access.
2328 2005-03-07 Tom Tromey <tromey@redhat.com>
2330 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2332 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
2334 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2335 typeck.c: Update copyright.
2337 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
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.
2359 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
2361 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2362 instead of IS_NON_TYPE_CODE_CLASS.
2364 2005-03-04 Andrew Haley <aph@redhat.com>
2367 * class.c (set_method_index): Don't set method_index if it is
2369 (layout_class_method): Don't complain about "non-static method foo
2370 overrides static method" in the case of indirect dispatch.
2372 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2374 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2376 * Make-lang.in: Don't elide warnings in jcf-io.c.
2378 2005-03-01 Per Bothner <per@bothner.com>
2381 * check-init.c (wfl): Remove static.
2382 (final_assign_error, check_init): Replace calls to parse_error_context
2384 (check_init): Save, set, and restore input_location for each exp.
2386 2005-03-01 Per Bothner <per@bothner.com>
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.
2392 2005-03-01 Per Bothner <per@bothner.com>
2394 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2396 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
2399 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2402 2005-02-22 Tom Tromey <tromey@redhat.com>
2405 * verify-impl.c (EITHER): New define.
2406 (types_compatible): Handle it.
2407 (check_field_constant): Use it.
2409 2005-02-18 Tom Tromey <tromey@redhat.com>
2412 * verify-impl.c (types_equal): Fixed test.
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'
2419 (verify_instructions_0): Updated.
2420 (types_equal): New function.
2422 2005-02-14 Tom Tromey <tromey@redhat.com>
2425 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2426 stack effect of multianewarray.
2428 2005-02-14 Andrew Haley <aph@redhat.com>
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
2435 (find_local_variable): Promote all boolean types to int
2436 when searching for local variable decls.
2438 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
2440 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2441 parse-scan.y: Update copyright.
2443 2005-02-11 Per Bothner <per@bothner.com>
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.
2454 2005-02-09 Richard Henderson <rth@redhat.com>
2456 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2457 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2459 2005-02-08 Marcin Dalecki <martin@dalecki.de>
2461 * expr.c (add_type_assertion): Use the proper enumeration type,
2462 since this is what htab_find_slot() is expecting.
2464 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2466 * gcj.texi: Update copyright dates.
2468 2005-02-02 Tom Tromey <tromey@redhat.com>
2470 * gcj.texi (libgcj Runtime Properties): Default library_control
2473 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
2476 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2477 (modifiers) when square brackets are present in a declaration for
2479 * jv-scan.c (main): Set input_filename and input_line.
2481 2005-02-01 Tom Tromey <tromey@redhat.com>
2484 * gjavah.c (get_field_name): Don't override name for JNI header.
2486 2005-02-01 Roger Sayle <roger@eyesopen.com>
2488 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2489 of unsigned types using iushr and lushr JVM bytecodes.
2491 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
2494 * gjavah.c (jni_print_float): Do not emit floating-point
2495 initialiser for a static final field.
2496 (jni_print_double): Likewise.
2498 2005-02-01 Mark Mitchell <mark@codesourcery.com>
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__".
2505 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2507 * gjavah.c (print_field_info): Mark static data members of
2508 floating-point type with "__extension__".
2510 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
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.
2517 2005-01-25 Tom Tromey <tromey@redhat.com>
2519 * Make-lang.in (java/java-tree-inline.o): Removed.
2521 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
2524 * parse.y (patch_binop): Allow comparisons against NULL only
2525 if the other operand is of a reference type.
2527 2005-01-24 Tom Tromey <tromey@redhat.com>
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.
2536 (GCJ_BINARYCOMPAT_ADDITION): New define.
2538 2005-01-24 Roger Sayle <roger@eyesopen.com>
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.
2545 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
2547 * java-except.h, java-tree.h: Remove unused prototypes.
2549 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
2552 * jcf-write.c (perform_relocations): Don't call memcpy if source
2553 and destination are the same.
2555 2005-01-17 Tom Tromey <tromey@redhat.com>
2557 * verify-impl.c (get_short): Sign extend.
2558 (get_int): Likewise.
2560 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
2562 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2565 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
2567 * verify.c: Revert to the version before the BC-ABI merge.
2569 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
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.
2576 2005-01-08 Mark Wielaard <mark@klomp.org>
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
2582 (java_parse_file): Keep pointer to head of file_list and free when
2583 done. Free result of lrealpath().
2585 2005-01-05 Tom Tromey <tromey@redhat.com>
2587 * gcj.texi (Standard Properties): java.ext.dirs is now used.
2589 2004-12-20 Andrew Haley <aph@redhat.com>
2591 * typeck.c: Use fold_convert for ints and booleans.
2593 2004-12-17 Andrew Haley <aph@redhat.com>
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
2603 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
2606 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2609 2004-12-07 Andrew Haley <aph@redhat.com>
2612 * jcf-parse.c (load_class): Remove sanity test for missing inner
2615 2004-12-06 Tom Tromey <tromey@redhat.com>
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".
2628 2004-12-06 Tom Tromey <tromey@redhat.com>
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.
2636 2004-12-03 Tom Tromey <tromey@redhat.com>
2638 * lang.c (flag_new_verifier): Define.
2639 (java_post_options): Set flag_new_verifier if indirect dispatch
2641 * lang.opt (fnew-verifier): Removed.
2643 2004-12-03 Tom Tromey <tromey@redhat.com>
2646 * Make-lang.in (java.install-common): Only install transformed
2647 gcjh if gcj-cross exists.
2649 2004-12-03 Andrew Haley <aph@redhat.com>
2652 * except.c (link_handler): Patch 'outer' field of siblings of the
2653 range we're demoting.
2655 2004-12-03 Andrew Haley <aph@redhat.com>
2658 * class.c (layout_class_method): Don't fail to override a method
2659 simply because it has DECL_ARTIFICIAL set.
2661 2004-12-02 Tom Tromey <tromey@redhat.com>
2664 * parse.y (craft_constructor): Special case null_pointer_node.
2666 2004-12-02 Tom Tromey <tromey@redhat.com>
2669 * java-gimplify.c (java_gimplify_expr): Don't call
2670 SET_EXPR_LOCATION unless wrapped tree is an expression.
2672 2004-11-27 Per Bothner <per@bothner.com>
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.
2679 2004-11-27 Per Bothner <per@bothner.com>
2681 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2682 local static variables if not USE_MAPPED_LOCATION.
2684 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2686 * class.c, decl.c, expr.c: Fix comment typos.
2688 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
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
2700 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2702 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
2705 2004-11-24 Richard Henderson <rth@redhat.com>
2707 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
2708 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
2710 2004-11-24 Tom Tromey <tromey@redhat.com>
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.
2716 * verify-impl.c (vfy_push_type): Removed bogus "return".
2717 (initialize_stack): Use vfy_alloc and vfy_free.
2718 (verify_instructions_0): Likewise.
2720 * Merged gcj-abi-2-dev-branch to trunk.
2722 2004-11-24 Andrew Haley <aph@redhat.com>
2724 * jcf-parse.c (parse_class_file): Set file_start_location.
2726 2004-11-10 Tom Tromey <tromey@redhat.com>
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
2732 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
2733 -verbose:class into man page synopsis.
2735 2004-11-09 Tom Tromey <tromey@redhat.com>
2737 * expr.c (build_java_arraystore_check): Still generate check if
2738 element type is itself an array.
2740 2004-11-08 Tom Tromey <tromey@redhat.com>
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.
2747 2004-11-05 Tom Tromey <tromey@redhat.com>
2749 * class.c (layout_class_methods): Don't add Miranda methods when
2750 using indirect dispatch.
2752 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
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.
2788 2004-11-04 Tom Tromey <tromey@redhat.com>
2790 * class.c (build_static_field_ref): Reverted previous patch.
2792 * class.c (build_static_field_ref): Don't emit direct references
2793 when using indirect dispatch.
2795 2004-11-03 Tom Tromey <tromey@redhat.com>
2797 * expr.c (expand_java_arrayload): Set lhs_type_node.
2798 (expand_java_arraystore): Set rhs_type_node.
2800 2004-11-02 Tom Tromey <tromey@redhat.com>
2802 * jcf-parse.c (compute_class_name): Use filename length from zip
2803 directory, not strlen.
2805 * expr.c (expand_invoke): Mark new interface methods as abstract.
2807 2004-11-01 Tom Tromey <tromey@redhat.com>
2809 * verify-impl.c (push_jump): Removed check for uninitialized
2811 (push_exception_jump): Likewise.
2812 (handle_ret_insn): Likewise.
2813 (handle_jsr_insn): Likewise.
2814 (state_check_no_uninitialized_objects): Removed.
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
2826 (build_java_array_length_access): Likewise.
2827 (expand_invoke): Handle case where interface overrides a method
2829 (pop_type_0): Always succeed for reference types.
2830 (process_jvm_instruction): Don't pop a value in a dead
2832 (pop_arguments): Convert arguments to correct types.
2834 2004-10-29 Andrew Haley <aph@redhat.com>
2836 * jcf-parse.c (give_name_to_class): Remove line that was
2839 2004-10-29 Andrew Haley <aph@redhat.com>
2841 * jcf-parse.c (set_source_filename): Add code to build new sfname.
2843 2004-10-20 Andrew Haley <aph@redhat.com>
2845 * decl.c (end_java_method): Don't expand if flag_syntax_only.
2847 2004-10-26 Tom Tromey <tromey@redhat.com>
2849 * verify.h (vfy_notify_verified): Removed.
2850 * verify-glue.c (vfy_notify_verified): Removed.
2852 2004-10-26 Tom Tromey <tromey@redhat.com>
2854 * verify-impl.c (debug_print_state): Declare `i' before code.
2855 (merge_types): Modify `t' when it is null_type.
2857 2004-10-26 Tom Tromey <tromey@redhat.com>
2859 * verify-impl.c (type_print): Renamed from print. Now static and
2861 (debug_print_state): Use type_print.
2863 2004-10-25 Tom Tromey <tromey@redhat.com>
2865 * expr.c (build_invokeinterface): Compute correct offset for
2866 index into interface methods.
2868 2004-10-20 Tom Tromey <tromey@redhat.com>
2870 * java-tree.h (verify_jvm_instructions_new): Declare.
2872 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
2875 * verify-impl.c (verify_instructions): Correctly handle wide
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
2881 Include java-except.h.
2883 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
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.
2891 2004-10-20 Tom Tromey <tromey@redhat.com>
2893 * verify-impl.c (merge_refs): Compare reference against iterator,
2896 * verify-glue.c (vfy_tag): Mask off resolved flag.
2898 2004-10-19 Tom Tromey <tromey@redhat.com>
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.
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
2915 (verify_instructions): Call vfy_note_instruction_seen.
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.
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.
2927 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
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
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
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.
2952 2004-10-15 Tom Tromey <tromey@redhat.com>
2954 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2955 * verify.h (vfy_fail): Fixed formatting.
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):
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'
2969 (vfy_note_local_type): New function.
2970 (vfy_unsuitable_type): Likewise.
2971 (vfy_return_address_type): Likewise.
2972 (vfy_null_type): Likewise.
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.
2979 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
2981 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2984 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
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
2994 2004-10-06 Tom Tromey <tromey@redhat.com>
2996 * java-tree.h (JV_STATE_READ): New enum value.
2998 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
3000 * verify.h: New file.
3002 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
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.
3007 2004-09-24 Andrew Haley <aph@redhat.com>
3009 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3010 for a slot if it's of pointer type.
3012 2004-09-14 Tom Tromey <tromey@redhat.com>
3014 * class.c (make_class_data): Correctly initialize "state" field.
3015 Initialize "engine" field.
3016 * decl.c (java_init_decl_processing): Add "engine" field.
3018 2004-09-10 Andrew Haley <aph@redhat.com>
3021 * expr.c (build_invokeinterface): Use fast method for interface
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().
3032 (add_miranda_methods): Make sure search_class has been parsed.
3033 (emit_symbol_table): Add new arg, element_size.
3035 2004-09-06 Andrew Haley <aph@redhat.com>
3037 * verify.c (merge_types): Return Object for all merges of
3039 * expr.c (add_type_assertion): Don't generate assertions when
3040 source type is array of Object.
3042 2004-09-03 Andrew Haley <aph@redhat.com>
3044 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3046 * lang.c (java_post_options): Force flag_verify_invocations if
3047 we're not using indirect dispatch.
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
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
3061 2004-09-01 Andrew Haley <aph@redhat.com>
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".
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.
3072 2004-08-27 Andrew Haley <aph@redhat.com>
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).
3086 * decl.c (end_java_method): Nullify unused fields.
3088 2004-08-17 Andrew Haley <aph@redhat.com>
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
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
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
3106 (build_static_field_ref): Add correct type conversion for
3108 (add_miranda_methods): Disable generation of Miranda methods for
3110 (layout_class_method): Don't complain about non-static method
3111 overrides static method with dummy classes.
3113 2004-08-13 Tom Tromey <tromey@redhat.com>
3115 * class.c (build_static_field_ref): Re-enable atable lookups for
3118 * parse.y (strip_out_static_field_access_decl): Indentation fix.
3120 2004-08-11 Tom Tromey <tromey@redhat.com>
3122 * gcj.texi (libgcj Runtime Properties): Document new properties.
3124 2004-08-06 Andrew Haley <aph@redhat.com>
3126 * jcf-parse.c (load_class): Check that we really have loaded the
3127 class we're looking for.
3129 2004-07-19 Andrew Haley <aph@redhat.com>
3131 * verify.c (verify_jvm_instructions): Comment change only.
3133 * typeck.c (build_java_array_type): Add size field to array name.
3135 * java-tree.h (LOCAL_SLOT_P): New.
3136 (update_aliases): Add PC argument.
3137 (pushdecl_function_level): New function.
3139 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3140 MODIFY_EXPR, and SAVE_EXPR.
3141 (java_gimplify_modify_expr): New function.
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.
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.
3166 2004-06-29 Andrew Haley <aph@redhat.com>
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.
3184 2004-06-22 Andrew Haley <aph@redhat.com>
3186 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
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
3193 2004-05-28 Andrew Haley <aph@redhat.com>
3195 * jcf-parse.c (load_class): Don't try to read a class that we've
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.
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
3209 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3210 dispatch, even if a method is final.
3212 2004-05-25 Andrew Haley <aph@redhat.com>
3214 * class.c (build_symbol_entry): Convert the names of constructors
3215 to init_identifier_node when generating an entry for the indirect
3218 * expr.c (build_known_method_ref): Generate indirect calls for
3219 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3221 2004-05-24 Andrew Haley <aph@redhat.com>
3223 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3224 atable element is of the right type.
3226 * class.c (build_static_field_ref): Cast pointer to correct type
3229 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
3231 * Merged with HEAD as of 20040514. Diff against
3232 gcj-abi-2-merge-20040514.
3234 2004-04-16 Andrew Haley <aph@redhat.com>
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.
3242 * parse.y (patch_invoke): Break out call to java_create_object.
3244 * lang.c (flag_verify_invocations): New.
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
3250 (parse_class_file): Don't act on dummy methods.
3252 * java-tree.h (flag_verify_invocations): New.
3254 (lang_type.dummy_class): New field.
3255 (java_create_object): New function.
3256 (METHOD_DUMMY): New.
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
3262 (pop_type_0): Issue a warning to say that we need to generate a
3264 (java_create_object): New function.
3265 (build_field_ref): Only generate hard refs if we're not using
3267 (expand_java_field_op): If we're using !verify_invocations and we
3268 see a missing field, generate a decl for it.
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
3274 (build_known_method_ref): Always use indirect dispatch via the
3275 atable for static methods.
3277 (expand_java_NEW): Break out object creation into new function,
3280 (can_widen_reference_to): Issue a warning to say that we need to
3281 generate a runtime check.
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.
3292 (layout_class_method): Don't complain about non-static method
3293 overrides static method is method is artificial.
3295 (build_static_field_ref): Disable atable references to static
3296 fields for the time being.
3298 (layout_class_methods): Check for CLASS_INTERFACE as
3299 well as CLASS_ABSTRACT.
3301 2004-11-24 Steven Bosscher <stevenb@suse.de>
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.
3310 2004-11-24 Steven Bosscher <stevenb@suse.de>
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
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
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
3330 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3332 2004-11-23 Ben Elliston <bje@au.ibm.com>
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.
3343 2004-11-23 Ben Elliston <bje@au.ibm.com>
3345 * gjavah.c (output_directory): Make static.
3346 (temp_directory): Likewise.
3348 2004-11-15 Tom Tromey <tromey@redhat.com>
3350 * decl.c (instn_ptr_type_node): Removed.
3351 (lineNumbers_ptr_type_node): Removed.
3352 (jint_type): Removed.
3353 (jint_ptr_type): Removed.
3355 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
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
3365 2004-11-08 Tom Tromey <tromey@redhat.com>
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.
3374 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
3376 * decl.c (end_java_method): Remove duplicated code.
3378 2004-11-06 Zack Weinberg <zack@codesourcery.com>
3379 Gerald Pfeifer <gerald@pfeifer.com>
3381 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3384 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
3387 * class.c: Reinstate 2004-08-18 patch.
3388 (make_local_function_alias): Don't create an alias for extern (native)
3391 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
3394 * class.c (make_local_function_alias): Revert 2004-08-18 change.
3395 (make_method_value): Likewise.
3397 2004-10-21 Andrew Haley <aph@redhat.com>
3400 * jcf-parse.c (set_source_filename): Add code to build new sfname.
3402 2004-10-20 Andrew Haley <aph@redhat.com>
3404 * decl.c (end_java_method): Don't expand if flag_syntax_only.
3405 Remove duplicated code block.
3407 2004-10-18 Steven Bosscher <stevenb@suse.de>
3409 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3410 New rules to work around old Bison warnings.
3412 2004-10-17 Steven Bosscher <stevenb@suse.de>
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.
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.
3428 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
3430 * expr.c (expr_add_location): Move declaration to before all
3432 * parse.y (java_expand_classes): Ditto.
3433 * lex.c (java_peek_unicode): Ditto.
3435 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
3437 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3438 if possible, else convert `foo' to 'foo'.
3439 * class.c: Likewise.
3442 * jcf-io.c: Likewise.
3443 * jcf-parse.c: Likewise.
3446 * parse.h: Likewise.
3448 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
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.
3456 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
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:
3462 2004-10-14 Matt Austern <austern@apple.com>
3464 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3467 2004-10-13 Tom Tromey <tromey@redhat.com>
3470 * lang.opt (--extdirs): Document.
3471 * jvspec.c (lang_specific_driver): Recognize -encoding and
3474 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
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.
3481 2004-10-05 Zack Weinberg <zack@codesourcery.com>
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.
3487 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
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.
3499 2004-10-05 Andrew Haley <aph@redhat.com>
3502 * jcf-parse.c (parse_zip_file_entries): If a class has a
3503 superclass and a TYPE_SIZE of zero, lay it out.
3505 2004-09-30 Andrew Haley <aph@redhat.com>
3508 * jcf-parse.c (compute_class_name): Rewrite.
3510 2004-10-01 Jan Hubicka <jh@suse.cz>
3512 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3514 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
3516 * lex.c: Fix a comment typo.
3518 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
3520 * java-tree.h: Fix a comment typo.
3522 2004-09-30 Per Bothner <per@bothner.com>
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.
3583 2004-09-30 Per Bothner <per@bothner.com>
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.
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.
3611 * jcf-parse.c (load_class): Sanity test if missing inner class file.
3613 2004-09-29 Per Bothner <per@bothner.com>
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.
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.
3628 2004-09-29 Andrew Haley <aph@redhat.com>
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.
3637 2004-09-28 Tom Tromey <tromey@redhat.com>
3640 * class.c (add_miranda_methods): Load superinterface if not
3643 2004-09-28 Andrew Haley <aph@redhat.com>
3646 * jcf-parse.c (load_class): Don't try to read a class that we've
3649 2004-09-28 Andrew Haley <aph@redhat.com>
3651 * jcf-parse.c (load_class): Back out previous broken patch.
3653 2004-09-28 Andrew Haley <aph@redhat.com>
3656 * jcf-parse.c (load_class): Don't try to read a class that we've
3658 Check that we really did read the right class.
3660 2004-09-25 Tom Tromey <tromey@redhat.com>
3663 * parse.y (create_artificial_method): Use add_method_1.
3665 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
3667 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3669 * gcj.texi: Fix typos.
3671 2004-09-24 Tom Tromey <tromey@redhat.com>
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
3679 2004-09-24 Tom Tromey <tromey@redhat.com>
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.
3687 2004-09-23 Andrew Haley <aph@redhat.com>
3690 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
3693 2004-09-23 Tom Tromey <tromey@redhat.com>
3696 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
3697 where operand is null.
3699 2004-09-23 Tom Tromey <tromey@redhat.com>
3702 * parse.y (not_accessible_p): Allow access to protected members
3703 even when class is not static.
3705 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
3707 * Make-lang.in: Revert the gcc-none.o change.
3709 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3711 * parse.y (patch_anonymous_class): VEC_space returns true if there
3714 2004-09-21 Matt Austern <austern@apple.com>
3717 * gjavah.c (free_method_name_list): Fix function definition so
3718 it's a proper C prototype.
3720 2004-09-21 Tom Tromey <tromey@redhat.com>
3723 * gjavah.c (free_method_name_list): New method.
3726 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3727 Zack Weinberg <zack@codesourcery.com>
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.
3734 2004-09-13 Tom Tromey <tromey@redhat.com>
3737 * class.c (layout_class_method): Put synthetic methods into the
3740 2004-09-11 Andrew Pinski <apinski@apple.com>
3742 * Make-lang.in (java/ggc-none.c): Change dependency
3743 for ggc.h into $(GGC_H).
3745 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
3747 * Make-lang.in (java/win32-host.o): Add dependency on
3749 * win32-host.c: Add includes for coretypes.h, jcf.h
3751 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
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.
3758 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
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.
3780 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3782 * decl.c (java_init_decl_processing): Adjust
3783 initialize_sizetypes call.
3785 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
3787 * jv-scan.c (fancy_abort): Add.
3789 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
3791 * expr.c (build_java_arrayaccess): Use convert to change
3794 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
3796 * class.c (make_local_function_alias): Allocate extra space for 'L'
3797 in name buffer. Reported by Thomas Neumann.
3799 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
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.
3806 2004-08-18 Andrew Pinski <apinski@apple.com>
3808 * class.c (make_local_function_alias): Only make a new decl if we
3809 support alias attribute on all decls.
3811 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
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.
3821 2004-08-18 Richard Henderson <rth@redhat.com>
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.
3827 2004-08-17 Andrew Haley <aph@redhat.com>
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):
3837 * expr.c (pop_type_0): Likewise.
3839 * java-tree.h (lang_printable_name_wls): Delete.
3841 2004-08-16 Tom Tromey <tromey@redhat.com>
3844 * parse.y (primary): Changed for initialized and uninitialized
3846 (array_access): Handle array_creation_initialized.
3847 (array_creation_expression): Split into
3848 array_creation_initialized and array_creation_uninitialized.
3850 2004-08-16 Andrew Haley <aph@redhat.com>
3852 * jcf-write.c (find_constant_index): Canonicalize NaNs when
3853 generating bytecode.
3855 2004-08-16 Elliot Lee <sopwith@redhat.com>
3858 * jcf-parse.c (java_parse_file): Handle filenames with embedded
3859 spaces, and quoted filelists.
3861 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
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.
3883 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
3885 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
3886 Don't create BLOCK here or call java_gimplify_block.
3888 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
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
3895 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
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
3906 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
3909 * Make-lang.in (java.install-man): Install from either build
3910 tree or source tree, whichever has the file first.
3912 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
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.
3919 2004-08-04 Roger Sayle <roger@eyesopen.com>
3920 Andrew Haley <aph@redhat.com>
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.
3927 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
3930 * parse.y (fold_constant_for_init): Call resolve_field_access with
3931 correct current_class context.
3933 2004-08-01 Roger Sayle <roger@eyesopen.com>
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.
3954 2004-07-28 Eric Christopher <echristo@redhat.com>
3956 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3957 (java_unsafe_for_reeval): Ditto.
3959 2004-07-26 <hp@bitrange.com>
3961 * parse.y (build_super_invocation): Adjust declaration order to
3962 avoid declaration after statement.
3964 2004-07-25 Bernardo Innocenti <bernie@develer.com>
3966 * decl.c: Rename all identifiers named `class' to `cl'.
3968 2004-07-25 Richard Henderson <rth@redhat.com>
3970 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3972 2004-07-23 Mike Stump <mrs@apple.com>
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.
3990 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
3992 * Make-lang.in: Replace rmic and rmiregistry references with
3993 grmic and grmiregistry.
3994 * gcj.texi: Likewise.
3996 2004-07-20 Andrew Haley <aph@redhat.com>
3999 * verify.c (verify_jvm_instructions): Comment change only.
4001 * typeck.c (build_java_array_type): Add size field to array name.
4003 * java-tree.h (LOCAL_SLOT_P): New.
4004 (update_aliases): Add PC argument.
4005 (pushdecl_function_level): New function.
4007 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4008 MODIFY_EXPR, and SAVE_EXPR.
4009 (java_gimplify_modify_expr): New function.
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.
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.
4034 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
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
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
4051 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4053 2004-07-18 Roger Sayle <roger@eyesopen.com>
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):
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.
4070 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4072 * java-tree.h (builtin_function): Declare.
4074 2004-07-16 Steven Bosscher <stevenb@suse.de>
4076 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4077 abuse restore_line_number_status.
4079 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
4082 * jcf-parse.c (java_emit_static_constructor): Specify default
4085 2004-07-13 Per Bothner <per@bothner.com>
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.
4094 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
4097 gjavah.c (print_field_info): Emit constant only if field is static.
4099 2004-07-11 Roger Sayle <roger@eyesopen.com>
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.
4119 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
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.
4129 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
4131 * class.c (common_enclosing_context_p): Remove statement with no
4134 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
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
4150 (build_incomplete_class_ref): Update for new create_anonymous_class
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.
4164 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
4166 * class.c (interface_of_p): Check for null TYPE_BINFO.
4168 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
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.
4174 2004-07-08 Richard Henderson <rth@redhat.com>
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.
4181 2004-07-07 Per Bothner <per@bothner.com>
4183 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
4184 get internal error due to mismatched types.
4186 * gcj.texi (Invoking gij): Document new -verbose:class flag.
4188 * gcj.texi (Linking): New node. Document -lgij usage.
4190 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
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.
4209 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
4211 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4212 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4214 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
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.
4220 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
4222 * verify.c: Correct array element access formatting thinko.
4224 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
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
4230 Minor formatting fixes all over the place.
4232 2004-07-02 Richard Henderson <rth@redhat.com>
4234 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4236 2004-07-01 Richard Henderson <rth@redhat.com>
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.
4252 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
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.
4265 2004-06-29 Andrew Haley <aph@redhat.com>
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.
4283 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
4285 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4287 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
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
4298 * verify.c (verify_jvm_instructions): Document parameters, insert
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
4308 (find_method_in_interfaces): Likewise.
4309 * zextract.c (makelong): Fix method name indentation.
4311 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4314 * parse.y (create_interface): Set correct access modifiers for
4316 * jcf-write.c (get_classfile_modifiers): New function.
4317 (generate_classfile): Use get_classfile_modifiers, not
4320 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4322 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4323 dependency to current parser context, not NULL_TREE, for top-level
4325 (jdep_resolve_class): Enable member access check for all inner
4328 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4330 * parse.y (qualify_and_find): Pass type decl, not identifier, to
4333 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4336 * expr.c (expand_java_field_op): Ensure that target class for static
4337 field access has been loaded.
4339 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
4340 Ranjit Mathew <rmathew@hotmail.com>
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.
4351 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
4353 * parse.y (java_layout_seen_class_methods): Don't call load_class
4354 on class defined by source parser.
4356 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
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.
4362 2004-06-22 Andrew Haley <aph@redhat.com>
4363 Ranjit Mathew <rmathew@hotmail.com>
4365 Fixes PR java/16113.
4366 * decl.c (force_poplevels): Remove call to expand_end_bindings.
4368 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
4370 * parse.y (create_class): Correct diagnostic message about
4371 java.lang.Object extending anything else.
4373 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
4386 2004-06-21 Andrew Haley <aph@redhat.com>
4388 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4391 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4393 * jcf.h (struct JCF): Change java_source, right_zip and finished
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.
4399 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
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.
4410 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
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.
4417 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
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.
4425 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
4427 * gjavah.c: Include version.h
4429 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
4431 * jcf-write.c (generate_bytecode_conditional): Correct handling
4432 of unordered conditionals. Add comment.
4434 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
4435 Per Bothner <per@bothner.com>
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
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.
4449 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4451 * jcf-write.c (generate_bytecode_conditional): Handle binops
4452 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4454 (generate_bytecode_insns): Likewise.
4456 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4458 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4459 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4461 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
4463 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4464 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4466 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
4468 * decl.c (struct binding_level): Add GTY marker. Compile
4469 binding_depth unconditionally.
4470 (current_binding_level, free_binding_level, global_binding_level):
4472 (clear_binding_level): Unconditionally set binding_depth.
4473 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4475 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
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'.
4481 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
4483 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4485 2004-05-21 Mark Wielaard <mark@klomp.org>
4487 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4490 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
4492 * typeck.c: Remove non-printable character 160.
4494 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
4496 * check-init.c: Correct minor typos.
4498 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4500 * Make-lang.in, expr.c, java-gimplify.c: Rename
4501 tree-simple.[ch] to tree-gimple.[ch].
4503 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
4505 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4507 2004-05-13 Diego Novillo <dnovillo@redhat.com>
4509 Merge from tree-ssa-20020619-branch. See
4510 ChangeLog.tree-ssa for details.
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.
4518 2004-05-10 Andrew Haley <aph@redhat.com>
4520 * parse.y (create_class): Set TYPE_VFIELD.
4521 * decl.c (java_init_decl_processing): Likewise.
4523 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4524 * class.c (make_method_value): Replace DECL_VINDEX with call to
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.
4534 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
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.
4548 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
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
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().
4565 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
4568 * gjavah.c (struct method_name): Add member is_native.
4569 (overloaded_jni_method_exists_p): Match candidate method only if
4571 (print_method_info): Initialise is_native flag from the method's
4574 2004-04-30 Roger Sayle <roger@eyesopen.com>
4576 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4577 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4579 2004-04-22 Roger Sayle <roger@eyesopen.com>
4581 * resource.c (write_resource_constructor): Guard call to possibly
4582 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4584 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
4586 * class.c (make_class_data): Add new field aux_info.
4587 * decl.c (java_init_decl_processing): Push type and decl for
4590 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
4592 * expr.c (expand_java_NEW): Don't use size argument for
4593 _Jv_AllocObject calls.
4594 * parse.y (patch_invoke): Likewise.
4596 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
4598 * expr.c (build_invokeinterface): Remove unused variables to
4601 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
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.
4609 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4611 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4613 2004-03-31 Andrew Haley <aph@redhat.com>
4616 * jcf-io.c (opendir_in_zip): Tidy up error handling.
4618 2004-03-30 Zack Weinberg <zack@codesourcery.com>
4620 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4621 form of GTY markers.
4623 2004-03-25 Marcus Meissner <meissner@suse.de>
4626 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4628 2004-03-23 Tom Tromey <tromey@redhat.com>
4631 * jcf-write.c (make_class_file_name): Don't report if mkdir
4634 2004-03-23 Tom Tromey <tromey@redhat.com>
4636 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4638 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
4640 * class.c, gjavah.c, lang.c: Fix comment typos.
4641 * gcj.texi: Fix typos.
4643 2004-03-19 Per Bothner <per@bothner.com>
4645 * gcj.texi (Code Generation): Document new flags and assert defaults.
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.
4665 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
4673 2004-03-16 Per Bothner <per@bothner.com>
4675 * jcf-jump.c (options): New --print-constants option.
4676 * gcj.texi (Invoking jcf-dump): Document --print-constants.
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.
4684 2004-03-15 Andrew Haley <aph@redhat.com>
4687 * parse.y (java_complete_lhs): Check that final variable has an
4690 2004-03-12 Andrew Haley <aph@redhat.com>
4693 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
4696 2004-02-29 Roger Sayle <roger@eyesopen.com>
4698 * jcf-parse.c (java_parse_file): Handle the case that input_filename
4701 2004-02-27 Per Bothner <per@bothner.com>
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.
4707 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
4709 * java/parse.h: Update copyright.
4711 2004-02-26 Andrew Haley <aph@redhat.com>
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.
4719 2004-02-25 Per Bothner <per@bothner.com>
4721 * parse.y (build_assertion): If we're in an inner class, create the
4722 class$ helper routine in the outer class.
4724 2004-02-19 Richard Henderson <rth@redhat.com>
4726 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
4728 2004-02-16 Geoffrey Keating <geoffk@apple.com>
4730 * Make-lang.in (java.install-man): Add extra dependencies.
4732 2004-02-13 Geoffrey Keating <geoffk@apple.com>
4734 * Make-lang.in: Install man pages under the same names
4735 (possibly transformed) as the program they document.
4737 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
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
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
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.
4767 2004-02-08 Per Bothner <per@bothner.com>
4769 * parse.y (resolve_qualified_expression_name): In case of inaccessible
4770 class don't use not_accessible_field_error, which can get confused.
4772 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
4774 Make-lang.in (po-generated): Delete.
4776 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
4778 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
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.
4790 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
4792 * typeck.c: Update copyright.
4794 2004-02-02 Tom Tromey <tromey@redhat.com>
4796 * decl.c (java_init_decl_processing): Remove duplicate
4799 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
4801 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
4803 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
4805 * expr.c (build_field_ref): Move variable
4808 2004-01-28 Andrew Haley <aph@redhat.com>
4810 * expr.c (build_field_ref): Widen field offset.
4812 2004-01-27 Andrew Haley <aph@redhat.com>
4815 * parse.y (check_interface_throws_clauses): Make sure class_decl
4818 2004-01-22 Jeff Sturm <jsturm@one-point.com>
4821 * parse.y (patch_assignment): Don't modify lhs_type for
4822 reference assignments.
4824 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
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.
4830 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
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.
4836 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
4838 * typeck.c (find_method_in_interfaces): Move variable
4841 2004-01-16 Andrew Haley <aph@redhat.com>
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.
4850 * jcf-parse.c (read_class): Save and restore output_class.
4851 * decl.c (java_expand_body): Set output_class from fndecl.
4853 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
4855 * class.c (gen_indirect_dispatch_tables): Fix string length
4858 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
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).
4866 2004-01-14 Jan Hubicka <jh@suse.cz>
4868 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
4871 2004-01-09 Mark Mitchell <mark@codesourcery.com>
4873 * java-tree.h (java_expand_expr): Change prototype.
4874 * expr.c (java_expand_expr): Add alt_rtl parameter.
4876 2004-01-09 Andrew Haley <aph@redhat.com>
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.
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.
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
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.
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
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
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
4938 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
4940 * parse.y (catch_clause_parameter): Fix typo.
4943 * parse.y: (catch_clause_parameter): Return early if $3, aka
4944 formal_parameter, is null.
4946 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
4948 * class.c: Remove uses of "register" specifier in
4949 declarations of arguments and local variables.
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.
4962 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
4964 * Make-lang.in (GCJ_CROSS_NAME): Delete.
4965 (java.install_common, java.install-man): Adjust for above.
4966 (java.uninstall): Likewise.
4968 2003-12-03 Michael Koch <konqueror@gmx.de>
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'.
4975 2003-12-03 Zack Weinberg <zack@codesourcery.com>
4977 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4980 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
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
4990 2003-12-01 Jeff Sturm <jsturm@one-point.com>
4993 * parse.y (java_complete_lhs): Save location prior to patching
4996 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
4999 * resource.c (write_resource_constructor): Append
5000 "_resource" to constructor identifier name.
5002 2003-11-25 Jeff Sturm <jsturm@one-point.com>
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.
5019 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
5021 * Make-lang.in: (java.install-common) Add
5022 symlink for $(target_noncanonical)-gcjh for
5025 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5027 * Make-lang.in (java.extraclean): Delete.
5029 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
5031 * Make-lang.in (check-java): Add.
5033 2003-11-19 Jeff Sturm <jsturm@one-point.com>
5036 * except.c (prepare_eh_table_type): Allocate variable-sized
5037 buffer `buf' with alloca.
5039 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5043 decl.c (java_init_decl_processing): Don't initialize
5044 class_not_found_type_node, no_class_def_found_type_node.
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):
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
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.
5065 2003-11-17 Jeff Sturm <jsturm@one-point.com>
5068 * java-tree.h (BLOCK_EMPTY_P): Define.
5069 * parse.y (java_complete_lhs): Check for empty blocks
5070 in TRY_FINALLY_EXPR case.
5072 2003-11-17 Andrew Haley <aph@redhat.com>
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
5080 2003-11-16 Jason Merrill <jason@redhat.com>
5082 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5083 and TAGS files that include them for each front end.
5085 2003-11-15 Tom Tromey <tromey@redhat.com>
5087 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5089 2003-11-12 Jason Merrill <jason@redhat.com>
5091 PR optimization/12547
5092 * lang.c (java_tree_inlining_walk_subtrees): Just walk
5093 BLOCK_EXPR_BODY directly.
5095 2003-11-12 Andrew Haley <aph@redhat.com>
5098 * parse.y (fold_constant_for_init): Check that we really do have a
5102 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5103 init_test_decls being inlined.
5106 * parse.y (do_resolve_class): Check return value from
5107 breakdown_qualified().
5109 2003-11-11 Tom Tromey <tromey@redhat.com>
5112 * parse.y (merge_string_cste): Handle case where we have a
5113 pointer that happens to be zero, not null_pointer_node.
5115 2003-11-10 Tom Tromey <tromey@redhat.com>
5117 * jcf-parse.c (classify_zip_file): Correctly compare
5118 filename_length against length of manifest file's name.
5120 2003-11-08 Tom Tromey <tromey@redhat.com>
5123 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5125 2003-11-06 Andrew Haley <aph@redhat.com>
5127 * expr.c (java_stack_swap): Make sure destination stack slots are
5128 of the correct type.
5130 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
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.
5145 (jv-scan.1): Delete.
5146 (jcf-dump.1): Delete.
5148 (jv-convert.1): Delete.
5150 (rmiregistry.1): Delete.
5152 2003-11-02 Jeff Sturm <jsturm@one-point.com>
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.
5159 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
5161 * .cvsignore: Delete.
5163 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
5165 * verify.c (verify_jvm_instructions): Don't warn about legal
5166 eh binding regions generated for example by jdk 1.4.1.
5168 2003-10-24 David S. Miller <davem@redhat.com>
5170 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5172 2003-10-22 Andrew Haley <aph@redhat.com>
5174 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5175 (java_get_callee_fndecl): New.
5177 * jcf-parse.c (java_parse_file): Call emit_catch_table().
5179 * java-tree.h (ctable_decl): New.
5180 (catch_classes): New.
5181 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5183 * decl.c (java_init_decl_processing): Add catch_class_type.
5185 Add catch_classes field.
5187 * class.c (build_indirect_class_ref): Break out from
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.
5195 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5197 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5199 * jcf-write.c: Follow spelling conventions.
5200 * parse.y: Likewise.
5202 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
5204 * ChangeLog: Fix typos.
5205 * expr.c: Fix comment typos.
5206 * jcf-write.c: Likewise.
5209 * mangle.c: Likewise.
5210 * parse-scan.y: Likewise.
5211 * parse.y: Likewise.
5213 2003-10-22 Tom Tromey <tromey@redhat.com>
5215 * expr.c (expand_byte_code): Only warn about dead bytecode when
5216 extra_warnings is set.
5218 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
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
5225 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
5227 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5228 (generate-manpages): Likewise.
5229 (java.maintainer-clean): Likewise.
5230 (gcj.info): Likewise.
5233 (jv-scan.1): Likewise.
5234 (jcf-dump.1): Likewise.
5236 (jv-convert.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.
5244 2003-10-20 Mark Mitchell <mark@codesourcery.com>
5246 * Make-lang.in (info): Update dependencies.
5247 (java.install-info): Remove.
5248 ($(srcdir)/java/gcj.info): Replace with ...
5249 ($(docobjdir)/gcj.info): ... this.
5251 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
5253 * Make-lang.in: Replace uses of $(target_alias) with
5254 $(target_noncanonical).
5256 2003-10-09 Tom Tromey <tromey@redhat.com>
5258 * decl.c (java_init_decl_processing): Declare signers field.
5259 * class.c (make_class_data): Set signers field.
5261 2003-10-09 Jason Merrill <jason@redhat.com>
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
5267 2003-10-06 Mark Mitchell <mark@codesourcery.com>
5269 * Make-lang.in (java.info): Replace with ...
5271 (java.dvi): Replace with ...
5273 (java.generated-manpages): Replace with ...
5275 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
5277 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5279 2003-10-01 Andrew Haley <aph@redhat.com>
5281 * jcf-parse.c (java_parse_file): Write otable and atable.
5282 * java-tree.h (atable_methods): 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.
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.
5305 2003-09-30 Roger Sayle <roger@eyesopen.com>
5307 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5308 semantics for SAVE_EXPR, by caching the result in a temporary.
5310 2003-09-28 Richard Henderson <rth@redhat.com>
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.
5320 2003-09-28 Roger Sayle <roger@eyesopen.com>
5322 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5323 with void-type branches instead of using a COMPOUND_EXPR.
5325 2003-09-28 Jeff Sturm <jsturm@one-point.com>
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.
5333 2003-09-27 Roger Sayle <roger@eyesopen.com>
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.
5341 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
5342 Bryce McKinlay <bryce@mckinlay.net.nz>
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.
5351 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5353 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5355 2003-09-23 Roger Sayle <roger@eyesopen.com>
5357 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5358 with equal operands without side-effects.
5360 2003-09-22 Jeff Sturm <jsturm@one-point.com>
5362 * decl.c (java_init_decl_processing): Don't emit otable decls
5363 if flag_indirect_dispatch is not set.
5365 2003-09-21 Richard Henderson <rth@redhat.com>
5367 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5370 2003-09-21 Richard Henderson <rth@redhat.com>
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.
5375 2003-09-20 Richard Henderson <rth@redhat.com>
5377 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5379 2003-09-18 Roger Sayle <roger@eyesopen.com>
5381 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5382 * check-init.c (check_init): Likewise.
5384 2003-09-18 Roger Sayle <roger@eyesopen.com>
5386 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5388 2003-09-16 Andrew Haley <aph@redhat.com>
5390 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5392 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
5395 * mangle.c (find_compression_record_match): Skip
5396 over a "6JArray" (the array template mangled string)
5398 (mangle_array_type): Correct minor typo.
5399 (atms): Move definition to the beginning.
5401 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
5403 * class.c (add_miranda_methods): Ensure super-interfaces are laid
5404 out. Fix for PR java/12254.
5406 2003-09-11 Richard Henderson <rth@redhat.com>
5408 * parse.y (source_end_java_method): Update for new
5409 cgraph_finalize_function argument.
5411 2003-09-09 Richard Henderson <rth@redhat.com>
5413 * parse.y (source_end_java_method): Update call to
5414 cgraph_finalize_function.
5416 2003-09-03 Jeff Sturm <jsturm@one-point.com>
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.
5445 2003-09-03 Roger Sayle <roger@eyesopen.com>
5447 * builtins.c (enum builtin_type): Delete unused enumeration.
5448 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5450 2003-08-28 Tom Tromey <tromey@redhat.com>
5452 * gcj.texi (Extensions): Document gcjlib URLs.
5454 2003-08-20 Tom Tromey <tromey@redhat.com>
5456 * gcj.texi (Extensions): Added xref.
5457 (libgcj Runtime Properties): Document
5458 gnu.gcj.runtime.VMClassLoader.library_control.
5460 2003-08-20 Andrew Haley <aph@redhat.com>
5462 * except.c (prepare_eh_table_type): Use new encoding for exception
5463 handlers when using -fno-assume-compiled.
5465 2003-08-13 Tom Tromey <tromey@redhat.com>
5467 * gcj.texi (Invoking gij): Document -X and -?.
5469 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
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
5476 2003-08-11 Tom Tromey <tromey@redhat.com>
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
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.
5503 2003-08-05 Tom Tromey <tromey@redhat.com>
5505 Fix for PR java/11600:
5506 * parse.y (java_complete_lhs): See whether we're calling a method
5508 (check_thrown_exceptions): Added `is_array_call' argument;
5509 fixed `clone' checking; updated all callers.
5511 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
5513 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5515 2003-08-03 Tom Tromey <tromey@redhat.com>
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
5521 (add_method_1): Can't have a transient method.
5523 2003-07-28 Andreas Jaeger <aj@suse.de>
5525 * jvspec.c: Convert to ISO C90 prototypes.
5527 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
5529 * decl.c (force_poplevels): Fix warning call.
5531 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
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.
5543 2003-07-24 Jason Merrill <jason@redhat.com>
5545 * java-tree.h: Move boolean_type_node et al to the back end.
5547 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5549 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5552 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
5554 * lang.opt: Don't show -MD_ and -MDD_.
5556 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
5558 * lang-options.h: Remove.
5559 * lang.opt: Add help text.
5561 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
5563 * expr.c: Remove the last argument to expand_assignment().
5565 2003-07-09 Jan Hubicka <jh@suse.cz>
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.
5574 2003-07-08 Mark Wielaard <mark@klomp.org>
5576 * gcj.texi: CNI now expands to Compiled Native Interface.
5578 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5580 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5582 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
5584 * expr.c (expand_byte_code): Adjist emit_line_note call.
5586 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
5588 * lang.c (java_handle_option): Don't handle filenames.
5590 2003-07-02 Zack Weinberg <zack@codesourcery.com>
5592 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5595 * jcf-write.c: Don't default-define DIR_SEPARATOR.
5596 * jcf.h: Delete COMPARE_FILENAMES definition.
5598 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
5600 * lang.c (java_init_options): Update prototype.
5602 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
5604 * decl.c (poplevel): Adjust define_label call.
5606 2003-06-27 Zack Weinberg <zack@codesourcery.com>
5608 * gjavah.c (flag_jni): Make non-static.
5609 * parse-scan.y (ctxp): Make non-static.
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.
5616 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
5618 * lang.c (java_handle_option): Don't check for missing arguments.
5620 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
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.
5629 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
5631 * lang.c (java_handle_option): Likewise.
5633 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
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.
5639 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
5641 * lang.opt: Declare Java.
5642 * lang.c (java_init_options): Update.
5644 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
5646 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5648 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
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.
5654 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
5656 * class.c (emit_register_classes): Adjust init_function_start
5658 * decl.c (complete_start_java_method): Likewise.
5659 * resource.c (write_resource_constructor): Likewise.
5661 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
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.
5668 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
5670 * Make-lang.in: Handle mostlyclean.
5672 2003-06-11 Tom Tromey <tromey@redhat.com>
5674 * lang.c (java_handle_option): Update dependency_tracking for
5677 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5680 2003-06-10 Andrew Haley <aph@redhat.com>
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
5686 2003-06-10 Andrew Haley <aph@redhat.com>
5688 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
5689 (java_decl_ok_for_sibcall): New.
5691 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
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.
5709 * resource.c (compile_resource_data, compile_resource_file): Constify.
5711 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
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.
5721 2003-06-08 Tom Tromey <tromey@redhat.com>
5723 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
5724 fno-assume-compiled.
5726 2003-06-08 Roger Sayle <roger@eyesopen.com>
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.
5736 2003-06-08 Anthony Green <green@redhat.com>
5738 * parse.y (patch_cast): Fix conversions from floating-point to
5741 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
5743 * Make-lang.in: Update.
5744 * lang.c: Include opts.h. Define cl_options_count and cl_options.
5746 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
5748 * lang.c (java_init_options): Update.
5750 2003-06-05 Jan Hubicka <jh@suse.cz>
5752 * Make-lang.in: Add support for stageprofile and stagefeedback
5754 2003-05-31 Roger Sayle <roger@eyesopen.com>
5756 * lang.c (java_init_options): Prescribe wrap-around two's
5757 complement arithmetic overflow by setting flag_wrapv.
5759 2003-05-29 Roger Sayle <roger@eyesopen.com>
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,
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.
5777 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
5779 * win32-host.c: Normalize copyright boilerplate.
5781 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
5787 2003-05-13 Zack Weinberg <zack@codesourcery.com>
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.
5793 2003-05-13 Richard Henderson <rth@redhat.com>
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.
5801 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
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.
5807 2003-05-02 Tom Tromey <tromey@redhat.com>
5810 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
5811 (handle_inner_classes): New function.
5813 2003-05-01 Tom Tromey <tromey@redhat.com>
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.
5820 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
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.
5828 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
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.
5852 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
5854 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
5855 '/' when computing java source filename
5857 2003-04-13 Tom Tromey <tromey@redhat.com>
5859 * gjavah.c (print_c_decl): Indentation fix.
5861 2003-04-12 Zack Weinberg <zack@codesourcery.com>
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.
5870 2003-04-10 Eric Blake <ebb9@email.byu.edu>
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.
5877 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
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()
5888 2003-04-10 Andrew Haley <aph@redhat.com>
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.
5897 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
5899 * gcj.texi: Remove @ at start of file.
5901 2003-03-25 Tom Tromey <tromey@redhat.com>
5903 * parse.y (create_interface): Call CHECK_DEPRECATED.
5905 2003-03-23 Zack Weinberg <zack@codesourcery.com>
5907 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
5909 2003-03-21 Zack Weinberg <zack@codesourcery.com>
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.
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.
5924 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
5925 finite floating point numbers for output; special case
5928 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
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.
5933 2003-03-19 Tom Tromey <tromey@redhat.com>
5935 * lex.c (do_java_lex): Renamed from java_lex.
5936 (java_lex): New function.
5939 2003-03-13 Tom Tromey <tromey@redhat.com>
5941 * parse.y (resolve_inner_class): Error if qualifier is a primitive
5944 2003-03-04 Andrew Haley <aph@redhat.com>
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
5949 (process_file): Set is_first_data_member.
5951 2003-03-11 Tom Tromey <tromey@redhat.com>
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.
5958 2003-03-11 Andrew Haley <aph@redhat.com>
5960 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5963 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
5965 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5966 and DIR_SEPARATOR_2 for a target.
5967 Correct minor typos.
5969 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5970 and DIR_SEPARATOR_2 for a target into account.
5972 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
5974 * lang.c (java_init): Update prototype, move code to java_post_options.
5975 (java_post_options): Similarly.
5977 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
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.
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
5987 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5988 comparing directly against DIR_SEPARATOR.
5990 2003-03-04 Tom Tromey <tromey@redhat.com>
5992 * Make-lang.in (java.tags): New target.
5994 2003-03-01 Roger Sayle <roger@eyesopen.com>
5996 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5997 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5999 2003-03-01 Tom Tromey <tromey@redhat.com>
6001 * parse.y (jdep_resolve_class): Only check deprecation if we found
6004 2003-02-28 Tom Tromey <tromey@redhat.com>
6007 * class.c (maybe_layout_super_class): Always pass a WFL to
6009 * parse.y (do_resolve_class): Updated comment to explain
6012 2003-02-26 Tom Tromey <tromey@redhat.com>
6014 * jcf-write.c (generate_classfile): Check whether class is
6015 deprecated before writing attribute count.
6017 2003-02-25 Roger Sayle <roger@eyesopen.com>
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.
6022 2003-02-23 Tom Tromey <tromey@redhat.com>
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
6043 (patch_method_invocation): Also check the particular constructor
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
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.
6055 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
6057 Change base class access representation.
6058 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6059 (add_interface_do): Likewise.
6061 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
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.
6071 2003-02-08 Roger Sayle <roger@eyesopen.com>
6073 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6074 instead of basename to avoid compiler warnings on Tru64.
6076 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
6078 * gcj.texi: Update to GFDL 1.2.
6080 2003-01-31 Andrew Haley <aph@redhat.com>
6082 * parse.y (java_expand_classes): Scan the whole class list looking
6083 for access methods that haven't yet been expanded.
6085 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
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.
6093 2003-01-31 Mark Wielaard <mark@klomp.org>
6095 * gjavah.c (throwable_p): Allocate 1 more byte for string.
6097 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
6099 * class.c (make_class): Use BINFO_ELTS.
6100 (set_super_info): Likewse.
6101 (add_interface_do): Likewise.
6103 2003-01-30 Tom Tromey <tromey@redhat.com>
6105 * jcf-parse.c (read_class): Update identifier's class value if it
6106 changed during parsing.
6108 2003-01-30 Loren James Rittle <ljrittle@acm.org>
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 .
6115 2003-01-29 Tom Tromey <tromey@redhat.com>
6117 * parse.y (patch_assignment): Only transform the rhs of an
6118 assignment when compiling to native.
6120 2003-01-28 Tom Tromey <tromey@redhat.com>
6122 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6124 2003-01-28 Tom Tromey <tromey@redhat.com>
6126 * lex.c (java_lex): Don't include UEOF as part of token.
6127 (java_read_unicode): Error if \u sequence prematurely terminated.
6129 2003-01-27 Tom Tromey <tromey@redhat.com>
6131 * parse.y (java_check_regular_methods): Check for construct after
6132 checking types in throws clause.
6134 2003-01-24 Tom Tromey <tromey@redhat.com>
6136 * class.c (build_static_field_ref): Only a String or numeric field
6137 can fold to a constant.
6139 2003-01-23 Tom Tromey <tromey@redhat.com>
6141 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6142 file name in resource buffer.
6144 2003-01-23 Tom Tromey <tromey@redhat.com>
6146 * expr.c (build_known_method_ref): Use method's context to find
6149 2003-01-23 Tom Tromey <tromey@redhat.com>
6151 * constants.c (set_constant_entry): Allocated cleared memory.
6153 2003-01-22 Tom Tromey <tromey@redhat.com>
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
6160 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
6162 * jcf-parse.c (process_zip_dir): Remove unused variable.
6164 2003-01-22 Tom Tromey <tromey@redhat.com>
6166 * expr.c (build_invokeinterface): Abort if method's context is not
6169 2003-01-22 Tom Tromey <tromey@redhat.com>
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.
6192 2003-01-21 Tom Tromey <tromey@redhat.com>
6194 * class.c (supers_all_compiled): New function.
6195 (make_class_data): Use it.
6197 2003-01-21 Tom Tromey <tromey@redhat.com>
6199 * parse.y (method_header): Native method can't be strictfp.
6200 No method can be transient or volatile.
6202 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6204 Make-lang.in (jvspec.o-warn): Add -Wno-error.
6206 2003-01-18 Kazu Hirata <kazu@cs.umass.edu>
6208 * check-init.c: Fix comment typos.
6209 * class.c: Likewise.
6210 * constants.c: Likewise.
6212 * except.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.
6222 * mangle.c: Likewise.
6223 * typeck.c: Likewise.
6224 * verify.c: Likewise.
6226 2003-01-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6228 * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6229 * jcf-write.c: Include "tm_p.h".
6231 2003-01-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6233 * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6235 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6237 * builtins.c (java_build_function_call_expr): Renamed from
6238 build_function_call_expr. All callers changed.
6240 * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6241 * jcf-parse.c: Include tm_p.h.
6243 * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6246 2003-01-14 Tom Tromey <tromey@redhat.com>
6248 * class.c (make_class_data): Check that super is compiled before
6249 building class reference to it.
6251 2003-01-14 Andrew Haley <aph@redhat.com>
6253 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6254 varargs function -- correct.
6256 2003-01-14 Andrew Haley <aph@redhat.com>
6258 * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6260 2003-01-14 Andrew Haley <aph@redhat.com>
6262 * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6263 varargs function -- correct.
6265 * parse.y (patch_assignment): Copy the rhs of an assignment into a
6266 temporary if the RHS is a reference.
6268 2003-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6270 * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6271 * keyword.h: Regenerated.
6273 * All Files: Convert to ISO C style function definitions.
6275 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
6277 * parse.y (check_pkg_class_access): ANSIfy definition.
6279 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6281 * decl.c, parse-scan.y, parse.y: Don't cast return value of
6284 * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6286 2003-01-09 Geoffrey Keating <geoffk@apple.com>
6288 Merge from pch-branch:
6290 2002-12-02 Geoffrey Keating <geoffk@apple.com>
6292 * Make-lang.in (java/gjavah.o): Update dependencies.
6293 * gjavah.c: Include ggc.h.
6295 2002-08-16 Geoffrey Keating <geoffk@redhat.com>
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.
6305 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
6307 * jcf.h (union cpool_entry): New.
6308 (struct CPool): Use gengtype to mark. Change field 'data' to be
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
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.
6346 2002-08-08 Geoffrey Keating <geoffk@redhat.com>
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.
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.
6360 2003-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6362 * All Files: Remove PARAMS macro.
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
6368 * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6371 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
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".
6379 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
6381 * java-tree.h: Protect against multiple inclusion.
6383 2003-01-07 Tom Tromey <tromey@redhat.com>
6385 * class.c (add_assume_compiled): Don't adjust parent if we're
6386 already at the root of tree.
6388 2003-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6390 * lang.c (dump_compound_expr): Prototype.
6392 2003-01-03 Tom Tromey <tromey@redhat.com>
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'.
6398 2003-01-03 Tom Tromey <tromey@redhat.com>
6400 * gcj.texi (Standard Properties): Document http.proxyHost and
6403 * gcj.texi (GNU Classpath Properties): Document new properties.
6405 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
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.
6411 2003-01-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
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.
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".
6436 2002-12-30 DJ Delorie <dj@redhat.com>
6438 * Make-lang.in: Protect against texi2pod/pod2man failing.
6440 2002-12-28 Joseph S. Myers <jsm@polyomino.org.uk>
6442 * gcj.texi: Use @copying.
6444 2002-12-27 Mark Mitchell <mark@codesourcery.com>
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
6451 (process_file): Adjust calls to print_cxx_classname.
6453 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
6455 * gcj.texi: Include Cover Texts in man page.
6457 2002-12-23 Jeff Sturm <jsturm@one-point.com>
6459 * class.c (build_static_field_ref): Check FIELD_FINAL.
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.
6468 * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6469 not build_internal_class_name.
6471 * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6472 Use it when class ref isn't certain to be compiled.
6474 2002-12-23 Joseph S. Myers <jsm@polyomino.org.uk>
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.
6480 2002-12-22 Anthony Green <green@redhat.com>
6482 * gcj.texi (Limitations): Add note about org.xml.sax and
6485 2002-12-20 Tom Tromey <tromey@redhat.com>
6487 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6488 where minimum case value is Integer.MIN_VALUE.
6491 2002-12-18 Andrew Haley <aph@redhat.com>
6493 * parse.y (patch_invoke): Force evaluation order when `check' is
6494 set. For PR libgcj/8945.
6496 2002-12-16 Mark Mitchell <mark@codesourcery.com>
6498 * gcj.texi: Change version number to 3.4.
6500 2002-12-05 Ranjit Mathew <rmathew@hotmail.com>
6501 Andrew Haley <aph@redhat.com>
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.
6506 2002-12-03 Andrew Haley <aph@redhat.com>
6508 * class.c (make_class_data): New field, "chain".
6509 * decl.c (java_init_decl_processing): Likewise.
6511 2002-12-02 Tom Tromey <tromey@redhat.com>
6514 * parse.y (do_resolve_class): Handle qualified name via
6517 2002-11-30 Zack Weinberg <zack@codesourcery.com>
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.
6527 2002-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6529 * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6531 2002-11-25 Diego Novillo <dnovillo@redhat.com>
6533 * jcf-reader.c: Don't expand JCF_readu4 inside the
6534 expansion of JCF_SKIP.
6536 2002-11-25 Diego Novillo <dnovillo@redhat.com>
6538 * jcf-reader.c: Don't expand JCF_readu4 inside the
6539 expansion of JCF_SKIP.
6541 2002-11-22 Tom Tromey <tromey@redhat.com>
6543 * parse.y (patch_binop): Cast right hand side of shift expression
6544 to `int'. Fixes PR java/8676.
6546 2002-11-22 Ranjit Mathew <rmathew@hotmail.com>
6547 Andrew Haley <aph@redhat.com>
6549 * gcc/java/jcf-write.c (write_classfile): Remove target
6550 class file, if it exists, before renaming the temporary
6553 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
6555 * jvspec.c (lang_specific_spec_functions): New.
6557 2002-11-18 Tom Tromey <tromey@redhat.com>
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.
6574 2002-11-14 Jens-Michael Hoffmann <jensmh@gmx.de>
6576 * buffer.c: Remove unnecessary casts.
6577 * check-init.c: Likewise.
6578 * class.c: Likewise.
6579 * constants.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.
6589 * verify.c: Likewise.
6591 2002-11-06 Tom Tromey <tromey@redhat.com>
6593 * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6596 2002-11-05 Tom Tromey <tromey@redhat.com>
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,
6608 2002-11-02 Tom Tromey <tromey@redhat.com>
6610 * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6612 * class.c (make_method_value): Put class name, not signature, into
6613 `throws' field. For PR java/8415.
6615 2002-10-24 Tom Tromey <tromey@redhat.com>
6617 * gcj.texi (Invoking gij): Document --showversion.
6618 (Standard Properties): java.library.path now set.
6620 2002-10-23 Tom Tromey <tromey@redhat.com>
6622 * gjavah.c (decode_signature_piece): In JNI mode, print
6623 `jobjectArray' when array depth is nonzero.
6626 2002-10-15 Andrew Haley <aph@redhat.com>
6628 * parse.y (patch_invoke): Call force_evaluation_order on a static
6630 (resolve_qualified_expression_name): Call force_evaluation_order
6631 on a arg list that is part of a Qualified Expression Name.
6633 * lang.c (dump_compound_expr): New.
6634 (java_dump_tree): New.
6636 2002-10-20 Ranjit Mathew <rmathew@hotmail.com>
6638 * gcj.texi: Added item describing the GCJ runtime property
6641 2002-10-15 Richard Henderson <rth@redhat.com>
6643 * jcf-parse.c (get_constant): Fix type warning.
6645 2002-10-15 Andrew Haley <aph@redhat.com>
6647 * java-tree.h (java_inlining_merge_static_initializers): Declare.
6648 (java_inlining_map_static_initializers): Declare.
6650 2002-10-14 Andrew Haley <aph@redhat.com>
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.
6661 2002-10-11 Mark Wielaard <mark@klomp.org>
6663 * gcj.texi (Compatibility): Add Limitations and Extensions section.
6665 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6667 * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6669 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6671 * parse.y (merge_string_cste): Add parentheses around & within |.
6673 2002-10-08 Tom Tromey <tromey@redhat.com>
6675 * parse.y (variable_declarator_id): Simplify error path for
6676 array declarator error. For PR java/8003.
6678 2002-10-08 Zack Weinberg <zack@codesourcery.com>
6680 * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6683 2002-10-08 Andrew Haley <aph@redhat.com>
6685 * parse.y (attach_init_test_initialization_flags): Check for
6688 2002-10-07 Anthony Green <green@redhat.com>
6690 * parse.y (merge_string_cste): Fix bug in string concatenation.
6692 2002-10-03 Michael Koch <konqueror@gmx.de>
6694 * gcj.texi (Standard properties):
6695 Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
6697 2002-10-02 Roger Sayle <roger@eyesopen.com>
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.
6704 2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
6706 * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
6707 foul of type-based aliasing.
6709 2002-09-30 Anthony Green <green@redhat.com>
6711 * gcj.texi (Invoking jv-scan): Fix texinfo.
6713 2002-09-28 Anthony Green <green@redhat.com>
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
6728 2002-09-26 Andrew Haley <aph@redhat.com>
6730 * expr.c (build_java_array_length_access): Check for null pointer.
6731 * expr.c (expand_java_arrayload): Likewise.
6733 2002-09-21 Richard Henderson <rth@redhat.com>
6735 * jcf-parse.c (get_constant): Decode from IEEE no matter
6736 what the target format.
6738 2002-09-20 Kazu Hirata <kazu@cs.umass.edu>
6740 * ChangeLog: Follow spelling conventions.
6741 * class.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.
6750 * mangle.c: Likewise.
6751 * parse.y: Likewise.
6753 2002-09-17 Tom Tromey <tromey@redhat.com>
6755 * lex.c (java_read_unicode_collapsing_terminators): Handle case
6756 where \r appears at EOF. Fixes PR java/7950.
6758 2002-09-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6760 * jvspec.c (lang_specific_driver): Remove unused variable.
6762 2002-09-16 Geoffrey Keating <geoffk@apple.com>
6764 * java-tree.h (union lang_tree_node): Add chain_next option.
6766 2002-09-16 Richard Henderson <rth@redhat.com>
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.
6773 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
6775 * lang.c: Follow spelling conventions.
6777 2002-09-11 Per Bothner <per@bothner.com>
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.
6783 * parse.y (fold_constant_for_init): 'null' is not a constant expr.
6785 2002-09-03 Jesse Rosenstock <jmr@ugcs.caltech.edu>
6788 * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
6789 return label if a ret instruction for the jsr has been reached.
6791 2002-09-09 Ranjit Mathew <rmathew@hotmail.com>
6793 * parse.y (DIR_SEPARATOR): Don't define.
6794 (check_class_interface_creation): Use IS_DIR_SEPARATOR.
6796 2002-08-28 Andrew Haley <aph@redhat.com>
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.
6803 2002-09-01 Mark Wielaard <mark@klomp.org>
6805 * gcj.texi: Add chapter about system properties.
6808 2002-08-26 Tom Tromey <tromey@redhat.com>
6810 * parse.y (try_builtin_assignconv): Allow narrowing primitive
6811 conversion if RHS_TYPE is byte, short, or char.
6813 2002-08-22 Tom Tromey <tromey@redhat.com>
6815 * gcj.texi (Invoking gij): Document -cp and -classpath.
6817 2002-08-21 Tom Tromey <tromey@redhat.com>
6819 * Make-lang.in (java/jcf-path.o): Use $(datadir), not
6820 $(prefix)/share. For PR libgcj/7633.
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.
6826 2002-08-16 Tom Tromey <tromey@redhat.com>
6828 * gcj.texi (Class Initialization): Mention class initialization of
6831 2002-07-30 Andrew Haley <aph@cambridge.redhat.com>
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
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
6850 (dump_function): New.
6851 (java_optimize_inline): New.
6852 (dump_function): New.
6854 2002-08-13 Jesse Rosenstock <jmr@fulcrummicro.com>
6857 * parse.y (build_assertion): Invert return from
6858 desiredAssertionStatus.
6860 2002-08-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
6862 * jcf-write.c (get_access_flags): Return correct access flags for
6863 private and protected inner classes.
6865 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
6867 * java/Make-lang.in (java.mostlyclean): Remove coverage files.
6869 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
6871 * mangle_name.c: Don't include obstack.h twice.
6872 * xref.c: Don't include obstack.h.
6874 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
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.
6885 2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
6887 * gcj.texi (version-gcc): Increase to 3.3.
6889 2002-07-22 Tom Tromey <tromey@redhat.com>
6891 * lex.c (java_lex): Check for `e' or `E' after 0.
6893 2002-07-21 Richard Henderson <rth@redhat.com>
6895 * lang.c (java_unsafe_for_reeval): New.
6896 (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
6898 2002-07-21 Neil Booth <neil@daikokuya.co.uk>
6900 * jcf-path.c (GET_ENV_PATH_LIST): Remove.
6901 (jcf_path_init): Use GET_ENVIRONMENT.
6903 2002-07-10 Roger Sayle <roger@eyesopen.com>
6904 Zack Weinberg <zack@codesourcery.com>
6906 * builtins.c (initialize_builtins): Remove defines that
6907 handled C/C++ specific junk hereby removed from builtins.def.
6909 2002-07-07 Neil Booth <neil@daikokuya.co.uk>
6911 * lang.c (java_post_options): Update prototype.
6913 2002-07-05 Roger Sayle <roger@eyesopen.com>
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.
6919 2002-07-01 Tom Tromey <tromey@redhat.com>
6922 * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
6925 2002-07-01 Roger Sayle <roger@eyesopen.com>
6927 * java/decl.c (builtin_function): Accept additional parameter.
6928 (java_init_decl_processing): Pass an additional NULL_TREE
6929 argument to builtin_function.
6931 2002-06-29 T.J. Mather <tjmather@maxmind.com>
6933 * gcj.texi: Fixed gcj invocation example so that it compiles.
6935 2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
6942 * lex.c (java_read_char): Avoid "comparison is always true"
6945 2002-06-25 Andreas Schwab <schwab@suse.de>
6947 * expr.c (JSR): Avoid undefined operation on PC.
6949 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6951 * decl.c (clear_binding_level): Const-ify.
6953 2002-06-13 Akim Demaille <akim@epita.fr>
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.
6959 2002-06-11 Tom Tromey <tromey@redhat.com>
6961 * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6962 * parse-scan.y (statement_without_trailing_substatement): Added
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.
6980 2002-06-10 Akim Demaille <akim@epita.fr>
6982 * parse.y (interface_type_list, class_member_declaration)
6983 (unary_expression_not_plus_minus): Remove duplicate %type.
6986 2002-06-09 Tom Tromey <tromey@redhat.com>
6988 * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6990 * parse.y (method_header): Give error message in all cases.
6993 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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
7000 (java_post_options): New function. Turn off inlining unless
7001 flag_really_inline is set.
7003 2002-06-10 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7011 2002-06-08 H.J. Lu (hjl@gnu.org)
7013 * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7015 2002-06-04 Tom Tromey <tromey@redhat.com>
7017 * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7019 2002-06-04 Michael Koch <konqueror@gmx.de>
7021 * gcj.texi (Input Options): Fixed typo.
7023 2002-06-04 Zack Weinberg <zack@codesourcery.com>
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.
7031 * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7032 #if JCF_USE_STDIO blocks.
7034 * parse.y: Add missing semicolon at end of rule.
7036 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
7038 * check-init.c (attach_initialized_static_class): Delete, unused.
7039 * parse.y: Use htab_t instead of struct hashtable, update
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
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.
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.
7078 * lang.c (struct language_function): New dummy structure.
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.
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.
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.
7108 (jcf-parse.o): Likewise.
7109 (jcf-write.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.
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.
7120 * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
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
7125 * parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
7126 Include gtype-java.h.
7128 2002-06-02 Tom Tromey <tromey@redhat.com>
7130 Fix for PR java/5913:
7131 * parse.y (patch_binop): Call patch_string on op1.
7133 2002-06-02 Tom Tromey <tromey@redhat.com>
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.
7142 2002-05-28 Zack Weinberg <zack@codesourcery.com>
7144 * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7145 * Make-lang.in: Update dependency lists.
7147 2002-05-18 Mark Mitchell <mark@codesourcery.com>
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
7167 2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7169 * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7171 2002-05-13 Mark Mitchell <mark@codesourcery.com>
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
7177 2002-05-08 Mark Mitchell <mark@codesourcery.com>
7179 * jcf-write.c (write_classfile): Write the file to a
7180 temporary file and then rename it.
7182 2002-05-07 Tom Tromey <tromey@redhat.com>
7184 * gjavah.c (throwable_p): Use xstrdup, not strdup.
7186 Fix for PR java/1200:
7187 * gjavah.c (throwable_p): New function.
7188 (decode_signature_piece): Use it. A `WeakReference' isn't the
7191 (gcjh_streq): New function.
7193 2002-05-07 Andreas Jaeger <aj@suse.de>
7195 * parse.y (finish_for_loop): Fix if statement.
7197 2002-05-06 Tom Tromey <tromey@redhat.com>
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.
7205 2002-05-04 Mark Wielaard <mark@klomp.org>
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
7212 2002-04-27 Tom Tromey <tromey@redhat.com>
7215 * parse.y (string_convert_int_cst): New function.
7216 (merge_string_cste): Use it.
7218 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7227 2002-04-24 Tom Tromey <tromey@redhat.com>
7230 * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7231 EXPR_WFL_QUALIFICATION of qual_wfl.
7233 2002-04-23 Per Bothner <per@bothner.com>
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.
7239 2002-04-23 Tom Tromey <tromey@redhat.com>
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
7247 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
7249 * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7250 paths. Fixes PR java/2791.
7252 2002-04-19 Andrew Haley <aph@redhat.com>
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.
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.
7262 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
7264 * typeck.c (incomplete_type_error): Remove.
7266 2002-04-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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
7274 2002-04-16 Mark Wielaard <mark@klomp.org>
7276 * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7279 2002-04-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7281 Fix for PR java/6294:
7282 * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7285 2002-04-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7292 2002-04-10 Andreas Jaeger <aj@suse.de>
7294 * gcj.texi (Input Options): Fix extdirs patch.
7296 2002-04-10 Anthony Green <green@redhat.com>
7298 * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7300 2002-04-09 Anthony Green <green@redhat.com>
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.
7320 2002-04-08 Tom Tromey <tromey@redhat.com>
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
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.
7334 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7336 * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7337 Add note about handling uncaught exceptions. Add an exception handler
7340 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7342 * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7343 after using it to patch CALL_EXPR.
7345 2002-04-08 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7347 * gcj.texi (Invocation): Document CNI invocation API.
7349 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7356 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
7358 * java-tree.h (java_mark_addressable): New.
7359 * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7360 * typeck.c (mark_addressable): Rename, update.
7362 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7373 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7382 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
7384 * parse.y (do_resolve_class): Fix infinite recursion.
7386 2002-03-29 Tom Tromey <tromey@redhat.com>
7388 * parse.y (check_inner_circular_reference): Ignore incomplete
7391 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
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):
7400 * typeck.c (type_for_mode, type_for_size): Update.
7402 2002-03-29 Martin Kahlert <martin.kahlert@infineon.com>
7404 * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7406 2002-03-28 Tom Tromey <tromey@redhat.com>
7408 * except.c (expand_end_java_handler): If the handler type is NULL,
7409 use java.lang.Throwable. Fixes PR java/5986.
7411 2002-03-28 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
7418 2002-03-28 Jan Hubicka <jh@suse.cz>
7420 * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7422 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7424 * parse.y (resolve_package): Initialize "decl".
7425 (lookup_package_type): Remove unused function.
7427 2002-03-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7436 2002-03-27 Tom Tromey <tromey@redhat.com>
7438 * expr.c (expand_invoke): Don't generate null pointer check if
7439 we're calling <init>.
7441 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
7443 * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7445 * java-tree.h (java_lang_expand_expr): Similarly.
7446 * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7447 (java_init): Don't set hook.
7449 2002-03-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7456 2002-03-26 Tom Tromey <tromey@redhat.com>
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
7463 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7469 2002-03-25 Zack Weinberg <zack@codesourcery.com>
7471 * lex.c: Change java_perform_atof to take normal parameters
7472 instead of a pointer to a parameter block. Call it directly
7475 2002-03-22 Mark Wielaard <mark@klomp.org>
7477 Fix for PR java/5368:
7478 * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7479 when printing error message.
7481 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
7483 * decl.c (maybe_build_cleanup): Remove.
7485 2002-03-22 Tom Tromey <tromey@redhat.com>
7487 Andrew Haley <aph@cambridge.redhat.com>
7489 * expr.c (build_field_ref): Don't build a check if the field is a
7492 2002-03-21 Eric Blake <ebb9@email.byu.edu>
7494 Fix for PR java/6026:
7495 * lex.c (java_lex): Fix parsing of consecutive floats.
7497 2002-03-21 Tom Tromey <tromey@redhat.com>
7499 * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7502 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
7504 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7505 insert_block, getdecls, kept_level_p, global_bindings_p): New.
7507 2002-03-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7509 * gcj.texi: @code{gcj} becomes @command{gcj}.
7510 @code{gcc} becomes @command{gcc}.
7511 GcjRaw changed to gnu.gcc.RawData.
7513 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
7515 * decl.c (start_java_method): Use new hook.
7516 * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7517 (java_init): Remove old hook.
7519 2002-03-18 Alexandre Petit-Bianco <apbianco@redhat.com>
7521 * builtins.c (define_builtin): Do nothing if `type' is null.
7524 2002-03-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7526 * parse.y (parser_check_super_interface): Fix error message
7529 2002-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7531 * jcf-parse.c (get_constant): Delete unused variables.
7533 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7539 2002-03-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7546 2002-03-15 Anthony Green <green@redhat.com>
7548 * jcf-parse.c (yyparse): Don't emit class registration
7549 constructor when compiling resource files.
7551 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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
7559 2002-03-12 Tom Tromey <tromey@redhat.com>
7561 * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7562 UTF-8, not UCS-2. Fixes PR java/5923.
7564 * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7565 a call_expr wrapped in a convert. Fixes PR java/5848.
7567 2002-03-12 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7569 * jcf-write.c (write_classfile): Improve error strings.
7571 2002-03-11 Eric Blake <ebb9@email.byu.edu>
7573 * lex.c: Adjust comments to GNU standards.
7575 2002-03-11 Eric Blake <ebb9@email.byu.edu>
7577 Fix for PR java/5902:
7578 * lex.c (java_lex): Fix parsing of literals.
7580 2002-03-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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
7587 2002-03-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7592 2002-03-08 Per Bothner <per@bothner.com>
7594 * parse.y (java_complete_lhs): Check if patch_assignment
7595 returned an error-mark.
7597 * parse.y (try_builtin_assignconv): Don't special-case zero.
7599 2002-03-08 Per Bothner <per@bothner.com>
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.
7607 2002-03-07 Jeff Sturm <jsturm@one-point.com>
7609 * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7610 (java.install-common): Link native driver to
7611 JAVA_TARGET_INSTALL_NAME.
7613 2002-03-05 David Billinghurst <David.Billinghurst@riotinto.com>
7615 * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7616 * builtins.c(sin_builtin): Likewise
7617 * builtins.c(sqrt_builtin): Likewise
7619 2002-03-03 Zack Weinberg <zack@codesourcery.com>
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.
7626 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
7634 2002-03-02 Per Bothner <per@bothner.com>
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.
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.
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.
7659 * gcj.texi: Document changes.
7661 2002-03-01 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7663 * expr.c (build_java_arraystore_check): Fix formatting.
7665 2002-02-28 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
7673 2002-02-28 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
7696 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
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.
7702 2002-02-27 Zack Weinberg <zack@codesourcery.com>
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.
7708 2002-02-22 Tom Tromey <tromey@redhat.com>
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.
7716 2002-02-22 Per Bothner <per@bothner.com>
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.
7726 2002-02-20 Per Bothner <per@bothner.com>
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.
7732 2002-02-20 Nic Ferrier <nferrier@tapsellferrier.co.uk>
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.
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.
7747 2002-02-20 Per Bothner <per@bothner.com>
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).
7758 2002-02-17 Tom Tromey <tromey@redhat.com>
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
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.
7779 2002-02-12 David Billinghurst <Davod.Billinghurst@riotinto.com>
7781 * class.c(build_utf8_ref): Move declaration of decl_size
7783 2002-02-07 Tom Tromey <tromey@redhat.com>
7785 * gcj.texi (Input Options): --CLASSPATH does not suppress system
7788 2002-02-04 Anthony Green <green@redhat.com>
7790 * class.c (build_utf8_ref): Put UTF-8 constants into merged
7791 sections if available.
7793 2002-02-04 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
7795 * parse.y (java_expand_classes): Fix typo in static field loop.
7797 2002-02-02 Richard Henderson <rth@redhat.com>
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.
7805 2002-02-02 Nic Ferrier <nferrier@tapsellferrier.co.uk>
7807 * gcj.texi (About CNI): New node.
7809 2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
7812 * jcf-parse.c : Check for HAVE_LOCALE_H before using
7813 setlocale() with LC_CTYPE as a parameter.
7816 2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
7818 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
7819 Follow GNU Coding Standards for --version.
7821 2002-01-28 Tom Tromey <tromey@redhat.com>
7823 * expr.c (build_jni_stub): Ensure storage for `meth' is
7825 * parse.y (java_complete_expand_methods): Set
7826 current_function_decl before building JNI stub.
7828 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
7830 * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
7833 2002-01-22 Tom Tromey <tromey@redhat.com>
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.
7857 2002-01-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7859 * parse.y (patch_switch_statement): Fix format specifier.
7861 2002-01-16 Tom Tromey <tromey@redhat.com>
7863 More for PR java/5365:
7864 * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
7866 (process_file): Generate include for
7867 java.lang.UnsupportedOperationExceptions.
7869 2002-01-15 Andreas Jaeger <aj@suse.de>
7871 * .cvsignore: Add man pages.
7873 2002-01-15 Tom Tromey <tromey@redhat.com>
7875 Fix for PR java/5365:
7876 * gjavah.c (process_file): Turn class name into a file name.
7878 2002-01-14 Matthias Klose <doko@debian.org>
7880 * gcj.texi: Fix whitespace and formatting errors in the
7881 synopsis of the man pages. Update copyright.
7883 2002-01-14 Tom Tromey <tromey@redhat.com>
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.
7895 2001-01-10 Jeff Sturm <jsturm@one-point.com>
7896 Martin Kahlert <martin.kahlert@infineon.com>
7898 * jcf-parse.c (get_constant): Don't swap lo/hi for big
7899 endian targets when HOST_BITS_PER_WIDE_INT >= 64.
7901 2002-01-03 Graham Stott <grahams@redhat.com>
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.
7908 2002-01-03 Graham Stott <grahams@redhat.com>
7910 * gcc/jcf-parse.c: Update copyright date.
7911 (yyparse): Constify resource_filename.
7913 2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7915 * parse.y (src_parse_roots): Don't needlessly zero init.
7917 2001-12-31 Tom Tromey <tromey@redhat.com>
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.
7924 2001-12-28 Tom Tromey <tromey@redhat.com>
7926 * gen-table.pl: Don't process characters after \uffff. Added
7927 comment pointing to input file.
7929 2001-12-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7931 * gen-table.pl: Const-ify output. Document the location of a
7932 suitable unicode input file.
7934 * chartables.h: Regenerate.
7936 2001-12-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
7945 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
7956 2001-12-21 Richard Henderson <rth@redhat.com>
7958 * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7959 (get_boehm_type_descriptor): ... here. Arrange for the
7960 TREE_TYPE to get set properly.
7962 2001-12-21 Richard Henderson <rth@redhat.com>
7964 * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7965 only if the target requires collect2.
7967 * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7969 2001-12-20 Tom Tromey <tromey@redhat.com>
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
7977 (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7978 the loop head if the loop body can't complete normally.
7980 2001-12-20 Tom Tromey <tromey@redhat.com>
7983 * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7984 case where `finally' clause can't complete normally.
7986 2001-12-20 Tom Tromey <tromey@redhat.com>
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.
7993 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
8001 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8003 * mangle.c (mangle_member_name): Don't special-case for
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
8010 2001-12-20 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8012 * expr.c (build_java_array_length_access): Don't force null pointer
8013 check unless flag_check_references is set.
8015 2001-12-20 Tom Tromey <tromey@redhat.com>
8017 Fix for PR java/3417:
8018 * parse.y (patch_assignment): Added special processing for
8020 (patch_return): Don't convert booleans to integers, and don't
8021 special-case `null'.
8023 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
8025 * config-lang.in (diff_excludes): Remove.
8027 2001-12-17 Joseph S. Myers <jsm28@cam.ac.uk>
8029 * gcj.texi: Update link to GCC manual.
8031 2001-12-17 Tom Tromey <tromey@redhat.com>
8033 * parse.y (link_nested_class_to_enclosing): Removed useless
8036 2001-12-16 Tom Tromey <tromey@redhat.com>
8038 * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8041 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
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
8047 2001-12-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8049 * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8051 2001-12-16 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8053 * decl.c (java_init_decl_processing): Build otable_type correctly.
8054 otable_decl is an otable_type.
8056 2001-12-15 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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
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
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.
8086 2001-12-14 Matthias Klose <doko@debian.org>
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.
8095 2001-12-14 Hans Boehm <Hans_Boehm@hp.com>
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
8113 2001-12-12 Matthias Klose <doko@debian.org>
8115 * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8116 whitespace at end of line.
8118 2001-12-11 Tom Tromey <tromey@redhat.com>
8120 * lex.c (java_init_lex): Define wfl_to_string as
8121 gnu.gcj.runtime.StringBuffer unless generating bytecode.
8123 2001-12-11 Jeff Sturm <jsturm@one-point.com>
8125 * class.c (make_method_value): Use null_pointer_node to
8126 represent empty exception table.
8128 2001-12-10 Tom Tromey <tromey@redhat.com>
8130 * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8132 2001-12-10 Douglas B. Rupp <rupp@gnat.com>
8134 * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8136 2001-12-09 Per Bothner <per@bothner.com>
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.
8143 2001-12-09 Tom Tromey <tromey@redhat.com>
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.
8149 2001-12-08 Tom Tromey <tromey@redhat.com>
8151 * java-tree.h: Fixed typo.
8153 * gjavah.c (decompile_method): Don't decompile to `return this'
8156 * gjavah.c (cxx_keywords): Re-sorted.
8157 * lex.c (cxx_keywords): Re-sorted.
8159 * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8162 * gjavah.c (print_namelet): Clear subnamelets.
8163 (HANDLE_METHOD): Set `method_printed' earlier.
8165 2001-12-07 Tom Tromey <tromey@redhat.com>
8167 * lang.c (lang_f_options): Added
8168 optimize-static-class-initialization.
8169 (java_decode_option): Removed special case.
8171 2001-12-07 Per Bothner <per@bothner.com>
8173 * check-init.c (check_init): Fix typo freeing memory twice.
8175 2001-12-05 Per Bothner <per@bothner.com>
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.
8187 * parse.y (emit_test_initialization): Combine hash_lookup calls.
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.
8198 * check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
8200 * class.c (java_hash_compare_tree_node): Fix casts.
8202 2001-12-04 Per Bothner <per@bothner.com>
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):
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.
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.
8230 * java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
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,
8243 (struct lang_type): Remove hfv bit-field.
8244 (check_for_initialization): Change to return void.
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.
8252 * java-tree.h (struct lang_decl, struct lang_decl_var): Change all
8253 bit-fields to unsigned.
8255 2001-12-03 Per Bothner <per@bothner.com>
8257 * parse.y (patch_binop): Minor constant folding.
8259 * parse.y (build_current_thisn): Shorter 'buffer'.
8261 2001-12-03 Per Bothner <per@bothner.com>
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.
8269 2001-12-03 Per Bothner <per@bothner.com>
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.
8275 * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8276 OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8278 2001-12-03 Per Bothner <per@bothner.com>
8280 * jcf.h: Fix obvious typo in comment.
8281 * typeck.c (build_null_signature): Add comment.
8283 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
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.
8293 2001-12-02 Tang Ching-Hui <nicholas@cs.nthu.edu.tw>
8294 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8303 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
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.
8310 2001-11-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8312 * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8314 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
8316 * Make-lang.in (java.generated-manpages): New dummy target.
8318 2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8320 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8322 (lang_specific_pre_link): Use set_input to set input_filename.
8324 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8325 (main): Fix definition.
8326 Strip `main' from classname.
8329 2001-11-18 Roger Sayle <roger@eyesopen.com>
8331 * parse.h (java_expand_switch): Remove old prototype.
8333 2001-11-18 Tom Tromey <tromey@redhat.com>
8335 Fix for PR java/1401:
8336 * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8338 (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8341 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
8343 * lang.c (finish_parse): Rename to java_finish.
8344 (LANG_HOOKS_FINISH, java_finish): New.
8346 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
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.
8352 2001-11-13 Tom Tromey <tromey@redhat.com>
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.
8360 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
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.
8368 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
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.
8376 2001-11-08 Andreas Franck <afranck@gmx.de>
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.
8383 2001-11-08 Tom Tromey <tromey@cygnus.com>
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
8390 (error_if_numeric_overflow): New function.
8391 * parse.h (minus_seen): Removed field.
8392 (JAVA_RADIX10_FLAG): New define.
8394 2001-11-07 Tom Tromey <tromey@redhat.com>
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.
8402 2001-11-07 Alexandre Petit-Bianco <apbianco@redhat.com>
8404 * parse.y (patch_assignment): Removed unused third argument.
8405 (java_complete_lhs): Removed unused third argument to patch_assignment.
8407 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
8409 * lang.c: Include langhooks-def.h.
8410 * Make-lang.in: Update.
8412 2001-10-31 Zack Weinberg <zack@codesourcery.com>
8414 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8416 2001-10-29 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
8422 2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
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.
8434 2001-10-24 Alexandre Petit-Bianco <apbianco@redhat.com>
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
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
8453 2001-10-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8455 * lang.c (lang_get_alias_set): Deleted.
8457 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8459 * gjavah.c (jni_print_char): Fix thinko in last change.
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.
8469 2001-10-17 Richard Henderson <rth@redhat.com>
8471 * Make-lang.in (java/lang.o): Depend on langhooks.h.
8473 2001-10-15 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8481 2001-10-11 Per Bothner <per@bothner.com>
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.
8491 * parse.y (patch_if_else_statement): If the condition is constant,
8492 optimize away the test.
8494 2001-10-09 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8499 2001-10-09 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
8501 * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8502 when name qualifier matches a package name.
8504 2001-10-08 Tom Tromey <tromey@redhat.com>
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'.
8510 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
8517 2001-10-05 Alexandre Petit-Bianco <apbianco@redhat.com>
8519 * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8520 a NULL enclosing context if appropriate. Fixes PR java/4466.
8522 2001-10-03 Alexandre Petit-Bianco <apbianco@redhat.com>
8524 * parse.y (patch_assignment): Use lvalue's original TYPE when
8525 building the final COMPOUND_EXPR.
8526 (try_reference_assignconv): Fixed leading comment.
8528 2001-09-26 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8537 2001-09-22 Alexandre Petit-Bianco <apbianco@redhat.com>
8539 * decl.c (init_decl_processing): Fixed typo in predef_filenames
8540 last three initializations. Fixes PR java/4360.
8542 2001-09-21 Richard Henderson <rth@redhat.com>
8544 * class.c (get_dispatch_table): Handle function descriptors.
8545 (build_dtable_decl): Likewise.
8546 * expr.c (build_invokevirtual): Likewise.
8548 2001-09-20 Alexandre Petit-Bianco <apbianco@redhat.com>
8550 * parse.y (patch_method_invocation): Build class initialization
8551 when static finals are used to qualify method invocation.
8554 2001-09-19 Alexandre Petit-Bianco <apbianco@redhat.com>
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
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
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
8571 (purify_type_name): Use STRING_STRIP_BRACKETS.
8573 2001-09-18 Andreas Jaeger <aj@suse.de>
8575 * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8576 * jv-scan.c: Likewise.
8578 2001-09-17 Alexandre Petit-Bianco <apbianco@redhat.com>
8580 * parse.y (patch_method_invocation): Inner class creation context
8581 check not enforced within constructors. Fixes PR java/1873.
8583 2001-09-16 Tom Tromey <tromey@redhat.com>
8585 * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8586 NOTE_PUSH for single-case push. Fixes PR java/4189.
8588 2001-09-13 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8605 2001-09-13 Mark Mitchell <mark@codesourcery.com>
8607 * verify.c (verify_jvm_instructions): Fix typo.
8609 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8611 * expr.c (expand_invoke): Const-ification.
8612 * parse.y (patch_method_invocation): Likewise.
8614 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
8622 2001-09-11 Richard Henderson <rth@redhat.com>
8624 * parse.h (ctxp_for_generation): Mark extern.
8626 2001-09-10 Richard Henderson <rth@redhat.com>
8628 * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8630 2001-09-07 Matt Kraai <kraai@alumni.carnegiemellon.edu>
8632 * typeck.c (java_array_type_length, build_prim_array_type):
8633 Represent empty arrays by NULL index.
8635 2001-09-06 Alexandre Petit-Bianco <apbianco@redhat.com>
8637 * java-tree.h (compile_resource_file): Grouped with other prototypes.
8638 * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8640 2001-09-06 Anthony Green <green@redhat.com>
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
8652 * gcj.texi (Code Generation): Add documentation for -R flag.
8654 2001-09-05 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8665 2001-09-01 Per Bothner <per@bothner.com>
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.
8671 2001-08-31 Per Bothner <per@bothner.com>
8673 * class.c (set_constant_value): When not emitting class files, then a
8674 String ConstantValue is a utf8const_ptr_type.
8676 2001-08-30 Per Bothner <per@bothner.com>
8678 * jcf-write.c (generate_classfile): Check that field is primitive
8679 or string before emitting ConstantValue attribute.
8681 2001-08-30 Per Bothner <per@bothner.com>
8683 * parse.y (resolve_qualified_expression_name): If creating a
8684 COMPOUND_EXPR, set it's type correctly.
8686 2001-08-30 Per Bothner <per@bothner.com>
8688 * jcf-io.c (open_class): Set filename field.
8690 * jcf-parse,c (parse_class_file): Set current_function_decl
8691 for better error message when Code attribute is missing.
8693 * lang.c (put_decl_node, lang_print_error): Re-arrange for
8694 better diagnostics, especially for constructors.
8696 2001-08-30 Per Bothner <per@bothner.com>
8698 * jcf-write.c (generate_classfile): Don't write ConstantValue
8699 attribute if field is not final, for compatibility with jdk.
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.
8705 2001-08-30 Per Bothner <per@bothner.com>
8707 * jcf-dump.c (print_constant): Fix fencepost error so "Float" and
8708 "Double" are printed at verbosity 1.
8710 * jcf-dump.c (main): Disable flag_print_attributes if --javap.
8712 * jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
8714 2001-08-30 Alexandre Petit-Bianco <apbianco@redhat.com>
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
8721 2001-08-29 Alexandre Petit-Bianco <apbianco@redhat.com>
8723 * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
8726 2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8735 2001-08-28 Per Bothner <per@bothner.com>
8737 * jcf-write.c (generate_bytecode_insns): For increments and
8738 decrements just recurse to push constant. Improvement on Mark's patch.
8740 2001-08-28 Mark Mitchell <mark@codesourcery.com>
8742 * jcf-write.c (generate_bytecode_insns): Generate an integer to
8743 real conversion for increments and decrements of reals.
8745 2001-08-27 Alexandre Petit-Bianco <apbianco@redhat.com>
8747 * parse.y (resolve_qualified_expression_name): Handle unresolved
8748 qualified expressions, prevent numerical qualifiers, fixed typo.
8751 2001-08-24 Alexandre Petit-Bianco <apbianco@redhat.com>
8753 * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
8754 don't report anything but deprecated class when marked so. Handle
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.
8761 2001-08-23 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8774 2001-08-21 Tom Tromey <tromey@redhat.com>
8776 * decl.c (init_decl_processing): Add `throws' field to method
8778 * class.c (make_method_value): Compute `throws' field for method.
8780 2001-08-22 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8786 2001-08-17 Richard Henderson <rth@redhat.com>
8788 * class.c (emit_register_classes): Add align parameter to
8789 call to assemble_integer.
8791 2001-08-16 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8805 2001-08-16 Tom Tromey <tromey@redhat.com>
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.
8815 2001-08-13 Zack Weinberg <zackw@panix.com>
8817 * Make-lang.in (java/decl.o): Update dependencies.
8818 * decl.c: Include libfuncs.h, don't include toplev.h.
8820 2001-08-12 Alexandre Petit-Bianco <apbianco@redhat.com>
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
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
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.
8861 2001-08-12 David Edelsohn <edelsohn@gnu.org>
8864 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8865 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8867 (lang_specific_pre_link): Use set_input to set input_filename.
8869 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8870 (main): Fix definition.
8871 Strip `main' from classname.
8874 2001-08-11 Zack Weinberg <zackw@panix.com>
8876 * lex.h: Don't include setjmp.h. Don't define
8877 SET_FLOAT_HANDLER or prototype set_float_handler.
8879 2001-08-09 Alexandre Petit-Bianco <apbianco@redhat.com>
8881 * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
8882 `poplevel' in the right order.
8884 2001-08-09 Richard Henderson <rth@redhat.com>
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.
8890 2001-08-08 Alexandre Petit-Bianco <apbianco@redhat.com>
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
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
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
8941 (patch_invoke): Remember static method invocations.
8943 2001-08-06 Richard Henderson <rth@redhat.com>
8945 * class.c (emit_register_classes): Pass a symbol_ref and priority
8946 to assemble_constructor.
8948 2001-08-02 Alexandre Petit-Bianco <apbianco@redhat.com>
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.'
8955 2001-08-01 Jeff Sturm <jsturm@one-point.com>
8957 * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8958 Use ggc_add_tree_root to register roots.
8960 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
8973 2001-07-18 Alexandre Petit-Bianco <apbianco@redhat.com>
8975 * parse.y (create_interface): Avoid cyclic inheritance report when
8976 syntax error encountered during class definition.
8979 2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8981 * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8983 (lang_specific_pre_link): Use set_input to set input_filename.
8985 * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8986 (main): Fix definition.
8987 Strip `main' from classname.
8990 2001-07-18 Tom Tromey <tromey@redhat.com>
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.
8999 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
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
9010 2001-07-17 Alexandre Petit-Bianco <apbianco@redhat.com>
9012 * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9015 2001-07-14 Tim Josling <tej@melbpc.org.au>
9017 * check-init.c (check_init): Remove references to EXPON_EXPR.
9019 2001-07-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9021 * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9022 TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9025 2001-07-13 Tom Tromey <tromey@redhat.com>
9027 * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9030 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9032 * parse.y (patch_method_invocation): Don't override primary if one
9033 is already provided, but let this$<n> be built. Fixed comment.
9035 2001-07-12 Alexandre Petit-Bianco <apbianco@redhat.com>
9037 * parse.y (empty_statement:): Report empty statement error only
9038 when found at class declaration level.
9041 2001-07-12 Tom Tromey <tromey@redhat.com>
9043 * expr.c (expand_load_internal): New function.
9044 (LOAD_INTERNAL): Use it.
9046 2001-07-11 Alexandre Petit-Bianco <apbianco@redhat.com>
9048 * parse.y (verify_constructor_super): Compare anonymous class ctor
9049 args with `valid_method_invocation_conversion_p.'
9052 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9054 * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9055 `-fsyntax-only.' Fixes PR java/3248
9057 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9059 * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9061 2001-07-10 Alexandre Petit-Bianco <apbianco@redhat.com>
9063 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9064 current function is static. Fixes PR java/1970
9066 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9068 * parse.y (patch_method_invocation): Add enclosing context to ctor
9069 calls if necessary. Fixes PR java/2953
9071 2001-07-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9073 * parse.y (resolve_package): Abort if qualified expression member
9075 (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9078 2001-07-07 Zack Weinberg <zackw@stanford.edu>
9080 * verify.c: Don't use // comments.
9082 2001-07-05 Tom Tromey <tromey@redhat.com>
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'.
9092 2001-07-04 Daniel Berlin <dan@cgsoftware.com>
9094 * jcf-parse.c (parse_class_file): Add lineno parameter to
9095 debug_start_source_file call.
9097 2001-07-04 Joseph S. Myers <jsm28@cam.ac.uk>
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.
9103 2001-07-03 Jeff Sturm <jsturm@one-point.com>
9105 * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9106 `this'. If so, don't build instance initializers.
9108 2001-07-03 Alexandre Petit-Bianco <apbianco@redhat.com>
9110 * parse.y (resolve_expression_name): Improved error message for
9111 inner class cases. Fixes PR java/1958
9113 2001-06-28 Gabriel Dos Reis <gdr@codesourcery.com>
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
9120 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
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.'
9128 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
9130 * parse.y (class_body_declaration:): Don't install empty instance
9134 2001-06-27 Alexandre Petit-Bianco <apbianco@redhat.com>
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
9145 2001-06-22 Jan van Male <jan.vanmale@fenk.wau.nl>
9147 * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9149 2001-06-20 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9158 2001-06-19 Tom Tromey <tromey@redhat.com>
9160 * lex.c (java_read_char): Disallow invalid and overlong
9161 sequences. Fixes PR java/2319.
9163 2001-06-05 Jeff Sturm <jsturm@one-point.com>
9165 * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9167 2001-06-04 Alexandre Petit-Bianco <apbianco@redhat.com>
9169 * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9170 arguments accordingly.
9172 2001-06-02 Joseph S. Myers <jsm28@cam.ac.uk>
9174 * gcj.texi: Move contents to just after title page.
9176 2001-06-01 Alexandre Petit-Bianco <apbianco@redhat.com>
9178 * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9180 (patch_incomplete_class_ref): Build the class ref, build the class
9181 init if necessary, complete the tree.
9184 2001-05-31 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9192 2001-05-23 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9194 * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9196 (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls. Create
9197 the dvi file in the java directory.
9199 2001-05-25 Sam TH <sam@uchicago.edu>
9201 * gen-table.pl javaop.h jcf.h lex.h,
9202 parse.h: Fix header include guards.
9204 2001-05-23 Joseph S. Myers <jsm28@cam.ac.uk>
9206 * jv-scan.c (version): Update copyright year.
9208 2001-05-21 Per Bothner <per@bothner.com>
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.
9213 2001-05-18 Per Bothner <per@bothner.com>
9215 * jvspec.c (lang_specific_pre_link): Re-arrange the linker
9216 command line so the jvgenmain-generated main program comes first.
9218 2001-05-15 Tom Tromey <tromey@redhat.com>
9220 * class.c (build_utf8_ref): Don't generate identifier based on
9223 2001-05-12 Richard Henderson <rth@redhat.com>
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.
9235 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9241 2001-05-07 Alexandre Petit-Bianco <apbianco@redhat.com>
9243 * parse.y (fix_constructors): Removed unnecessary assignment to
9244 local. Moved assignment to `this$<n>', fixed comments and
9246 (build_wfl_wrap): Fixed indentation.
9247 Fixes PR java/2598, java/2579 and java/2658.
9249 2001-05-03 Mo DeJong <mdejong@redhat.com>
9251 * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9252 check for byte swap.
9254 2000-05-02 Jeff Sturm <jsturm@one-point.com>
9256 * expr.c (build_class_init): Move MODIFY_EXPR
9257 outside of COND_EXPR. Remove variable `call'.
9259 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9261 * decl.c: NULL_PTR -> NULL.
9262 * jcf-write.c: Likewise.
9264 2001-05-01 Tom Tromey <tromey@redhat.com>
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.
9271 2001-05-01 Per Bothner <per@bothner.com>
9273 * parse.h (REGISTER_IMPORT): Use tree_cons instead of chainon.
9275 2001-05-01 Per Bothner <per@bothner.com>
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.
9280 2001-04-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9282 * jcf-io.c (read_zip_member): Cast to long in comparison with
9285 * jvspec.c (lang_specific_driver): Initialize variables.
9287 * mangle.c (find_compression_record_match): Likewise.
9289 * typeck.c (build_null_signature): Provide static prototype. Mark
9290 parameter with ATTRIBUTE_UNUSED.
9292 * verify.c (verify_jvm_instructions): Initialize variable.
9294 2001-04-27 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9296 * parse.y (do_resolve_class): Check for cyclic inheritance during
9297 inner class resolution.
9299 2001-04-27 Per Bothner <per@bothner.com>
9301 * parse.y (java_expand_classes): Don't change ctxp_for_generation
9302 while iterating, since that could cause gc to lose stuff.
9304 2001-04-26 Per Bothner <per@bothner.com>
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.
9315 2001-04-26 Per Bothner <per@bothner.com>
9317 * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9318 Fix thinko: If a single case, use if_icmpeq, not ifeq.
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.
9327 2001-04-25 Per Bothner <per@bothner.com>
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.
9333 2001-04-25 Alexandre Oliva <aoliva@redhat.com>
9335 * config-lang.in (target_libs): Copy from $libgcj_saved.
9337 2001-04-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
9339 * decl.c (init_decl_processing): Add new class "protectionDomain"
9341 * class.c (make_class_data): Set initial value for "protectionDomain".
9343 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9345 * jvspec.c (lang_specific_driver): Fix memory allocation
9346 deficit, by using concat in lieu of xmalloc/sprintf.
9348 2001-04-20 Per Bothner <per@bothner.com>
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.
9362 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9364 * Make-lang.in (java/boehm.o): Depend on toplev.h.
9366 * boehm.c: Include toplev.h.
9368 2001-04-06 Tom Tromey <tromey@redhat.com>
9369 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9376 2001-04-06 Tom Tromey <tromey@redhat.com>
9378 * parse.y (analyze_clinit_body): Return true if the second operand
9379 of a METHOD_EXPR is nonzero.
9381 2001-04-06 Tom Tromey <tromey@redhat.com>
9383 * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9385 ($(srcdir)/java/parse.c): Likewise.
9387 2001-04-05 Alexandre Petit-Bianco <apbianco@redhat.com>
9389 * gcj.texi: Use `which-gcj' instead of `which-g77.'
9390 (version-gcc): Initialized.
9391 (which-gcj): Likewise.
9393 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
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.'
9404 2001-04-04 Alexandre Petit-Bianco <apbianco@redhat.com>
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'
9411 2001-03-27 Andrew Haley <aph@cambridge.redhat.com>
9413 * lang-options.h: Add flag_check_references.
9415 2001-04-04 Per Bothner <per@bothner.com>
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.
9425 * parse.y (fold_constant_for_init): Merge test into switch.
9427 2001-04-03 Zack Weinberg <zackw@stanford.edu>
9429 * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9431 * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9433 2001-04-02 Zack Weinberg <zackw@stanford.edu>
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.
9439 2001-03-30 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9451 2001-03-28 Hans Boehm <boehm@acm.org>
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.
9457 2001-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9459 * expr.c (pop_type_0): Call `concat' rather than building the
9461 (pop_type): Add format specifier in call to `error'.
9463 * parse.y (patch_method_invocation): Avoid casting away
9466 2001-03-28 Jeffrey Oldham <oldham@codesourcery.com>
9468 * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9470 2001-03-28 Richard Henderson <rth@redhat.com>
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
9497 (build_dot_class_method): Use build_exception_object_ref.
9498 (try_reference_assignconv): Check EXC_PTR_EXPR not
9499 soft_exceptioninfo_call_node.
9501 2001-03-28 Richard Henderson <rth@redhat.com>
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.
9514 2001-03-28 Richard Henderson <rth@redhat.com>
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.
9524 2001-03-27 Richard Henderson <rth@redhat.com>
9526 * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9527 exceptions_via_longjmp.
9529 * lang.c (flag_new_exceptions): Don't declare it.
9530 (java_init_options): Or set it.
9532 2001-03-27 Richard Henderson <rth@redhat.com>
9534 * decl.c (end_java_method): Rename asynchronous_exceptions to
9535 flag_non_call_exceptions.
9536 * parse.y (source_end_java_method): Likewise.
9538 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9540 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9542 2001-03-26 Mark Mitchell <mark@codesourcery.com>
9544 * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9546 2001-03-26 Alexandre Petit-Bianco <apbianco@redhat.com>
9548 * parse.y (find_as_inner_class): Follow current package
9549 indications not to mistakingly load an unrelated class.
9551 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9553 * constants.c (PUTN): Use memcpy, not bcopy.
9555 * lex.c (java_read_char): Use memmove, not bcopy.
9557 * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9559 2001-03-23 Per Bothner <per@bothner.com>
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.
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.
9573 * parse.y (java_complete_lhs): If the try-clause is empty, just
9574 return the finally-clause and vice versa.
9576 2001-03-23 Alexandre Petit-Bianco <apbianco@redhat.com>
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.'
9596 2001-02-07 Andrew Haley <aph@redhat.com>
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.
9616 2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
9618 * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9619 * lex.c (cxx_keywords): Likewise.
9621 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9627 2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
9629 * gjavah.c (process_file): Mark interface definitions with
9630 "__attribute__ ((java_interface))".
9632 2001-03-21 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9639 2001-03-20 Tom Tromey <tromey@redhat.com>
9640 Alexandre Petit-Bianco <apbianco@redhat.com>
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.
9646 2001-03-20 Tom Tromey <tromey@redhat.com>
9648 * lex.c (java_read_unicode): Only accept leading `u's.
9650 2001-03-20 Tom Tromey <tromey@redhat.com>
9652 * jcf-parse.c (read_class): Initialize `class'.
9654 2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9656 * jcf_parse.c (jcf_parse): Eliminate unused variable.
9658 2001-03-19 Mark Mitchell <mark@codesourcery.com>
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.
9667 2001-03-19 Per Bothner <per@bothner.com>
9669 * jcf-parse.c (load_inner_classes): Check CLASS_LOADED_P
9670 before trying to load an inner class.
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.
9695 2001-03-18 Matt Kraai <kraai@alumni.carnegiemellon.edu>
9697 * jcf-parse.c (yyparse): Change ch from char * to char.
9699 2001-03-19 Per Bothner <per@bothner.com>
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.
9706 2001-03-19 Andrew Haley <aph@cambridge.redhat.com>
9708 * class.c (build_static_field_ref): Call make_decl_rtl() after
9709 setting the DECL_EXTERNAL flag.
9711 2001-03-17 Per Bothner <per@bothner.com>
9713 * decl.c (clear_binding_level): Fix initializer (broke 03-15).
9715 * jcf-write.c (generate_bytecode_insns): Handle emitting iinc
9716 when result is is needed (target is STACK_TARGET).
9718 * parse.h (JDEP_SOLV): Removed.
9719 * parse.y (register_incomplete_type): Use JDEP_TO_RESOLVE instead.
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.
9729 * parse.y (resolve_class): Remove unneeded promote_type.
9731 2001-03-15 Per Bothner <per@bothner.com>
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.
9738 * jcf-parse.c (yyparse): Set/reset input_filename for source file.
9739 * parse.y (java_expand_classes): Likewise.
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.
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.
9751 * class.c (make_class_data): The class_dtable_decl (i.e. the
9752 vtable for Class) should be external, except when compiling Class.
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.
9758 * verify.c (verify_jvm_instructions): Better error msgs for dup.
9759 (type_stack_dup): Remove no-longer neded error check.
9761 2001-03-15 Bryce McKinlay <bryce@albatross.co.nz>
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
9768 2001-03-14 Mark Mitchell <mark@codesourcery.com>
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.
9775 * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9777 2001-03-07 Tom Tromey <tromey@redhat.com>
9779 * config-lang.in (lang_requires): Define.
9781 2001-03-07 Brad Lucier <lucier@math.purdue.edu>
9783 * typeck.c (convert): Check flag_unsafe_math_optimizations,
9786 2001-03-05 Per Bothner <per@bothner.com>
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.
9796 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9798 * java/class.c, java/decl.c, java/java-tree.h: Replace all
9799 uses of 'boolean' with 'bool'.
9801 2001-03-01 Zack Weinberg <zackw@stanford.edu>
9803 * lang-specs.h: Add zero initializer for cpp_spec field to all
9806 2001-02-16 Per Bothner <per@bothner.com>
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.
9835 2001-02-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9837 * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
9839 2001-02-20 Alexandre Petit-Bianco <apbianco@redhat.com>
9841 * parse.y (check_inner_class_access): Moved declaration of local
9842 `enclosing_decl_type' to the right location.
9844 2001-02-19 Bryce McKinlay <bryce@albatross.co.nz>
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
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
9860 2001-02-18 Bryce McKinlay <bryce@albatross.co.nz>
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
9867 2001-02-15 Alexandre Petit-Bianco <apbianco@redhat.com>
9869 * expr.c (build_instanceof): Check for arrays when trying fold to
9872 2001-02-15 Jim Meyering <meyering@lucent.com>
9874 * Make-lang.in (java.install-common): Depend on `installdirs'.
9875 (java.install-info): Likewise.
9877 2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
9879 * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
9881 2001-02-14 Tom Tromey <tromey@redhat.com>
9882 Alexandre Petit-Bianco <apbianco@cygnus.com>
9884 Fix for PR java/1261.
9885 * typeck.c (build_java_array_type): Add public `clone' method to
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.
9892 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
9894 * parse.y (resolve_class): Don't build a fake decl. Use the one
9896 * typeck.c (build_java_array_type): Build and assign decl to array
9899 2001-02-14 Alexandre Petit-Bianco <apbianco@redhat.com>
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
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.
9910 2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
9912 * parse.y (resolve_qualified_expression_name): Try to resolve as
9913 an inner class access only if `decl' is a TYPE_DECL.
9915 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
9927 2001-02-09 Raja R Harinath <harinath@cs.umn.edu>
9929 * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
9931 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9933 * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
9934 * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
9937 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
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'
9944 2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
9946 * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9948 2001-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
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.
9970 2001-02-07 Per Bothner <per@bothner.com>
9972 * check-init.c (check_init): Fix TRY_FINALLY_EXPR logic.
9974 * check-init.c (check_init): Don't call done_alternative after
9975 processing loop code, as a LOOP_EXPR never terminates normally.
9977 2001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
9979 * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9981 2001-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
9983 * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9986 2001-02-06 Tom Tromey <tromey@redhat.com>
9988 * lex.c (java_new_lexer): Longer error message.
9990 2001-02-05 Jeff Sturm <jeff.sturm@commerceone.com>
9991 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
9998 2001-02-04 Tom Tromey <tromey@redhat.com>
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.
10004 2001-02-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10006 * parse.y (process_imports): Save the original name of the import
10007 for better error report.
10009 2001-02-04 Bryce McKinlay <bryce@albatross.co.nz>
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
10016 2001-02-04 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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
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.
10071 2001-02-01 Bryce McKinlay <bryce@albatross.co.nz>
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.
10077 2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
10079 * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
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.
10087 2001-01-30 Bryce McKinlay <bryce@albatross.co.nz>
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.
10094 2001-01-24 Jeff Sturm <jeff.sturm@commerceone.com>
10096 * zextract.c (read_zip_archive): Read file_offset before writing
10097 zipd and consequently clobbering the header contents.
10099 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
10106 2001-01-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
10131 * typeck.c (lookup_do): Code accounting for WFLed method
10132 DECL_NAMEs deleted.
10134 2001-01-25 Richard Earnshaw <rearnsha@arm.com>
10136 * lex.c (java_read_char): Check for EOF from getc first.
10138 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
10151 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10153 * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10155 * jcf-parse.c (set_source_filename): Use
10156 MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10158 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10160 * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10161 gets a unique asm name.
10163 2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
10165 * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10166 (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
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
10174 * verify.c (pop_argument_types): Added missing prototype.
10176 2001-01-23 Bryce McKinlay <bryce@albatross.co.nz>
10178 * config-lang.in: Disable java by default.
10180 2001-01-23 Tom Tromey <tromey@redhat.com>
10182 * gcj.texi (Copying): New node.
10183 Added copyright information.
10185 2001-01-21 Per Bothner <per@bothner.com>
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.
10206 2001-01-21 Per Bothner <per@bothner.com>
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.
10221 2001-01-21 Per Bothner <per@bothner.com>
10223 * jcf-parse.c (ggc_mark_jcf): New function.
10224 (init_jcf_parse): Register current_jcf as ggc root.
10226 2001-01-21 Per Bothner <per@bothner.com>
10228 * lang.c (put_decl_node): Print method's name.
10230 2001-01-21 Per Bothner <per@bothner.com>
10232 * verify.c (VERIFICATION_ERROR_WITH_INDEX): New macro.
10233 (verify_jvm_instructions): Use it, for better error messages on loads.
10235 2001-01-21 Per Bothner <per@bothner.com>
10237 * verify.c (merge_type_state): Still may have to merge even if
10238 LABEL_VERIFIED (label).
10240 2001-01-21 Per Bothner <per@bothner.com>
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.
10245 2001-01-19 Per Bothner <per@bothner.com>
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.
10250 2001-01-18 Per Bothner <per@bothner.com>
10252 * gcj.texi (Input Options): Mention .java files.
10254 2001-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
10262 2001-01-17 Tom Tromey <tromey@redhat.com>
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.
10271 (Compatibility): Mention JDK 1.2-ness of libraries.
10272 (Resources): Mention resources used when writing gcj.
10274 2001-01-17 Tom Tromey <tromey@redhat.com>
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.
10283 2001-01-16 Jeff Sturm <jeff.sturm@appnet.com>
10285 * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10286 having called make_decl_rtl.
10288 2001-01-14 Per Bothner <per@bothner.com>
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.
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.
10309 2001-01-13 Per Bothner <per@bothner.com>
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.)
10315 2001-01-12 Joseph S. Myers <jsm28@cam.ac.uk>
10317 * gjavah.c (version), jcf-dump.c (version): Update copyright year
10320 2001-01-11 Bryce McKinlay <bryce@albatross.co.nz>
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.
10327 2001-01-10 Mark Mitchell <mark@codesourcery.com>
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.
10343 2001-01-10 Tom Tromey <tromey@redhat.com>
10345 * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10347 2001-01-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
10360 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
10415 2001-01-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
10417 * parse.y (patch_binop): Compute missing type in error situations.
10419 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
10421 * class.c (make_class_data): Push initial value for "arrayclass".
10422 * decl.c (init_decl_processing): Add new class field "arrayclass".
10424 2001-01-05 Bryce McKinlay <bryce@albatross.co.nz>
10426 From patha@softlab.ericsson.se:
10427 * parse.y (switch_label): Use build, not build1, to construct
10430 2001-01-04 Neil Booth <neil@daikokuya.demon.co.uk>
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.
10437 2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
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.
10446 2000-12-17 Bryce McKinlay <bryce@albatross.co.nz>
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.
10454 Fix for PR gcj/373:
10455 * parse.y (create_class): Set ACC_STATIC if class is declared in an
10458 2000-12-15 Tom Tromey <tromey@redhat.com>
10460 * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10463 2000-12-14 Andrew Haley <aph@redhat.com>
10465 * boehm.c (mark_reference_fields): Change test to correctly detect
10468 2000-12-15 Andreas Jaeger <aj@suse.de>
10470 * config-lang.in (lang_dirs): Added.
10472 2000-12-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
10474 * parse.y (end_artificial_method_body): Fixed undefined behavior.
10475 Credits go to rth for finding it.
10477 2000-12-13 Mike Stump <mrs@wrs.com>
10479 * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10481 2000-11-07 Tom Tromey <tromey@cygnus.com>
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
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.
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.
10503 (JAVA_CHAR_ERROR): Now -2.
10504 (java_lexer): New field `hit_eof'.
10505 * chartables.h: New file.
10506 * gen-table.pl: new file.
10508 2000-11-20 Tom Tromey <tromey@cygnus.com>
10509 Alexandre Petit-Bianco <apbianco@cygnus.com>
10511 * parse.y (java_complete_lhs): Only allow compound assignment of
10512 reference type if type is String.
10514 2000-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
10516 * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10517 jcf-path.c: Likewise.
10519 2000-12-09 Anthony Green <green@redhat.com>
10521 * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10522 filestart and filename_length as int values.
10524 2000-12-07 Mo DeJong <mdejong@redhat.com>
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.
10530 2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
10532 * jvgenmain.c: Use ISPRINT not isascii.
10534 2000-12-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
10536 * parse.y (end_artificial_method_body): Fixed typo.
10538 2000-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
10540 * parse.y (patch_method_invocation): Pick the correct enclosing
10541 context when creating inner class instances.
10544 2000-11-26 Joseph S. Myers <jsm28@cam.ac.uk>
10546 * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10547 Update copyright year to 2000.
10549 2000-11-23 Anthony Green <green@redhat.com>
10551 * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10552 Move current_file_list out of yyparse and make it static.
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.
10558 2000-11-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
10565 (build_access_to_thisn): Stop at the last enclosing context if
10569 2000-11-23 J"orn Rennecke <amylaar@redhat.com>
10571 * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10573 2000-11-22 Bryce McKinlay <bryce@albatross.co.nz>
10575 * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10578 2000-11-20 Tom Tromey <tromey@cygnus.com>
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.
10594 2000-11-20 Tom Tromey <tromey@cygnus.com>
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
10602 * keyword.h: Rebuilt.
10603 * keyword.gperf (strictfp): Added.
10605 2000-11-20 Tom Tromey <tromey@cygnus.com>
10607 * lex.c (yylex): Recognize floating point constants with leading
10610 2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10612 * java-tree.h (cyclic_inheritance_report): Constify.
10613 * parse.y (cyclic_inheritance_report): Likewise.
10615 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
10617 * parse.y (goal): Remove call to ggc_add_string_root.
10619 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
10621 * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10622 Create string in scratch buffer, then pass to build_string.
10624 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
10626 * parse.y (issue_warning_error_from_context): Add
10629 2000-11-11 Anthony Green <green@redhat.com>
10631 * jcf-parse.c (process_zip_dir): Add finput parameter.
10632 (jcf_figure_file_type): Call process_zip_dir with appropriate
10635 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10637 * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10638 * jcf-parse.c (jcf_figure_file_type): Likewise.
10640 2000-11-09 Joseph S. Myers <jsm28@cam.ac.uk>
10642 * parse.y (create_new_parser_context): Use memset () instead of
10645 2000-11-08 Tom Tromey <tromey@cygnus.com>
10647 * gjavah.c (process_file): Only include gcj/cni.h when generating
10650 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
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 ().
10656 2000-11-05 Tom Tromey <tromey@cygnus.com>
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.
10662 2000-11-04 Tom Tromey <tromey@cygnus.com>
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.
10668 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
10670 * Make-lang.in (java.distdir): Remove.
10672 2000-11-03 Tom Tromey <tromey@cygnus.com>
10674 * Make-lang.in (java.dvi): New target.
10675 Partial fix for PR other/567.
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.
10687 * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
10688 * gjavah.c (cxx_keyword_subst): Handle any number of trailing
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
10705 * jv-scan.c (pedantic): New global.
10707 2000-10-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
10716 2000-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
10718 * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
10721 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
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.
10730 * Makefile.in: Delete.
10731 * config-lang.in: Delete outputs= line.
10733 2000-10-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
10735 * parse.y (patch_method_invocation): NULLify this_arg when already
10737 (maybe_use_access_method): Handle call to methods unrelated to the
10738 current class. Fixed comment.
10741 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
10743 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
10746 2000-10-24 Tom Tromey <tromey@cygnus.com>
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
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,
10756 Made out_buffer unsigned.
10758 2000-10-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
10764 2000-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10766 * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
10768 * jcf-reader.c (peek_attribute, skip_attribute): Only define
10771 * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
10773 * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
10775 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
10777 * jcf-write.c (OP1): Update `last_bc'.
10778 (struct jcf_block): Fixed indentation and typo in comments. New
10780 (generate_bytecode_insns): Insert `nop' if `jsr' immediately
10781 follows `monitorenter'.
10782 * parse.y (patch_synchronized_statement): New local `tmp'. Call
10786 2000-10-16 Tom Tromey <tromey@cygnus.com>
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.
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.
10815 2000-10-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
10838 (patch_newarray): Removed assignment in ternary operator.
10840 2000-10-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
10842 * except.c (free_eh_ranges): Don't free `whole_range'.
10844 2000-10-15 Anthony Green <green@redhat.com>
10846 * decl.c (init_decl_processing): Call init_class_processing before
10849 2000-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
10851 * check-init.c (check_init): Fixed leading comment. Use
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
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
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
10906 (patch_assignment): Use LOCAL_FINAL_P.
10907 (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
10908 DECL_INITIAL is nullified.
10911 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10913 * Make-lang.in (parse.c, parse-scan.c): Create atomically.
10915 * Makefile.in (parse.c, parse-scan.c): Likewise.
10917 2000-10-12 Mark Mitchell <mark@codesourcery.com>
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
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_*
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.
10989 2000-10-12 Tom Tromey <tromey@cygnus.com>
10991 Fix for PR gcj/356:
10992 * gjavah.c (add_class_decl): Don't special-case inner classes.
10993 (add_namelet): Likewise.
10995 2000-10-11 Rodney Brown <RodneyBrown@mynd.com>
10997 * java-tree.h: Constify current_encoding.
10998 * lang.c: Constify current_encoding.
11000 2000-10-10 Jeff Sturm <jeff.sturm@appnet.com>
11002 * jvgenmain.c (class_mangling_suffix): Omit `.'.
11003 (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11005 2000-10-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11007 * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11008 patch. Fixes gcj/340.
11010 2000-10-10 Tom Tromey <tromey@cygnus.com>
11012 * lex.c (java_new_lexer): Initialize out_first and out_last
11014 * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11016 2000-10-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11025 2000-10-08 Anthony Green <green@redhat.com>
11027 * parse.y (array_type_literal): Remove production.
11028 (type_literals): Refer to array_type, not array_type_literal.
11030 2000-10-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11037 2000-10-07 Anthony Green <green@redhat.com>
11039 * class.c (layout_class): Handle case where superclass can't be
11042 2000-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
11044 * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11047 2000-10-05 Tom Tromey <tromey@cygnus.com>
11049 * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11050 * jvgenmain.c (class_mangling_prefix): Removed.
11051 (class_mangling_suffix): New global.
11053 * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11055 (print_method_info): Handle overrides for static and final
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
11065 (mangle_static_field): Use mangle_field.
11067 2000-10-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
11069 * decl.c (find_local_variable): Removed uncessary type check and
11070 fixed range check typo. From Corey Minyard.
11072 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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'.
11084 2000-09-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11086 * parse.y (field_access:): Fixed indentation.
11087 (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11089 2000-09-07 Tom Tromey <tromey@cygnus.com>
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.
11100 2000-09-27 Tom Tromey <tromey@cygnus.com>
11102 * lex.c (java_read_unicode): Reset bs_count when finished with
11105 2000-10-01 Mark Mitchell <mark@codesourcery.com>
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
11124 * parse.y (goal): Add more roots.
11125 (mark_parser_ctxt): New function.
11126 * typeck.c: Include ggc.h.
11128 2000-09-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11130 * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11131 contains something else than MODIFY_EXPR.
11133 2000-09-23 Mark Mitchell <mark@codesourcery.com>
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
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
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.
11196 2000-09-14 Tom Tromey <tromey@cygnus.com>
11198 * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11200 2000-09-13 Tom Tromey <tromey@cygnus.com>
11202 * jcf-parse.c: Include <locale.h>.
11203 * jv-scan.c: Include <locale.h>.
11205 2000-09-12 Tom Tromey <tromey@cygnus.com>
11207 * expr.c (pop_type_0): Return `Object' if trying to merge two
11209 * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11210 interface types; `Object' is always a valid supertype.
11212 2000-09-12 Tom Tromey <tromey@cygnus.com>
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
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
11228 (java_parser_context_save_global): Don't set `finput' field.
11229 (java_pop_parser_context): Don't restore `finput'. Free old lexer
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
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.
11250 (DEFAULT_ENCODING): New define.
11251 (java_destroy_lexer): Declare.
11253 2000-09-12 Tom Tromey <tromey@cygnus.com>
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
11261 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
11263 * decl.c, expr.c: Include defaults.h if not already included.
11264 Don't define the *_TYPE_SIZE macros.
11266 2000-09-09 Geoffrey Keating <geoffk@cygnus.com>
11268 * typeck.c (build_java_array_type): Correct first parameter
11269 in ADJUST_FIELD_ALIGN invocation.
11271 2000-09-06 Tom Tromey <tromey@cygnus.com>
11273 * lang-specs.h: Also recognize `-femit-class-files'.
11275 2000-09-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
11277 * verify.c (merge_types): Load the types to merge if necessary.
11279 2000-09-02 Anthony Green <green@redhat.com>
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.
11287 2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
11289 * parse.y (do_resolve_class): Also explore superclasses of
11290 intermediate enclosing contexts when searching for inner classes.
11292 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11294 * parse.y (variable_declarator_id:): Better error message.
11295 (expression_statement:): Use YYNOT_TWICE.
11296 (cast_expression:): Likewise.
11297 (assignment:): Likewise.
11299 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
11301 * parse.y (do_merge_string_cste): New locals. Create new
11302 STRING_CSTs each time, use memcpy. Fixes gcj/311.
11304 2000-08-07 Hans Boehm <boehm@acm.org>
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
11311 2000-08-31 Mike Stump <mrs@wrs.com>
11313 * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11314 jcf-dump$(exeext)): Make parallel safe.
11316 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
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.
11325 2000-08-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11332 2000-08-25 Greg McGary <greg@mcgary.org>
11334 * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11336 2000-08-24 Greg McGary <greg@mcgary.org>
11338 * lang.c (lang_decode_option): Use ARRAY_SIZE.
11339 * parse.y (BINOP_LOOKUP): Likewise.
11341 2000-08-22 Andrew Haley <aph@cygnus.com>
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.
11348 2000-08-21 Nix <nix@esperi.demon.co.uk>
11350 * lang-specs.h: Do not process -o or run the assembler if
11353 2000-08-16 Andrew Haley <aph@cygnus.com>
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.
11360 2000-08-09 Tom Tromey <tromey@cygnus.com>
11362 * parse.y (check_abstract_method_definitions): Now return `int'.
11363 Check implemented interfaces. Fixes PR gcj/305.
11365 * parse.y (patch_switch_statement): Disallow `long' in switch
11366 expressions. Fixes PR gcj/310.
11368 2000-08-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11381 2000-08-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
11383 * jcf-write.c (generate_bytecode_conditional): Re-installed lost
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}.
11390 2000-08-13 Anthony Green <green@redhat.com>
11392 * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11395 2000-08-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
11419 (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11421 (patch_assignment): Set DECL_INITIAL on integral final local.
11423 2000-08-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
11440 2000-08-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11448 2000-08-06 Ovidiu Predescu <ovidiu@cup.hp.com>
11450 * lang-options.h: Added a comma after the last element to avoid
11451 syntax errors when other languages define additional options.
11453 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
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).
11460 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
11462 * jvspec.c: Adjust type of second argument to
11463 lang_specific_driver, and update code as necessary.
11465 * class.c (build_dtable_decl): Initialize dummy.
11467 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11473 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11475 * gjavah.c (print_method_info): Added `synth' parameter. Skip
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.
11485 2000-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11487 * parse.y (build_outer_field_access): Fixed comments.
11488 (fix_constructors): Emit the initialization of this$<n> before
11490 (resolve_qualified_expression_name): Build an access to `decl' if
11493 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
11508 (report_class_declaration): Assign `package_name' and
11509 `current_class' to NULL separately.
11511 2000-07-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11513 * expr.c (build_invokeinterface): Call layout_class_methods on
11516 2000-07-27 Tom Tromey <tromey@cygnus.com>
11517 Anthony Green <green@cygnus.com>
11518 Alexandre Petit-Bianco <apbianco@cygnus.com>
11520 * class.c (make_class_data): Create vtable for abstract classes.
11521 (get_dispatch_table): Changed to cope with abstract classes.
11523 2000-07-27 Tom Tromey <tromey@cygnus.com>
11525 * parse.y (patch_method_invocation): Don't reverse the argument
11526 list when dealing with anonymous class constructors. Fixed typo in
11529 2000-07-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11531 * parse.y (build_alias_initializer_parameter_list): Reverse
11532 crafted list when building aliases for anonymous class
11535 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
11542 2000-07-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
11544 * parse.c: Remove (again.)
11546 2000-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11553 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11555 * parse.y (simple_name:): Fixed typo in error message.
11557 2000-07-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11559 * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11560 or its first operand can be error marks.
11562 2000-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
11564 * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11565 * parse.y (method_header): Likewise.
11567 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11569 * parse.y (process_imports): Consider that one might be trying to
11570 import an innerclass. Fixes gcj/254
11572 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
11574 * parse.y (find_as_inner_class): Handle the case where the
11575 enclosing context of an innerclass has been loaded as bytecode.
11577 2000-07-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11583 2000-07-18 Bryce McKinlay <bryce@albatross.co.nz>
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.
11589 2000-07-18 Jeff Sturm <jeff.sturm@appnet.com>
11591 * lang-specs.h: Added %(jc1) to java compiler options.
11593 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
11595 * .cvsignore: New file.
11597 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11599 * parse.y (not_accessible_p): Access granted to innerclasses
11600 (indirectly) extending the reference type. Fixes gcj/249.
11602 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11608 2000-07-13 Mark Mitchell <mark@codesourcery.com>
11612 2000-07-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
11614 * parse.y (fold_constant_for_init): Avoid bullish conversion.
11616 2000-07-13 Tom Tromey <tromey@cygnus.com>
11618 * lang-specs.h: Added %{I*}.
11620 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
11622 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
11624 2000-07-12 Mark Mitchell <mark@codesourcery.com>
11626 * parse-scan.c: Remove.
11628 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11630 * class.c (set_super_info): Handled protected inner classes.
11631 (common_enclosing_context_p): Bail early if arguments aren't both
11633 (get_access_flags_from_decl): Handle private and protected inner
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.
11644 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11646 * parse.y (resolve_qualified_expression_name): Verify qualified
11647 access to `this'. Fixes gcj/239.
11649 2000-07-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
11651 * jcf-write.c (generate_classfile): Don't install ConstantValue
11654 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
11656 * parse.y (resolve_qualified_expression_name): Handle inner class
11657 access. Fixes gcj/256.
11659 2000-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
11667 2000-07-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
11669 * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
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.
11677 2000-07-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
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'.
11690 2000-07-05 Tom Tromey <tromey@cygnus.com>
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.
11702 2000-07-02 Bryce McKinlay <bryce@albatross.co.nz>
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.
11708 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11710 * parse.y (parser_qualified_classname): Removed parameter
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.
11717 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11719 * parse.y (maybe_generate_pre_expand_clinit): Don't build a
11720 debugable statement with empty_stmt_node. Fixes gcj/272
11722 2000-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11724 * expr.c (build_instanceof): Layout type after it's loaded. Fixes
11727 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11729 * jcf-write.c (push_long_const): Appropriately cast short negative
11732 2000-06-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
11734 * parse.y (verify_constructor_super): Use loop variable
11735 `m_arg_type' initialized with `mdecl_arg_type'.
11737 2000-06-29 Tom Tromey <tromey@cygnus.com>
11739 * parse.y (resolve_field_access): Handle case where `type_found'
11742 2000-06-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11744 * expr.c (lookup_field): The same field can be found through two
11745 different interface. Don't declare it ambiguous in that case.
11747 2000-06-27 Tom Tromey <tromey@cygnus.com>
11749 * lex.c (java_lineterminator): Don't recognize \r after \n. If \r
11750 follows \r, then unget it at a lower level.
11752 2000-06-26 Tom Tromey <tromey@cygnus.com>
11754 * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
11755 java_complete_tree.
11757 2000-06-25 Tom Tromey <tromey@cygnus.com>
11759 * parse.y (for_statement): Wrap expression in a WFL if it is a
11760 constant. For PR gcj/268.
11762 2000-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11769 2000-06-24 Tom Tromey <tromey@cygnus.com>
11771 * expr.c (lookup_field): Print error and return error_mark_node if
11772 field reference is ambiguous.
11774 * parse.y (check_abstract_method_definitions): Also check if
11775 `other_method' is abstract.
11777 2000-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
11779 * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
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.
11787 2000-06-23 Tom Tromey <tromey@cygnus.com>
11789 * parse.y (patch_incomplete_class_ref): Initialize the returned
11790 class. For PR gcj/260.
11792 2000-06-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
11794 * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
11796 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
11818 (resolve_field_access): Make sure `decl' is a DECL before treating
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.
11827 2000-06-16 Per Bothner <per@bothner.com>
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.
11832 2000-06-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11834 * jcf-write.c (CHECK_PUT): Add static prototype. Make pointer
11835 types the same in comparison.
11836 (CHECK_OP): Add static prototype.
11838 2000-06-13 Jakub Jelinek <jakub@redhat.com>
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.
11844 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11846 * decl.c (create_primitive_vtable): Prototype.
11848 * jcf-write.c (generate_bytecode_insns): Initialize variable
11851 * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
11853 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
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.
11861 2000-06-09 Bryce McKinlay <bryce@albatross.co.nz>
11863 * parse.y (register_fields): Permit static fields in inner classes
11864 if they are final. Fix for PR gcj/255.
11866 2000-06-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
11878 (lookup_field_wrapper): Lookup local variables defined in outer
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.
11890 2000-06-06 Tom Tromey <tromey@ferrule.cygnus.com>
11892 * parse.y (check_modifiers_consistency): Don't subtract out
11893 `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
11895 2000-06-04 Philipp Thomas <pthomas@suse.de>
11897 * Makefile.in (INTLLIBS): New.
11901 2000-06-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
11908 2000-06-02 Richard Henderson <rth@cygnus.com>
11910 * lang.c (lang_get_alias_set): New.
11912 2000-05-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
11914 * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
11915 before using it as the accessed field.
11917 2000-05-31 Tom Tromey <tromey@cygnus.com>
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):
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
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.
11932 2000-05-26 Zack Weinberg <zack@wolery.cumb.org>
11934 * java/parse.y (find_applicable_accessible_methods_list):
11935 Don't add an uninitialized value to the list.
11937 2000-05-25 Tom Tromey <tromey@cygnus.com>
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.
11944 * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11945 `wfl_operator', to maybe_build_primttype_type_ref.
11948 2000-05-23 Bryce McKinlay <bryce@albatross.co.nz>
11950 * parse.y (patch_method_invocation): Don't try to lookup methods
11951 in primitive types.
11953 2000-05-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11959 2000-05-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
11961 * parse.y (resolve_package): Correctly set `*next' (was off by
11963 (resolve_qualified_expression_name): Fixed comment.
11965 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11967 * jcf-parse.c (jcf_parse_source): Reset current_class and
11968 current_function_decl to NULL before parsing a new file.
11970 2000-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
11972 * parse.y (block_end:): If the collected block doesn't feature a
11973 statement, insert an empty statement.
11975 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
11983 2000-04-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
11985 * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11986 processed by the method's switch statement.
11988 2000-05-19 Tom Tromey <tromey@cygnus.com>
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.
11994 2000-05-19 Tom Tromey <tromey@cygnus.com>
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.
12004 2000-05-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
12006 * jcf-write.c (generate_classfile): Scan the source_file for
12007 slashes with the right pointer variable.
12009 2000-05-17 Andrew Cagney <cagney@b1.cygnus.com>
12011 * lang.c (lang_decode_option): Update -Wunused flags by calling
12013 * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12015 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
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
12022 (find_class): Remove redundant string copy. Cast return from
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
12036 * parse.c: Regenerate.
12038 2000-05-08 Tom Tromey <tromey@cygnus.com>
12040 * expr.c (build_jni_stub): Cache the result of
12041 _Jv_LookupJNIMethod.
12043 2000-05-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12045 * decl.c (predef_filenames_size): Now 7.
12046 (predef_filenames): New seventh entry.
12048 2000-05-04 Tom Tromey <tromey@cygnus.com>
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.
12059 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12061 * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12062 specifiers in calls to fprintf.
12064 2000-05-03 Andrew Haley <aph@cygnus.com>
12066 * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12068 * javaop.h (WORD_TO_INT): New function.
12069 (IMMEDIATE_s4): Use WORD_TO_INT.
12070 * jcf.h (JPOOL_INT): Ditto.
12072 * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12075 2000-04-19 Tom Tromey <tromey@cygnus.com>
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
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):
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
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
12102 * java-tree.def: Put into `C' mode.
12104 2000-04-27 Tom Tromey <tromey@cygnus.com>
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.
12116 2000-04-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
12118 * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12121 2000-04-26 Tom Tromey <tromey@cygnus.com>
12123 * zextract.c (find_zip_file_start): New function.
12124 (read_zip_archive): Use it.
12126 2000-04-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12128 * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12130 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12142 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12144 * parse.y (end_class_declaration): Reset the interface number
12147 2000-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
12149 * parse.y (source_start_java_method): Deleted unnecessary code.
12150 (patch_method_invocation): Fixed comment.
12152 2000-04-24 Robert Lipe <robertlipe@usa.net>
12154 * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12156 2000-04-23 Tom Tromey <tromey@cygnus.com>
12158 * boehm.c (mark_reference_fields): Use int_byte_position.
12160 2000-04-22 Tom Tromey <tromey@cygnus.com>
12162 * boehm.c (mark_reference_fields): Only call byte_position on
12165 2000-04-22 Tom Tromey <tromey@cygnus.com>
12167 * boehm.c (mark_reference_fields): Added `last_view_index'
12168 argument. Use DECL_FIELD_OFFSET to determine field's offset.
12170 2000-04-20 Mo DeJong <mdejong@cygnus.com>
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.
12177 2000-04-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
12184 2000-04-20 Tom Tromey <tromey@cygnus.com>
12186 * parse.y (not_accessible_p): Use member's class, not current
12187 class, when doing inheritance check for protected reference.
12190 2000-04-20 Jason Schroeder <shrode@subnature.com>
12192 * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12194 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12202 2000-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
12204 * parse.y (yyerror): `msg' can be null, don't use it in that case.
12206 2000-04-19 Tom Tromey <tromey@cygnus.com>
12208 * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12210 2000-04-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
12212 * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12214 2000-04-18 Tom Tromey <tromey@cygnus.com>
12217 * gjavah.c (utf8_cmp): Changed return value.
12218 (cxx_keyword_subst): Handle all C++ keywords. Allocate new return
12220 (cxx_keywords): New global.
12221 (get_field_name): Handle new result of cxx_keyword_subst.
12222 (print_method_info): Likewise.
12224 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz>
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.
12233 2000-04-16 Tom Tromey <tromey@cygnus.com>
12235 * gjavah.c (decompile_method): Use print_field_name.
12238 2000-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
12243 (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12244 the `==' and `!=' operators.
12246 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12248 * jcf-write.c (generate_bytecode_insns): At invocation time,
12249 always relate an interface method to the type of its selector.
12251 2000-04-05 Tom Tromey <tromey@cygnus.com>
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.
12263 2000-04-05 Tom Tromey <tromey@cygnus.com>
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.
12269 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12271 * class.c (decl_hash): Prototype removed.
12272 (decl_compare): Likewise.
12274 2000-04-05 Tom Tromey <tromey@cygnus.com>
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.
12280 2000-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
12282 * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12284 (java_hash_compare_tree_node): Renamed from `decl_compare, made
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.
12293 2000-04-03 Matt Welsh <mdw@cs.berkeley.edu>
12295 * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12298 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12300 * boehm.c (mark_reference_fields, set_bit): Prototype.
12301 (set_bit): Un-ANSI-fy definition.
12303 * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12306 * decl.c (emit_init_test_initialization): Likewise.
12308 * gjavah.c (jni_print_char): Likewise.
12310 * parse.y (create_new_parser_context): Likewise.
12312 2000-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
12314 * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12315 patch missing hunk. Fixed indentation.
12317 2000-03-30 Tom Tromey <tromey@cygnus.com>
12319 * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12320 HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12322 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12328 2000-03-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12330 * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12331 to 0 when it reaches -1.
12333 2000-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
12343 2000-03-26 Tom Tromey <tromey@cygnus.com>
12345 * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12346 Java-specific `-f' option.
12348 2000-03-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12350 * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12351 Adjust order of making types.
12352 Make bitsize_*_node values.
12354 2000-03-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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
12362 2000-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12377 2000-03-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
12379 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12380 properly initialize `finished_label'. Don't emit gotos for empty
12383 2000-03-19 Martin v. Loewis <loewis@informatik.hu-berlin.de>
12385 * except.c (emit_handlers): Clear catch_clauses_last.
12387 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12389 * parse.y (check_method_types_complete): New function.
12390 (create_class): Reset anonymous class counter only when seeing an
12392 (java_complete_class): JDEP_METHOD: Don't recompute signature
12395 2000-03-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12412 2000-03-17 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
12422 2000-03-16 Tom Tromey <tromey@cygnus.com>
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.
12435 2000-03-16 Tom Tromey <tromey@cygnus.com>
12437 * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12439 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12441 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12443 * parse.y (patch_method_invocation): Handle anonymous classes
12444 creation in static context.
12446 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12448 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12449 * parse.y (resolve_qualified_expression_name): Use it.
12450 (patch_method_invocation): Likewise.
12452 2000-03-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12454 * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12455 depending on the type of dependency which dictates what the
12457 (unresolved_type_p): Resolved types limited to the current class.
12459 2000-03-15 Tom Tromey <tromey@cygnus.com>
12461 * decl.c (init_decl_processing): Set type of `sync_info' to be
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.
12470 2000-03-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
12472 * parse.y (register_incomplete_type): Fixed initialization of
12475 2000-02-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
12477 * parse-scan.y (inner_qualifier, inner_qualifier_length): New
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.
12486 2000-02-14 Andrew Haley <aph@cygnus.com>
12488 * check-init.c (check_init): Add new cases for unary and binary
12491 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12502 2000-03-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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'
12525 2000-03-13 Hans Boehm <boehm@acm.org>
12527 * typeck.c (build_prim_array_type): Correctly set the high word too.
12529 2000-03-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12531 * parse.y (java_complete_expand_methods): Leave <clinit> out of
12533 (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12534 list of methods for interfaces.
12536 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12538 * parse.y (qualify_ambiguous_name): Properly handle expressions
12541 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
12543 * parse.y (check_final_assignment): Extended to process
12545 (patch_assignment): Have check_final_assignment called only once.
12547 2000-03-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12556 2000-03-06 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
12564 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
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
12578 2000-03-06 Bryce McKinlay <bryce@albatross.co.nz>
12580 * typeck.c (lookup_do): Search superinterfaces first
12581 when looking up an interface method. From Godmar Back
12582 <gback@cs.utah.edu>
12584 2000-03-06 Tom Tromey <tromey@cygnus.com>
12586 * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12588 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12604 2000-03-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
12606 * check-init.c (check_init): Removed dead code. Handle (blank)
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.
12612 2000-02-17 Tom Tromey <tromey@cygnus.com>
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.
12627 2000-03-03 Per Bothner <per@bothner.com>
12629 * decl.c (init_decl_processing): Initialize sizetype properly.
12631 2000-03-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12661 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
12663 * decl.c (current_function_decl): Move to toplev.c.
12665 2000-02-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
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.
12671 2000-02-27 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12673 * expr.c (build_java_ret): Pass proper type to size_binop.
12675 2000-02-25 Anthony Green <green@cygnus.com>
12677 * expr.c (build_class_init): Mark the decl to be ignored by
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
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.
12698 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12700 * gjavah.c (main): Avoid using `argi' to report unimplemented
12703 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
12705 * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12706 initialize locals to avoid warnings. Local `exception_type' moved
12709 2000-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
12716 2000-02-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12724 2000-02-23 Tom Tromey <tromey@cygnus.com>
12726 * gjavah.c (print_name): In JNI case, correctly quote string.
12727 (print_method_info): Don't handle overrides in JNI mode.
12729 2000-02-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
12731 * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
12732 value type set to `boolean_type_node'.
12734 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
12736 * jcf-dump.c (main): Test for correct condition after
12737 output file creation.
12739 2000-02-19 Anthony Green <green@cygnus.com>
12741 * jcf-depend.c (add_entry): Fix test for first list entry.
12743 2000-02-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12745 * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
12746 * constants.c (build_constants_constructor): Likewise.
12748 2000-02-19 Anthony Green <green@cygnus.com>
12750 * jcf-depend.c (add_entry): Add entries to the end of the list.
12752 1999-11-03 Pekka Nikander <pekka.nikander@hut.fi>
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.
12758 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
12760 * gjavah.c (help): Use GCCBUGURL.
12761 * jv-scan.c (help): Likewise.
12762 * jcf-dump.c (help): Likewise.
12764 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12766 * jcf-write.c (generate_bytecode_insns): Don't generate empty
12769 2000-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
12771 * jcf-parse.c (load_class): Call `fatal' if no file containing
12772 the target class are found.
12774 2000-02-16 Zack Weinberg <zack@wolery.cumb.org>
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.
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.
12784 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12786 * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
12788 2000-02-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
12790 * parse.y (outer_field_access_p): Stop in time when outer contexts
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.
12797 2000-02-15 Tom Tromey <tromey@cygnus.com>
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.
12804 2000-02-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12806 * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
12808 (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
12810 * gjavah.c: Include version.h.
12812 * jcf-dump.c: Likewise.
12814 * jv-scan.c: Likewise.
12816 2000-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
12830 2000-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
12842 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
12848 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12850 * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
12851 decodes a valid node.
12852 (patch_binop): Handle TRUNC_DIV_EXPR.
12854 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
12856 * parse.y (resolve_package): New local `acc'. Try to progressively
12857 build and guess a package and type name.
12859 2000-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
12866 2000-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
12868 * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
12869 Generate error message if circularity is detected. New static
12871 * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro. *
12872 * jcf-write.c (generate_bytecode_insns): Very simply handle
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.
12879 2000-02-09 Tom Tromey <tromey@cygnus.com>
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.
12885 2000-02-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12887 * except.c (check_start_handlers): Re-add prototype lost in last
12889 (maybe_start_try): Remove excess argument to `check_start_handlers'.
12891 2000-02-09 Andrew Haley <aph@cygnus.com>
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.
12898 2000-02-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
12922 2000-02-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
12930 (build_outer_field_access): Turned on access functions usage and
12931 generation when compiling to bytecode.
12932 (maybe_use_access_method): Likewise.
12934 2000-01-25 Andrew Haley <aph@cygnus.com>
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
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
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
12953 (maybe_poplevels): Call maybe_end_try when popping binding levels.
12954 (LARGEST_PC): Define.
12955 (clear_binding_level): Use LARGEST_PC.
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.
12967 (start_java_method): ditto.
12968 (give_name_to_locals): comment only.
12969 * except.c (binding_depth, is_class_level, current_pc):
12971 (expand_start_java_handler): add debugging info.
12972 (expand_end_java_handler): ditto.
12974 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12976 * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12977 (print_name_for_stub_or_jni, process_file): Constify a char*.
12979 2000-02-03 Tom Tromey <tromey@cygnus.com>
12981 * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12983 2000-01-31 Scott Bambrough <scottb@netwinder.org>
12985 * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12986 assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12989 2000-02-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
13020 2000-02-03 Tom Tromey <tromey@cygnus.com>
13022 * Make-lang.in (java.mostlyclean): Remove executables in
13025 2000-01-31 Scott Bambrough <scottb@netwinder.org>
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.
13032 2000-02-02 Tom Tromey <tromey@cygnus.com>
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
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.
13056 2000-02-02 Tom Tromey <tromey@cygnus.com>
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.
13082 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
13093 2000-02-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
13111 (method_header): Compute and set DECL_FUNCTION_NAP.
13112 (method_declarator): Fixed comment. Insert alias initializer in
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
13119 (java_complete_expand_methods): New local `first_decl'. Generate
13120 $finit$ first, then expand the constructors, regular methods and
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.
13128 2000-01-30 Anthony Green <green@redhat.com>
13130 * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13131 determine how many stack slots to pop.
13133 2000-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
13139 2000-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
13186 (complete_expand_class): Get rid of unused outer context local
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.
13205 2000-01-27 Andrew Haley <aph@cygnus.com>
13207 * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13211 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13213 * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13215 (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
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
13222 (check_modifiers): Change function into a macro.
13223 (check_class_interface_creation): Pass a literal format string.
13225 2000-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
13245 * jv-scan.c: Likewise.
13246 * jvgenmain.c: Likewise.
13247 * jvspec.c: Likewise.
13248 * lang.c: 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.
13261 2000-01-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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>
13312 * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13313 MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13314 (set_java_signature): Likewise.
13316 2000-01-18 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
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.
13325 2000-01-17 Joerg Brunsmann <joerg.brunsmann@fernuni-hagen.de>
13327 * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13328 (final:): New rule.
13330 2000-01-17 Tom Tromey <tromey@cygnus.com>
13332 * gjavah.c (print_field_info): Allow non-static final fields.
13334 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
13343 2000-01-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
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
13384 (search_loop): Use FOR_LOOP_P.
13385 (labeled_block_contains_loop_p): Likewise.
13387 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
13394 (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
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
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
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):
13438 (java_parser_context_push_initialized_field,
13439 java_parser_context_suspend, java_parser_context_resume):
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
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>
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
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
13513 (resolve_no_layout): Extra argument added to resolve_class
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
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
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
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
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
13563 2000-01-16 Anthony Green <green@cygnus.com>
13565 * parse.y (build_string_concatenation): Only use
13566 StringBuffer(String) shortcut if String arg is constant.
13568 2000-01-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13570 * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13571 the shift value to int. Fixed typo in comment.
13573 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
13575 * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13576 * jcf-write.c: Likewise.
13577 * parse.y: Likewise.
13578 * parse.c: Regenerate.
13580 2000-01-09 Anthony Green <green@cygnus.com>
13582 * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13583 bytecodes in the correct order.
13585 2000-01-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13587 * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13589 2000-01-06 Anthony Green <green@cygnus.com>
13591 * expr.c (java_lang_expand_expr): Switch to permanent obstack
13592 before building constant array decl.
13594 2000-01-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
13603 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13605 * class.c (assume_compiled, assume_compiled_node): Add static
13607 (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13609 * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13611 * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13613 * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13614 to `__modifier' to avoid stringifying it.
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.
13622 * expr.c (expand_java_field_op): Avoid the use of ANSI string
13625 * jcf-parse.c (yyparse): Likewise.
13627 * jv-scan.c (main): Likewise.
13629 1999-12-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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
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.
13653 1999-12-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
13686 1999-12-17 Tom Tromey <tromey@cygnus.com>
13688 * gjavah.c (decode_signature_piece): Print "::" in JArray<>. This
13690 (process_file): Use `\n\' at end of each line in string.
13692 1999-12-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
13698 * typeck.c (convert): Return error_mark_node if expr is null.
13700 1999-12-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
13702 * class.c (class_depth): Return -1 if the class doesn't load
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
13725 1999-12-14 Per Bothner <per@bothner.com>
13727 * class.c (make_class_data): flag_keep_inline_functions to keep
13728 private methods in the method array.
13730 1999-12-15 Anthony Green <green@cygnus.com>
13732 * check-init.c (check_init): Take into account both types of
13733 `throw's when checking for uninitialized variables.
13735 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
13737 * parse.y (java_complete_lhs): Force conversion of array
13738 dimensions to int_type_node, that's what runtime's ABI expects.
13740 1999-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.)
13746 1999-12-10 Andrew Haley <aph@cygnus.com>
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.
13754 1999-12-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
13763 1999-12-5 Anthony Green <green@cygnus.com>
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
13770 1999-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13772 * except.c (expand_end_java_handler): Call
13773 expand_resume_after_catch and end_catch_handler.
13775 1999-11-30 Anthony Green <green@cygnus.com>
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
13781 1999-11-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
13783 * jcf-write.c (generate_bytecode_insns): Fixed indentation for
13784 COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
13786 * parse.y (patch_assignment): Removed bogus final class test on
13787 lhs when checking on whether to emit an ArrayStoreException runtime
13789 * expr.c (expand_java_arraystore): Likewise.
13791 1999-11-28 Anthony Green <green@cygnus.com>
13793 * decl.c (find_local_variable): Reuse single slot decls when
13796 1999-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
13802 1999-11-24 Mark Mitchell <mark@codesourcery.com>
13804 * except.c (emit_handlers): Zero catch_clauses after emitting them.
13806 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13808 * verify.c (merge_type_state): Non verified subroutines being
13809 considered more than once to trigger passive type merge.
13811 1999-11-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
13813 * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
13814 in case of error. Error message tuned.
13816 1999-11-21 Anthony Green <green@cygnus.com>
13818 * constants.c (find_methodref_index): Unwrap method names before
13819 inserting them in the constant pool.
13821 * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
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.
13831 * java-tree.h (add_assume_compiled): Declare.
13833 * lang.c (lang_decode_option): Parse new options.
13835 1999-11-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
13837 * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
13838 int_type_node: that's what `_Jv_AllocObject' expects.
13840 1999-11-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
13842 * parse.y (lookup_method_invoke): Use lang_printable_name to
13843 reliably build the type name during error report. Fixes PR gcj/97.
13845 1999-11-09 Tom Tromey <tromey@cygnus.com>
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.
13851 1999-11-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
13858 1999-11-05 Tom Tromey <tromey@cygnus.com>
13860 * class.c (finish_class): Emit inlined methods if any native
13861 methods exist in the class. Fixes PR gcj/85.
13863 1999-11-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
13865 * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
13866 (qualify_ambiguous_name): Likewise.
13868 1999-11-03 Godmar Back <gback@cs.utah.edu>
13870 * typeck.c: (lookup_java_method): search all inherited
13871 interfaces when looking up interface method.
13873 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
13875 * parse.y (method_header:): Issue error message for rule `type
13877 (synchronized:): Error report when not using synchronized.
13879 1999-11-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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'.
13886 1999-10-30 Todd T. Fries <todd@lighthouse.fries.net>
13888 * check-init.c: Fix typo in comment.
13890 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13892 * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
13895 1999-10-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
13897 * parse.y (expression_statement:): Call function to report
13898 improper invocation of a constructor.
13899 (parse_ctor_invocation_error): New function.
13901 1999-10-26 Mark Mitchell <mark@codesourcery.com>
13903 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
13906 1999-10-21 Tom Tromey <tromey@cygnus.com>
13908 * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
13909 in generated `main'.
13911 1999-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
13913 * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
13914 (qualify_ambiguous_name): Likewise.
13916 1999-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
13918 * parse.y (java_complete_tree): fold_constant_for_init to work on
13920 (java_complete_lhs): Likewise.
13921 (array_constructor_check_entry): Complete an initializer element
13922 on permanent_obstack.
13924 1999-10-19 Tom Tromey <tromey@cygnus.com>
13926 * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
13927 From Mike Moreton <mike@pillim.demon.co.uk>.
13929 1999-10-15 Greg McGary <gkm@gnu.org>
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".
13936 1999-10-14 Tom Tromey <tromey@cygnus.com>
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.
13943 * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13945 1999-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13947 * jcf-dump.c (print_constant, disassemble_method): Don't call a
13948 variadic function with a non-literal format string.
13950 * parse-scan.y (report_main_declaration): Likewise.
13952 * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13954 * parse.y (read_import_dir, patch_assignment, patch_binop,
13955 patch_array_ref): Likewise.
13957 * typeck.c (build_java_array_type): Likewise.
13959 * verify.c (verify_jvm_instructions): Likewise.
13961 1999-10-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
13963 * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13965 1999-10-07 Anthony Green <green@cygnus.com>
13967 * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13968 where CHECK_PUT may fail for valid reasons.
13970 * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13971 UNSAFE_PUTN): New macros.
13973 1999-10-04 Tom Tromey <tromey@cygnus.com>
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.
13979 1999-09-24 Glenn Chambers <GChambers@provsol.com>
13981 * decl.c (insert_block): Remove unconditional `abort'.
13983 1999-09-24 Bernd Schmidt <bernds@cygnus.co.uk>
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.
13989 1999-09-23 Tom Tromey <tromey@cygnus.com>
13991 * jvspec.c (lang_specific_driver): Don't read spec file if
13992 -fsyntax-only given.
13994 1999-09-22 Tom Tromey <tromey@cygnus.com>
13996 * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13998 * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13999 (WORDS_TO_LONG): Likewise.
14000 (WORDS_TO_DOUBLE): Likewise.
14002 1999-09-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
14023 1999-09-15 Andreas Schwab <schwab@suse.de>
14025 * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14027 1999-09-20 Nick Clifton <nickc@cygnus.com>
14029 * lang.c (lang_decode_option): Extend comment.
14031 1999-09-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
14033 * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14036 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14038 * gjavah.c (get_field_name, print_method_info, print_include,
14039 add_namelet): Use xmalloc, not malloc.
14041 * jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
14042 (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14045 * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14047 * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14049 * jcf-path.c (add_entry): Likewise.
14051 * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14053 * jv-scan.c (xmalloc): Remove definition.
14055 * jvgenmain.c (xmalloc): Likewise.
14057 * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14059 * lex.c (java_store_unicode): Use xrealloc, not realloc.
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.
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.
14074 * zextract.c (ALLOC): Use xmalloc, not malloc.
14076 1999-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14078 * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
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):
14085 (lang_specific_driver): All calls to the function pointer
14086 parameter now explicitly call `fatal'.
14088 1999-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14090 * parse.y (find_applicable_accessible_methods_list): Search
14091 abstract classes as interfaces.
14093 1999-09-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
14095 * class.c (finish_class): We're now outside a valid method
14096 declaration. Tell the rest of gcc so.
14098 1999-09-08 Bruce Korb autogen@linuxbox.com
14100 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14102 1999-09-07 Tom Tromey <tromey@cygnus.com>
14104 * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14106 (decode_signature_piece): Don't emit "::" in JArray<>.
14107 (print_namelet): Only print trailing `;' when printing a class.
14109 1999-09-10 Bernd Schmidt <bernds@cygnus.co.uk>
14111 * java-tree.h: Delete declarations for all tree nodes now moved to
14113 * decl.c: Delete their definitions.
14115 1999-09-04 Mark Mitchell <mark@codesourcery.com>
14117 * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14118 * Makefile.in (OBJS): Add ggc-callbacks.o.
14119 (OBJDEPS): Likewise.
14121 1999-09-03 Tom Tromey <tromey@cygnus.com>
14123 * parse.y (strip_out_static_field_access_decl): Return operand if
14124 it satisfies JDECL_P.
14126 1999-09-02 Tom Tromey <tromey@cygnus.com>
14128 * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14129 Handle nested arrays, like `[[I'.
14131 1999-09-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14133 * class.c (finish_class): Remove unused parameter, all callers
14136 * expr.c (build_java_athrow): Change return type to void.
14137 (java_lang_expand_expr): Make sure each case in switch returns a
14140 * java-tree.h (finish_class): Fix prototype to take void args.
14142 * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14143 (main): Issue return from main, not exit.
14145 * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14147 * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14149 * jv-scan.c (main): Issue return from main, not exit.
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'.
14155 * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14158 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14160 * lang.c (language_string): Constify.
14162 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14164 * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14165 Remove hacks for stuff which comes from libiberty.
14167 * Make-lang.in: Likewise.
14169 1999-08-30 Hans-Peter Nilsson <hp@axis.se>
14171 * Makefile.in (xref.o): Depend on xref.c explicitly.
14173 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14175 * java-tree.h (lang_printable_name): Constify a char*.
14177 * lang.c (lang_printable_name): Likewise.
14179 1999-08-27 Jeffrey A Law (law@cygnus.com)
14181 * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14182 comments in C code.
14184 1999-08-26 Tom Tromey <tromey@cygnus.com>
14186 * gjavah.c (print_cxx_classname): Print "::" before qualified
14189 1999-08-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14195 1999-08-25 Gregg Townsend <gmt@cs.arizona.edu>
14197 * verify.c (verify_jvm_instructions): Don't check instruction
14198 validity beyond end of method.
14200 1999-08-25 Tom Tromey <tromey@cygnus.com>
14202 * jvspec.c (lang_specific_driver): Correctly handle --help again.
14204 1999-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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
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*.
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.
14234 * jv-scan.c: Include "jcf.h".
14235 (main): Declare using DEFUN macro.
14237 * jvspec.c (find_spec_file, lang_specific_pre_link,
14238 lang_specific_driver): Add prototypes.
14239 (find_spec_file): Constify a char*.
14241 * keyword.gperf (hash, java_keyword): Add prototypes.
14243 * lang.c (lang_print_error): Add static prototype.
14244 (lang_init): Prefer memcpy over bcopy to avoid casts.
14246 * lex.c (yylex): Add static prototype.
14248 * parse-scan.y: Include "lex.c" earlier.
14250 * parse.h: Remove redundant declaration for `yylex'.
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.
14256 * verify.c (start_pc_cmp): Don't needlessly cast away const.
14258 1999-08-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14267 1999-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
14273 (source_start_java_method): Likewise.
14274 (java_method_add_stmt): Likewise.
14276 1999-08-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
14278 * class.c (emit_register_class): Removed unnecessary call to
14280 * parse.y (labeled_block_contains_loop_p): Removed unused local
14283 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14285 * parse.y (java_refold): Added prototype.
14287 1999-08-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
14302 (patch_bc_statement): Call search_loop. Fixed comment.
14304 1999-08-14 Anthony Green <green@cygnus.com>
14306 * expr.c (java_lang_expand_expr): Mark static array data as
14309 1999-08-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
14311 * jvgenmain.c (main): NUL-terminate name_obstack.
14313 1999-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14315 * check-init.c (check_bool2_init, done_alternative): Add static
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*.
14322 * decl.c (push_promoted_type, make_binding_level): Add static
14324 (push_promoted_type, pushdecl): Constify a char*.
14326 * except.c (find_handler_in_range, link_handler,
14327 check_start_handlers): Add static prototypes.
14329 * expr.c (process_jvm_instruction): Constify a char*.
14331 * gjavah.c (main): Constify a char*.
14333 * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14336 * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14338 (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14339 munge, print_ents): Constify a char*.
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):
14346 * jcf-io.c (find_classfile, find_class): Likewise.
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*.
14353 * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14355 (add_entry, add_path, jcf_path_classpath_arg,
14356 jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
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*.
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*.
14368 * jv-scan.c (main): Constify a char*.
14369 (gcc_obstack_init): Add prototype arguments.
14371 * jvgenmain.c (gcc_obstack_init): Likewise.
14372 (main): Constify a char*.
14374 * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14376 (put_decl_string, lang_print_error): Constify a char*.
14377 (lang_init): Remove redundant extern prototype.
14379 * mangle.c (emit_unicode_mangled_name): Constify a char*.
14381 * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14382 Add static prototypes.
14383 (get_type_from_signature): Constify a char*.
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*.
14390 * xref.c (xref_flag_value): Likewise.
14392 * xref.h (xref_flag_value): Likewise.
14394 * zextract.c (makeword, makelong): Add static prototypes.
14395 (makeword, makelong): Constify a uch*.
14397 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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*.
14405 1999-08-09 Tom Tromey <tromey@cygnus.com>
14407 * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14408 (WORDS_TO_LONG): Likewise.
14409 (WORDS_TO_DOUBLE): Likewise.
14411 1999-08-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14413 * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
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*.
14421 * java-tree.h (build_primtype_type_ref, linenumber_table):
14423 (java_lang_expand_expr): Add prototype.
14425 * lang.c: Include rtl.h and expr.h. Remove extern prototype for
14426 `java_lang_expand_expr'.
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.
14432 * parse-scan.y (current_class, package_name, method_declarator,
14433 report_class_declaration, yyerror): Constify a char*.
14435 * parse.h (java_report_errors): Prototype.
14436 (yyerror): Constify a char*.
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):
14458 (java_complete_expand_methods, java_expand_finals): Make static.
14459 (convert_narrow): Remove static prototype.
14461 1999-08-03 J"orn Rennecke <amylaar@cygnus.co.uk>
14463 * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14465 1999-08-02 Richard Henderson <rth@cygnus.com>
14467 * decl.c: Include defaults.h instead of expr.h.
14468 * parse.y: Likewise.
14470 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
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.
14478 1999-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14480 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14482 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
14484 * decl.c: Include "function.h".
14485 * except.c: Likewise.
14486 * parse.y: Likewise.
14487 * Makefile.in: Update dependencies.
14489 1999-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
14495 * gjavah.c (process_file): Add braces around ambiguous `else'.
14497 * jcf-dump.c (print_access_flags, localvar_free): Change return
14500 * parse.y (java_complete_expand_method): Initialize variable
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'.
14507 * verify.c (verify_jvm_instructions): Remove unused variable
14510 1999-07-25 Richard Henderson <rth@cygnus.com>
14512 * decl.c (va_list_type_node): New.
14514 1999-07-25 Anthony Green <green@cygnus.com>
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
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.
14533 1999-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14535 * check-init.c (check_init): Handle MAX_EXPR.
14537 1999-07-15 Andrew Haley <aph@cygnus.com>
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
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.
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
14563 1999-07-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
14565 * parse.y (resolve_and_layout): Check methods only once.
14566 (resolve_qualified_expression_name): Verify thrown exceptions
14568 (check_thrown_exceptions): Reject exceptions thrown in
14569 initializer. Error message tuned.
14571 1999-07-14 Andrew Haley <aph@cygnus.com>
14573 * expr.c (expand_expr): Do not return the last statement in a
14574 block as the block's value.
14576 1999-07-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
14578 * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14579 CALL_EXPR, to avoid order of evaluation changes.
14581 1999-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
14583 * parse.y (qualify_ambiguous_name): Do not use
14584 IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14586 1999-07-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14594 1999-06-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14596 * parse.y (patch_invoke): Resolve unresolved invoked method
14598 (qualify_ambiguous_name): STRING_CST to qualify expression for
14599 type name resolution.
14601 1999-06-24 Andrew Haley <aph@cygnus.com>
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.
14607 1999-06-28 Tom Tromey <tromey@cygnus.com>
14609 * jvspec.c (lang_specific_driver): Recognize --help.
14611 1999-06-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14613 * parse.y (resolve_package): Fixed bogus return statement.
14614 (patch_method_invocation): Resolve method invocation beginning with
14615 a package name qualifier.
14617 1999-06-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
14624 1999-06-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14629 1999-06-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14636 1999-06-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14642 1999-06-22 Andrew Haley <aph@cygnus.com>
14644 * verify.c (verify_jvm_instructions): Check for pending blocks
14645 before invalid PC test and opcode switch, not after.
14647 1999-06-21 Andrew Haley <aph@cygnus.com>
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
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'.
14661 1999-06-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14663 * parse.y (qualify_ambiguous_name): Reorganized the post
14664 evaluation of non WFL leading expression nodes.
14666 1999-06-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
14668 * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14671 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
14673 * parse.y (qualify_ambiguous_name): Handle qualified expression
14674 beginning with a STRING_CST.
14676 1999-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
14689 1999-06-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
14691 * parse.y (note_possible_classname): Mark returned node with
14692 QUALIFIED_P only if the original class name contained a '/'.
14694 1999-06-05 Anthony Green <green@cygnus.com>
14696 * Make-lang.in (gcjh): More parallel build fixes.
14698 1999-06-03 Mike Stump <mrs@wrs.com>
14700 * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
14702 1999-06-02 Anthony Green <green@cygnus.com>
14704 * except.c (link_handler): Chain exception handlers in order.
14706 1999-06-02 Anthony Green <green@cygnus.com>
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.
14712 1999-06-02 Anthony Green <green@cygnus.com>
14714 * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
14717 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14719 * parse.y (lookup_field_wrapper): Unified returned value to NULL
14720 or the searched field decl.
14722 1999-05-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
14724 * parse.y (fold_constant_for_init): Convert numerical constant
14725 values to the type of the assigned field.
14727 1999-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
14729 * expr.c (lookup_field): Relaxed the test on class loading error
14731 * parse.y (fold_constant_for_init): Enabeled old code.
14733 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14735 * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
14736 decide the validity of the cast of a java.lang.Cloneable reference
14738 (patch_conditional_expr): Fixed first argument passed to
14739 binary_numeric_promotion.
14741 1999-05-26 Alexandre Petit-Bianco <apbianco@cygnus.com>
14743 * parse.y (qualify_ambiguous_name): Take into account that a
14744 CONVERT_EXPR might specify a type as a WFL.
14746 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14748 * parse.y (patch_assignment): Save the rhs before using it as an
14749 argument to _Jv_CheckArrayStore.
14751 1999-05-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
14753 * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
14755 1999-05-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
14757 * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
14758 floating point literal only when the exponent indicator has been
14761 1999-05-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
14763 * parse.y (formal_parameter:): Construct argument tree list
14764 element even if a yet unsupported final parameter was encountered.
14766 1999-05-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
14772 1999-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14774 * class.c (build_utf8_ref): Initialize variable `field'.
14776 * decl.c (init_decl_processing): Initialize variable `field'.
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'.
14782 * jvspec.c (lang_specific_driver): Mark variables `saw_math',
14783 `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
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'
14790 (patch_binop): Likewise for variable `prom_type'.
14791 (patch_unaryop): Likewise for variable `prom_type'.
14793 * verify.c (verify_jvm_instructions): Likewise for variable `last'.
14795 * xref.c (xref_table): Add missing initializer.
14797 1999-05-14 Tom Tromey <tromey@cygnus.com>
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
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
14808 (check_nested_ranges): New function.
14809 (link_handler): Changed interface to allow merging of eh_ranges.
14810 Split overlapping ranges. Return `void'.
14812 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14814 * parse.y (constructor_block_end:): New rule, tagged <node>.
14815 (constructor_body:): Use `constructor_block_end' instead of
14818 1999-05-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
14820 * parse.y (statement_nsi:): Pop `for' statement block.
14821 (java_complete_lhs): Labeled blocks containing no statement are
14822 marked as completing normally.
14824 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14826 * xref.c (xref_set_current_fp): New function, defined.
14827 * xref.h (xref_set_current_fp): New function, prototyped.
14829 1999-05-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
14831 * check-init.c (check_init): Take into account that
14832 LABELED_BLOCK_STMT can be empty.
14834 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
14843 1999-05-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
14855 (patch_binop): Skip the fold part when doing xrefs.
14856 (build_string_concatenation): Skip the concatenation part when
14858 (patch_synchronized_statement): Do not generate a try-finally when
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
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.
14869 1999-05-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14871 * gjavah.c (print_include): Cast the result of `strlen' to int
14872 when comparing against a signed value.
14873 (add_namelet): Likewise.
14875 1999-05-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14877 * expr.c (expand_invoke): Mark parameter `nargs' with
14879 (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
14881 * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
14884 * jcf-reader.c (get_attribute): Cast a value to long
14885 when comparing against a signed expression. Likewise.
14887 * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
14888 HOST_BITS_PER_CHAR.
14890 1999-05-11 Andrew Haley <aph@cygnus.com>
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.
14897 1999-05-11 Tom Tromey <tromey@cygnus.com>
14899 * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
14901 * jvspec.c (THREAD_NAME): Removed.
14902 (GC_NAME): Likewise.
14903 (MATHLIB): Likewise.
14904 (WITHLIBC): 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.
14914 1999-05-11 Dave Brolley <brolley@cygnus.com>
14916 * lang-options.h: -MD, -MMD, -M and -MM not needed here for
14917 cpplib-enabled build.
14919 1999-05-05 Per Bothner <bothner@cygnus.com>
14921 * class.c (make_field_value): DECL_INITIAL may be a string literal;
14922 temporarily zero it while calling rest_of_decl_compilation.
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.
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.
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.
14944 * verify.c (verify_jvm_instructions): Better error messages.
14946 1999-05-03 Tom Tromey <tromey@cygnus.com>
14948 * parse-scan.y (interface_declaration): Call
14949 report_class_declaration for interfaces.
14951 1999-04-30 20:54 -0400 Zack Weinberg <zack@rabi.columbia.edu>
14953 * Makefile.in: Remove -v from bison command lines.
14955 1999-04-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
14957 * check-init.c (check_init): Exclude a case of error when doing
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
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
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
14996 (java_complete_lhs): Likewise.
14998 1999-04-29 Anthony Green <green@cygnus.com>
15000 * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15001 create internal labels.
15002 (lookup_label): Ditto.
15004 1999-04-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
15006 * class.c (layout_class_method): Generate <clinit>'s rtl for
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
15028 (patch_array_ref): Don't fully expand array references when
15030 (patch_return): Use IS_CLINIT.
15031 (patch_throw_statement): Likewise.
15033 1999-04-22 Tom Tromey <tromey@cygnus.com>
15035 * Make-lang.in (JAVA_SRCS): Added check-init.c.
15037 1999-04-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
15039 * decl.c (predef_filenames, predef_filenames_size): New globals
15040 (init_decl_processing): predef_filenames and predef_filenames_size
15042 * java-tree.h (predef_filenames, predef_filenames_size): Declared
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.
15054 1999-04-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
15076 1999-04-19 Tom Tromey <tromey@cygnus.com>
15078 * xref.h (enum): Removed trailing comma.
15080 * parse.y (resolve_qualified_expression_name): Added missing
15083 1999-04-15 Anthony Green <green@cygnus.com>
15085 * gjavah.c: New prototypes for java_float_finite and
15086 java_double_finite.
15088 1999-04-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15090 * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15093 1999-04-06 Jeffrey A Law (law@cygnus.com)
15095 * Makefile.in (TREE_H): Add tree-check.h.
15096 (RTL_H): Add genrtl.h.
15098 1999-04-06 Alexandre Petit-Bianco <apbianco@cygnus.com>
15100 * parse.y (patch_assignment): Added ArrayStoreException runtime
15103 1999-04-06 Per Bothner <bothner@cygnus.com>
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.
15110 * parse.y (patch_binop): Don't fold if non-constant and emiting
15113 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15115 * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
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'.
15121 * java-tree.h (main_jcf): Don't declare.
15123 * jcf-parse.c (main_jcf): Add static definition.
15125 * lang.c (main_jcf): Don't define.
15127 1999-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15129 * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15131 * decl.c (copy_lang_decl): Likewise for `bcopy'.
15133 * jcf-depend.c: Include "config.h", not <config.h>.
15135 * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15138 * jcf-path.c: Include "config.h", not <config.h>.
15140 * lex.c: Don't include various system header files.
15141 (java_init_lex): Cast the argument of `bzero' to PTR
15143 * parse-scan.y (java_push_parser_context): Likewise.
15145 * parse.y (java_push_parser_context): Likewise.
15146 (patch_bc_statement): Match format specifier to variable argument.
15148 * xref.c: Don't include <stdio.h>.
15150 1999-04-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
15156 1999-03-31 Tom Tromey <tromey@cygnus.com>
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.
15168 1999-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15170 * Makefile.in (keyword.h): Generate using gperf language 'C', not
15171 'KR-C', so gperf uses the `const' keyword on strings.
15173 * keyword.gperf (java_keyword): Const-ify a char*.
15175 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15177 * parse.y (patch_bc_statement): Fixed identation and a bogus
15180 1999-03-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
15182 * parse.y (patch_assignment): Allow static variables in other
15183 classes to be assigned.
15185 1999-03-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15187 * class.c (maybe_add_interface): Remove unused variable
15189 (make_class_data): Use = for assignment, not ==. Likewise.
15190 (emit_register_classes): Remove unused variable `decl'.
15192 * lex.c: Fix comment so as not to contain an embedded `/*'.
15194 * verify.c (verify_jvm_instructions): Remove unused variable
15197 1999-03-27 Per Bothner <bothner@cygnus.com>
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.
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.
15214 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
15223 (java_complete_expand_method): Call expand_xref if flag_emit_xref
15225 * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15226 * xref.h (expand_xref): Prototype renamed from xref_generate.
15228 1999-03-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
15250 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
15252 * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15253 Link gcj from gcc.o.
15255 1999-03-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
15261 1999-03-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15263 * gjavah.c (print_c_decl): Remove unused argument `flags'.
15265 * jcf-dump.c (print_access_flags): Add braces around if-else.
15267 * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15270 * lex.c (build_wfl_node): Add static prototype.
15272 * lex.h (build_wfl_node): Remove static prototype.
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'.
15279 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
15281 * Changelog: Fixed 1999-03-22 typos.
15282 * lang.c (lang_decode_option): Fixed typo in error string in the
15285 1999-03-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
15294 * xref.h: Likewise.
15296 1999-03-21 Manfred Hollstein <manfred@s-direktnet.de>
15298 * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15301 1999-03-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
15308 * check-init.c (check_cond_init): Add static prototype.
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.
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.
15322 * decl.c (push_jvm_slot, builtin_function,
15323 lookup_name_current_level): Likewise.
15324 (builtin_function): Const-ify.
15326 * except.c (expand_start_java_handler, expand_end_java_handler):
15327 Add static prototype.
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.
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.
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.
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.
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.
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
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.
15384 * jcf.h (find_classfile): Const-ify.
15386 * jv-scan.c (reset_report): Remove prototype.
15388 * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15389 (error): Rewrite to allow varargs.
15391 * lang.c (lang_f_options): Const-ify.
15393 * lex.c (java_parse_escape_sequence): Add static prototype.
15394 (java_allocate_new_line): Match definition to existing static
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.
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.
15405 * verify.c (push_pending_label, merge_types): Add static
15408 * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15410 1999-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
15412 * parse.y (find_applicable_accessible_methods_list): Extend the
15413 search to superinterfaces when relevant.
15414 (search_applicable_methods_list): New function.
15416 1999-03-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
15418 * class.c (unmangle_classname): Implemented stricter testing
15419 before setting the QUALIFIED_P flag on an identifier.
15421 1999-03-16 Per Bothner <bothner@cygnus.com>
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.
15427 1999-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
15435 1999-03-15 Per Bothner <bothner@cygnus.com>
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.
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.
15446 * parse.y (create_class): Don't call parser_check_super here;
15447 it is not robust. Always wait until later.
15449 * parse.y (method_header): For interfaces, set ACC_ABSTRACT (to
15450 match what JDK 1.2 does), but don't set ACC_PUBLIC.
15452 1999-03-13 Per Bothner <bothner@cygnus.com>
15454 * lex.c (java_read_char): UNGET invalid non-initial utf8 character.
15455 * lex.h (UNGETC): Change misleading macro.
15457 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15459 * parse.y (java_stabilize_reference): Return NODE when patching a
15461 (java_complete_lhs): Put parenthesis around truth values.
15463 1999-03-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
15465 * class.c (layout_class_method): Don't make rtl for interface
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
15484 1999-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15486 * constants.c (find_class_or_string_constant): Cast variable `j'
15487 to a `jword' when comparing against one.
15489 * expr.c (java_lang_expand_expr): Remove unused variables
15490 `has_finally_p' and `op0'.
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.
15497 * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15498 (print_signature): Don't needlessly dereference variable `str'
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'.
15504 * parse.h (reverse_jdep_list): Remove static prototype.
15506 * parse.y (build_jump_to_finally): Remove prototype and definition.
15507 (reverse_jdep_list): Add static prototype.
15509 * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15510 `assignment' and `expr_decl'.
15512 * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15514 1999-03-12 Andrew Haley <aph@cygnus.com>
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.
15519 1999-03-10 Per Bothner <bothner@cygnus.com>
15521 * jcf-write.c (generate_bytecode_insns): Handle __builtin_fmod, for %.
15523 Tue Mar 9 11:52:08 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
15525 * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15528 1999-03-05 Per Bothner <bothner@cygnus.com>
15530 * lex.c (java_parse_end_comment): Take extra parameter (next char).
15532 * class.c (build_utf8_ref): Fix possible name class/ambiguity.
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.
15539 * parse.y: Don't set unused INITIALIZED_P flag.
15540 * java-tree.h (INITIALIZED_P): Removed no-longer needed flag.
15542 * parse.y (find_expr_with_wfl): Optimize tail-calls.
15543 (build_array_from_name): Re-order &index[string] to &string[index].
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).
15548 1999-03-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15550 * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15551 (parse-scan.o): Depend on toplev.h.
15553 * class.c (make_method_value): Add prototype. Make it static.
15554 Remove unused second argument, caller changed.
15556 * expr.c (java_lang_expand_expr): Remove unused variable
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.
15567 * jcf-dump.c: Remove unused variable `LONG_temp'.
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'.
15576 * jcf-reader.c (jcf_parse_preamble): Mark variables
15577 `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
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
15585 (java_get_line_col): Mark parameters `filename' and `line' with
15588 * parse-scan.y: Include toplev.h.
15589 (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
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.
15595 * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15598 1999-02-24 Per Bothner <bothner@deneb.cygnus.com>
15600 * check-init.c (check_init): COPYN takes word count, not bit count.
15602 1999-02-26 Per Bothner <bothner@cygnus.com>
15604 * typeck.c (convert_ieee_real_to_integer): Use save_expr instead of
15605 explicit build_decl. (Avoids crash in reload when optimizing.)
15607 1999-02-25 Per Bothner <bothner@cygnus.com>
15609 * decl.c (complete_start_java_method): Handle synchronized method
15610 even when compiling from bytecode.
15612 1999-02-26 Tom Tromey <tromey@cygnus.com>
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
15626 (process_file): Don't generate java-array.h include.
15628 * gjavah.c (add_namelet): Check for standard package names here.
15629 (add_class_decl): Don't check for standard package names here.
15631 1999-02-25 Tom Tromey <tromey@cygnus.com>
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
15638 1999-02-24 Tom Tromey <tromey@cygnus.com>
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$
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.
15661 1999-02-23 Tom Tromey <tromey@cygnus.com>
15663 * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15664 disable linking in that case.
15666 1999-02-20 Tom Tromey <tromey@cygnus.com>
15668 * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15671 1999-02-21 Per Bothner <bothner@cygnus.com>
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.
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.
15688 * jcf-write.c (generate_classfile): Emit "Exceptions" attribute.
15690 1999-02-19 Per Bothner <bothner@cygnus.com>
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.
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.
15702 * parse.y (resolve_qualified_expression_name): Handle error_mark.
15703 (java_complete_node case EXPR_WITH_FILE_LOCATION): Likewise.
15705 * parse.y (java_complete_lhs): Ignore an empty statement in a
15706 COMPOUND_EXPR. Don't complain about empty statement after return.
15708 1999-02-19 Per Bothner <bothner@cygnus.com>
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.
15722 1999-02-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
15730 1999-02-03 Per Bothner <bothner@cygnus.com>
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.
15747 1998-11-26 Andrew Haley <aph@viagra.cygnus.co.uk>
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]
15752 1999-02-17 Andrew Haley <aph@cygnus.com>
15754 * class.c (build_utf8_ref): Back out broken patch which was
15755 intended to to output signatures using '.' as a separator.
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.
15765 1999-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
15767 * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
15768 of an ancient workaround.
15770 1999-02-10 Jeffrey A Law (law@cygnus.com)
15772 * jvspec.c (xmalloc): Kill the prototype. It does not belong
15775 1999-02-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
15777 * lex.c (yylex): Encode \0 as UTF8.
15779 1999-02-10 Tom Tromey <tromey@cygnus.com>
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
15786 (jcf_path_init): Use LIBGCJ_ZIP_FILE.
15788 * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
15789 (GC_NAME): Renamed -lgc to -lgcjgc.
15791 1999-02-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
15802 1999-02-08 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
15811 1999-02-05 Andrew Haley <aph@cygnus.com>
15813 * class.c (make_class_data): The superclass of an interface should
15814 be null, not class Object.
15816 * lex.c (java_lex): Sign extend hex literals.
15818 1999-02-04 Andrew Haley <aph@cygnus.com>
15820 * class.c (build_utf8_ref): Output signatures using '.' as a
15821 separator, rather than '/'.
15822 (make_class_data): Likewise.
15824 1999-02-03 Marc Espie <Marc.Espie@liafa.jussieu.fr>
15826 * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
15827 mkstemp.o. Get them from libiberty now.
15829 1999-02-02 Jeffrey A Law (law@cygnus.com)
15831 * jcf-io.c: Do not include sys/stat.h or sys/wait.h
15833 1999-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15835 * jvspec.c (xmalloc): Fix the prototype to match the one obtained
15838 1999-02-02 Per Bothner <bothner@cygnus.com>
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.
15844 * jcf-write.c (generate_bytecode_insns): For REAL_CST that is 0 or 1,
15845 generate special [fd]const_[01] instructions.
15847 * jcf-parse.c (yyparse): Don't emit_register_classes if -fsyntax-only.
15849 * verify.c (verify_jvm_instructions): Do INVALIDATE_PC after
15850 handling OPCODE_lookupswitch or OPCODE_tableswitch.
15852 1999-02-01 Per Bothner <bothner@cygnus.com>
15854 * parse.y (patch_method_invocation): Handle calling static methods,
15855 even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
15857 * parse.y (java_complete_lhs): Don't complain about unreachable
15858 exit condition in a do-while statement.
15860 1999-01-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
15862 * lex.c (java_read_char): Fixed utf8 decoding.
15863 (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
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
15874 1999-01-28 Per Bothner <bothner@cygnus.com>
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).
15883 1999-01-28 Hans-Peter Nilsson <hp@axis.se>
15885 * java/Makefile.in: Add missing dependencies for jcf-dump.o,
15886 gjavah.o, check-init.o, jv-scan.o
15888 1999-02-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15890 * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
15892 * gjavah.c: Include config.h and system.h.
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'.
15898 * jcf.h (inline): Don't define, its handled by system.h.
15900 * lex.c (inline): Likewise.
15902 1999-01-31 Zack Weinberg <zack@rabi.columbia.edu>
15904 * lang-specs.h: Map -Qn to -fno-ident.
15906 1999-01-29 Richard Henderson <rth@cygnus.com>
15908 * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
15910 1999-01-29 Tom Tromey <tromey@cygnus.com>
15912 * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
15913 then cast it to Object before calling `append' method.
15915 1999-01-28 Per Bothner <bothner@cygnus.com>
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.
15921 1999-01-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
15927 1999-01-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
15929 * parse.y: (class_declaration:): Fixed indentation.
15930 (class_member_declaration:): Extra `;' after field declaration now
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.
15937 1999-01-25 Andrew Haley <aph@cygnus.com>
15939 * except.c, java-except.h (expand_resume_after_catch): new
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.
15944 1999-01-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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.
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'.
15964 * decl.c (find_local_variable): Remove unused variable `rtl'.
15965 (pushdecl): Likewise for variables `different_binding_level' and
15967 (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15968 (maybe_build_cleanup): Likewise for parameter `decl'.
15970 * except.c (expand_start_java_handler): Mark parameter `range'
15971 with ATTRIBUTE_UNUSED.
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
15981 (process_jvm_instruction): Add a `const' qualifier to a char*.
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.
15990 * java-except.h: Provide prototypes for maybe_start_try,
15991 maybe_end_try and add_handler.
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.
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'.
16007 * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16008 int when comparing against one.
16010 * jcf-parse.c: Include toplev.h.
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'.
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.
16026 * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16028 * mangle.c: Include toplev.h.
16029 (emit_unicode_mangled_name): Declare parameter `len'.
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
16036 (parse_error_context): Likewise. Also check `ANSI_PROTOTYPES'
16037 not `__STDC__' for whether to use ANSI-isms.
16039 * typeck.c (incomplete_type_error): Mark parameters `value' and
16040 `type' with ATTRIBUTE_UNUSED.
16041 (parse_signature_type): Use ISDIGIT, not isdigit.
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'.
16047 * zextract.c: Include config.h and system.h. Remove redundant
16048 OS header includes.
16050 * zipfile.h: Prototype `read_zip_archive'.
16052 1999-01-21 Andrew Haley <aph@cygnus.com>
16054 * typeck.c (convert): Allow conversions to void type: some
16055 optimizations in gcc do this.
16057 1999-01-21 Andrew Haley <aph@cygnus.com>
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.
16063 1999-01-18 Andrew Haley <aph@cygnus.com>
16065 * parse.y (patch_binop): Do a type conversion from signed to
16066 unsigned and then back to signed when a ">>>" is found.
16068 1999-01-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
16079 1999-01-17 Jeffrey A Law (law@cygnus.com)
16081 * Makefile.in (zextract.o): Add dependencies.
16083 * Makefile.in: Do not put ^Ls at the start of a line.
16085 1999-01-15 Per Bothner <bothner@cygnus.com>
16087 * expr.c (process_jvm_instruction): Coerce to correct Throwable
16088 sub-type the result of the call that gets the exception value.
16090 * parse.y (java_complete_expand_methods): If flags_syntax_only,
16091 don't call finish_class.
16093 * parse.y (java_check_regular_methods): If METHOD_PRIVATE,
16094 clear found before continuing.
16096 * verify.c (verify_jvm_instructions): On an array load, allow
16097 and handle top of stack to be TYPE_NULL.
16099 * gjavah.c (generate_access): Translate Java package private or
16100 protected access to C++ public, but with a comment.
16102 1999-01-13 Andrew Haley <aph@cygnus.com>
16104 * expr.c (generate_name): Name prefix changed to avoid clashes
16105 with assembler temp labels.
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.
16112 1999-01-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
16134 1999-01-10 Richard Henderson <rth@cygnus.com>
16136 * gjavah.c (java_float_finite): Use a union to do type punning.
16137 (java_double_finite): Likewise.
16139 1999-01-09 Per Bothner <bothner@cygnus.com>
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.
16148 1999-01-08 Per Bothner <bothner@cygnus.com>
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).
16153 1999-01-08 Tom Tromey <tromey@cygnus.com>
16155 * parse-scan.y (variable_declarator_id): Set or increment
16157 (bracket_count): New global.
16158 (formal_parameter): Handle case where bracket pairs trail variable
16161 1999-01-07 Andrew Haley <aph@viagra.cygnus.co.uk>
16163 * jcf-parse.c (yyparse): variable len changed from a char to an
16164 int to prevent overflow.
16166 1999-01-06 Per Bothner <bothner@cygnus.com>
16168 * java-tree.h: Declare read_class.
16169 * jcf-parse.c (read_class): New function.
16170 (load_class): Now just call read_class.
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.
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.
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.
16189 1999-01-06 Graham <grahams@rcp.co.uk>
16191 * parse.y : include system.h instead of including
16192 standard headers directly with the exception of <dirent.h>.
16194 1999-01-06 Per Bothner <bothner@cygnus.com>
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.
16201 1999-01-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16203 * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16205 1998-12-22 Per Bothner <bothner@cygnus.com>
16207 * expr.c (process_jvm_instruction): Do load_type_state after JSR.
16208 * verify.c (verify_jvm_instructions): Fix off-by-one error.
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.
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.
16227 1998-12-20 John F. Carr <jfc@mit.edu>
16229 * Make-lang.in: Comment out control-Ls; they upset some makes.
16231 1998-12-18 Tom Tromey <tromey@cygnus.com>
16233 * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16236 1998-12-17 Tom Tromey <tromey@cygnus.com>
16238 * parse.y (DIR_SEPARATOR): New define.
16239 (check_class_interface_creation): Use it.
16241 * parse-scan.y (report_main_declaration): Recognize
16242 `java.lang.String' in argument to main.
16244 1998-12-16 Per Bothner <bothner@cygnus.com>
16246 * parse.y (create_interface): Remove bogus test.
16248 1998-12-16 Per Bothner <bothner@cygnus.com>
16250 * jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
16251 (HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
16253 1998-12-16 Tom Tromey <tromey@cygnus.com>
16255 * parse-scan.y (qualified_name): Use correct sprintf format.
16257 1998-12-15 Tom Tromey <tromey@cygnus.com>
16259 * gjavah.c (print_field_info): Changed how most negative number is
16262 1998-12-14 Per Bothner <bothner@cygnus.com>
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
16277 * parse.y (lookup_field_wrapper): Fix thinko.
16279 * parse.y (java_complete_tree): In EXPR_WITH_FILE_LOCATION,
16280 set and restore global lineno.
16282 1998-12-14 Tom Tromey <tromey@cygnus.com>
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
16288 1998-12-14 Tom Tromey <tromey@cygnus.com>
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.
16297 1998-12-13 Per Bothner <bothner@cygnus.com>
16299 * parse.y (patch_method_invocation): If class_decl is null
16300 (e.g. an array type), use original type.
16302 * parse.y (check_thrown_exceptions): Temporary hack to suppress
16303 errors about uncaught exception from clone (of array, specifically).
16305 1998-12-13 Tom Tromey <tromey@cygnus.com>
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.
16313 1998-12-13 Tom Tromey <tromey@cygnus.com>
16315 * jcf-reader.c (jcf_parse_one_method): Recognize
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.
16324 1998-12-12 Per Bothner <bothner@cygnus.com>
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.
16333 * parse.y (patch_synchronized_statement): Don't call monitorexit
16334 unless block CAN_COMPLETE_NORMALLY. Propagate that flag properly.
16336 * java-tree.h (DECL_LOCAL_STATIC_VALUE): Removed - no longer used.
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.
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.
16368 * parse.y (java_complete_expand_methods): Call write_classfile
16369 here, and not in java_expand_classes (which only gets first class).
16371 1998-12-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
16382 1998-12-12 Per Bothner <bothner@cygnus.com>
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.
16388 * expr.c (java_lang_expand_exp): Support NEW_ARRAY_INIT.
16389 * jcf-write.c (generate_bytecode_insns): Support NEW_ARRAY_INIT.
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.
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.
16401 1998-12-11 Tom Tromey <tromey@cygnus.com>
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.
16408 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
16427 1998-12-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
16437 1998-12-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
16461 1998-12-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
16476 1998-12-06 Per Bothner <bothner@cygnus.com>
16478 * constants.c (find_methodref_index): When the class is an interface,
16479 generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
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.
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.
16494 * jcf-write.c (get_access_flags): Fix typo ACC_PUBLIC -> ACC_FINAL.
16496 * parse.y (java_complete_tree): Don't complain about unreachable
16497 statement if it is empty_stmt_node.
16499 * jcf-write.c (find_constant_wide): New function.
16500 (push_long_const): Use find_constant_wide.
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.
16508 * jcf-write.c (generate_classfile): Emit ConstantValue attributes.
16510 1998-12-06 Per Bothner <bothner@cygnus.com>
16512 * jcf-dump.c (INVOKE): If invokeinterface, print number of args.
16514 1998-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
16516 * java-tree.h (java_layout_seen_class_methods): New function
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
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.
16534 1998-12-03 Per Bothner <bothner@cygnus.com>
16536 * parse,y (patch_synchronized_statement): Set CAN_COMPLETE_NORMALLY.
16538 1998-12-03 Per Bothner <bothner@cygnus.com>
16540 * jcf-dump.c (main): Fix error message.
16541 * jcf-path.c (add_entry): Style fix.
16543 1998-12-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
16552 1998-12-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
16569 1998-12-01 Tom Tromey <tromey@cygnus.com>
16571 * Makefile.in (+target): Removed.
16572 (+xmake_file): Likewise.
16573 (+tmake_file): Likewise.
16574 (.NOEXPORT): Removed duplicate.
16576 1998-11-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16578 * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16580 * jv-scan.c: Fix xmalloc prototype. Provide an xmalloc definition.
16582 * jvgenmain.c: Remove the xmalloc prototype, we get it from
16583 libiberty.h. Provide an xmalloc definition.
16585 * jvspec.c: Remove the xmalloc prototype.
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.
16591 1998-11-26 Alexandre Oliva <oliva@dcc.unicamp.br>
16593 * jcf-path.c (add_entry): Recognize ".jar" too.
16594 * lang-specs.h: Likewise.
16596 1998-11-26 Per Bothner <bothner@cygnus.com>
16598 * jcf-write.c (generate_bytecode_insns): In Call_EXPR, handle
16599 soft_monitorenter_node, soft_monitorexit_node, throw_node.
16601 * jcf-write.c (generate_bytecode_insns):
16602 Handle pre/post-increment/decrement of long.
16604 * jcf-write.c (generate_bytecode_insns):
16605 Handle missing exception handler (finally for synchronized).
16607 1998-11-25 Per Bothner <bothner@cygnus.com>
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.
16619 * parse.y (java_complete_tree): Move CAN_COMPLETE_NORMALLY.
16620 (build_jump_to_finally): Add missing CAN_COMPLETE_NORMALLY.
16622 * class.c: Add #include flags.h, remove no-longer needed declaration.
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.
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.
16635 * expr.c (build_java_binop): Explicit default, to silence -Wall.
16637 * expr.c (CHECK_PC_IN_RANGE): Add void cast to kill warnings.
16639 1998-11-25 Marc Espie <espie@quatramaran.ens.fr>
16641 * jcf-write.c (generate_bytecode_conditional): Fix typo.
16643 1998-11-24 Per Bothner <bothner@cygnus.com>
16645 * (generate_classfile): Always write class access flag with
16648 1998-11-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
16656 (expand_invoke): Likewise.
16657 * java-tree.h (all_class_list): New global variable declared.
16658 (layout_class_methods, layout_class_method): New function
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
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
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
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
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
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
16712 1998-11-24 Per Bothner <bothner@cygnus.com>
16714 * expr.c (java_lang_expand_expr): Add missing emit_queue.
16716 * javaop.h (int8): Removed - not used.
16717 (jbyte): Redefine portably with correct signedness.
16719 * jcf-write.c (generate_bytecode_insns): Don't free sw_state.cases.
16721 * jcf-write.c (generate_bytecode_insns): Fix typo
16722 OPCODE_getstatic to OPCODE_getfield.
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).
16728 1998-11-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
16735 * java-tree.h (jcf_parse): Changed jcf_parse prototype.
16737 1998-11-18 Alexandre Petit-Bianco <apbianco@cygnus.com>
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,
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
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
16780 (variable_redefinition_error): Consider treating variable type as
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
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
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
16823 (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
16824 layout non primitive type, if necessary. Make method node only to
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
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
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.
16854 1998-11-18 Anthony Green <green@cygnus.com>
16856 * jcf-parse.c (yyparse): Open class file in binary mode.
16858 1998-11-15 Per Bothner <bothner@cygnus.com>
16860 * jvgenmain.c: Need to #include "gansidecl.h" (to get PROTO).
16862 * jcf-write.c (perform_relocations): Move check out one loop.
16864 1998-11-15 Anthony Green <green@hoser.cygnus.com>
16866 * Make-lang.in: Fix reference to srcdir.
16867 * jv-scan.c: Add missing xmalloc prototype.
16868 * jvgenmain.c: Ditto.
16870 1998-11-15 Per Bothner <bothner@cygnus.com>
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.
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.
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.
16894 1998-11-15 Anthony Green <green@cygnus.com>
16896 * Makefile.in: jv-scan and jvgenmain all require libiberty.
16897 * Make-lang.in: Ditto.
16899 * jv-scan.c: Remove xmalloc and xstrdup definitions.
16900 * jvgenmain: Ditto.
16902 1998-11-15 Per Bothner <bothner@cygnus.com>
16904 * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): New macro.
16906 * jcf-io.c (find_class): Simpler/cleaner structure fixes a bug.
16908 1998-11-14 Per Bothner <bothner@cygnus.com>
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.
16917 1998-11-13 Tom Tromey <tromey@cygnus.com>
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
16929 (write_classfile): Free class file name. Handle case where class
16931 (DIR_SEPARATOR): New macro.
16932 Include <sys/stat.h>
16934 * Makefile.in (prefix): New macro.
16936 1998-11-12 Per Bothner <bothner@cygnus.com>
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.
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.
16951 * parse.y (do_unary_numeric_promotion): New function.
16952 (patch_unaryop, patch_binop, patch_array_ref): Use it.
16954 * parse.y (patch_newarray): Various fixes.
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.
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.
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.
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.
16991 1998-11-12 Tom Tromey <tromey@cygnus.com>
16993 * jcf-io.c (find_class): Added explanatory comment.
16995 * jcf-path.c (add_entry): Look for `.zip' at end of filename. Add
16996 trailing slash to `.zip' entries.
16998 * jvspec.c (lang_specific_driver): Correctly handle case where
16999 GC_NAME not defined.
17001 1998-11-11 Tom Tromey <tromey@cygnus.com>
17003 * jvspec.c (GC_NAME): New define.
17004 (lang_specific_driver): Use GC_NAME. Add GC_NAME to command line
17006 * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17008 1998-11-11 Per Bothner <bothner@cygnus.com>
17010 * jcf-dump.c (TABLE_SWITCH): Fix typos.
17012 1998-11-11 Tom Tromey <tromey@cygnus.com>
17014 * jcf-dump.c (main): Correctly recognize `--'-style long options.
17016 1998-11-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
17063 (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
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
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
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
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
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
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
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
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
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
17169 (build_binop): Merge declaration and initialization of local
17171 (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17172 numeric types. Improved validity test for qualify operators on
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.
17188 1998-10-30 Tom Tromey <tromey@cygnus.com>
17190 * class.c (build_class_ref): Changed name of primitive classes to
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.
17198 1998-10-28 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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:):
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
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
17263 (build_array_from_name): Array on primitive types are marked
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
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
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
17298 (resolve_expression_name): Check for illegal instance variable
17299 usage within the argument scope of an explicit constructor
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
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
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
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):
17334 (patch_assignment): Fixed typo.
17335 (patch_unaryop): Check on final fields occurs only when a decl
17337 (patch_return): Take constructors into account.
17338 (patch_conditional_expr): New function.
17339 * typeck.c (build_java_signature): Removed unnecessary empty line.
17341 1998-10-28 Jeffrey A Law (law@cygnus.com)
17343 * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17345 1998-10-28 Tom Tromey <tromey@cygnus.com>
17347 * decl.c (init_decl_processing): Renamed fields.
17348 * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17349 interface_len, msize fields.
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.
17356 1998-10-28 Jeffrey A Law (law@cygnus.com)
17358 * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17359 * mangle.c (emit_unicode_mangled_name): Similarly.
17361 1998-10-26 Nick Clifton <nickc@cygnus.com>
17363 * jcf-parse.c (get_constant): Place braces around code to compute
17364 'd' when REAL_ARITHMETIC is not defined.
17366 1998-10-25 H.J. Lu (hjl@gnu.org)
17368 * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17371 1998-10-23 Tom Tromey <tromey@cygnus.com>
17373 * lang-specs.h: `.zip' files are input to jc1.
17375 1998-10-22 Per Bothner <bothner@cygnus.com>
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.
17383 1998-10-22 Tom Tromey <tromey@cygnus.com>
17385 * jcf-path.c (add_entry): Don't add trailing separator if entry is
17387 (add_path): Don't add trailing separator to non-empty path
17390 * lang.c (lang_decode_option): Check for -fclasspath and
17391 -fCLASSPATH before examining other `-f' options.
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.
17399 * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17401 1998-10-11 Anthony Green <green@cygnus.com>
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.
17409 1998-10-22 Tom Tromey <tromey@cygnus.com>
17411 * Makefile.in (LEX): Removed.
17412 (LEXFLAGS): Likewise.
17413 (SET_BISON): New macro.
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.
17420 (PARSE_SCAN_C): Likewise.
17421 (PARSE_RELDIR): New macro.
17423 * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
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.
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,
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.
17463 * jcf-depend.c: Include jcf.h.
17465 * jcf-write.c (localvar_alloc): Returns `void'.
17466 (localvar_free): Removed unused variable.
17468 * lang.c (OBJECT_SUFFIX): Define if not already defined.
17469 (init_parse): Use OBJECT_SUFFIX, not ".o".
17471 1998-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
17479 * parse.y (java_expand_classes): No longer register classes.
17481 1998-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
17483 * class.c (is_compiled_class): New local variable
17484 seen_in_zip. Identify classes found in currently compiled source
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
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.
17509 1998-10-17 Per Bothner <bothner@cygnus.com>
17511 * Makefile.in: Link with libiberty.a instead of memmove.o.
17513 1998-10-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
17542 1998-10-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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):
17573 (duplicate_declaration_error): Suppressed unused argument in
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):
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
17585 (yyerror): Suppressed unused local variables.
17586 (variable_redefinition_error): Fixed lang_printable_name
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
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
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
17618 (patch_method_invocation_stmt): Fixed lang_printable_name and
17619 patch_invoke invocations.
17620 (check_for_static_method_reference): Fixed lang_printable_name
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
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.
17653 1998-10-14 Tom Tromey <tromey@cygnus.com>
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.
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
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".
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.
17689 1998-10-13 Jeffrey A Law (law@cygnus.com)
17691 * java-tree.def: Add missing newline at EOF.
17693 1998-10-13 Tom Tromey <tromey@cygnus.com>
17695 * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
17696 (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
17698 Include <config.h> and "system.h".
17699 (disassemble_method): Undefine RET to avoid clash with
17700 config/i386/i386.h.
17702 1998-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
17741 (complete_class_report_errors): Error message on exceptions not
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
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
17779 1998-10-09 Tom Tromey <tromey@cygnus.com>
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
17792 (process_file): Parse methods before fields.
17793 (field_pass): New global.
17794 (HANDLE_END_FIELD): Take field_pass into account.
17796 1998-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
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).
17801 1998-10-03 Anthony Green <green@cygnus.com>
17803 * jvspec.c: Fix bug in jvgenmain_spec patch.
17805 1998-10-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
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
17877 (find_applicable_accessible_methods_list,
17878 find_most_specific_methods_list, argument_types_convertible): New
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
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.
17902 1998-10-02 Anthony Green <green@cygnus.com>
17904 * jvspec.c: jvgenmain_spec uses different temporary file names.
17906 1998-10-02 Anthony Green <green@cygnus.com>
17908 * jvspec.c (lang_specific_driver): Fail if user specifies
17909 --main= when not linking.
17911 1998-09-28 Tom Tromey <tromey@cygnus.com>
17913 * class.c (make_class_data): Push value for `thread' field.
17914 * decl.c (init_decl_processing): Added `thread' field to class.
17916 * class.c (add_field): Always make static fields externally
17919 1998-09-26 Anthony Green <green@cygnus.com>
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.
17926 1998-09-25 Per Bothner <bothner@cygnus.com>
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.
17932 1998-09-24 Per Bothner <bothner@cygnus.com>
17934 * expr.c (pop_arguments): Handle PROMOTE_PROTOTYPES target macro.
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.
17946 * lex.c (java_lex): Fix (from Alex) for JC1_LITE problem.
17948 1998-09-23 Tom Tromey <tromey@cygnus.com>
17950 * class.c (init_class_processing): libjava function renamed to
17953 1998-09-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
17968 (java_init_lex): Initialize wfl_append, wfl_string_buffer,
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
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:):
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
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
18030 (patch_bc_statement): Fixed typos. Handle SWITCH statement
18032 (patch_switch_statement, case_identity, java_expand_switch): New
18035 1998-09-21 Per Bothner <bothner@cygnus.com>
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.
18043 1998-09-21 Tom Tromey <tromey@cygnus.com>
18045 * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18047 1998-09-21 Per Bothner <bothner@cygnus.com>
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).
18053 * parse.y (patch_if_else_statement): Accept promoted_boolean_type_node.
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.
18060 1998-09-30 Jeffrey A Law (law@cygnus.com)
18062 * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18065 1998-09-17 Jeffrey A Law (law@cygnus.com)
18067 * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18069 1998-09-17 Tom Tromey <tromey@cygnus.com>
18071 * Makefile.in ($(PARSE_H)): Removed target.
18073 1998-09-17 Jeffrey A Law (law@cygnus.com)
18075 * Makefile.in (JAVA_OBJS): Add memmove.o
18076 (memmove.o): New target & rules.
18078 1998-09-15 Tom Tromey <tromey@cygnus.com>
18080 * expr.c (expand_invoke): Don't generate a call to the class init
18083 1998-09-14 Jeffrey A Law (law@cygnus.com)
18085 * Makefile.in: Add many missing dependencies.
18086 * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
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.
18091 1998-09-11 Per Bothner <bothner@cygnus.com>
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.
18097 * jvspec.c (jvgenmain_spec): Fix spec for generated .o file.
18099 1998-09-10 Jeffrey A Law (law@cygnus.com)
18101 * Make-lang.in (GCJ): Define before using.
18103 1998-09-09 Jeffrey A Law (law@cygnus.com)
18105 * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18106 losing due to namespace pollution in GNU getopt.h
18108 1998-09-09 Tom Tromey <tromey@cygnus.com>
18110 * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18111 (java.all.cross): Likewise.
18112 (java.rest.encap): Likewise.
18114 1998-09-08 Jeffrey A Law (law@cygnus.com)
18116 * gjavah.c (print_class_decls): Fix thinko in arglist
18117 * jcv-io.c (find_classfile): Similarly.
18119 1998-09-07 Jeffrey A Law (law@cygnus.com)
18121 * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18123 1998-09-05 Tom Tromey <tromey@cygnus.com>
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).
18135 1998-09-05 Anthony Green <green@cygnus.com>
18137 * README, license.terms: Removed.
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.
18148 1998-09-04 Tom Tromey <tromey@cygnus.com>
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.
18154 1998-09-03 Per Bothner <bothner@cygnus.com>
18156 * gjavah.c: Support new -prepend -add -append flags.
18157 (print_method_info): Method is not virtual if class is final.
18159 1998-09-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
18184 1998-09-02 Tom Tromey <tromey@cygnus.com>
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.
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.
18195 1998-09-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
18197 * parse-scan.y (report_main_declaration): Name of the class
18198 containing `main' can be a qualified name.
18200 1998-08-31 Tom Tromey <tromey@cygnus.com>
18202 * config-lang.in: Changed gjavac to gjc everywhere.
18203 * Make-lang.in: Changed gjavac to gjc everywhere.
18205 1998-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
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.
18259 1998-08-25 Tom Tromey <tromey@cygnus.com>
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.
18270 1998-08-24 Per Bothner <bothner@cygnus.com>
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.
18277 1998-08-24 Per Bothner <bothner@cygnus.com>
18279 * lang.c (flag_assume_compiled): Make default be on.
18281 1998-08-21 Per Bothner <bothner@cygnus.com>
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.
18289 1998-08-20 Per Bothner <bothner@cygnus.com>
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.
18296 1998-08-19 Warren Levy <warrenl@cygnus.com>
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.
18303 1998-08-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
18310 * java-tree.h Added space after PROTO in function declarations
18312 (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18313 (create_label_decl, push_labeled_block): New function
18315 * lex.c (label_id): Initialize.
18316 (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18318 * parse.h Added space after PROTO in function declarations when
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
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
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
18340 (label_decl:): New rule.
18341 (labeled_statement:): Rewritten using label_decl. Actions
18343 (labeled_statement_nsi:): Likewise.
18344 (if_then_statement): Actions implemented.
18345 (while_expression): New rule.
18346 (while_statement:): Rewritten using while_expression. Actions
18348 (while_statement_nsi:): Likewise.
18349 (do_statement_begin:): New rule.
18350 (do_statement:): Rewritten using do_statement_begin. Actions
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.
18380 1998-08-17 Warren Levy <warrenl@cygnus.com>
18382 * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18383 (JAVA_OBJS): Added reminder comment
18385 1998-08-13 Nick Clifton <nickc@cygnus.com>
18387 * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18388 be interpreted as a long long.
18390 1998-08-13 Warren Levy <warrenl@cygnus.com>
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.
18399 1998-08-12 Per Bothner <bothner@cygnus.com>
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.
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
18413 1998-08-11 Per Bothner <bothner@cygnus.com>
18415 * decl.c (init_decl_processing): Remove unused method_type_node fields.
18416 * class.c (make_method_value): Remove init for removed fields.
18418 * class.c (layout_class): Use build_java_argument_signature.
18419 * java-tree.h (TYPE_ARGUMENT_SIGNATURE): New macro.
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.
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.
18429 * parse.y (check_method_redefinition): Minor optimization.
18431 * jcf-write.c (generate_bytecode_insns): Handle RETURN_EXPR,
18432 MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18434 1998-08-10 Tom Tromey <tromey@cygnus.com>
18436 * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
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.
18445 1998-07-29 Per Bothner <bothner@cygnus.com>
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.
18451 * gjavah.c (process_file): Use public inheritance for super-class.
18453 1998-07-29 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
18463 (package_declaration:): Assign ctxp->package to the
18465 (method_invocation:): Handle invocation of method qualified by
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
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
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
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.
18501 1998-07-28 Per Bothner <bothner@cygnus.com>
18503 * class.c (hashUtf8String): Fix - use new JavaSoft specification.
18505 1998-07-24 Tom Tromey <tromey@cygnus.com>
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.
18517 * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18518 If verbose, print underlying representation of value in hex.
18520 1998-07-24 Per Bothner <bothner@cygnus.com>
18522 * buffer.h, buffer.c: New files.
18523 * Makefile.in (JAVA_OBJS): Add buffer.o.
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.
18534 1998-07-24 Alexandre Petit-Bianco <apbianco@cygnus.com>
18536 * jcf-io.c (open_in_zip): Check the zipfile magic number.
18537 * zipfile.h (ZIPMAGIC): New macro.
18539 1998-07-24 Tom Tromey <tromey@cygnus.com>
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.
18555 1998-07-23 Tom Tromey <tromey@cygnus.com>
18557 * gjavah.c (java_float_finite): New function.
18558 (java_double_finite): Likewise.
18559 (F_POSITIVE_INFINITY): New macro.
18560 (F_NEGATIVE_INFINITY): Likewise.
18562 (D_POSITIVE_INFINITY): Likewise.
18563 (D_NEGATIVE_INFINITY): Likewise.
18565 (print_field_info): Use java_float_finite and java_double_finite.
18567 1998-07-23 Per Bothner <bothner@cygnus.com>
18569 * parse.y (method_header): Name "this" implicit argument.
18571 1998-07-22 Per Bothner <bothner@cygnus.com>
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.
18578 1998-07-22 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
18591 * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
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
18640 (check_for_static_method_reference): New function.
18641 (patch_invoke): Layout the class on which new is done if
18643 (lookup_method_invoke): Changed format to report errors on
18645 (qualify_ambiguous_name): New local variable this_found. Now
18646 handle things from primaries. Method call are considered
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
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.
18667 1998-07-21 Per Bothner <bothner@cygnus.com>
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.
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.
18692 1998-07-17 Tom Tromey <tromey@cygnus.com>
18694 * gjavah.c (print_c_decl): Always generate JArray<>* for array
18697 * Makefile.in (all.indirect): Added gjavah$(exeext).
18698 (gjavah$(exeext)): Added $(exeext).
18701 1998-07-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
18718 (build_newarray_node, patch_newarray, resolve_type_during_patch,
18719 not_initialized_as_it_should_p, build_this): New static function
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
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
18745 (dim_exprs:): Build a list of dimension expressions.
18746 (dim_expr:): Store location of the OSB_TK in the dimension
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
18755 (java_layout_class_from_source): Function renamed
18757 (resolve_and_layout): Now call resolve_no_layout and
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
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
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
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
18805 (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18806 (patch_binop): Use not_initialized_as_it_should_p where
18808 (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
18809 (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
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
18818 (build_newarray_node, patch_newarray, build_this): New functions.
18820 1998-07-16 Tom Tromey <tromey@cygnus.com>
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.
18828 * gjavah.c (help): New function.
18829 (no_argument): New function.
18830 (usage): Changed text.
18831 (main): Rewrote argument handling. Now handles -v, --help,
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.
18839 1998-07-15 Tom Tromey <tromey@cygnus.com>
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
18848 (print_field_info): Just return if generate_access returns true.
18849 (print_method_info): Likewise. Also, allow <init> functions to
18851 (print_c_decl): Added is_init argument. Print constructors
18853 (print_cxx_classname): Use UTF8_GET to extract characters from
18855 (print_base_classname): New function.
18856 (print_class_decls): New function.
18857 (process_file): Use it.
18858 (utf8_cmp): New function.
18860 1998-07-13 Nick Clifton <nickc@cygnus.com>
18862 * lang-options.h: Format changed to match changes in gcc/toplev.c
18863 to implement a --help option.
18865 1998-07-10 Brendan Kehoe <brendan@cygnus.com>
18867 * decl.c (init_decl_processing): Revert change to dtable_type.
18869 1998-07-09 Per Bothner <bothner@cygnus.com>
18871 * java-tree.h (CLASS_P): Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
18873 1998-07-08 Brendan Kehoe <brendan@cygnus.com>
18875 * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
18877 * lang.c (lang_init): Default flag_exceptions to 1, without
18878 checking to see if it's 2 first.
18880 1998-07-08 Jeffrey A Law (law@cygnus.com)
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.
18887 1998-07-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
18889 * lex.c (java_lex): Return 0 when we see an invalid character in
18892 * lex.c (java_read_char): Specify extra argument when calling
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
18904 1998-07-07 Brendan Kehoe <brendan@cygnus.com>
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.
18909 1998-07-07 Tom Tromey <tromey@cygnus.com>
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).
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.
18934 1998-07-02 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
18983 (type_declaration:): Consider generating <clinit> when class
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
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
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
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
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
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
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
19056 (build_method_invocation): Don't wrap function call around a WFL.
19057 (build_assignment): Likewise. Use the operator location
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
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.
19069 1998-07-01 Tom Tromey <tromey@cygnus.com>
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.
19076 1998-06-30 Tom Tromey <tromey@cygnus.com>
19078 * decl.c (init_decl_processing): Functions are now named
19079 _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19081 1998-06-29 Per Bothner <bothner@cygnus.com>
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.
19088 1998-06-25 Per Bothner <bothner@cygnus.com>
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.
19097 1998-06-24 Per Bothner <bothner@cygnus.com>
19099 * lex.c (java_get_line_col): Handle end-of-file.
19100 * except.c (expand_end_java_handler): Handle null type (i.e. finally).
19102 1998-06-24 Andrew MacLeod <amacleod@cygnus.com>
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.
19108 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
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.
19119 1998-06-12 Per Bothner <bothner@cygnus.com>
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.
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.
19138 * jcf-write.c: New file. Writes out a RECORD_TYPE as a .class file.
19139 * Makefile.in (JAVA_OBJS): Added jcf-write.o.
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.
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.
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.
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)".
19173 * expr.c (build_java_arrayaccess): Generate more efficient array
19174 bounds checking, by using unsigned compare.
19176 * expr.c (expand_invoke): Re-arrange error checks to make more robust.
19178 1998-06-10 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
19186 1998-06-10 Tom Tromey <tromey@cygnus.com>
19188 * Make-lang.in (java): Added gjavac and jvgenmain.
19189 (java.start.encap): Depend on gjavac.
19190 (java.rest.encap): Depend on jvgenmain.
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
19201 1998-06-10 Dave Brolley <brolley@cygnus.com>
19203 * lang.c (lang_decode_option): New argc/argv interface.
19205 1998-06-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
19213 (parse_source_file): Register class before expanding their
19215 * lang.c (put_decl_node): Produce `null' when `void *' is
19217 * lex.c (static tree wfl_op): New static global, for error report
19219 (java_init_lex): wfl_operator and wfl_op initialized
19220 here. Filename caching added for wfl_op. Return wfl_op when `(' is
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
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.
19278 1998-06-05 Per Bothner <bothner@cygnus.com>
19280 * jvspec.c: New file.
19281 * Make-lang.in: New rules to build gjavac from jvspec.c and ../gcc.c.
19283 * java-tree.h (identifier_subst): Add declaration.
19285 1998-06-04 Tom Tromey <tromey@cygnus.com>
19287 * jvgenmain.c (main): Generate call to JvRunMain.
19289 * class.c (make_class_data): Push value for "sync_info" field.
19290 * decl.c (init_decl_processing): Push "sync_info" field.
19292 1998-06-03 Per Bothner <bothner@cygnus.com>
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.
19298 1998-06-02 Per Bothner <bothner@cygnus.com>
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.
19305 1998-06-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
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):
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
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
19336 1998-05-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
19363 (multiplicative_expression:): Sub-rules build corresponding binop
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
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.
19394 1998-05-21 Per Bothner <bothner@cygnus.com>
19396 * class.c (identifier_subst): New convenience wrapper for ident_subst.
19397 Replace most uses of ident_subst by identifier_subst.
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.
19408 1998-05-20 Per Bothner <bothner@cygnus.com>
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.
19415 1998-05-18 Tom Tromey <tromey@cygnus.com>
19417 * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19418 then mangle number as _N_.
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.
19425 1998-05-17 Michael Tiemann <tiemann@cygnus.com>
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.
19431 1998-05-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
19528 (resolve_expression_name): Now use lookup_name_in_blocks to search
19529 local variable decls and print out an error when variables are
19531 (patch_method_invocation_stmt): Inserted comment before the
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.
19544 1998-04-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
19546 * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
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
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
19563 * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
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
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
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
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
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
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
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
19679 (patch_argument, java_complete_tree): New functions.
19681 1998-04-20 Per Bothner <bothner@cygnus.com>
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.
19695 * jcf-parse.c (process_zip_dir): Set java_source.
19697 1998-04-20 Brendan Kehoe <brendan@cygnus.com>
19699 * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
19701 1998-04-14 Alexandre Petit-Bianco <apbianco@cygnus.com>
19703 * jcf-parse.c (load_class): Don't change input_filename before
19704 calling jcf_parse_source (but still do it before calling
19706 (jcf_parse_source): Assign input_filename after having saved the
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
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
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
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
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
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
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.
19811 1998-04-14 Dave Brolley <brolley@cygnus.com>
19813 * lang.c (init_parse): Now returns char* containing the filename.
19815 1998-04-10 Per Bothner <bothner@cygnus.com>
19817 * class.c (layout_class): Mangle repeated arg types to match cc1plus.
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.
19824 1998-04-09 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
19840 (refine_accessible_methods_list): Changed comment, removed
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,
19847 * lex.c (java_lex): Record the last closing curly bracket of a
19849 * jcf-parse.c (jcf_parse_source): Now calls
19850 java_check_methods. Clarified comment, fixed typo.
19852 1998-04-09 Dave Brolley <brolley@cygnus.com>
19854 * lang.c (init_parse): Expose for non USE_CPPLIB builds.
19855 (finish_parse): Expose for non USE_CPPLIB builds.
19857 1998-04-08 Jeffrey A Law (law@cygnus.com)
19859 * lang.c (lang_print_xnode): New function.
19861 1998-04-03 Per Bothner <bothner@cygnus.com>
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.
19869 * decl.c (int_decl_processing): Make soft_badarrayindex_node
19870 be volatile and have side effects - generates better code.
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.
19875 * expr.c (expand_invoke): If class is final, method is
19876 effectively final, so can call it directly.
19878 * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE): New macros.
19880 * Makefile.in, Make-lang.in: Add missing $(exeext)s.
19882 1998-03-19 Alexandre Petit-Bianco <apbianco@cygnus.com>
19884 * parse.y (build_method_invocation_stmt): Removed extra argument
19887 1998-03-16 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
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
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
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
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):
19958 * typeck.c (build_java_signature): Properly end method signature
19959 if return type skipped.
19960 (match_java_method): New function.
19962 1998-03-16 Per Bothner <bothner@cygnus.com>
19964 * jcf-io.c (find_classfile): If USE_JCF_STDIO, fopen in binary mode.
19966 1998-02-25 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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):
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
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.
20014 1998-02-12 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
20031 1998-02-11 Brendan Kehoe <brendan@cygnus.com>
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.
20041 1998-02-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
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
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
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
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
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
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.
20166 1998-02-09 Brendan Kehoe <brendan@cygnus.com>
20168 * jcf-io.c (open_in_zip): Use strncmp and LEN.
20170 1998-01-29 Dave Brolley <brolley@cygnus.com>
20172 * Make-lang.in (java.info): Added.
20173 (java.install-info): Added
20175 1998-01-27 Brendan Kehoe <brendan@cygnus.com>
20177 * Makefile.in (clean): Also remove java/parse.c.
20179 1998-01-26 Brendan Kehoe <brendan@cygnus.com>
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.
20191 1998-01-23 Per Bothner <bothner@cygnus.com>
20193 * typeck.c (build_java_array_type): Fix two bugs in previous change.
20194 * expr.c (build_anewarray): Add missing promote_type.
20196 1998-01-22 Per Bothner <bothner@cygnus.com>
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.
20216 1998-01-19 Per Bothner <bothner@cygnus.com>
20218 * expr.c (expand_byte_code): Fix performace bug, which caused
20219 searching linenumber_table to be linear rather than constant.
20221 1997-12-12 Per Bothner <bothner@cygnus.com>
20223 * Makefile.in (BISON, BISONFLAGS): Add missing macros.
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.
20230 1997-12-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
20232 * keyword.h: New file, output of keyword.gperf as processed by
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
20238 * parse.y (java_error): Portable error recovery using
20239 java_error_flag (not yet completely tuned).
20241 1997-12-04 Brendan Kehoe <brendan@lisa.cygnus.com>
20243 * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20245 1997-12-03 Alexandre Petit-Bianco <apbianco@cygnus.com>
20247 * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20248 (parse.c, lex.c, keyword.h): New rules for Java source code
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.
20258 1997-12-03 Per Bothner <bothner@cygnus.com>
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
20266 * jcf-reader.c (get_attribute): Test for wrong attribute length.
20268 1997-10-27 Per Bothner <bothner@cygnus.com>
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.)
20274 1997-10-24 Per Bothner <bothner@cygnus.com>
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.
20282 * expr.c (build_java_binop): Fix masking 2nd operand.
20283 * decl.c (init_decl_processing): Set sizetype first.
20285 1997-10-22 Per Bothner <bothner@cygnus.com>
20287 * verify.c (verify_jvm_instructions): Don't set current_subr to NULL.
20288 (Revert Sep 17 change.)
20290 1997-10-21 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
20297 1997-10-20 Per Bothner <bothner@cygnus.com>
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.
20303 * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20304 Promote element type to POINTER_TYPE.
20306 1997-10-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
20314 1997-10-20 Per Bothner <bothner@cygnus.com>
20316 * verify.c (verify_jvm_instructions): Var can also be promoted to int.
20318 * verify.c (merge_types): Handle array types even better ...
20320 1997-10-17 Per Bothner <bothner@cygnus.com>
20322 * expr.c (java_stack_pop): Fix use of NULL_TREE for TYPE_SECOND.
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.
20328 * expr.c (java_stack_swap): Update stack_type_map.
20329 * verify.c (merge_types): Handle array types better.
20331 1997-10-15 Per Bothner <bothner@cygnus.com>
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.
20337 * decl.c, java-tree.h (integer_two_node): New constant node.
20338 * verify.c (merge_types): Check for TYPE_RETURN_ADDR.
20340 1997-10-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
20342 * class.c (append_gpp_mangled_type): Use function argument
20343 unpromoted type to generate mangled name.
20345 1997-10-13 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
20356 * verify.c (verify_jvm_instructions): Use current_jcf to search
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
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
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,
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
20411 (is_compiled_class): Now take into account class seen in the archive.
20413 1997-10-06 Per Bothner <bothner@cygnus.com>
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.
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.
20423 * jcf-io.c (find_class): Don't look first in ".".
20425 1997-10-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20427 * zextract.c (read_zip_archive): Now takes into account the
20429 * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20431 1997-09-20 Per Bothner <bothner@cygnus.com>
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.
20438 1997-09-17 Per Bothner <bothner@cygnus.com>
20440 * verify.c (verify_jvm_instructions): Temporarily set current_subr
20441 to NULL before pushing an exception handler target.
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.
20448 1997-09-17 Alexandre Petit-Bianco <apbianco@cygnus.com>
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.
20456 1997-09-15 Alexandre Petit-Bianco <apbianco@cygnus.com>
20458 * typeck.c (type_for_mode): Now handles double_type_node and
20460 * verify.c (verify_jvm_instructions): The instruction following
20461 the wide bytecode is checked. OPCODE_ret added to the list of
20464 1997-09-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
20484 * decl.c (end_java_method): Call permanent_allocation() before
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
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
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
20505 * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20506 (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20509 1997-09-11 Per Bothner <bothner@cygnus.com>
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.
20517 1997-09-10 Per Bothner <bothner@cygnus.com>
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.
20537 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
20539 * class.c: Include stdio.h.
20541 1997-09-04 Per Bothner <bothner@cygnus.com>
20543 * expr.c (expand_invoke): Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20544 to make sure class is initialized before static/special invoke.
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.
20550 1997-09-03 Per Bothner <bothner@cygnus.com>
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.
20564 * javaop.def (lload): Fix typo.
20565 * jcf-dump.c (main): Clear filename to prevent possibly-bad free.
20567 1997-09-02 Brendan Kehoe <brendan@lisa.cygnus.com>
20569 * parse.c: Don't include function.h.
20571 1997-08-27 Per Bothner <bothner@cygnus.com>
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.
20578 * jcf-dump.c (disassemble_method): Print exception table.
20580 1997-08-27 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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
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
20598 * class.c (set_super_info): Fills the CLASS_* flags according to
20600 (get_access_flags_from_decl): Handles all class flags.
20602 1997-08-26 Per Bothner <bothner@cygnus.com>
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.
20612 1997-08-21 Per Bothner <bothner@cygnus.com>
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.
20620 1997-08-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
20622 * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20623 METHOD_ABSTRACT flag.
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
20629 * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20631 (start_java_method): Hook for SYNCHRONIZED methods.
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
20644 1997-08-19 Per Bothner <bothner@cygnus.com>
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.
20654 * java-tree.h (BCODE_JUMP_TARGET): Renamed to BCODE_TARGET.
20655 (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET): Replaced by
20657 * expr.c (expand_byte_code): Fix logic to warn of unused instructions.
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.
20667 1997-08-19 Per Bothner <bothner@cygnus.com>
20669 * jcf-io.c (find_classfile): Fix thinko.
20670 * jcf-dump.c: Add CONVERT2 (to match changed javaop.def).
20672 1997-08-12 Jason Merrill <jason@yorick.cygnus.com>
20674 * Makefile.in (BISON): Remove.
20676 1997-08-07 Per Bothner <bothner@cygnus.com>
20678 * Makefile.in: Convert to autoconf.
20679 * config-lang.in (outputs): Added java/Makefile.
20681 * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20682 Rename cc1java to jc1.
20684 * lang.c (init_parse, finihs_parse): New functions #ifdef USE_CPPLIB.
20685 * Makefile.in (INTERNAL_CFLAGS): Add @extra_c_flags.
20687 * class.c (class_depth): Do load_class if needed.
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.
20714 1997-08-05 Alexandre Petit-Bianco <apbianco@cygnus.com>
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
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.
20737 1997-08-04 Per Bothner <bothner@cygnus.com>
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.
20747 * parse.c (get_constant): Handle CONSTANT_Float and CONSTANT_Double.
20749 1997-08-01 Alexandre Petit-Bianco <apbianco@cygnus.com>
20751 * parse.c (get_class_constant): Modified to handle array "classes"
20752 * typeck.c (set_local_type): Bug fixed when filling type_map[] with
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.
20777 1997-07-31 Per Bothner <bothner@cygnus.com>
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.
20784 1997-07-25 Per Bothner <bothner@cygnus.com>
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.
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.
20806 1997-07-16 Per Bothner <bothner@cygnus.com>
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.
20823 1997-06-14 Per Bothner <bothner@cygnus.com>
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.
20832 1997-06-09 Per Bothner <bothner@cygnus.com>
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.
20843 1997-06-03 Per Bothner <bothner@cygnus.com>
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.
20866 1997-05-06 Per Bothner <bothner@deneb.cygnus.com>
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.
20887 1997-03-11 Per Bothner <bothner@deneb.cygnus.com>
20889 * expr.c (expand_java_pushc): Support #ifndef REAL_ARITHMETIC case.
20891 1997-02-27 Per Bothner <bothner@deneb.cygnus.com>
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.
20898 1997-02-12 Per Bothner <bothner@kalessin.cygnus.com>
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.
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.
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).
20916 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>
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.
20923 * jcf.h: Make NEW_CPOOL the default.
20924 * jcf.h, jcf-reader.c, parse.c: Remove support for !NEW_CPOOL.
20926 1996-10-24 Per Bothner <bothner@deneb.cygnus.com>