blob: 59fa5b733deaac04d5d873c03cad8019bfbf389f [file] [log] [blame]
2004-11-04 Release Manager
* GCC 3.4.3 released.
2004-09-06 Release Manager
* GCC 3.4.2 released.
2004-07-01 Release Manager
* GCC 3.4.1 released.
2004-05-20 H.J. Lu <>
PR java/14315
Backport from mainline:
2004-03-23 Tom Tromey <>
* jcf-write.c (make_class_file_name): Don't report if mkdir
failed with EEXIST.
2004-04-18 Release Manager
* GCC 3.4.0 released.
2004-04-12 Michael Chastain <>
PR bootstrap/14893:
* (java.install-man): Install from either build
tree or source tree, whichever has the file first.
2004-03-23 Tom Tromey <>
* gcj.texi (Extensions): Document GCJ_PROPERTIES.
2004-03-06 Roger Sayle <>
* jcf-parse.c (java_parse_file): Handle the case that input_filename
is NULL.
2004-02-26 Andrew Haley <>
* parse.y (check_interface_throws_clauses): Check for
!METHOD_INVISIBLE (iface_method).
* class.c (layout_class_methods): Check for CLASS_INTERFACE as
2004-02-22 Matthias Klose <>
Taken from mainline:
2004-02-13 Geoffrey Keating <>
* Install man pages under the same names
(possibly transformed) as the program they document.
2004-02-16 Geoffrey Keating <>
* (java.install-man): Add extra dependencies.
2004-02-07 Kazu Hirata <>
* typeck.c: Update copyright.
2004-02-05 Kelley Cook <> (po-generated): Delete.
2004-01-30 Kelley Cook <>
* (doc/gcj.dvi): Use $(abs_docdir).
2004-01-28 Andrew Pinski <>
* expr.c (build_field_ref): Move variable
definition up.
2004-01-28 Andrew Haley <>
* expr.c (build_field_ref): Widen field offset.
2004-01-27 Andrew Haley <>
* parse.y (check_interface_throws_clauses): Make sure class_decl
has been loaded.
2004-01-20 Kelley Cook <>
* Replace $(docdir) with doc.
(, java.srcinfo,, java.srcman): New rules.
(java.install-man): Revamp rule.
2004-01-19 Kelley Cook <>
GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
instead of deferred backquote.
2004-01-16 Andrew Pinski <>
* typeck.c (find_method_in_interfaces): Move variable
definition up.
2004-01-16 Andrew Haley <>
PR java/13273:
* typeck.c (shallow_find_method): New.
(find_method_in_superclasses): New.
(find_method_in_interfaces): New.
(lookup_do): Rewrite.
* java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
* jcf-parse.c (read_class): Save and restore output_class.
* decl.c (java_expand_body): Set output_class from fndecl.
2004-01-15 Michael Chastain <>
* class.c (gen_indirect_dispatch_tables): Fix string length
2004-01-15 Kelley Cook <>
* (parse.c, parse-scan.c): Always build in doc directory.
(java.srcextra): Copy above back to source directory if requested.
(po-generated): Delete reference to $(parsedir).
(java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
Use implicit rule.
2004-01-14 Jan Hubicka <>
* lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2004-01-09 Mark Mitchell <>
* java-tree.h (java_expand_expr): Change prototype.
* expr.c (java_expand_expr): Add alt_rtl parameter.
2004-01-09 Andrew Haley <>
PR java/12755:
* parse.y (java_fix_constructors): Set output_class.
(java_reorder_fields): Likewise.
(java_layout_classes): Likewise.
(java_expand_classes): Generate indirect dispatch tables.
(java_expand_classes): Set output_class.
(java_finish_classes): Likewise.
* lang.c (java_init): Turn on always_initialize_class_p if we're
using indirect dis[atch.
(java_decl_ok_for_sibcall): Use output_class, not current_class.
(java_get_callee_fndecl): Use class local atable.
* jcf-parse.c
(always_initialize_class_p): Decl moved to java-tree.h.
(HANDLE_CLASS_INFO): Set output_class.
(read_class): Likewise.
(parse_class_file): Call gen_indirect_dispatch_tables.
(parse_zip_file_entries): Set output_class.
(java_parse_file): Set output_class. Don't emit symbol tables.
* java-tree.h (output_class): New.
Remove global declarations for otable, atable, and ctable.
(always_initialize_class_p): moved here from decl.c.
(struct lang_type): Add otable_methods, otable_decl,
otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
ctable_decl, catch_classes, type_to_runtime_map.
* expr.c (build_field_ref): Make otable, atable, and ctable class
local rather than global.
(build_known_method_ref): Likewise.
(build_invokeinterface): Likewise.
(java_expand_expr): Pass runtime type (rather than actual type) to
* except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
this class. Look up each class in that map to delete duplicates.
(expand_end_java_handler): Pass runtime type (rather than actual
type) to expand_start_catch.
* decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
(do_nothing): New.
(java_init_decl_processing): Rearrange things. Remove global
declarations of otable, atable, and ctable.
(java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
(java_expand_body): Set output_class.
* constants.c (build_constant_data_ref): Use output_class, not
(alloc_name_constant): Likewise.
* class.c (gen_indirect_dispatch_tables): New.
(build_class_ref): Generate hard reference to superclass, even if
using indirect dispatch.
(build_static_field_ref): Use class local atable.
(make_class_data): Generate hard reference to superclass, even if
using indirect dispatch.
Generate symbolic references to interfaces when using indirect
(make_class_data): Emit otable, atable, and ctable.
Make otable, atable, and ctable class local rather than global.
(emit_catch_table): Make otable, atable, and ctable class local
rather than global.
2003-12-25 Andrew Pinski <>
* parse.y (catch_clause_parameter): Fix typo.
PR java/13404
* parse.y: (catch_clause_parameter): Return early if $3, aka
formal_parameter, is null.
2003-12-20 Kazu Hirata <>
* class.c: Remove uses of "register" specifier in
declarations of arguments and local variables.
* decl.c: Likewise.
* expr.c: Likewise.
* gjavah.c: Likewise.
* jcf-dump.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-write.c: Likewise.
* keyword.h: Likewise.
* parse.y: Likewise.
* typeck.c: Likewise.
* verify.c: Likewise.
2003-12-06 Kelley Cook <>
* (GCJ_CROSS_NAME): Delete.
(java.install_common, java.install-man): Adjust for above.
(java.uninstall): Likewise.
2003-12-03 Michael Koch <>
* class.c (make_class_data):
Push field value to 'hack_signers' instead of 'signers'.
* decl.c (java_init_decl_processing):
Push field 'hack_signers' instead of 'signers'.
2003-12-03 Zack Weinberg <>
* lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
including iconv.h.
2003-12-03 Ralph Loader <>
PR java/12374:
* parse.y (qualify_ambiguous_name): Remove lots of broken
field access processing - there's no need to do that here,
because we have resolve_field_access. Remove
RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
* java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2003-12-01 Jeff Sturm <>
Fix PR java/13237
* parse.y (java_complete_lhs): Save location prior to patching
2003-11-25 Mohan Embar <>
PR java/12548
* resource.c (write_resource_constructor): Append
"_resource" to constructor identifier name.
2003-11-25 Jeff Sturm <>
Fix PR java/13183.
* constants.c (cpool_for_class): New function.
(outgoing_cpool): Remove global variable.
(alloc_name_constant): Use cpool_for_class.
(build_constants_constructor): Likewise.
* decl.c (java_expand_body): Set current_class.
* java-tree.h (outgoing_cpool) Remove declaration.
(init_outgoing_cpool): Likewise.
* jcf-parse.c (init_outgoing_cpool): Remove function.
(parse_class_file): Don't call init_outgoing_cpool.
* parse.y (java_complete_expand_methods): Don't call
init_outgoing_cpool. Don't save outgoing_cpool.
(java_expand_classes): Don't restore outgoing_cpool.
(java_finish_classes): Likewise.
2003-11-24 Mohan Embar <>
* (java.install-common) Add
symlink for $(target_noncanonical)-gcjh for
native builds.
2003-11-20 Joseph S. Myers <>
* (java.extraclean): Delete.
2003-11-20 Joseph S. Myers <>
* (check-java): Add.
2003-11-19 Jeff Sturm <>
Fix PR java/13024.
* except.c (prepare_eh_table_type): Allocate variable-sized
buffer `buf' with alloca.
2003-11-17 Jeff Sturm <>
Fix PR java/12857.
decl.c (java_init_decl_processing): Don't initialize
class_not_found_type_node, no_class_def_found_type_node.
JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
(class_not_found_type_node, no_class_def_found_type_node):
Don't define.
parse.y (build_dot_class_method_invocation): Add this_class
argument. Qualify method invocations to a different class.
(create_new_parser_context): Initialize saved_data_ctx to 0.
(java_parser_context_save_global): Initialize saved_data_ctx to 1.
(build_dot_class_method): Don't load classes. Register
incomplete types.
(build_incomplete_class_ref): Special cases for interfaces
and inner classes. Move build_dot_class_method call to here...
(patch_incomplete_class_ref): ...from here. Pass current_class
to build_dot_class_method_invocation.
(build_assertion): Pass class_type to
(encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2003-11-17 Jeff Sturm <>
Fix PR java/12739.
* java-tree.h (BLOCK_EMPTY_P): Define.
* parse.y (java_complete_lhs): Check for empty blocks
2003-11-17 Andrew Haley <>
* java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
(struct lang_decl_var:freed): New variable.
* decl.c (poplevel): Mark local vars that have gone out of scope.
(push_jvm_slot): Don't use the RTL of a var that has gone out of
2003-11-16 Jason Merrill <>
* (java.tags): Create TAGS.sub files in each directory
and TAGS files that include them for each front end.
2003-11-15 Tom Tromey <>
* gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2003-11-12 Jason Merrill <>
PR optimization/12547
* lang.c (java_tree_inlining_walk_subtrees): Just walk
2003-11-12 Andrew Haley <>
PR java/11045
* parse.y (fold_constant_for_init): Check that we really do have a
PR java/11533
* lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
init_test_decls being inlined.
PR java/12890:
* parse.y (do_resolve_class): Check return value from
2003-11-11 Tom Tromey <>
PR java/12915:
* parse.y (merge_string_cste): Handle case where we have a
pointer that happens to be zero, not null_pointer_node.
2003-11-10 Tom Tromey <>
* jcf-parse.c (classify_zip_file): Correctly compare
filename_length against length of manifest file's name.
2003-11-08 Tom Tromey <>
PR java/12894:
* jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2003-11-06 Andrew Haley <>
* expr.c (java_stack_swap): Make sure destination stack slots are
of the correct type.
2003-11-03 Kelley Cook <>
* (dvi): Move targets to $(docobjdir).
(gcj.dvi): Simplify rule and adjust target.
( Simplify rule.
(gcj.pod): New intermediate rule.
(gcjh.pod): Likewise.
(jv-scan.pod): Likewise.
(jcf-dump.pod): Likewise.
(gij.pod): Likewise.
(jv-convert.pod): Likewise.
(rmic.pod): Likewise.
(rmiregistry.pod): Likewise.
(gcj.1): Delete.
(gcjh.1): Delete.
(jv-scan.1): Delete.
(jcf-dump.1): Delete.
(gij.1): Delete.
(jv-convert.1): Delete.
(rmic.1): Delete.
(rmiregistry.1): Delete.
2003-11-02 Jeff Sturm <>
Fixes PR java/12866.
* parse.y (resolve_qualified_expression_name): Move test
for outer field access methods from here...
(check_thrown_exceptions) here.
2003-11-01 Kelley Cook <>
* .cvsignore: Delete.
2003-10-28 Frank Ch. Eigler <>
* verify.c (verify_jvm_instructions): Don't warn about legal
eh binding regions generated for example by jdk 1.4.1.
2003-10-24 David S. Miller <>
* jcf-parse.c (jcf_parse): Fix args to fatal_error().
2003-10-22 Andrew Haley <>
(java_get_callee_fndecl): New.
* jcf-parse.c (java_parse_file): Call emit_catch_table().
* java-tree.h (ctable_decl): New.
(catch_classes): New.
(java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
* decl.c (java_init_decl_processing): Add catch_class_type.
Add ctable_decl.
Add catch_classes field.
* class.c (build_indirect_class_ref): Break out from
(make_field_value): Check flag_indirect_dispatch.
(make_class_data): Ditto.
Tidy uses of PUSH_FIELD_VALUE.
Add field catch_classes.
(make_catch_class_record): New.
* java-tree.h (PUSH_FIELD_VALUE): Tidy.
2003-10-22 Kazu Hirata <>
* jcf-write.c: Follow spelling conventions.
* parse.y: Likewise.
2003-10-22 Kazu Hirata <>
* ChangeLog: Fix typos.
* expr.c: Fix comment typos.
* jcf-write.c: Likewise.
* lang.c: Likewise.
* lex.c: Likewise.
* mangle.c: Likewise.
* parse-scan.y: Likewise.
* parse.y: Likewise.
2003-10-22 Tom Tromey <>
* expr.c (expand_byte_code): Only warn about dead bytecode when
extra_warnings is set.
2003-10-22 Bryce McKinlay <>
Fix for PR java/12586.
* mangle.c (find_compression_record_match): Don't iterate through
package namespace elements unless they all match compression_table
2003-10-20 Kelley Cook <>
* (info): Honor $(parsedir) and $(docobjdir).
(generate-manpages): Likewise.
(java.maintainer-clean): Likewise.
( Likewise.
(gcj.1): Likewise.
(gcjh.1): Likewise.
(jv-scan.1): Likewise.
(jcf-dump.1): Likewise.
(gij.1): Likewise.
(jv-convert.1): Likewise.
(rmic.1): Likewise.
(rmiregistry.1): Likewise.
(java.install-man): Likewise.
(parse-scan.o): Move and define complete compile line.
(parse.o): Likewise.
(jcf-tree-inline.o): Move.
2003-10-20 Mark Mitchell <>
* (info): Update dependencies.
(java.install-info): Remove.
($(srcdir)/java/ Replace with ...
($(docobjdir)/ ... this.
2003-10-14 Nathanael Nerode <>
* Replace uses of $(target_alias) with
2003-10-09 Tom Tromey <>
* decl.c (java_init_decl_processing): Declare signers field.
* class.c (make_class_data): Set signers field.
2003-10-09 Jason Merrill <>
* parse.y (patch_assignment): Use make_node to create a BLOCK.
* parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
2003-10-06 Mark Mitchell <>
* ( Replace with ...
(info): ... this.
(java.dvi): Replace with ...
(dvi): ... this.
(java.generated-manpages): Replace with ...
2003-10-03 Kelley Cook <>
* builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
2003-10-01 Andrew Haley <>
* jcf-parse.c (java_parse_file): Write otable and atable.
* java-tree.h (atable_methods): New.
(atable_decl): New.
(atable_syms_decl): New.
(enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
(symbol_*type): Rename method_symbol* to symbol*type.
(emit_offset_symbol_table): Delete.
(emit_symbol_table): New.
(get_symbol_table_index): New.
(atable_type): New.
* expr.c (build_field_ref): Handle flag_indirect_dispatch.
(build_known_method_ref): Likewise.
(get_symbol_table_index): Rename from get_offset_table_index.
Parameterize to allow re-use by differing types of symbol table.
(build_invokevirtual): Pass table to get_offset_table_index.
* decl.c (java_init_decl_processing): Push types and decls for
atable and atable_syyms.
* class.c (build_static_field_ref): Handle flag_indirect_dispatch.
(make_class_data): Add new fields atable and atable_syms.
(emit_symbol_table): Rename from emit_offset_symbol_table.
Parameterize to allow re-use by different types of symbol table.
(build_symbol_entry): Renamed from build_method_symbols_entry.
2003-09-30 Roger Sayle <>
* jcf-write.c (generate_bytecode_insns): Implement evaluate-once
semantics for SAVE_EXPR, by caching the result in a temporary.
2003-09-28 Richard Henderson <>
* check-init.c (check_init): Save and restore input_location
instead of file and line separately.
* decl.c (java_expand_body): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* parse.y (safe_layout_class): Likewise.
* jcf-parse.c (read_class, parse_class_file): Likewise.
(java_parse_file): Use %H for warning locator.
2003-09-28 Roger Sayle <>
* expr.c (java_check_reference): Use the semantics of COND_EXPRs
with void-type branches instead of using a COMPOUND_EXPR.
2003-09-28 Jeff Sturm <>
* decl.c (java_optimize_inline, dump_function): Remove.
* java-tree.h (java_optimize_inline): Remove declaration.
* jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
* parse.y (source_end_java_method, java_expand_classes):
Likewise. Remove dead code.
2003-09-27 Roger Sayle <>
* lang.c (java_init_options): Set flag_evaluation_order.
* expr.c (force_evaluation_order): Don't attempt to force
evaluation order of binary operations using save_expr.
* parse.y (java_complete_lhs): No longer need to call
force_evaluation_order when constructing binary operators.
2003-09-27 Alexandre Petit-Bianco <>
Bryce McKinlay <>
PR java/1333:
* parse.y (not_accessible_field_error): New function.
(resolve_expression_name): Check field access permissions.
(resolve_qualified_expression_name): Use
(resolve_qualified_expression_name): Likewise.
2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
2003-09-23 Roger Sayle <>
* jcf-write.c (generate_bytecode_insns): Optimize binary operations
with equal operands without side-effects.
2003-09-22 Jeff Sturm <>
* decl.c (java_init_decl_processing): Don't emit otable decls
if flag_indirect_dispatch is not set.
2003-09-21 Richard Henderson <>
* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
resource.c: Revert.
2003-09-21 Richard Henderson <>
* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
2003-09-20 Richard Henderson <>
* check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
2003-09-18 Roger Sayle <>
* expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
* check-init.c (check_init): Likewise.
2003-09-18 Roger Sayle <>
* jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
2003-09-16 Andrew Haley <>
* jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
2003-09-17 Ranjit Mathew <>
Fixes PR java/9577
* mangle.c (find_compression_record_match): Skip
over a "6JArray" (the array template mangled string)
(mangle_array_type): Correct minor typo.
(atms): Move definition to the beginning.
2003-09-16 Bryce McKinlay <>
* class.c (add_miranda_methods): Ensure super-interfaces are laid
out. Fix for PR java/12254.
2003-09-11 Richard Henderson <>
* parse.y (source_end_java_method): Update for new
cgraph_finalize_function argument.
2003-09-09 Richard Henderson <>
* parse.y (source_end_java_method): Update call to
2003-09-03 Jeff Sturm <>
* decl.c (java_expand_body): New function.
* expr.c (build_class_init): Set DECL_IGNORED_P.
* java-tree.h (start_complete_expand_method,
java_expand_body): Declare.
* jcf-parse.c (cgraph.h): Include.
(java_parse_file): Handle flag_unit_at_a_time.
(java_estimate_num_insns): Use walk_tree_without_duplicates.
(java_start_inlining): New function.
* parse.h (java_finish_classes): Declare.
* parse.y: Include cgraph.h.
(block): Don't special-case empty block production.
(craft_constructor): Set DECL_INLINE.
(source_end_java_method): Handle flag_unit_at_a_time.
Replace inline code with call to java_expand_body.
(start_complete_expand_method): Remove static modifier.
(java_expand_method_bodies): Patch function tree for
class initialization and/or synchronization as needed.
Don't begin RTL expansion yet.
(java_expand_classes): Check flag_unit_at_a_time before
calling finish_class.
(java_finish_classes): New function.
(java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
(patch_assignment): Set DECL_CONTEXT on temporary variable.
(emit_test_initialization): Set DECL_IGNORED_P.
2003-09-03 Roger Sayle <>
* builtins.c (enum builtin_type): Delete unused enumeration.
* (java/builtins.o): Remove built-types.def dependency.
2003-08-28 Tom Tromey <>
* gcj.texi (Extensions): Document gcjlib URLs.
2003-08-20 Tom Tromey <>
* gcj.texi (Extensions): Added xref.
(libgcj Runtime Properties): Document
2003-08-20 Andrew Haley <>
* except.c (prepare_eh_table_type): Use new encoding for exception
handlers when using -fno-assume-compiled.
2003-08-13 Tom Tromey <>
* gcj.texi (Invoking gij): Document -X and -?.
2003-08-13 Mohan Embar <>
* Added missing win32-host.o to JAVA_OBJS,
* win32-host.c: Removed the unnecessary and broken dependency
on jcf.h
2003-08-11 Tom Tromey <>
* parse.y (java_check_regular_methods): Typo fixes. Call
check_interface_throws_clauses. Use
(check_interface_throws_clauses): New function.
(check_concrete_throws_clauses): New function.
(hack_is_accessible_p): New function.
(find_most_specific_methods_list): Added FIXME.
* typeck.c (lookup_do): Use `flags' argument to decide what to
do. Reimplemented.
(lookup_argument_method_generic): New function.
(lookup_argument_method2): Removed.
* jcf.h (ACC_INVISIBLE): New define.
* jcf-write.c (generate_classfile): Skip invisible methods.
* class.c (add_miranda_methods): New function.
(layout_class_methods): Use it.
(get_access_flags_from_decl): Use ACC_INVISIBLE.
* java-tree.h (METHOD_INVISIBLE): New define.
(lang_decl_func) [invisible]: New field.
(lookup_argument_method_generic): Declare.
(SEARCH_SUPER): Likewise.
(lookup_argument_method2): Removed declaration.
2003-08-05 Tom Tromey <>
Fix for PR java/11600:
* parse.y (java_complete_lhs): See whether we're calling a method
on an array.
(check_thrown_exceptions): Added `is_array_call' argument;
fixed `clone' checking; updated all callers.
2003-08-05 Steven Bosscher <>
* java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
2003-08-03 Tom Tromey <>
* java-tree.h (METHOD_TRANSIENT): Removed.
* decl.c (pushdecl): Removed some dead code.
* class.c (get_access_flags_from_decl): Can't have transient
(add_method_1): Can't have a transient method.
2003-07-28 Andreas Jaeger <>
* jvspec.c: Convert to ISO C90 prototypes.
2003-07-25 Nathan Sidwell <>
* decl.c (force_poplevels): Fix warning call.
2003-07-25 Gabriel Dos Reis <>
* expr.c (expand_java_field_op): Don't use xxx_with_decl
(expand_java_field_op): Likewise.
* class.c (layout_class_method): Likewise
(emit_register_classes): Likewise.
* decl.c (pushdecl): Likewise.
(poplevel): Likewise.
(force_poplevels): Likewise.
(give_name_to_locals): Likewise.
* check-init.c (check_for_initialization): Likewise.
2003-07-24 Jason Merrill <>
* java-tree.h: Move boolean_type_node et al to the back end.
2003-07-19 Kaveh R. Ghazi <>
* class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
2003-07-19 Neil Booth <>
* lang.opt: Don't show -MD_ and -MDD_.
2003-07-18 Neil Booth <>
* lang-options.h: Remove.
* lang.opt: Add help text.
2003-07-15 Kazu Hirata <>
* expr.c: Remove the last argument to expand_assignment().
2003-07-09 Jan Hubicka <>
* java-tree.h (DECL_NUM_STMTS): Rename to...
* lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
New static functions.
* parser.y (add_stmt_to_compound): Do not account statements.
2003-07-08 Mark Wielaard <>
* gcj.texi: CNI now expands to Compiled Native Interface.
2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* (java/gcj.dvi): Use PWD_COMMAND.
2003-07-07 Nathan Sidwell <>
* expr.c (expand_byte_code): Adjist emit_line_note call.
2003-07-06 Neil Booth <>
* lang.c (java_handle_option): Don't handle filenames.
2003-07-02 Zack Weinberg <>
* jcf-path.c: Don't default-define PATH_SEPARATOR nor
* jcf-write.c: Don't default-define DIR_SEPARATOR.
* jcf.h: Delete COMPARE_FILENAMES definition.
2003-07-02 Neil Booth <>
* lang.c (java_init_options): Update prototype.
2003-07-01 Nathan Sidwell <>
* decl.c (poplevel): Adjust define_label call.
2003-06-27 Zack Weinberg <>
* gjavah.c (flag_jni): Make non-static.
* parse-scan.y (ctxp): Make non-static.
* class.c (build_method_symbols_entry)
* expr.c (get_offset_table_index)
* jcf-parse.c (jcf_parse):
Mark the definition static, matching the forward declaration.
2003-06-26 Neil Booth <>
* lang.c (java_handle_option): Don't check for missing arguments.
2003-06-20 Nathan Sidwell <>
* class.c (push_class): Use a location_t to save place.
(emit_register_classes): Set input_location. Adjust
expand_function_end call.
* resource.c (write_resource_constructor): Likewise.
* decl.c (end_java_method): Adjust expand_function_end call.
* parse.y (source_end_java_method): Likewise.
2003-06-17 Robert Abeles <>
* lang.c (java_handle_option): Likewise.
2003-06-16 Neil Booth <>
* lang.c (java_handle_option): Special-casing of optional
joined arguments no longer needed.
* lang.opt: Update switches that take optional argument.
2003-06-15 Neil Booth <>
* lang.opt: Declare Java.
* lang.c (java_init_options): Update.
2003-06-15 Neil Booth <>
* lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
2003-06-14 Neil Booth <>
* lang-specs.h: Rewrite -MD and -MMD to append an underscore.
* lang.c (java_handle_option): -MD and -MMD have an underscore.
* lang.opt: -MD and -MMD have an underscore.
2003-06-14 Nathan Sidwell <>
* class.c (emit_register_classes): Adjust init_function_start
* decl.c (complete_start_java_method): Likewise.
* resource.c (write_resource_constructor): Likewise.
2003-06-14 Neil Booth <>
* Update to use options.c and options.h.
* lang.c: Include options.h not j-options.h.
(java_handle_option): Abort on unrecognized option.
(java_init_options): Request Java switches.
2003-06-11 Neil Booth <>
* Handle mostlyclean.
2003-06-11 Tom Tromey <>
* lang.c (java_handle_option): Update dependency_tracking for
OPT_MF case.
* lang.c (java_handle_option): OPT_fbootclasspath_ can take an
empty argument.
2003-06-10 Andrew Haley <>
* resource.c (write_resource_constructor): Use expand_expr to
generate the address of the label attached to a resource.
* (java/resource.o): Add expr.h
2003-06-10 Andrew Haley <>
(java_decl_ok_for_sibcall): New.
2003-06-09 Neil Booth <>
* (JAVA_OBJS, java/lang.o): Update.
(java/j-options.c, java/j-options.h): New.
* java-tree.h (resource_name, compile_resource_file,
compile_resource_data): Constify.
* jcf-write.c (jcf_write_base_directory): Similarly.
* jcf.h (jcf_write_base_directory): Similarly.
* lang.c: Include j-options.h.
(cl_options_count, cl_options, string_option, java_decode_option,
lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
process_option_with_no): Remove.
(resource_name): Constify.
(java_handle_option): New.
(java_init): Don't call jcf_path_init.
(java_init_options): Call jcf_path_init.
* lang.opt: New.
* resource.c (compile_resource_data, compile_resource_file): Constify.
2003-06-09 Nathan Sidwell <>
* java-tree.h (DECL_FUNCTION_LAST_LINE): New.
(struct lang_decl_func): Add last_line field.
* parse.y (missing_return_error, finish_method_declaration,
lookup_cl, start_artificial_method_body, source_end_java_method,
start_complete_expand_method): Adjust.
2003-06-08 Tom Tromey <>
* jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
2003-06-08 Roger Sayle <>
* builtins.c (define_builtin_type, builtin_types): Delete.
(define_builtin): Rewritten to take just the built-in code,
the function's name, type and fallback library function name.
All built-ins used by Java are implicit and BUILT_IN_NORMAL.
(initialize_builtins): Overhaul to define the GCC builtins
used by gcj manually, providing the Java run-time's
implementations as the fallback library function.
2003-06-08 Anthony Green <>
* parse.y (patch_cast): Fix conversions from floating-point to
integral types.
2003-06-08 Neil Booth <>
* Update.
* lang.c: Include opts.h. Define cl_options_count and cl_options.
2003-06-07 Neil Booth <>
* lang.c (java_init_options): Update.
2003-06-05 Jan Hubicka <>
* Add support for stageprofile and stagefeedback
2003-05-31 Roger Sayle <>
* lang.c (java_init_options): Prescribe wrap-around two's
complement arithmetic overflow by setting flag_wrapv.
2003-05-29 Roger Sayle <>
* builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
(builtin_record): Add an additional builtin_code field to
record which GCC built-in corresponds to the Java function.
(java_builtins): Add new entries for atan, atan2, exp, log,
pow and tan.
(max_builtin, min_builtin, abs_builtin): Perform constant
folding on the resulting tree.
(java_build_function_call_expr): Likewise, perform constant
folding on the resulting tree.
(initialize_builtins): The NULL creators are now allowed in
the java_builtins table, which is now terminated by an entry
with builtin_code == END_BUILTINS.
(check_for_builtin): Likewise. If the matching creator is
NULL, construct the call using java_build_function_call_expr
directly with the decl for the corresponding builtin_code.
2003-05-23 Nathanael Nerode <>
* win32-host.c: Normalize copyright boilerplate.
2003-05-16 Kaveh R. Ghazi <>
* parse.y (print_int_node): Use string concatentation on
HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
function calls into one.
2003-05-13 Zack Weinberg <>
* jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
fatal_io_error with calls to fatal_error; add ": %m" to the end of
all the affected error messages.
2003-05-13 Richard Henderson <>
* class.c (layout_class_method): Set DECL_EXTERNAL.
* decl.c (java_mark_decl_local, java_mark_class_local): New.
* java-tree.h (java_mark_class_local): Declare.
* jcf-parse.c (parse_class_file): Use it.
* parse.y (java_expand_classes): Likewise.
2003-05-04 Nathan Sidwell <>
* (java/parse.o, java/parse-scan.o): Depend on input.h.
* lex.h: #include input.h.
* jv-scan.c (input_filename): Remove.
2003-05-02 Tom Tromey <>
PR java/10491:
(handle_inner_classes): New function.
2003-05-01 Tom Tromey <>
PR java/10459:
* parse.y (finish_for_loop): Do nothing if update expression is a
EXPR_WFL_NODE wrapping nothing.
(java_complete_lhs) <COMPOUND_EXPR>: Likewise.
2003-05-02 Nathan Sidwell <>
* lex.h (input_lineno): Remove declaration.
* parse-scan.y: #include input.h.
(input_filename): Remove declaration.
(input_location): Add definition.
(input_line): Remove definition.
2003-05-01 Nathan Sidwell <>
* lex.h (lineno): Rename to ...
(input_line): ... here
* parse-scan.y (lineno): Rename to ...
(input_line): ... here.
(reset_report): Rename lineno to input_line.
* check-init.c (check_init): Likewise.
* class.c (push_class): Likewise.
* decl.c (complete_start_java_method, end_java_method): Likewise.
* expr.c (expand_byte_code): Likewise.
* jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
* jcf-write.c (generate_bytecode_insns): Likewise.
* lex.c (java_init_lex, java_allocate_new_line,
do_java_lex): Likewise.
* parse.h (YYNOT_TWICE): Likewise.
* parse.y (empty_statement, expression_statement,
java_pop_parser_context, java_parser_context_save_global,
yyerror, register_fields, method_header, safe_layout_class,
find_in_imports_on_demand, create_artificial_method,
source_end_java_method, start_complete_expand_method,
build_thisn_assign, java_complete_lhs,
maybe_absorb_scoping_block): Likewise.
2003-04-20 Mohan Embar <>
* jcf-io.c (find_class): use DIR_SEPARATOR instead of
'/' when computing java source filename
2003-04-13 Tom Tromey <>
* gjavah.c (print_c_decl): Indentation fix.
2003-04-12 Zack Weinberg <>
* class.c (make_field_value, make_method_value, get_dispatch_table)
(make_class_data, emit_offset_symbol_table)
* constants.c (build_constants_constructor)
* parse.y (maybe_build_array_element_wfl):
Use build_constructor.
2003-04-10 Eric Blake <>
PR java/10253:
* parse.y (string_convert_int_cst): Always use at least one digit
in string conversion. Remove ASCII dependence.
(merge_string_cste): Fix merging of 3-byte UTF-8 characters.
2003-03-16 Mohan Embar <>
* added win32-host.c
* jcf.h: defined macro JCF_OPEN_EXACT_CASE which
resolves to open() on non-Win32 platforms and
Win32-specific jcf_open_exact_case() on Win32
* jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
when trying .java and .class files
* win32-host.c: added to repository. Defines
Win32-specific jcf_open_exact_case()
2003-04-10 Andrew Haley <>
* jcf-write.c (struct jcf_partial): num_jsrs: new field.
(maybe_free_localvar): Renamed from localvar_free.
Add new arg, really.
(generate_bytecode_insns): Set new variable, jsrs.
Only free local vars if no jsr insns have been emittted.
Call maybe_free_localvar, not localvar_free.
2003-03-30 Joseph S. Myers <>
* gcj.texi: Remove @ at start of file.
2003-03-25 Tom Tromey <>
* parse.y (create_interface): Call CHECK_DEPRECATED.
2003-03-23 Zack Weinberg <>
* Link jcf-dump against $(LDEXP_LIB).
2003-03-21 Zack Weinberg <>
* javaop.h (jfloat, jdouble): Make them structures mirroring
the bit fields of IEEE float and double respectively.
(union Word, union DWord): Delete.
(WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
* gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
D_NAN_MASK): Delete.
(jni_print_float, jni_print_double): New. Generate
hexadecimal floating constants.
(print_field_info): Use jni_print_float/double.
* jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
finite floating point numbers for output; special case
non-finite floats.
2003-03-19 Nathanael Nerode <>
* lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
Replace 0 and 1 with true and false in return statements.
2003-03-19 Tom Tromey <>
* lex.c (do_java_lex): Renamed from java_lex.
(java_lex): New function.
Include timevar.h.
2003-03-13 Tom Tromey <>
* parse.y (resolve_inner_class): Error if qualifier is a primitive
2003-03-04 Andrew Haley <>
* gjavah.c (is_first_data_member): New global variable.
(print_c_decl): If it's the first data member, align it as the
(process_file): Set is_first_data_member.
2003-03-11 Tom Tromey <>
* parse.y (resolve_field_access): Initialize class if field is
found in another static field.
* expr.c (build_class_init): Don't optimize out initialization of
implemented interface.
2003-03-11 Andrew Haley <>
* jcf-io.c (caching_stat): Initialize origsep to remove compiler
2003-03-10 Ranjit Mathew <>
* jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
and DIR_SEPARATOR_2 for a target.
Correct minor typos.
* jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
and DIR_SEPARATOR_2 for a target into account.
2003-03-08 Neil Booth <>
* lang.c (java_init): Update prototype, move code to java_post_options.
(java_post_options): Similarly.
2003-03-05 Ranjit Mathew <>
* jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
compare file name components depending on the case-sensitivity
or otherwise of the host file system.
* jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
"strcmp" to compare file name components.
Use IS_DIR_SEPARATOR instead of comparing directly against
(jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
comparing directly against DIR_SEPARATOR.
2003-03-04 Tom Tromey <>
* (java.tags): New target.
2003-03-01 Roger Sayle <>
* java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
(initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
2003-03-01 Tom Tromey <>
* parse.y (jdep_resolve_class): Only check deprecation if we found
a decl.
2003-02-28 Tom Tromey <>
PR java/9695:
* class.c (maybe_layout_super_class): Always pass a WFL to
* parse.y (do_resolve_class): Updated comment to explain
2003-02-26 Tom Tromey <>
* jcf-write.c (generate_classfile): Check whether class is
deprecated before writing attribute count.
2003-02-25 Roger Sayle <>
* java/decl.c (java_init_decl_processing): Get soft_fmod_node from
built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
2003-02-23 Tom Tromey <>
* lang-options.h: Added -Wdeprecated.
* gcj.texi (Warnings): Document -Wdeprecated.
* java-tree.h (flag_deprecated): Declare.
* lang.c (lang_W_options): Added deprecated.
(flag_deprecated): New global.
* chartables.h: Rebuilt.
* (process_one): Look at whitespace.
(print_tables): Define LETTER_SPACE, LETTER_MASK.
* parse.h (CLEAR_DEPRECATED): New macro.
* jcf-parse.c (handle_deprecated): New function.
* jcf-reader.c (get_attribute): Handle Deprecated attribute.
* parse.y (resolve_type_during_patch): Check deprecation.
(jdep_resolve_class): Likewise.
(process_imports): Likewise.
(resolve_expression_name): Likewise.
(check_deprecation): Strip arrays from decl. Check
(patch_method_invocation): Also check the particular constructor
for deprecation.
(register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
* jcf-write.c (append_deprecated_attribute): New function.
(generate_classfile): Generate deprecated attribute when
* lex.c (java_parse_doc_section): Return type now void. Rewrote.
(java_lex) [case '*']: Simplify logic.
(java_start_char_p): Use LETTER_MASK.
(java_part_char_p): Likewise.
(java_space_char_p): New function.
2003-02-20 Nathan Sidwell <>
Change base class access representation.
* java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
(add_interface_do): Likewise.
2003-02-12 Ranjit Mathew <>
* decl.c (java_init_decl_processing): Change
soft_lookupjnimethod_node to reflect the change in
signature of _Jv_LookupJNIMethod in libjava/
* expr.c (build_jni_stub): Calculate and pass the size
on the stack of the arguments to a JNI function. Use
new target macro MODIFY_JNI_METHOD_CALL to allow a
target to modify the call to a JNI method.
2003-02-08 Roger Sayle <>
* jcf-io.c (java_or_class_file): Use libiberty's lbasename
instead of basename to avoid compiler warnings on Tru64.
2003-02-04 Joseph S. Myers <>
* gcj.texi: Update to GFDL 1.2.
2003-01-31 Andrew Haley <>
* parse.y (java_expand_classes): Scan the whole class list looking
for access methods that haven't yet been expanded.
2003-01-31 Adrian Bunk <>
Fix for java/4269:
to fix bootstrap on sparc-unknown-netbsdelf1.5.
* jcf-parse.c: Likewise.
2003-01-31 Mark Wielaard <>
* gjavah.c (throwable_p): Allocate 1 more byte for string.
2003-01-31 Nathan Sidwell <>
* class.c (make_class): Use BINFO_ELTS.
(set_super_info): Likewse.
(add_interface_do): Likewise.
2003-01-30 Tom Tromey <>
* jcf-parse.c (read_class): Update identifier's class value if it
changed during parsing.
2003-01-30 Loren James Rittle <>
* (po-generated): Find the targets in $(parsedir).
Propagate change to all other rules as required.
(java/parse-scan.o): Add explicit dependency on
$(parsedir)/java/parse-scan.c .
2003-01-29 Tom Tromey <>
* parse.y (patch_assignment): Only transform the rhs of an
assignment when compiling to native.
2003-01-28 Tom Tromey <>
* jcf-write.c (generate_bytecode_conditional): Typo fixes.
2003-01-28 Tom Tromey <>
* lex.c (java_lex): Don't include UEOF as part of token.
(java_read_unicode): Error if \u sequence prematurely terminated.
2003-01-27 Tom Tromey <>
* parse.y (java_check_regular_methods): Check for construct after
checking types in throws clause.
2003-01-24 Tom Tromey <>
* class.c (build_static_field_ref): Only a String or numeric field
can fold to a constant.
2003-01-23 Tom Tromey <>
* jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
file name in resource buffer.
2003-01-23 Tom Tromey <>
* expr.c (build_known_method_ref): Use method's context to find
method table index.
2003-01-23 Tom Tromey <>
* constants.c (set_constant_entry): Allocated cleared memory.
2003-01-22 Tom Tromey <>
* java-tree.h: Don't use PARAMS.
* resource.c: Add prototypes for all functions.
(write_resource_constructor): Use `const char *' to avoid
2003-01-22 Nathanael Nerode <>
* jcf-parse.c (process_zip_dir): Remove unused variable.
2003-01-22 Tom Tromey <>
* expr.c (build_invokeinterface): Abort if method's context is not
an interface.
2003-01-22 Tom Tromey <>
* gcj.texi (Input and output files): Mention non-class entries.
* decl.c (java_init_decl_processing): Call
* java-tree.h (compile_resource_data, write_resource_constructor,
compile_resource_file, init_resource_processing): Declare.
* (gtfiles): Added resource.c.
* (gt-java-resource.h): New target.
(JAVA_OBJS): Added resource.o.
(java/resource.o): New target.
* resource.c: New file.
* class.c (compile_resource_file): Moved to resource.c.
(registerResource_libfunc): Likewise.
(utf8_decl_list): Mark with GTY; now static.
* jcf-parse.c (classify_zip_file): New function.
(parse_zip_file_entries): Use it; compile .properties files.
(process_zip_dir): Use classify_zip_file and compute_class_name.
Don't write class name into zip directory.
(java_parse_file): Call write_resource_constructor.
(compute_class_name): New function.
* jcf-io.c (read_zip_member): Reindented.
2003-01-21 Tom Tromey <>
* class.c (supers_all_compiled): New function.
(make_class_data): Use it.
2003-01-21 Tom Tromey <>
* parse.y (method_header): Native method can't be strictfp.
No method can be transient or volatile.
2003-01-21 Kaveh R. Ghazi <> (jvspec.o-warn): Add -Wno-error.
2003-01-18 Kazu Hirata <>
* check-init.c: Fix comment typos.
* class.c: Likewise.
* constants.c: Likewise.
* decl.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* java-except.h: Likewise.
* java-tree.h: Likewise.
* javaop.h: Likewise.
* jcf-dump.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-write.c: Likewise.
* lang.c: Likewise.
* mangle.c: Likewise.
* typeck.c: Likewise.
* verify.c: Likewise.
2003-01-18 Kaveh R. Ghazi <>
* (java/jcf-write.o): Depend on $(TM_P_H).
* jcf-write.c: Include "tm_p.h".
2003-01-17 Kaveh R. Ghazi <>
* jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
2003-01-16 Kaveh R. Ghazi <>
* builtins.c (java_build_function_call_expr): Renamed from
build_function_call_expr. All callers changed.
* (java/jcf-parse.o): Depend on $(TM_P_H).
* jcf-parse.c: Include tm_p.h.
* jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
2003-01-14 Tom Tromey <>
* class.c (make_class_data): Check that super is compiled before
building class reference to it.
2003-01-14 Andrew Haley <>
* decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
varargs function -- correct.
2003-01-14 Andrew Haley <>
* decl.c (java_init_decl_processing): Temporarily back out previous patch.
2003-01-14 Andrew Haley <>
* decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
varargs function -- correct.
* parse.y (patch_assignment): Copy the rhs of an assignment into a
temporary if the RHS is a reference.
2003-01-11 Kaveh R. Ghazi <>
* (keyword.h): Pass "-L ANSI-C" to gperf.
* keyword.h: Regenerated.
* All Files: Convert to ISO C style function definitions.
2003-01-09 Nathanael Nerode <>
* parse.y (check_pkg_class_access): ANSIfy definition.
2003-01-09 Kaveh R. Ghazi <>
* decl.c, parse-scan.y, parse.y: Don't cast return value of
xmalloc et al.
* class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
2003-01-09 Geoffrey Keating <>
Merge from pch-branch:
2002-12-02 Geoffrey Keating <>
* (java/gjavah.o): Update dependencies.
* gjavah.c: Include ggc.h.
2002-08-16 Geoffrey Keating <>
* (GCJH_OBJS): Add ggc-none.o.
(JCFDUMP_OBJS): Add ggc-none.o.
(java/jcf-dump.o): Depend on GGC_H.
* jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
CPool substructures.
* jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
* jcf-dump.c: Include ggc.h.
2002-08-08 Geoffrey Keating <>
* jcf.h (union cpool_entry): New.
(struct CPool): Use gengtype to mark. Change field 'data' to be
an array of unions.
(struct JCF): Use gengtype to mark.
(CPOOL_UINT): Update for new cpool_entry type.
(CPOOL_USHORT1): Likewise.
(CPOOL_USHORT2): Likewise.
(CPOOL_FINISH): Use GC to free cpool subfields.
* parse.h (struct parser_ctxt): Mark field current_jcf.
* lex.c (java_init_lex): Use GC to allocate struct JCF.
* jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
(main_jcf): Use gengtype to mark.
(ggc_mark_jcf): Delete.
(get_constant): Update for new cpool_entry type.
(give_name_to_class): Likewise.
(get_class_constant): Likewise.
(init_outgoing_cpool): Use GGC to allocate struct CPool.
(java_parse_file): Use GGC to allocate struct JCF.
(init_jcf_parse): Don't call ggc_add_root.
* jcf-reader.c (jcf_parse_constant_pool): Update for new
cpool_entry type.
* java-tree.h (current_jcf): Use gengtype to mark.
(CPOOL_UTF): Update for new cpool_entry type.
(outgoing_cpool): Use gengtype to mark.
(struct lang_type): GC struct JCF and struct CPool.
* (gtfiles): Add jcf.h.
* constants.c (find_tree_constant): New.
(set_constant_entry): Allocate cpool subfields using GGC. Update
for new cpool_entry type.
(find_constant1): Update for new cpool_entry type.
(find_constant2): Likewise.
(find_utf8_constant): Use find_tree_constant.
(find_class_or_string_constant): Remove unnecessary cast to jword.
Update for new cpool_entry type.
(count_constant_pool_bytes): Update for new cpool_entry type.
(write_constant_pool): Likewise.
(alloc_name_constant): Use find_tree_constant.
(build_constants_constructor): Update for new cpool_entry type.
2002-08-08 Geoffrey Keating <>
* parse.y (mark_parser_ctxt): Delete.
(goal): Don't use ggc_add_root.
(create_new_parser_context): Use GC to allocate struct parser_ctxt.
(java_pop_parser_context): Let GC free parser_ctxt.
(java_parser_context_resume): Likewise.
* parse.h (struct parser_ctxt): Use gengtype to mark.
(ctxp): Likewise.
(ctxp_for_generation): Likewise.
* lex.h (struct java_lc_s): Mark for gengtype.
(java_lexer): Rearrange for gengtype.
* (gtfiles): Add lex.h, parse.h.
2003-01-09 Kaveh R. Ghazi <>
* All Files: Remove PARAMS macro.
* expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
`__STDC__' macros.
* jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
2003-01-09 Christian Cornelssen <>
* (java.install-common, java.uninstall,
java.install-info, java.install-man): Prepend $(DESTDIR)
to destination paths in all (un)installation commands.
(java.install-common): Rewrite $(LN) command to support
DESTDIR with "ln" as well as with "ln -s".
2003-01-08 Nathanael Nerode <>
* java-tree.h: Protect against multiple inclusion.
2003-01-07 Tom Tromey <>
* class.c (add_assume_compiled): Don't adjust parent if we're
already at the root of tree.
2003-01-05 Kaveh R. Ghazi <>
* lang.c (dump_compound_expr): Prototype.
2003-01-03 Tom Tromey <>
Fix for PR java/8712:
* expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
when simply checking against `null'.
2003-01-03 Tom Tromey <>
* gcj.texi (Standard Properties): Document http.proxyHost and
* gcj.texi (GNU Classpath Properties): Document new properties.
2003-01-02 Steven Bosscher <>
* java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
java/lang-options.h, java/mangle.c, java/mangle_name.c,
java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
2003-01-01 Steven Bosscher <>
*, boehm.c, buffer.c,
buffer.h, builtins.c, class.c,, constants.c,
convert.h, decl.c, except.c,
expr.c, java-except.h,
java-tree.h, javaop.def,
jcf-parse.c, jcf-write.c,
jv-scan.c, jvgenmain.c,
jvspec.c, keyword.gperf,
keyword.h, lang-options.h,
lang-specs.h, lang.c, lex.c,
lex.h, mangle.c, mangle_name.c,
parse-scan.y, parse.h, parse.y,
typeck.c, verify.c, xref.c,
xref.h: Replace "GNU CC" with
"GCC" in the copyright header.
* check-init.c, gjavah.c, javaop.h,
jcf-depend.c, jcf-dump.c, jcf-io.c,
jcf-path.c, jcf-reader.c, jcf.h,
zextract.c, zipfile.h: These files are
"part of GCC". Also say "GCC" not "GNU CC".
2002-12-30 DJ Delorie <>
* Protect against texi2pod/pod2man failing.
2002-12-28 Joseph S. Myers <>
* gcj.texi: Use @copying.
2002-12-27 Mark Mitchell <>
* gjavah.c (print_name_for_stub_or_jni): Adjust call to
(print_cxx_classname): Add add_scope parameter.
(print_class_decls): Do not emit a semicolon after the extern
"Java" block.
(process_file): Adjust calls to print_cxx_classname.
2002-12-23 Joseph S. Myers <>
* gcj.texi: Include Cover Texts in man page.
2002-12-23 Jeff Sturm <>
* class.c (build_static_field_ref): Check FIELD_FINAL.
* constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
instead of current_constant_pool_data_ref.
* java-tree.h (current_constant_pool_data_ref): Undefine.
* jcf-parse.c (init_outgoing_cpool): Don't initialize
* except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
not build_internal_class_name.
* parse.y (patch_incomplete_class_ref): Always emit `class$' method.
Use it when class ref isn't certain to be compiled.
2002-12-23 Joseph S. Myers <>
* gcj.texi: Include gcc-common.texi.
* ($(srcdir)/java/, java/gcj.dvi): Depend on
2002-12-22 Anthony Green <>
* gcj.texi (Limitations): Add note about org.xml.sax and
2002-12-20 Tom Tromey <>
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
where minimum case value is Integer.MIN_VALUE.
Fixes PR java/8955.
2002-12-18 Andrew Haley <>
* parse.y (patch_invoke): Force evaluation order when `check' is
set. For PR libgcj/8945.
2002-12-16 Mark Mitchell <>
* gcj.texi: Change version number to 3.4.
2002-12-05 Ranjit Mathew <>
Andrew Haley <>
* parse.y (source_end_java_method): Remove custom encoding of line
numbers for a function decl before passing it to the back end.
2002-12-03 Andrew Haley <>
* class.c (make_class_data): New field, "chain".
* decl.c (java_init_decl_processing): Likewise.
2002-12-02 Tom Tromey <>
For PR java/8740:
* parse.y (do_resolve_class): Handle qualified name via
2002-11-30 Zack Weinberg <>
* boehm.c, buffer.c, builtins.c, check-init.c, class.c,
constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
Include coretypes.h and tm.h.
* Update dependencies.
2002-11-27 Kaveh R. Ghazi <>
* decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
2002-11-25 Diego Novillo <>
* jcf-reader.c: Don't expand JCF_readu4 inside the
expansion of JCF_SKIP.
2002-11-25 Diego Novillo <>
* jcf-reader.c: Don't expand JCF_readu4 inside the
expansion of JCF_SKIP.
2002-11-22 Tom Tromey <>
* parse.y (patch_binop): Cast right hand side of shift expression
to `int'. Fixes PR java/8676.
2002-11-22 Ranjit Mathew <>
Andrew Haley <>
* gcc/java/jcf-write.c (write_classfile): Remove target
class file, if it exists, before renaming the temporary
class file to it.
2002-11-19 Jason Thorpe <>
* jvspec.c (lang_specific_spec_functions): New.
2002-11-18 Tom Tromey <>
Fix for PR java/7912:
* expr.c (can_widen_reference_to): Allow cast of array to
Cloneable or Serializable.
* java-tree.h (java_lang_cloneable_identifier_node): Declare.
(java_io_serializable_identifier_node): Likewise.
* parse.y (java_lang_cloneable, java_io_serializable): Removed.
(valid_ref_assignconv_cast_p): Use new identifier nodes.
* lex.c (java_init_lex): Don't initialize java_lang_cloneable and
* decl.c (java_init_decl_processing): Initialize
java_lang_cloneable_identifier_node and
(java_lang_cloneable_identifier_node): New global.
(java_io_serializable_identifier_node): Likewise.
2002-11-14 Jens-Michael Hoffmann <>
* buffer.c: Remove unnecessary casts.
* check-init.c: Likewise.
* class.c: Likewise.
* constants.c: Likewise.
* decl.c: Likewise.
* except.c: Likewise.
* gjavah.c: Likewise.
* jcf-io.c: Likewise.
* jcf-parse.c: Likewise.
* jcf-path.c: Likewise.
* jvspec.c: Likewise.
* lang.c: Likewise.
* lex.c: Likewise.
* verify.c: Likewise.
2002-11-06 Tom Tromey <>
* gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
a JNI header.
2002-11-05 Tom Tromey <>
Fix for PR java/6388.
* lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
* java-tree.h (enum java_tree_index): New values
(decimal_int_max, decimal_long_max): New defines.
* lex.c (yylex): Rewrote range checking. Sign extend literals.
(error_if_numeric_overflow): Rewrote range checking.
* decl.c (java_init_decl_processing): Initialize decimal_int_max,
2002-11-02 Tom Tromey <>
* java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
* class.c (make_method_value): Put class name, not signature, into
`throws' field. For PR java/8415.
2002-10-24 Tom Tromey <>
* gcj.texi (Invoking gij): Document --showversion.
(Standard Properties): java.library.path now set.
2002-10-23 Tom Tromey <>
* gjavah.c (decode_signature_piece): In JNI mode, print
`jobjectArray' when array depth is nonzero.
Fixes PR java/8296.
2002-10-15 Andrew Haley <>
* parse.y (patch_invoke): Call force_evaluation_order on a static
arg list.
(resolve_qualified_expression_name): Call force_evaluation_order
on a arg list that is part of a Qualified Expression Name.
* lang.c (dump_compound_expr): New.
(java_dump_tree): New.
2002-10-20 Ranjit Mathew <>
* gcj.texi: Added item describing the GCJ runtime property
2002-10-15 Richard Henderson <>
* jcf-parse.c (get_constant): Fix type warning.
2002-10-15 Andrew Haley <>
* java-tree.h (java_inlining_merge_static_initializers): Declare.
(java_inlining_map_static_initializers): Declare.
2002-10-14 Andrew Haley <>
* tree-inline.c (remap_block): All local class initialization
flags go in the outermost scope.
(expand_call_inline): Call java_inlining_map_static_initializers.
(expand_call_inline): Call java_inlining_merge_static_initializers.
* java/lang.c (merge_init_test_initialization): New.
(java_inlining_merge_static_initializers): New.
(inline_init_test_initialization): New.
(java_inlining_map_static_initializers): New.
2002-10-11 Mark Wielaard <>
* gcj.texi (Compatibility): Add Limitations and Extensions section.
2002-10-10 Kaveh R. Ghazi <>
* class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
2002-10-09 Kaveh R. Ghazi <>
* parse.y (merge_string_cste): Add parentheses around & within |.
2002-10-08 Tom Tromey <>
* parse.y (variable_declarator_id): Simplify error path for
array declarator error. For PR java/8003.
2002-10-08 Zack Weinberg <>
* gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
2002-10-08 Andrew Haley <>
* parse.y (attach_init_test_initialization_flags): Check for
2002-10-07 Anthony Green <>
* parse.y (merge_string_cste): Fix bug in string concatenation.
2002-10-03 Michael Koch <>
* gcj.texi (Standard properties):
Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
2002-10-02 Roger Sayle <>
PR optimization/6627
* lang.c (java_init): If storing the vbit in function
pointers, ensure that force_align_functions_log is atleast
one to aid compatability with g++ vtables.
2002-10-01 Nathan Sidwell <>
* jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
foul of type-based aliasing.
2002-09-30 Anthony Green <>
* gcj.texi (Invoking jv-scan): Fix texinfo.
2002-09-28 Anthony Green <>
* gcj.texi (Invoking jv-scan): Add --no-assert documentation.
(Code Generation): Add -fno-assert documentation.
* jv-scan.c (flag_assert): New global.
(options): Add assert option.
(help): Add --no-assert documentation.
* parse-scan.y (flag_assert): New global.
* lang.c (lang_f_options): Add -fassert/-fno-assert support.
(flag_assert): New global.
* java-tree.h (flag_assert): New global.
* lex.c (java_lex): Obey flag_assert.
* jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
calling cc1.
2002-09-26 Andrew Haley <>
* expr.c (build_java_array_length_access): Check for null pointer.
* expr.c (expand_java_arrayload): Likewise.
2002-09-21 Richard Henderson <>
* jcf-parse.c (get_constant): Decode from IEEE no matter
what the target format.
2002-09-20 Kazu Hirata <>
* ChangeLog: Follow spelling conventions.
* class.c: Likewise.
* decl.c: Likewise.
* expr.c: Likewise.
* gjavah.c: Likewise.
* java-tree.h: Likewise.
* jcf-dump.c: Likewise.
* jcf-parse.c: Likewise.
* jvspec.c: Likewise.
* lang.c: Likewise.
* mangle.c: Likewise.
* parse.y: Likewise.
2002-09-17 Tom Tromey <>
* lex.c (java_read_unicode_collapsing_terminators): Handle case
where \r appears at EOF. Fixes PR java/7950.
2002-09-16 Volker Reichelt <>
* jvspec.c (lang_specific_driver): Remove unused variable.
2002-09-16 Geoffrey Keating <>
* java-tree.h (union lang_tree_node): Add chain_next option.
2002-09-16 Richard Henderson <>
* jcf-parse.c (get_constant): Runtime check for IEEE format;
use new real.h interface.
* jcf-write.c (find_constant_index): Use new real.h interface.
2002-09-15 Kazu Hirata <>
* lang.c: Follow spelling conventions.
2002-09-11 Per Bothner <>
* parse.y (fold_constant_for_init): If a VAR_DECL, convert numerical
constant to the type of the field.
(java_complete_tree): Remove now-redundant code.
* parse.y (fold_constant_for_init): 'null' is not a constant expr.
2002-09-03 Jesse Rosenstock <>
For PR java/5794:
* verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
return label if a ret instruction for the jsr has been reached.
2002-09-09 Ranjit Mathew <>
* parse.y (DIR_SEPARATOR): Don't define.
(check_class_interface_creation): Use IS_DIR_SEPARATOR.
2002-08-28 Andrew Haley <>
* verify.c (verify_jvm_instructions): Allow exception handler
inside code that is being protected, but generate a warning.
* except.c (link_handler): Initialize `expanded' in new eh_range.
(binding_depth, is_class_level, current_pc): Declare extern.
2002-09-01 Mark Wielaard <>
* gcj.texi: Add chapter about system properties.
Fixed some typos.
2002-08-26 Tom Tromey <>
* parse.y (try_builtin_assignconv): Allow narrowing primitive
conversion if RHS_TYPE is byte, short, or char.
2002-08-22 Tom Tromey <>
* gcj.texi (Invoking gij): Document -cp and -classpath.
2002-08-21 Tom Tromey <>
* (java/jcf-path.o): Use $(datadir), not
$(prefix)/share. For PR libgcj/7633.
For PR java/6005 and PR java/7611:
* lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
(java_can_use_bit_fields_p): New function.
2002-08-16 Tom Tromey <>
* gcj.texi (Class Initialization): Mention class initialization of
2002-07-30 Andrew Haley <>
* (java-tree-inline.o): New.
(JAVA_OBJS): Add java-tree-inline.o.
* parse.y (source_end_java_method): Call java_optimize_inline.
(java_expand_method_bodies): Save method's tree in
(add_stmt_to_compound): Keep track of the number of statments.
* lang.c (java_init): Enable flag_inline_trees.
(java_post_options): If flag_inline_functions is on, enable
flag_inline_trees instread.
(decl_constant_value): New.
(java_tree_inlining_walk_subtrees): New.
* java-tree.h (DECL_NUM_STMTS): New macro.
(java_optimize_inline): Declare.
* expr.c (java_expand_expr): Allow a BLOCK to return a value.
Handle a LABEL_EXPR.
* decl.c (build_result_decl): If we already have a DECL_RESULT
don't make another.
(dump_function): New.
(java_optimize_inline): New.
(dump_function): New.
2002-08-13 Jesse Rosenstock <>
For PR java/7483:
* parse.y (build_assertion): Invert return from
2002-08-08 Bryce McKinlay <>
* jcf-write.c (get_access_flags): Return correct access flags for
private and protected inner classes.
2002-08-08 Nathan Sidwell <>
* java/ (java.mostlyclean): Remove coverage files.
2002-08-05 Geoffrey Keating <>
* mangle_name.c: Don't include obstack.h twice.
* xref.c: Don't include obstack.h.
2002-08-04 Geoffrey Keating <>
* class.c: (permanent_obstack): Delete declaration.
* constants.c: (permanent_obstack): Delete declaration.
* except.c: (permanent_obstack): Delete declaration.
* expr.c: (permanent_obstack): Delete declaration.
* jcf-parse.c: (permanent_obstack): Delete declaration.
(saveable_obstack): Delete declaration.
* parse.h: (permanent_obstack): Delete declaration.
* typeck.c: (permanent_obstack): Delete declaration.
2002-08-04 Joseph S. Myers <>
* gcj.texi (version-gcc): Increase to 3.3.
2002-07-22 Tom Tromey <>
* lex.c (java_lex): Check for `e' or `E' after 0.
2002-07-21 Richard Henderson <>
* lang.c (java_unsafe_for_reeval): New.
2002-07-21 Neil Booth <>
* jcf-path.c (GET_ENV_PATH_LIST): Remove.
(jcf_path_init): Use GET_ENVIRONMENT.
2002-07-10 Roger Sayle <>
Zack Weinberg <>
* builtins.c (initialize_builtins): Remove defines that
handled C/C++ specific junk hereby removed from builtins.def.
2002-07-07 Neil Booth <>
* lang.c (java_post_options): Update prototype.
2002-07-05 Roger Sayle <>
* builtins.c (initialize_builtins): Ignore the additional
parameter to DEF_BUILTIN. Handle more C/C++ specific junk in
the builtins.def file.
2002-07-01 Tom Tromey <>
For PR libgcj/7073:
* parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
2002-07-01 Roger Sayle <>
* java/decl.c (builtin_function): Accept additional parameter.
(java_init_decl_processing): Pass an additional NULL_TREE
argument to builtin_function.
2002-06-29 T.J. Mather <>
* gcj.texi: Fixed gcj invocation example so that it compiles.
2002-06-26 Kaveh R. Ghazi <>
* lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
* parse.y (mark_parser_ctxt): Likewise.
(check_modifiers, declare_local_variables): Avoid incorrect
hardcoded constant 10.
* lex.c (java_read_char): Avoid "comparison is always true"
2002-06-25 Andreas Schwab <>
* expr.c (JSR): Avoid undefined operation on PC.
2002-06-21 Kaveh R. Ghazi <>
* decl.c (clear_binding_level): Const-ify.
2002-06-13 Akim Demaille <>
* parse.y (class_declaration, interface_declaration): Make sure
all their rules have an action, in order to avoid meaningless `$$
= $1' and their type clashes.
2002-06-11 Tom Tromey <>
* jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
* parse-scan.y (statement_without_trailing_substatement): Added
(assert_statement): New rule.
* java-tree.h (struct lang_type) [assertions]: New field.
(FIELD_SYNTHETIC): New define.
* lex.c (java_lval;): Added ASSERT_TK.
* parse.y (ASSERT_TK): Added.
(statement_without_trailing_substatement): Added assert_statement.
(assert_statement): New rule.
(build_assertion): New function.
(maybe_generate_pre_expand_clinit): Create and initialize
(lookup_package_type): Removed decl.
* keyword.h: Rebuilt.
* keyword.gperf (assert): New token.
2002-06-10 Akim Demaille <>
* parse.y (interface_type_list, class_member_declaration)
(unary_expression_not_plus_minus): Remove duplicate %type.
Whitespace changes.
2002-06-09 Tom Tromey <>
* (java/lang.o): Use LANGHOOKS_DEF_H.
* parse.y (method_header): Give error message in all cases.
Fixes PR java/6865.
2002-06-10 Bryce McKinlay <>
Don't use RTL inlining. Fix for PR java/6820.
* lang.c (LANG_HOOKS_POST_OPTIONS): Define.
(flag_really_inline): New.
(java_decode_option): Set flag_really_inline if -finline-functions
is seen.
(java_post_options): New function. Turn off inlining unless
flag_really_inline is set.
2002-06-10 Bryce McKinlay <>
* gjavah.c (throwable_p): Accept argument as either a classname or
signature fragment. Create null-terminated classname string for super
when calling itself recursively.
(decode_signature_piece): Skip first character from class name
signature when calling throwable_p.
2002-06-08 H.J. Lu (
* jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
2002-06-04 Tom Tromey <>
* jcf-write.c (perform_relocations): Optmize a goto to a goto.
2002-06-04 Michael Koch <>
* gcj.texi (Input Options): Fixed typo.
2002-06-04 Zack Weinberg <>
* java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
and all now-pointless local variables. Rename other local
variables to reflect their not being handles.
* java-tree.h, jcf-dump.c, jcf-io.c: Remove all
#if JCF_USE_STDIO blocks.
* parse.y: Add missing semicolon at end of rule.
2002-06-03 Geoffrey Keating <>
* check-init.c (attach_initialized_static_class): Delete, unused.
* parse.y: Use htab_t instead of struct hashtable, update
all uses.
* java-tree.h: Include hashtab.h instead of hash.h.
(struct lang_decl_func): Use htab_t, set up for gengtype.
(struct init_test_hash_entry): Delete.
(struct treetreehash_entry): New.
(java_treetreehash_find): New
(java_treetreehash_new): New prototype.
(java_treetreehash_create): New prototype.
(java_mark_tree): Delete prototype.
(java_hash_hash_tree_node): Delete prototype.
(java_hash_compare_tree_node): Delete prototype.
(attach_initialized_static_class): Delete prototype.
* expr.c (build_class_init): Update to use java_treetreehash
(java_expand_expr): Update to use htab_t.
(emit_init_test_initialization): Likewise.
* decl.c (java_mark_tree): Delete.
* class.c (init_test_hash_newfunc): Delete.
(java_hash_hash_tree_node): Delete.
(java_hash_compare_tree_node): Delete.
(add_method_1): Update to use java_treetreehash functions.
(java_treetreehash_hash): New function.
(java_treetreehash_compare): New function.
(java_treetreehash_find): New function.
(java_treetreehash_new): New function.
(java_treetreehash_create): New function.
* (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
* (java/parse.o): Depend on debug.h.
* java-tree.h (struct lang_identifier): Use gengtype.
(union lang_tree_node): New.
(struct lang_decl_func): Use gengtype.
(struct lang_decl_var): Likewise.
(struct lang_decl): Likewise.
* parse.y: Include debug.h.
* lang.c (LANG_HOOKS_MARK_TREE): Delete.
* lang.c (struct language_function): New dummy structure.
descriminator for DECL_LANG_SPECIFIC.
(struct lang_decl_func): Rename from struct lang_decl.
(enum lang_decl_desc): New.
(struct lang_decl): Make it a union. Update all the accessor macros.
(struct lang_type): Use gengtype.
* class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
* decl.c (java_dup_lang_specific_decl): All lang_decl structures
are now the same size.
(lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
use discriminator to mark DECL_LANG_SPECIFIC.
* (gt-java-builtins.h): New rule.
(java/builtins.o): Add dependency on gt-<filename>.h.
* builtins.c: Use gengtype for roots.
(union string_or_tree): Use gengtype.
(struct builtin_record): Use gengtype.
* (gtfiles): Add builtins.c.
* (gt-java-class.h, gt-java-constants.h,
gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
gt-java-parse.h, gtype-java.h): Add rules to generate.
(parse.o): Add dependency on gt-java-parse.h, gt-java.h.
(class.o): Add dependency on gt-*.h.
(constants.o): Likewise.
(decl.o): Likewise.
(expr.o): Likewise.
(jcf-parse.o): Likewise.
(jcf-write.o): Likewise.
(lang.o): Likewise.
* (gtfiles): New.
* class.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* constants.c: Replace uses of ggc_add_* with GTY markers.
Include gt-*.h.
* decl.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* expr.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* java-tree.h: Replace uses of ggc_add_* with GTY markers.
* jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
Include gt-*.h.
* jcf-write.c: Replace uses of ggc_add_* with GTY markers.
Include gt-*.h.
* lang.c: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
* mangle.c: Replace uses of ggc_add_* with GTY markers. Include
* parse.y: Replace uses of ggc_add_* with GTY markers. Include gt-*.h.
Include gtype-java.h.
2002-06-02 Tom Tromey <>
Fix for PR java/5913:
* parse.y (patch_binop): Call patch_string on op1.
2002-06-02 Tom Tromey <>
Fix for PR java/1343, PR java/6336:
* parse.y (make_nested_class_name): Remove extraneous `else'; fix
formatting. Changed return type.
(anonymous_class_counter): Moved to top of file.
(maybe_make_nested_class_name): Append number to class name for
function-local classes.
2002-05-28 Zack Weinberg <>
* decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
* Update dependency lists.
2002-05-18 Mark Mitchell <>
* gjavah.c (throwable_p): Do not free the name of the class after
passing it to find_class.
* java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
* jcf-io.c (dirent.h): Include it.
(fnmatch.h): Likewise.
(compare_path): New function.
(java_or_class_file): Likewise.
(memoized_dirlist_entry): New type.
(memoized_dirlist_lookup_eq): New function.
(memoized_dirlists): New variable.
(caching_stat): New function.
(memoized_class_lookup_eq): New function.
(memoized_class_lookups): Likewise.
(find_class): Use memoized_class_lookups and caching_stat.
* jcf.h (JCF_USE_SCANDIR): Define.
* parse.y (java_expand_classes): Write the class files in reverse
2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Allow for PWDCMD to override hardcoded pwd.
2002-05-13 Mark Mitchell <>
* jcf-write.c (write_classfile): Unlink the temporary file if it
cannot be renamed. Use concat to build up the name of the
temporary file.
2002-05-08 Mark Mitchell <>
* jcf-write.c (write_classfile): Write the file to a
temporary file and then rename it.
2002-05-07 Tom Tromey <>
* gjavah.c (throwable_p): Use xstrdup, not strdup.
Fix for PR java/1200:
* gjavah.c (throwable_p): New function.
(decode_signature_piece): Use it. A `WeakReference' isn't the
same as a `jweak'.
Include hashtab.h.
(gcjh_streq): New function.
2002-05-07 Andreas Jaeger <>
* parse.y (finish_for_loop): Fix if statement.
2002-05-06 Tom Tromey <>
Fix for PR java/5941:
* parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
loop update expression.
(java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
* java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
2002-05-04 Mark Wielaard <>
For PR java/6519:
* parse.y (build_string_concatenation): Return just op1 only when op2
is null and op1 is a STRING_CST, otherwise always construct a
2002-04-27 Tom Tromey <>
For PR java/6382:
* parse.y (string_convert_int_cst): New function.
(merge_string_cste): Use it.
2002-04-25 Neil Booth <>
* java-tree.h (java_parse_file): Update.
(java_set_yydebug): Remove.
* jcf-parse.c (yydebug): Remove.
(java_set_yydebug): Die.
(java_parse_file): Update.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
2002-04-24 Tom Tromey <>
For PR java/6425:
* parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
2002-04-23 Per Bothner <>
* expr.c (PRE_JSR): Call NOTE_LABEL for return address.
* java-tree.h (BCODE_RETURN_TARGET): Removed - never set.
2002-04-23 Tom Tromey <>
For PR java/6314:
* jvspec.c (lang_specific_driver): Use --resource, not -R. Also
recognize `-fcompile-resource='.
* gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
a bit.
2002-04-22 Alexandre Petit-Bianco <>
* jcf-parse.c: (yyparse): Don't prepend "./" to relative
paths. Fixes PR java/2791.
2002-04-19 Andrew Haley <>
* jcf-write.c (push_long_const): lo, hi: New variables.
Use rshift_double to extract the high part of a 64-bit long.
Use WORD_TO_INT to extract the low part.
* jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
HOST_WIDE_INT for num. Use JPOOL_UINT to get it.
CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
2002-04-18 Neil Booth <>
* typeck.c (incomplete_type_error): Remove.
2002-04-18 Bryce McKinlay <>
* class.c (make_class_data): Set DECL_ALIGN on static class data,
for hash synchronization.
* expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
* decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
2002-04-16 Mark Wielaard <>
* jcf-write.c (generate_bytecode_insns): Only write const_0 if not
negative zero.
2002-04-16 Bryce McKinlay <>
Fix for PR java/6294:
2002-04-15 Bryce McKinlay <>
Fix for PR java/6085:
* parse.y (patch_method_invocation): Always use build_access_to_thisn
to get enclosing "this" argument for inner-class constructor
invocation. Pass correct arguments to build_access_to_thisn.
2002-04-10 Andreas Jaeger <>
* gcj.texi (Input Options): Fix extdirs patch.
2002-04-10 Anthony Green <>
* jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
2002-04-09 Anthony Green <>
* gcj.texi (Input Options): Add --extdirs documentation.
* jcf-dump.c (OPT_extdirs): New macro.
(options): Add extdirs option.
(help): Describe --extdirs.
(main): Handle OPT_extdirs.
* gjavah.c (OPT_extdirs): New macro.
(options): Add extdirs option.
(help): Describe --extdirs.
(main): Handle OPT_extdirs.
* jcf-path.c (jcf_path_init): Add extdirs support.
(jcf_path_extdirs_arg): New function.
(extensions): New variable to hold extensions path entries.
* jvspec.c: Remove -fextdirs= when compiling main().
* lang.c (java_decode_option): Handle -fextdirs=.
* jcf.h (jcf_path_extdirs_arg): Declare new function.
* Compile jcf-path with version info for use in
identifying the appropriate libgcj.jar.
2002-04-08 Tom Tromey <>
For PR libgcj/5303:
* .cvsignore: Added rmic.1 and rmiregistry.1.
* gcj.texi (Top): Link to new nodes.
(Invoking rmic): New node.
(Invoking rmiregistry): Likewise.
* (java.generated-manpages): Added rmic.1 and
(java.maintainer-clean): Likewise.
($(srcdir)/java/rmic.1): New target.
($(srcdir)/java/rmiregistry.1): Likewise.
(java.install-man): Handle rmic.1 and rmiregistry.1.
2002-04-08 Bryce McKinlay <>
* gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
Add note about handling uncaught exceptions. Add an exception handler
to example.
2002-04-08 Bryce McKinlay <>
* parse.y (resolve_qualified_expression_name): Clear "from_super" flag
after using it to patch CALL_EXPR.
2002-04-08 Bryce McKinlay <>
* gcj.texi (Invocation): Document CNI invocation API.
2002-04-04 Neil Booth <>
* expr.c (truthvalue_conversion): Rename. Update.
(expand_compare): Update.
* java-tree.h (java_truthvalue_conversion): New.
2002-04-01 Neil Booth <>
* java-tree.h (java_mark_addressable): New.
* typeck.c (mark_addressable): Rename, update.
2002-04-01 Neil Booth <>
* expr.c (build_java_binop): Update.
* java-tree.h (java_signed_type, java_unsigned_type,
java_signed_or_unsigned_type): Update.
* parse.y (patch_binop): Update.
* typeck.c (signed_or_unsigned_type, unsigned_type,
signed_type): Update.
2002-03-31 Neil Booth <>
(java_dummy_print): Remove.
(lang_print_error): Rename. Exit early if inhibiting output.
(inhibit_error_printing_function): New.
(java_init): Don't set hook.
(lang_init_source): Use new boolean.
2002-03-29 Martin Kahlert <>
* parse.y (do_resolve_class): Fix infinite recursion.
2002-03-29 Tom Tromey <>
* parse.y (check_inner_circular_reference): Ignore incomplete
2002-03-29 Neil Booth <>
* (builtins.o): Update.
* boehm.c (get_boehm_type_descriptor): Update.
* builtins.c: Include langhooks.h.
* decl.c (java_init_decl_processing): Update.
* java-tree.h (java_type_for_mode, java_type_for_size): New.
* typeck.c (type_for_mode, type_for_size): Update.
2002-03-29 Martin Kahlert <>
* lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
2002-03-28 Tom Tromey <>
* except.c (expand_end_java_handler): If the handler type is NULL,
use java.lang.Throwable. Fixes PR java/5986.
2002-03-28 Alexandre Petit-Bianco <>
Fix for PR java/4715:
* jcf-parse.c (parse_source_file_3): New function.
(read_class): Call it.
(java_parse_file): Likewise.
2002-03-28 Jan Hubicka <>
* java/lang.c (java_init_options): Set flag_trapping_math to 0.
2002-03-28 Bryce McKinlay <>
* parse.y (resolve_package): Initialize "decl".
(lookup_package_type): Remove unused function.
2002-03-28 Bryce McKinlay <>
Fix for PR java/5993:
* parse.y (resolve_package): Return the decl if resolution was
successful. Don't special case "java.lang" and "java.lang.reflect"
packages. Set type_name to the merged identifier.
(resolved_qualified_expression_name): Print error using "name" if
resolve_package returns NULL_TREE.
2002-03-27 Tom Tromey <>
* expr.c (expand_invoke): Don't generate null pointer check if
we're calling <init>.
2002-03-27 Neil Booth <>
* expr.c (java_lang_expand_expr): Rename java_expand_expr,
fix prototype.
* java-tree.h (java_lang_expand_expr): Similarly.
* lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
(java_init): Don't set hook.
2002-03-27 Bryce McKinlay <>
Fix for PR java/5850:
* parse.y (lookup_field_wrapper): Call itself recursively for enclosing
context if field was not found in the current scope.
* expr.c (lookup_field): Don't look in enclosing contexts.
2002-03-26 Tom Tromey <>
Fix for PR java/5942:
* parse.y (init_src_parse): Added sanity check.
* parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
elements, not 11.
2002-03-26 Neil Booth <>
* decl.c (lang_mark_tree): Rename java_mark_tree.
* java-tree.h (java_mark_tree): New.
* java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2002-03-25 Zack Weinberg <>
* lex.c: Change java_perform_atof to take normal parameters
instead of a pointer to a parameter block. Call it directly
from java_lex.
2002-03-22 Mark Wielaard <>
Fix for PR java/5368:
* parse.y (resolve_qualified_expression_name): Use decl not field_decl
when printing error message.
2002-03-25 Neil Booth <>
* decl.c (maybe_build_cleanup): Remove.
2002-03-22 Tom Tromey <>
Andrew Haley <>
* expr.c (build_field_ref): Don't build a check if the field is a
member of `this'.
2002-03-21 Eric Blake <>
Fix for PR java/6026:
* lex.c (java_lex): Fix parsing of consecutive floats.
2002-03-21 Tom Tromey <>
* parse.y (build_access_to_thisn): Stop when FROM is not an inner
2002-03-21 Neil Booth <>
* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
insert_block, getdecls, kept_level_p, global_bindings_p): New.
2002-03-20 Nic Ferrier <>
* gcj.texi: @code{gcj} becomes @command{gcj}.
@code{gcc} becomes @command{gcc}.
GcjRaw changed to gnu.gcc.RawData.
2002-03-20 Neil Booth <>
* decl.c (start_java_method): Use new hook.
(java_init): Remove old hook.
2002-03-18 Alexandre Petit-Bianco <>
* builtins.c (define_builtin): Do nothing if `type' is null.
Fixes PR java/5876.
2002-03-18 Bryce McKinlay <>
* parse.y (parser_check_super_interface): Fix error message
2002-03-17 Kaveh R. Ghazi <>
* jcf-parse.c (get_constant): Delete unused variables.
2002-03-17 Neil Booth <>
* java-tree.h (java_parse_file): New.
* jcf-parse.c (yyparse): Rename java_parse_file.
* lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2002-03-16 Bryce McKinlay <>
* parse.y (craft_constructor): Return the constructor decl.
(java_expand_classes): Update comments.
(lookup_method_invoke): Call fix_constructors immediately for
anonymous class. Fixes PR java/5935.
2002-03-15 Anthony Green <>
* jcf-parse.c (yyparse): Don't emit class registration
constructor when compiling resource files.
2002-03-12 Kaveh R. Ghazi <>
* lang.c (java_tree_code_type, java_tree_code_length,
tree_code_name): Delete.
(tree_code_type, tree_code_length, tree_code_name): Define.
(java_init): Don't try to copy into the various tree_code
2002-03-12 Tom Tromey <>
* jcf-parse.c (get_constant) [CONSTANT_String]: String values are
UTF-8, not UCS-2. Fixes PR java/5923.
* parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
a call_expr wrapped in a convert. Fixes PR java/5848.
2002-03-12 Bryce McKinlay <>
* jcf-write.c (write_classfile): Improve error strings.
2002-03-11 Eric Blake <>
* lex.c: Adjust comments to GNU standards.
2002-03-11 Eric Blake <>
Fix for PR java/5902:
* lex.c (java_lex): Fix parsing of literals.
2002-03-11 Bryce McKinlay <>
* parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
to prevent it getting evaluated twice in the store checking case.
* expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
examining OBJECT.
2002-03-09 Bryce McKinlay <>
* decl.c (java_init_decl_processing): Make sure class_type_node
alignment is not less than 64 bits if hash synchronization is enabled.
2002-03-08 Per Bothner <>
* parse.y (java_complete_lhs): Check if patch_assignment
returned an error-mark.
* parse.y (try_builtin_assignconv): Don't special-case zero.
2002-03-08 Per Bothner <>
Fix for PR java/5812.
* expr.c (build_java_jsr): Take pc arguments, and do lookup_label
here instead of in JSR macro. Likewise with load_type_state call.
Do the latter on if the return_pc has been verified (the jsr returns).
(JSR): Now just call build_java_jsr.
2002-03-07 Jeff Sturm <>
(java.install-common): Link native driver to
2002-03-05 David Billinghurst <>
* builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
* builtins.c(sin_builtin): Likewise
* builtins.c(sqrt_builtin): Likewise
2002-03-03 Zack Weinberg <>
* java/expr.c, java/jcf-parse.c, java/lex.c:
Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
REAL_ARITHMETIC blocks unconditional. Delete some further
#ifdef blocks predicated on REAL_ARITHMETIC.
2002-03-03 Kaveh R. Ghazi <>
* class.c (init_class_processing): Use ARRAY_SIZE in lieu of
explicit sizeof/sizeof.
* decl.c (java_init_decl_processing): Likewise.
* jcf-parse.c (init_jcf_parse): Likewise.
* parse.y (init_src_parse): Likewise.
2002-03-02 Per Bothner <>
Make --CLASSPATH by a synonym for --classpath and -classpath.
Implement --bootclasspath.
* jcf-path.c (classpath_u): Rename static variable to classpath_user.
(classpath_l): Remove.
(jcf_path_CLASSPATH_arg): Remove.
(jcf_path_bootclasspath_arg): New function.
(jcf_path_seal): Simplify accordingly.
* jcf.h (jcf_path_bootclasspath_arg): New declarations.
(jcf_path_CLASSPATH): Remove declaration.
* jvspec.c (jvgenmain_spec): Also accept -fbootclasspath*.
(lang_specific_driver): Translate -bootclasspath.
* lang-options.h: Add --bootclasspath. Update --CLASSPATH.
* lang.c (decode_lang_options): Do jcf_path_init first.
Handle -fCLASSPATH same as -fclasspath. Also process -fbootclasspath.
* gjavah.c: Also handle --bootclasspath.
Handle --CLASSPATH as a synonum for --classpath.
* jcf-dump.c: Likewise.
"." is not part of system path, but is the default for --classpath.
* jcf-path.c (jcf_path_init): Don't add "." to sys_dirs.
(jcf_path_seal): Add "." if no CLASSPATH specified.
* gcj.texi: Document changes.
2002-03-01 Bryce McKinlay <>
* expr.c (build_java_arraystore_check): Fix formatting.
2002-02-28 Alexandre Petit-Bianco <>
Fix for PR java/5758, java/5632:
* jcf-parse.c (load_class): Renamed local variable, consider `.' an
inner-class separator too.
* parse.y (do_resolve_class): New local `decl_result.'
Progressively build a name for what can have been loaded.
2002-02-28 Bryce McKinlay <>
* expr.c (java_array_data_offset): Removed function.
(build_java_array_length_access): Obtain "length" value using a
COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
(build_java_arrayaccess): Correct comment. Access "data" using a
COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
(build_java_arraystore_check): New function.
(expand_java_arraystore): Use build_java_arraystore_check.
* parse.y (patch_assignment): Simplify code to insert a store check
when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
* check-init.c (check_init): Update to reflect that an array length
access is now a COMPONENT_REF.
* gcj.texi (Code Generation): Improve documentation of
-fno-bounds-check. Add documentation for -fno-store-check.
* java-tree.h (flag_store_check): Declare.
(build_java_arraystore_check): Declare.
* lang.c (flag_store_check): Initialize to 1.
(lang_f_options): Add store-check option.
* jvspec.c: Don't pass store-check option to jvgenmain.
* lang-options.h: Add help string for -fno-store-check.
2002-02-28 Neil Booth <>
* decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
* java-tree.h (java_dup_lang_specific_decl): New.
2002-02-27 Zack Weinberg <>
* builtins.c, decl.c: Delete traditional-mode-related code
copied from the C front end but not used, or used only to
permit the compiler to link.
2002-02-22 Tom Tromey <>
Fix for PR java/2369:
* jvspec.c (verify_class_name): New function.
(lang_specific_driver): Call it.
(JAVA_START_CHAR_P): New macro.
(JAVA_PART_CHAR_P): Likewise.
2002-02-22 Per Bothner <>
* class.c: Change vtable to be more compatible with g++ v3 abi.
(get_dispatch_table): Prepend offset-to-top (always 0) and
type_info pointer (currently unimplemented hence NULL) to vtable.
Specifically, prepend offset-to-top and typeinfo ptr (currently null).
(make_class_data): Variable dtable_start_offset is sizeof 2 pointers.
Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
(build_dtable_decl): Add declarations for new fields.
2002-02-20 Per Bothner <>
* parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
to finit$ (otherwise generate_bytecode_insns drops it). However, we
don't need to set it on the COMPOUND_EXPR - the caller does that.
2002-02-20 Nic Ferrier <>
* gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
`--CLASSPATH' becomes `--classpath.'
* gjavah.c: Likewise.
* jcf-dump.c: Likewise.
* lang-options.h: Likewise.
* lang.c: Likewise.
* jcf-path.c: Updated comment.
(jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
(jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
* jcf.h (jcf_path_CLASSPATH_arg): Ditto.
(jcf_path_CLASSPATH_arg): Ditto.
(classpath_u): Updated leading comment.
2002-02-20 Per Bothner <>
* builtins.c (check_for_builtin): New function.
(build_call_or_builtin): Remove.
* java-tree.h: Update accordingly.
* expr.c (expand_invoke): Use build + check_for_builtin instead
of build_call_or_builtin.
* parse.y (patch_invoke): Likewise. This avoids needlessly creating
a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
flag (which had caused jcf-write to incorrectly emit invokevirtual).
2002-02-17 Tom Tromey <>
* java-tree.h (TYPE_STRICTFP): New macro.
(struct lang_type) [strictfp]: New field.
(CLASS_STRICTFP): New macro.
(struct lang_decl) [strictfp]: New field.
* parse.y (method_header): Disallow strictfp constructor or
abstract method.
* jcf-write.c (get_access_flags): Likewise.
* class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
(add_method_1): Likewise.
(get_access_flags_from_decl): Likewise.
* jcf-dump.c (print_access_flags): Print in standard order. Also,
recognize strictfp flag.
* jcf.h (ACC_STRICT): New define.
2002-02-12 David Billinghurst <>
* class.c(build_utf8_ref): Move declaration of decl_size
2002-02-07 Tom Tromey <>
* gcj.texi (Input Options): --CLASSPATH does not suppress system
2002-02-04 Anthony Green <>
* class.c (build_utf8_ref): Put UTF-8 constants into merged
sections if available.
2002-02-04 Bryce McKinlay <>
* parse.y (java_expand_classes): Fix typo in static field loop.
2002-02-02 Richard Henderson <>
* class.c (add_field): Mark static fields external.
(build_class_ref): Remove redundant set.
* parse.y (java_expand_classes): Mark static fields of classes
to be compiled as local.
* jcf-parse.c (parse_class_file): Likewise.
2002-02-02 Nic Ferrier <>
* gcj.texi (About CNI): New node.
2002-02-01 Craig Rodrigues <>
PR java/5080
* jcf-parse.c : Check for HAVE_LOCALE_H before using
setlocale() with LC_CTYPE as a parameter.
* jv-scan.c: Same.
2002-01-31 Joseph S. Myers <>
* gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
Follow GNU Coding Standards for --version.
2002-01-28 Tom Tromey <>
* expr.c (build_jni_stub): Ensure storage for `meth' is
* parse.y (java_complete_expand_methods): Set
current_function_decl before building JNI stub.
2002-01-26 Andreas Tobler <>
* gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
2002-01-22 Tom Tromey <>
* decl.c (java_init_decl_processing): Use add_predefined_file.
(predef_filenames): Removed.
(java_init_decl_processing): Don't register predef_filenames.
* jcf-parse.c (add_predefined_file): New function.
(predefined_filename_p): Rewrote.
(predefined_filename_p): No longer static.
* decl.c (java_init_decl_processing): Call initialize_builtins.
* (JAVA_OBJS): Added builtins.o.
(java/builtins.o): New target.
* builtins.c: New file.
* parse.y (patch_invoke): Use build_call_or_builtin.
* java-tree.h (build_call_or_builtin): Declare.
(initialize_builtins): Declare.
(java_set_exception_lang_code): Removed unused declaration.
(java_tree_index): Added JTI_PREDEF_FILENAMES.
(predef_filenames): New define.
(add_predefined_file): Declare.
(predefined_filename_p): Declare.
* expr.c (expand_invoke): Use build_call_or_builtin.
2002-01-22 Kaveh R. Ghazi <>
* parse.y (patch_switch_statement): Fix format specifier.
2002-01-16 Tom Tromey <>
More for PR java/5365:
* gjavah.c (print_stub_or_jni): Cause exception to be thrown by
(process_file): Generate include for
2002-01-15 Andreas Jaeger <>
* .cvsignore: Add man pages.
2002-01-15 Tom Tromey <>
Fix for PR java/5365:
* gjavah.c (process_file): Turn class name into a file name.
2002-01-14 Matthias Klose <>
* gcj.texi: Fix whitespace and formatting errors in the
synopsis of the man pages. Update copyright.
2002-01-14 Tom Tromey <>
For PR libgcj/5303:
* (java.install-man): Handle jv-convert man page.
(java.generated-manpages): Added jv-convert.1.
(java.uninstall): Remove jv-convert.1.
(java.maintainer-clean): Likewise.
($(srcdir)/java/jv-convert.1): New target.
* gcj.texi (Top): Link to jv-convert node.
(Individual utilities): Likewise.
(Invoking jv-convert): New node.
2001-01-10 Jeff Sturm <>
Martin Kahlert <>
* jcf-parse.c (get_constant): Don't swap lo/hi for big
endian targets when HOST_BITS_PER_WIDE_INT >= 64.
2002-01-03 Graham Stott <>
* class.c (compile_resource_file): Update copyright date.
Constify filename parameter.
(java-tree.h): Update copyright date.
(compile_resource_file): Constify filename parameter.
2002-01-03 Graham Stott <>
* gcc/jcf-parse.c: Update copyright date.
(yyparse): Constify resource_filename.
2002-01-02 Kaveh R. Ghazi <>
* parse.y (src_parse_roots): Don't needlessly zero init.
2001-12-31 Tom Tromey <>
* parse.y (dump_java_tree): New function.
(source_end_java_method): Call it.
(end_class_declaration): Likewise.
* lang.c (java_decode_option): Call dump_switch_p.
2001-12-28 Tom Tromey <>
* Don't process characters after \uffff. Added
comment pointing to input file.
2001-12-28 Kaveh R. Ghazi <>
* Const-ify output. Document the location of a
suitable unicode input file.
* chartables.h: Regenerate.
2001-12-26 Kaveh R. Ghazi <>
* chartables.h: Const-ify.
* gjavah.c (options): Likewise.
* jcf-dump.c (options): Likewise.
* jv-scan.c (options): Likewise.
* lex.c (java_start_char_p, java_part_char_p): Likewise.
* parse.y (binop_lookup): Likewise.
2001-12-23 Kaveh R. Ghazi <>
* (keyword.h): Pass -C to gperf to const-ify
the static arrays that are output.
* jvspec.c (jvgenmain_spec): Make static.
* keyword.gperf (struct java_keyword, java_keyword): Const-ify.
* keyword.h: Regenerate.
* lang.c (string_option, process_option_with_no, lang_f_options,
lang_W_options): Const-ify.
* lex.c (java_lex): Likewise.
2001-12-21 Richard Henderson <>
* boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
(get_boehm_type_descriptor): ... here. Arrange for the
TREE_TYPE to get set properly.
2001-12-21 Richard Henderson <>
* class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
only if the target requires collect2.
* class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
2001-12-20 Tom Tromey <>
For PR java/4509:
* parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
* jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
generate code for second branch if first branch can't complete
(generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
the loop head if the loop body can't complete normally.
2001-12-20 Tom Tromey <>
For PR java/4766:
* jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
case where `finally' clause can't complete normally.
2001-12-20 Tom Tromey <>
Fixes PR java/5057:
* parse.y (analyze_clinit_body): Added this_class parameter.
Check for more cases where we must keep <clinit>.
(maybe_yank_clinit): Cleaned up flow control.
2001-12-20 Bryce McKinlay <>
* decl.c (java_init_decl_processing): Don't initialize
* java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
(finit_leg_identifier_node): Remove.
2001-12-20 Bryce McKinlay <>
* mangle.c (mangle_member_name): Don't special-case for
* mangle_name.c (unicode_mangling_length): Likewise.
(append_unicode_mangled_name): Likewise.
* parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
2001-12-20 Bryce McKinlay <>
* expr.c (build_java_array_length_access): Don't force null pointer
check unless flag_check_references is set.
2001-12-20 Tom Tromey <>
Fix for PR java/3417:
* parse.y (patch_assignment): Added special processing for
(patch_return): Don't convert booleans to integers, and don't
special-case `null'.
2001-12-20 Joseph S. Myers <>
* (diff_excludes): Remove.
2001-12-17 Joseph S. Myers <>
* gcj.texi: Update link to GCC manual.
2001-12-17 Tom Tromey <>
* parse.y (link_nested_class_to_enclosing): Removed useless
2001-12-16 Tom Tromey <>
* mangle.c (mangle_method_decl): Never emit `C2' constructor.
Fixes PR java/5088.
2001-12-16 Joseph S. Myers <>
* ChangeLog,, class.c, expr.c, gcj.texi, java-tree.h,
jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
spelling errors.
2001-12-16 Kaveh R. Ghazi <>
* lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
2001-12-16 Bryce McKinlay <>
* decl.c (java_init_decl_processing): Build otable_type correctly.
otable_decl is an otable_type.
2001-12-15 Bryce McKinlay <>
* java-tree.h (otable_methods, otable_decl, otable_syms_decl,
otable_type, otable_ptr_type, method_symbol_type,
method_symbols_array_type, method_symbols_array_ptr_type): New
field/global tree definitions.
(flag_indirect_dispatch): New flag.
* decl.c (java_init_decl_processing): Initialize new otable and
otable_syms type nodes and decls. Add new field "index" to
* class.c (build_method_symbols_entry): New function.
(make_method_value): Set "index" to to method's vtable index for
virtual methods when indirect-dispatch is not used.
(make_class_data): For indirect-dispatch, don't emit the dtable_decl,
and set vtable_method_count to -1. Set otable and otable_syms field
if indirect-dispatch is used and there was something to put in them.
(build_method_symbols_entry): New function.
(emit_offset_symbol_table): New function.
* expr.c (get_offset_table_index): New function.
(build_invokevirtual): Build array reference to otable at the index
returned by get_offset_table_index, and use the result as the vtable
(build_invokeinterface): Similar.
* jcf-parse.c (yyparse): If indirect-dispatch, call
emit_offset_symbol_table at the end of compilation, after all classes
have been generated.
* jvspec.c: Don't pass findirect-dispatch to jvgenmain.
* lang.c (flag_indirect_dispatch): Define.
(lang_f_options): Add indirect-dispatch flag.
2001-12-14 Matthias Klose <>
* gcj.texi: Markup for man page generation. Document missing
options printed by <tool> --help.
Terminate description of gij's -ms option with a dot.
* ($(srcdir)/java/*.1): New targets.
(java.generated-manpages java.install-man, java.uninstall,
java-maintainer-clean) Updated.
2001-12-14 Hans Boehm <>
* class.c (get_dispatch_table): Fix java vtable layout
* decl.c (java_init_decl_processing): Initialize
alloc_no_finalizer_node, finalize_identifier_node.
* expr.c (class_has_finalize_method): New function.
(expand_java_NEW): Generate calls for finalizer-free allocation.
(build_invokevirtual): Fix java vtable layout for
* java-tree.h (enum java_tree_index): New entries:
(alloc_no_finalizer_node, finalize_deintifier_node): New macros.
(class_has_finalize_method): declare.
(HAS_FINALIZER_P): New macro.
* parse.y (patch_invoke): Generate calls for finalizer-free
2001-12-12 Matthias Klose <>
whitespace at end of line.
2001-12-11 Tom Tromey <>
* lex.c (java_init_lex): Define wfl_to_string as
gnu.gcj.runtime.StringBuffer unless generating bytecode.
2001-12-11 Jeff Sturm <>
* class.c (make_method_value): Use null_pointer_node to
represent empty exception table.
2001-12-10 Tom Tromey <>
* check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
2001-12-10 Douglas B. Rupp <>
* (jvspec.o): Add $(OUTPUT_OPTION).
2001-12-09 Per Bothner <>
* check-init.c (current_switch_has_default): New static field.
(check_init): Case DEFAULT_EXPR: Set current_switch_has_default.
Case SWITCH_EXPR: Save/restore current_switch_has_default. If no
DEFAULT_EXPR seen, simulate a default alternative that copies state.
2001-12-09 Tom Tromey <>
* check-init.c (check_init): Don't allow pre- or post- increment
or decrement of final variable.
(final_assign_error): Minor error message rewording.
2001-12-08 Tom Tromey <>
* java-tree.h: Fixed typo.
* gjavah.c (decompile_method): Don't decompile to `return this'
for static methods.
* gjavah.c (cxx_keywords): Re-sorted.
* lex.c (cxx_keywords): Re-sorted.
* gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
* gjavah.c (print_namelet): Clear subnamelets.
(HANDLE_METHOD): Set `method_printed' earlier.
2001-12-07 Tom Tromey <>
* lang.c (lang_f_options): Added
(java_decode_option): Removed special case.
2001-12-07 Per Bothner <>
* check-init.c (check_init): Fix typo freeing memory twice.
2001-12-05 Per Bothner <>
Restore support for static class initialization optimization.
* java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
* check-init.c (check_int): At end of BLOCK handle initialization
blocks, which used to be done in java_complete_expand_method but did
not handle the case where check_for_initialization might allocate
more than a word of bits.
* decl.c (lang_make_tree): The smic field is now a tree.
* expr.c (build_class_init): Set DECL_FUNCTION_INIT_TEST_CLASS field.
* java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE): New macro.
* parse.y (emit_test_initialization): Combine hash_lookup calls.
Change from a hash table to a list.
(struct_lang_decl): Change field 'smic' to match.
* class.c (add_method_1): Initialize
* parse.y (adjust_init_test_initialization): Removed - inlined into -
(java_expand_method_bodies): -here, since 'smic' is now a list.
(patch_invoke): Add to 'smic' list, instead of hash_lookup.
* check-init.c (WORD_SIZE): Use BITS_PER_UNIT.
* class.c (java_hash_compare_tree_node): Fix casts.
2001-12-04 Per Bothner <>
* check-init.c: Handle definite unassignment to finals in addition
to definite assignment.
(loop_current_locals): New field.
(num_current_locals, int start_current_locals, num_current_words):
Make static.
(SET_P, CLEAR_P, SET_BIT): Add needed but missing parentheses.
(get_variable_decl, check_final_reassigned): New functions.
(check_init, check_bool_init): Modify as needed for checking finals.
(check_for_initialization): Take extra parameter and return void.
Do extra start-up logic to check final fields for assignment.
* parse.y (check_static_final_variable_assignment_flag,
reset_static_final_variable_assignment_flag, check_final_assignment,
reset_final_variable_global_assignment_flag): Remove functions.
(java_complete_expand_methods, outer_field_access_fix,
patch_assignment): Remove no-longer used logic.
* java-tree.h (DECL_FIELD_FINAL_IUD): Change usage and comments.
* parse.y (register_fields, java_complete_tree): Update accordingly.
* check-init.c (ALLOC_WORDS/FREE_WORDS): Use xmalloc/free, not alloca.
(check_cond_init, check_bool2_init): Use DECLARE_BUFFERS.
* java-tree.h (STATIC_CLASS_INIT_OPT_P): Temporarily turn off.
* java-tree.h (DECL FINAL): New bit-field.
(struct lang_decl): New bit-field init_calls_this.
(DECL_BIT_INDEX): Change to use pointer_alias_set since we now
use it for both local variables and final fields.
(struct lang_decl_var): Remove bit-fields final_liic, final_ierr,
and local_final.
(struct lang_type): Remove hfv bit-field.
(check_for_initialization): Change to return void.
* java-tree.h (IS_ARRAY_LENGTH_ACCESS): New macros.
* expr.c (build_java_array_length_access): Set IS_ARRAY_LENGTH_ACCESS.
* check-init.c (final_assign_error): New helper function.
(check_final_reassigned, check_init): Use it.
(check_init): Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
* java-tree.h (struct lang_decl, struct lang_decl_var): Change all
bit-fields to unsigned.
2001-12-03 Per Bothner <>
* parse.y (patch_binop): Minor constant folding.
* parse.y (build_current_thisn): Shorter 'buffer'.
2001-12-03 Per Bothner <>
* decl.c (complete_start_java_method): Now generate TRY_FINALLY_EXPR
* jcf-write.c (generate_bytecode_insns): Remove support for
CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
* check-init.c (check_init): Likewise.
2001-12-03 Per Bothner <>
* verify.c (subroutine_nesting): New function.
(verify_jvm_instructions): Use it to fix logic for checking that
we're done with the current subroutine.
* verify.c (verify_jvm_instruction): For OPCODE_checkcast and
OPCODE_instanceof use POP_TYPE macro for better diagnostics.
2001-12-03 Per Bothner <>
* jcf.h: Fix obvious typo in comment.
* typeck.c (build_null_signature): Add comment.
2001-12-03 Neil Booth <>
* expr.c: Remove leading capital from diagnostic messages, as
per GNU coding standards.
* jcf-io.c: Similarly.
* jcf-parse.c: Similarly.
* jv-scan.c: Similarly.
* jvspec.c: Similarly.
* mangle.c: Similarly.
2001-12-02 Tang Ching-Hui <>
Alexandre Petit-Bianco <>
* expr.c (build_java_arrayaccess): Call save_expr on array for
correct evaluation order, modified comment, fixed indentation.
* parse.y: (patch_assignment): Correctly extract the array base
from the tree generate by build_java_arrayaccess, added comments.
(patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
Fixes PR java/3096, PR java/3803, PR java/3965.
2001-12-01 Neil Booth <>
* expr.c (expand_byte_code): Remove trailing periods from messages.
* jcf-parse.c (load_class, jcf_parse): Similarly.
* jcf-write.c (generate_classfile): Similarly.
* lex.c (java_lex): Similarly.
2001-11-30 Bryce McKinlay <>
* class.c (add_interface_do): Set BINFO_VPTR_FIELD.
2001-11-29 Joseph S. Myers <>
* (java.generated-manpages): New dummy target.
2001-11-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-11-18 Roger Sayle <>
* parse.h (java_expand_switch): Remove old prototype.
2001-11-18 Tom Tromey <>
Fix for PR java/1401:
* jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
arg0 is null.
(generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
2001-11-18 Neil Booth <>
* lang.c (finish_parse): Rename to java_finish.
(LANG_HOOKS_FINISH, java_finish): New.
2001-11-15 Neil Booth <>
* decl.c (init_decl_processing): Rename java_init_decl_processing.
* java-tree.h: New prototype.
* lang.c (java_init): Update prototype. Combine with old init_parse.
2001-11-13 Tom Tromey <>
* gjavah.c (method_signature): New global.
(decompile_return_statement): New function.
(decompile_method): Use it.
(print_method_info): Removed `synth' argument.
2001-11-09 Neil Booth <>
* java-tree.h (java_set_yydebug): New.
* jcf-parse.c (set_yydebug): Rename java_set_yydebug.
* lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
(print_lang_decl, print_lang_type, print_lang_identifier,
print_lang_statistics, lang_print_xnode): Remove.
2001-11-09 Neil Booth <>
* jcf-parse.c (init_lex): Remove.
* lang.c (language_string, lang_identify): Remove.
(struct lang_hooks): Constify.
(LANG_HOOKS_NAME): Override.
(init_parse): Update.
2001-11-08 Andreas Franck <>
program_transform_name the way suggested by autoconf.
(java.install-common): Also transform auxiliary program names with
2001-11-08 Tom Tromey <>
* parse.y (trap_overflow_corner_case): New rule.
(unary_expression): Use it.
* lex.c (java_init_lex): Don't set minus_seen.
(yylex): Don't use minus_seen. Communicate overflow to parser for
it to handle.
(error_if_numeric_overflow): New function.
* parse.h (minus_seen): Removed field.
(JAVA_RADIX10_FLAG): New define.
2001-11-07 Tom Tromey <>
Patch for PR java/1414:
* parse.y (case_label_list): New global.
(goal): Register case_label_list with GC.
(java_complete_lhs): Save new case on case_label_list.
(patch_switch_statement): Check for duplicate case labels.
2001-11-07 Alexandre Petit-Bianco <>
* parse.y (patch_assignment): Removed unused third argument.
(java_complete_lhs): Removed unused third argument to patch_assignment.
2001-11-06 Neil Booth <>
* lang.c: Include langhooks-def.h.
* Update.
2001-10-31 Zack Weinberg <>
* Replace $(INTL_TARGETS) with po-generated.
2001-10-29 Bryce McKinlay <>
* mangle.c (find_compression_record_match): Don't match compression
records for package name elements unless they occur at the start of
the name. Fix for PR java/4717.
2001-10-25 Bryce McKinlay <>
* expr.c (expand_java_field_op): Don't special-case references to
(build_primtype_type_ref): Removed.
* java-tree.h (build_primtype_type_ref): Remove prototype.
* parse.y (maybe_build_primttype_type_ref): Removed.
(complete_function_arguments): Don't special-case references to
(patch_assignment): Likewise.
(array_constructor_check_entry): Likewise.
2001-10-24 Alexandre Petit-Bianco <>
* mangle.c (static tree compression_table): Fixed leading comment.
* parse.h (struct parser_ctxt): Fixed field comment.
* parse.y (check_pkg_class_access): New prototype, fixed leading
comment, new parameter used to emit error only if passed as true.
(parse_check_super): Pass extra argument to check_pkg_class_access.
(do_resolve_class): Likewise.
(process_imports): Likewise.
(read_import_dir): Fixed indentation.
(find_in_imports_on_demand): New local class_type_name. Local
node_to_use deleted. while loop changed into for loop. Report
multiple definition only for accessible classes. Improved error
(start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
assigned to parameter list, fixed indentation. while loop changed
into for loop, restore TREE_CHAIN on local `tem' before the next
2001-10-23 Richard Kenner <>
* lang.c (lang_get_alias_set): Deleted.
2001-10-21 Kaveh R. Ghazi <>
* gjavah.c (jni_print_char): Fix thinko in last change.
* gjavah.c (jni_print_char, decode_signature_piece): Use
safe-ctype macros and/or fold extra calls into fewer ones.
* lex.c (java_read_unicode, java_lex): Likewise.
* mangle_name.c (append_unicode_mangled_name,
unicode_mangling_length): Likewise.
2001-10-17 Richard Henderson <>
* (java/lang.o): Depend on langhooks.h.
2001-10-15 Alexandre Petit-Bianco <>
* lang.c (langhooks.h): Included.
(LANG_HOOKS_INIT): Redefined.
(struct lang_hooks lang_hooks): New initialization.
2001-10-11 Per Bothner <>
* parse.y (patch_synchronized_statement): Use a TRY_FINALLY_EXPR
The former is simpler, and jcf-write.c handles it better.
(java_complete_lhs): No longer need to handle CLEANUP_POINT_EXPR
* jcf-write.c: Revert Alex's change from 2000-10-18. It is no
longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
* parse.y (patch_if_else_statement): If the condition is constant,
optimize away the test.
2001-10-09 Alexandre Petit-Bianco <>
* parse.y (patch_cast): Call patch_string on the first operand of
the incoming node, update it if necessary. Fixes PR java/4510.
2001-10-09 Bryce McKinlay <>
* parse.y (find_as_inner_class): Don't disregard the enclosing scope
when name qualifier matches a package name.
2001-10-08 Tom Tromey <>
Fix for PR java/4489:
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
force a new label when computing `body_block'.
2001-10-07 Kaveh R. Ghazi <>
* jcf-io.c (format_uint): Const-ify.
* lang.c (java_tree_code_type, java_tree_code_length): Likewise.
* lex.c (java_get_line_col): Likewise.
* parse.y (build_incdec): Likewise.
2001-10-05 Alexandre Petit-Bianco <>
* parse.y (register_incomplete_type): Set JDEP_SUPER to be given
a NULL enclosing context if appropriate. Fixes PR java/4466.
2001-10-03 Alexandre Petit-Bianco <>
* parse.y (patch_assignment): Use lvalue's original TYPE when
building the final COMPOUND_EXPR.
(try_reference_assignconv): Fixed leading comment.
2001-09-26 Alexandre Petit-Bianco <>
* parse.y (check_final_variable_indirect_assignment): For
COMPOUND_EXPR, return only if finals were found initialized
properly, if not, keep on checking.
(check_final_variable_global_assignment_flag): New local
error_found, set when appropriate and used to decide whether to
report uninitialized finals. Fixed typo in comment.
2001-09-22 Alexandre Petit-Bianco <>
* decl.c (init_decl_processing): Fixed typo in predef_filenames
last three initializations. Fixes PR java/4360.
2001-09-21 Richard Henderson <>
* class.c (get_dispatch_table): Handle function descriptors.
(build_dtable_decl): Likewise.
* expr.c (build_invokevirtual): Likewise.
2001-09-20 Alexandre Petit-Bianco <>
* parse.y (patch_method_invocation): Build class initialization
when static finals are used to qualify method invocation.
Fixes PR java/4366.
2001-09-19 Alexandre Petit-Bianco <>
* parse.h: (WFL_STRIP_BRACKET): Re-written using
* parse.y (build_type_name_from_array_name): New function.
(array_creation_expression:): Accumulate []s instead of [s.
(cast_expression:): Accumulate []s instead of [s after cast type
(build_array_from_name): Local string deleted, use
(build_unresolved_array_type): Accumulate []s instead of [s after
type name.
(register_fields): Fixed comment.
(resolve_class): Local name, base deleted, new locals tname and
array_dims. Use build_type_name_from_array_name. Use array_dims to
build array type.
(purify_type_name): Use STRING_STRIP_BRACKETS.
2001-09-18 Andreas Jaeger <>
* parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
* jv-scan.c: Likewise.
2001-09-17 Alexandre Petit-Bianco <>
* parse.y (patch_method_invocation): Inner class creation context
check not enforced within constructors. Fixes PR java/1873.
2001-09-16 Tom Tromey <>
* jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
NOTE_PUSH for single-case push. Fixes PR java/4189.
2001-09-13 Alexandre Petit-Bianco <>
* java-tree.h (TYPE_IMPORT_LIST): New macro.
(struct lang_type): New fields import_list and import_demand_list.
* parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
(do_resolve_class): New local saved_enclosing_type, initialized,
passed as parameter to find_in_imports and find_in_imports_on_demand.
(find_in_imports): Added paramater enclosing_type, use its
TYPE_IMPORT_LIST when applicable.
(find_in_imports_on_demand): Added parameter enclosing_type, use
its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
declaration and initialization.
(fold_constant_for_init): Switch/restore current_class to the
appropriate context.
2001-09-13 Mark Mitchell <>
* verify.c (verify_jvm_instructions): Fix typo.
2001-09-13 Kaveh R. Ghazi <>
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
2001-09-12 Kaveh R. Ghazi <>
* gjavah.c (cxx_keywords): Const-ification.
* keyword.gperf (java_keyword): Likewise.
* lang.c (java_tree_code_name): Likewise.
* lex.c (cxx_keywords): Likewise.
* parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
2001-09-11 Richard Henderson <>
* parse.h (ctxp_for_generation): Mark extern.
2001-09-10 Richard Henderson <>
* class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
2001-09-07 Matt Kraai <>
* typeck.c (java_array_type_length, build_prim_array_type):
Represent empty arrays by NULL index.
2001-09-06 Alexandre Petit-Bianco <>
* java-tree.h (compile_resource_file): Grouped with other prototypes.
* jvspec.c (lang_specific_driver): Removed unused local `ptr.'
2001-09-06 Anthony Green <>
* class.c (O_BINARY): Define if necessary.
(registerResource_libfunc): Declare.
(init_class_processing): Initilize registerResource_libfunc.
(compile_resource_file): New function.
* java-tree.h (resource_name): Declare.
(compile_resource_file): Declare.
* jcf-parse.c (yyparse): Handle compiling java resource files.
* lang.c (java_decode_option): Handle -fcompile-resource option.
* jvspec.c (lang_specific_driver): Handle -R flag for compiling
resource files.
* gcj.texi (Code Generation): Add documentation for -R flag.
2001-09-05 Alexandre Petit-Bianco <>
* jcf-write.c (generate_classfile): Issue an error in case of
field/initial value mismatch.
* parse.y (analyze_clinit_body): Keep <clinit> if an array is
being initialized and we're generating bytecode.
(java_complete_lhs): In MODIFY_EXPR section: added comments,
set DECL_INITIAL properly when appropriate.
Fixes PR java/4230
Fixes PR java/4204
2001-09-01 Per Bothner <>
* parse.y (maybe_yank_clinit): A field without an initializer is not
relevant. All initializers except static final and constant require
<clinit>, regardless of flag_emit_class_files.
2001-08-31 Per Bothner <>
* class.c (set_constant_value): When not emitting class files, then a
String ConstantValue is a utf8const_ptr_type.
2001-08-30 Per Bothner <>
* jcf-write.c (generate_classfile): Check that field is primitive
or string before emitting ConstantValue attribute.
2001-08-30 Per Bothner <>
* parse.y (resolve_qualified_expression_name): If creating a
COMPOUND_EXPR, set it's type correctly.
2001-08-30 Per Bothner <>
* jcf-io.c (open_class): Set filename field.
* jcf-parse,c (parse_class_file): Set current_function_decl
for better error message when Code attribute is missing.
* lang.c (put_decl_node, lang_print_error): Re-arrange for
better diagnostics, especially for constructors.
2001-08-30 Per Bothner <>
* jcf-write.c (generate_classfile): Don't write ConstantValue
attribute if field is not final, for compatibility with jdk.
* jcf-write.c (generate_classfile): Convert ConstantValue values
to correct type. Work-around for front-end bug.
* class.c (set_constant_value): Error if constant has wrong type.
2001-08-30 Per Bothner <>
* jcf-dump.c (print_constant): Fix fencepost error so "Float" and
"Double" are printed at verbosity 1.
* jcf-dump.c (main): Disable flag_print_attributes if --javap.
* jcf-dump.c (SPECIAL_IINC): Remove unneeded casts to long.
2001-08-30 Alexandre Petit-Bianco <>
* parse.y (patch_assignment): Don't verify final re-assignment here.
(java_complete_lhs): Verify assignments to finals calling
patch_assignment. Verify re-assignments to finals before calling
2001-08-29 Alexandre Petit-Bianco <>
* parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
Fixes PR java/1413
2001-08-28 Alexandre Petit-Bianco <>
* lex.c (java_lex): new local found_hex_digits. Set and then used
in test to reject invalid hexadecimal numbers.
* parse.y (java_complete_tree): Prevent unwanted cast with
initialized floating point finals.
(patch_binop): Emit a warning when detecting a division by zero,
mark result not constant, don't simplify non integer division.
2001-08-28 Per Bothner <>
* jcf-write.c (generate_bytecode_insns): For increments and
decrements just recurse to push constant. Improvement on Mark's patch.
2001-08-28 Mark Mitchell <>
* jcf-write.c (generate_bytecode_insns): Generate an integer to
real conversion for increments and decrements of reals.
2001-08-27 Alexandre Petit-Bianco <>
* parse.y (resolve_qualified_expression_name): Handle unresolved
qualified expressions, prevent numerical qualifiers, fixed typo.
Fixes PR java/4141
2001-08-24 Alexandre Petit-Bianco <>
* parse.y (check_deprecation): Handle TYPE_DECL in a special case,
don't report anything but deprecated class when marked so. Handle
(patch_method_invocation): Check deprecation on methods and types.
(patch_binop): code becomes an enum tree_code, added default: to
switch to handle that. Detect division by zero, try to fold and
return before using a subroutine.
2001-08-23 Alexandre Petit-Bianco <>
* jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
file smaller than 4 bytes.
* parse.y (check_inner_circular_reference): New function.
(check_circular_reference): Likewise.
(array_initializer:): Accept {,}.
(java_check_circular_reference): Rewritten using
check_circular_reference and check_inner_circular_reference.
(java_complete_expand_method): Unconditionally save and restore
the unpurged exception list.
(build_dot_class_method_invocation): Unmangle signature parameter.
2001-08-21 Tom Tromey <>
* decl.c (init_decl_processing): Add `throws' field to method
* class.c (make_method_value): Compute `throws' field for method.
2001-08-22 Alexandre Petit-Bianco <>
* parse.y (resolve_inner_class): Keep local_enclosing to NULL if
circularity is detected.
(ctors_unchecked_throws_clause_p): Fixed leading comment.
2001-08-17 Richard Henderson <>
* class.c (emit_register_classes): Add align parameter to
call to assemble_integer.
2001-08-16 Alexandre Petit-Bianco <>
* jcf-parse.c (load_class): New locals saved and class_loaded. If
loading a class_or_name fails, try considering an innerclass name
and load the enclosing context.
* parse.y (resolve_inner_class): New function.
(find_as_inner_class): Added leading comment.
(register_incomplete_type): Keep the current context as enclosing
context for JDEP_FIELD dependencies.
(do_resolve_class): Locals new_class_decl and super initialized to
NULL. Call resolve_inner_class, explore the enclosing context
superclass if necessary.
Fixes PR java/4007
2001-08-16 Tom Tromey <>
* jcf-dump.c (main): Updated for change to jcf_path_seal.
* gjavah.c (main): Updated for change to jcf_path_seal.
* lang.c (version_flag): New global.
(java_decode_option): Recognize `-version'.
(java_init): Update for change to jcf_path_seal.
* jcf.h (jcf_path_seal): Added `print' argument.
* jcf-path.c (jcf_path_seal): Added `print' argument.
2001-08-13 Zack Weinberg <>
* (java/decl.o): Update dependencies.
* decl.c: Include libfuncs.h, don't include toplev.h.
2001-08-12 Alexandre Petit-Bianco <>
* decl.c (init_decl_processing): exception_type_node,
class_not_found_type_node, and no_class_def_found_type_node
initialized. predef_filenames augmented accordingly.
instinit_identifier_node initialized.
* java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
* java-tree.h (enum java_tree_index): New entries
(exception_type_node): New macro.
(class_not_found_type_node): Likewise.
(no_class_def_found_type_node): Likewise.
(instinit_identifier_node): Likewise.
(struct lang_type): Fixed typo in bitfield name.
(DECL_INSTINIT_P): New macro.
(ID_INSTINIT_P): Likewise.
* jcf-write.c (generate_classfile): instinit$ bears the Synthetic
* parse.y (encapsulate_with_try_catch): New function.
(generate_instinit): Likewise.
(build_instinit_invocation): Likewise.
(ctors_unchecked_throws_clause_p): Likewise.
(add_instance_initializer): Deleted.
(build_instance_initializer): Likewise.
(in_instance_initializer): Likewise.
(check_method_redefinition): instinit$ not to be verified.
(java_complete_expand_methods): Generate instinit$, simplified code.
(build_dot_class_method): Eliminated unnecessary locals. Use
encapsulate_with_try_catch, removed unnecessary code.
(fix_constructors): New local iii. Use build_instinit_invocation.
(patch_method_invocation): Added comment.
(maybe_use_access_method): Don't consider instinit$.
(find_applicable_accessible_methods_list): Shorten the search for
instinit$ too.
(java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
(patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
(patch_throw_statement): Likewise. Fixed typo.
2001-08-12 David Edelsohn <>
2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-08-11 Zack Weinberg <>
* lex.h: Don't include setjmp.h. Don't define
SET_FLOAT_HANDLER or prototype set_float_handler.
2001-08-09 Alexandre Petit-Bianco <>
* expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
`poplevel' in the right order.
2001-08-09 Richard Henderson <>
* (class.o): Depend on TARGET_H.
* class.c (emit_register_classes): Use target hooks instead of
assemble_constructor and assemble_destructor.
2001-08-08 Alexandre Petit-Bianco <>
* check-init.c (flags.h): Include
(check_init): Don't report uninitialized static class
initialization flags, don't free bit index when doing static class
initialization optimization.
(check_for_initialization): Return type changed to `unsigned int.'
(attach_initialized_static_class): New function.
* class.c (add_method_1): Create the initialized static class
table if necessary.
(finish_class): Always emit deferred inline methods.
* decl.c (emit_init_test_initialization): Moved to expr.c
(complete_start_java_method): Don't traverse
(lang_mark_tree): Mark hash tables in function decls.
* expr.c (emit_init_test_initialization): Moved from decl.c.
(build_class_init): Create LAG_DECL_SPECIFIC for the static class
initialization flag, set DECL_CONTEXT and
(java_lang_expand_expr): Emit initialization code for static class
initialized flags when entering block, if necessary.
* gcj.texi (-fno-optimize-static-class-initialization): Documented.
* java-tree.h (flag_optimize_sci): New global variable declaration.
(LOCAL_FINAL_P): Fixed typo in comment.
(struct lang_decl): New fields `ict', `smic' and `cif.'
(check_for_initialization): New returned value for global.
(attach_initialized_static_class): New global function.
* lang-options.h (-fno-optimize-static-class-initialization): New flag.
* lang.c (java_decode_option): Handle
* parse.y (start_complete_expand_method): New function.
(java_expand_method_bodies): Likewise.
(attach_init_test_initialization_flags): Likewise.
(adjust_init_test_initialization): Likewise.
(emit_test_initialization): Likewise.
(java_complete_expand_methods): Nullify abstract and native method
(java_complete_expand_method): New locals `fbody', `block_body'
and `exception_copy.' Reorganized: directly return on empty method
bodies, call `start_complete_expand_method', remember definitely
initialized static class in function, don't expand method bodies.
(java_expand_classes): Call `java_expand_method_bodies' before
`finish_class' when compiling to native.
(resolve_expression_name): Use `orig' after building outer class
field access.
(patch_invoke): Remember static method invocations.
2001-08-06 Richard Henderson <>
* class.c (emit_register_classes): Pass a symbol_ref and priority
to assemble_constructor.
2001-08-02 Alexandre Petit-Bianco <>
* java-tree.h (all_class_filename): New macro.
(enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
(BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
newly created IDENTIFIER_NODE to `all_class_filename.'
2001-08-01 Jeff Sturm <>
Use ggc_add_tree_root to register roots.
2001-07-31 Alexandre Petit-Bianco <>
* check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
second operand calling check_init.
* decl.c (complete_start_java_method): Swaped second and third
arguments while creating WITH_CLEANUP_EXPR node.
* jcf-write.c (generate_bytecode_insns): Use second operand
instead of third when handling WITH_CLEANUP_EXPR.
* parse.y (java_complete_lhs): Expand second operand of
(patch_synchronized_statement): Swaped second and third arguments
while creating WITH_CLEANUP_EXPR node.
2001-07-18 Alexandre Petit-Bianco <>
* parse.y (create_interface): Avoid cyclic inheritance report when
syntax error encountered during class definition.
Fixes PR java/2956
2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-07-18 Tom Tromey <>
For PR java/2812:
* lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
* lex.c (java_new_lexer): Use ICONV_CONST.
(java_read_char): Likewise.
* (jc1$(exeext)): Link against LIBICONV.
(jv-scan$(exeext)): Likewise.
2001-07-17 Alexandre Petit-Bianco <>
* parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
* parse.y (check_class_interface_creation): Allow `private' if the
enclosing is not an interface.
(create_interface): Interface tagged public if the enclosing
context is an interface.
(create_class): Class tagged public if the enclosing context
is an interface.
Fixes PR java/2959
2001-07-17 Alexandre Petit-Bianco <>
* class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
Fixes PR java/2665
2001-07-14 Tim Josling <>
* check-init.c (check_init): Remove references to EXPON_EXPR.
2001-07-13 Alexandre Petit-Bianco <>
* parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
Fixes PR java/3602
2001-07-13 Tom Tromey <>
* jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
2001-07-12 Alexandre Petit-Bianco <>
* parse.y (patch_method_invocation): Don't override primary if one
is already provided, but let this$<n> be built. Fixed comment.
2001-07-12 Alexandre Petit-Bianco <>
* parse.y (empty_statement:): Report empty statement error only
when found at class declaration level.
Fixes PR java/3635
2001-07-12 Tom Tromey <>
* expr.c (expand_load_internal): New function.
2001-07-11 Alexandre Petit-Bianco <>
* parse.y (verify_constructor_super): Compare anonymous class ctor
args with `valid_method_invocation_conversion_p.'
Fixes PR java/3285
2001-07-10 Alexandre Petit-Bianco <>
* lang-specs.h: Forbit the use if `-femit-class-file{s}' without
`-fsyntax-only.' Fixes PR java/3248
2001-07-10 Alexandre Petit-Bianco <>
* jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
2001-07-10 Alexandre Petit-Bianco <>
* parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
current function is static. Fixes PR java/1970
2001-07-09 Alexandre Petit-Bianco <>
* parse.y (patch_method_invocation): Add enclosing context to ctor
calls if necessary. Fixes PR java/2953
2001-07-09 Alexandre Petit-Bianco <>
* parse.y (resolve_package): Abort if qualified expression member
isn't right.
(qualify_ambiguous_name): Don't qualify as type if `this' in use.
Fixes PR java/1391
2001-07-07 Zack Weinberg <>
* verify.c: Don't use // comments.
2001-07-05 Tom Tromey <>
* lang.c (flag_assume_compiled): Removed.
* java-tree.h (flag_assume_compiled): Removed.
* lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,