# HG changeset patch # User Tom Rodriguez # Date 1394160108 28800 # Node ID 43a80ad2730a5dc45119600a7c99cd25c397d776 # Parent 2ec05c3f773b5e7f10cf41fc96bf31cab895b5fe rename BeginEnqueue to Enqueueing diff -r 2ec05c3f773b -r 43a80ad2730a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Mar 06 18:41:42 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Thu Mar 06 18:41:48 2014 -0800 @@ -73,8 +73,8 @@ return withinEnqueue == null || withinEnqueue.get(); } - public static class BeginEnqueue implements Closeable { - public BeginEnqueue() { + public static class Enqueueing implements Closeable { + public Enqueueing() { assert !withinEnqueue.get(); withinEnqueue.set(Boolean.TRUE); } diff -r 2ec05c3f773b -r 43a80ad2730a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Thu Mar 06 18:41:42 2014 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Thu Mar 06 18:41:48 2014 -0800 @@ -39,6 +39,7 @@ import com.oracle.graal.debug.internal.*; import com.oracle.graal.graph.*; import com.oracle.graal.hotspot.*; +import com.oracle.graal.hotspot.CompilationTask.Enqueueing; import com.oracle.graal.hotspot.CompileTheWorld.Config; import com.oracle.graal.hotspot.debug.*; import com.oracle.graal.hotspot.meta.*; @@ -98,14 +99,14 @@ } public long getCompletedTaskCount() { - try (CompilationTask.BeginEnqueue beginEnqueue = new CompilationTask.BeginEnqueue()) { + try (Enqueueing enqueueing = new Enqueueing()) { // Don't allow new enqueues while reading the state of queue. return executor.getCompletedTaskCount(); } } public long getTaskCount() { - try (CompilationTask.BeginEnqueue beginEnqueue = new CompilationTask.BeginEnqueue()) { + try (Enqueueing enqueueing = new Enqueueing()) { // Don't allow new enqueues while reading the state of queue. return executor.getTaskCount(); } @@ -355,7 +356,7 @@ } public void shutdownCompiler() throws Exception { - try (CompilationTask.BeginEnqueue beginEnqueue = new CompilationTask.BeginEnqueue()) { + try (Enqueueing enqueueing = new Enqueueing()) { // We have to use a privileged action here because shutting down the compiler might be // called from user code which very likely contains unprivileged frames. AccessController.doPrivileged(new PrivilegedExceptionAction() { @@ -575,7 +576,7 @@ // Don't allow blocking compiles from CompilerThreads boolean block = blocking && !(Thread.currentThread() instanceof CompilerThread); - try (CompilationTask.BeginEnqueue beginEnqueue = new CompilationTask.BeginEnqueue()) { + try (Enqueueing enqueueing = new Enqueueing()) { if (method.tryToQueueForCompilation()) { assert method.isQueuedForCompilation();