changeset 13657:3730b9979305

remove duplicate code in VMToCompilerImpl.compileMethod
author Andreas Woess <andreas.woess@jku.at>
date Thu, 16 Jan 2014 20:56:07 +0100
parents cd14eb248cec
children d2976008ce63
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Thu Jan 16 20:53:18 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java	Thu Jan 16 20:56:07 2014 +0100
@@ -519,12 +519,7 @@
 
     @Override
     public void compileMethod(long metaspaceMethod, final int entryBCI, final boolean blocking) {
-        HotSpotVMConfig config = runtime().getConfig();
-        final long metaspaceConstMethod = unsafe.getAddress(metaspaceMethod + config.methodConstMethodOffset);
-        final long metaspaceConstantPool = unsafe.getAddress(metaspaceConstMethod + config.constMethodConstantsOffset);
-        final long metaspaceKlass = unsafe.getAddress(metaspaceConstantPool + config.constantPoolHolderOffset);
-        final HotSpotResolvedObjectType holder = (HotSpotResolvedObjectType) HotSpotResolvedObjectType.fromMetaspaceKlass(metaspaceKlass);
-        final HotSpotResolvedJavaMethod method = holder.createMethod(metaspaceMethod);
+        final HotSpotResolvedJavaMethod method = HotSpotResolvedJavaMethod.fromMetaspace(metaspaceMethod);
         // We have to use a privileged action here because compilations are enqueued from user code
         // which very likely contains unprivileged frames.
         AccessController.doPrivileged(new PrivilegedAction<Void>() {