if (JNIRefsTop >> 2 >= JNIRefs.length) { int[] newrefs = new int[ JNIRefs.length * 2 ]; for(int i = 0; i < JNIRefs.length; i++) newrefs[i] = JNIRefs[i];
if (JNIRefsTop >= JNIRefsMax) { JNIRefsMax *= 2; int[] newrefs = new int[ (JNIRefsMax>>2) + JNIREFS_FUDGE_LENGTH ]; for(int i = 0; i < JNIRefs.length; i++) newrefs[i] = JNIRefs[i]; for(int i = JNIRefs.length; i < newrefs.length; i++) newrefs[i] = 0;
  public int pushJNIRef( Object ref ) {    if (ref == null) return 0;    if (VM.VerifyAssertions) VM._assert( VM_Interface.validRef( VM_Magic.objectAsAddress(ref) ) );    JNIRefsTop += 4;    if (JNIRefsTop >> 2 >= JNIRefs.length) {	int[] newrefs = new int[ JNIRefs.length * 2 ];	for(int i = 0; i < JNIRefs.length; i++) newrefs[i] = JNIRefs[i];	JNIRefs = newrefs;    }    JNIRefs[ JNIRefsTop >> 2 ] = VM_Magic.objectAsAddress(ref).toInt();    return JNIRefsTop;  }