case DALOAD:
case AALOAD:
case BALOAD:
case CALOAD:
case SALOAD: {
JInt index = (JInt) pop();
JArray array = (JArray) pop();
push(array.get(index.v));
} break;
case IASTORE:
case LASTORE:
case FASTORE:
case DASTORE:
case AASTORE: {
JObject value = pop();
JInt index = (JInt) pop();
JArray array = (JArray) pop();
array.set(index.v, value);
} break;
case BASTORE: {
JPrimitive value = (JPrimitive) pop();
JInt index = (JInt) pop();
JArray array = (JArray) pop();
array.set(index.v, new JByte((byte) value.intValue()));
} break;
case CASTORE: {
JPrimitive value = (JPrimitive) pop();
JInt index = (JInt) pop();
JArray array = (JArray) pop();
array.set(index.v, new JChar((char) value.intValue()));
} break;
case SASTORE: {
JPrimitive value = (JPrimitive) pop();
JInt index = (JInt) pop();
JArray array = (JArray) pop();
array.set(index.v, new JShort((short) value.intValue()));
} break;
case POP:
pop();
break;
case POP2:
throw new UnsupportedOperationException();
case DUP: {
JObject o = pop();
push(o);
push(o);
} break;
case DUP_X1: {
JObject o1 = pop();
JObject o2 = pop();
push(o1);
push(o2);
push(o1);
} break;
case DUP_X2:
throw new UnsupportedOperationException();
case DUP2:
throw new UnsupportedOperationException();
case DUP2_X1:
throw new UnsupportedOperationException();
case DUP2_X2:
throw new UnsupportedOperationException();
case SWAP: {
JObject o1 = pop();
JObject o2 = pop();
push(o1);
push(o2);
} break;
case IADD:
case LADD:
case FADD:
case DADD: {
JNumber n2 = (JNumber) pop();
JNumber n1 = (JNumber) pop();
push(n1.add(n2));
} break;
case ISUB:
case LSUB:
case FSUB:
case DSUB: {
JNumber n2 = (JNumber) pop();
JNumber n1 = (JNumber) pop();
push(n1.sub(n2));
} break;
case IMUL:
case LMUL:
case FMUL:
case DMUL: {
JNumber n2 = (JNumber) pop();
JNumber n1 = (JNumber) pop();
push(n1.mul(n2));
} break;
case IDIV:
case LDIV:
case FDIV:
case DDIV: {
JNumber n2 = (JNumber) pop();
JNumber n1 = (JNumber) pop();
push(n1.div(n2));
} break;
case IREM:
case LREM:
case FREM:
case DREM: {
JNumber n2 = (JNumber) pop();
JNumber n1 = (JNumber) pop();
push(n1.rem(n2));
} break;
case INEG:
case LNEG:
case FNEG:
case DNEG: {
JNumber n = (JNumber) pop();
push(n.neg());
} break;
case ISHL:
case LSHL: {
JInt n2 = (JInt) pop();
JBitNumber n1 = (JBitNumber) pop();
push(n1.shl(n2.v));
} break;
case ISHR:
case LSHR: {
JInt n2 = (JInt) pop();
JBitNumber n1 = (JBitNumber) pop();
push(n1.shr(n2.v));
} break;
case IUSHR:
case LUSHR: {
JInt n2 = (JInt) pop();
JBitNumber n1 = (JBitNumber) pop();
push(n1.ushr(n2.v));
} break;
case IAND:
case LAND: {
JBitNumber n2 = (JBitNumber) pop();
JBitNumber n1 = (JBitNumber) pop();
push(n1.and(n2));
} break;
case IOR:
case LOR: {
JBitNumber n2 = (JBitNumber) pop();
JBitNumber n1 = (JBitNumber) pop();
push(n1.or(n2));
} break;
case IXOR:
case LXOR: {
JBitNumber n2 = (JBitNumber) pop();
JBitNumber n1 = (JBitNumber) pop();
push(n1.xor(n2));
} break;
case I2L: {
JInt i = (JInt) pop();
push(new JLong(i.v));
} break;
case I2F: {
JInt i = (JInt) pop();
push(new JFloat(i.v));
} break;
case I2D: {
JInt i = (JInt) pop();
push(new JDouble(i.v));
} break;
case L2I: {
JLong i = (JLong) pop();
push(new JInt((int) i.v));
} break;
case L2F: {
JLong i = (JLong) pop();
push(new JFloat(i.v));
} break;
case L2D: {
JLong i = (JLong) pop();
push(new JDouble(i.v));
} break;
case F2I: {
JFloat i = (JFloat) pop();
push(new JInt((int) i.v));
} break;
case F2L: {
JFloat i = (JFloat) pop();
push(new JLong((long) i.v));
} break;
case F2D: {
JFloat i = (JFloat) pop();
push(new JDouble(i.v));
} break;
case D2I: {
JDouble i = (JDouble) pop();
push(new JInt((int) i.v));
} break;
case D2L: {
JDouble i = (JDouble) pop();
push(new JLong((long) i.v));
} break;
case D2F: {
JDouble i = (JDouble) pop();
push(new JFloat((float) i.v));
} break;
case I2B: {
JInt i = (JInt) pop();
push(new JByte((byte) i.v));
} break;
case I2C: {
JInt i = (JInt) pop();
push(new JChar((char) i.v));
} break;
case I2S: {
JInt i = (JInt) pop();
push(new JShort((short) i.v));
} break;
case LCMP: {
JLong l2 = (JLong) pop();
JLong l1 = (JLong) pop();
if (l1.v > l2.v) push(JInt._1);
else if (l1.v == l2.v) push(JInt._0);
else push(JInt._M1);
} break;
case FCMPL: {
JFloat f2 = (JFloat) pop();
JFloat f1 = (JFloat) pop();
if (Float.isNaN(f1.v) || Float.isNaN(f2.v)) push(JInt._M1);
else if (f1.v > f2.v) push(JInt._1);
else if (f1.v == f2.v) push(JInt._0);
else push(JInt._M1);
} break;
case FCMPG: {
JFloat f2 = (JFloat) pop();
JFloat f1 = (JFloat) pop();
if (Float.isNaN(f1.v) || Float.isNaN(f2.v)) push(JInt._1);
else if (f1.v > f2.v) push(JInt._1);
else if (f1.v == f2.v) push(JInt._0);
else push(JInt._M1);
} break;
case DCMPL: {
JDouble d2 = (JDouble) pop();
JDouble d1 = (JDouble) pop();
if (Double.isNaN(d1.v) || Double.isNaN(d2.v)) push(JInt._M1);
else if (d1.v > d2.v) push(JInt._1);
else if (d1.v == d2.v) push(JInt._0);
else push(JInt._M1);
} break;
case DCMPG: {
JDouble d2 = (JDouble) pop();
JDouble d1 = (JDouble) pop();
if (Double.isNaN(d1.v) || Double.isNaN(d2.v)) push(JInt._1);
else if (d1.v > d2.v) push(JInt._1);
else if (d1.v == d2.v) push(JInt._0);
else push(JInt._M1);
} break;
case IRETURN:
case LRETURN:
case FRETURN:
case DRETURN:
case ARETURN:
itsReturnValue = pop();
itsInstructionPointer = -1;
return;
case RETURN:
itsReturnValue = JPrimitive.VOID;
itsInstructionPointer = -1;
return;
case ARRAYLENGTH: {
JArray array = (JArray) pop();
push(new JInt(array.getSize()));
} break;
case ATHROW: {
JInstance theException = (JInstance) pop();
throwEx(theException);