changeset 6407:46d426e79bed

Snippets need only a MetaAccessProvider, not a CodeCacheProvider
author Christian Wimmer <christian.wimmer@oracle.com>
date Fri, 14 Sep 2012 14:14:01 -0700
parents 33dab7b4b006
children e5768e936147
files graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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<SnippetTemplate.Key, SnippetTemplate> 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<Node, Node> bind(StructuredGraph replaceeGraph, CodeCacheProvider runtime, SnippetTemplate.Arguments args) {
+    private IdentityHashMap<Node, Node> bind(StructuredGraph replaceeGraph, MetaAccessProvider runtime, SnippetTemplate.Arguments args) {
         IdentityHashMap<Node, Node> replacements = new IdentityHashMap<>();
 
         for (Map.Entry<String, Object> 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<Node, Node> instantiate(CodeCacheProvider runtime,
+    public Map<Node, Node> 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) {