/** * Return the logical number of stack positions changed by this * instruction. In other words, ignore weirdness with longs and doubles * taking two stack positions. */ public int getLogicalStackChange() { return getStackChange(); }
/** * Return the logical number of stack positions changed by this * instruction. In other words, ignore weirdness with longs and doubles * taking two stack positions. */ public int getLogicalStackChange() { return getStackChange(); }
/** * Calculate and set the maximum stack depth needed for * the instructions used. * * @see #setMaxStack */ public void calculateMaxStack() { int stack = 0; int max = 0; ExceptionHandler[] handlers = getExceptionHandlers(); Instruction ins; for (CodeEntry entry = _head.next; entry != _tail; entry = entry.next) { ins = (Instruction) entry; stack += ins.getStackChange(); // if this is the start of a try, the exception will be placed // on the stack for (int j = 0; j < handlers.length; j++) if (handlers[j].getTryStart() == ins) stack++; if (stack > max) max = stack; } setMaxStack(max); }
/** * Calculate and set the maximum stack depth needed for * the instructions used. * * @see #setMaxStack */ public void calculateMaxStack() { int stack = 0; int max = 0; ExceptionHandler[] handlers = getExceptionHandlers(); Instruction ins; for (CodeEntry entry = _head.next; entry != _tail; entry = entry.next) { ins = (Instruction) entry; stack += ins.getStackChange(); // if this is the start of a try, the exception will be placed // on the stack for (int j = 0; j < handlers.length; j++) if (handlers[j].getTryStart() == ins) stack++; if (stack > max) max = stack; } setMaxStack(max); }