Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
*/
#include "vm/types.h"
#include "mm/memory.h"
+
#include "native/jni.h"
#include "native/native.h"
+
#include "native/include/java_lang_Object.h"
#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_System.h"
+
#include "vm/builtin.h"
#include "vm/properties.h"
#include "vm/stringlocal.h"
+/* native methods implemented by this file ************************************/
+
+static JNINativeMethod methods[] = {
+ { "arraycopy", "(Ljava/lang/Object;ILjava/lang/Object;II)V", (void *) (ptrint) &Java_java_lang_System_arraycopy },
+ { "getProperty0", "(Ljava/lang/String;)Ljava/lang/String;", (void *) (ptrint) &Java_java_lang_System_getProperty0 },
+};
+
+
+/* _Jv_java_lang_System_init ***************************************************
+
+ Register native functions.
+
+*******************************************************************************/
+
+void _Jv_java_lang_System_init(void)
+{
+ utf *u;
+
+ u = utf_new_char("java/lang/System");
+
+ native_method_register(u, methods, NATIVE_METHODS_COUNT);
+}
+
+
/*
* Class: java/lang/System
* Method: arraycopy
*/
JNIEXPORT void JNICALL Java_java_lang_System_arraycopy(JNIEnv *env, jclass clazz, java_lang_Object *src, s4 srcStart, java_lang_Object *dest, s4 destStart, s4 len)
{
- (void) builtin_arraycopy((java_arrayheader *) src, srcStart,
- (java_arrayheader *) dest, destStart, len);
+ (void) builtin_arraycopy((java_handle_t *) src, srcStart,
+ (java_handle_t *) dest, destStart, len);
}
JNIEXPORT java_lang_String* JNICALL Java_java_lang_System_getProperty0(JNIEnv *env, jclass clazz, java_lang_String *s)
{
- java_objectheader *so;
- char* key;
- char* value;
- java_objectheader *result;
+ java_handle_t *so;
+ char* key;
+ char* value;
+ java_handle_t *result;
- so = (java_objectheader *) s;
+ so = (java_handle_t *) s;
/* build an ASCII string out of the java/lang/String passed */