int idx = ((IndexedInstruction) (ih.getInstruction())).getIndex(); acc.add(new Integer(idx));
int idx = ((IndexedInstruction) (ih.getInstruction())).getIndex(); acc.add(new Integer(idx));
/** * Compute maximum number of local variables. */ public void setMaxLocals() { if(il != null) { int max = isStatic()? 0 : 1; if(arg_types != null) for(int i=0; i < arg_types.length; i++) max += arg_types[i].getSize(); for(InstructionHandle ih = il.getStart(); ih != null; ih = ih.getNext()) { Instruction ins = ih.getInstruction(); if((ins instanceof LocalVariableInstruction) || (ins instanceof RET) || (ins instanceof IINC)) { int index = ((IndexedInstruction)ins).getIndex() + ((TypedInstruction)ins).getType(cp).getSize(); if(index > max) max = index; } } max_locals = max; } else max_locals = 0; }
/** * Compute maximum number of local variables. */ public void setMaxLocals() { if(il != null) { int max = isStatic()? 0 : 1; if(arg_types != null) for(int i=0; i < arg_types.length; i++) max += arg_types[i].getSize(); for(InstructionHandle ih = il.getStart(); ih != null; ih = ih.getNext()) { Instruction ins = ih.getInstruction(); if((ins instanceof LocalVariableInstruction) || (ins instanceof RET) || (ins instanceof IINC)) { int index = ((IndexedInstruction)ins).getIndex() + ((TypedInstruction)ins).getType(cp).getSize(); if(index > max) max = index; } } max_locals = max; } else max_locals = 0; }