--- old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java 2017-07-07 09:30:25.000000000 -0700 +++ new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/ObjectCloneNode.java 2017-07-07 09:30:24.000000000 -0700 @@ -27,8 +27,7 @@ import org.graalvm.compiler.core.common.type.AbstractPointerStamp; import org.graalvm.compiler.core.common.type.Stamp; import org.graalvm.compiler.core.common.type.StampPair; -import org.graalvm.compiler.debug.Debug; -import org.graalvm.compiler.debug.Debug.Scope; +import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.graph.NodeClass; import org.graalvm.compiler.nodeinfo.NodeInfo; import org.graalvm.compiler.nodes.CallTargetNode.InvokeKind; @@ -84,22 +83,23 @@ final ResolvedJavaMethod snippetMethod = tool.getMetaAccess().lookupJavaMethod(method); final Replacements replacements = tool.getReplacements(); StructuredGraph snippetGraph = null; - try (Scope s = Debug.scope("ArrayCloneSnippet", snippetMethod)) { + DebugContext debug = getDebug(); + try (DebugContext.Scope s = debug.scope("ArrayCloneSnippet", snippetMethod)) { snippetGraph = replacements.getSnippet(snippetMethod, null); } catch (Throwable e) { - throw Debug.handle(e); + throw debug.handle(e); } assert snippetGraph != null : "ObjectCloneSnippets should be installed"; assert getConcreteType(stamp()) != null; - return lowerReplacement((StructuredGraph) snippetGraph.copy(), tool); + return lowerReplacement((StructuredGraph) snippetGraph.copy(getDebug()), tool); } assert false : "unhandled array type " + type.getComponentType().getJavaKind(); } else { Assumptions assumptions = graph().getAssumptions(); type = getConcreteType(getObject().stamp()); if (type != null) { - StructuredGraph newGraph = new StructuredGraph.Builder(graph().getOptions(), AllowAssumptions.ifNonNull(assumptions)).build(); + StructuredGraph newGraph = new StructuredGraph.Builder(graph().getOptions(), graph().getDebug(), AllowAssumptions.ifNonNull(assumptions)).build(); ParameterNode param = newGraph.addWithoutUnique(new ParameterNode(0, StampPair.createSingle(getObject().stamp()))); NewInstanceNode newInstance = newGraph.add(new NewInstanceNode(type, true)); newGraph.addAfterFixed(newGraph.start(), newInstance);