summaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2008-09-17 21:39:13 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2008-09-17 14:39:13 -0700
commit2700cb867541331e5ff208e451870c7a801a5613 (patch)
tree6cb176666db53c6b4190270715556b7607696332 /gcc/java/lang.c
parent6847a7549cc909ebb292eeb6b549ca4faf013874 (diff)
downloadgcc-2700cb867541331e5ff208e451870c7a801a5613.tar.gz
re PR objc/37460 (NeXT runtime ICEs)
2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com> * tree.c (get_callee_fndecl): Don't call the language hook. * langhooks.h (lang_hooks): Remove lang_get_callee_fndecl. * langhooks-def.h (LANG_HOOKS_GET_CALLEE_FNDECL): Kill. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_GET_CALLEE_FNDECL. 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com> PR objc/37460 * objc-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define. * objc-act.h (objc_get_callee_fndecl): Remove prototype. * objc-act.c (objc_get_callee_fndecl): Kill. 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com> * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define. (java_get_callee_fndecl): Kill. 2008-09-17 Andrew Pinski <andrew_pinski@playstation.sony.com> PR objc/37460 * objcp-lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define. From-SVN: r140430
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index af2ed8065c6..2a962c04736 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -61,7 +61,6 @@ static int inline_init_test_initialization (void * *, void *);
static bool java_dump_tree (void *, tree);
static void dump_compound_expr (dump_info_p, tree);
static bool java_decl_ok_for_sibcall (const_tree);
-static tree java_get_callee_fndecl (const_tree);
static enum classify_record java_classify_record (tree type);
@@ -156,9 +155,6 @@ struct language_function GTY(())
#undef LANG_HOOKS_DECL_OK_FOR_SIBCALL
#define LANG_HOOKS_DECL_OK_FOR_SIBCALL java_decl_ok_for_sibcall
-#undef LANG_HOOKS_GET_CALLEE_FNDECL
-#define LANG_HOOKS_GET_CALLEE_FNDECL java_get_callee_fndecl
-
#undef LANG_HOOKS_SET_DECL_ASSEMBLER_NAME
#define LANG_HOOKS_SET_DECL_ASSEMBLER_NAME java_mangle_decl
@@ -848,56 +844,6 @@ java_decl_ok_for_sibcall (const_tree decl)
&& !DECL_UNINLINABLE (decl));
}
-/* Given a call_expr, try to figure out what its target might be. In
- the case of an indirection via the atable, search for the decl. If
- the decl is external, we return NULL. If we don't, the optimizer
- will replace the indirection with a direct call, which undoes the
- purpose of the atable indirection. */
-static tree
-java_get_callee_fndecl (const_tree call_expr)
-{
- tree method, table, element, atable_methods;
-
- HOST_WIDE_INT index;
-
- /* FIXME: This is disabled because we end up passing calls through
- the PLT, and we do NOT want to do that. */
- return NULL;
-
- if (TREE_CODE (call_expr) != CALL_EXPR)
- return NULL;
- method = CALL_EXPR_FN (call_expr);
- STRIP_NOPS (method);
- if (TREE_CODE (method) != ARRAY_REF)
- return NULL;
- table = TREE_OPERAND (method, 0);
- if (! DECL_LANG_SPECIFIC(table)
- || !DECL_OWNER (table)
- || TYPE_ATABLE_DECL (DECL_OWNER (table)) != table)
- return NULL;
-
- atable_methods = TYPE_ATABLE_METHODS (DECL_OWNER (table));
- index = TREE_INT_CST_LOW (TREE_OPERAND (method, 1));
-
- /* FIXME: Replace this for loop with a hash table lookup. */
- for (element = atable_methods; element; element = TREE_CHAIN (element))
- {
- if (index == 1)
- {
- tree purpose = TREE_PURPOSE (element);
- if (TREE_CODE (purpose) == FUNCTION_DECL
- && ! DECL_EXTERNAL (purpose))
- return purpose;
- else
- return NULL;
- }
- --index;
- }
-
- return NULL;
-}
-
-
static enum classify_record
java_classify_record (tree type)
{