# HG changeset patch # User Christian Wimmer # Date 1347657241 25200 # Node ID 46d426e79bed44301e10cceb87ad9014865d594e # Parent 33dab7b4b00676c7592301d52767c97196887e5f Snippets need only a MetaAccessProvider, not a CodeCacheProvider diff -r 33dab7b4b006 -r 46d426e79bed graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java --- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java Fri Sep 14 14:10:36 2012 -0700 +++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java Fri Sep 14 14:14:01 2012 -0700 @@ -154,10 +154,10 @@ public static class Cache { private final ConcurrentHashMap templates = new ConcurrentHashMap<>(); - private final CodeCacheProvider runtime; + private final MetaAccessProvider runtime; - public Cache(CodeCacheProvider runtime) { + public Cache(MetaAccessProvider runtime) { this.runtime = runtime; } @@ -216,7 +216,7 @@ /** * Creates a snippet template. */ - public SnippetTemplate(CodeCacheProvider runtime, SnippetTemplate.Key key) { + public SnippetTemplate(MetaAccessProvider runtime, SnippetTemplate.Key key) { ResolvedJavaMethod method = key.method; assert Modifier.isStatic(method.accessFlags()) : "snippet method must be static: " + method; Signature signature = method.signature(); @@ -451,7 +451,7 @@ * * @return the map that will be used to bind arguments to parameters when inlining this template */ - private IdentityHashMap bind(StructuredGraph replaceeGraph, CodeCacheProvider runtime, SnippetTemplate.Arguments args) { + private IdentityHashMap bind(StructuredGraph replaceeGraph, MetaAccessProvider runtime, SnippetTemplate.Arguments args) { IdentityHashMap replacements = new IdentityHashMap<>(); for (Map.Entry e : args) { @@ -495,7 +495,7 @@ * @param args the arguments to be bound to the flattened positional parameters of the snippet * @return the map of duplicated nodes (original -> duplicate) */ - public Map instantiate(CodeCacheProvider runtime, + public Map instantiate(MetaAccessProvider runtime, FixedWithNextNode replacee, SnippetTemplate.Arguments args) { // Inline the snippet nodes, replacing parameters with the given args in the process @@ -547,7 +547,7 @@ * @param lastFixedNode the CFG of the snippet is inserted after this node * @param args the arguments to be bound to the flattened positional parameters of the snippet */ - public void instantiate(CodeCacheProvider runtime, + public void instantiate(MetaAccessProvider runtime, FloatingNode replacee, FixedWithNextNode lastFixedNode, SnippetTemplate.Arguments args) { @@ -593,7 +593,7 @@ * @param controlSplitNode the node replaced by this wheCFG of the snippet is inserted after this node * @param args the arguments to be bound to the flattened positional parameters of the snippet */ - public void instantiate(CodeCacheProvider runtime, + public void instantiate(MetaAccessProvider runtime, FloatingNode replacee, ControlSplitNode controlSplitNode, SnippetTemplate.Arguments args) {