diff graal/com.oracle.jvmci.code/src/com/oracle/jvmci/code/CodeCacheProvider.java @ 21706:4c00096fc415

moved CodeCacheProvider.disassemble(...) from API to CFGPrinterObserver
author Doug Simon <doug.simon@oracle.com>
date Wed, 03 Jun 2015 16:52:41 +0200
parents 36cf15e3219e
children
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.code/src/com/oracle/jvmci/code/CodeCacheProvider.java	Wed Jun 03 16:23:33 2015 +0200
+++ b/graal/com.oracle.jvmci.code/src/com/oracle/jvmci/code/CodeCacheProvider.java	Wed Jun 03 16:52:41 2015 +0200
@@ -22,9 +22,11 @@
  */
 package com.oracle.jvmci.code;
 
-import com.oracle.jvmci.meta.*;
+import com.oracle.jvmci.code.CompilationResult.Call;
 import com.oracle.jvmci.code.CompilationResult.DataPatch;
+import com.oracle.jvmci.code.CompilationResult.Mark;
 import com.oracle.jvmci.code.DataSection.Data;
+import com.oracle.jvmci.meta.*;
 
 /**
  * Access to code cache related details and requirements.
@@ -54,16 +56,18 @@
     InstalledCode setDefaultMethod(ResolvedJavaMethod method, CompilationResult compResult);
 
     /**
-     * Returns a disassembly of some compiled code.
-     *
-     * @param compResult some compiled code
-     * @param installedCode the result of installing the code in {@code compResult} or null if the
-     *            code has not yet been installed
-     *
-     * @return a disassembly. This will be of length 0 if the runtime does not support
-     *         disassembling.
+     * Gets a name for a {@link Mark} mark.
      */
-    String disassemble(CompilationResult compResult, InstalledCode installedCode);
+    default String getMarkName(Mark mark) {
+        return String.valueOf(mark.id);
+    }
+
+    /**
+     * Gets a name for the {@linkplain Call#target target} of a {@link Call}.
+     */
+    default String getTargetName(Call call) {
+        return String.valueOf(call.target);
+    }
 
     /**
      * Gets the register configuration to use when compiling a given method.