com.android.dx.rop.cst.Zeroes.zeroFor()方法的使用及代码示例

x33g5p2x  于5个月前 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(10)

本文整理了Java中com.android.dx.rop.cst.Zeroes.zeroFor()方法的一些代码示例,展示了Zeroes.zeroFor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zeroes.zeroFor()方法的具体详情如下:
包路径:com.android.dx.rop.cst.Zeroes
类名称:Zeroes
方法名:zeroFor

Zeroes.zeroFor介绍

[英]Gets the "zero" (or null) value for the given type.
[中]获取给定类型的“零”(或null)值。

代码示例

代码示例来源:origin: com.google.android.tools/dx

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: dragome/dragome-sdk

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: nikita36078/J2ME-Loader

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: gdpancheng/LoonAndroid3

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: com.android.tools.build/builder

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: com.android/dx

Constant cst = staticValues.get(field);
if (cst == null) {
  cst = Zeroes.zeroFor(field.getRef().getType());

代码示例来源:origin: nikita36078/J2ME-Loader

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

代码示例来源:origin: gdpancheng/LoonAndroid3

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

代码示例来源:origin: com.android/dx

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

代码示例来源:origin: com.google.dexmaker/dexmaker-dx

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

代码示例来源:origin: com.android.tools.build/builder

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

代码示例来源:origin: com.google.android.tools/dx

/**
 * Replaces the instructions that define an array with equivalent registers.
 * For each entry in the array, a register is created, initialized to zero.
 * A mapping between this register and the corresponding array index is
 * added.
 *
 * @param def {@code non-null;} move result instruction for array
 * @param prev {@code non-null;} instruction for instantiating new array
 * @param length size of the new array
 * @param newRegs {@code non-null;} mapping of array indices to new
 * registers to be populated
 */
private void replaceDef(SsaInsn def, SsaInsn prev, int length,
              ArrayList<RegisterSpec> newRegs) {
  Type resultType = def.getResult().getType();
  // Create new zeroed out registers for each element in the array
  for (int i = 0; i < length; i++) {
    Constant newZero = Zeroes.zeroFor(resultType.getComponentType());
    TypedConstant typedZero = (TypedConstant) newZero;
    RegisterSpec newReg =
      RegisterSpec.make(ssaMeth.makeNewSsaReg(), typedZero);
    newRegs.add(newReg);
    insertPlainInsnBefore(def, RegisterSpecList.EMPTY, newReg,
                 RegOps.CONST, newZero);
  }
}

相关文章

Zeroes类方法