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


Java InstructionConstants.OP_SWAP屬性代碼示例

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


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

示例1: isDupOrSwap

/**
 * Returns whether the given instruction opcode represents a dup or swap
 * instruction (dup, dup_x1, dup_x2, dup2, dup2_x1, dup2_x2, swap).
 */
private boolean isDupOrSwap(int opcode)
{
    return opcode >= InstructionConstants.OP_DUP &&
           opcode <= InstructionConstants.OP_SWAP;
}
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:9,代碼來源:CodePreverifier.java

示例2: visitSimpleInstruction

public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
{
    switch (simpleInstruction.opcode)
    {
        case InstructionConstants.OP_DUP:
            conditionallyMarkStackEntryProducers(offset, 0, 0);
            conditionallyMarkStackEntryProducers(offset, 1, 0);
            break;
        case InstructionConstants.OP_DUP_X1:
            conditionallyMarkStackEntryProducers(offset, 0, 0);
            conditionallyMarkStackEntryProducers(offset, 1, 1);
            conditionallyMarkStackEntryProducers(offset, 2, 0);
            break;
        case InstructionConstants.OP_DUP_X2:
            conditionallyMarkStackEntryProducers(offset, 0, 0);
            conditionallyMarkStackEntryProducers(offset, 1, 1);
            conditionallyMarkStackEntryProducers(offset, 2, 2);
            conditionallyMarkStackEntryProducers(offset, 3, 0);
            break;
        case InstructionConstants.OP_DUP2:
            conditionallyMarkStackEntryProducers(offset, 0, 0);
            conditionallyMarkStackEntryProducers(offset, 1, 1);
            conditionallyMarkStackEntryProducers(offset, 2, 0);
            conditionallyMarkStackEntryProducers(offset, 3, 1);
            break;
        case InstructionConstants.OP_DUP2_X1:
            conditionallyMarkStackEntryProducers(offset, 0, 0);
            conditionallyMarkStackEntryProducers(offset, 1, 1);
            conditionallyMarkStackEntryProducers(offset, 2, 2);
            conditionallyMarkStackEntryProducers(offset, 3, 0);
            conditionallyMarkStackEntryProducers(offset, 4, 1);
            break;
        case InstructionConstants.OP_DUP2_X2:
            conditionallyMarkStackEntryProducers(offset, 0, 0);
            conditionallyMarkStackEntryProducers(offset, 1, 1);
            conditionallyMarkStackEntryProducers(offset, 2, 2);
            conditionallyMarkStackEntryProducers(offset, 3, 3);
            conditionallyMarkStackEntryProducers(offset, 4, 0);
            conditionallyMarkStackEntryProducers(offset, 5, 1);
            break;
        case InstructionConstants.OP_SWAP:
            conditionallyMarkStackEntryProducers(offset, 0, 1);
            conditionallyMarkStackEntryProducers(offset, 1, 0);
            break;
        default:
            markStackProducers(clazz, offset, simpleInstruction);
            break;
    }
}
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:49,代碼來源:EvaluationShrinker.java

示例3: isDupOrSwap

/**
 * Returns whether the given instruction is a dup or swap instruction
 * (dup, dup_x1, dup_x2, dup2, dup2_x1, dup2_x2, swap).
 */
private boolean isDupOrSwap(Instruction instruction)
{
    return instruction.opcode >= InstructionConstants.OP_DUP &&
           instruction.opcode <= InstructionConstants.OP_SWAP;
}
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:9,代碼來源:EvaluationShrinker.java


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