⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 verifier.c

📁 Nucleus_2_kvm_Hello 是kvm移植到Nucleus系统的源代码。。。好东西啊
💻 C
📖 第 1 页 / 共 5 页
字号:
               /*                * Get the actual element type of the array                */                arrayElementType = Vfy_getReferenceArrayElementType(arrayType);               /*                * This part of the verifier is far from obvious, but the logic                * appears to be as follows:                *                * 1, Because not all stores into a reference array can be                *    statically checked then they never are in the case                *    where the array is of one dimension and the object                *    being inserted is a non-array, The verifier will                *    ignore such errors and they will all be found at runtime.                *                * 2, However, if the array is of more than one dimension or                *    the object being inserted is some kind of an array then                *    a check is made by the verifier and errors found at                *    this time (statically) will cause the method to fail                *    verification. Presumable not all errors will will be found                *    here and so some runtime errors can occur in this case                *    as well.                */                if (!Vfy_isArray(arrayElementType) && !Vfy_isArray(value)) {                    /* Success */                } else if (Vfy_isAssignable(value, arrayElementType)) {                    /* Success */                } else {                    Vfy_throw(VE_AASTORE_BAD_TYPE);                }                ip++;                (void)dummy;                break;            }            case POP: {                Vfy_popCategory1();                ip++;                break;            }            case POP2: {                Vfy_popCategory2_secondWord();                Vfy_popCategory2_firstWord();                ip++;                break;            }            case DUP: {                VERIFIERTYPE type = Vfy_popCategory1();                Vfy_push(type);                Vfy_push(type);                ip++;                break;            }            case DUP_X1:{                VERIFIERTYPE type1 = Vfy_popCategory1();                VERIFIERTYPE type2 = Vfy_popCategory1();                Vfy_push(type1);                Vfy_push(type2);                Vfy_push(type1);                ip++;                break;            }            case DUP_X2: {                VERIFIERTYPE cat1type = Vfy_popCategory1();                VERIFIERTYPE second   = Vfy_popDoubleWord_secondWord();                VERIFIERTYPE first    = Vfy_popDoubleWord_firstWord();                Vfy_push(cat1type);                Vfy_push(first);                Vfy_push(second);                Vfy_push(cat1type);                ip++;                break;            }            case DUP2: {                VERIFIERTYPE second = Vfy_popDoubleWord_secondWord();                VERIFIERTYPE first  = Vfy_popDoubleWord_firstWord();                Vfy_push(first);                Vfy_push(second);                Vfy_push(first);                Vfy_push(second);                ip++;                break;            }            case DUP2_X1: {                VERIFIERTYPE second   = Vfy_popDoubleWord_secondWord();                VERIFIERTYPE first    = Vfy_popDoubleWord_firstWord();                VERIFIERTYPE cat1type = Vfy_popCategory1();                Vfy_push(first);                Vfy_push(second);                Vfy_push(cat1type);                Vfy_push(first);                Vfy_push(second);                ip++;                break;            }            case DUP2_X2: {                VERIFIERTYPE item1second = Vfy_popDoubleWord_secondWord();                VERIFIERTYPE item1first  = Vfy_popDoubleWord_firstWord();                VERIFIERTYPE item2second = Vfy_popDoubleWord_secondWord();                VERIFIERTYPE item2first  = Vfy_popDoubleWord_firstWord();                Vfy_push(item1first);                Vfy_push(item1second);                Vfy_push(item2first);                Vfy_push(item2second);                Vfy_push(item1first);                Vfy_push(item1second);                ip++;                break;            }            case SWAP: {                VERIFIERTYPE type1 = Vfy_popCategory1();                VERIFIERTYPE type2 = Vfy_popCategory1();                Vfy_push(type1);                Vfy_push(type2);                ip++;                break;            }            case IADD:            case ISUB:            case IMUL:            case IDIV:            case IREM:            case ISHL:            case ISHR:            case IUSHR:            case IOR:            case IXOR:            case IAND: {                Vfy_pop(ITEM_Integer);                Vfy_pop(ITEM_Integer);                Vfy_push(ITEM_Integer);                ip++;                break;            }            case INEG:                Vfy_pop(ITEM_Integer);                Vfy_push(ITEM_Integer);                ip++;                break;            case LADD:            case LSUB:            case LMUL:            case LDIV:            case LREM:            case LAND:            case LOR:            case LXOR: {                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Long);                Vfy_push(ITEM_Long_2);                ip++;                break;            }            case LNEG: {                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Long);                Vfy_push(ITEM_Long_2);                ip++;                break;            }            case LSHL:            case LSHR:            case LUSHR: {                Vfy_pop(ITEM_Integer);                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Long);                Vfy_push(ITEM_Long_2);                ip++;                break;            }#if IMPLEMENTS_FLOAT            case FADD:            case FSUB:            case FMUL:            case FDIV:            case FREM: {                Vfy_pop(ITEM_Float);                Vfy_pop(ITEM_Float);                Vfy_push(ITEM_Float);                ip++;                break;            }            case FNEG: {                Vfy_pop(ITEM_Float);                Vfy_push(ITEM_Float);                ip++;                break;            }            case DADD:            case DSUB:            case DMUL:            case DDIV:            case DREM: {                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_push(ITEM_Double);                Vfy_push(ITEM_Double_2);                ip++;                break;            }            case DNEG: {                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_push(ITEM_Double);                Vfy_push(ITEM_Double_2);                ip++;                break;            }#endif /* IMPLEMENTS_FLOAT */            case IINC: {                SLOTINDEX index = Vfy_getUByte(ip + 1);                ip += 3;                Vfy_getLocal(index, ITEM_Integer);                Vfy_setLocal(index, ITEM_Integer);                break;            }            case I2L: {                Vfy_pop(ITEM_Integer);                Vfy_push(ITEM_Long);                Vfy_push(ITEM_Long_2);                ip++;                break;            }            case L2I: {                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Integer);                ip++;                break;            }#if IMPLEMENTS_FLOAT            case I2F: {                Vfy_pop(ITEM_Integer);                Vfy_push(ITEM_Float);                ip++;                break;            }            case I2D: {                Vfy_pop(ITEM_Integer);                Vfy_push(ITEM_Double);                Vfy_push(ITEM_Double_2);                ip++;                break;            }            case L2F: {                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Float);                ip++;                break;            }            case L2D: {                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Double);                Vfy_push(ITEM_Double_2);                ip++;                break;            }            case F2I: {                Vfy_pop(ITEM_Float);                Vfy_push(ITEM_Integer);                ip++;                break;            }            case F2L: {                Vfy_pop(ITEM_Float);                Vfy_push(ITEM_Long);                Vfy_push(ITEM_Long_2);                ip++;                break;            }            case F2D: {                Vfy_pop(ITEM_Float);                Vfy_push(ITEM_Double);                Vfy_push(ITEM_Double_2);                ip++;                break;            }            case D2I: {                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_push(ITEM_Integer);                ip++;                break;            }            case D2L: {                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_push(ITEM_Long);                Vfy_push(ITEM_Long_2);                ip++;                break;            }            case D2F: {                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_push(ITEM_Float);                ip++;                break;            }#endif /* IMPLEMENTS_FLOAT */            case I2B:            case I2C:            case I2S: {                Vfy_pop(ITEM_Integer);                Vfy_push(ITEM_Integer);                ip++;                break;            }            case LCMP: {                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_pop(ITEM_Long_2);                Vfy_pop(ITEM_Long);                Vfy_push(ITEM_Integer);                ip++;                break;            }#if IMPLEMENTS_FLOAT            case FCMPL:            case FCMPG: {                Vfy_pop(ITEM_Float);                Vfy_pop(ITEM_Float);                Vfy_push(ITEM_Integer);                ip++;                break;            }            case DCMPL:            case DCMPG: {                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_pop(ITEM_Double_2);                Vfy_pop(ITEM_Double);                Vfy_push(ITEM_Integer);                ip++;                break;            }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -