diff --git a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Frame.java b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Frame.java index a3dd6c86..63987e4b 100644 --- a/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Frame.java +++ b/asm-analysis/src/main/java/org/objectweb/asm/tree/analysis/Frame.java @@ -179,6 +179,20 @@ public V getStack(final int index) { return values[nLocals + index]; } + /** + * Sets the value of the given stack slot. + * + * @param i + * the index of an operand stack slot. + * @param value + * the new value of the stack slot. + * @throws IndexOutOfBoundsException + * if the stack slot does not exist. + */ + public void setStack(final int i, final V value) throws IndexOutOfBoundsException { + values[i + nLocals] = value; + } + /** Clears the operand stack of this frame. */ public void clearStack() { nStack = 0;