Home | History | Annotate | Download | only in oo

Lines Matching defs:cpe

171 static void freeCpeArray(ClassPathEntry* cpe);
394 static void dumpClassPath(const ClassPathEntry* cpe)
398 while (cpe->kind != kCpeLastEntry) {
401 switch (cpe->kind) {
408 LOGI(" %2d: type=%s %s %p\n", idx, kindStr, cpe->fileName, cpe->ptr);
409 if (CALC_CACHE_STATS && cpe->kind == kCpeJar) {
410 JarFile* pJarFile = (JarFile*) cpe->ptr;
415 cpe++;
431 bool dvmClassPathContains(const ClassPathEntry* cpe, const char* path)
433 while (cpe->kind != kCpeLastEntry) {
434 if (strcmp(cpe->fileName, path) == 0)
437 cpe++;
447 static void freeCpeArray(ClassPathEntry* cpe)
449 cpe;
451 if (cpe == NULL)
454 while (cpe->kind != kCpeLastEntry) {
455 switch (cpe->kind) {
458 dvmJarFileFree((JarFile*) cpe->ptr);
462 dvmRawDexFileFree((RawDexFile*) cpe->ptr);
466 assert(cpe->ptr == NULL);
470 free(cpe->fileName);
471 cpe++;
483 static bool prepareCpe(ClassPathEntry* cpe, bool isBootstrap)
490 cc = stat(cpe->fileName, &sb);
492 LOGD("Unable to stat classpath element '%s'\n", cpe->fileName);
505 cpe->kind = kCpeDir;
506 assert(cpe->ptr == NULL);
510 if (dvmJarFileOpen(cpe->fileName, NULL, &pJarFile, isBootstrap) == 0) {
511 cpe->kind = kCpeJar;
512 cpe->ptr = pJarFile;
517 if (dvmRawDexFileOpen(cpe->fileName, NULL, &pRawDexFile, isBootstrap) == 0)
519 cpe->kind = kCpeDex;
520 cpe->ptr = pRawDexFile;
524 LOGD("Unable to process classpath element '%s'\n", cpe->fileName);
542 ClassPathEntry* cpe = NULL;
571 cpe = (ClassPathEntry*) calloc(count+1, sizeof(ClassPathEntry));
576 gDvm.bootClassPath = cpe;
590 free(cpe);
591 cpe = NULL;
604 cpe[idx].kind = kCpeLastEntry;
605 cpe[idx].fileName = NULL;
606 cpe[idx].ptr = NULL;
613 cpe[idx] = tmp;
623 free(cpe);
624 cpe = NULL;
631 cpe[idx].kind = kCpeLastEntry;
632 cpe[idx].fileName = NULL;
633 cpe[idx].ptr = NULL;
635 //dumpClassPath(cpe);
639 gDvm.bootClassPath = cpe;
640 return cpe;
653 const ClassPathEntry* cpe = gDvm.bootClassPath;
660 while (cpe->kind != kCpeLastEntry) {
661 //LOGV("+++ checking '%s' (%d)\n", cpe->fileName, cpe->kind);
663 switch (cpe->kind) {
666 cpe->fileName);
670 JarFile* pJarFile = (JarFile*) cpe->ptr;
686 RawDexFile* pRawDexFile = (RawDexFile*) cpe->ptr;
701 LOGE("Unknown kind %d\n", cpe->kind);
706 cpe++;
752 const ClassPathEntry* cpe = gDvm.bootClassPath;
754 while (cpe->kind != kCpeLastEntry)
755 cpe++;
757 return cpe - gDvm.bootClassPath;
774 const ClassPathEntry* cpe = gDvm.bootClassPath;
778 name, idx, cpe[idx].fileName);
781 while (idx-- && cpe->kind != kCpeLastEntry)
782 cpe++;
783 if (cpe->kind == kCpeLastEntry) {
788 char urlBuf[strlen(name) + strlen(cpe->fileName) + kUrlOverhead +1];
790 switch (cpe->kind) {
792 sprintf(urlBuf, "file://%s/%s", cpe->fileName, name);
798 JarFile* pJarFile = (JarFile*) cpe->ptr;
801 sprintf(urlBuf, "jar:file://%s!/%s", cpe->fileName, name);