Re: [Sablevm-developer] Re: UnsatisfiedLinkError help
Brought to you by:
egagnon
From: Grzegorz B. P. <ga...@de...> - 2003-01-22 16:31:06
|
W li=B6cie z =B6ro, 22-01-2003, godz. 15:58, Grzegorz B. Prokopski pisze:=20 > I must say I tried to look into this problem some time ago, > W li=B6cie z pon, 20-01-2003, godz. 17:09, Ben Burns pisze:=20 > > might be interested in the problem anyway. Where would be the best pla= ce to=20 > > log a bug? If you want please let me know where I should start if I h= ave to=20 > > code anything (I believe the code must already exist though). Here are some pointers, as good as my knowledge permits. in ./src/libsablevm/java_lang_Class.c There should be definition like this: (I belive it fits below nativeGetMethod code in this file) /* ---------------------------------------------------------------------- Java_java_lang_Class_nativeGetMethods ---------------------------------------------------------------------- */ /* * Class: java_lang_Class * Method: nativeGetMethods * Signature: ([BLjava/lang/String;Ljava/lang/String;)Ljava/lang/reflect/Methods; */ JNIEXPORT jobjectArray JNICALL Java_java_lang_Class_nativeGetMethods (JNIEnv *_env, jclass _class, jbyteArray vmData) { } I looked for an inspiration in nativeGetMethod and I think there are many things I don't know: 1. How to enumerate methods available in the class? (GetMethod asks for a specific method which name and parameters types are provided by the user/programmer) Oh, and we should do it including same methods w/ different params. 2. How to return an array of classes? (None of the methods in this file returns array, so some idea on how to compose array of methods having method classes would be=20 helpful). 3. What does the part between /* wrap it */ and end: do? I imagine pseudocode for the function this way: ret_array =3D NULL; no =3D 0; for (method in get_class_methods(class)) for (param_set in get_param_sets(method)) if is_public (method, param) ret_array[no++] =3D resolve(method, param) return ret_array; (why ain't the real code as easy to write as pseudo-code? ;-) Can somebody enlighten me a bit? I'd really like to learn some more about SableVM internals and I belive giving some informations like those publicly - will benefit future contribution. At least until we get "SableVM hacking guide" ;-) Regards Grzegorz B. Prokopski PS: Ben, if you're considering contribution to SableVM (which is very welcomed of course) - you could subscribe to at least sablevm-developer mailing list at www.sablevm.org. --=20 Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |