changeset 13980:68ae6fae9d2e

freeze graphs before inserting into table
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 19 Feb 2014 14:41:51 -0800
parents 5568586d32a6
children a1b71ebfdf5f
files graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Wed Feb 19 11:18:37 2014 -0800
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java	Wed Feb 19 14:41:51 2014 -0800
@@ -133,9 +133,10 @@
         }
         StructuredGraph graph = graphs.get(substitute);
         if (graph == null) {
-            graphs.putIfAbsent(substitute, makeGraph(substitute, original, substitute, inliningPolicy(substitute), FrameStateProcessing.None));
+            graph = makeGraph(substitute, original, substitute, inliningPolicy(substitute), FrameStateProcessing.None);
+            graph.freeze();
+            graphs.putIfAbsent(substitute, graph);
             graph = graphs.get(substitute);
-            graph.freeze();
         }
         assert graph.isFrozen();
         return graph;