void pushArguments(ThreadInfo ti, Object[] args, Object[] attrs) { if (args != null) { for (int i = 0; i < args.length; i++) { Object a = args[i]; boolean isLong = false; if (a != null) { if (a instanceof Ref) { ti.push(((Ref) a).getReference(), true); } else if (a instanceof Boolean) { ti.push((Boolean) a ? 1 : 0, false); } else if (a instanceof Integer) { ti.push((Integer) a, false); } else if (a instanceof Long) { ti.longPush((Long) a); isLong = true; } else if (a instanceof Double) { ti.longPush(Types.doubleToLong((Double) a)); isLong = true; } else if (a instanceof Byte) { ti.push((Byte) a, false); } else if (a instanceof Short) { ti.push((Short) a, false); } else if (a instanceof Float) { ti.push(Types.floatToInt((Float) a), false); } } if (attrs != null && attrs[i] != null) { if (isLong) { ti.setLongOperandAttr(attrs[i]); } else { ti.setOperandAttr(attrs[i]); } } } } }