Code clean after transformation
This commit is contained in:
@@ -29,10 +29,15 @@ open class InliningContext(
|
|||||||
val isInliningLambda: Boolean,
|
val isInliningLambda: Boolean,
|
||||||
val classRegeneration: Boolean
|
val classRegeneration: Boolean
|
||||||
) {
|
) {
|
||||||
val internalNameToAnonymousObjectTransformationInfo: MutableMap<String, AnonymousObjectTransformationInfo> = HashMap()
|
val internalNameToAnonymousObjectTransformationInfo = hashMapOf<String, AnonymousObjectTransformationInfo>()
|
||||||
|
|
||||||
var isContinuation: Boolean = false
|
var isContinuation: Boolean = false
|
||||||
|
|
||||||
|
val isRoot: Boolean = parent == null
|
||||||
|
|
||||||
|
val root: RootInliningContext
|
||||||
|
get() = if (isRoot) this as RootInliningContext else parent!!.root
|
||||||
|
|
||||||
fun subInline(generator: NameGenerator): InliningContext {
|
fun subInline(generator: NameGenerator): InliningContext {
|
||||||
return subInline(generator, emptyMap(), isInliningLambda)
|
return subInline(generator, emptyMap(), isInliningLambda)
|
||||||
}
|
}
|
||||||
@@ -70,16 +75,9 @@ open class InliningContext(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val isRoot: Boolean
|
|
||||||
get() = parent == null
|
|
||||||
|
|
||||||
val root: RootInliningContext
|
|
||||||
get() = if (isRoot) this as RootInliningContext else parent!!.root
|
|
||||||
|
|
||||||
open val callSiteInfo: InlineCallSiteInfo
|
open val callSiteInfo: InlineCallSiteInfo
|
||||||
get() {
|
get() {
|
||||||
assert(parent != null) { "At least root context should return proper value" }
|
return parent?.callSiteInfo ?: throw AssertionError("At least root context should return proper value")
|
||||||
return parent!!.callSiteInfo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun findAnonymousObjectTransformationInfo(internalName: String): AnonymousObjectTransformationInfo? {
|
fun findAnonymousObjectTransformationInfo(internalName: String): AnonymousObjectTransformationInfo? {
|
||||||
|
|||||||
Reference in New Issue
Block a user