OpenJDK / graal / graal-jvmci-9 / hotspot
changeset 26111:b7f322a77420
8137180: [JVMCI] ExecuteInstalledCodeTest should compare arg[0] for <init>
author | twisti |
---|---|
date | Thu, 08 Oct 2015 07:04:27 -1000 |
parents | 7a959557e106 |
children | 54982b5983d4 |
files | test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java |
diffstat | 1 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java Thu Oct 08 07:02:51 2015 -1000 +++ b/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java Thu Oct 08 07:04:27 2015 -1000 @@ -39,9 +39,12 @@ ExecuteInstalledCodeTest test = new ExecuteInstalledCodeTest(); List<CompileCodeTestCase> testCases = new ArrayList<>(); testCases.addAll(CompileCodeTestCase.generate(/* bci = */ -1)); - testCases.stream() - // ignore <init> due to 8137180 - .filter(e -> !(e.executable instanceof Constructor)) + testCases .stream() + // ignore <init> of abstract class -- 8138793 + .filter(e -> !(e.executable instanceof Constructor + && Modifier.isAbstract( + e.executable.getDeclaringClass() + .getModifiers()))) .forEach(test::checkSanity); } @@ -66,6 +69,10 @@ args = addReceiver(testCase, args); result = CompilerToVMHelper.executeInstalledCode( args, installedCode); + if (testCase.executable instanceof Constructor) { + // <init> doesn't have return value, it changes receiver + result = args[0]; + } gotException = false; } catch (InvalidInstalledCodeException e) { throw new AssertionError( @@ -86,6 +93,7 @@ testCase, expectedException.getClass(), t.getClass())); } } + Asserts.assertEQ(reflectionResult.first, result, testCase + " : different return value"); if (!gotException) {