# HG changeset patch # User Tom Rodriguez # Date 1392849711 28800 # Node ID 68ae6fae9d2e4c01d6ec9dbd81bc8b1eb4be6e71 # Parent 5568586d32a6d8131b652caf0e1c516b7ca2ee46 freeze graphs before inserting into table diff -r 5568586d32a6 -r 68ae6fae9d2e graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java --- 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;