diff --git a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java index c7d8d2cf830..e77ac8dc4f9 100644 --- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java +++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java @@ -200,84 +200,4 @@ public class SimpleDebugInfoTest extends DebugInfoTest { testLongOnStack(compiler); testLongInLocal(compiler); } - - public static Class objectOnStack() { - return SimpleDebugInfoTest.class; - } - - private void testObjectOnStack(DebugInfoCompiler compiler) { - test(compiler, getMethod("objectOnStack"), 2, JavaKind.Object); - } - - public static Class objectInLocal() { - Class local = SimpleDebugInfoTest.class; - return local; - } - - private void testObjectInLocal(DebugInfoCompiler compiler) { - test(compiler, getMethod("objectInLocal"), 3, JavaKind.Object); - } - - @Test - public void testConstObject() { - ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack()); - DebugInfoCompiler compiler = (asm, values) -> { - values[0] = constantReflection.asJavaClass(type); - return null; - }; - testObjectOnStack(compiler); - testObjectInLocal(compiler); - } - - @Test - public void testRegObject() { - ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack()); - DebugInfoCompiler compiler = (asm, values) -> { - Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type)); - values[0] = reg.asValue(asm.getValueKind(JavaKind.Object)); - return null; - }; - testObjectOnStack(compiler); - testObjectInLocal(compiler); - } - - @Test - public void testStackObject() { - ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack()); - DebugInfoCompiler compiler = (asm, values) -> { - Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type)); - values[0] = asm.emitPointerToStack(reg); - return null; - }; - testObjectOnStack(compiler); - testObjectInLocal(compiler); - } - - @Test - public void testRegNarrowObject() { - Assume.assumeTrue(config.useCompressedOops); - ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack()); - DebugInfoCompiler compiler = (asm, values) -> { - HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type); - Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress()); - values[0] = reg.asValue(asm.narrowOopKind); - return null; - }; - testObjectOnStack(compiler); - testObjectInLocal(compiler); - } - - @Test - public void testStackNarrowObject() { - Assume.assumeTrue(config.useCompressedOops); - ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack()); - DebugInfoCompiler compiler = (asm, values) -> { - HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type); - Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress()); - values[0] = asm.emitNarrowPointerToStack(reg); - return null; - }; - testObjectOnStack(compiler); - testObjectInLocal(compiler); - } }