[Commonizer] Refactor CIR to avoid strong refs on descriptors

This is necessary to reduce memory consumption in commonizer while
processing sets of massive libraries.
Ex: ios_x64 (127 libraries) vs ios_arm64 (127 libraries).
This commit is contained in:
Dmitriy Dolovov
2020-02-13 18:51:48 +07:00
parent a0b0f72edf
commit 11e0f427ac
18 changed files with 236 additions and 193 deletions
@@ -16,13 +16,13 @@ annotation class JsAnnotationForAnnotationClassesOnly(val text: String)
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
annotation class JsAnnotation(val text: String)
@Target(AnnotationTarget.CLASS)
annotation class CommonOuterAnnotation(val inner: CommonInnerAnnotation)
annotation class CommonInnerAnnotation(val text: String)
@Target(AnnotationTarget.CLASS)
annotation class JsOuterAnnotation(val inner: JsInnerAnnotation)
annotation class JsInnerAnnotation(val text: String)
//@Target(AnnotationTarget.CLASS)
//annotation class CommonOuterAnnotation(val inner: CommonInnerAnnotation)
//annotation class CommonInnerAnnotation(val text: String)
//
//@Target(AnnotationTarget.CLASS)
//annotation class JsOuterAnnotation(val inner: JsInnerAnnotation)
//annotation class JsInnerAnnotation(val text: String)
@JsAnnotation("property")
@CommonAnnotation("property")
@@ -57,6 +57,6 @@ class AnnotatedClass @JsAnnotation("constructor") @CommonAnnotation("constructor
@CommonAnnotation("type-alias")
typealias AnnotatedTypeAlias = AnnotatedClass
@JsOuterAnnotation(inner = JsInnerAnnotation("nested-annotations"))
@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
object ObjectWithNestedAnnotations
//@JsOuterAnnotation(inner = JsInnerAnnotation("nested-annotations"))
//@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
//object ObjectWithNestedAnnotations
@@ -16,13 +16,13 @@ annotation class JvmAnnotationForAnnotationClassesOnly(val text: String)
@CommonAnnotationForAnnotationClassesOnly("annotation-class")
annotation class JvmAnnotation(val text: String)
@Target(AnnotationTarget.CLASS)
annotation class CommonOuterAnnotation(val inner: CommonInnerAnnotation)
annotation class CommonInnerAnnotation(val text: String)
@Target(AnnotationTarget.CLASS)
annotation class JvmOuterAnnotation(val inner: JvmInnerAnnotation)
annotation class JvmInnerAnnotation(val text: String)
//@Target(AnnotationTarget.CLASS)
//annotation class CommonOuterAnnotation(val inner: CommonInnerAnnotation)
//annotation class CommonInnerAnnotation(val text: String)
//
//@Target(AnnotationTarget.CLASS)
//annotation class JvmOuterAnnotation(val inner: JvmInnerAnnotation)
//annotation class JvmInnerAnnotation(val text: String)
@JvmAnnotation("property")
@CommonAnnotation("property")
@@ -57,6 +57,6 @@ class AnnotatedClass @JvmAnnotation("constructor") @CommonAnnotation("constructo
@CommonAnnotation("type-alias")
typealias AnnotatedTypeAlias = AnnotatedClass
@JvmOuterAnnotation(inner = JvmInnerAnnotation("nested-annotations"))
@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
object ObjectWithNestedAnnotations
//@JvmOuterAnnotation(inner = JvmInnerAnnotation("nested-annotations"))
//@CommonOuterAnnotation(inner = CommonInnerAnnotation("nested-annotations"))
//object ObjectWithNestedAnnotations