Merged with 8445:be1a0bcbb96d.
authorPeter Molnar <pm@complang.tuwien.ac.at>
Fri, 11 Jul 2008 09:04:48 +0000 (11:04 +0200)
committerPeter Molnar <pm@complang.tuwien.ac.at>
Fri, 11 Jul 2008 09:04:48 +0000 (11:04 +0200)
15 files changed:
src/native/vm/gnuclasspath/Makefile.am
src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.c [deleted file]
src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.cpp [new file with mode: 0644]
src/vm/builtin.c
src/vm/jit/alpha/md-trap.h
src/vm/jit/arm/md-trap.h
src/vm/jit/i386/md-trap.h
src/vm/jit/m68k/md-trap.h
src/vm/jit/mips/md-trap.h
src/vm/jit/powerpc/md-trap.h
src/vm/jit/powerpc64/md-trap.h
src/vm/jit/s390/md-trap.h
src/vm/jit/sparc64/md-trap.h
src/vm/jit/x86_64/md-trap.h
src/vmcore/method.h

index 51aff50b09d096603ab316f04827066dd61163ac..6eb323bf21305429ad1f60244cfb0186d739c606 100644 (file)
@@ -55,7 +55,7 @@ libnativevmcore_la_SOURCES = \
        java_lang_VMThread.c \
        java_lang_VMThrowable.c \
        java_lang_management_VMManagementFactory.c \
-       java_lang_reflect_VMConstructor.c \
+       java_lang_reflect_VMConstructor.cpp \
        java_lang_reflect_VMField.cpp \
        java_lang_reflect_VMMethod.c \
        java_lang_reflect_VMProxy.c \
diff --git a/src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.c b/src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.c
deleted file mode 100644 (file)
index a352629..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-/* src/native/vm/gnu/java_lang_reflect_VMConstructor.c
-
-   Copyright (C) 1996-2005, 2006, 2007, 2008
-   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
-
-   This file is part of CACAO.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-*/
-
-
-#include "config.h"
-
-#include <assert.h>
-#include <stdlib.h>
-
-#if defined(ENABLE_ANNOTATIONS)
-#include "vm/vm.h"
-#include "vm/exceptions.h"
-#endif
-
-#include "native/jni.h"
-#include "native/llni.h"
-#include "native/native.h"
-
-#include "native/include/java_lang_Class.h"
-#include "native/include/java_lang_Object.h"
-#include "native/include/java_lang_String.h"
-
-#if defined(ENABLE_ANNOTATIONS)
-# include "native/include/java_util_Map.h"
-# include "native/include/sun_reflect_ConstantPool.h"
-#endif
-
-#include "native/include/java_lang_reflect_Constructor.h"
-#include "native/include/java_lang_reflect_VMConstructor.h"
-
-#include "native/vm/reflect.h"
-
-#include "vm/stringlocal.h"
-
-#include "vmcore/utf8.h"
-
-
-/* native methods implemented by this file ************************************/
-
-static JNINativeMethod methods[] = {
-       { "getModifiersInternal",    "()I",                                                       (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_getModifiersInternal    },
-       { "getParameterTypes",       "()[Ljava/lang/Class;",                                      (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_getParameterTypes       },
-       { "getExceptionTypes",       "()[Ljava/lang/Class;",                                      (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_getExceptionTypes       },
-       { "construct",               "([Ljava/lang/Object;)Ljava/lang/Object;",                   (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_construct               },
-       { "getSignature",            "()Ljava/lang/String;",                                      (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_getSignature            },
-#if defined(ENABLE_ANNOTATIONS)
-       { "declaredAnnotations",     "()Ljava/util/Map;",                                         (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_declaredAnnotations     },
-       { "getParameterAnnotations", "()[[Ljava/lang/annotation/Annotation;",                     (void *) (intptr_t) &Java_java_lang_reflect_VMConstructor_getParameterAnnotations },
-#endif
-};
-
-
-/* _Jv_java_lang_reflect_VMConstructor_init ************************************
-
-   Register native functions.
-
-*******************************************************************************/
-
-void _Jv_java_lang_reflect_VMConstructor_init(void)
-{
-       utf *u;
-
-       u = utf_new_char("java/lang/reflect/VMConstructor");
-
-       native_method_register(u, methods, NATIVE_METHODS_COUNT);
-}
-
-
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    getModifiersInternal
- * Signature: ()I
- */
-JNIEXPORT int32_t JNICALL Java_java_lang_reflect_VMConstructor_getModifiersInternal(JNIEnv *env, java_lang_reflect_VMConstructor *this)
-{
-       classinfo  *c;
-       methodinfo *m;
-       int32_t     slot;
-
-       LLNI_field_get_cls(this, clazz, c);
-       LLNI_field_get_val(this, slot,  slot);
-
-       m = &(c->methods[slot]);
-
-       return m->flags;
-}
-
-
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    getParameterTypes
- * Signature: ()[Ljava/lang/Class;
- */
-JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_VMConstructor_getParameterTypes(JNIEnv *env, java_lang_reflect_VMConstructor *this)
-{
-       classinfo  *c;
-       methodinfo *m;
-       int32_t     slot;
-
-       LLNI_field_get_cls(this, clazz, c);
-       LLNI_field_get_val(this, slot,  slot);
-
-       m = &(c->methods[slot]);
-
-       return method_get_parametertypearray(m);
-}
-
-
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    getExceptionTypes
- * Signature: ()[Ljava/lang/Class;
- */
-JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_VMConstructor_getExceptionTypes(JNIEnv *env, java_lang_reflect_VMConstructor *this)
-{
-       classinfo  *c;
-       methodinfo *m;
-       int32_t     slot;
-
-       LLNI_field_get_cls(this, clazz, c);
-       LLNI_field_get_val(this, slot,  slot);
-
-       m = &(c->methods[slot]);
-
-       return method_get_exceptionarray(m);
-}
-
-
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    construct
- * Signature: ([Ljava/lang/Object;Ljava/lang/Class;I)Ljava/lang/Object;
- */
-JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_VMConstructor_construct(JNIEnv *env, java_lang_reflect_VMConstructor *this, java_handle_objectarray_t *args)
-{
-       classinfo                     *c;
-       int32_t                        slot;
-       java_lang_reflect_Constructor *rc;
-       int32_t                        override;
-       methodinfo                    *m;
-       java_handle_t                 *o;
-
-       LLNI_field_get_cls(this, clazz, c);
-       LLNI_field_get_val(this, slot,  slot);
-
-       LLNI_field_get_ref(this, cons,  rc);
-       LLNI_field_get_val(rc,   flag,  override);
-
-       m = &(c->methods[slot]);
-
-       o = reflect_constructor_newinstance(m, args, override);
-
-       return (java_lang_Object *) o;
-}
-
-
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    getSignature
- * Signature: ()Ljava/lang/String;
- */
-JNIEXPORT java_lang_String* JNICALL Java_java_lang_reflect_VMConstructor_getSignature(JNIEnv *env, java_lang_reflect_VMConstructor *this)
-{
-       classinfo     *c;
-       methodinfo    *m;
-       java_handle_t *o;
-       int32_t        slot;
-
-       LLNI_field_get_cls(this, clazz, c);
-       LLNI_field_get_val(this, slot,  slot);
-
-       m = &(c->methods[slot]);
-
-       if (m->signature == NULL)
-               return NULL;
-
-       o = javastring_new(m->signature);
-
-       /* In error case o is NULL. */
-
-       return (java_lang_String *) o;
-}
-
-
-#if defined(ENABLE_ANNOTATIONS)
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    declaredAnnotations
- * Signature: ()Ljava/util/Map;
- *
- * Parses the annotations (if they aren't parsed yet) and stores them into
- * the declaredAnnotations map and return this map.
- */
-JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_VMConstructor_declaredAnnotations(JNIEnv *env, java_lang_reflect_VMConstructor *this)
-{
-       java_util_Map           *declaredAnnotations = NULL; /* parsed annotations                                */
-       java_handle_bytearray_t *annotations         = NULL; /* unparsed annotations                              */
-       java_lang_Class         *declaringClass      = NULL; /* the constant pool of this class is used           */
-       classinfo               *referer             = NULL; /* class, which calles the annotation parser         */
-                                                            /* (for the parameter 'referer' of vm_call_method()) */
-
-       LLNI_field_get_ref(this, declaredAnnotations, declaredAnnotations);
-
-       /* are the annotations parsed yet? */
-       if (declaredAnnotations == NULL) {
-               LLNI_field_get_ref(this, annotations, annotations);
-               LLNI_field_get_ref(this, clazz, declaringClass);
-               LLNI_class_get(this, referer);
-
-               declaredAnnotations = reflect_get_declaredannotations(annotations, (classinfo*) declaringClass, referer);
-
-               LLNI_field_set_ref(this, declaredAnnotations, declaredAnnotations);
-       }
-
-       return declaredAnnotations;
-}
-
-
-/*
- * Class:     java/lang/reflect/VMConstructor
- * Method:    getParameterAnnotations
- * Signature: ()[[Ljava/lang/annotation/Annotation;
- *
- * Parses the parameter annotations and returns them in an 2 dimensional array.
- */
-JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_VMConstructor_getParameterAnnotations(JNIEnv *env, java_lang_reflect_VMConstructor *this)
-{
-       java_handle_bytearray_t *parameterAnnotations = NULL; /* unparsed parameter annotations                    */
-       int32_t                  slot                 = -1;   /* slot of the method                                */
-       java_lang_Class         *declaringClass       = NULL; /* the constant pool of this class is used           */
-       classinfo               *referer              = NULL; /* class, which calles the annotation parser         */
-                                                             /* (for the parameter 'referer' of vm_call_method()) */
-
-       LLNI_field_get_ref(this, parameterAnnotations, parameterAnnotations);
-       LLNI_field_get_val(this, slot, slot);
-       LLNI_field_get_ref(this, clazz, declaringClass);
-       LLNI_class_get(this, referer);
-
-       return reflect_get_parameterannotations((java_handle_t*)parameterAnnotations, slot, (classinfo*) declaringClass, referer);
-}
-#endif
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- */
diff --git a/src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.cpp b/src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.cpp
new file mode 100644 (file)
index 0000000..d0ca944
--- /dev/null
@@ -0,0 +1,286 @@
+/* src/native/vm/gnuclasspath/java_lang_reflect_VMConstructor.cpp
+
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <assert.h>
+#include <stdlib.h>
+
+#if defined(ENABLE_ANNOTATIONS)
+#include "vm/vm.h"
+#include "vm/exceptions.h"
+#endif
+
+#include "native/jni.h"
+#include "native/llni.h"
+#include "native/native.h"
+
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_String.h"
+
+#if defined(ENABLE_ANNOTATIONS)
+# include "native/include/java_util_Map.h"
+# include "native/include/sun_reflect_ConstantPool.h"
+#endif
+
+#include "native/include/java_lang_reflect_Constructor.h"
+// FIXME
+extern "C" {
+#include "native/include/java_lang_reflect_VMConstructor.h"
+}
+
+#include "native/vm/reflect.h"
+
+#include "vm/stringlocal.h"
+
+#include "vmcore/utf8.h"
+
+
+/* native methods implemented by this file ************************************/
+
+static JNINativeMethod methods[] = {
+       { (char*) "getModifiersInternal",    (char*) "()I",                                     (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_getModifiersInternal    },
+       { (char*) "getParameterTypes",       (char*) "()[Ljava/lang/Class;",                    (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_getParameterTypes       },
+       { (char*) "getExceptionTypes",       (char*) "()[Ljava/lang/Class;",                    (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_getExceptionTypes       },
+       { (char*) "construct",               (char*) "([Ljava/lang/Object;)Ljava/lang/Object;", (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_construct               },
+       { (char*) "getSignature",            (char*) "()Ljava/lang/String;",                    (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_getSignature            },
+#if defined(ENABLE_ANNOTATIONS)
+       { (char*) "declaredAnnotations",     (char*) "()Ljava/util/Map;",                       (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_declaredAnnotations     },
+       { (char*) "getParameterAnnotations", (char*) "()[[Ljava/lang/annotation/Annotation;",   (void*) (uintptr_t) &Java_java_lang_reflect_VMConstructor_getParameterAnnotations },
+#endif
+};
+
+
+/* _Jv_java_lang_reflect_VMConstructor_init ************************************
+
+   Register native functions.
+
+*******************************************************************************/
+
+extern "C" {
+void _Jv_java_lang_reflect_VMConstructor_init(void)
+{
+       utf *u;
+
+       u = utf_new_char("java/lang/reflect/VMConstructor");
+
+       native_method_register(u, methods, NATIVE_METHODS_COUNT);
+}
+}
+
+
+// Native functions are exported as C functions.
+extern "C" {
+
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    getModifiersInternal
+ * Signature: ()I
+ */
+JNIEXPORT int32_t JNICALL Java_java_lang_reflect_VMConstructor_getModifiersInternal(JNIEnv *env, java_lang_reflect_VMConstructor *_this)
+{
+       classinfo  *c;
+       methodinfo *m;
+       int32_t     slot;
+
+       LLNI_field_get_cls(_this, clazz, c);
+       LLNI_field_get_val(_this, slot,  slot);
+
+       m = &(c->methods[slot]);
+
+       return m->flags;
+}
+
+
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    getParameterTypes
+ * Signature: ()[Ljava/lang/Class;
+ */
+JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_VMConstructor_getParameterTypes(JNIEnv *env, java_lang_reflect_VMConstructor *_this)
+{
+       classinfo  *c;
+       methodinfo *m;
+       int32_t     slot;
+
+       LLNI_field_get_cls(_this, clazz, c);
+       LLNI_field_get_val(_this, slot,  slot);
+
+       m = &(c->methods[slot]);
+
+       return method_get_parametertypearray(m);
+}
+
+
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    getExceptionTypes
+ * Signature: ()[Ljava/lang/Class;
+ */
+JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_VMConstructor_getExceptionTypes(JNIEnv *env, java_lang_reflect_VMConstructor *_this)
+{
+       classinfo  *c;
+       methodinfo *m;
+       int32_t     slot;
+
+       LLNI_field_get_cls(_this, clazz, c);
+       LLNI_field_get_val(_this, slot,  slot);
+
+       m = &(c->methods[slot]);
+
+       return method_get_exceptionarray(m);
+}
+
+
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    construct
+ * Signature: ([Ljava/lang/Object;Ljava/lang/Class;I)Ljava/lang/Object;
+ */
+JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_VMConstructor_construct(JNIEnv *env, java_lang_reflect_VMConstructor *_this, java_handle_objectarray_t *args)
+{
+       classinfo                     *c;
+       int32_t                        slot;
+       java_lang_reflect_Constructor *rc;
+       int32_t                        override;
+       methodinfo                    *m;
+       java_handle_t                 *o;
+
+       LLNI_field_get_cls(_this, clazz, c);
+       LLNI_field_get_val(_this, slot,  slot);
+
+       LLNI_field_get_ref(_this, cons,  rc);
+       LLNI_field_get_val(rc,   flag,  override);
+
+       m = &(c->methods[slot]);
+
+       o = reflect_constructor_newinstance(m, args, override);
+
+       return (java_lang_Object *) o;
+}
+
+
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    getSignature
+ * Signature: ()Ljava/lang/String;
+ */
+JNIEXPORT java_lang_String* JNICALL Java_java_lang_reflect_VMConstructor_getSignature(JNIEnv *env, java_lang_reflect_VMConstructor *_this)
+{
+       classinfo     *c;
+       methodinfo    *m;
+       java_handle_t *o;
+       int32_t        slot;
+
+       LLNI_field_get_cls(_this, clazz, c);
+       LLNI_field_get_val(_this, slot,  slot);
+
+       m = &(c->methods[slot]);
+
+       if (m->signature == NULL)
+               return NULL;
+
+       o = javastring_new(m->signature);
+
+       /* In error case o is NULL. */
+
+       return (java_lang_String *) o;
+}
+
+
+#if defined(ENABLE_ANNOTATIONS)
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    declaredAnnotations
+ * Signature: ()Ljava/util/Map;
+ *
+ * Parses the annotations (if they aren't parsed yet) and stores them into
+ * the declaredAnnotations map and return this map.
+ */
+JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_VMConstructor_declaredAnnotations(JNIEnv *env, java_lang_reflect_VMConstructor *_this)
+{
+       java_util_Map           *declaredAnnotations = NULL; /* parsed annotations                                */
+       java_handle_bytearray_t *annotations         = NULL; /* unparsed annotations                              */
+       java_lang_Class         *declaringClass      = NULL; /* the constant pool of this class is used           */
+       classinfo               *referer             = NULL; /* class, which calles the annotation parser         */
+                                                            /* (for the parameter 'referer' of vm_call_method()) */
+
+       LLNI_field_get_ref(_this, declaredAnnotations, declaredAnnotations);
+
+       /* are the annotations parsed yet? */
+       if (declaredAnnotations == NULL) {
+               LLNI_field_get_ref(_this, annotations, annotations);
+               LLNI_field_get_ref(_this, clazz, declaringClass);
+               LLNI_class_get(_this, referer);
+
+               declaredAnnotations = reflect_get_declaredannotations(annotations, (classinfo*) declaringClass, referer);
+
+               LLNI_field_set_ref(_this, declaredAnnotations, declaredAnnotations);
+       }
+
+       return declaredAnnotations;
+}
+
+
+/*
+ * Class:     java/lang/reflect/VMConstructor
+ * Method:    getParameterAnnotations
+ * Signature: ()[[Ljava/lang/annotation/Annotation;
+ *
+ * Parses the parameter annotations and returns them in an 2 dimensional array.
+ */
+JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_VMConstructor_getParameterAnnotations(JNIEnv *env, java_lang_reflect_VMConstructor *_this)
+{
+       java_handle_bytearray_t *parameterAnnotations = NULL; /* unparsed parameter annotations                    */
+       int32_t                  slot                 = -1;   /* slot of the method                                */
+       java_lang_Class         *declaringClass       = NULL; /* the constant pool of this class is used           */
+       classinfo               *referer              = NULL; /* class, which calles the annotation parser         */
+                                                             /* (for the parameter 'referer' of vm_call_method()) */
+
+       LLNI_field_get_ref(_this, parameterAnnotations, parameterAnnotations);
+       LLNI_field_get_val(_this, slot, slot);
+       LLNI_field_get_ref(_this, clazz, declaringClass);
+       LLNI_class_get(_this, referer);
+
+       return reflect_get_parameterannotations((java_handle_t*)parameterAnnotations, slot, (classinfo*) declaringClass, referer);
+}
+#endif
+
+} // extern "C"
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
index 377bad8830fd3370390200d55b26348f91e13fd7..51ef83799c3d045e67d8c8773d6b3ff845d98cc9 100644 (file)
@@ -915,12 +915,12 @@ java_handle_t *builtin_escape_reason_new(classinfo *c) {
 java_handle_t *builtin_tlh_new(classinfo *c)
 {
        java_handle_t *o;
-#if defined(ENABLE_RT_TIMING)
+# if defined(ENABLE_RT_TIMING)
        struct timespec time_start, time_end;
-#endif
-#if defined(ENABLE_CYCLES_STATS)
+# endif
+# if defined(ENABLE_CYCLES_STATS)
        u8 cycles_start, cycles_end;
-#endif
+# endif
 
        RT_TIMING_GET_TIME(time_start);
        CYCLES_STATS_GET(cycles_start);
@@ -943,10 +943,10 @@ java_handle_t *builtin_tlh_new(classinfo *c)
                        return NULL;
 
        if (!(c->state & CLASS_INITIALIZED)) {
-#if !defined(NDEBUG)
+# if !defined(NDEBUG)
                if (initverbose)
                        log_message_class("Initialize class (from builtin_new): ", c);
-#endif
+# endif
 
                if (!initialize_class(c))
                        return NULL;
@@ -965,17 +965,17 @@ java_handle_t *builtin_tlh_new(classinfo *c)
        if (!o)
                return NULL;
 
-#if !defined(ENABLE_GC_CACAO) && defined(ENABLE_HANDLES)
+# if !defined(ENABLE_GC_CACAO) && defined(ENABLE_HANDLES)
        /* XXX this is only a dirty hack to make Boehm work with handles */
 
        o = LLNI_WRAP((java_object_t *) o);
-#endif
+# endif
 
        LLNI_vftbl_direct(o) = c->vftbl;
 
-#if defined(ENABLE_THREADS)
+# if defined(ENABLE_THREADS)
        lock_init_object_lock(LLNI_DIRECT(o));
-#endif
+# endif
 
        CYCLES_STATS_GET(cycles_end);
        RT_TIMING_GET_TIME(time_end);
@@ -986,8 +986,9 @@ java_handle_t *builtin_tlh_new(classinfo *c)
 */
 
        return o;
-#endif
 }
+#endif
+
 
 /* builtin_java_new ************************************************************
 
index c932579dc7bc09ef7ca91bae707d391ab2622ca5..e6947d80eee0c47a352524fd3bf6fda6757ab60a 100644 (file)
@@ -58,6 +58,7 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
index 7992441b2e9be6a00aa414c8279b6f13c212e267..c94a8f73c553e4a6a0826b429c13d6e9a6ba4113 100644 (file)
@@ -50,7 +50,8 @@ enum {
        TRAP_ClassCastException             = 5,
        TRAP_CHECK_EXCEPTION                = 6,
        TRAP_PATCHER                        = 7,
-       TRAP_COMPILER                       = 8
+       TRAP_COMPILER                       = 8,
+       TRAP_COUNTDOWN                      = 9
 };
 
 #endif /* _MD_TRAP_H */
index 3d30a6fc89363658e8b893bd05c74ab39f28ccd1..52e6a0067ce0d74777e664f73cfc85da4c757e65 100644 (file)
@@ -1,4 +1,4 @@
-/* src/vm/jit/x86_64/md-trap.h - i386 hardware traps
+/* src/vm/jit/i386/md-trap.h - i386 hardware traps
 
    Copyright (C) 2008
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
index 69a15a3158c8ddbdc3a9464b02d6f8c5cd224c35..0e5fcca3c25b1338292dbc4af522d360a1460579 100644 (file)
@@ -48,7 +48,8 @@ enum {
        TRAP_ClassCastException             = 5,
        TRAP_CHECK_EXCEPTION                = 6,
        TRAP_PATCHER                        = 7,
-       TRAP_COMPILER                       = 8
+       TRAP_COMPILER                       = 8,
+       TRAP_COUNTDOWN                      = 9
 };
 
 #endif /* _MD_TRAP_H */
index 9fca702ef11d8d14dcdb5171c9eb62a23a62fa14..dbbee3249abe6a67ee770a66b72ee0bea901ca65 100644 (file)
@@ -58,6 +58,7 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
index 3e552352653de800010fc569fc75843638fe2f90..fc9807d081ee0e4e60e4495c940ca469694082dd 100644 (file)
@@ -58,6 +58,7 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
index 7e8c5b6fdc830e60c792585bfe4bd5cc8dfed3bf..dad8d1f7dfcab9b9cfc2d0b56e136edee12b4e1f 100644 (file)
@@ -58,6 +58,7 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
index ac0fe0816edf26b4d1eaad1c47a6c8f7fddc9166..a5e05a0716e82606a380dc0f3637eff78fd315e9 100644 (file)
@@ -46,7 +46,8 @@ enum {
        TRAP_ClassCastException             = 4,
        TRAP_CHECK_EXCEPTION                = 5,
        TRAP_PATCHER                        = 6,
-       TRAP_COMPILER                       = 7
+       TRAP_COMPILER                       = 7,
+       TRAP_COUNTDOWN                      = 8
 };
 
 #endif /* _MD_TRAP_H */
index e06903192b68bd7a65d8480bd3e93fe5f0e8b8bc..9cfaaeaeec73b7a0096d64ba44ba8af83e459996 100644 (file)
@@ -58,6 +58,7 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
index 6493e3559c089bf6333168e9bab0529a2b586943..c78e31b9540031ca1567b81d8b9a6803662dfc60 100644 (file)
@@ -58,6 +58,7 @@ enum {
        /* Don't use 8 (could be a normal load offset). */
 
        TRAP_COMPILER                       = 9,
+       TRAP_COUNTDOWN                      = 10,
        TRAP_END
 };
 
index ff28286f477164a7b09e64f1c485a882b5ef8c6f..0cfb3105d19f6bde1b65bdf37e62f5e9956057a3 100644 (file)
 #ifndef _METHOD_H
 #define _METHOD_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* forward typedefs ***********************************************************/
 
 typedef struct methodinfo          methodinfo; 
@@ -204,6 +208,10 @@ void method_methodref_print(constant_FMIref *mr);
 void method_methodref_println(constant_FMIref *mr);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _METHOD_H */