In the latest Android update (SDK 21), it appears that two new variables have been added to java.lang.Object
:
private transient Class<?> shadow$_klass_;
private transient int shadow$_monitor_;
I notice that shadow$_monitor_
is briefly used in hashCode()
:
public int hashCode() {
int lockWord = shadow$_monitor_;
final int lockWordMask = 0xC0000000; // Top 2 bits.
final int lockWordStateHash = 0x80000000; // Top 2 bits are value 2 (kStateHash).
if ((lockWord & lockWordMask) == lockWordStateHash) {
return lockWord & ~lockWordMask;
}
return System.identityHashCode(this);
}
But otherwise there are no references to them. Are they somehow related to GC in ART? Or some sort of native stuff?