# HG changeset patch # User twisti # Date 1383359733 25200 # Node ID 1c0261ebeeedecd3b846d1c58460bb365587a0f7 # Parent 1a7e7011a3413e92146a3f6ceaf7e16d4bf6012e use getAddress instead of getLong in HotSpotResolvedJavaMethod diff -r 1a7e7011a341 -r 1c0261ebeeed graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java Fri Nov 01 18:34:03 2013 -0400 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java Fri Nov 01 19:35:33 2013 -0700 @@ -74,11 +74,11 @@ */ public static HotSpotResolvedObjectType getHolder(long metaspaceMethod) { HotSpotVMConfig config = runtime().getConfig(); - long constMethod = unsafe.getLong(metaspaceMethod + config.methodConstMethodOffset); + long constMethod = unsafe.getAddress(metaspaceMethod + config.methodConstMethodOffset); assert constMethod != 0; - long constantPool = unsafe.getLong(constMethod + config.constMethodConstantsOffset); + long constantPool = unsafe.getAddress(constMethod + config.constMethodConstantsOffset); assert constantPool != 0; - long holder = unsafe.getLong(constantPool + config.constantPoolHolderOffset); + long holder = unsafe.getAddress(constantPool + config.constantPoolHolderOffset); assert holder != 0; return (HotSpotResolvedObjectType) HotSpotResolvedObjectType.fromMetaspaceKlass(holder); } @@ -231,7 +231,7 @@ return 0; } HotSpotVMConfig config = runtime().getConfig(); - long metaspaceConstMethod = unsafe.getLong(metaspaceMethod + config.methodConstMethodOffset); + long metaspaceConstMethod = unsafe.getAddress(metaspaceMethod + config.methodConstMethodOffset); return unsafe.getShort(metaspaceConstMethod + config.methodMaxLocalsOffset) & 0xFFFF; } @@ -242,7 +242,7 @@ return 0; } HotSpotVMConfig config = runtime().getConfig(); - long metaspaceConstMethod = unsafe.getLong(metaspaceMethod + config.methodConstMethodOffset); + long metaspaceConstMethod = unsafe.getAddress(metaspaceMethod + config.methodConstMethodOffset); return config.extraStackEntries + (unsafe.getShort(metaspaceConstMethod + config.constMethodMaxStackOffset) & 0xFFFF); }