5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.code.test;
24
25 import java.lang.reflect.Method;
26
27 import org.junit.Assert;
28
29 import jdk.vm.ci.amd64.AMD64;
30 import jdk.vm.ci.code.Architecture;
31 import jdk.vm.ci.code.CodeCacheProvider;
32 import jdk.vm.ci.code.InstalledCode;
33 import jdk.vm.ci.code.TargetDescription;
34 import jdk.vm.ci.code.test.amd64.AMD64TestAssembler;
35 import jdk.vm.ci.code.test.sparc.SPARCTestAssembler;
36 import jdk.vm.ci.hotspot.HotSpotCompiledCode;
37 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
38 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
39 import jdk.vm.ci.meta.ConstantReflectionProvider;
40 import jdk.vm.ci.meta.MetaAccessProvider;
41 import jdk.vm.ci.runtime.JVMCI;
42 import jdk.vm.ci.runtime.JVMCIBackend;
43 import jdk.vm.ci.sparc.SPARC;
44
45 /**
46 * Base class for code installation tests.
47 */
48 public class CodeInstallationTest {
49
50 protected final MetaAccessProvider metaAccess;
51 protected final CodeCacheProvider codeCache;
52 protected final TargetDescription target;
53 protected final ConstantReflectionProvider constantReflection;
54 protected final TestHotSpotVMConfig config;
55
56 public CodeInstallationTest() {
57 JVMCIBackend backend = JVMCI.getRuntime().getHostJVMCIBackend();
58 metaAccess = backend.getMetaAccess();
59 codeCache = backend.getCodeCache();
60 target = backend.getTarget();
61 constantReflection = backend.getConstantReflection();
62 config = new TestHotSpotVMConfig(HotSpotJVMCIRuntime.runtime().getConfigStore());
63 }
64
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.code.test;
24
25 import jdk.vm.ci.amd64.AMD64;
26 import jdk.vm.ci.code.Architecture;
27 import jdk.vm.ci.code.CodeCacheProvider;
28 import jdk.vm.ci.code.InstalledCode;
29 import jdk.vm.ci.code.TargetDescription;
30 import jdk.vm.ci.code.test.amd64.AMD64TestAssembler;
31 import jdk.vm.ci.code.test.sparc.SPARCTestAssembler;
32 import jdk.vm.ci.hotspot.HotSpotCompiledCode;
33 import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime;
34 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
35 import jdk.vm.ci.meta.ConstantReflectionProvider;
36 import jdk.vm.ci.meta.MetaAccessProvider;
37 import jdk.vm.ci.runtime.JVMCI;
38 import jdk.vm.ci.runtime.JVMCIBackend;
39 import jdk.vm.ci.sparc.SPARC;
40 import org.junit.Assert;
41
42 import java.lang.reflect.Method;
43
44 /**
45 * Base class for code installation tests.
46 */
47 public class CodeInstallationTest {
48
49 protected final MetaAccessProvider metaAccess;
50 protected final CodeCacheProvider codeCache;
51 protected final TargetDescription target;
52 protected final ConstantReflectionProvider constantReflection;
53 protected final TestHotSpotVMConfig config;
54
55 public CodeInstallationTest() {
56 JVMCIBackend backend = JVMCI.getRuntime().getHostJVMCIBackend();
57 metaAccess = backend.getMetaAccess();
58 codeCache = backend.getCodeCache();
59 target = backend.getTarget();
60 constantReflection = backend.getConstantReflection();
61 config = new TestHotSpotVMConfig(HotSpotJVMCIRuntime.runtime().getConfigStore());
62 }
63
|