final Register r = ref.getRegister(); checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int i = idx.getValue(); os.writeMOV(INTSIZE, r, r, i + VmArray.DATA_OFFSET * 4); } else { final Register i = idx.getRegister(); os.writeMOV(INTSIZE, r, r, i, 4, VmArray.DATA_OFFSET * 4); idx.release(eContext); }
final Register refr = ref.getRegister(); checkBounds(ref, idx); if (idx.isConstant()) { final int i = idx.getValue(); os.writeMOV(INTSIZE, resultr, refr, (i * 4) + arrayDataOffset); } else { final Register idxr = idx.getRegister(); os.writeMOV(INTSIZE, resultr, refr, idxr, 4, arrayDataOffset * 4); }
    public final void visit_iaload() {        IntItem idx = vstack.popInt();        RefItem ref = vstack.popRef();        idx.loadIf(eContext, ~Item.Kind.CONSTANT);        ref.load(eContext);        final Register r = ref.getRegister();        checkBounds(ref, idx);        if (idx.getKind() == Item.Kind.CONSTANT) {            final int i = idx.getValue();            os.writeMOV(INTSIZE, r, r, i + VmArray.DATA_OFFSET * 4);        } else {            final Register i = idx.getRegister();            os.writeMOV(INTSIZE, r, r, i, 4, VmArray.DATA_OFFSET * 4);            idx.release(eContext);        }        final IntItem result = IntItem.createReg(r);        eContext.getPool().transferOwnerTo(r, result);        vstack.push(result);    }