public abstract class Word extends Object implements Signed, Unsigned, Pointer
Modifier and Type | Class and Description |
---|---|
static class |
Word.Opcode
The canonical
Word.Operation represented by a method in the Word class. |
static interface |
Word.Operation
Links a method to a canonical operation represented by an
Word.Opcode val. |
Constructor and Description |
---|
Word() |
Modifier and Type | Method and Description |
---|---|
boolean |
aboveOrEqual(int val)
Compares this Unsigned with the specified value.
|
boolean |
aboveOrEqual(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
aboveOrEqual(Word val) |
boolean |
aboveThan(int val)
Compares this Unsigned with the specified value.
|
boolean |
aboveThan(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
aboveThan(Word val) |
Word |
add(int val)
Returns a Signed whose value is
(this + val) . |
Word |
add(Signed val)
Returns a Signed whose value is
(this + val) . |
Word |
add(Unsigned val)
Returns a Unsigned whose value is
(this + val) . |
Word |
add(Word val) |
Word |
and(int val)
Returns a Signed whose value is
(this & val) . |
Word |
and(Signed val)
Returns a Signed whose value is
(this & val) . |
Word |
and(Unsigned val)
Returns a Unsigned whose value is
(this & val) . |
Word |
and(Word val) |
boolean |
belowOrEqual(int val)
Compares this Unsigned with the specified value.
|
boolean |
belowOrEqual(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
belowOrEqual(Word val) |
boolean |
belowThan(int val)
Compares this Unsigned with the specified value.
|
boolean |
belowThan(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
belowThan(Word val) |
private static Word |
box(long val) |
boolean |
equal(ComparableWord val)
Compares this word with the specified value.
|
boolean |
equal(int val)
Compares this Signed with the specified value.
|
boolean |
equal(Signed val)
Compares this Signed with the specified value.
|
boolean |
equal(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
equal(Word val) |
boolean |
equals(Object obj) |
static Pointer |
fromAddress(AddressNode.Address address) |
static Pointer |
fromObject(Object val) |
static Word |
fromWordBase(WordBase val) |
boolean |
greaterOrEqual(int val)
Compares this Signed with the specified value.
|
boolean |
greaterOrEqual(Signed val)
Compares this Signed with the specified value.
|
boolean |
greaterOrEqual(Word val) |
boolean |
greaterThan(int val)
Compares this Signed with the specified value.
|
boolean |
greaterThan(Signed val)
Compares this Signed with the specified value.
|
boolean |
greaterThan(Word val) |
int |
hashCode() |
void |
initializeLong(int offset,
long val,
LocationIdentity locationIdentity)
Initializes the memory at address
(this + offset) . |
void |
initializeLong(WordBase offset,
long val,
LocationIdentity locationIdentity)
Initializes the memory at address
(this + offset) . |
private static Word |
intParam(int val) |
boolean |
lessOrEqual(int val)
Compares this Signed with the specified value.
|
boolean |
lessOrEqual(Signed val)
Compares this Signed with the specified value.
|
boolean |
lessOrEqual(Word val) |
boolean |
lessThan(int val)
Compares this Signed with the specified value.
|
boolean |
lessThan(Signed val)
Compares this Signed with the specified value.
|
boolean |
lessThan(Word val) |
Word |
multiply(int val)
Returns a Signed whose value is
(this * val) . |
Word |
multiply(Signed val)
Returns a Signed whose value is
(this * val) . |
Word |
multiply(Unsigned val)
Returns a Unsigned whose value is
(this * val) . |
Word |
multiply(Word val) |
Word |
not()
Returns a Signed whose value is
(~this) . |
boolean |
notEqual(ComparableWord val)
Compares this word with the specified value.
|
boolean |
notEqual(int val)
Compares this Signed with the specified value.
|
boolean |
notEqual(Signed val)
Compares this Signed with the specified value.
|
boolean |
notEqual(Unsigned val)
Compares this Unsigned with the specified value.
|
boolean |
notEqual(Word val) |
Word |
or(int val)
Returns a Signed whose value is
(this | val) . |
Word |
or(Signed val)
Returns a Signed whose value is
(this | val) . |
Word |
or(Unsigned val)
Returns a Unsigned whose value is
(this | val) . |
Word |
or(Word val) |
static <T extends PointerBase> |
pointer(long val)
Unsafe conversion from a Java long value to a
pointer . |
long |
rawValue() |
byte |
readByte(int offset)
Reads the memory at address
(this + offset) . |
byte |
readByte(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
byte |
readByte(WordBase offset)
Reads the memory at address
(this + offset) . |
byte |
readByte(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
char |
readChar(int offset)
Reads the memory at address
(this + offset) . |
char |
readChar(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
char |
readChar(WordBase offset)
Reads the memory at address
(this + offset) . |
char |
readChar(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
double |
readDouble(int offset)
Reads the memory at address
(this + offset) . |
double |
readDouble(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
double |
readDouble(WordBase offset)
Reads the memory at address
(this + offset) . |
double |
readDouble(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
float |
readFloat(int offset)
Reads the memory at address
(this + offset) . |
float |
readFloat(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
float |
readFloat(WordBase offset)
Reads the memory at address
(this + offset) . |
float |
readFloat(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
int |
readInt(int offset)
Reads the memory at address
(this + offset) . |
int |
readInt(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
int |
readInt(WordBase offset)
Reads the memory at address
(this + offset) . |
int |
readInt(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
long |
readLong(int offset)
Reads the memory at address
(this + offset) . |
long |
readLong(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
long |
readLong(WordBase offset)
Reads the memory at address
(this + offset) . |
long |
readLong(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
Object |
readObject(int offset)
Reads the memory at address
(this + offset) . |
Object |
readObject(int offset,
HeapAccess.BarrierType barrierType)
Reads the memory at address
(this + offset) . |
Object |
readObject(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
Object |
readObject(WordBase offset)
Reads the memory at address
(this + offset) . |
Object |
readObject(WordBase offset,
HeapAccess.BarrierType barrierType)
Reads the memory at address
(this + offset) . |
Object |
readObject(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
short |
readShort(int offset)
Reads the memory at address
(this + offset) . |
short |
readShort(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
short |
readShort(WordBase offset)
Reads the memory at address
(this + offset) . |
short |
readShort(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
Word |
readWord(int offset)
Reads the memory at address
(this + offset) . |
Word |
readWord(int offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
Word |
readWord(WordBase offset)
Reads the memory at address
(this + offset) . |
Word |
readWord(WordBase offset,
LocationIdentity locationIdentity)
Reads the memory at address
(this + offset) . |
Word |
shiftLeft(int val)
Returns a Signed whose value is
(this << n) . |
Word |
shiftLeft(Unsigned val)
Returns a Signed whose value is
(this << n) . |
Word |
shiftLeft(Word val) |
static Word |
signed(int val)
Unsafe conversion from a Java int value to a Word.
|
static Word |
signed(long val)
Unsafe conversion from a Java long value to a Word.
|
Word |
signedDivide(int val)
Returns a Signed whose value is
(this / val) . |
Word |
signedDivide(Signed val)
Returns a Signed whose value is
(this / val) . |
Word |
signedDivide(Word val) |
Word |
signedRemainder(int val)
Returns a Signed whose value is
(this % val) . |
Word |
signedRemainder(Signed val)
Returns a Signed whose value is
(this % val) . |
Word |
signedRemainder(Word val) |
Word |
signedShiftRight(int val)
Returns a Signed whose value is
(this >> n) . |
Word |
signedShiftRight(Unsigned val)
Returns a Signed whose value is
(this >> n) . |
Word |
signedShiftRight(Word val) |
Word |
subtract(int val)
Returns a Signed whose value is
(this - val) . |
Word |
subtract(Signed val)
Returns a Signed whose value is
(this - val) . |
Word |
subtract(Unsigned val)
Returns a Unsigned whose value is
(this - val) . |
Word |
subtract(Word val) |
Object |
toObject()
Unsafe conversion of this Pointer to a Java language object.
|
String |
toString() |
protected abstract long |
unbox() |
static Word |
unsigned(int val)
Unsafe conversion from a Java int value to a Word.
|
static Word |
unsigned(long val)
Unsafe conversion from a Java long value to a Word.
|
Word |
unsignedDivide(int val)
Returns a Unsigned whose value is
(this / val) . |
Word |
unsignedDivide(Unsigned val)
Returns a Unsigned whose value is
(this / val) . |
Word |
unsignedDivide(Word val) |
Word |
unsignedRemainder(int val)
Returns a Unsigned whose value is
(this % val) . |
Word |
unsignedRemainder(Unsigned val)
Returns a Unsigned whose value is
(this % val) . |
Word |
unsignedRemainder(Word val) |
Word |
unsignedShiftRight(int val)
Returns a Unsigned whose value is
(this >>> n) . |
Word |
unsignedShiftRight(Unsigned val)
Returns a Unsigned whose value is
(this >>> n) . |
Word |
unsignedShiftRight(Word val) |
void |
writeByte(int offset,
byte val)
Writes the memory at address
(this + offset) . |
void |
writeByte(int offset,
byte val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeByte(WordBase offset,
byte val)
Writes the memory at address
(this + offset) . |
void |
writeByte(WordBase offset,
byte val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeChar(int offset,
char val)
Writes the memory at address
(this + offset) . |
void |
writeChar(int offset,
char val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeChar(WordBase offset,
char val)
Writes the memory at address
(this + offset) . |
void |
writeChar(WordBase offset,
char val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeDouble(int offset,
double val)
Writes the memory at address
(this + offset) . |
void |
writeDouble(int offset,
double val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeDouble(WordBase offset,
double val)
Writes the memory at address
(this + offset) . |
void |
writeDouble(WordBase offset,
double val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeFloat(int offset,
float val)
Writes the memory at address
(this + offset) . |
void |
writeFloat(int offset,
float val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeFloat(WordBase offset,
float val)
Writes the memory at address
(this + offset) . |
void |
writeFloat(WordBase offset,
float val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeInt(int offset,
int val)
Writes the memory at address
(this + offset) . |
void |
writeInt(int offset,
int val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeInt(WordBase offset,
int val)
Writes the memory at address
(this + offset) . |
void |
writeInt(WordBase offset,
int val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeLong(int offset,
long val)
Writes the memory at address
(this + offset) . |
void |
writeLong(int offset,
long val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeLong(WordBase offset,
long val)
Writes the memory at address
(this + offset) . |
void |
writeLong(WordBase offset,
long val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeObject(int offset,
Object val)
Writes the memory at address
(this + offset) . |
void |
writeObject(int offset,
Object val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeObject(WordBase offset,
Object val)
Writes the memory at address
(this + offset) . |
void |
writeObject(WordBase offset,
Object val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeShort(int offset,
short val)
Writes the memory at address
(this + offset) . |
void |
writeShort(int offset,
short val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeShort(WordBase offset,
short val)
Writes the memory at address
(this + offset) . |
void |
writeShort(WordBase offset,
short val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeWord(int offset,
WordBase val)
Writes the memory at address
(this + offset) . |
void |
writeWord(int offset,
WordBase val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
void |
writeWord(WordBase offset,
WordBase val)
Writes the memory at address
(this + offset) . |
void |
writeWord(WordBase offset,
WordBase val,
LocationIdentity locationIdentity)
Writes the memory at address
(this + offset) . |
Word |
xor(int val)
Returns a Signed whose value is
(this ^ val) . |
Word |
xor(Signed val)
Returns a Signed whose value is
(this ^ val) . |
Word |
xor(Unsigned val)
Returns a Unsigned whose value is
(this ^ val) . |
Word |
xor(Word val) |
static Word |
zero()
The constant 0, i.e., the word with no bits set.
|
public Word()
protected abstract long unbox()
public static Word zero()
public static Word unsigned(long val)
val
- a 64 bit unsigned valuepublic static <T extends PointerBase> T pointer(long val)
pointer
. The parameter is
treated as an unsigned 64-bit value (in contrast to the semantics of a Java long).val
- a 64 bit unsigned valuepublic static Word unsigned(int val)
val
- a 32 bit unsigned valuepublic static Word signed(long val)
val
- a 64 bit signed valuepublic static Word signed(int val)
val
- a 32 bit signed valuepublic static Word fromWordBase(WordBase val)
public static Pointer fromObject(Object val)
public static Pointer fromAddress(AddressNode.Address address)
public Object toObject()
Pointer
public Word add(Signed val)
Signed
(this + val)
.public Word add(Unsigned val)
Unsigned
(this + val)
.public Word add(int val)
Signed
(this + val)
.public Word subtract(Signed val)
Signed
(this - val)
.public Word subtract(Unsigned val)
Unsigned
(this - val)
.public Word subtract(int val)
Signed
(this - val)
.public Word multiply(Signed val)
Signed
(this * val)
.public Word multiply(Unsigned val)
Unsigned
(this * val)
.public Word multiply(int val)
Signed
(this * val)
.public Word signedDivide(Signed val)
Signed
(this / val)
.signedDivide
in interface Signed
val
- value by which this Signed is to be divided.this / val
public Word signedDivide(int val)
Signed
(this / val)
.signedDivide
in interface Signed
val
- value by which this Signed is to be divided.this / val
public Word signedDivide(Word val)
public Word unsignedDivide(Unsigned val)
Unsigned
(this / val)
.unsignedDivide
in interface Unsigned
val
- value by which this Unsigned is to be divided.this / val
public Word unsignedDivide(int val)
Unsigned
(this / val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
unsignedDivide
in interface Unsigned
val
- value by which this Unsigned is to be divided.this / val
public Word unsignedDivide(Word val)
public Word signedRemainder(Signed val)
Signed
(this % val)
.signedRemainder
in interface Signed
val
- value by which this Signed is to be divided, and the remainder computed.this % val
public Word signedRemainder(int val)
Signed
(this % val)
.signedRemainder
in interface Signed
val
- value by which this Signed is to be divided, and the remainder computed.this % val
public Word signedRemainder(Word val)
public Word unsignedRemainder(Unsigned val)
Unsigned
(this % val)
.unsignedRemainder
in interface Unsigned
val
- value by which this Unsigned is to be divided, and the remainder computed.this % val
public Word unsignedRemainder(int val)
Unsigned
(this % val)
.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
unsignedRemainder
in interface Unsigned
val
- value by which this Unsigned is to be divided, and the remainder computed.this % val
public Word unsignedRemainder(Word val)
public Word shiftLeft(Unsigned val)
Signed
(this << n)
.public Word shiftLeft(int val)
Signed
(this << n)
.public Word signedShiftRight(Unsigned val)
Signed
(this >> n)
. Sign extension is performed.signedShiftRight
in interface Signed
val
- shift distance, in bits.this >> n
public Word signedShiftRight(int val)
Signed
(this >> n)
. Sign extension is performed.signedShiftRight
in interface Signed
val
- shift distance, in bits.this >> n
public Word signedShiftRight(Word val)
public Word unsignedShiftRight(Unsigned val)
Unsigned
(this >>> n)
. No sign extension is performed.unsignedShiftRight
in interface Unsigned
val
- shift distance, in bits.this >> n
public Word unsignedShiftRight(int val)
Unsigned
(this >>> n)
. No sign extension is performed.
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
unsignedShiftRight
in interface Unsigned
val
- shift distance, in bits.this >> n
public Word unsignedShiftRight(Word val)
public Word and(Signed val)
Signed
(this & val)
. (This method returns a negative Signed
if and only if this and val are both negative.)public Word and(Unsigned val)
Unsigned
(this & val)
.public Word and(int val)
Signed
(this & val)
. (This method returns a negative Signed
if and only if this and val are both negative.)public Word or(Signed val)
Signed
(this | val)
. (This method returns a negative Signed
if and only if either this or val is negative.)public Word or(Unsigned val)
Unsigned
(this | val)
.public Word or(int val)
Signed
(this | val)
. (This method returns a negative Signed
if and only if either this or val is negative.)public Word xor(Signed val)
Signed
(this ^ val)
. (This method returns a negative Signed
if and only if exactly one of this and val are negative.)public Word xor(Unsigned val)
Unsigned
(this ^ val)
.public Word xor(int val)
Signed
(this ^ val)
. (This method returns a negative Signed
if and only if exactly one of this and val are negative.)public Word not()
Signed
(~this)
. (This method returns a negative value if and
only if this Signed is non-negative.)public boolean equal(ComparableWord val)
ComparableWord
equal
in interface ComparableWord
val
- value to which this word is to be compared.this == val
public boolean equal(Signed val)
Signed
public boolean equal(Unsigned val)
Unsigned
public boolean equal(int val)
Signed
public boolean notEqual(ComparableWord val)
ComparableWord
notEqual
in interface ComparableWord
val
- value to which this word is to be compared.this != val
public boolean notEqual(Signed val)
Signed
public boolean notEqual(Unsigned val)
Unsigned
public boolean notEqual(int val)
Signed
public boolean lessThan(Signed val)
Signed
public boolean lessThan(int val)
Signed
public boolean lessOrEqual(Signed val)
Signed
lessOrEqual
in interface Signed
val
- value to which this Signed is to be compared.this <= val
public boolean lessOrEqual(int val)
Signed
lessOrEqual
in interface Signed
val
- value to which this Signed is to be compared.this <= val
public boolean lessOrEqual(Word val)
public boolean greaterThan(Signed val)
Signed
greaterThan
in interface Signed
val
- value to which this Signed is to be compared.this > val
public boolean greaterThan(int val)
Signed
greaterThan
in interface Signed
val
- value to which this Signed is to be compared.this > val
public boolean greaterThan(Word val)
public boolean greaterOrEqual(Signed val)
Signed
greaterOrEqual
in interface Signed
val
- value to which this Signed is to be compared.this >= val
public boolean greaterOrEqual(int val)
Signed
greaterOrEqual
in interface Signed
val
- value to which this Signed is to be compared.this >= val
public boolean greaterOrEqual(Word val)
public boolean belowThan(Unsigned val)
Unsigned
public boolean belowThan(int val)
Unsigned
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
public boolean belowOrEqual(Unsigned val)
Unsigned
belowOrEqual
in interface Unsigned
val
- value to which this Unsigned is to be compared.this <= val
public boolean belowOrEqual(int val)
Unsigned
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
belowOrEqual
in interface Unsigned
val
- value to which this Unsigned is to be compared.this <= val
public boolean belowOrEqual(Word val)
public boolean aboveThan(Unsigned val)
Unsigned
public boolean aboveThan(int val)
Unsigned
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
public boolean aboveOrEqual(Unsigned val)
Unsigned
aboveOrEqual
in interface Unsigned
val
- value to which this Unsigned is to be compared.this >= val
public boolean aboveOrEqual(int val)
Unsigned
Note that the right operand is a signed value, while the operation is performed unsigned. Therefore, the result is only well-defined for positive right operands.
aboveOrEqual
in interface Unsigned
val
- value to which this Unsigned is to be compared.this >= val
public boolean aboveOrEqual(Word val)
public byte readByte(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public char readChar(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public short readShort(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public int readInt(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public long readLong(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public float readFloat(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public double readDouble(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
readDouble
in interface Pointer
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the readpublic Word readWord(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public Object readObject(WordBase offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
readObject
in interface Pointer
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the readpublic byte readByte(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public char readChar(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public short readShort(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public int readInt(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public long readLong(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public float readFloat(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public double readDouble(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.readDouble
in interface Pointer
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the readpublic Word readWord(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public Object readObject(int offset, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.readObject
in interface Pointer
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the readpublic void writeByte(WordBase offset, byte val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeChar(WordBase offset, char val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeShort(WordBase offset, short val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeShort
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeInt(WordBase offset, int val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeLong(WordBase offset, long val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeFloat(WordBase offset, float val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeFloat
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeDouble(WordBase offset, double val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeDouble
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeWord(WordBase offset, WordBase val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void initializeLong(WordBase offset, long val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset
are in bytes. The memory must be uninitialized or zero prior to this operation.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
initializeLong
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeObject(WordBase offset, Object val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeObject
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeByte(int offset, byte val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeChar(int offset, char val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeShort(int offset, short val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeShort
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeInt(int offset, int val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeLong(int offset, long val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeFloat(int offset, float val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeFloat
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeDouble(int offset, double val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeDouble
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeWord(int offset, WordBase val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void initializeLong(int offset, long val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset
are in bytes. The memory must be uninitialized or zero prior to this operation.initializeLong
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic void writeObject(int offset, Object val, LocationIdentity locationIdentity)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeObject
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the writepublic byte readByte(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public char readChar(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public short readShort(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public int readInt(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public long readLong(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public float readFloat(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public double readDouble(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
readDouble
in interface Pointer
offset
- the signed offset for the memory accesspublic Word readWord(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public Object readObject(WordBase offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
readObject
in interface Pointer
offset
- the signed offset for the memory accesspublic Object readObject(WordBase offset, HeapAccess.BarrierType barrierType)
Pointer
(this + offset)
. This access will decompress the oop if
the VM uses compressed oops, and it can be parameterized to allow read barriers (G1 referent
field).
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
readObject
in interface Pointer
offset
- the signed offset for the memory accessbarrierType
- the type of the read barrier to be addedpublic byte readByte(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public char readChar(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public short readShort(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public int readInt(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public long readLong(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public float readFloat(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public double readDouble(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.readDouble
in interface Pointer
offset
- the signed offset for the memory accesspublic Word readWord(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public Object readObject(int offset)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.readObject
in interface Pointer
offset
- the signed offset for the memory accesspublic Object readObject(int offset, HeapAccess.BarrierType barrierType)
Pointer
(this + offset)
. This access will decompress the oop if
the VM uses compressed oops, and it can be parameterized to allow read barriers (G1 referent
field).readObject
in interface Pointer
offset
- the signed offset for the memory accessbarrierType
- the type of the read barrier to be addedpublic void writeByte(WordBase offset, byte val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeChar(WordBase offset, char val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeShort(WordBase offset, short val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeShort
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeInt(WordBase offset, int val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeLong(WordBase offset, long val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeFloat(WordBase offset, float val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeFloat
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeDouble(WordBase offset, double val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeDouble
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeWord(WordBase offset, WordBase val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
public void writeObject(WordBase offset, Object val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.
The offset is always treated as a Signed
value. However, the static type is
WordBase
to avoid the frequent casts to of Unsigned
values (where the caller
knows that the highest-order bit of the unsigned value is never used).
writeObject
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeByte(int offset, byte val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeChar(int offset, char val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeShort(int offset, short val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeShort
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeInt(int offset, int val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeLong(int offset, long val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeFloat(int offset, float val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeFloat
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeDouble(int offset, double val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeDouble
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memorypublic void writeWord(int offset, WordBase val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.public void writeObject(int offset, Object val)
Pointer
(this + offset)
. Both the base address and offset are in
bytes.writeObject
in interface Pointer
offset
- the signed offset for the memory accessval
- the value to be written to memory