[llvm-commits] [vmkit] r52321 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathVMClass.cpp VMCore/JavaUpcalls.cpp VMCore/JavaUpcalls.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon Jun 16 07:06:12 PDT 2008
Author: geoffray
Date: Mon Jun 16 09:06:11 2008
New Revision: 52321
URL: http://llvm.org/viewvc/llvm-project?rev=52321&view=rev
Log:
Add the getDeclaredAnnotations method, which returns an empty annotation array.
This needs to be implemented.
Modified:
vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp
vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h
Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=52321&r1=52320&r2=52321&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original)
+++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Mon Jun 16 09:06:11 2008
@@ -417,4 +417,15 @@
JavaThread::throwException((JavaObject*)throwable);
}
+JNIEXPORT jobjectArray Java_java_lang_VMClass_getDeclaredAnnotations(
+#ifdef NATIVE_JNI
+JNIEnv *env,
+jclass clazz,
+#endif
+jclass Cl) {
+ // TODO implement me
+ Jnjvm* vm = JavaThread::get()->isolate;
+ ArrayObject* res = ArrayObject::acons(0, Classpath::constructorArrayAnnotation, vm);
+ return (jobjectArray)res;
+}
}
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=52321&r1=52320&r2=52321&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Mon Jun 16 09:06:11 2008
@@ -67,6 +67,7 @@
JavaMethod* Classpath::initConstructor;
Class* Classpath::newConstructor;
ClassArray* Classpath::constructorArrayClass;
+ClassArray* Classpath::constructorArrayAnnotation;
JavaField* Classpath::constructorSlot;
JavaMethod* Classpath::initMethod;
JavaMethod* Classpath::initField;
@@ -247,6 +248,9 @@
constructorArrayClass =
UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Constructor", 1);
+
+ constructorArrayAnnotation =
+ UPCALL_ARRAY_CLASS(vm, "java/lang/annotation/Annotation", 1);
constructorSlot =
UPCALL_FIELD(vm, "java/lang/reflect/Constructor", "slot", "I", ACC_VIRTUAL);
Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h?rev=52321&r1=52320&r2=52321&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h Mon Jun 16 09:06:11 2008
@@ -78,6 +78,7 @@
static JavaMethod* getCallingClassLoader;
static JavaMethod* initConstructor;
static ClassArray* constructorArrayClass;
+ static ClassArray* constructorArrayAnnotation;
static Class* newConstructor;
static JavaField* constructorSlot;
static JavaMethod* initMethod;
More information about the llvm-commits
mailing list