本文整理了Java中com.android.dx.rop.code.BasicBlockList.getRegCount()
方法的一些代码示例,展示了BasicBlockList.getRegCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BasicBlockList.getRegCount()
方法的具体详情如下:
包路径:com.android.dx.rop.code.BasicBlockList
类名称:BasicBlockList
方法名:getRegCount
[英]Returns how many registers this method requires. This is simply the maximum of register-number-plus-category referred to by this instance's instructions (indirectly through BasicBlockinstances).
[中]返回此方法需要多少寄存器。这只是该实例的指令(间接通过BasicBlockinstances)引用的寄存器数加类别的最大值。
代码示例来源:origin: nikita36078/J2ME-Loader
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: com.android.tools.build/builder
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: com.google.dexmaker/dexmaker-dx
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: nikita36078/J2ME-Loader
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: com.android.tools.build/builder
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: com.google.dexmaker/dexmaker-dx
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: com.google.android.tools/dx
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: com.google.android.tools/dx
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: com.android/dx
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: com.android/dx
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: gdpancheng/LoonAndroid3
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: dragome/dragome-sdk
/**
* Constructs an instance.
*
* @param method {@code non-null;} the method being represented by this instance
*/
public LocalVariableInfo(RopMethod method) {
if (method == null) {
throw new NullPointerException("method == null");
}
BasicBlockList blocks = method.getBlocks();
int maxLabel = blocks.getMaxLabel();
this.regCount = blocks.getRegCount();
this.emptySet = new RegisterSpecSet(regCount);
this.blockStarts = new RegisterSpecSet[maxLabel];
this.insnAssignments =
new HashMap<Insn, RegisterSpec>(blocks.getInstructionCount());
emptySet.setImmutable();
}
代码示例来源:origin: gdpancheng/LoonAndroid3
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: dragome/dragome-sdk
/**
* Constructs an instance.
*
* @param ropMethod {@code non-null;} the original rop-form method that
* this instance is based on
* @param paramWidth the total width, in register-units, of the
* method's parameters
* @param isStatic {@code true} if this method has no {@code this}
* pointer argument
*/
private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) {
this.paramWidth = paramWidth;
this.isStatic = isStatic;
this.backMode = false;
this.maxLabel = ropMethod.getBlocks().getMaxLabel();
this.registerCount = ropMethod.getBlocks().getRegCount();
this.spareRegisterBase = registerCount;
}
代码示例来源:origin: nikita36078/J2ME-Loader
/**
* Updates the ROP statistics.
*
* @param nonOptRmeth non-optimized method
* @param rmeth optimized method
*/
public void updateRopStatistics(RopMethod nonOptRmeth,
RopMethod rmeth) {
int oldCountInsns
= nonOptRmeth.getBlocks().getEffectiveInstructionCount();
int oldCountRegs = nonOptRmeth.getBlocks().getRegCount();
if (DEBUG) {
System.err.println("insns (old/new): "
+ oldCountInsns + "/"
+ rmeth.getBlocks().getEffectiveInstructionCount()
+ " regs (o/n):" + oldCountRegs
+ "/" + rmeth.getBlocks().getRegCount());
}
int newCountInsns
= rmeth.getBlocks().getEffectiveInstructionCount();
runningDeltaInsns
+= (newCountInsns - oldCountInsns);
runningDeltaRegisters
+= (rmeth.getBlocks().getRegCount() - oldCountRegs);
runningTotalInsns += newCountInsns;
}
代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx
/**
* Updates the ROP statistics.
*
* @param nonOptRmeth non-optimized method
* @param rmeth optimized method
*/
public void updateRopStatistics(RopMethod nonOptRmeth,
RopMethod rmeth) {
int oldCountInsns
= nonOptRmeth.getBlocks().getEffectiveInstructionCount();
int oldCountRegs = nonOptRmeth.getBlocks().getRegCount();
if (DEBUG) {
System.err.println("insns (old/new): "
+ oldCountInsns + "/"
+ rmeth.getBlocks().getEffectiveInstructionCount()
+ " regs (o/n):" + oldCountRegs
+ "/" + rmeth.getBlocks().getRegCount());
}
int newCountInsns
= rmeth.getBlocks().getEffectiveInstructionCount();
runningDeltaInsns
+= (newCountInsns - oldCountInsns);
runningDeltaRegisters
+= (rmeth.getBlocks().getRegCount() - oldCountRegs);
runningTotalInsns += newCountInsns;
}
代码示例来源:origin: com.android.tools.build/builder
/**
* Updates the ROP statistics.
*
* @param nonOptRmeth non-optimized method
* @param rmeth optimized method
*/
public void updateRopStatistics(RopMethod nonOptRmeth,
RopMethod rmeth) {
int oldCountInsns
= nonOptRmeth.getBlocks().getEffectiveInstructionCount();
int oldCountRegs = nonOptRmeth.getBlocks().getRegCount();
if (DEBUG) {
System.err.println("insns (old/new): "
+ oldCountInsns + "/"
+ rmeth.getBlocks().getEffectiveInstructionCount()
+ " regs (o/n):" + oldCountRegs
+ "/" + rmeth.getBlocks().getRegCount());
}
int newCountInsns
= rmeth.getBlocks().getEffectiveInstructionCount();
runningDeltaInsns
+= (newCountInsns - oldCountInsns);
runningDeltaRegisters
+= (rmeth.getBlocks().getRegCount() - oldCountRegs);
runningTotalInsns += newCountInsns;
}
代码示例来源:origin: com.google.android.tools/dx
/**
* Updates the ROP statistics.
*
* @param nonOptRmeth non-optimized method
* @param rmeth optimized method
*/
public static void updateRopStatistics(RopMethod nonOptRmeth,
RopMethod rmeth) {
int oldCountInsns
= nonOptRmeth.getBlocks().getEffectiveInstructionCount();
int oldCountRegs = nonOptRmeth.getBlocks().getRegCount();
if (DEBUG) {
System.err.println("insns (old/new): "
+ oldCountInsns + "/"
+ rmeth.getBlocks().getEffectiveInstructionCount()
+ " regs (o/n):" + oldCountRegs
+ "/" + rmeth.getBlocks().getRegCount());
}
int newCountInsns
= rmeth.getBlocks().getEffectiveInstructionCount();
runningDeltaInsns
+= (newCountInsns - oldCountInsns);
runningDeltaRegisters
+= (rmeth.getBlocks().getRegCount() - oldCountRegs);
runningTotalInsns += newCountInsns;
}
内容来源于网络,如有侵权,请联系作者删除!