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]

Patch installed to eliminate NULL_PTR from the language subdirs


This patch completely eliminates NULL_PTR from the language
subdirectories.  Bootstrapped on solaris2.7 with no testsuite
regressions and installed as obvious.

66 (non-chill) uses remain.

		--Kaveh



2001-05-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

cp:
	* call.c: NULL_PTR -> NULL.
	* class.c: Likewise.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* init.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

f:
	* com.c: NULL_PTR -> NULL.

java:
	* decl.c: NULL_PTR -> NULL.
	* jcf-write.c: Likewise.

diff -rup orig/egcs-CVS20010501/gcc/cp/call.c egcs-CVS20010501/gcc/cp/call.c
--- orig/egcs-CVS20010501/gcc/cp/call.c	Tue May  1 07:59:14 2001
+++ egcs-CVS20010501/gcc/cp/call.c	Tue May  1 11:44:20 2001
@@ -147,7 +147,7 @@ build_field_call (basetype_path, instanc
     {
       /* If it's a field, try overloading operator (),
 	 or calling if the field is a pointer-to-function.  */
-      instance = build_indirect_ref (instance_ptr, NULL_PTR);
+      instance = build_indirect_ref (instance_ptr, NULL);
       instance = build_component_ref_1 (instance, field, 0);
 
       if (instance == error_mark_node)
@@ -309,7 +309,7 @@ build_scoped_method_call (exp, basetype,
       if (TREE_CODE (exp) == INDIRECT_REF)
 	decl = build_indirect_ref
 	  (convert_pointer_to_real
-	   (binfo, build_unary_op (ADDR_EXPR, exp, 0)), NULL_PTR);
+	   (binfo, build_unary_op (ADDR_EXPR, exp, 0)), NULL);
       else
 	decl = build_scoped_ref (exp, basetype);
 
@@ -3520,7 +3520,7 @@ builtin:
 
     case MEMBER_REF:
       return build_m_component_ref
-	(build_indirect_ref (arg1, NULL_PTR), arg2);
+	(build_indirect_ref (arg1, NULL), arg2);
 
       /* The caller will deal with these.  */
     case ADDR_EXPR:
@@ -4340,7 +4340,7 @@ build_java_interface_fn_ref (fn, instanc
       java_iface_lookup_fn 
 	= builtin_function ("_Jv_LookupInterfaceMethodIdx",
 			    build_function_type (ptr_type_node, t),
-			    0, NOT_BUILT_IN, NULL_PTR);
+			    0, NOT_BUILT_IN, NULL);
       ggc_add_tree_root (&java_iface_lookup_fn, 1);
     }
 
@@ -5112,7 +5112,7 @@ static void
 add_warning (winner, loser)
      struct z_candidate *winner, *loser;
 {
-  winner->warnings = tree_cons (NULL_PTR,
+  winner->warnings = tree_cons (NULL_TREE,
 				build_ptr_wrapper (loser),
 				winner->warnings);
 }
diff -rup orig/egcs-CVS20010501/gcc/cp/class.c egcs-CVS20010501/gcc/cp/class.c
--- orig/egcs-CVS20010501/gcc/cp/class.c	Fri Apr 27 07:30:25 2001
+++ egcs-CVS20010501/gcc/cp/class.c	Tue May  1 11:44:30 2001
@@ -416,7 +416,7 @@ build_vbase_path (code, type, expr, path
 		      tree binfo = get_binfo (last, TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (nonnull_expr))), 0);
 		      nonnull_expr = convert_pointer_to_real (binfo, nonnull_expr);
 		    }
-		  ind = build_indirect_ref (nonnull_expr, NULL_PTR);
+		  ind = build_indirect_ref (nonnull_expr, NULL);
 		  nonnull_expr = build_vbase_pointer (ind, last_virtual);
 		  if (nonnull == 0
 		      && TREE_CODE (type) == POINTER_TYPE
diff -rup orig/egcs-CVS20010501/gcc/cp/cvt.c egcs-CVS20010501/gcc/cp/cvt.c
--- orig/egcs-CVS20010501/gcc/cp/cvt.c	Tue May  1 07:30:19 2001
+++ egcs-CVS20010501/gcc/cp/cvt.c	Tue May  1 11:44:36 2001
@@ -594,7 +594,7 @@ convert_from_reference (val)
   if (TREE_CODE (type) == OFFSET_TYPE)
     type = TREE_TYPE (type);
   if (TREE_CODE (type) == REFERENCE_TYPE)
-    return build_indirect_ref (val, NULL_PTR);
+    return build_indirect_ref (val, NULL);
   return val;
 }
 
diff -rup orig/egcs-CVS20010501/gcc/cp/decl.c egcs-CVS20010501/gcc/cp/decl.c
--- orig/egcs-CVS20010501/gcc/cp/decl.c	Tue May  1 07:30:19 2001
+++ egcs-CVS20010501/gcc/cp/decl.c	Tue May  1 11:44:57 2001
@@ -4683,7 +4683,7 @@ implicitly_declare (functionid)
   /* ISO standard says implicit declarations are in the innermost block.
      So we record the decl in the standard fashion.  */
   pushdecl (decl);
-  rest_of_decl_compilation (decl, NULL_PTR, 0, 0);
+  rest_of_decl_compilation (decl, NULL, 0, 0);
 
   if (warn_implicit
       /* Only one warning per identifier.  */
@@ -6434,7 +6434,7 @@ init_decl_processing ()
   empty_except_spec = build_tree_list (NULL_TREE, NULL_TREE);
 
 #if 0
-  record_builtin_type (RID_MAX, NULL_PTR, string_type_node);
+  record_builtin_type (RID_MAX, NULL, string_type_node);
 #endif
 
   delta_type_node = ptrdiff_type_node;
@@ -6502,10 +6502,10 @@ init_decl_processing ()
     = build_cplus_array_type (vtable_entry_type, NULL_TREE);
   layout_type (vtbl_type_node);
   vtbl_type_node = build_qualified_type (vtbl_type_node, TYPE_QUAL_CONST);
-  record_builtin_type (RID_MAX, NULL_PTR, vtbl_type_node);
+  record_builtin_type (RID_MAX, NULL, vtbl_type_node);
   vtbl_ptr_type_node = build_pointer_type (vtable_entry_type);
   layout_type (vtbl_ptr_type_node);
-  record_builtin_type (RID_MAX, NULL_PTR, vtbl_ptr_type_node);
+  record_builtin_type (RID_MAX, NULL, vtbl_ptr_type_node);
 
   push_namespace (get_identifier ("__cxxabiv1"));
   abi_node = current_namespace;
@@ -8074,7 +8074,7 @@ cp_finish_decl (decl, init, asmspec_tree
 	  && !COMPLETE_TYPE_P (TREE_TYPE (decl)))
 	TYPE_DECL_SUPPRESS_DEBUG (decl) = 1;
 
-      rest_of_decl_compilation (decl, NULL_PTR,
+      rest_of_decl_compilation (decl, NULL,
 				DECL_CONTEXT (decl) == NULL_TREE, at_eof);
       goto finish_end;
     }
@@ -13508,7 +13508,7 @@ start_function (declspecs, declarator, a
 			  19990811);
 
       cp_function_chain->x_current_class_ref
-	= build_indirect_ref (t, NULL_PTR);
+	= build_indirect_ref (t, NULL);
       cp_function_chain->x_current_class_ptr = t;
 
       /* Constructors and destructors need to know whether they're "in
@@ -14248,7 +14248,7 @@ hack_incomplete_structures (type)
 		  && TREE_TYPE (TREE_TYPE (decl)) == type)
 		layout_type (TREE_TYPE (decl));
 	      layout_decl (decl, 0);
-	      rest_of_decl_compilation (decl, NULL_PTR, toplevel, 0);
+	      rest_of_decl_compilation (decl, NULL, toplevel, 0);
 	      if (! toplevel)
 		{
 		  tree cleanup;
diff -rup orig/egcs-CVS20010501/gcc/cp/decl2.c egcs-CVS20010501/gcc/cp/decl2.c
--- orig/egcs-CVS20010501/gcc/cp/decl2.c	Tue May  1 11:19:04 2001
+++ egcs-CVS20010501/gcc/cp/decl2.c	Tue May  1 11:45:21 2001
@@ -2582,7 +2582,7 @@ finish_vtable_vardecl (t, data)
       if (flag_weak)
 	comdat_linkage (vars);
 
-      rest_of_decl_compilation (vars, NULL_PTR, 1, 1);
+      rest_of_decl_compilation (vars, NULL, 1, 1);
 
       if (flag_vtable_gc)
 	output_vtable_inherit (vars);
diff -rup orig/egcs-CVS20010501/gcc/cp/except.c egcs-CVS20010501/gcc/cp/except.c
--- orig/egcs-CVS20010501/gcc/cp/except.c	Fri Apr 27 16:30:10 2001
+++ egcs-CVS20010501/gcc/cp/except.c	Tue May  1 11:45:30 2001
@@ -394,7 +394,7 @@ expand_start_catch_block (decl)
 	  init = build1 (NOP_EXPR, build_pointer_type (type), init);
 	  init = build (MINUS_EXPR, TREE_TYPE (init), init,
 			TYPE_SIZE_UNIT (TREE_TYPE (init)));
-	  init = build_indirect_ref (init, NULL_PTR);
+	  init = build_indirect_ref (init, NULL);
 	  is_java = true;
 	}
       else
@@ -643,7 +643,7 @@ build_throw (exp)
       finish_expr_stmt (tmp);
 
       object = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (exp)), ptr);
-      object = build_indirect_ref (object, NULL_PTR);
+      object = build_indirect_ref (object, NULL);
 
       exp = build_modify_expr (object, INIT_EXPR, exp);
       if (exp == error_mark_node)
diff -rup orig/egcs-CVS20010501/gcc/cp/init.c egcs-CVS20010501/gcc/cp/init.c
--- orig/egcs-CVS20010501/gcc/cp/init.c	Sun Apr 15 22:50:12 2001
+++ egcs-CVS20010501/gcc/cp/init.c	Tue May  1 11:46:05 2001
@@ -750,7 +750,7 @@ emit_base_init (mem_init_list, base_init
 	{
 	  member = convert_pointer_to_real (base_binfo, current_class_ptr);
 	  expand_aggr_init_1 (base_binfo, NULL_TREE,
-			      build_indirect_ref (member, NULL_PTR), init,
+			      build_indirect_ref (member, NULL), init,
 			      LOOKUP_NORMAL);
 	}
 
@@ -880,7 +880,7 @@ expand_virtual_init (binfo, decl)
 
   /* Compute the location of the vtpr.  */
   decl = convert_pointer_to_real (vtype_binfo, decl);
-  vtbl_ptr = build_vfield_ref (build_indirect_ref (decl, NULL_PTR), vtype);
+  vtbl_ptr = build_vfield_ref (build_indirect_ref (decl, NULL), vtype);
   if (vtbl_ptr == error_mark_node)
     return;
 
@@ -925,7 +925,7 @@ expand_aggr_vbase_init_1 (binfo, exp, ad
      tree binfo, exp, addr, init_list;
 {
   tree init = purpose_member (binfo, init_list);
-  tree ref = build_indirect_ref (addr, NULL_PTR);
+  tree ref = build_indirect_ref (addr, NULL);
 
   if (init)
     init = TREE_VALUE (init);
@@ -1593,7 +1593,7 @@ build_member_call (type, name, parmlist)
 	{
 	  tree newtype = build_qualified_type (type, TYPE_QUALS (oldtype));
 	  decl = convert_force (build_pointer_type (newtype), olddecl, 0);
-	  decl = build_indirect_ref (decl, NULL_PTR);
+	  decl = build_indirect_ref (decl, NULL);
 	}
     }
 
@@ -1926,7 +1926,7 @@ resolve_offset_ref (exp)
 	return error_mark_node;
 
       expr = build (COMPONENT_REF, TREE_TYPE (member),
-		    build_indirect_ref (addr, NULL_PTR), member);
+		    build_indirect_ref (addr, NULL), member);
       return convert_from_reference (expr);
     }
 
@@ -2237,7 +2237,7 @@ build_java_class_ref (type)
       DECL_ARTIFICIAL (class_decl) = 1;
       DECL_IGNORED_P (class_decl) = 1;
       pushdecl_top_level (class_decl);
-      make_decl_rtl (class_decl, NULL_PTR);
+      make_decl_rtl (class_decl, NULL);
     }
   return class_decl;
 }
@@ -2464,7 +2464,7 @@ build_new_1 (exp)
 	 elements.  */
       cookie = build (MINUS_EXPR, build_pointer_type (sizetype),
 		      alloc_node, size_in_bytes (sizetype));
-      cookie = build_indirect_ref (cookie, NULL_PTR);
+      cookie = build_indirect_ref (cookie, NULL);
 
       cookie_expr = build (MODIFY_EXPR, void_type_node, cookie, nelts);
       TREE_SIDE_EFFECTS (cookie_expr) = 1;
@@ -2476,7 +2476,7 @@ build_new_1 (exp)
   init_expr = NULL_TREE;
   if (TYPE_NEEDS_CONSTRUCTING (type) || init)
     {
-      init_expr = build_indirect_ref (alloc_node, NULL_PTR);
+      init_expr = build_indirect_ref (alloc_node, NULL);
 
       if (init == void_zero_node)
 	init = build_default_init (full_type);
@@ -3261,7 +3261,7 @@ build_delete (type, addr, auto_delete, f
 	  auto_delete = sfk_complete_destructor;
 	}
 
-      expr = build_dtor_call (build_indirect_ref (addr, NULL_PTR),
+      expr = build_dtor_call (build_indirect_ref (addr, NULL),
 			      auto_delete, flags);
       if (do_delete)
 	expr = build (COMPOUND_EXPR, void_type_node, expr, do_delete);
@@ -3286,7 +3286,7 @@ build_delete (type, addr, auto_delete, f
       int i, n_baseclasses = CLASSTYPE_N_BASECLASSES (type);
       tree base_binfo = n_baseclasses > 0 ? TREE_VEC_ELT (binfos, 0) : NULL_TREE;
       tree exprstmt = NULL_TREE;
-      tree ref = build_indirect_ref (addr, NULL_PTR);
+      tree ref = build_indirect_ref (addr, NULL);
 
       /* Set this again before we call anything, as we might get called
 	 recursively.  */
@@ -3404,7 +3404,7 @@ build_vec_delete (base, maxindex, auto_d
 			   build_pointer_type (sizetype),
 			   base,
 			   TYPE_SIZE_UNIT (sizetype));
-      maxindex = build_indirect_ref (cookie_addr, NULL_PTR);
+      maxindex = build_indirect_ref (cookie_addr, NULL);
     }
   else if (TREE_CODE (type) == ARRAY_TYPE)
     {
diff -rup orig/egcs-CVS20010501/gcc/cp/rtti.c egcs-CVS20010501/gcc/cp/rtti.c
--- orig/egcs-CVS20010501/gcc/cp/rtti.c	Wed Apr  4 00:45:23 2001
+++ egcs-CVS20010501/gcc/cp/rtti.c	Tue May  1 11:46:14 2001
@@ -139,7 +139,7 @@ build_headof (exp)
      the vptr.  */
   index = build_int_2 (-2, -1);
 
-  aref = build_vtbl_ref (build_indirect_ref (exp, NULL_PTR), index);
+  aref = build_vtbl_ref (build_indirect_ref (exp, NULL), index);
 
   if (flag_vtable_thunks)
     offset = aref;
@@ -233,7 +233,7 @@ get_tinfo_decl_dynamic (exp)
 	{
       	  exp = build_unary_op (ADDR_EXPR, exp, 0);
 	  exp = build_headof_sub (exp);
-	  exp = build_indirect_ref (exp, NULL_PTR);
+	  exp = build_indirect_ref (exp, NULL);
 	}
 
       /* The RTTI information is at index -1.  */
diff -rup orig/egcs-CVS20010501/gcc/cp/search.c egcs-CVS20010501/gcc/cp/search.c
--- orig/egcs-CVS20010501/gcc/cp/search.c	Fri Apr 20 07:30:16 2001
+++ egcs-CVS20010501/gcc/cp/search.c	Tue May  1 11:46:25 2001
@@ -2355,7 +2355,7 @@ dfs_init_vbase_pointers (binfo, data)
   while (fields && DECL_NAME (fields) && VBASE_NAME_P (DECL_NAME (fields)))
     {
       tree ref = build (COMPONENT_REF, TREE_TYPE (fields),
-			build_indirect_ref (this_vbase_ptr, NULL_PTR), fields);
+			build_indirect_ref (this_vbase_ptr, NULL), fields);
       tree init;
       tree vbase_type;
       tree vbase_binfo;
@@ -2558,7 +2558,7 @@ expand_upcast_fixups (binfo, addr, orig_
 	      finish_expr_stmt (init);
 	      /* Update the vtable pointers as necessary.  */
 	      ref = build_vfield_ref
-		(build_indirect_ref (addr, NULL_PTR),
+		(build_indirect_ref (addr, NULL),
 		 DECL_CONTEXT (TYPE_VFIELD (BINFO_TYPE (binfo))));
 	      finish_expr_stmt
 		(build_modify_expr (ref, NOP_EXPR, nvtbl));
diff -rup orig/egcs-CVS20010501/gcc/cp/tree.c egcs-CVS20010501/gcc/cp/tree.c
--- orig/egcs-CVS20010501/gcc/cp/tree.c	Fri Apr 20 14:28:31 2001
+++ egcs-CVS20010501/gcc/cp/tree.c	Tue May  1 11:46:33 2001
@@ -2137,7 +2137,7 @@ build_dummy_object (type)
      tree type;
 {
   tree decl = build1 (NOP_EXPR, build_pointer_type (type), void_zero_node);
-  return build_indirect_ref (decl, NULL_PTR);
+  return build_indirect_ref (decl, NULL);
 }
 
 /* We've gotten a reference to a member of TYPE.  Return *this if appropriate,
diff -rup orig/egcs-CVS20010501/gcc/cp/typeck.c egcs-CVS20010501/gcc/cp/typeck.c
--- orig/egcs-CVS20010501/gcc/cp/typeck.c	Fri Apr 13 17:16:42 2001
+++ egcs-CVS20010501/gcc/cp/typeck.c	Tue May  1 11:46:43 2001
@@ -117,7 +117,7 @@ require_complete_type (value)
       my_friendly_assert (TREE_CODE (member) == FIELD_DECL, 305);
       base = convert_pointer_to (basetype, current_class_ptr);
       value = build (COMPONENT_REF, TREE_TYPE (member),
-		     build_indirect_ref (base, NULL_PTR), member);
+		     build_indirect_ref (base, NULL), member);
       return require_complete_type (value);
     }
 
@@ -2245,7 +2245,7 @@ build_component_ref (datum, component, b
 	    }
 	  else
 	    addr = convert_pointer_to (base, addr);
-	  datum = build_indirect_ref (addr, NULL_PTR);
+	  datum = build_indirect_ref (addr, NULL);
 	  if (datum == error_mark_node)
 	    return error_mark_node;
 	}
@@ -2924,7 +2924,7 @@ get_member_function_from_ptrfunc (instan
 	(PLUS_EXPR,
 	 build_pointer_type (build_pointer_type (vtable_entry_type)),
 	 vtbl, cp_convert (ptrdiff_type_node, delta2));
-      vtbl = build_indirect_ref (vtbl, NULL_PTR);
+      vtbl = build_indirect_ref (vtbl, NULL);
       aref = build_array_ref (vtbl, idx);
 
       if (! flag_vtable_thunks)
diff -rup orig/egcs-CVS20010501/gcc/cp/typeck2.c egcs-CVS20010501/gcc/cp/typeck2.c
--- orig/egcs-CVS20010501/gcc/cp/typeck2.c	Tue Apr 24 07:30:21 2001
+++ egcs-CVS20010501/gcc/cp/typeck2.c	Tue May  1 11:46:51 2001
@@ -1063,7 +1063,7 @@ build_x_arrow (datum)
     last_rval = default_conversion (rval);
 
   if (TREE_CODE (TREE_TYPE (last_rval)) == POINTER_TYPE)
-    return build_indirect_ref (last_rval, NULL_PTR);
+    return build_indirect_ref (last_rval, NULL);
 
   if (types_memoized)
     error ("result of `operator->()' yields non-pointer result");
diff -rup orig/egcs-CVS20010501/gcc/f/com.c egcs-CVS20010501/gcc/f/com.c
--- orig/egcs-CVS20010501/gcc/f/com.c	Sun Apr 22 20:17:19 2001
+++ egcs-CVS20010501/gcc/f/com.c	Tue May  1 11:43:04 2001
@@ -13493,7 +13493,7 @@ builtin_function (const char *name, tree
   TREE_PUBLIC (decl) = 1;
   if (library_name)
     SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
-  make_decl_rtl (decl, NULL_PTR);
+  make_decl_rtl (decl, NULL);
   pushdecl (decl);
   DECL_BUILT_IN_CLASS (decl) = class;
   DECL_FUNCTION_CODE (decl) = function_code;
@@ -13871,7 +13871,7 @@ finish_decl (tree decl, tree init, bool 
     }
   else if (TREE_CODE (decl) == TYPE_DECL)
     {
-      rest_of_decl_compilation (decl, NULL_PTR,
+      rest_of_decl_compilation (decl, NULL,
 				DECL_CONTEXT (decl) == 0,
 				0);
     }
@@ -16110,7 +16110,7 @@ ffecom_open_include_ (char *name, ffewhe
     {
       strncpy (fname, (char *) fbeg, flen);
       fname[flen] = 0;
-      f = open_include_file (fname, NULL_PTR);
+      f = open_include_file (fname, NULL);
     }
   else
     {
diff -rup orig/egcs-CVS20010501/gcc/java/decl.c egcs-CVS20010501/gcc/java/decl.c
--- orig/egcs-CVS20010501/gcc/java/decl.c	Wed Apr 25 16:00:51 2001
+++ egcs-CVS20010501/gcc/java/decl.c	Tue May  1 11:40:48 2001
@@ -378,7 +378,7 @@ builtin_function (name, type, function_c
   TREE_PUBLIC (decl) = 1;
   if (library_name)
     SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
-  make_decl_rtl (decl, NULL_PTR);
+  make_decl_rtl (decl, NULL);
   pushdecl (decl);
   DECL_BUILT_IN_CLASS (decl) = class;
   DECL_FUNCTION_CODE (decl) = function_code;
@@ -717,37 +717,34 @@ init_decl_processing ()
 		 tree_cons (NULL_TREE, int_type_node, endlink));
   alloc_object_node = builtin_function ("_Jv_AllocObject",
 					build_function_type (ptr_type_node, t),
-					0, NOT_BUILT_IN, NULL_PTR);
+					0, NOT_BUILT_IN, NULL);
   DECL_IS_MALLOC (alloc_object_node) = 1;
 
   t = tree_cons (NULL_TREE, ptr_type_node, endlink);
   soft_initclass_node = builtin_function ("_Jv_InitClass",
 					  build_function_type (void_type_node,
 							       t),
-					  0, NOT_BUILT_IN,
-					  NULL_PTR);
+					  0, NOT_BUILT_IN, NULL);
 
   throw_node = builtin_function ("_Jv_Throw",
 				 build_function_type (ptr_type_node, t),
-				 0, NOT_BUILT_IN, NULL_PTR);
+				 0, NOT_BUILT_IN, NULL);
   /* Mark throw_nodes as `noreturn' functions with side effects.  */
   TREE_THIS_VOLATILE (throw_node) = 1;
   TREE_SIDE_EFFECTS (throw_node) = 1;
 
   t = build_function_type (int_type_node, endlink);
   soft_monitorenter_node 
-    = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
-			NULL_PTR);
+    = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN, NULL);
   soft_monitorexit_node 
-    = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN,
-			NULL_PTR);
+    = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN, NULL);
   
   t = tree_cons (NULL_TREE, int_type_node, 
 		 tree_cons (NULL_TREE, int_type_node, endlink));
   soft_newarray_node
       = builtin_function ("_Jv_NewPrimArray",
 			  build_function_type(ptr_type_node, t),
-			  0, NOT_BUILT_IN, NULL_PTR);
+			  0, NOT_BUILT_IN, NULL);
   DECL_IS_MALLOC (soft_newarray_node) = 1;
 
   t = tree_cons (NULL_TREE, int_type_node,
@@ -756,7 +753,7 @@ init_decl_processing ()
   soft_anewarray_node
       = builtin_function ("_Jv_NewObjectArray",
 			  build_function_type (ptr_type_node, t),
-			  0, NOT_BUILT_IN, NULL_PTR);
+			  0, NOT_BUILT_IN, NULL);
   DECL_IS_MALLOC (soft_anewarray_node) = 1;
 
   t = tree_cons (NULL_TREE, ptr_type_node,
@@ -764,14 +761,14 @@ init_decl_processing ()
   soft_multianewarray_node
       = builtin_function ("_Jv_NewMultiArray",
 			  build_function_type (ptr_type_node, t),
-			  0, NOT_BUILT_IN, NULL_PTR);
+			  0, NOT_BUILT_IN, NULL);
   DECL_IS_MALLOC (soft_multianewarray_node) = 1;
 
   t = build_function_type (void_type_node, 
 			   tree_cons (NULL_TREE, int_type_node, endlink));
   soft_badarrayindex_node
       = builtin_function ("_Jv_ThrowBadArrayIndex", t, 
-			  0, NOT_BUILT_IN, NULL_PTR);
+			  0, NOT_BUILT_IN, NULL);
   /* Mark soft_badarrayindex_node as a `noreturn' function with side
      effects.  */
   TREE_THIS_VOLATILE (soft_badarrayindex_node) = 1;
@@ -780,7 +777,7 @@ init_decl_processing ()
   soft_nullpointer_node
     = builtin_function ("_Jv_ThrowNullPointerException",
 			build_function_type (void_type_node, endlink),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
   /* Mark soft_nullpointer_node as a `noreturn' function with side
      effects.  */
   TREE_THIS_VOLATILE (soft_nullpointer_node) = 1;
@@ -791,26 +788,26 @@ init_decl_processing ()
   soft_checkcast_node
     = builtin_function ("_Jv_CheckCast",
 			build_function_type (ptr_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
   t = tree_cons (NULL_TREE, object_ptr_type_node,
 		 tree_cons (NULL_TREE, class_ptr_type, endlink));
   soft_instanceof_node
     = builtin_function ("_Jv_IsInstanceOf",
 			build_function_type (boolean_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
   t = tree_cons (NULL_TREE, object_ptr_type_node,
 		 tree_cons (NULL_TREE, object_ptr_type_node, endlink));
   soft_checkarraystore_node
     = builtin_function ("_Jv_CheckArrayStore",
 			build_function_type (void_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
   t = tree_cons (NULL_TREE, ptr_type_node,
 		 tree_cons (NULL_TREE, ptr_type_node,
 			    tree_cons (NULL_TREE, int_type_node, endlink)));
   soft_lookupinterfacemethod_node 
     = builtin_function ("_Jv_LookupInterfaceMethodIdx",
 			build_function_type (ptr_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
 
   t = tree_cons (NULL_TREE, object_ptr_type_node,
 		 tree_cons (NULL_TREE, ptr_type_node,
@@ -818,16 +815,16 @@ init_decl_processing ()
   soft_lookupjnimethod_node
     = builtin_function ("_Jv_LookupJNIMethod",
 			build_function_type (ptr_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
   t = tree_cons (NULL_TREE, ptr_type_node, endlink);
   soft_getjnienvnewframe_node
     = builtin_function ("_Jv_GetJNIEnvNewFrame",
 			build_function_type (ptr_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
   soft_jnipopsystemframe_node
     = builtin_function ("_Jv_JNI_PopSystemFrame",
 			build_function_type (ptr_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
 
   t = tree_cons (NULL_TREE, double_type_node,
 		 tree_cons (NULL_TREE, double_type_node, endlink));
@@ -848,22 +845,22 @@ init_decl_processing ()
   soft_idiv_node
     = builtin_function ("_Jv_divI",
 			build_function_type (int_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
 
   soft_irem_node
     = builtin_function ("_Jv_remI",
 			build_function_type (int_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
 
   soft_ldiv_node
     = builtin_function ("_Jv_divJ",
 			build_function_type (long_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
 
   soft_lrem_node
     = builtin_function ("_Jv_remJ",
 			build_function_type (long_type_node, t),
-			0, NOT_BUILT_IN, NULL_PTR);
+			0, NOT_BUILT_IN, NULL);
 
   /* Initialize variables for except.c.  */
   eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
diff -rup orig/egcs-CVS20010501/gcc/java/jcf-write.c egcs-CVS20010501/gcc/java/jcf-write.c
--- orig/egcs-CVS20010501/gcc/java/jcf-write.c	Thu Apr 26 16:30:38 2001
+++ egcs-CVS20010501/gcc/java/jcf-write.c	Tue May  1 11:41:53 2001
@@ -1406,7 +1406,7 @@ generate_bytecode_return (exp, state)
   if (returns_void)
     {
       op = OPCODE_return;
-      call_cleanups (NULL_PTR, state);
+      call_cleanups (NULL, state);
     }
   else
     {
@@ -1420,7 +1420,7 @@ generate_bytecode_return (exp, state)
 	      localvar_alloc (state->return_value_decl, state);
 	    }
 	  emit_store (state->return_value_decl, state);
-	  call_cleanups (NULL_PTR, state);
+	  call_cleanups (NULL, state);
 	  emit_load (state->return_value_decl, state);
 	  /* If we call localvar_free (state->return_value_decl, state),
 	     then we risk the save decl erroneously re-used in the


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