2001-03-22 Alexandre Petit-Bianco <apbianco@redhat.com>
* gcj.texi (Input Options): documented the check for attribute
`gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
* java-tree.h (flag_force_classes_archive_check): Declared extern.
* jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
(jcf_parse): Check for the right classes archive if necessary.
* jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
(jcf_parse_fields): Fixed indentation.
* jcf-write.c (append_gcj_attribute): New function.
(generate_classfile): Compute the attribute count, invoke
`append_gcj_attribute'.
* jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
turned into bit fields. New bit field `right_zip.'
(JCF_ZERO): Set `right_zip' to zero.
* lang-options.h (-fforce-classes-archive-check): Added flag.
* lang.c (flag_force_classes_archive_check): New flag.
(lang_f_options): New entry `force-classes-archive-check.'
Fixes PR java/1213.
(http://gcc.gnu.org/ml/gcc-patches/2001-03/msg01662.html)
From-SVN: r40788
2000-03-23 Jeff Sturm <jsturm@one-point.com>
* prims.cc (_Jv_FindClassFromSignature): Check return of
recursive call. Do not abort on invalid signature; return NULL
instead.
From-SVN: r40787
* decl.c (local_names): Define.
(push_local_name): New.
(grok_reference_init): Return init if initializing static reference
variable with non-constant instead of emitting it.
Move expand_static_init call to cp_finish_decl.
(layout_var_decl): Call push_local_name.
(maybe_commonize_var): Allow inlining functions even if they have
static local variables, use comdat_linkage for them if flag_weak.
(check_initializer): Call obscure_complex_init if
grok_reference_init returned non-zero.
(save_function_data): Clear x_local_names.
(pop_cp_function_context): Free x_local_names.
(mark_inlined_fns): Remove.
(mark_lang_function): Mark x_local_names.
(lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
Mark inlined_fns as tree, remove call to mark_inlined_fns.
* class.c (alter_access): Ensure DECL_ACCESS is never set if
DECL_DISCRIMINATOR_P.
* cp-tree.h (cp_language_function): Add x_local_names.
(lang_decl_flags): Add discriminator into u2.
(lang_decl_inlined_fns): Remove.
(lang_decl): inlined_fns is now a TREE_VEC.
(DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
* optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
TREE_VEC, not a custom structure.
(optimize_function): Likewise.
* mangle.c (discriminator_for_local_entity): Discriminate among
VAR_DECL local entities.
* search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
is not valid.
* g++.old-deja/g++.other/mangle3.C: New test.
From-SVN: r40779
Fix for PR libgcj/1736. Thanks to Robert Boehne and Alexandre Oliva
for libtool hacking.
* Makefile.am (libgcj.la): New explicit rule. Echo the list of objects
to a temporary file, then invoke libtool with the -objectlist
paramater.
(libgcjx.la): Likewise.
* Makefile.in: Rebuilt.
From-SVN: r40775
2001-03-23 Bryce McKinlay <bryce@albatross.co.nz>
* extend.texi: Document the "java_interface" attribute.
java/:
2001-03-21 Bryce McKinlay <bryce@albatross.co.nz>
* gjavah.c (process_file): Mark interface definitions with
"__attribute__ ((java_interface))".
cp/:
2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
Add support for Java interface method calls.
* cp-tree.h (struct lang_type): Add java_interface flag.
(TYPE_JAVA_INTERFACE): New macro.
* tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
by setting TYPE_JAVA_INTERFACE.
* call.c (java_iface_lookup_fn): New static.
(build_over_call): If calling a method declared in a
TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
expression which resolves the function address.
(build_java_interface_fn_ref): New function.
From-SVN: r40769
* mkconfig.sh: Use a subshell with redirected stdout,
instead of closing stdout and confusing commands that run
afterward. Throw away output of cmp.
From-SVN: r40765
* method.c (do_build_assign_ref): Don't use build_modify_expr for
anonymous aggregates, since they don't have assignment operator
method.
* decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
assignment operators for anonymous structure fields.
* g++.old-deja/g++.other/anon8.C: New test.
From-SVN: r40746
* cp-demangle.c (struct demangling_def): New fields:
is_constructor and is_destructor.
(demangling_new): Initialize them.
(demangle_ctor_dtor_name): Set them, if we detect a constructor
or destructor.
(demangle_v3_with_details, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor): New functions.
From-SVN: r40713
* sdbout.c: #include ggc.h.
(sdbout_init): Move to end of file.
Call ggc_add_tree_root for anonymous_types.
(sdbout_symbol): Use DECL_NAME for local, not DECL_ASSEMBLER_NAME.
(sdbout_one_type): Use DECL_NAME for field name.
* Makefile.in (sdbout.o): Show includes ggc.h.
From-SVN: r40710
* i386.c (override_options): Default ix86_regparm to REGPARM_MAX.
(override_options): Use properlimits for preferred_stack_boundary.
(ix86_valid_type_attribute_p): Disable stdcall and cdecl attributes
on x86_64.
(ext_register_operand): Accept DImode.
(load_pic_register): Abort on 64bit.
(gen_push): Use Pmode instead of SImode.
(ix86_save_reg): Pic reg is never used on 64bit.
(ix86_expand_prologue): Likewise.
(ix86_emit_save_regs): Use Pmode instead of SImode.
(legitimate_address_p): Check displacement for 64bit.
(print_operand): Avoid outputting of (%rip) on 64bit.
(print_operand_address): Output (%rip) where possible.
(split_di): Abort on 64bit registers.
(ix86_expand_branch): DImode comparison is simple for x86_64.
(memory_address_length): Recognize memory addresses formed using PRE/POST modify.
(ix86_data_alignment, ix86_local_alignment): Align arrays to 16 bytes for x86_64.
* i386.h (TARGET_USE_SAHF): Disable for 64bit.
From-SVN: r40708