IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef(); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); Register r = ref.getRegister(); checkBounds(ref, idx); if (idx.isConstant()) { final int i = idx.getValue(); os.writeMOV(WORDSIZE, r, r, i + VmArray.DATA_OFFSET * 4); } else { os.writeMOV(WORDSIZE, r, r, idx.getRegister(), 2, VmArray.DATA_OFFSET * 4); idx.release(eContext); } os.writeMOVSX(r, r, WORDSIZE); final IntItem result = IntItem.createReg(r); eContext.getPool().transferOwnerTo(r, result); vstack.push(result);
waload(JvmType.SHORT);
	public final void visit_saload() {		IntItem idx = vstack.popInt();		RefItem ref = vstack.popRef();		idx.loadIf(eContext, ~Item.Kind.CONSTANT);		ref.load(eContext);		Register r = ref.getRegister();		checkBounds(ref, idx);		if (idx.isConstant()) {			final int i = idx.getValue();			os.writeMOV(WORDSIZE, r, r, i + VmArray.DATA_OFFSET * 4);		} else {			os.writeMOV(WORDSIZE, r, r, idx.getRegister(), 2,					VmArray.DATA_OFFSET * 4);			idx.release(eContext);		}		os.writeMOVSX(r, r, WORDSIZE);		final IntItem result = IntItem.createReg(r);		eContext.getPool().transferOwnerTo(r, result);		vstack.push(result);	}