look for a native method implementation using the fast calling convention (Avian_*) before one using the standard convention (Java_*) to avoid false positives late in the search path

This commit is contained in:
Joel Dice 2009-08-11 18:49:58 -06:00
parent db58097165
commit 22ae42b712

View File

@ -203,14 +203,14 @@ namespace vm {
void* void*
resolveNativeMethod(Thread* t, object method) resolveNativeMethod(Thread* t, object method)
{ {
void* p = ::resolveNativeMethod(t, method, "Java_", 5, -1); void* p = ::resolveNativeMethod(t, method, "Avian_", 6, 3);
if (p) { if (p) {
methodVmFlags(t, method) |= FastNative;
return p; return p;
} }
p = ::resolveNativeMethod(t, method, "Avian_", 6, 3); p = ::resolveNativeMethod(t, method, "Java_", 5, -1);
if (p) { if (p) {
methodVmFlags(t, method) |= FastNative;
return p; return p;
} }