当前位置: 首页>>代码示例>>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;未经允许,请勿转载。