# HG changeset patch # User Lukas Stadler # Date 1417031481 28800 # Node ID bbf27a6ffb527d9f4b400ece5e1d79ef9c7d46c4 # Parent 8f4945c8126aceff968b12e17258ee3d9b8bea66 add graph to context in TruffleCacheImpl.cacheLookup diff -r 8f4945c8126a -r bbf27a6ffb52 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCacheImpl.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCacheImpl.java Wed Nov 26 21:00:02 2014 +0100 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCacheImpl.java Wed Nov 26 11:51:21 2014 -0800 @@ -144,15 +144,19 @@ lookupExceedsMaxSize(); } + StructuredGraph graph; + PhaseContext phaseContext = new PhaseContext(providers, new Assumptions(false)); try (Scope s = Debug.scope("TruffleCache", providers.getMetaAccess(), method)) { - final PhaseContext phaseContext = new PhaseContext(providers, new Assumptions(false)); - Mark mark = null; - - final StructuredGraph graph = parseGraph(method, phaseContext); + graph = parseGraph(method, phaseContext); if (graph == null) { return null; } + } catch (Throwable e) { + throw Debug.handle(e); + } + + try (Scope s = Debug.scope("TruffleCache", providers.getMetaAccess(), method, graph)) { lastUsed.put(key, counter++); cache.put(key, markerGraph); @@ -172,6 +176,7 @@ PartialEscapePhase partialEscapePhase = new PartialEscapePhase(false, canonicalizer); + Mark mark = null; while (true) { partialEscapePhase.apply(graph, phaseContext);