public static final Class defineClassInternal (String className, byte[] classRep, int offset, int length) throws ClassFormatError {      VM_BinaryData classData;  if (className == null) { VM.sysFail("ClassLoader.defineClass class name == null not implemented"); return null; }  VM_Atom classDescriptor = VM_Atom.findOrCreateAsciiAtom(className.replace('.','/')).descriptorFromClassName(); VM_Class cls = VM_ClassLoader.findOrCreateType(classDescriptor).asClass();  if (offset > 0) {  byte[] bytes = new byte[length]; VM_Array.arraycopy(classRep,offset,bytes,0,length); classData = new VM_BinaryData( bytes ); } else classData = new VM_BinaryData( classRep );  cls.load( classData );  return cls.getClassForType();
public static final Class defineClassInternal (String className, byte[] classRep, int offset, int length, ClassLoader classloader, ProtectionDomain pd) { Class c = defineClassInternal(className, classRep, offset, length, classloader); c.pd = pd; return c;
  public static final Class defineClassInternal (String className, byte[] classRep, int offset, int length)    throws ClassFormatError {    // original code...    // Class answer = defineClassImpl(className, classRep, offset, length);    // answer.setPDImpl(getDefaultProtectionDomain());    // return answer;    VM_BinaryData classData;    if (className == null) {      VM.sysFail("ClassLoader.defineClass class name == null not implemented"); //!!TODO      return null;    }    VM_Atom classDescriptor = VM_Atom.findOrCreateAsciiAtom(className.replace('.','/')).descriptorFromClassName();    VM_Class cls = VM_ClassLoader.findOrCreateType(classDescriptor).asClass();    if (offset > 0) {      // we have never seen an offset other than zero!      byte[] bytes = new byte[length];      VM_Array.arraycopy(classRep,offset,bytes,0,length);      classData = new VM_BinaryData( bytes );    }    else classData = new VM_BinaryData( classRep );    cls.load( classData );    return cls.getClassForType();  }