Mercurial > hg > truffle
changeset 15992:794daffa3850
[inliner] return result versus parameter mutation, former deemed more readable
author | Miguel Garcia <miguel.m.garcia@oracle.com> |
---|---|
date | Mon, 02 Jun 2014 16:28:19 +0200 |
parents | df679a9e6de0 |
children | c13b6c4e2786 |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java Sun Jun 01 19:50:02 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java Mon Jun 02 16:28:19 2014 +0200 @@ -63,8 +63,7 @@ private static StructuredGraph buildGraph(final ResolvedJavaMethod method, final Invoke invoke, final HighTierContext context, CanonicalizerPhase canonicalizer) { StructuredGraph newGraph = getOriginalGraph(method, context); if (newGraph == null) { - newGraph = new StructuredGraph(method); - parseBytecodes(newGraph, context, canonicalizer); + newGraph = parseBytecodes(method, context, canonicalizer); } newGraph = newGraph.copy(); @@ -171,11 +170,12 @@ } /** - * This method builds the IR nodes for <code>newGraph</code> and canonicalizes them. Provided - * profiling info is mature, the resulting graph is cached. The caller is responsible for - * cloning before modification.</p> + * This method builds the IR nodes for the given <code>method</code> and canonicalizes them. + * Provided profiling info is mature, the resulting graph is cached. The caller is responsible + * for cloning before modification.</p> */ - private static StructuredGraph parseBytecodes(StructuredGraph newGraph, HighTierContext context, CanonicalizerPhase canonicalizer) { + private static StructuredGraph parseBytecodes(ResolvedJavaMethod method, HighTierContext context, CanonicalizerPhase canonicalizer) { + StructuredGraph newGraph = new StructuredGraph(method); try (Debug.Scope s = Debug.scope("InlineGraph", newGraph)) { if (context.getGraphBuilderSuite() != null) { context.getGraphBuilderSuite().apply(newGraph, context);