IntItem val = vstack.popInt(); IntItem idx = vstack.popInt(); RefItem ref = vstack.popRef();   val.load(eContext); idx.loadIf(eContext, ~Item.Kind.CONSTANT); ref.load(eContext); final Register r = ref.getRegister(); final Register v = val.getRegister();  checkBounds(ref, idx); if (idx.getKind() == Item.Kind.CONSTANT) { final int i = idx.getValue(); os.writeMOV(WORDSIZE, r, i + VmArray.DATA_OFFSET * 4, v); } else { final Register i = idx.getRegister(); os.writeMOV(WORDSIZE, r, i, 2, VmArray.DATA_OFFSET * 4, v); } val.release(eContext); idx.release(eContext); ref.release(eContext);
wastore(JvmType.CHAR);
	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.Kind.CONSTANT);		ref.load(eContext);		final Register r = ref.getRegister();		final Register v = val.getRegister();		checkBounds(ref, idx);		if (idx.getKind() == Item.Kind.CONSTANT) {			final int i = idx.getValue();			os.writeMOV(WORDSIZE, r, i + VmArray.DATA_OFFSET * 4, v);		} else {			final Register i = idx.getRegister();			os.writeMOV(WORDSIZE, r, i, 2, VmArray.DATA_OFFSET * 4, v);		}		val.release(eContext);		idx.release(eContext);		ref.release(eContext);	}