# HG changeset patch
# User Miguel Garcia
# Date 1401719299 -7200
# Node ID 794daffa385046332b06f82bc9b97c63e05af484
# Parent df679a9e6de0f6dc266885eb05ef0c4bffbd1198
[inliner] return result versus parameter mutation, former deemed more readable
diff -r df679a9e6de0 -r 794daffa3850 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 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 newGraph
and canonicalizes them. Provided
- * profiling info is mature, the resulting graph is cached. The caller is responsible for
- * cloning before modification.
+ * This method builds the IR nodes for the given method
and canonicalizes them.
+ * Provided profiling info is mature, the resulting graph is cached. The caller is responsible
+ * for cloning before modification.
*/
- 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);