mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-24 06:40:05 +00:00
8336242: compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java failed assert(oopDesc::is_oop_or_null(val)) failed: bad oop found (again)
Reviewed-by: dnsimon, never
This commit is contained in:
parent
de0b50400a
commit
9b428dda8f
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user