protected void push(FeatureExpr ctx, StackFrame frame, ElementInfo ei, int index) throws ArrayIndexOutOfBoundsExecutiveException { ei.checkArrayBounds(ctx, index); Conditional<Byte> value; Fields f = ei.getFields(); if (f instanceof ByteArrayFields) { value = ei.getByteElement(index); } else if (f instanceof BooleanArrayFields) { value = ei.getBooleanElement(index) .mapr( new Function<Boolean, Conditional<Byte>>() { @Override public Conditional<Byte> apply(Boolean v) { return One.valueOf((byte) (v ? 1 : 0)); } }) .simplify(); } else { value = nullValue; } frame.push(ctx, value); }
protected void setField(ElementInfo ei, int index) throws ArrayIndexOutOfBoundsExecutiveException { ei.checkArrayBounds(index); ei.setDoubleElement(index, value); }