Wide visibility in ir common stuff
This commit is contained in:
+3
-3
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.types.TypeSubstitutor
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import org.jetbrains.kotlin.types.typeUtil.makeNullable
|
||||
|
||||
internal class DeepCopyIrTreeWithDescriptors(val targetDescriptor: FunctionDescriptor,
|
||||
class DeepCopyIrTreeWithDescriptors(val targetDescriptor: FunctionDescriptor,
|
||||
val context: CommonBackendContext) {
|
||||
|
||||
private val descriptorSubstituteMap: MutableMap<DeclarationDescriptor, DeclarationDescriptor> = mutableMapOf()
|
||||
@@ -553,9 +553,9 @@ internal class DeepCopyIrTreeWithDescriptors(val targetDescriptor: FunctionDescr
|
||||
|
||||
}
|
||||
|
||||
internal class SubstitutedDescriptor(val inlinedFunction: FunctionDescriptor, val descriptor: DeclarationDescriptor)
|
||||
class SubstitutedDescriptor(val inlinedFunction: FunctionDescriptor, val descriptor: DeclarationDescriptor)
|
||||
|
||||
internal class DescriptorSubstitutorForExternalScope(val globalSubstituteMap: MutableMap<DeclarationDescriptor, SubstitutedDescriptor>)
|
||||
class DescriptorSubstitutorForExternalScope(val globalSubstituteMap: MutableMap<DeclarationDescriptor, SubstitutedDescriptor>)
|
||||
: IrElementTransformerVoidWithContext() {
|
||||
|
||||
override fun visitCall(expression: IrCall): IrExpression {
|
||||
|
||||
@@ -28,10 +28,10 @@ abstract class Ir<out T: CommonBackendContext>(val context: T, val irModule: IrM
|
||||
|
||||
abstract class Symbols<out T: CommonBackendContext>(val context: T, private val symbolTable: SymbolTable) {
|
||||
|
||||
private val builtIns
|
||||
protected val builtIns
|
||||
get() = context.builtIns
|
||||
|
||||
private fun builtInsPackage(vararg packageNameSegments: String) =
|
||||
protected fun builtInsPackage(vararg packageNameSegments: String) =
|
||||
context.builtIns.builtInsModule.getPackage(FqName.fromSegments(listOf(*packageNameSegments))).memberScope
|
||||
|
||||
val refClass = symbolTable.referenceClass(context.getInternalClass("Ref"))
|
||||
@@ -121,7 +121,7 @@ abstract class Symbols<out T: CommonBackendContext>(val context: T, private val
|
||||
}
|
||||
|
||||
|
||||
private val arrayTypes = arrayOf(
|
||||
protected val arrayTypes = arrayOf(
|
||||
builtIns.getPrimitiveArrayKotlinType(PrimitiveType.BYTE),
|
||||
builtIns.getPrimitiveArrayKotlinType(PrimitiveType.CHAR),
|
||||
builtIns.getPrimitiveArrayKotlinType(PrimitiveType.SHORT),
|
||||
|
||||
@@ -65,7 +65,7 @@ fun DeclarationDescriptor.createFakeOverrideDescriptor(owner: ClassDescriptor):
|
||||
}
|
||||
}
|
||||
|
||||
internal fun FunctionDescriptor.createOverriddenDescriptor(owner: ClassDescriptor, final: Boolean = true): FunctionDescriptor {
|
||||
fun FunctionDescriptor.createOverriddenDescriptor(owner: ClassDescriptor, final: Boolean = true): FunctionDescriptor {
|
||||
return this.newCopyBuilder()
|
||||
.setOwner(owner)
|
||||
.setCopyOverrides(true)
|
||||
@@ -76,7 +76,7 @@ internal fun FunctionDescriptor.createOverriddenDescriptor(owner: ClassDescripto
|
||||
}
|
||||
}
|
||||
|
||||
internal fun ClassDescriptor.createSimpleDelegatingConstructorDescriptor(superConstructorDescriptor: ClassConstructorDescriptor, isPrimary: Boolean = false)
|
||||
fun ClassDescriptor.createSimpleDelegatingConstructorDescriptor(superConstructorDescriptor: ClassConstructorDescriptor, isPrimary: Boolean = false)
|
||||
: ClassConstructorDescriptor {
|
||||
val constructorDescriptor = ClassConstructorDescriptorImpl.createSynthesized(
|
||||
/* containingDeclaration = */ this,
|
||||
@@ -91,7 +91,7 @@ internal fun ClassDescriptor.createSimpleDelegatingConstructorDescriptor(superCo
|
||||
return constructorDescriptor
|
||||
}
|
||||
|
||||
internal fun IrClass.addSimpleDelegatingConstructor(superConstructorSymbol: IrConstructorSymbol,
|
||||
fun IrClass.addSimpleDelegatingConstructor(superConstructorSymbol: IrConstructorSymbol,
|
||||
constructorDescriptor: ClassConstructorDescriptor,
|
||||
origin: IrDeclarationOrigin)
|
||||
: IrConstructor {
|
||||
@@ -117,7 +117,7 @@ internal fun IrClass.addSimpleDelegatingConstructor(superConstructorSymbol: IrCo
|
||||
}
|
||||
}
|
||||
|
||||
internal fun CommonBackendContext.createArrayOfExpression(arrayElementType: KotlinType,
|
||||
fun CommonBackendContext.createArrayOfExpression(arrayElementType: KotlinType,
|
||||
arrayElements: List<IrExpression>,
|
||||
startOffset: Int, endOffset: Int): IrExpression {
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ import org.jetbrains.kotlin.types.KotlinType
|
||||
/**
|
||||
* This lowering pass replaces [IrStringConcatenation]s with StringBuilder appends.
|
||||
*/
|
||||
internal class StringConcatenationLowering(val context: CommonBackendContext) : FileLoweringPass {
|
||||
class StringConcatenationLowering(val context: CommonBackendContext) : FileLoweringPass {
|
||||
override fun lower(irFile: IrFile) {
|
||||
irFile.transformChildrenVoid(StringConcatenationTransformer(this))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user