Reserve locals for method arguments. Important if they are not accessed

afterwards.


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1280 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 24 years ago
parent 0250b87fe1
commit ef0a0f214b
  1. 4
      jode/jode/bytecode/BytecodeInfo.java.in

@ -957,7 +957,9 @@ public class BytecodeInfo extends BinaryInfo implements Opcodes {
/* Recalculate addr, length, maxStack, maxLocals and add all /* Recalculate addr, length, maxStack, maxLocals and add all
* constants to gcp */ * constants to gcp */
int addr = 0; int addr = 0;
maxLocals = 0; maxLocals = (methodInfo.isStatic() ? 0 : 1) +
TypeSignature.getArgumentSize(methodInfo.getType());
for (Iterator iter = instructions.iterator(); iter.hasNext(); ) { for (Iterator iter = instructions.iterator(); iter.hasNext(); ) {
Instruction instr = (Instruction) iter.next(); Instruction instr = (Instruction) iter.next();
int opcode = instr.getOpcode(); int opcode = instr.getOpcode();

Loading…
Cancel
Save