< prev index next >

src/java.base/share/classes/java/lang/invoke/VarHandleMemoryAddressBase.java

Print this page

        

*** 27,52 **** /** * Base class for memory access var handle implementations. */ abstract class VarHandleMemoryAddressBase extends VarHandle { final boolean be; final long length; final long offset; - final long alignment; ! VarHandleMemoryAddressBase(VarForm form, boolean be, long length, long offset, long alignment) { super(form); this.be = be; this.length = length; this.offset = offset; ! this.alignment = alignment; } static IllegalStateException newIllegalStateExceptionForMisalignedAccess(long address) { return new IllegalStateException("Misaligned access at address: " + address); } abstract long[] strides(); abstract Class<?> carrier(); } --- 27,63 ---- /** * Base class for memory access var handle implementations. */ abstract class VarHandleMemoryAddressBase extends VarHandle { + + /** endianness **/ final boolean be; + + /** access size (in bytes, computed from var handle carrier type) **/ final long length; + + /** access offset (in bytes); must be compatible with {@code alignmentMask} **/ final long offset; ! /** alignment constraint (in bytes, expressed as a bit mask) **/ ! final long alignmentMask; ! ! VarHandleMemoryAddressBase(VarForm form, boolean be, long length, long offset, long alignmentMask) { super(form); this.be = be; this.length = length; this.offset = offset; ! this.alignmentMask = alignmentMask; } static IllegalStateException newIllegalStateExceptionForMisalignedAccess(long address) { return new IllegalStateException("Misaligned access at address: " + address); } + /** + * Strides used for multi-dimensional access; each stride must be compatible with {@code alignmentMask}. + */ abstract long[] strides(); abstract Class<?> carrier(); }
< prev index next >