public void fsub() { assertTypeOnStack(StackEntryType.FLOAT, "fsub requires float on stack"); assertTypeOnStack(1, StackEntryType.FLOAT, "fsub requires float in position 2 on stack"); writeByte(Opcode.FSUB); currentOffset++; advanceFrame(currentFrame.pop()); }
public void baload() { assertTypeOnStack(StackEntryType.INT, "baload requires an int on top of the stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "baload requires an array in position 2 on the stack"); writeByte(Opcode.BALOAD); currentOffset++; advanceFrame(currentFrame.pop2push1("I")); }
public void drem() { assertTypeOnStack(StackEntryType.DOUBLE, "drem requires double on stack"); assertTypeOnStack(2, StackEntryType.DOUBLE, "drem requires double in position 3 on stack"); writeByte(Opcode.DREM); currentOffset++; advanceFrame(currentFrame.pop2()); }
public void ishr() { assertTypeOnStack(StackEntryType.INT, "ishr requires int on stack"); assertTypeOnStack(1, StackEntryType.INT, "ishr requires int on stack"); writeByte(Opcode.ISHR); currentOffset++; advanceFrame(currentFrame.pop()); }
public void land() { assertTypeOnStack(StackEntryType.LONG, "land requires long on stack"); assertTypeOnStack(2, StackEntryType.LONG, "land requires long on stack"); writeByte(Opcode.LAND); currentOffset++; advanceFrame(currentFrame.pop2()); }
public void faload() { assertTypeOnStack(StackEntryType.INT, "faload requires an int on top of the stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "faload requires an array in position 2 on the stack"); writeByte(Opcode.FALOAD); currentOffset++; advanceFrame(currentFrame.pop2push1("F")); }
public void fmul() { assertTypeOnStack(StackEntryType.FLOAT, "fmul requires float on stack"); assertTypeOnStack(1, StackEntryType.FLOAT, "fmul requires float in position 2 on stack"); writeByte(Opcode.FMUL); currentOffset++; advanceFrame(currentFrame.pop()); }
public void drem() { assertTypeOnStack(StackEntryType.DOUBLE, "drem requires double on stack"); assertTypeOnStack(2, StackEntryType.DOUBLE, "drem requires double in position 3 on stack"); writeByte(Opcode.DREM); currentOffset++; advanceFrame(currentFrame.pop2()); }
public void iaload() { assertTypeOnStack(StackEntryType.INT, "iaload requires an int on top of the stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "iaload requires an array in position 2 on the stack"); writeByte(Opcode.IALOAD); currentOffset++; advanceFrame(currentFrame.pop2push1("I")); }
public void imul() { assertTypeOnStack(StackEntryType.INT, "imul requires int on stack"); assertTypeOnStack(1, StackEntryType.INT, "imul requires int in position 2 on stack"); writeByte(Opcode.IMUL); currentOffset++; advanceFrame(currentFrame.pop()); }
public BranchEnd ifAcmpeq() { assertTypeOnStack(StackEntryType.OBJECT, "ifAcmpeq requires reference type on stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "ifAcmpeq requires reference type int position 2 on stack"); writeByte(Opcode.IF_ACMPEQ); writeShort(0); currentOffset += 3; advanceFrame(currentFrame.pop2()); return new BranchEnd(currentOffset - 2, currentFrame, currentOffset - 3); }
public void caload() { assertTypeOnStack(StackEntryType.INT, "caload requires an int on top of the stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "caload requires an array in position 2 on the stack"); writeByte(Opcode.CALOAD); currentOffset++; advanceFrame(currentFrame.pop2push1("I")); }
public void ishr() { assertTypeOnStack(StackEntryType.INT, "ishr requires int on stack"); assertTypeOnStack(1, StackEntryType.INT, "ishr requires int on stack"); writeByte(Opcode.ISHR); currentOffset++; advanceFrame(currentFrame.pop()); }
public BranchEnd ifAcmpne() { assertTypeOnStack(StackEntryType.OBJECT, "ifAcmpne requires reference type on stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "ifAcmpne requires reference type int position 2 on stack"); writeByte(Opcode.IF_ACMPNE); writeShort(0); currentOffset += 3; advanceFrame(currentFrame.pop2()); BranchEnd ret = new BranchEnd(currentOffset - 2, currentFrame, currentOffset - 3); return ret; }
public void laload() { assertTypeOnStack(StackEntryType.INT, "laload requires an int on top of the stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "laload requires an array in position 2 on the stack"); writeByte(Opcode.LALOAD); currentOffset++; advanceFrame(currentFrame.pop2push1("J")); }
public void isub() { assertTypeOnStack(StackEntryType.INT, "isub requires int on stack"); assertTypeOnStack(1, StackEntryType.INT, "isub requires int on stack"); writeByte(Opcode.ISUB); currentOffset++; advanceFrame(currentFrame.pop()); }
private BranchEnd addIfIcmp(int opcode, String name) { assertTypeOnStack(StackEntryType.INT, name + " requires int on stack"); assertTypeOnStack(1, StackEntryType.INT, name + " requires int int position 2 on stack"); writeByte(opcode); writeShort(0); currentOffset += 3; advanceFrame(currentFrame.pop2()); BranchEnd ret = new BranchEnd(currentOffset - 2, currentFrame, currentOffset - 3); return ret; }
public void fcmpg() { assertTypeOnStack(StackEntryType.FLOAT, "fcmpg requires float on stack"); assertTypeOnStack(1, StackEntryType.FLOAT, "fcmpg requires float on stack"); writeByte(Opcode.FCMPG); currentOffset++; advanceFrame(currentFrame.pop2push1("I")); }
public void isub() { assertTypeOnStack(StackEntryType.INT, "isub requires int on stack"); assertTypeOnStack(1, StackEntryType.INT, "isub requires int on stack"); writeByte(Opcode.ISUB); currentOffset++; advanceFrame(currentFrame.pop()); }
public BranchEnd ifAcmpne() { assertTypeOnStack(StackEntryType.OBJECT, "ifAcmpne requires reference type on stack"); assertTypeOnStack(1, StackEntryType.OBJECT, "ifAcmpne requires reference type int position 2 on stack"); writeByte(Opcode.IF_ACMPNE); writeShort(0); currentOffset += 3; advanceFrame(currentFrame.pop2()); BranchEnd ret = new BranchEnd(currentOffset - 2, currentFrame, currentOffset - 3); return ret; }