# HG changeset patch # User Christian Haeubl # Date 1371538833 -7200 # Node ID 25de9c96a032af96b5a43932dc0df4e6070791b1 # Parent c0e9ae41ed177a2e71305e4615d655985a8c1182 Minor CompilationTask refactoring. diff -r c0e9ae41ed17 -r 25de9c96a032 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 Mon Jun 17 22:09:44 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jun 18 09:00:33 2013 +0200 @@ -66,7 +66,7 @@ private final int entryBCI; private final int id; private final int priority; - private final AtomicInteger status; + private final AtomicReference status; private StructuredGraph graph; @@ -83,7 +83,7 @@ this.entryBCI = entryBCI; this.id = id; this.priority = priority; - this.status = new AtomicInteger(); + this.status = new AtomicReference<>(); } public ResolvedJavaMethod getMethod() { @@ -224,7 +224,7 @@ } private boolean tryToChangeStatus(CompilationStatus from, CompilationStatus to) { - return status.compareAndSet(from.ordinal(), to.ordinal()); + return status.compareAndSet(from, to); } @Override diff -r c0e9ae41ed17 -r 25de9c96a032 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 Mon Jun 17 22:09:44 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompilerImpl.java Tue Jun 18 09:00:33 2013 +0200 @@ -582,7 +582,7 @@ } /** - * Compiled a method to machine code. + * Compiles a method to machine code. */ public void compileMethod(final HotSpotResolvedJavaMethod method, final int entryBCI, boolean blocking, int priority) throws Throwable { boolean osrCompilation = entryBCI != StructuredGraph.INVOCATION_ENTRY_BCI;