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:
@@ -438,7 +438,6 @@
|
||||
<fileset dir="${output}/builtins">
|
||||
<include name="kotlin/**"/>
|
||||
<exclude name="kotlin/internal/**"/>
|
||||
<exclude name="kotlin/reflect/**"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
|
||||
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
|
||||
@@ -741,7 +740,8 @@
|
||||
<zipfileset dir="${output}/builtins">
|
||||
<include name="kotlin/**"/>
|
||||
<exclude name="kotlin/internal/**"/>
|
||||
<exclude name="kotlin/reflect/**"/>
|
||||
<!-- TODO: load metadata from @KotlinClass annotation in KotlinBuiltIns on JVM and restore this exclusion -->
|
||||
<!-- exclude name="kotlin/reflect/**"/ -->
|
||||
</zipfileset>
|
||||
</jar-content>
|
||||
</pack-runtime-jar>
|
||||
@@ -863,7 +863,6 @@
|
||||
<fileset dir="${output}/builtins">
|
||||
<include name="kotlin/**"/>
|
||||
<exclude name="kotlin/internal/**"/>
|
||||
<exclude name="kotlin/reflect/**"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
|
||||
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
|
||||
|
||||
Reference in New Issue
Block a user