8350211: CTW: Attempt to preload all classes in constant pool

Reviewed-by: vlivanov, chagedorn
This commit is contained in:
Aleksey Shipilev 2025-02-19 11:02:14 +00:00
parent 0ef1c40991
commit d13fd5738f

View File

@ -122,17 +122,16 @@ public class Compiler {
private static void preloadClasses(String className, long id,
ConstantPool constantPool) {
try {
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
try {
for (int i = 0, n = constantPool.getSize(); i < n; ++i) {
try {
if (constantPool.getTagAt(i) == ConstantPool.Tag.CLASS) {
constantPool.getClassAt(i);
} catch (IllegalArgumentException ignore) {
}
} catch (Throwable t) {
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
id, className, t));
t.printStackTrace(CompileTheWorld.ERR);
}
} catch (Throwable t) {
CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s",
id, className, t));
t.printStackTrace(CompileTheWorld.ERR);
}
}