Commit c0b00d37 by Alexandre Petit-Bianco Committed by Alexandre Petit-Bianco

jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last argument.

2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
	argument.
	* parse.y (finish_method_declaration): Code accounting for WFLed
	method DECL_NAMEs deleted.
	(check_abstract_method_definitions): Likewise.
	(resolve_type_during_patch): Layout resolved type.
	* typeck.c (lookup_do): Removed unused local.

(http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00005.html)

From-SVN: r39388
parent 8557dc32
2001-01-30 Alexandre Petit-Bianco <apbianco@cygnus.com>
* jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
argument.
* parse.y (finish_method_declaration): Code accounting for WFLed
method DECL_NAMEs deleted.
(check_abstract_method_definitions): Likewise.
(resolve_type_during_patch): Layout resolved type.
* typeck.c (lookup_do): Removed unused local.
2000-01-30 Bryce McKinlay <bryce@albatross.co.nz> 2000-01-30 Bryce McKinlay <bryce@albatross.co.nz>
* java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE. * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
......
...@@ -1135,5 +1135,5 @@ init_jcf_parse () ...@@ -1135,5 +1135,5 @@ init_jcf_parse ()
/* Register roots with the garbage collector. */ /* Register roots with the garbage collector. */
ggc_add_tree_root (parse_roots, sizeof (parse_roots) / sizeof(tree)); ggc_add_tree_root (parse_roots, sizeof (parse_roots) / sizeof(tree));
ggc_add_root (&current_jcf, 1, sizeof (JCF), ggc_mark_jcf); ggc_add_root (&current_jcf, 1, sizeof (JCF), (void (*)(void *))ggc_mark_jcf);
} }
...@@ -4572,21 +4572,21 @@ finish_method_declaration (method_body) ...@@ -4572,21 +4572,21 @@ finish_method_declaration (method_body)
/* 8.4.5 Method Body */ /* 8.4.5 Method Body */
if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body) if ((flags & ACC_ABSTRACT || flags & ACC_NATIVE) && method_body)
{ {
tree wfl = DECL_NAME (current_function_decl); tree name = DECL_NAME (current_function_decl);
parse_error_context (wfl, parse_error_context (DECL_FUNCTION_WFL (current_function_decl),
"%s method `%s' can't have a body defined", "%s method `%s' can't have a body defined",
(METHOD_NATIVE (current_function_decl) ? (METHOD_NATIVE (current_function_decl) ?
"Native" : "Abstract"), "Native" : "Abstract"),
IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); IDENTIFIER_POINTER (name));
method_body = NULL_TREE; method_body = NULL_TREE;
} }
else if (!(flags & ACC_ABSTRACT) && !(flags & ACC_NATIVE) && !method_body) else if (!(flags & ACC_ABSTRACT) && !(flags & ACC_NATIVE) && !method_body)
{ {
tree wfl = DECL_NAME (current_function_decl); tree name = DECL_NAME (current_function_decl);
parse_error_context parse_error_context
(wfl, (DECL_FUNCTION_WFL (current_function_decl),
"Non native and non abstract method `%s' must have a body defined", "Non native and non abstract method `%s' must have a body defined",
IDENTIFIER_POINTER (EXPR_WFL_NODE (wfl))); IDENTIFIER_POINTER (name));
method_body = NULL_TREE; method_body = NULL_TREE;
} }
...@@ -5904,13 +5904,6 @@ check_abstract_method_definitions (do_interface, class_decl, type) ...@@ -5904,13 +5904,6 @@ check_abstract_method_definitions (do_interface, class_decl, type)
char *t = xstrdup (lang_printable_name char *t = xstrdup (lang_printable_name
(TREE_TYPE (TREE_TYPE (method)), 0)); (TREE_TYPE (TREE_TYPE (method)), 0));
tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method))); tree ccn = DECL_NAME (TYPE_NAME (DECL_CONTEXT (method)));
tree saved_wfl = NULL_TREE;
if (TREE_CODE (DECL_NAME (method)) == EXPR_WITH_FILE_LOCATION)
{
saved_wfl = DECL_NAME (method);
DECL_NAME (method) = EXPR_WFL_NODE (DECL_NAME (method));
}
parse_error_context parse_error_context
(lookup_cl (class_decl), (lookup_cl (class_decl),
...@@ -5924,9 +5917,6 @@ check_abstract_method_definitions (do_interface, class_decl, type) ...@@ -5924,9 +5917,6 @@ check_abstract_method_definitions (do_interface, class_decl, type)
IDENTIFIER_POINTER (DECL_NAME (class_decl))); IDENTIFIER_POINTER (DECL_NAME (class_decl)));
ok = 0; ok = 0;
free (t); free (t);
if (saved_wfl)
DECL_NAME (method) = saved_wfl;
} }
} }
...@@ -13870,7 +13860,7 @@ resolve_type_during_patch (type) ...@@ -13870,7 +13860,7 @@ resolve_type_during_patch (type)
{ {
if (unresolved_type_p (type, NULL)) if (unresolved_type_p (type, NULL))
{ {
tree type_decl = resolve_no_layout (EXPR_WFL_NODE (type), type); tree type_decl = resolve_and_layout (EXPR_WFL_NODE (type), type);
if (!type_decl) if (!type_decl)
{ {
parse_error_context (type, parse_error_context (type,
......
...@@ -834,8 +834,6 @@ lookup_do (searched_class, searched_interface, method_name, signature, signature ...@@ -834,8 +834,6 @@ lookup_do (searched_class, searched_interface, method_name, signature, signature
method != NULL_TREE; method = TREE_CHAIN (method)) method != NULL_TREE; method = TREE_CHAIN (method))
{ {
tree method_sig = (*signature_builder) (TREE_TYPE (method)); tree method_sig = (*signature_builder) (TREE_TYPE (method));
tree name = DECL_NAME (method);
if (DECL_NAME (method) == method_name && method_sig == signature) if (DECL_NAME (method) == method_name && method_sig == signature)
return method; return method;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment