// `CallStatic` being part of the profile, the compiler used to think it will be in the app image. // However, given it implements `Itf` which is from a different dex file from a different class // loader, we cannot encode `CallStatic` in the image. We used to find that information too late in // the compilation stage and were therefore wrongly assuming we could inline methods from // `CallStatic` without the need for resolving it. // // Note that to trigger the crash, we needed an interface from a different dex file. We were // correctly pruning the class if the superclass was from a different dex file. class CallStatic implements Itf { publicstaticint $inline$foo() { // Access a static field to make sure we invoke the runtime, which will then walk the call // stack. return WithStatic.field;
}
}
publicclass Test { publicstaticint callInstance() { // Call a method from `CallStatic` which will be inlined. If the compiler thinks `CallStatic` // will be in the image, it will skip the slow path of resolving it. return CallStatic.$inline$foo();
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.