當前位置: 首頁>>代碼示例>>Java>>正文


Java Opcodes.DLOAD屬性代碼示例

本文整理匯總了Java中org.objectweb.asm.Opcodes.DLOAD屬性的典型用法代碼示例。如果您正苦於以下問題:Java Opcodes.DLOAD屬性的具體用法?Java Opcodes.DLOAD怎麽用?Java Opcodes.DLOAD使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.objectweb.asm.Opcodes的用法示例。


在下文中一共展示了Opcodes.DLOAD屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: visitBaseType

@Override
public void visitBaseType(char c) {
    int idx = paramIndex++;
    int opcode;

    switch (c) {
        // two-word data
        case 'J': opcode = Opcodes.LLOAD; paramIndex++; localSize++; break;
        case 'D': opcode = Opcodes.DLOAD; paramIndex++; localSize++; break;
        // float has a special opcode
        case 'F': opcode = Opcodes.FLOAD; break;
        default: opcode = Opcodes.ILOAD; break;

    }
    load(opcode, idx);
    localSize++;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:17,代碼來源:Asm.java

示例2: visitVarInsn

/**
 * Imports variable load and store operations, as well as RET?!?
 *
 * @param opcode Opcode.
 * @param var    Variable index.
 */
@Override
public void visitVarInsn(final int opcode, final int var) {
  switch(opcode) {
    case Opcodes.ILOAD:  createVarRead(var, Type.INT);                  break;
    case Opcodes.LLOAD:  createVarRead(var, Type.LONG);                 break;
    case Opcodes.FLOAD:  createVarRead(var, Type.FLOAT);                break;
    case Opcodes.DLOAD:  createVarRead(var, Type.DOUBLE);               break;
    case Opcodes.ALOAD:  createVarRead(var, Type.getFreshRef());        break;
    case Opcodes.ISTORE: createVarWrite(var, Type.INT);                 break;
    case Opcodes.LSTORE: createVarWrite(var, Type.LONG);                break;
    case Opcodes.FSTORE: createVarWrite(var, Type.FLOAT);               break;
    case Opcodes.DSTORE: createVarWrite(var, Type.DOUBLE);              break;
    case Opcodes.ASTORE: createVarWrite(var, Type.getFreshRef());       break;
    
    // TODO: RET (paired with JSR)
    case Opcodes.RET: throw new RuntimeException("visitVarInsn: RET");
  }
}
 
開發者ID:adnanmitf09,項目名稱:Rubus,代碼行數:24,代碼來源:MethodImporter.java

示例3: visitVarInsn

@Override
public void visitVarInsn(final int opcode, final int var) {
    Type type;
    switch (opcode) {
    case Opcodes.LLOAD:
    case Opcodes.LSTORE:
        type = Type.LONG_TYPE;
        break;

    case Opcodes.DLOAD:
    case Opcodes.DSTORE:
        type = Type.DOUBLE_TYPE;
        break;

    case Opcodes.FLOAD:
    case Opcodes.FSTORE:
        type = Type.FLOAT_TYPE;
        break;

    case Opcodes.ILOAD:
    case Opcodes.ISTORE:
        type = Type.INT_TYPE;
        break;

    default:
        // case Opcodes.ALOAD:
        // case Opcodes.ASTORE:
        // case RET:
        type = OBJECT_TYPE;
        break;
    }
    mv.visitVarInsn(opcode, remap(var, type));
}
 
開發者ID:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:33,代碼來源:LocalVariablesSorter.java

示例4: visitVarInsn

@Override
public void visitVarInsn(final int opcode, final int var) {
    switch (opcode) {
    case Opcodes.ILOAD:
        load(var, Type.INT_TYPE);
        break;
    case Opcodes.LLOAD:
        load(var, Type.LONG_TYPE);
        break;
    case Opcodes.FLOAD:
        load(var, Type.FLOAT_TYPE);
        break;
    case Opcodes.DLOAD:
        load(var, Type.DOUBLE_TYPE);
        break;
    case Opcodes.ALOAD:
        load(var, OBJECT_TYPE);
        break;
    case Opcodes.ISTORE:
        store(var, Type.INT_TYPE);
        break;
    case Opcodes.LSTORE:
        store(var, Type.LONG_TYPE);
        break;
    case Opcodes.FSTORE:
        store(var, Type.FLOAT_TYPE);
        break;
    case Opcodes.DSTORE:
        store(var, Type.DOUBLE_TYPE);
        break;
    case Opcodes.ASTORE:
        store(var, OBJECT_TYPE);
        break;
    case Opcodes.RET:
        ret(var);
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
開發者ID:ItzSomebody,項目名稱:DirectLeaks-AntiReleak-Remover,代碼行數:40,代碼來源:InstructionAdapter.java

示例5: getLoadInsn

static VarInsnNode getLoadInsn(Type type, int position) {
    int opCode;
    switch (type.getDescriptor().charAt(0)) {
        case 'B':
            opCode = Opcodes.ILOAD;
            break;
        case 'C':
            opCode = Opcodes.ILOAD;
            break;
        case 'D':
            opCode = Opcodes.DLOAD;
            break;
        case 'F':
            opCode = Opcodes.FLOAD;
            break;
        case 'I':
            opCode = Opcodes.ILOAD;
            break;
        case 'J':
            opCode = Opcodes.LLOAD;
            break;
        case 'L':
            opCode = Opcodes.ALOAD;
            break;
        case '[':
            opCode = Opcodes.ALOAD;
            break;
        case 'Z':
            opCode = Opcodes.ILOAD;
            break;
        case 'S':
            opCode = Opcodes.ILOAD;
            break;
        default:
            throw new ClassFormatError("Invalid method signature: "
                    + type.getDescriptor());
    }
    return new VarInsnNode(opCode, position);
}
 
開發者ID:yutian-tianpl,項目名稱:byte-cobweb,代碼行數:39,代碼來源:TreeInsn.java

示例6: isRead

static boolean isRead(int opcode) {
	return opcode == Opcodes.ALOAD || opcode == Opcodes.ILOAD || opcode == Opcodes.FLOAD
			|| opcode == Opcodes.LLOAD || opcode == Opcodes.DLOAD;
}
 
開發者ID:evernat,項目名稱:dead-code-detector,代碼行數:4,代碼來源:LocalVariablesAnalyzer.java


注:本文中的org.objectweb.asm.Opcodes.DLOAD屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。