# HG changeset patch # User Miguel Garcia # Date 1401721217 -7200 # Node ID 66fe80527060b0f3d3a0711c2f5b668cc507340a # Parent 1b07ca2f6c39d02204caa2059282be13e9b83285 [inliner] both parts of what used to be a single method now invoked in sequence diff -r 1b07ca2f6c39 -r 66fe80527060 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java Mon Jun 02 16:53:23 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java Mon Jun 02 17:00:17 2014 +0200 @@ -42,7 +42,8 @@ private final StructuredGraph graph; public InlineableGraph(final ResolvedJavaMethod method, final Invoke invoke, final HighTierContext context, CanonicalizerPhase canonicalizer) { - this.graph = buildGraph(method, invoke, context, canonicalizer); + this.graph = buildGraph(method, context, canonicalizer); + specializeGraphToArguments(this.graph, invoke, context, canonicalizer); } /** @@ -60,19 +61,14 @@ return null; } - private static StructuredGraph buildGraph(final ResolvedJavaMethod method, final Invoke invoke, final HighTierContext context, CanonicalizerPhase canonicalizer) { + private static StructuredGraph buildGraph(final ResolvedJavaMethod method, final HighTierContext context, CanonicalizerPhase canonicalizer) { StructuredGraph newGraph = getOriginalGraph(method, context); if (newGraph == null) { newGraph = parseBytecodes(method, context, canonicalizer); } - newGraph = newGraph.copy(); - // TODO (chaeubl): copying the graph is only necessary if it is modified or if it contains // any invokes - - specializeGraphToArguments(newGraph, invoke, context, canonicalizer); - - return newGraph; + return newGraph.copy(); } /**