# HG changeset patch # User Doug Simon # Date 1364294795 -3600 # Node ID 809819548c05bb4d883ee922013a4badf6a78e8c # Parent f9aee27a6ff01df6c27a9ad42f153b53aecf4b10 prevent @Alias from being used in method substitutions - can only be used in lowering snippets diff -r f9aee27a6ff0 -r 809819548c05 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsInstaller.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsInstaller.java Tue Mar 26 11:46:24 2013 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsInstaller.java Tue Mar 26 11:46:35 2013 +0100 @@ -210,7 +210,9 @@ * Does final processing of a snippet graph. */ protected void finalizeGraph(ResolvedJavaMethod method, StructuredGraph graph) { - new AliasResolutionPhase(runtime).apply(graph); + if (substitute == null) { + new AliasResolutionPhase(runtime).apply(graph); + } new NodeIntrinsificationPhase(runtime, pool).apply(graph); assert SnippetTemplate.hasConstantParameter(method) || NodeIntrinsificationVerificationPhase.verify(graph); @@ -256,7 +258,9 @@ Debug.dump(graph, "%s: %s", method.getName(), GraphBuilderPhase.class.getSimpleName()); new WordTypeVerificationPhase(runtime, target.wordKind).apply(graph); - new AliasResolutionPhase(runtime).apply(graph); + if (substitute == null) { + new AliasResolutionPhase(runtime).apply(graph); + } new NodeIntrinsificationPhase(runtime, pool).apply(graph); return graph; @@ -279,7 +283,9 @@ * Called after all inlining for a given graph is complete. */ protected void afterInlining(StructuredGraph graph) { - new AliasResolutionPhase(runtime).apply(graph); + if (substitute == null) { + new AliasResolutionPhase(runtime).apply(graph); + } new NodeIntrinsificationPhase(runtime, pool).apply(graph); new WordTypeRewriterPhase(runtime, target.wordKind).apply(graph);