Mercurial > hg > graal-jvmci-8
changeset 11453:1092208e4986
Add Javadoc
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Wed, 28 Aug 2013 13:45:02 +0200 |
parents | a51c6eb8448a |
children | ea7a15d708a8 |
files | graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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,