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:
Alexander Udalov
2015-04-20 10:37:40 +03:00
parent 0879860074
commit 45c28abfee
11 changed files with 13 additions and 47 deletions
@@ -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() {}
}
}