}
val.load(eContext); idx.loadIf(eContext, ~Item.CONSTANT); ref.load(eContext); Register r = ref.getRegister();  checkBounds(ref, idx); if (idx.getKind() == Item.CONSTANT) { int i = idx.getValue(); os.writeMOV(WORDSIZE, r, i + VmArray.DATA_OFFSET * 4, val .getRegister()); } else { os.writeMOV(WORDSIZE, r, idx.getRegister(), 2, VmArray.DATA_OFFSET * 4, val.getRegister()); } val.release(eContext); idx.release(eContext); ref.release(eContext);       }
	public final void visit_castore() {		IntItem val = vstack.popInt();		IntItem idx = vstack.popInt();		RefItem ref = vstack.popRef();				//IMPROVE: optimize case with const value		val.load(eContext);		idx.loadIf(eContext, ~Item.CONSTANT);		ref.load(eContext);		Register r = ref.getRegister();				checkBounds(ref, idx);		if (idx.getKind() == Item.CONSTANT) {			int i = idx.getValue();			os.writeMOV(WORDSIZE, r, i + VmArray.DATA_OFFSET * 4, val.getRegister());		} else {			os.writeMOV(WORDSIZE, r, idx.getRegister(), 2, VmArray.DATA_OFFSET * 4, val.getRegister());					}		val.release(eContext);		idx.release(eContext);		ref.release(eContext);//		helper.writePOP(T1); // Value//		helper.writePOP(T0); // Index//		helper.writePOP(S0); // Arrayref//		checkBounds(S0, T0);//		os.writeMOV(WORDSIZE, S0, T0, 2, VmArray.DATA_OFFSET * 4, T1);	}