8148202: move lookup of Java class and hub from ResolvedJavaType to ConstantReflectionProvider

Reviewed-by: twisti
This commit is contained in:
Christian Wimmer 2016-01-26 11:28:54 -10:00 committed by Doug Simon
parent 60aa7225b0
commit b220252b74
7 changed files with 39 additions and 44 deletions

View file

@ -217,7 +217,7 @@ public class SimpleDebugInfoTest extends DebugInfoTest {
public void testConstObject() {
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
values[0] = type.getJavaClass();
values[0] = constantReflection.asJavaClass(type);
return null;
};
testObjectOnStack(compiler);
@ -228,7 +228,7 @@ public class SimpleDebugInfoTest extends DebugInfoTest {
public void testRegObject() {
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
Register reg = asm.emitLoadPointer((HotSpotConstant) type.getJavaClass());
Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
values[0] = reg.asValue(target.getLIRKind(JavaKind.Object));
return null;
};
@ -240,7 +240,7 @@ public class SimpleDebugInfoTest extends DebugInfoTest {
public void testStackObject() {
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
Register reg = asm.emitLoadPointer((HotSpotConstant) type.getJavaClass());
Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
values[0] = asm.emitPointerToStack(reg);
return null;
};
@ -253,7 +253,7 @@ public class SimpleDebugInfoTest extends DebugInfoTest {
Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
HotSpotConstant wide = (HotSpotConstant) type.getJavaClass();
HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
values[0] = reg.asValue(asm.narrowOopKind);
return null;
@ -267,7 +267,7 @@ public class SimpleDebugInfoTest extends DebugInfoTest {
Assume.assumeTrue(HotSpotVMConfig.config().useCompressedOops);
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
HotSpotConstant wide = (HotSpotConstant) type.getJavaClass();
HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
values[0] = asm.emitNarrowPointerToStack(reg);
return null;