natMethod.cc: Don't include alloca.h.
authorAndreas Tobler <a.tobler@schweiz.ch>
Tue, 8 Jan 2002 20:00:50 +0000 (21:00 +0100)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 8 Jan 2002 20:00:50 +0000 (20:00 +0000)
2002-01-07  Andreas Tobler <a.tobler@schweiz.ch>

* java/lang/reflect/natMethod.cc: Don't include alloca.h.
(_Jv_CallAnyMethodA): Convert alloca to __builtin_alloca.

From-SVN: r48656

libjava/ChangeLog
libjava/java/lang/reflect/natMethod.cc

index c8a957e9bcc3d9393c573ac7176e30512257acf0..3e7c1ce83340c02f0c6085bd2af7f6613e6e9c53 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-07  Andreas Tobler <a.tobler@schweiz.ch>
+
+       * java/lang/reflect/natMethod.cc: Don't include alloca.h.
+       (_Jv_CallAnyMethodA): Convert alloca to __builtin_alloca.
+
 2002-01-08  Chris Sears  <cbsears_sf@yahoo.com>
 
        * interpret.cc (ARRAYBOUNDSCHECK): New macro.
index 26c270e3e0332b9815bee6ea8150fba54c437f8e..1fab48ab311d2bac5cbb14f07950044131f6e1ff 100644 (file)
@@ -1,6 +1,6 @@
 // natMethod.cc - Native code for Method class.
 
-/* Copyright (C) 1998, 1999, 2000, 2001  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2001 , 2002 Free Software Foundation
 
    This file is part of libgcj.
 
@@ -10,10 +10,6 @@ details.  */
 
 #include <config.h>
 
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
 #include <gcj/cni.h>
 #include <jvm.h>
 #include <jni.h>
@@ -348,8 +344,8 @@ _Jv_CallAnyMethodA (jobject obj,
     rtype = &ffi_type_void;
   else
     rtype = get_ffi_type (return_type);
-  ffi_type **argtypes = (ffi_type **) alloca (param_count
-                                             * sizeof (ffi_type *));
+  ffi_type **argtypes = (ffi_type **) __builtin_alloca (param_count
+                                                       * sizeof (ffi_type *));
 
   jclass *paramelts = elements (parameter_types);
 
@@ -392,8 +388,8 @@ _Jv_CallAnyMethodA (jobject obj,
       // FIXME: throw some kind of VirtualMachineError here.
     }
 
-  char *p = (char *) alloca (size);
-  void **values = (void **) alloca (param_count * sizeof (void *));
+  char *p = (char *) __builtin_alloca (size);
+  void **values = (void **) __builtin_alloca (param_count * sizeof (void *));
 
   i = 0;
   if (needs_this)