Mercurial > hg > graal-compiler
changeset 23104:0ee453f11459
TruffleCompiler should be initialized in background compiler thread
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Fri, 27 Nov 2015 11:03:45 +0100 |
parents | fd6cdf381f98 |
children | ffeb971349e1 |
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, 3 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Thu Nov 26 14:22:06 2015 +0100 +++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java Fri Nov 27 11:03:45 2015 +0100 @@ -289,13 +289,6 @@ } @Override - public void compile(OptimizedCallTarget optimizedCallTarget, boolean mayBeAsynchronous) { - getTruffleCompiler(); - - super.compile(optimizedCallTarget, mayBeAsynchronous); - } - - @Override public boolean cancelInstalledTask(OptimizedCallTarget optimizedCallTarget, Object source, CharSequence reason) { if (lazy == null) { // if truffle wasn't initialized yet, this is a noop
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java Thu Nov 26 14:22:06 2015 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java Fri Nov 27 11:03:45 2015 +0100 @@ -371,14 +371,13 @@ protected abstract BackgroundCompileQueue getCompileQueue(); public void compile(OptimizedCallTarget optimizedCallTarget, boolean mayBeAsynchronous) { - Runnable r = new Runnable() { + BackgroundCompileQueue l = getCompileQueue(); + Future<?> future = l.compileQueue.submit(new Runnable() { @Override public void run() { doCompile(optimizedCallTarget); } - }; - BackgroundCompileQueue l = getCompileQueue(); - Future<?> future = l.compileQueue.submit(r); + }); l.compilations.put(optimizedCallTarget, future); getCompilationNotify().notifyCompilationQueued(optimizedCallTarget);