8160197: [JVMCI] AllocatableValue.toString overrides are missing reference information
Reviewed-by: kvn
This commit is contained in:
parent
ac81dcb779
commit
9bea129ff7
@ -65,7 +65,7 @@ public abstract class Value {
|
||||
* {@link #toString()} implementation of subclasses.
|
||||
*/
|
||||
protected final String getKindSuffix() {
|
||||
return "|" + getPlatformKind().getTypeChar();
|
||||
return "|" + valueKind.getKindSuffix();
|
||||
}
|
||||
|
||||
public final ValueKind<?> getValueKind() {
|
||||
|
@ -60,6 +60,11 @@ public abstract class ValueKind<K extends ValueKind<K>> {
|
||||
public IllegalValueKind changeType(PlatformKind newPlatformKind) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ILLEGAL";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,4 +87,13 @@ public abstract class ValueKind<K extends ValueKind<K>> {
|
||||
* override this to preserve the additional information added by the compiler.
|
||||
*/
|
||||
public abstract K changeType(PlatformKind newPlatformKind);
|
||||
|
||||
/**
|
||||
* Returns a String representation of the kind, which will be included at the end of
|
||||
* {@link Value#toString()} implementation. Defaults to {@link #toString()} but can be
|
||||
* overridden to provide something more specific.
|
||||
*/
|
||||
public String getKindSuffix() {
|
||||
return toString();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user