This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] java/*.c: Call buildN instead of build.


Hi,

Attached is a patch to call buildN instead of build.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2005-04-18  Kazu Hirata  <kazu@cs.umass.edu>

	* class.c (finish_class): Call build1 instead of build.
	* expr.c (java_create_object): Call build3 instead of build.
	* java-gimplify.c (java_gimplify_labeled_block_expr): Call
	build1 instead of build.

Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.223
diff -u -d -p -r1.223 class.c
--- class.c	7 Apr 2005 19:12:52 -0000	1.223
+++ class.c	17 Apr 2005 17:21:11 -0000
@@ -1898,7 +1898,7 @@ finish_class (void)
       tree verify_method = TYPE_VERIFY_METHOD (output_class);
       DECL_SAVED_TREE (verify_method) 
 	= add_stmt_to_compound (DECL_SAVED_TREE (verify_method), void_type_node,
-				build (RETURN_EXPR, void_type_node, NULL));
+				build1 (RETURN_EXPR, void_type_node, NULL));
       java_genericize (verify_method);
       cgraph_finalize_function (verify_method, false);
       TYPE_ASSERTIONS (current_class) = NULL;
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.221
diff -u -d -p -r1.221 expr.c
--- expr.c	17 Mar 2005 14:43:26 -0000	1.221
+++ expr.c	17 Apr 2005 17:21:14 -0000
@@ -1349,10 +1349,10 @@ java_create_object (tree type)
 		     ? alloc_object_node
 		     : alloc_no_finalizer_node);
   
-  return build (CALL_EXPR, promote_type (type),
-		build_address_of (alloc_node),
-		build_tree_list (NULL_TREE, build_class_ref (type)),
-		NULL_TREE);
+  return build3 (CALL_EXPR, promote_type (type),
+		 build_address_of (alloc_node),
+		 build_tree_list (NULL_TREE, build_class_ref (type)),
+		 NULL_TREE);
 }
 
 static void
Index: java-gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/java-gimplify.c,v
retrieving revision 1.18
diff -u -d -p -r1.18 java-gimplify.c
--- java-gimplify.c	2 Dec 2004 16:37:41 -0000	1.18
+++ java-gimplify.c	17 Apr 2005 17:21:14 -0000
@@ -186,9 +186,9 @@ java_gimplify_labeled_block_expr (tree e
   tree t;
 
   DECL_CONTEXT (label) = current_function_decl;
-  t = build (LABEL_EXPR, void_type_node, label);
+  t = build1 (LABEL_EXPR, void_type_node, label);
   if (body != NULL_TREE)
-    t = build (COMPOUND_EXPR, void_type_node, body, t);
+    t = build2 (COMPOUND_EXPR, void_type_node, body, t);
   return t;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]