argObjectArray = packageParameterFromVarArg(targetMethod, argAddress); break; case OSX_DOTARG:
  public static Object packageAndInvoke(Object obj, int methodID, VM_Address argAddress,                                         VM_TypeReference expectReturnType,                                         boolean skip4Args, int argtype)     throws Exception {      // VM.sysWrite("JNI CallXXXMethod:  method ID " + methodID + " with args at " +     //             VM.intAsHexString(argAddress) + "\n");        VM_Method targetMethod = VM_MemberReference.getMemberRef(methodID).asMethodReference().resolve();    VM_TypeReference returnType = targetMethod.getReturnType();    // VM.sysWrite("JNI CallXXXMethod:  " + targetMethod.getDeclaringClass().toString() +    //          "." + targetMethod.getName().toString() + "\n");    if (expectReturnType==null) {   // for reference return type       if (!returnType.isReferenceType())        throw new Exception("Wrong return type for method: expect reference type instead of " + returnType);          }     else {    // for primitive return type      if (returnType!=expectReturnType)         throw new Exception("Wrong return type for method: expect " + expectReturnType +                             " instead of " + returnType);    }      // Repackage the arguments into an array of objects based on the signature of this method    Object[] argObjectArray;        switch (argtype) {      //-#if RVM_WITH_SVR4_ABI || RVM_WITH_MACH_O_ABI    case SVR4_DOTARG:      // argAddress is the glue frame pointer      argObjectArray = packageParameterFromDotArgSVR4(targetMethod, argAddress, skip4Args);      break;      //-#endif    case JVALUE_ARG:      argObjectArray = packageParameterFromJValue(targetMethod, argAddress);      break;      //-#if RVM_WITH_SVR4_ABI     case SVR4_VARARG:      argObjectArray = packageParameterFromVarArgSVR4(targetMethod, argAddress);      break;      //-#endif      //-#if RVM_WITH_MACH_O_ABI    case SVR4_VARARG:      argObjectArray = packageParameterFromVarArg(targetMethod, argAddress);      break;      //-#endif    case AIX_VARARG:      argObjectArray = packageParameterFromVarArg(targetMethod, argAddress);      break;    default:      argObjectArray = null;      if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);    }    // now invoke the method    Object returnObj = VM_Reflection.invoke(targetMethod, obj, argObjectArray, skip4Args);        return returnObj;  }