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; }
  public int pushJNIRef( Object ref ) {    JNIRefsTop += 4;    JNIRefs[ JNIRefsTop >> 2 ] = VM_Magic.objectAsAddress(ref).toInt();    return JNIRefsTop;  }