#include "native/jni.hpp"
#include "native/llni.h"
-#include "native/localref.h"
+#include "native/localref.hpp"
#include "native/native.hpp"
#if defined(ENABLE_JVMTI)
#include "toolbox/logging.h"
-#include "vm/array.h"
+#include "vm/array.hpp"
#include "vm/jit/builtin.hpp"
#include "vm/exceptions.hpp"
#include "vm/global.h"
#include "vm/globals.hpp"
-#include "vm/initialize.h"
+#include "vm/initialize.hpp"
#include "vm/javaobjects.hpp"
#include "vm/loader.hpp"
#include "vm/options.h"
#include "vm/primitive.hpp"
-#include "vm/resolve.h"
+#include "vm/resolve.hpp"
#include "vm/statistics.h"
#include "vm/string.hpp"
#include "vm/vm.hpp"
-#include "vm/jit/argument.h"
#include "vm/jit/asmpart.h"
#include "vm/jit/jit.hpp"
#include "vm/jit/stacktrace.hpp"
*******************************************************************************/
-jint _Jv_JNI_RegisterNatives(JNIEnv *env, jclass clazz,
- const JNINativeMethod *methods, jint nMethods)
+jint jni_RegisterNatives(JNIEnv* env, jclass clazz, const JNINativeMethod* methods, jint nMethods)
{
- classinfo *c;
-
- STATISTICS(jniinvokation());
+ TRACEJNICALLS(("jni_RegisterNatives(env=%p, clazz=%p, methods=%p, nMethods=%d)", env, clazz, methods, nMethods));
- c = LLNI_classinfo_unwrap(clazz);
+ classinfo* c = LLNI_classinfo_unwrap(clazz);
/* XXX: if implemented this needs a call to jvmti_NativeMethodBind
if (jvmti) jvmti_NativeMethodBind(method, address, new_address_ptr);
*/
- native_method_register(c->name, methods, nMethods);
+ NativeMethods& nm = VM::get_current()->get_nativemethods();
+ nm.register_methods(c->name, methods, nMethods);
return 0;
}
_Jv_JNI_SetFloatArrayRegion,
_Jv_JNI_SetDoubleArrayRegion,
- _Jv_JNI_RegisterNatives,
+ jni_RegisterNatives,
_Jv_JNI_UnregisterNatives,
_Jv_JNI_MonitorEnter,