changeset 12654:1c0261ebeeed

use getAddress instead of getLong in HotSpotResolvedJavaMethod
author twisti
date Fri, 01 Nov 2013 19:35:33 -0700
parents 1a7e7011a341
children 2c4aa758ee18
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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);
     }