changeset 13697:e8bd4f3776ee

changed return type of HotSpotCodeCacheProvider.addExternalMethod to be HotSpotNmethod
author Doug Simon <doug.simon@oracle.com>
date Mon, 20 Jan 2014 16:26:39 +0100
parents 71512822ac24
children c3370b2e1cbc
files graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java	Mon Jan 20 16:25:14 2014 +0100
+++ b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java	Mon Jan 20 16:26:39 2014 +0100
@@ -141,8 +141,8 @@
             public StructuredGraph getGraphFor(ResolvedJavaMethod method) {
                 if (canOffloadToGPU(method)) {
                     ExternalCompilationResult ptxCode = PTXHotSpotBackend.this.compileKernel(method, true);
-                    InstalledCode installedPTXCode = PTXHotSpotBackend.this.installKernel(method, ptxCode);
-                    return new PTXWrapperBuilder(method, installedPTXCode.getStart(), getRuntime().getHostBackend().getProviders()).getGraph();
+                    HotSpotNmethod installedPTXCode = PTXHotSpotBackend.this.installKernel(method, ptxCode);
+                    return new PTXWrapperBuilder(method, installedPTXCode, getRuntime().getHostBackend().getProviders()).getGraph();
                 }
                 return null;
             }
@@ -181,7 +181,7 @@
 
     }
 
-    public InstalledCode installKernel(ResolvedJavaMethod method, ExternalCompilationResult ptxCode) {
+    public HotSpotNmethod installKernel(ResolvedJavaMethod method, ExternalCompilationResult ptxCode) {
         assert ptxCode.getEntryPoint() != 0L;
         return getProviders().getCodeCache().addExternalMethod(method, ptxCode);
     }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java	Mon Jan 20 16:25:14 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java	Mon Jan 20 16:26:39 2014 +0100
@@ -190,16 +190,16 @@
         return installMethod(hotspotMethod, compResult);
     }
 
-    public InstalledCode addExternalMethod(ResolvedJavaMethod method, CompilationResult compResult) {
+    public HotSpotNmethod addExternalMethod(ResolvedJavaMethod method, CompilationResult compResult) {
         HotSpotResolvedJavaMethod javaMethod = (HotSpotResolvedJavaMethod) method;
-        HotSpotInstalledCode icode = new HotSpotNmethod(javaMethod, compResult.getName(), false, true);
+        HotSpotNmethod code = new HotSpotNmethod(javaMethod, compResult.getName(), false, true);
         HotSpotCompiledNmethod compiled = new HotSpotCompiledNmethod(target.arch, javaMethod, compResult);
         CompilerToVM vm = runtime.getCompilerToVM();
-        CodeInstallResult result = vm.installCode(compiled, icode, null);
+        CodeInstallResult result = vm.installCode(compiled, code, null);
         if (result != CodeInstallResult.OK) {
             return null;
         }
-        return icode;
+        return code;
     }
 
     public boolean needsDataPatch(Constant constant) {