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

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

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

Bytecode.getMaxStack介绍

[英]Gets max_stack.
[中]获取max_stack

代码示例

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  try {
    compileExpr(drv);
    code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
    return code.getMaxStack();
  }
  catch (CompileError e) {
    throw new CannotCompileException(e);
  }
}

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

int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  try {
    code.addAload(0);
    compileExpr(drv);
    code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
    return code.getMaxStack();
  }
  catch (CompileError e) {
    throw new CannotCompileException(e);
  }
}

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

@Override
int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  try {
    compileExpr(drv);
    code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
    return code.getMaxStack();
  }
  catch (CompileError e) {
    throw new CannotCompileException(e);
  }
}

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

protected void replace0(int pos, Bytecode bytecode, int size)
    throws BadBytecode {
  byte[] code = bytecode.get();
  edited = true;
  int gap = code.length - size;
  for (int i = 0; i < size; ++i)
    iterator.writeByte(NOP, pos + i);
  if (gap > 0)
    pos = iterator.insertGapAt(pos, gap, false).position;
  iterator.write(code, pos);
  iterator.insert(bytecode.getExceptionTable(), pos);
  maxLocals = bytecode.getMaxLocals();
  maxStack = bytecode.getMaxStack();
}

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

@Override
int compile(CtClass type, String name, Bytecode code,
      CtClass[] parameters, Javac drv)
  throws CannotCompileException
{
  try {
    code.addAload(0);
    compileExpr(drv);
    code.addPutfield(Bytecode.THIS, name, Descriptor.of(type));
    return code.getMaxStack();
  }
  catch (CompileError e) {
    throw new CannotCompileException(e);
  }
}

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

protected void replace0(int pos, Bytecode bytecode, int size)
    throws BadBytecode {
  byte[] code = bytecode.get();
  edited = true;
  int gap = code.length - size;
  for (int i = 0; i < size; ++i)
    iterator.writeByte(NOP, pos + i);
  if (gap > 0)
    pos = iterator.insertGapAt(pos, gap, false).position;
  iterator.write(code, pos);
  iterator.insert(bytecode.getExceptionTable(), pos);
  maxLocals = bytecode.getMaxLocals();
  maxStack = bytecode.getMaxStack();
}

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

- b.currentPc() + 1);
maxStack = b.getMaxStack();
maxLocals = b.getMaxLocals();

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

jv.recordParams(getParameterTypes(), false);
jv.compileStmnt(src);
ca.setMaxStack(b.getMaxStack());
ca.setMaxLocals(b.getMaxLocals());
iterator.skipConstructor();

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

jv.compileStmnt(src);
Bytecode b = jv.getBytecode();
int stack = b.getMaxStack();
int locals = b.getMaxLocals();

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

- b.currentPc() + 1);
maxStack = b.getMaxStack();
maxLocals = b.getMaxLocals();

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

Bytecode b = jv.getBytecode();
int locals = b.getMaxLocals();
int stack = b.getMaxStack();
ca.setMaxLocals(locals);

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

jv.recordParams(getParameterTypes(), false);
jv.compileStmnt(src);
ca.setMaxStack(b.getMaxStack());
ca.setMaxLocals(b.getMaxLocals());
iterator.skipConstructor();

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

jv.compileStmnt(src);
int stack = b.getMaxStack();
int locals = b.getMaxLocals();

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

jv.compileStmnt(src);
Bytecode b = jv.getBytecode();
int stack = b.getMaxStack();
int locals = b.getMaxLocals();

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

Bytecode b = jv.getBytecode();
int locals = b.getMaxLocals();
int stack = b.getMaxStack();
ca.setMaxLocals(locals);

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

jv.compileStmnt(src);
int stack = b.getMaxStack();
int locals = b.getMaxLocals();

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

ca.setMaxStack(b.getMaxStack());
ca.setMaxLocals(b.getMaxLocals());
methodInfo.rebuildStackMapIf6(cc.getClassPool(), cc.getClassFile2());

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

ca.setMaxStack(b.getMaxStack());
ca.setMaxLocals(b.getMaxLocals());
methodInfo.rebuildStackMapIf6(cc.getClassPool(), cc.getClassFile2());

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  try {
    compileExpr(drv);
    code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
    return code.getMaxStack();
  }
  catch (CompileError e) {
    throw new CannotCompileException(e);
  }
}

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

int compileIfStatic(CtClass type, String name, Bytecode code,
          Javac drv) throws CannotCompileException
{
  try {
    compileExpr(drv);
    code.addPutstatic(Bytecode.THIS, name, Descriptor.of(type));
    return code.getMaxStack();
  }
  catch (CompileError e) {
    throw new CannotCompileException(e);
  }
}

相关文章