We should not access base and shift from either CompressedOops or CompressedClassPointers if we run with -XX:-UseCompressedOops resp. -XX:-UseCompressedClassPointers.
This works accidentally in the stock JVM since base and shift are both statically initialized with zero. In Lilliput, however, base and shift are initialized to -1 in order to assert proper initialization.
In general, it is best to avoid calling these methods altogether, since they make little sense in the non-compressed case.
This works accidentally in the stock JVM since base and shift are both statically initialized with zero. In Lilliput, however, base and shift are initialized to -1 in order to assert proper initialization.
In general, it is best to avoid calling these methods altogether, since they make little sense in the non-compressed case.