[FIR] Refactor effective visibility calculation

Before this commit, we had effective visibility as a part of FIR status,
so it was integrated into the full pipeline. In this commit,
we introduced "effective visibility as a service" which is now used
only by exposed visibility checker. This allows us to make the thing
universal for all FIR nodes, including nodes for Java / deserialized.
This commit is contained in:
Nick
2020-07-15 17:23:21 +03:00
committed by Mikhail Glukhikh
parent b15e32936e
commit 7145caca40
95 changed files with 713 additions and 484 deletions
@@ -5,7 +5,7 @@ FILE: exposedFunctionParameterType.kt
}
private final class AInner : R|kotlin/Any| {
public[private] constructor(): R|A.AInner| {
public constructor(): R|A.AInner| {
super<R|kotlin/Any|>()
}
@@ -5,7 +5,7 @@ FILE: exposedFunctionReturnType.kt
}
private final class InnerA : R|kotlin/Any| {
public[private] constructor(): R|A.InnerA| {
public constructor(): R|A.InnerA| {
super<R|kotlin/Any|>()
}
@@ -20,4 +20,3 @@ FILE: exposedFunctionReturnType.kt
public final fun foo(str: R|kotlin/String|): R|A.InnerA|
}
@@ -5,11 +5,11 @@ FILE: exposedPropertyType.kt
}
private final class AInnerPrivate : R|kotlin/Any| {
public[private] constructor(str: R|kotlin/String|): R|A.AInnerPrivate| {
public constructor(str: R|kotlin/String|): R|A.AInnerPrivate| {
super<R|kotlin/Any|>()
}
public[private] final val str: R|kotlin/String| = R|<local>/str|
public final val str: R|kotlin/String| = R|<local>/str|
public get(): R|kotlin/String|
}
@@ -21,10 +21,10 @@ FILE: exposedPropertyType.kt
public final static enum entry A: R|A.AInnerProtectedEnum|
public final static enum entry B: R|A.AInnerProtectedEnum|
public[protected] final static fun values(): R|kotlin/Array<A.AInnerProtectedEnum>| {
public final static fun values(): R|kotlin/Array<A.AInnerProtectedEnum>| {
}
public[protected] final static fun valueOf(value: R|kotlin/String|): R|A.AInnerProtectedEnum| {
public final static fun valueOf(value: R|kotlin/String|): R|A.AInnerProtectedEnum| {
}
}
@@ -69,4 +69,4 @@ FILE: exposedPropertyType.kt
public get(): R|A.AInnerProtectedEnum|
public set(value: R|A.AInnerProtectedEnum|): R|kotlin/Unit|
}
}
@@ -17,7 +17,7 @@ FILE: exposedSupertype.kt
}
protected final class BProtected : R|kotlin/Any| {
public[protected] constructor(): R|B.BProtected| {
public constructor(): R|B.BProtected| {
super<R|kotlin/Any|>()
}
@@ -32,18 +32,18 @@ FILE: exposedSupertype.kt
}
private final class C : R|kotlin/Any| {
public[private] constructor(): R|C| {
public constructor(): R|C| {
super<R|kotlin/Any|>()
}
public[private] final class CPublic : R|kotlin/Any| {
public[private] constructor(): R|C.CPublic| {
public final class CPublic : R|kotlin/Any| {
public constructor(): R|C.CPublic| {
super<R|kotlin/Any|>()
}
}
public[private] abstract interface CPublicI : R|kotlin/Any| {
public abstract interface CPublicI : R|kotlin/Any| {
}
}
@@ -5,7 +5,7 @@ FILE: exposedTypeAlias.kt
}
private final inner class Inner : R|kotlin/Any| {
public[private] constructor(): R|A.Inner| {
public constructor(): R|A.Inner| {
super<R|kotlin/Any|>()
}
@@ -1,12 +1,12 @@
FILE: exposedTypeParameters.kt
private open class A : R|kotlin/Any| {
public[private] constructor(): R|A| {
public constructor(): R|A| {
super<R|kotlin/Any|>()
}
}
internal open class B : R|kotlin/Any| {
public[internal] constructor(): R|B| {
public constructor(): R|B| {
super<R|kotlin/Any|>()
}
@@ -17,7 +17,7 @@ FILE: exposedTypeParameters.kt
}
protected open class D : R|kotlin/Any| {
public[protected] constructor(): R|C.D| {
public constructor(): R|C.D| {
super<R|kotlin/Any|>()
}
@@ -49,13 +49,13 @@ FILE: exposedTypeParameters.kt
}
internal final class Test4<T : R|B|> : R|kotlin/Any| {
public[internal] constructor<T : R|B|>(): R|Test4<T>| {
public constructor<T : R|B|>(): R|Test4<T>| {
super<R|kotlin/Any|>()
}
}
private final class Test5<T : R|B|> : R|kotlin/Any| {
public[private] constructor<T : R|B|>(): R|Test5<T>| {
public constructor<T : R|B|>(): R|Test5<T>| {
super<R|kotlin/Any|>()
}
@@ -66,14 +66,14 @@ FILE: exposedTypeParameters.kt
}
protected final class Test6<T : R|C.D|> : R|kotlin/Any| {
public[protected] constructor<T : R|C.D|>(): R|Container.Test6<T>| {
public constructor<T : R|C.D|>(): R|Container.Test6<T>| {
super<R|kotlin/Any|>()
}
}
protected final class Test7<T : R|B|> : R|kotlin/Any| {
public[protected] constructor<T : R|B|>(): R|Container.Test7<T>| {
public constructor<T : R|B|>(): R|Container.Test7<T>| {
super<R|kotlin/Any|>()
}
@@ -51,7 +51,7 @@ FILE: singletonConstructors.kt
}
public final static enum entry X: R|E| = object : R|E| {
private[local] constructor(): R|<anonymous>| {
private constructor(): R|<anonymous>| {
super<R|E|>()
}