diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-10-04 17:32:31 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-10-04 17:32:31 +0200 |
commit | bfecd57cd46ac368213f55fc4a3ff67c8c59c5ea (patch) | |
tree | 67b42e486b9999f08c29028115ba5ebbee98254b /gcc/cp/mangle.c | |
parent | fe8b1e839ca91a61440288049a868944346eef4b (diff) | |
download | gcc-bfecd57cd46ac368213f55fc4a3ff67c8c59c5ea.zip gcc-bfecd57cd46ac368213f55fc4a3ff67c8c59c5ea.tar.gz gcc-bfecd57cd46ac368213f55fc4a3ff67c8c59c5ea.tar.bz2 |
extend.texi (Java Exceptions): Remove.
* doc/extend.texi (Java Exceptions): Remove.
(java_interface): Remove.
cp/
* cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*,
CPTI_LANG_NAME_JAVA and CPTI_JCLASS.
(java_byte_type_node, java_short_type_node, java_int_type_node,
java_long_type_node, java_float_type_node, java_double_type_node,
java_char_type_node, java_boolean_type_node, lang_name_java,
jclass_node): Remove.
(enum languages): Remove lang_java.
(TYPE_FOR_JAVA): Remove.
(struct lang_type_class): Remove java_interface bit-field.
(TYPE_JAVA_INTERFACE): Remove.
(pragma_java_exceptions): Remove.
(check_java_method, build_java_class_ref): Remove prototypes.
* name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA.
* decl2.c (acceptable_java_type, check_java_method): Remove.
(import_export_decl): Remove TYPE_FOR_JAVA handling.
(build_java_method_aliases): Remove.
(c_parse_final_cleanups): Don't call build_java_method_aliases.
(possibly_inlined_p): Don't test pragma_java_exceptions.
* init.c (build_new_1): Remove TYPE_FOR_JAVA handling.
(build_java_class_ref): Remove.
* pt.c (maybe_new_partial_specialization, lookup_template_class_1,
instantiate_class_template_1): Don't copy TYPE_FOR_JAVA.
* except.c (eh_type_info): Remove java type handling.
(decl_is_java_type, choose_personality_routine): Remove.
(initialize_handler_parm): Don't call choose_personality_routine.
(expand_start_catch_block): Don't handle java types.
(build_throw): Likewise.
* cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions.
* typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA.
* call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE.
(java_iface_lookup_fn): Remove.
(build_java_interface_fn_ref): Remove.
* tree.c (cxx_attribute_table): Remove java_interface.
(handle_java_interface_attribute): Remove.
* lex.c (pragma_java_exceptions): Remove.
(init_cp_pragma): Don't register GCC java_exceptions pragma.
(handle_pragma_java_exceptions): Remove.
(retrofit_lang_decl): Don't handle lang_name_java.
* method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA.
* error.c (language_to_string): Don't handle lang_java.
* decl.c (record_builtin_java_type): Remove.
(initialize_predefined_identifiers): Remove Java.
(cxx_init_decl_processing): Remove java_*_type_node.
(cp_finish_decl): Don't handle TYPE_FOR_JAVA.
(grokfndecl): Likewise.
(check_special_function_return_type): Likewise.
(grokdeclarator): Don't set TYPE_FOR_JAVA.
(grokparms): Don't handle TYPE_FOR_JAVA.
(xref_basetypes): Likewise.
(check_function_type): Likewise.
(finish_constructor_body): Likewise.
* mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA
and java_*_type_node.
(write_bare_function_type): Don't handle TYPE_FOR_JAVA.
(write_java_integer_type_codes): Remove.
* class.c (add_method): Don't handle TYPE_FOR_JAVA.
(add_implicitly_declared_members, determine_key_method,
finish_struct_1): Likewise.
(push_lang_context): Don't handle lang_name_java.
testsuite/
* g++.dg/other/java3.C: Remove.
* g++.dg/other/java1.C: Remove.
* g++.dg/other/error12.C: Remove.
* g++.dg/other/java2.C: Remove.
* g++.dg/warn/Wnvdtor.C: Remove.
* g++.dg/lookup/java1.C: Remove.
* g++.dg/lookup/java2.C: Remove.
* g++.dg/ext/pr34829.C: Remove.
* g++.dg/ext/java-3.C: Remove.
* g++.dg/ext/java-1.C: Remove.
* g++.dg/ext/java-2.C: Remove.
* g++.old-deja/g++.oliva/dwarf2.C: Remove.
From-SVN: r240750
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r-- | gcc/cp/mangle.c | 64 |
1 files changed, 4 insertions, 60 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index bd23260..9f86e91 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -239,10 +239,6 @@ static bool equal_abi_tags (tree, tree); static inline void start_mangling (const tree); static tree mangle_special_for_type (const tree, const char *); -/* Foreign language functions. */ - -static void write_java_integer_type_codes (const tree); - /* Append a single character to the end of the mangled representation. */ #define write_char(CHAR) \ @@ -2436,8 +2432,6 @@ write_builtin_type (tree type) write_string ("Ds"); else if (type == char32_type_node) write_string ("Di"); - else if (TYPE_FOR_JAVA (type)) - write_java_integer_type_codes (type); else { size_t itk; @@ -2492,11 +2486,9 @@ write_builtin_type (tree type) break; case REAL_TYPE: - if (type == float_type_node - || type == java_float_type_node) + if (type == float_type_node) write_char ('f'); - else if (type == double_type_node - || type == java_double_type_node) + else if (type == double_type_node) write_char ('d'); else if (type == long_double_type_node) write_char ('e'); @@ -2621,40 +2613,16 @@ write_function_type (const tree type) /* Non-terminal <bare-function-type>. TYPE is a FUNCTION_TYPE or METHOD_TYPE. If INCLUDE_RETURN_TYPE is nonzero, the return value is mangled before the parameter types. If non-NULL, DECL is - FUNCTION_DECL for the function whose type is being emitted. - - If DECL is a member of a Java type, then a literal 'J' - is output and the return type is mangled as if INCLUDE_RETURN_TYPE - were nonzero. - - <bare-function-type> ::= [J]</signature/ type>+ */ + FUNCTION_DECL for the function whose type is being emitted. */ static void write_bare_function_type (const tree type, const int include_return_type_p, const tree decl) { - int java_method_p; - MANGLE_TRACE_TREE ("bare-function-type", type); - /* Detect Java methods and emit special encoding. */ - if (decl != NULL - && DECL_FUNCTION_MEMBER_P (decl) - && TYPE_FOR_JAVA (DECL_CONTEXT (decl)) - && !DECL_CONSTRUCTOR_P (decl) - && !DECL_DESTRUCTOR_P (decl) - && !DECL_CONV_FN_P (decl)) - { - java_method_p = 1; - write_char ('J'); - } - else - { - java_method_p = 0; - } - /* Mangle the return type, if requested. */ - if (include_return_type_p || java_method_p) + if (include_return_type_p) write_type (TREE_TYPE (type)); /* Now mangle the types of the arguments. */ @@ -4264,30 +4232,6 @@ mangle_ref_init_variable (const tree variable) return finish_mangling_get_identifier (); } - -/* Foreign language type mangling section. */ - -/* How to write the type codes for the integer Java type. */ - -static void -write_java_integer_type_codes (const tree type) -{ - if (type == java_int_type_node) - write_char ('i'); - else if (type == java_short_type_node) - write_char ('s'); - else if (type == java_byte_type_node) - write_char ('c'); - else if (type == java_char_type_node) - write_char ('w'); - else if (type == java_long_type_node) - write_char ('x'); - else if (type == java_boolean_type_node) - write_char ('b'); - else - gcc_unreachable (); -} - /* Given a CLASS_TYPE, such as a record for std::bad_exception this function generates a mangled name for the vtable map variable of the class type. For example, if the class type is |