valSize = WORDSIZE; scale = 2; valType = JvmType.INT; break;
	private final void wastore(int jvmType) {		final boolean useBarrier = (context.getWriteBarrier() != null);		final int valSize;		final int scale;		final int valType;		int extraLoadIdxMask = 0;		switch (jvmType) {		case JvmType.BYTE:			valSize = BYTESIZE;			scale = 1;			valType = JvmType.INT;			break;		case JvmType.CHAR:			valSize = WORDSIZE;			scale = 2;			valType = JvmType.INT;			break;		case JvmType.SHORT:			valSize = WORDSIZE;			scale = 2;			valType = JvmType.INT;			break;		case JvmType.INT:			valSize = INTSIZE;			scale = 4;			valType = JvmType.INT;			break;		case JvmType.FLOAT:			valSize = INTSIZE;			scale = 4;			valType = JvmType.FLOAT;			break;		case JvmType.REFERENCE:			valSize = INTSIZE;			scale = 4;			valType = JvmType.REFERENCE;			extraLoadIdxMask = useBarrier ? ~Item.Kind.REGISTER : 0;			break;		default:			throw new IllegalArgumentException("Invalid type " + jvmType);		}		final WordItem val = (WordItem) vstack.pop(valType);		final IntItem idx = vstack.popInt();		final RefItem ref = vstack.popRef();		//IMPROVE: optimize case with const value		// Load		if (valSize == BYTESIZE) {			val.loadToBITS8GPR(eContext);		} else {			val.load(eContext);		}		idx.loadIf(eContext, ~Item.Kind.CONSTANT | extraLoadIdxMask);		ref.load(eContext);		final Register refr = ref.getRegister();		final Register valr = val.getRegister();		// Verify		checkBounds(ref, idx);		// Store		if (idx.isConstant()) {			final int offset = idx.getValue() * scale;			os.writeMOV(valSize, refr, offset + arrayDataOffset, valr);		} else {			final Register idxr = idx.getRegister();			os.writeMOV(valSize, refr, idxr, scale, arrayDataOffset, valr);		}		// Call write barrier (reference only)		if ((jvmType == JvmType.REFERENCE) && useBarrier) {			// the write barrier could easily be modified to avoid using a			// scratch register			final X86RegisterPool pool = eContext.getPool();			final Register idxr = idx.getRegister();			final Register scratch = pool.request(JvmType.INT);			helper.writeArrayStoreWriteBarrier(refr, idxr, valr, scratch);			pool.release(scratch);		}		// Release		val.release(eContext);		idx.release(eContext);		ref.release(eContext);	}