diff graal/com.oracle.graal.asm.test/src/com/oracle/graal/asm/test/AssemblerTest.java @ 11959:23ccaa863eda

made CodeCacheProvider independent of MetaAccessProvider (GRAAL-511)
author Doug Simon <doug.simon@oracle.com>
date Thu, 10 Oct 2013 16:14:55 +0200
parents 36e12fbbefdf
children 9c2111d10e40
line wrap: on
line diff
--- a/graal/com.oracle.graal.asm.test/src/com/oracle/graal/asm/test/AssemblerTest.java	Thu Oct 10 13:44:59 2013 +0200
+++ b/graal/com.oracle.graal.asm.test/src/com/oracle/graal/asm/test/AssemblerTest.java	Thu Oct 10 16:14:55 2013 +0200
@@ -34,6 +34,7 @@
 
 public abstract class AssemblerTest extends GraalTest {
 
+    private final MetaAccessProvider metaAccess;
     protected final CodeCacheProvider codeCache;
 
     public interface CodeGenTest {
@@ -42,11 +43,16 @@
     }
 
     public AssemblerTest() {
+        this.metaAccess = Graal.getRequiredCapability(MetaAccessProvider.class);
         this.codeCache = Graal.getRequiredCapability(CodeCacheProvider.class);
     }
 
+    public MetaAccessProvider getMetaAccess() {
+        return metaAccess;
+    }
+
     protected InstalledCode assembleMethod(Method m, CodeGenTest test) {
-        ResolvedJavaMethod method = codeCache.lookupJavaMethod(m);
+        ResolvedJavaMethod method = getMetaAccess().lookupJavaMethod(m);
         RegisterConfig registerConfig = codeCache.lookupRegisterConfig();
         CallingConvention cc = CodeUtil.getCallingConvention(codeCache, CallingConvention.Type.JavaCallee, method, false);