Mercurial > hg > graal-compiler
changeset 9438:3e884486cc8a
Fix non-static args binding in JTT
Do not run the version with arg binding when there is no args
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 30 Apr 2013 19:39:02 +0200 |
parents | 45a73cd19baa |
children | 8fbd481f3d75 |
files | graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/JTTTest.java |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/JTTTest.java Tue Apr 30 19:25:08 2013 +0200 +++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/JTTTest.java Tue Apr 30 19:39:02 2013 +0200 @@ -60,9 +60,9 @@ Object[] args = argsWithReceiver(receiver, argsToBind); JavaType[] parameterTypes = signatureToTypes(runtime.lookupJavaMethod(m)); assert parameterTypes.length == args.length; - for (int i = 0; i < argsToBind.length; i++) { + for (int i = 0; i < args.length; i++) { LocalNode local = graph.getLocal(i); - Constant c = Constant.forBoxed(parameterTypes[i].getKind(), argsToBind[i]); + Constant c = Constant.forBoxed(parameterTypes[i].getKind(), args[i]); ConstantNode replacement = ConstantNode.forConstant(c, runtime, graph); local.replaceAtUsages(replacement); } @@ -99,8 +99,10 @@ Result expect = executeExpected(method, receiver, args); test(method, expect, receiver, args); - this.argsToBind = args; - test(method, expect, receiver, args); - this.argsToBind = null; + if (args.length > 0) { + this.argsToBind = args; + test(method, expect, receiver, args); + this.argsToBind = null; + } } }