+2001-02-15 Anthony Green <green@redhat.com>
+
+ * defineclass.cc: Don't include alloca.h.
+ (prepare_pool_entry): Convert alloca to __builtin_alloca.
+ * interpret.cc (run_normal): Ditto.
+ (continue1): Ditto.
+ * java/lang/natDouble.cc (parseDouble): Ditto.
+
2001-02-15 Bryce McKinlay <bryce@albatross.co.nz>
* java/util/TreeSet.java (clone): Call TreeMap.clone(), not
#ifdef INTERPRETER
#include <stdlib.h>
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
#include <java-cpool.h>
#include <gcj/cni.h>
// order to accomondate gcj's internal representation.
int len = get2u (this_data);
- char *buffer = (char*) alloca (len);
+ char *buffer = (char*) __builtin_alloca (len);
char *s = ((char*) this_data)+2;
/* FIXME: avoid using a buffer here */
#ifdef INTERPRETER
#include <stdlib.h>
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
static _Jv_Utf8Const *init_name = _Jv_makeUtf8Const ("<init>", 6);
// "run" ro be inlined. Otherwise gcc will ignore the inline directive.
int storage_size = _this->max_stack+_this->max_locals;
_Jv_InterpMethodInvocation* inv = (_Jv_InterpMethodInvocation*)
- alloca (sizeof (_Jv_InterpMethodInvocation)
- + storage_size * sizeof (_Jv_word));
+ __builtin_alloca (sizeof (_Jv_InterpMethodInvocation)
+ + storage_size * sizeof (_Jv_word));
jobject ex = _this->run (cif, ret, args, inv);
if (ex != 0) _Jv_Throw (ex);
int storage_size = _this->max_stack+_this->max_locals;
_Jv_InterpMethodInvocation* inv = (_Jv_InterpMethodInvocation*)
- alloca (sizeof (_Jv_InterpMethodInvocation)
- + storage_size * sizeof (_Jv_word));
+ __builtin_alloca (sizeof (_Jv_InterpMethodInvocation)
+ + storage_size * sizeof (_Jv_word));
_Jv_MonitorEnter (rcv);
jobject ex = _this->run (cif, ret, args, inv);
int storage_size = _this->max_stack+_this->max_locals;
_Jv_InterpMethodInvocation* inv = (_Jv_InterpMethodInvocation*)
- alloca (sizeof (_Jv_InterpMethodInvocation)
- + storage_size * sizeof (_Jv_word));
+ __builtin_alloca (sizeof (_Jv_InterpMethodInvocation)
+ + storage_size * sizeof (_Jv_word));
_Jv_MonitorEnter (sync);
jobject ex = _this->run (cif, ret, args, inv);
jclass type
= (_Jv_ResolvePoolEntry (defining_class, kind_index)).clazz;
_Jv_InitClass (type);
- jint *sizes = (jint*) alloca (sizeof (jint)*dim);
+ jint *sizes = (jint*) __builtin_alloca (sizeof (jint)*dim);
for (int i = dim - 1; i >= 0; i--)
{
#include <config.h>
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
#include <stdlib.h>
#include <gcj/cni.h>
int length = str->length();
// Note that UTF can expand 3x.
-#ifdef HAVE_ALLOCA
- char *data = (char *) alloca (3 * length + 1);
-#else
-#error --- need an alternate implementation here ---
-#endif
+ char *data = (char *) __builtin_alloca (3 * length + 1);
data[_Jv_GetStringUTFRegion (str, 0, length, data)] = 0;