23 package org.graalvm.compiler.nodes.test;
24
25 import java.lang.reflect.Constructor;
26
27 import org.graalvm.compiler.core.test.GraalCompilerTest;
28 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
29 import org.junit.Test;
30
31 public class StaticFieldAccessTest extends GraalCompilerTest {
32
33 static StaticFieldAccessTest tester;
34
35 public static class Inner {
36 static Object o;
37
38 static {
39 Constructor<?>[] c = Inner.class.getConstructors();
40 if (c.length != 1) {
41 throw new InternalError("can't find single constructor");
42 }
43 tester.parseDebug(tester.asResolvedJavaMethod(c[0]), AllowAssumptions.YES);
44 }
45
46 public Inner(Object o) {
47 Inner.o = o;
48 }
49 }
50
51 @Test
52 public void test() {
53 tester = this;
54 }
55 }
|
23 package org.graalvm.compiler.nodes.test;
24
25 import java.lang.reflect.Constructor;
26
27 import org.graalvm.compiler.core.test.GraalCompilerTest;
28 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
29 import org.junit.Test;
30
31 public class StaticFieldAccessTest extends GraalCompilerTest {
32
33 static StaticFieldAccessTest tester;
34
35 public static class Inner {
36 static Object o;
37
38 static {
39 Constructor<?>[] c = Inner.class.getConstructors();
40 if (c.length != 1) {
41 throw new InternalError("can't find single constructor");
42 }
43 tester.parse(tester.builder(tester.asResolvedJavaMethod(c[0]), AllowAssumptions.YES), tester.getDebugGraphBuilderSuite());
44 }
45
46 public Inner(Object o) {
47 Inner.o = o;
48 }
49 }
50
51 @Test
52 public void test() {
53 tester = this;
54 }
55 }
|