protected final RVMType getRVMTypeForClassWithAppCL(String className) {
   Atom descriptor =
       Atom.findOrCreateAsciiAtom(className.replace('.', '/')).descriptorFromClassName();
   TypeReference tRef =
       TypeReference.findOrCreate(ApplicationClassLoader.getSystemClassLoader(), descriptor);
   return tRef.peekType();
 }
  public SpecializedScanMethod(int id, TypeReference specializedTrace) {
    super(id);
    this.specializedSignature =
        new TypeReference[] {TypeReference.JavaLangObject, specializedTrace};

    if (!VM.BuildWithBaseBootImageCompiler) {
      /* Compile our specialized methods when we are opt compiling */
      RVMClass myClass = specializedScanMethodType.peekType().asClass();
      for (int i = 0; i < PATTERNS; i++) {
        RVMMethod method =
            myClass.findStaticMethod(templateMethodName(i), specializedMethodDescriptor);
        specializedMethods[i] = compileSpecializedMethod(method, specializedSignature);
      }
    }
  }
 /** What would be the appropriate return bytecode for the given type reference? */
 private static int typeRefToReturnBytecode(TypeReference tr) {
   if (!tr.isPrimitiveType()) {
     return JBC_areturn;
   } else {
     Primitive pt = (Primitive) tr.peekType();
     if ((pt == RVMType.BooleanType)
         || (pt == RVMType.ByteType)
         || (pt == RVMType.ShortType)
         || (pt == RVMType.CharType)
         || (pt == RVMType.IntType)) {
       return JBC_ireturn;
     } else if (pt == RVMType.LongType) {
       return JBC_lreturn;
     } else if (pt == RVMType.FloatType) {
       return JBC_freturn;
     } else if (pt == RVMType.DoubleType) {
       return JBC_dreturn;
     } else {
       if (VM.VerifyAssertions) VM._assert(VM.NOT_REACHED);
       return -1;
     }
   }
 }