gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 21:08:03 33 4
gpt4 key购买 nike

本文整理了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);
  }
}

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com