Fix class initializer optimization.

Assume that class initializer is dynamic if it initializes another class with dynamic initializer
This commit is contained in:
Alexey Andreev 2022-11-17 14:35:37 +01:00
parent 238930bfc3
commit 06748fa12b

View File

@ -289,6 +289,9 @@ public class ClassInitializerAnalysis implements ClassInitializerInfo {
} }
analyze(className); analyze(className);
if (isDynamicInitializer(className)) {
methodInfo.anyFieldModified = true;
}
} }
private void analyzeCalledMethod(MethodInfo calledMethod) { private void analyzeCalledMethod(MethodInfo calledMethod) {