final boolean useBarrier = (context.getWriteBarrier() != null);  final RefItem val = vstack.popRef(); final IntItem idx = vstack.popInt(); final RefItem ref = vstack.popRef();   val.load(eContext);  idx.loadIf(eContext, (useBarrier) ? ~Item.Kind.REGISTER : ~(Item.Kind.CONSTANT | Item.Kind.REGISTER)); ref.load(eContext); final Register r = ref.getRegister(); final Register v = val.getRegister(); checkBounds(ref, idx); if (idx.isConstant()) { final int i = idx.getValue(); os.writeMOV(INTSIZE, r, i + VmArray.DATA_OFFSET * 4, v); } else { final Register i = idx.getRegister(); os.writeMOV(INTSIZE, r, i, 4, VmArray.DATA_OFFSET * 4, v); } if (useBarrier) {   final X86RegisterPool pool = eContext.getPool(); final Register scratch = pool.request(JvmType.INT); helper .writeArrayStoreWriteBarrier(r, idx.getRegister(), v, scratch); pool.release(scratch); }  val.release(eContext); idx.release(eContext); ref.release(eContext);
wastore(JvmType.REFERENCE);
	public final void visit_aastore() {		final boolean useBarrier = (context.getWriteBarrier() != null);		final RefItem val = vstack.popRef();		final IntItem idx = vstack.popInt();		final RefItem ref = vstack.popRef();		//IMPROVE: optimize case with const value		val.load(eContext);		// if barrier in use, the index must also be in a register		idx.loadIf(eContext, (useBarrier) ? ~Item.Kind.REGISTER				: ~(Item.Kind.CONSTANT | Item.Kind.REGISTER));		ref.load(eContext);		final Register r = ref.getRegister();		final Register v = val.getRegister();		checkBounds(ref, idx);		if (idx.isConstant()) {			final int i = idx.getValue();			os.writeMOV(INTSIZE, r, i + VmArray.DATA_OFFSET * 4, v);		} else {			final Register i = idx.getRegister();			os.writeMOV(INTSIZE, r, i, 4, VmArray.DATA_OFFSET * 4, v);		}		if (useBarrier) {			// the write barrier could easily be modified to avoid using a			// scratch register			final X86RegisterPool pool = eContext.getPool();			final Register scratch = pool.request(JvmType.INT);			helper					.writeArrayStoreWriteBarrier(r, idx.getRegister(), v,							scratch);			pool.release(scratch);		}		val.release(eContext);		idx.release(eContext);		ref.release(eContext);	}