Mercurial > hg > truffle
diff graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java @ 6431:2e376f8ea4e2
added snippet for lowering NewMultiArrayNodes
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 25 Sep 2012 09:09:19 +0200 |
parents | 703a6ab8ca82 |
children | d7bcbdf4749c |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Tue Sep 25 09:01:58 2012 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Tue Sep 25 09:09:19 2012 +0200 @@ -196,6 +196,10 @@ Assert.assertTrue(failed + " of " + n + " failed", failed == 0); } + protected Object referenceInvoke(Method method, Object receiver, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { + return method.invoke(receiver, args); + } + protected void test(String name, Object... args) { Method method = getMethod(name); Object expect = null; @@ -203,7 +207,7 @@ Throwable exception = null; try { // This gives us both the expected return value as well as ensuring that the method to be compiled is fully resolved - expect = method.invoke(this, args); + expect = referenceInvoke(method, receiver, args); } catch (InvocationTargetException e) { exception = e.getTargetException(); } catch (Exception e) {