diff graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeCacheProvider.java @ 12526:04671d59e93b

Allow CodeCacheProvider to install default methods
author Matthias Grimmer <grimmer@ssw.jku.at>
date Mon, 21 Oct 2013 18:40:31 +0200
parents 78e5badf4b8e
children ecd85445f77a
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeCacheProvider.java	Mon Oct 21 17:48:54 2013 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeCacheProvider.java	Mon Oct 21 18:40:31 2013 +0200
@@ -42,6 +42,16 @@
     InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult);
 
     /**
+     * Adds the given compilation result as a default implementation of the given method.
+     * 
+     * @param method a method to which the executable code is begin added
+     * @param compResult the compilation result to be added
+     * @return a reference to the compiled and ready-to-run code or null if the code installation
+     *         failed
+     */
+    InstalledCode addDefaultMethod(ResolvedJavaMethod method, CompilationResult compResult);
+
+    /**
      * Returns a disassembly of some compiled code.
      * 
      * @param compResult some compiled code