本文整理汇总了Java中com.android.dx.dex.code.DalvInsn类的典型用法代码示例。如果您正苦于以下问题:Java DalvInsn类的具体用法?Java DalvInsn怎么用?Java DalvInsn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DalvInsn类属于com.android.dx.dex.code包,在下文中一共展示了DalvInsn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: writeTo
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
CstLiteralBits cb = (CstLiteralBits) ((CstInsn) insn).getConstant();
short bits;
// Where the high bits are depends on the category of the target.
if (regs.get(0).getCategory() == 1) {
bits = (short) (cb.getIntBits() >>> 16);
} else {
bits = (short) (cb.getLongBits() >>> 48);
}
write(out, opcodeUnit(insn, regs.get(0).getReg()), bits);
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:17,代码来源:Form21h.java
示例2: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 2) &&
unsignedFitsInByte(regs.get(0).getReg()) &&
unsignedFitsInByte(regs.get(1).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
if (!(cst instanceof CstLiteralBits)) {
return false;
}
CstLiteralBits cb = (CstLiteralBits) cst;
return cb.fitsInInt() && signedFitsInByte(cb.getIntBits());
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:Form22b.java
示例3: compatibleRegs
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int sz = regs.size();
BitSet bits = new BitSet(sz);
for (int i = 0; i < sz; i++) {
RegisterSpec reg = regs.get(i);
/*
* The check below adds (category - 1) to the register, to
* account for the fact that the second half of a
* category-2 register has to be represented explicitly in
* the result.
*/
bits.set(i, unsignedFitsInNibble(reg.getReg() +
reg.getCategory() - 1));
}
return bits;
}
开发者ID:johnlee175,项目名称:dex,代码行数:22,代码来源:Form35c.java
示例4: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 1) &&
unsignedFitsInByte(regs.get(0).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
if (!(cst instanceof CstLiteralBits)) {
return false;
}
return ((CstLiteralBits) cst).fitsInInt();
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:20,代码来源:Form31i.java
示例5: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 1) &&
unsignedFitsInNibble(regs.get(0).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
if (!(cst instanceof CstLiteralBits)) {
return false;
}
CstLiteralBits cb = (CstLiteralBits) cst;
return cb.fitsInInt() && signedFitsInNibble(cb.getIntBits());
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:23,代码来源:Form11n.java
示例6: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 2) &&
unsignedFitsInNibble(regs.get(0).getReg()) &&
unsignedFitsInNibble(regs.get(1).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
if (!(cst instanceof CstLiteralBits)) {
return false;
}
CstLiteralBits cb = (CstLiteralBits) cst;
return cb.fitsInInt() && signedFitsInShort(cb.getIntBits());
}
开发者ID:johnlee175,项目名称:dex,代码行数:23,代码来源:Form22s.java
示例7: compatibleRegs
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int sz = regs.size();
BitSet bits = new BitSet(sz);
boolean compat = unsignedFitsInByte(regs.get(0).getReg());
if (sz == 1) {
bits.set(0, compat);
} else {
if (regs.get(0).getReg() == regs.get(1).getReg()) {
bits.set(0, compat);
bits.set(1, compat);
}
}
return bits;
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:20,代码来源:Form31c.java
示例8: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 2) &&
unsignedFitsInNibble(regs.get(0).getReg()) &&
unsignedFitsInNibble(regs.get(1).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
int cpi = ci.getIndex();
if (! unsignedFitsInShort(cpi)) {
return false;
}
Constant cst = ci.getConstant();
return (cst instanceof CstType) ||
(cst instanceof CstFieldRef);
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:Form22c.java
示例9: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
if (!(insn instanceof CstInsn)) {
return false;
}
CstInsn ci = (CstInsn) insn;
int cpi = ci.getIndex();
if (! unsignedFitsInShort(cpi)) {
return false;
}
Constant cst = ci.getConstant();
if (!((cst instanceof CstMethodRef) ||
(cst instanceof CstType))) {
return false;
}
RegisterSpecList regs = ci.getRegisters();
return (wordCount(regs) >= 0);
}
开发者ID:johnlee175,项目名称:dex,代码行数:24,代码来源:Form35c.java
示例10: compatibleRegs
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
BitSet bits = new BitSet(1);
bits.set(0, unsignedFitsInNibble(regs.get(0).getReg()));
return bits;
}
开发者ID:johnlee175,项目名称:dex,代码行数:10,代码来源:Form11n.java
示例11: compatibleRegs
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
BitSet bits = new BitSet(1);
bits.set(0, unsignedFitsInByte(regs.get(0).getReg()));
return bits;
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:10,代码来源:Form21t.java
示例12: writeTo
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
write(out,
opcodeUnit(insn, regs.get(0).getReg()),
(short) regs.get(1).getReg());
}
开发者ID:johnlee175,项目名称:dex,代码行数:9,代码来源:Form22x.java
示例13: insnArgString
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public String insnArgString(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
return regs.get(0).regString() + ", " + regs.get(1).regString() +
", " + branchString(insn);
}
开发者ID:johnlee175,项目名称:dex,代码行数:8,代码来源:Form22t.java
示例14: insnArgString
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public String insnArgString(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
CstLiteralBits value = (CstLiteralBits) ((CstInsn) insn).getConstant();
return regs.get(0).regString() + ", " + literalBitsString(value);
}
开发者ID:johnlee175,项目名称:dex,代码行数:9,代码来源:Form11n.java
示例15: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
if (!((insn instanceof TargetInsn) &&
(insn.getRegisters().size() == 0))) {
return false;
}
TargetInsn ti = (TargetInsn) insn;
return ti.hasTargetOffset() ? branchFits(ti) : true;
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:12,代码来源:Form20t.java
示例16: insnArgString
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public String insnArgString(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
CstLiteralBits value = (CstLiteralBits) ((CstInsn) insn).getConstant();
return regs.get(0).regString() + ", " + regs.get(1).regString()
+ ", " + literalBitsString(value);
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:10,代码来源:Form22s.java
示例17: isCompatible
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
if (!(insn instanceof CstInsn)) {
return false;
}
CstInsn ci = (CstInsn) insn;
int cpi = ci.getIndex();
Constant cst = ci.getConstant();
if (! unsignedFitsInShort(cpi)) {
return false;
}
if (!((cst instanceof CstMethodRef) ||
(cst instanceof CstType))) {
return false;
}
RegisterSpecList regs = ci.getRegisters();
int sz = regs.size();
return (regs.size() == 0) ||
(isRegListSequential(regs) &&
unsignedFitsInShort(regs.get(0).getReg()) &&
unsignedFitsInByte(regs.getWordCount()));
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:29,代码来源:Form3rc.java
示例18: writeTo
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
write(out,
opcodeUnit(insn, regs.get(0).getReg()),
codeUnit(regs.get(1).getReg(), regs.get(2).getReg()));
}
开发者ID:johnlee175,项目名称:dex,代码行数:9,代码来源:Form23x.java
示例19: insnCommentString
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public String insnCommentString(DalvInsn insn, boolean noteIndices) {
if (noteIndices) {
return cstComment(insn);
} else {
return "";
}
}
开发者ID:AndreJCL,项目名称:JCL,代码行数:10,代码来源:Form31c.java
示例20: writeTo
import com.android.dx.dex.code.DalvInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
int offset = ((TargetInsn) insn).getTargetOffset();
write(out, opcodeUnit(insn, (offset & 0xff)));
}
开发者ID:JLLK,项目名称:multidex-maker,代码行数:8,代码来源:Form10t.java
注:本文中的com.android.dx.dex.code.DalvInsn类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论