Mercurial > hg > truffle
changeset 18550:bbf27a6ffb52
add graph to context in TruffleCacheImpl.cacheLookup
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Wed, 26 Nov 2014 11:51:21 -0800 |
parents | 8f4945c8126a |
children | 3fb1231699de |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCacheImpl.java |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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);