changeset 18212:546cfe7a19b6

Truffle: add getQueuedCallTargets to GraalTruffleRuntime.
author Christian Humer <christian.humer@gmail.com>
date Thu, 30 Oct 2014 18:12:45 +0100
parents 16757e473b36
children c489edfac1c7
files graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java	Tue Oct 28 14:29:16 2014 +0100
+++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java	Thu Oct 30 18:12:45 2014 +0100
@@ -259,6 +259,11 @@
     }
 
     @Override
+    public Collection<OptimizedCallTarget> getQueuedCallTargets() {
+        return compilations.keySet().stream().filter(e -> !compilations.get(e).isDone()).collect(Collectors.toList());
+    }
+
+    @Override
     public boolean isCompiling(OptimizedCallTarget optimizedCallTarget) {
         Future<?> codeTask = this.compilations.get(optimizedCallTarget);
         if (codeTask != null) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java	Tue Oct 28 14:29:16 2014 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java	Thu Oct 30 18:12:45 2014 +0100
@@ -224,6 +224,8 @@
         getCompilationNotify().notifyShutdown(this);
     }
 
+    public abstract Collection<OptimizedCallTarget> getQueuedCallTargets();
+
     public abstract Replacements getReplacements();
 
     public abstract void compile(OptimizedCallTarget optimizedCallTarget, boolean mayBeAsynchronous);