Introduce runtime ClassValue-based cache for typeOf machinery
* Cache KType instances constructor from the given classifier * For generics, cache KTypes with already substituted arguments * It significantly speeds up all typeOf-based APIs, both accesses to typeOf and its related properties (i.e. classifier) #KT-53508 Merge-request: KT-MR-6818 Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
This commit is contained in:
committed by
Space
parent
c84a70c654
commit
fdd541c1e9
+6
@@ -44330,6 +44330,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/annotatedType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("caching.kt")
|
||||
public void testCaching() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/caching.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classes.kt")
|
||||
public void testClasses() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user