[Aegisvm-devel] patch to jni.c
Status: Pre-Alpha
Brought to you by:
pwlfong
|
From: Gildas B. <gb...@al...> - 2002-07-23 21:33:40
|
Hi, As I told you in my last mail (which btw is still waiting for moderator approval due to my silly mistake of using a different mail account) I did quite a few modifications to the JNI code in AegisVM. The first part of the changes consist of code factorisation which does reduce the size of jni.c by a fair amount. For instance all the ae_jni_Call*Method() functions are quite similar and thus it is possible to generate them all from a single macro, a new ae_jni_CallMethodA() also regroups all the common code for all the ae_jni_Call* variants (including static and virtual). The second part of the changes is an attempt to implement more of the JNI functions. These changes need to be reviewed carefully as I'm not entirely sure I understood all the subtilities involved, even though they all seem to work correctly. List of implemented functions: - all the ae_jni_Call##JType##Method*() - ae_jni_GetFieldID() - all the ae_jni_Get/Set##JType##Field() - ae_jni_GetStringUTFLength() - ae_jni_GetStringUTFChars() - ae_jni_ReleaseStringUTFChars() - ae_jni_GetArrayLength() If you have some criticism about this patch or needs me to rework some of it, do not hesitate to tell me. Regards, -- Gildas |