SpeculationReasonEncoding
that produces a byte
array. Data is added via a DataOutputStream
. When producing the final byte array, if the
total length of data exceeds 31, then a SHA-1 digest
of the data is produced instead.
Modifier and Type | Field and Description |
---|---|
private DataOutputStream | |
pack-priv static final int | LENGTH_BITS
Number of bits used for the length of an encoded speculation. |
pack-priv static final int | |
pack-priv static final int | MAX_LENGTH
The maximum length of an encoded speculation. |
private static final int | |
private static final int | |
private static final int | |
private byte[] | |
private static final MessageDigest | SHA1
Prototype SHA1 digest. |
private static final boolean | SHA1_IS_CLONEABLE
Cloning the prototype is quicker than calling |
private static final int |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public void | |
public void | |
public void | |
public void | |
private boolean | |
public void | |
public void | addString(String value)
Implements jdk.
|
public void | |
private void | |
pack-priv byte[] | getByteArray()
Gets the final encoded byte array and closes this encoding such that any further attempts to
update it result in an |
dos | back to summary |
---|---|
private DataOutputStream dos |
LENGTH_BITS | back to summary |
---|---|
pack-priv static final int LENGTH_BITS Number of bits used for the length of an encoded speculation. The bit size of 5 is chosen to accommodate specifying // the length of a SHA-1 digest (i.e., 20 bytes). |
LENGTH_MASK | back to summary |
---|---|
pack-priv static final int LENGTH_MASK |
MAX_LENGTH | back to summary |
---|---|
pack-priv static final int MAX_LENGTH The maximum length of an encoded speculation. |
NULL_METHOD | back to summary |
---|---|
private static final int NULL_METHOD |
NULL_STRING | back to summary |
---|---|
private static final int NULL_STRING |
NULL_TYPE | back to summary |
---|---|
private static final int NULL_TYPE |
result | back to summary |
---|---|
private byte[] result |
SHA1 | back to summary |
---|---|
private static final MessageDigest SHA1 Prototype SHA1 digest. |
SHA1_IS_CLONEABLE | back to summary |
---|---|
private static final boolean SHA1_IS_CLONEABLE Cloning the prototype is quicker than calling |
SHA1_LENGTH | back to summary |
---|---|
private static final int SHA1_LENGTH |
HotSpotSpeculationEncoding | back to summary |
---|---|
pack-priv HotSpotSpeculationEncoding() |
addByte | back to summary |
---|---|
public void addByte(int value) Implements jdk.
|
addInt | back to summary |
---|---|
public void addInt(int value) Implements jdk.
|
addLong | back to summary |
---|---|
public void addLong(long value) Implements jdk.
|
addMethod | back to summary |
---|---|
public void addMethod(ResolvedJavaMethod method) Implements jdk.
|
addNull | back to summary |
---|---|
private boolean addNull(Object o, int nullValue) |
addShort | back to summary |
---|---|
public void addShort(int value) Implements jdk.
|
addString | back to summary |
---|---|
public void addString(String value) Implements jdk.
|
addType | back to summary |
---|---|
public void addType(ResolvedJavaType type) Implements jdk.
|
checkOpen | back to summary |
---|---|
private void checkOpen() |
getByteArray | back to summary |
---|---|
pack-priv byte[] getByteArray() Gets the final encoded byte array and closes this encoding such that any further attempts to
update it result in an |