Search in sources :

Example 11 with HotSpotInstalledCode

use of jdk.vm.ci.hotspot.HotSpotInstalledCode in project graal by oracle.

the class CompressedOopTest method test10.

public void test10() throws Exception {
    HotSpotInstalledCode installedBenchmarkCode = getInstalledCode("constantTest", Object.class);
    Container c = new Container();
    Assert.assertFalse((boolean) installedBenchmarkCode.executeVarargs(c));
}
Also used : HotSpotInstalledCode(jdk.vm.ci.hotspot.HotSpotInstalledCode)

Example 12 with HotSpotInstalledCode

use of jdk.vm.ci.hotspot.HotSpotInstalledCode in project graal by oracle.

the class CompressedOopTest method test15.

@Test
public void test15() throws Exception {
    HotSpotInstalledCode installedBenchmarkCode = getInstalledCode("stringBuilderTestIn");
    installedBenchmarkCode.executeVarargs();
}
Also used : HotSpotInstalledCode(jdk.vm.ci.hotspot.HotSpotInstalledCode) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 13 with HotSpotInstalledCode

use of jdk.vm.ci.hotspot.HotSpotInstalledCode in project graal by oracle.

the class CompressedOopTest method test12.

@Test
public void test12() throws Exception {
    HotSpotInstalledCode installedBenchmarkCode = getInstalledCode("stringConstantEqualsTest", Object.class);
    String s1 = new String("Test");
    boolean result = ((Boolean) (installedBenchmarkCode.executeVarargs(s1))).booleanValue();
    Assert.assertTrue(result);
}
Also used : HotSpotInstalledCode(jdk.vm.ci.hotspot.HotSpotInstalledCode) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 14 with HotSpotInstalledCode

use of jdk.vm.ci.hotspot.HotSpotInstalledCode in project graal by oracle.

the class CompressedOopTest method test2.

@Test
public void test2() throws Exception {
    HotSpotInstalledCode installedBenchmarkCode = getInstalledCode("arrayCopyTest", Object.class, Object.class);
    ArrayContainer source = new ArrayContainer();
    ArrayContainer destination = new ArrayContainer();
    Assert.assertEquals(source.a.length, destination.a.length);
    Assert.assertFalse(Arrays.equals(source.a, destination.a));
    installedBenchmarkCode.executeVarargs(source.a, destination.a);
    Assert.assertArrayEquals(source.a, destination.a);
}
Also used : HotSpotInstalledCode(jdk.vm.ci.hotspot.HotSpotInstalledCode) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 15 with HotSpotInstalledCode

use of jdk.vm.ci.hotspot.HotSpotInstalledCode in project graal by oracle.

the class CompressedOopTest method test11.

@Test
public void test11() throws Exception {
    HotSpotInstalledCode installedBenchmarkCode = getInstalledCode("stringEqualsTest", Object.class, Object.class);
    String s1 = new String("Test");
    String s2 = new String("Test");
    boolean result = ((Boolean) (installedBenchmarkCode.executeVarargs(s1, s2))).booleanValue();
    Assert.assertTrue(result);
}
Also used : HotSpotInstalledCode(jdk.vm.ci.hotspot.HotSpotInstalledCode) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Aggregations

HotSpotInstalledCode (jdk.vm.ci.hotspot.HotSpotInstalledCode)24 GraalCompilerTest (org.graalvm.compiler.core.test.GraalCompilerTest)19 Test (org.junit.Test)19 ArrayList (java.util.ArrayList)3 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)3 Unsafe (sun.misc.Unsafe)2 ArrayDeque (java.util.ArrayDeque)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 HotSpotCompilationRequest (jdk.vm.ci.hotspot.HotSpotCompilationRequest)1 Print (org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.Print)1 CompilationTask (org.graalvm.compiler.hotspot.CompilationTask)1