* src/native/native.cpp: Moved to C++, use STL container.
[cacao.git] / src / vm / jit / jit.cpp
index 6852a963303b3bc177b118407ca0da0584d8aa50..3921fbab1328ff393b175f742a103b9d0a31287c 100644 (file)
@@ -569,17 +569,15 @@ static u1 *jit_compile_intern(jitdata *jd)
        show_filters_apply(jd->m);
 #endif
 
-       /* Handle native methods and create a native stub. */
-
+       // Handle native methods and create a native stub.
        if (m->flags & ACC_NATIVE) {
-               functionptr f;
-
-               f = native_method_resolve(m);
+               NativeMethods& nm = VM::get_current()->get_nativemethods();
+               void* f = nm.resolve_method(m);
 
                if (f == NULL)
                        return NULL;
 
-               code = NativeStub::generate(m, f);
+               code = NativeStub::generate(m, (functionptr) f);
 
                /* Native methods are never recompiled. */