+2017-07-14 Martin Liska <mliska@suse.cz>
+
+ * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
+ * dwarf2out.c (is_java): Remove the function.
+ (output_pubname): Remove usage of the function.
+ (lower_bound_default): Remove usage of DW_LANG_Java.
+ (gen_compile_unit_die): Likewise.
+ * gcc.c: Remove compiler defaults for .java and .zip files.
+ * gimple-expr.c (remove_suffix): Change as there's no longer
+ extension than 4-letter one.
+ * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
+ (gimplify_save_expr): Likewise.
+ * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
+ as it's possible even for other languages than Java.
+ * langhooks.h (struct lang_hooks): Remove Java from a comment.
+ * lto-opts.c (lto_write_options): Remove reference to Java.
+ * opts.c (strip_off_ending): Update file extension handling.
+ * tree-cfg.c (verify_gimple_call): Remove comment with Java.
+ * tree-eh.c (lower_resx): Likewise.
+ * tree.c (free_lang_data_in_type): Remove dead code.
+ (find_decls_types_r): Likewise.
+ (build_common_builtin_nodes): Remove Java from a comment.
+ (verify_type): Remove dead code.
+ * varasm.c (assemble_external): Remove Java from a comment.
+
2017-07-14 Martin Liska <mliska@suse.cz>
* opts.c (finish_options): Add quotes.
if (elt)
emit_label (*elt);
- /* Java emits line number notes in the top of labels.
- ??? Make this go away once line number notes are obsoleted. */
BB_HEAD (bb) = NEXT_INSN (last);
if (NOTE_P (BB_HEAD (bb)))
BB_HEAD (bb) = NEXT_INSN (BB_HEAD (bb));
return is_cxx ();
}
-/* Return TRUE if the language is Java. */
-
-static inline bool
-is_java (void)
-{
- unsigned int lang = get_AT_unsigned (comp_unit_die (), DW_AT_language);
-
- return lang == DW_LANG_Java;
-}
-
/* Return TRUE if the language is Fortran. */
static inline bool
case DW_TAG_enumerator:
GDB_INDEX_SYMBOL_KIND_SET_VALUE(flags,
GDB_INDEX_SYMBOL_KIND_VARIABLE);
- if (!is_cxx () && !is_java ())
- GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
+ if (!is_cxx ())
+ GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
break;
case DW_TAG_subprogram:
GDB_INDEX_SYMBOL_KIND_SET_VALUE(flags,
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
GDB_INDEX_SYMBOL_KIND_SET_VALUE(flags, GDB_INDEX_SYMBOL_KIND_TYPE);
- if (!is_cxx () && !is_java ())
+ if (!is_cxx ())
GDB_INDEX_SYMBOL_STATIC_SET_VALUE(flags, 1);
break;
default:
case DW_LANG_C_plus_plus_14:
case DW_LANG_ObjC:
case DW_LANG_ObjC_plus_plus:
- case DW_LANG_Java:
return 0;
case DW_LANG_Fortran77:
case DW_LANG_Fortran90:
language = DW_LANG_Fortran08;
}
}
- else if (strcmp (language_string, "GNU Java") == 0)
- language = DW_LANG_Java;
else if (strcmp (language_string, "GNU Objective-C") == 0)
language = DW_LANG_ObjC;
else if (strcmp (language_string, "GNU Objective-C++") == 0)
{".f03", "#Fortran", 0, 0, 0}, {".F03", "#Fortran", 0, 0, 0},
{".f08", "#Fortran", 0, 0, 0}, {".F08", "#Fortran", 0, 0, 0},
{".r", "#Ratfor", 0, 0, 0},
- {".java", "#Java", 0, 0, 0}, {".class", "#Java", 0, 0, 0},
- {".zip", "#Java", 0, 0, 0}, {".jar", "#Java", 0, 0, 0},
{".go", "#Go", 0, 1, 0},
/* Next come the entries for C. */
{".c", "@c", 0, 0, 1},
/* Strip off a legitimate source ending from the input string NAME of
length LEN. Rather than having to know the names used by all of
our front ends, we strip off an ending of a period followed by
- up to five characters. (Java uses ".class".) */
+ up to four characters. (like ".cpp".) */
static inline void
remove_suffix (char *name, int len)
{
int i;
- for (i = 2; i < 8 && len > i; i++)
+ for (i = 2; i < 7 && len > i; i++)
{
if (name[len - i] == '.')
{
/* Stop at types, decls, constants like copy_tree_r. */
else if (TREE_CODE_CLASS (code) == tcc_type
|| TREE_CODE_CLASS (code) == tcc_declaration
- || TREE_CODE_CLASS (code) == tcc_constant
- /* We can't do anything sensible with a BLOCK used as an
- expression, but we also can't just die when we see it
- because of non-expression uses. So we avert our eyes
- and cross our fingers. Silly Java. */
- || code == BLOCK)
+ || TREE_CODE_CLASS (code) == tcc_constant)
*walk_subtrees = 0;
/* Cope with the statement expression extension. */
/* If the SAVE_EXPR has not been resolved, then evaluate it once. */
if (!SAVE_EXPR_RESOLVED_P (*expr_p))
{
- /* The operand may be a void-valued expression such as SAVE_EXPRs
- generated by the Java frontend for class initialization. It is
- being executed only for its side-effects. */
- if (TREE_TYPE (val) == void_type_node)
- {
- ret = gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
- is_gimple_stmt, fb_none);
- val = NULL;
- }
- else
- /* The temporary may not be an SSA name as later abnormal and EH
- control flow may invalidate use/def domination. */
- val = get_initialized_tmp_var (val, pre_p, post_p, false);
+ gcc_assert (TREE_TYPE (val) != void_type_node);
+ /* The temporary may not be an SSA name as later abnormal and EH
+ control flow may invalidate use/def domination. */
+ val = get_initialized_tmp_var (val, pre_p, post_p, false);
TREE_OPERAND (*expr_p, 0) = val;
SAVE_EXPR_RESOLVED_P (*expr_p) = 1;
inline bool
polymorphic_type_binfo_p (const_tree binfo)
{
- /* See if BINFO's type has an virtual table associtated with it.
- Check is defensive because of Java FE produces BINFOs
- without BINFO_TYPE set. */
return (BINFO_TYPE (binfo) && TYPE_BINFO (BINFO_TYPE (binfo))
&& BINFO_VTABLE (TYPE_BINFO (BINFO_TYPE (binfo))));
}
struct lang_hooks
{
/* String identifying the front end and optionally language standard
- version, e.g. "GNU C++98" or "GNU Java". */
+ version, e.g. "GNU C++98". */
const char *name;
/* sizeof (struct lang_identifier), so make_node () creates
gcc_unreachable ();
}
/* The default -fmath-errno, -fsigned-zeros and -ftrapping-math change
- depending on the language (they can be disabled by the Ada and Java
- front-ends). Pass thru conservative standard settings. */
+ depending on the language (they can be disabled by the Ada front-end).
+ Pass thru conservative standard settings. */
if (!global_options_set.x_flag_errno_math)
append_to_collect_gcc_options (&temporary_obstack, &first_p,
global_options.x_flag_errno_math
/* Strip off a legitimate source ending from the input string NAME of
length LEN. Rather than having to know the names used by all of
our front ends, we strip off an ending of a period followed by
- up to five characters. (Java uses ".class".) */
+ up to fource characters. (C++ uses ".cpp".) */
void
strip_off_ending (char *name, int len)
{
int i;
- for (i = 2; i < 6 && len > i; i++)
+ for (i = 2; i < 5 && len > i; i++)
{
if (name[len - i] == '.')
{
&& !useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (fntype))
/* ??? At least C++ misses conversions at assignments from
void * call results.
- ??? Java is completely off. Especially with functions
- returning java.lang.Object.
For now simply allow arbitrary pointer type conversions. */
&& !(POINTER_TYPE_P (TREE_TYPE (lhs))
&& POINTER_TYPE_P (TREE_TYPE (fntype))))
/* Decide whether or not we are going to duplicate the finally block.
There are several considerations.
- First, if this is Java, then the finally block contains code
- written by the user. It has line numbers associated with it,
- so duplicating the block means it's difficult to set a breakpoint.
- Since controlling code generation via -g is verboten, we simply
- never duplicate code without optimization.
-
Second, we'd like to prevent egregious code growth. One way to
do this is to estimate the size of the finally block, multiply
that by the number of copies we'd need to make, and compare against
_Unwind_Resume library function. */
/* The ARM EABI redefines _Unwind_Resume as __cxa_end_cleanup
- with no arguments for C++ and Java. Check for that. */
+ with no arguments for C++. Check for that. */
if (src_r->use_cxa_end_cleanup)
{
fn = builtin_decl_implicit (BUILT_IN_CXA_END_CLEANUP);
/* C++ FE uses TREE_PURPOSE to store initial values. */
TREE_PURPOSE (p) = NULL;
}
- /* Java uses TYPE_MINVAL for TYPE_ARGUMENT_SIGNATURE. */
- TYPE_MINVAL (type) = NULL;
}
if (TREE_CODE (type) == METHOD_TYPE)
{
/* C++ FE uses TREE_PURPOSE to store initial values. */
TREE_PURPOSE (p) = NULL;
}
- /* Java uses TYPE_MINVAL for TYPE_ARGUMENT_SIGNATURE. */
- TYPE_MINVAL (type) = NULL;
}
/* Remove members that are not actually FIELD_DECLs from the field
tree tem;
FOR_EACH_VEC_ELT (*BINFO_BASE_BINFOS (TYPE_BINFO (t)), i, tem)
fld_worklist_push (TREE_TYPE (tem), fld);
- tem = BINFO_VIRTUALS (TYPE_BINFO (t));
- if (tem
- /* The Java FE overloads BINFO_VIRTUALS for its own purpose. */
- && TREE_CODE (tem) == TREE_LIST)
- do
- {
- fld_worklist_push (TREE_VALUE (tem), fld);
- tem = TREE_CHAIN (tem);
- }
- while (tem);
+ fld_worklist_push (BINFO_VIRTUALS (TYPE_BINFO (t)), fld);
}
if (RECORD_OR_UNION_TYPE_P (t))
{
ECF_PURE | ECF_NOTHROW | ECF_LEAF);
/* If there's a possibility that we might use the ARM EABI, build the
- alternate __cxa_end_cleanup node used to resume from C++ and Java. */
+ alternate __cxa_end_cleanup node used to resume from C++. */
if (targetm.arm_eabi_unwinder)
{
ftype = build_function_type_list (void_type_node, NULL_TREE);
TREE_TYPE (TYPE_MIN_VALUE (t))
but does not for C sizetypes in LTO. */
}
- /* Java uses TYPE_MINVAL for TYPE_ARGUMENT_SIGNATURE. */
- else if (TYPE_MINVAL (t)
- && ((TREE_CODE (t) != METHOD_TYPE && TREE_CODE (t) != FUNCTION_TYPE)
- || in_lto_p))
- {
- error ("TYPE_MINVAL non-NULL");
- debug_tree (TYPE_MINVAL (t));
- error_found = true;
- }
/* Check various uses of TYPE_MAXVAL. */
if (RECORD_OR_UNION_TYPE_P (t))
debug_tree (TYPE_BINFO (t));
error_found = true;
}
- /* FIXME: Java builds invalid empty binfos that do not have
- TREE_TYPE set. */
- else if (TREE_TYPE (TYPE_BINFO (t)) != TYPE_MAIN_VARIANT (t) && 0)
- {
- error ("TYPE_BINFO type is not TYPE_MAIN_VARIANT");
- debug_tree (TREE_TYPE (TYPE_BINFO (t)));
- error_found = true;
- }
}
else if (TYPE_LANG_SLOT_1 (t) && in_lto_p)
{
error ("TYPE_STRING_FLAG is set on wrong type code");
error_found = true;
}
- else if (TYPE_STRING_FLAG (t))
- {
- const_tree b = t;
- if (TREE_CODE (b) == ARRAY_TYPE)
- b = TREE_TYPE (t);
- /* Java builds arrays with TYPE_STRING_FLAG of promoted_char_type
- that is 32bits. */
- if (TREE_CODE (b) != INTEGER_TYPE)
- {
- error ("TYPE_STRING_FLAG is set on type that does not look like "
- "char nor array of chars");
- error_found = true;
- }
- }
/* ipa-devirt makes an assumption that TYPE_METHOD_BASETYPE is always
TYPE_MAIN_VARIANT and it would be odd to add methods only to variatns
gcc_assert (asm_out_file);
/* In a perfect world, the following condition would be true.
- Sadly, the Java and Go front ends emit assembly *from the front end*,
+ Sadly, the Go front end emit assembly *from the front end*,
bypassing the call graph. See PR52739. Fix before GCC 4.8. */
#if 0
/* This function should only be called if we are expanding, or have