< prev index next >
src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java
Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd
@@ -1424,15 +1424,15 @@
out.writeByte(opc_invokestatic);
out.writeShort(cp.getMethodRef(
"java/lang/Class",
"forName", "(Ljava/lang/String;)Ljava/lang/Class;"));
- if (cl.isValue() && cl == cl.asValueType()) {
+ if (cl.isInlineClass() && cl == cl.asPrimaryType()) {
out.writeByte(opc_invokevirtual);
out.writeShort(cp.getMethodRef(
"java/lang/Class",
- "asValueType", "()Ljava/lang/Class;"));
+ "asPrimaryType", "()Ljava/lang/Class;"));
}
}
/*
@@ -1493,12 +1493,16 @@
*
* return "[" + getTypeDescriptor(type.getComponentType());
*/
return type.getName().replace('.', '/');
} else {
- char prefix = type.isValue() && type == type.asValueType() ? 'Q' : 'L';
- return prefix + dotToSlash(type.getName()) + ";";
+ if (type.isInlineClass()) {
+ Class<?> primary = type.asPrimaryType();
+ return (type == primary ? 'Q' : 'L' ) + dotToSlash(primary.getName()) + ";";
+ } else {
+ return 'L' + dotToSlash(type.getName()) + ";";
+ }
}
}
/**
* Returns a human-readable string representing the signature of a
< prev index next >