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