comparison graal/com.oracle.graal.replacements.test/src/com/oracle/graal/replacements/test/UnsafeSubstitutionsTest.java @ 18127:7cefdad149ad

enable a GraalCompilerTest to override how a method is parsed to produce a graph as well as being able to interpose on the method that is parsed/compiled
author Doug Simon <doug.simon@oracle.com>
date Mon, 20 Oct 2014 23:11:40 +0200
parents 86ec7f6f71b3
children c88ab4f1f04a
comparison
equal deleted inserted replaced
18126:12c6c5a5bd88 18127:7cefdad149ad
44 public void testSubstitution(String testMethodName, Class<?> holder, String methodName, Class<?>[] parameterTypes, Object receiver, Object[] args1, Object[] args2) { 44 public void testSubstitution(String testMethodName, Class<?> holder, String methodName, Class<?>[] parameterTypes, Object receiver, Object[] args1, Object[] args2) {
45 ResolvedJavaMethod testMethod = getResolvedJavaMethod(testMethodName); 45 ResolvedJavaMethod testMethod = getResolvedJavaMethod(testMethodName);
46 ResolvedJavaMethod originalMethod = getResolvedJavaMethod(holder, methodName, parameterTypes); 46 ResolvedJavaMethod originalMethod = getResolvedJavaMethod(holder, methodName, parameterTypes);
47 47
48 // Force compilation 48 // Force compilation
49 InstalledCode code = getCode(testMethod, parseEager(testMethod)); 49 InstalledCode code = getCode(testMethod);
50 assert code != null; 50 assert code != null;
51 51
52 // Verify that the original method and the substitution produce the same value 52 // Verify that the original method and the substitution produce the same value
53 { 53 {
54 Object expected = invokeSafe(originalMethod, receiver, args1); 54 Object expected = invokeSafe(originalMethod, receiver, args1);