if (verboseJNI) VM.sysWrite("JNI called: GetArrayLength  \n");
if (traceJNI) VM.sysWrite("JNI called: GetArrayLength  \n");
  private static int GetArrayLength(int envJREF, int arrayJREF) {    if (verboseJNI) VM.sysWrite("JNI called: GetArrayLength  \n");    VM_JNIEnvironment env;    try {      env = VM_Thread.getCurrentThread().getJNIEnv();      Object theArray = (Object) env.getJNIRef(arrayJREF);      VM_Type arrayType = VM_Magic.getObjectType(theArray);      if (arrayType.isArrayType())        return VM_Magic.getArrayLength(theArray);      else        return -1;    } catch (Throwable unexpected) {      env = VM_Thread.getCurrentThread().getJNIEnv();      env.recordException(unexpected);      return -1;    }  }