< 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,1438 ****
out.writeByte(opc_invokestatic);
out.writeShort(cp.getMethodRef(
"java/lang/Class",
"forName", "(Ljava/lang/String;)Ljava/lang/Class;"));
! if (cl.isValue() && cl == cl.asValueType()) {
out.writeByte(opc_invokevirtual);
out.writeShort(cp.getMethodRef(
"java/lang/Class",
! "asValueType", "()Ljava/lang/Class;"));
}
}
/*
--- 1424,1438 ----
out.writeByte(opc_invokestatic);
out.writeShort(cp.getMethodRef(
"java/lang/Class",
"forName", "(Ljava/lang/String;)Ljava/lang/Class;"));
! if (cl.isInlineClass() && cl == cl.asPrimaryType()) {
out.writeByte(opc_invokevirtual);
out.writeShort(cp.getMethodRef(
"java/lang/Class",
! "asPrimaryType", "()Ljava/lang/Class;"));
}
}
/*
*** 1493,1504 ****
*
* return "[" + getTypeDescriptor(type.getComponentType());
*/
return type.getName().replace('.', '/');
} else {
! char prefix = type.isValue() && type == type.asValueType() ? 'Q' : 'L';
! return prefix + dotToSlash(type.getName()) + ";";
}
}
/**
* Returns a human-readable string representing the signature of a
--- 1493,1508 ----
*
* return "[" + getTypeDescriptor(type.getComponentType());
*/
return type.getName().replace('.', '/');
} else {
! 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 >