javassist.bytecode.Bytecode.addDstore()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(101)

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

Bytecode.addDstore介绍

[英]Appends DSTORE or (WIDE) DSTORE_<n>
[中]附加数据存储或(宽)数据存储

代码示例

代码示例来源:origin: redisson/redisson

addFstore(n);
else if (type == CtClass.doubleType) {
  addDstore(n);
  return 2;

代码示例来源:origin: redisson/redisson

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: org.javassist/javassist

addFstore(n);
else if (type == CtClass.doubleType) {
  addDstore(n);
  return 2;

代码示例来源:origin: org.javassist/javassist

@Override
  protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: redisson/redisson

break;
case DRETURN :
  b.addDstore(getVar(2));
  jsrJmp(b);
  b.addDload(var);

代码示例来源:origin: redisson/redisson

bytecode.addAstore(varNo);
else if (varType == DOUBLE)
  bytecode.addDstore(varNo);
else if (varType == FLOAT)
  bytecode.addFstore(varNo);

代码示例来源:origin: org.javassist/javassist

break;
case DRETURN :
  b.addDstore(getVar(2));
  jsrJmp(b);
  b.addDload(var);

代码示例来源:origin: org.javassist/javassist

bytecode.addAstore(varNo);
else if (varType == DOUBLE)
  bytecode.addDstore(varNo);
else if (varType == FLOAT)
  bytecode.addFstore(varNo);

代码示例来源:origin: redisson/redisson

if (c == 'D') {
  b.addDconst(0.0);
  b.addDstore(returnVarNo);

代码示例来源:origin: org.javassist/javassist

if (c == 'D') {
  b.addDconst(0.0);
  b.addDstore(returnVarNo);

代码示例来源:origin: redisson/redisson

bytecode.addOpcode(DUP2);
bytecode.addDstore(var);

代码示例来源:origin: org.javassist/javassist

bytecode.addOpcode(DUP2);
bytecode.addDstore(var);

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

private static void addTypeDependDataStore(Bytecode code, String typeName,
                      int i) {
  if ((typeName.charAt(0) == 'L')
    && (typeName.charAt(typeName.length() - 1) == ';')
    || (typeName.charAt(0) == '[')) {
    // reference type
    code.addAstore(i);
  } else if (typeName.equals("Z") || typeName.equals("B")
        || typeName.equals("C") || typeName.equals("I")
        || typeName.equals("S")) {
    // boolean, byte, char, int, short
    code.addIstore(i);
  } else if (typeName.equals("D")) {
    // double
    code.addDstore(i);
  } else if (typeName.equals("F")) {
    // float
    code.addFstore(i);
  } else if (typeName.equals("J")) {
    // long
    code.addLstore(i);
  } else {
    // bad type
    throw new RuntimeException("bad type: " + typeName);
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

private static void addTypeDependDataStore(Bytecode code, String typeName,
                      int i) {
  if ((typeName.charAt(0) == 'L')
    && (typeName.charAt(typeName.length() - 1) == ';')
    || (typeName.charAt(0) == '[')) {
    // reference type
    code.addAstore(i);
  } else if (typeName.equals("Z") || typeName.equals("B")
        || typeName.equals("C") || typeName.equals("I")
        || typeName.equals("S")) {
    // boolean, byte, char, int, short
    code.addIstore(i);
  } else if (typeName.equals("D")) {
    // double
    code.addDstore(i);
  } else if (typeName.equals("F")) {
    // float
    code.addFstore(i);
  } else if (typeName.equals("J")) {
    // long
    code.addLstore(i);
  } else {
    // bad type
    throw new RuntimeException("bad type: " + typeName);
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

addFstore(n);
else if (type == CtClass.doubleType) {
  addDstore(n);
  return 2;

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

addFstore(n);
else if (type == CtClass.doubleType) {
  addDstore(n);
  return 2;

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

代码示例来源:origin: org.jboss/javassist

protected boolean doit(Bytecode b, int opcode) {
    switch (opcode) {
    case Opcode.RETURN :
      break;
    case ARETURN :
      b.addAstore(var);
      break;
    case IRETURN :
      b.addIstore(var);
      break;
    case LRETURN :
      b.addLstore(var);
      break;
    case DRETURN :
      b.addDstore(var);
      break;
    case FRETURN :
      b.addFstore(var);
      break;
    default :
      throw new RuntimeException("fatal");
    }
    b.addOpcode(Opcode.GOTO);
    b.addIndex(target - b.currentPc() + 3);
    return true;
  }
}

相关文章