# HG changeset patch # User Christos Kotselidis # Date 1377690302 -7200 # Node ID 1092208e498663aa89a786b56f50b4fcb934a3c9 # Parent a51c6eb8448ac59bc85475bd562357f0fdff98fe Add Javadoc diff -r a51c6eb8448a -r 1092208e4986 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Aug 28 13:27:05 2013 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Wed Aug 28 13:45:02 2013 +0200 @@ -404,6 +404,9 @@ } } + /** + * Returns whether or not the input access is a (de)compression candidate. + */ private static boolean isCompressCandidate(DeoptimizingNode access) { return access != null && ((HeapAccess) access).isCompressible(); } @@ -413,6 +416,16 @@ AMD64AddressValue loadAddress = asAddressValue(address); Variable result = newVariable(kind); assert access == null || access instanceof HeapAccess; + /** + * Currently, the (de)compression of pointers applies conditionally to some objects (oops, + * kind==Object) and some addresses (klass pointers, kind==Long). Initially, the input + * operation is checked to discover if it has been tagged as a potential "compression" + * candidate. Consequently, depending on the appropriate kind, the specific (de)compression + * functions are being called. Although, currently, the compression and decompression + * algorithms of oops and klass pointers are identical, in hotspot, they are implemented as + * separate methods. That means that in the future there might be the case where the + * algorithms may differ. + */ if (isCompressCandidate(access)) { if (runtime().config.useCompressedOops && kind == Kind.Object) { append(new LoadCompressedPointer(kind, result, runtime().heapBaseRegister().asValue(), loadAddress, access != null ? state(access) : null, runtime().config.narrowOopBase,