Keep built-in metadata for reflection interfaces
Reflection interfaces (interfaces in kotlin.reflect.* in core/builtins/) are now fully considered as built-ins and can be accessed via KotlinBuiltIns. This increases runtime size by ~20kb, but only because KotlinBuiltIns is static and is therefore constructed only via resource loading from the compiler classpath at the moment. As soon as it's possible to inject KotlinBuiltIns to the particular resolution process, the metadata on JVM will be loaded via standard annotation mechanism (kotlin.jvm.internal.KotlinClass/KotlinPackage) and wasted runtime space will be reclaimed
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// !DIAGNOSTICS: -REFLECTION_TYPES_NOT_LOADED -UNUSED_EXPRESSION
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
|
||||
fun test() {
|
||||
dynamic::foo
|
||||
@@ -6,4 +6,4 @@ fun test() {
|
||||
|
||||
class dynamic {
|
||||
fun foo() {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user