public StackState dup2X1() { if (contents.size() < 3) { throw new InvalidBytecodeException("cannot dup2X1, stack size is " + contents.size() + " " + toString()); } StackEntry t1 = top(); StackEntry t2 = top_1(); StackEntry t3 = top_2(); if (t2.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X1 when second type on stack is wide: " + toString()); } if (t3.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X2 when third type on stack is wide: " + toString()); } ArrayList<StackEntry> ret = new ArrayList<StackEntry>(2 + contents.size()); for (int i = 0; i < contents.size(); ++i) { if (i == contents.size() - 3) { ret.add(t2); ret.add(t1); } ret.add(contents.get(i)); } return new StackState(ret, constPool); }
public StackState dup2X1() { if (contents.size() < 3) { throw new InvalidBytecodeException("cannot dup2X1, stack size is " + contents.size() + " " + toString()); } StackEntry t1 = top(); StackEntry t2 = top_1(); StackEntry t3 = top_2(); if (t2.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X1 when second type on stack is wide: " + toString()); } if (t3.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X2 when third type on stack is wide: " + toString()); } ArrayList<StackEntry> ret = new ArrayList<StackEntry>(2 + contents.size()); for (int i = 0; i < contents.size(); ++i) { if (i == contents.size() - 3) { ret.add(t2); ret.add(t1); } ret.add(contents.get(i)); } return new StackState(ret, constPool); }
public StackState dup2X1() { if (contents.size() < 3) { throw new InvalidBytecodeException("cannot dup2X1, stack size is " + contents.size() + " " + toString()); } StackEntry t1 = top(); StackEntry t2 = top_1(); StackEntry t3 = top_2(); if (t2.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X1 when second type on stack is wide: " + toString()); } if (t3.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X2 when third type on stack is wide: " + toString()); } ArrayList<StackEntry> ret = new ArrayList<StackEntry>(2 + contents.size()); for (int i = 0; i < contents.size(); ++i) { if (i == contents.size() - 3) { ret.add(t2); ret.add(t1); } ret.add(contents.get(i)); } return new StackState(ret, constPool); }
public StackState dup2X1() { if (contents.size() < 3) { throw new InvalidBytecodeException("cannot dup2X1, stack size is " + contents.size() + " " + toString()); } StackEntry t1 = top(); StackEntry t2 = top_1(); StackEntry t3 = top_2(); if (t2.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X1 when second type on stack is wide: " + toString()); } if (t3.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X2 when third type on stack is wide: " + toString()); } ArrayList<StackEntry> ret = new ArrayList<StackEntry>(2 + contents.size()); for (int i = 0; i < contents.size(); ++i) { if (i == contents.size() - 3) { ret.add(t2); ret.add(t1); } ret.add(contents.get(i)); } return new StackState(ret, constPool); }
public StackState dup2X1() { if (contents.size() < 3) { throw new InvalidBytecodeException("cannot dup2X1, stack size is " + contents.size() + " " + toString()); } StackEntry t1 = top(); StackEntry t2 = top_1(); StackEntry t3 = top_2(); if (t2.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X1 when second type on stack is wide: " + toString()); } if (t3.getType() == StackEntryType.TOP) { throw new InvalidBytecodeException("Cannot dup2X2 when third type on stack is wide: " + toString()); } ArrayList<StackEntry> ret = new ArrayList<StackEntry>(2 + contents.size()); for (int i = 0; i < contents.size(); ++i) { if (i == contents.size() - 3) { ret.add(t2); ret.add(t1); } ret.add(contents.get(i)); } return new StackState(ret, constPool); }
public void aastore() { assertTypeOnStack(StackEntryType.OBJECT, "aastore requires reference type on top of stack"); assertTypeOnStack(1, StackEntryType.INT, "aastore requires an int on position 2 stack"); if (!getStack().top_2().getDescriptor().startsWith("[")) { throw new InvalidBytecodeException("aaload needs an array in position 3 on the stack"); } writeByte(Opcode.AASTORE); currentOffset++; advanceFrame(currentFrame.pop3()); }
public void aastore() { assertTypeOnStack(StackEntryType.OBJECT, "aastore requires reference type on top of stack"); assertTypeOnStack(1, StackEntryType.INT, "aastore requires an int on position 2 stack"); if (!getStack().top_2().getDescriptor().startsWith("[")) { throw new InvalidBytecodeException("aaload needs an array in position 3 on the stack"); } writeByte(Opcode.AASTORE); currentOffset++; advanceFrame(currentFrame.pop3()); }
public void aastore() { assertTypeOnStack(StackEntryType.OBJECT, "aastore requires reference type on top of stack"); assertTypeOnStack(1, StackEntryType.INT, "aastore requires an int on position 2 stack"); if (!getStack().top_2().getDescriptor().startsWith("[")) { throw new InvalidBytecodeException("aaload needs an array in position 3 on the stack"); } writeByte(Opcode.AASTORE); currentOffset++; advanceFrame(currentFrame.pop3()); }
public void aastore() { assertTypeOnStack(StackEntryType.OBJECT, "aastore requires reference type on top of stack"); assertTypeOnStack(1, StackEntryType.INT, "aastore requires an int on position 2 stack"); if (!getStack().top_2().getDescriptor().startsWith("[")) { throw new InvalidBytecodeException("aaload needs an array in position 3 on the stack"); } writeByte(Opcode.AASTORE); currentOffset++; advanceFrame(currentFrame.pop3()); }
public void aastore() { assertTypeOnStack(StackEntryType.OBJECT, "aastore requires reference type on top of stack"); assertTypeOnStack(1, StackEntryType.INT, "aastore requires an int on position 2 stack"); if (!getStack().top_2().getDescriptor().startsWith("[")) { throw new InvalidBytecodeException("aaload needs an array in position 3 on the stack"); } writeByte(Opcode.AASTORE); currentOffset++; advanceFrame(currentFrame.pop3()); }