Generate IrTypeParameter and IrValueParameter declarations
This commit is contained in:
@@ -16,16 +16,20 @@
|
||||
|
||||
package org.jetbrains.kotlin.psi2ir
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
import org.jetbrains.kotlin.psi.KtExpression
|
||||
import org.jetbrains.kotlin.psi.KtPsiUtil
|
||||
import org.jetbrains.kotlin.psi.KtSecondaryConstructor
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ArgumentMatch
|
||||
@@ -75,4 +79,7 @@ fun MemberScope.findSingleFunction(name: Name): FunctionDescriptor =
|
||||
getContributedFunctions(name, NoLookupLocation.FROM_BACKEND).single()
|
||||
|
||||
fun KotlinBuiltIns.findSingleFunction(name: Name): FunctionDescriptor =
|
||||
builtInsPackageScope.findSingleFunction(name)
|
||||
builtInsPackageScope.findSingleFunction(name)
|
||||
|
||||
val PsiElement?.startOffsetOrUndefined get() = this?.startOffset ?: UNDEFINED_OFFSET
|
||||
val PsiElement?.endOffsetOrUndefined get() = this?.endOffset ?: UNDEFINED_OFFSET
|
||||
@@ -36,20 +36,6 @@ class BodyGenerator(val scopeOwner: DeclarationDescriptor, override val context:
|
||||
override val scope = Scope(scopeOwner)
|
||||
private val loopTable = HashMap<KtLoopExpression, IrLoop>()
|
||||
|
||||
fun generateDefaultParameters(ktFunction: KtFunction, irFunction: IrFunctionBase) {
|
||||
generateDefaultParameters(ktFunction.valueParameterList ?: return, irFunction)
|
||||
}
|
||||
|
||||
fun generateDefaultParameters(ktParameterList: KtParameterList, irFunction: IrFunctionBase) {
|
||||
val statementGenerator = createStatementGenerator()
|
||||
for (ktParameter in ktParameterList.parameters) {
|
||||
val ktDefaultValue = ktParameter.defaultValue ?: continue
|
||||
val valueParameter = getOrFail(BindingContext.VALUE_PARAMETER, ktParameter) as? ValueParameterDescriptor ?: continue
|
||||
val irDefaultValue = statementGenerator.generateExpression(ktDefaultValue)
|
||||
irFunction.putDefault(valueParameter, IrExpressionBodyImpl(irDefaultValue))
|
||||
}
|
||||
}
|
||||
|
||||
fun generateFunctionBody(ktBody: KtExpression): IrBody {
|
||||
val statementGenerator = createStatementGenerator()
|
||||
|
||||
@@ -64,8 +50,8 @@ class BodyGenerator(val scopeOwner: DeclarationDescriptor, override val context:
|
||||
return irBlockBody
|
||||
}
|
||||
|
||||
fun generatePropertyInitializerBody(ktInitializer: KtExpression): IrExpressionBody =
|
||||
IrExpressionBodyImpl(createStatementGenerator().generateExpression(ktInitializer))
|
||||
fun generateExpressionBody(ktExpression: KtExpression): IrExpressionBody =
|
||||
IrExpressionBodyImpl(createStatementGenerator().generateExpression(ktExpression))
|
||||
|
||||
fun generateLambdaBody(ktFun: KtFunctionLiteral): IrBody {
|
||||
val statementGenerator = createStatementGenerator()
|
||||
|
||||
+24
-31
@@ -18,9 +18,7 @@ package org.jetbrains.kotlin.psi2ir.generators
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrEnumEntry
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.*
|
||||
import org.jetbrains.kotlin.ir.descriptors.IrImplementingDelegateDescriptorImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.*
|
||||
@@ -37,17 +35,16 @@ import org.jetbrains.kotlin.renderer.OverrideRenderingPolicy
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.assertedCast
|
||||
import java.lang.AssertionError
|
||||
import java.util.*
|
||||
|
||||
class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator {
|
||||
override val context: GeneratorContext get() = declarationGenerator.context
|
||||
|
||||
class ClassGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGeneratorExtension(declarationGenerator) {
|
||||
fun generateClass(ktClassOrObject: KtClassOrObject): IrClass {
|
||||
val descriptor = getOrFail(BindingContext.CLASS, ktClassOrObject)
|
||||
val irClass = IrClassImpl(ktClassOrObject.startOffset, ktClassOrObject.endOffset, IrDeclarationOrigin.DEFINED, descriptor)
|
||||
|
||||
declarationGenerator.generateTypeParameterDeclarations(irClass, descriptor.declaredTypeParameters)
|
||||
|
||||
generatePrimaryConstructor(irClass, ktClassOrObject)
|
||||
|
||||
generatePropertiesDeclaredInPrimaryConstructor(irClass, ktClassOrObject)
|
||||
@@ -117,7 +114,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
|
||||
val irDelegate = IrFieldImpl(ktDelegateExpression.startOffset, ktDelegateExpression.endOffset, IrDeclarationOrigin.DELEGATE,
|
||||
delegateDescriptor)
|
||||
val bodyGenerator = BodyGenerator(irClass.descriptor, context)
|
||||
irDelegate.initializer = bodyGenerator.generatePropertyInitializerBody(ktDelegateExpression)
|
||||
irDelegate.initializer = bodyGenerator.generateExpressionBody(ktDelegateExpression)
|
||||
irClass.addMember(irDelegate)
|
||||
|
||||
for (delegatedMember in delegatedMembers) {
|
||||
@@ -128,7 +125,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
|
||||
}
|
||||
}
|
||||
|
||||
private fun generateDelegatedMember(irClass: IrClassImpl, irDelegate: IrFieldImpl,
|
||||
private fun generateDelegatedMember(irClass: IrClass, irDelegate: IrField,
|
||||
delegatedMember: CallableMemberDescriptor, overriddenMember: CallableMemberDescriptor) {
|
||||
when (delegatedMember) {
|
||||
is FunctionDescriptor ->
|
||||
@@ -139,33 +136,36 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
|
||||
|
||||
}
|
||||
|
||||
private fun generateDelegatedProperty(irClass: IrClassImpl, irDelegate: IrFieldImpl,
|
||||
delegated: PropertyDescriptor, overridden: PropertyDescriptor) {
|
||||
private fun generateDelegatedProperty(irClass: IrClass, irDelegate: IrField, delegated: PropertyDescriptor, overridden: PropertyDescriptor) {
|
||||
irClass.addMember(generateDelegatedProperty(irDelegate, delegated, overridden))
|
||||
}
|
||||
|
||||
private fun generateDelegatedProperty(irDelegate: IrField, delegated: PropertyDescriptor, overridden: PropertyDescriptor): IrPropertyImpl {
|
||||
val startOffset = irDelegate.startOffset
|
||||
val endOffset = irDelegate.endOffset
|
||||
|
||||
val irProperty = IrPropertyImpl(startOffset, endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, false, delegated)
|
||||
|
||||
val irGetter = IrFunctionImpl(startOffset, endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated.getter!!)
|
||||
irGetter.body = generateDelegateFunctionBody(irDelegate, delegated.getter!!, overridden.getter!!)
|
||||
irProperty.getter = irGetter
|
||||
irProperty.getter = generateDelegatedFunction(irDelegate, delegated.getter!!, overridden.getter!!)
|
||||
|
||||
if (delegated.isVar) {
|
||||
val irSetter = IrFunctionImpl(startOffset, endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated.setter!!)
|
||||
irSetter.body = generateDelegateFunctionBody(irDelegate, delegated.setter!!, overridden.setter!!)
|
||||
irProperty.setter = irSetter
|
||||
irProperty.setter = generateDelegatedFunction(irDelegate, delegated.setter!!, overridden.setter!!)
|
||||
}
|
||||
|
||||
irClass.addMember(irProperty)
|
||||
return irProperty
|
||||
}
|
||||
|
||||
private fun generateDelegatedFunction(irClass: IrClassImpl, irDelegate: IrFieldImpl, delegated: FunctionDescriptor, overridden: FunctionDescriptor) {
|
||||
private fun generateDelegatedFunction(irClass: IrClass, irDelegate: IrField, delegated: FunctionDescriptor, overridden: FunctionDescriptor) {
|
||||
irClass.addMember(generateDelegatedFunction(irDelegate, delegated, overridden))
|
||||
}
|
||||
|
||||
private fun generateDelegatedFunction(irDelegate: IrField, delegated: FunctionDescriptor, overridden: FunctionDescriptor): IrFunction {
|
||||
val irFunction = IrFunctionImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated)
|
||||
FunctionGenerator(declarationGenerator).generateSyntheticFunctionParameterDeclarations(irFunction)
|
||||
irFunction.body = generateDelegateFunctionBody(irDelegate, delegated, overridden)
|
||||
irClass.addMember(irFunction)
|
||||
return irFunction
|
||||
}
|
||||
|
||||
private fun generateDelegateFunctionBody(irDelegate: IrFieldImpl, delegated: FunctionDescriptor, overridden: FunctionDescriptor): IrBlockBodyImpl {
|
||||
private fun generateDelegateFunctionBody(irDelegate: IrField, delegated: FunctionDescriptor, overridden: FunctionDescriptor): IrBlockBodyImpl {
|
||||
val startOffset = irDelegate.startOffset
|
||||
val endOffset = irDelegate.endOffset
|
||||
val dispatchReceiver = delegated.dispatchReceiverParameter ?:
|
||||
@@ -195,7 +195,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
|
||||
}
|
||||
|
||||
private fun generateAdditionalMembersForDataClass(irClass: IrClassImpl, ktClassOrObject: KtClassOrObject) {
|
||||
DataClassMembersGenerator(ktClassOrObject, context, irClass).generate()
|
||||
DataClassMembersGenerator(declarationGenerator).generate(ktClassOrObject, irClass)
|
||||
}
|
||||
|
||||
private fun generateAdditionalMembersForEnumClass(irClass: IrClassImpl) {
|
||||
@@ -208,14 +208,7 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
|
||||
|
||||
val primaryConstructorDescriptor = classDescriptor.unsubstitutedPrimaryConstructor ?: return
|
||||
|
||||
val irPrimaryConstructor = IrConstructorImpl(ktClassOrObject.startOffset, ktClassOrObject.endOffset, IrDeclarationOrigin.DEFINED,
|
||||
primaryConstructorDescriptor)
|
||||
|
||||
val bodyGenerator = BodyGenerator(primaryConstructorDescriptor, context)
|
||||
ktClassOrObject.primaryConstructor?.valueParameterList?.let { ktValueParameterList ->
|
||||
bodyGenerator.generateDefaultParameters(ktValueParameterList, irPrimaryConstructor)
|
||||
}
|
||||
irPrimaryConstructor.body = bodyGenerator.generatePrimaryConstructorBody(ktClassOrObject)
|
||||
val irPrimaryConstructor = FunctionGenerator(declarationGenerator).generatePrimaryConstructor(primaryConstructorDescriptor, ktClassOrObject)
|
||||
|
||||
irClass.addMember(irPrimaryConstructor)
|
||||
}
|
||||
|
||||
+108
-97
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.backend.common.DataClassMethodGenerator
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.builders.*
|
||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrClassImpl
|
||||
@@ -39,119 +40,129 @@ import org.jetbrains.kotlin.types.checker.KotlinTypeChecker
|
||||
import java.lang.AssertionError
|
||||
|
||||
class DataClassMembersGenerator(
|
||||
ktClassOrObject: KtClassOrObject,
|
||||
override val context: GeneratorContext,
|
||||
val irClass: IrClassImpl
|
||||
) : Generator, DataClassMethodGenerator(ktClassOrObject, context.bindingContext) {
|
||||
private inline fun buildMember(
|
||||
function: FunctionDescriptor,
|
||||
psiElement: PsiElement? = null,
|
||||
body: IrMemberFunctionBuilder.(IrFunction) -> Unit
|
||||
) {
|
||||
IrMemberFunctionBuilder(
|
||||
context, irClass, function, IrDeclarationOrigin.GENERATED_DATA_CLASS_MEMBER,
|
||||
psiElement?.startOffset ?: UNDEFINED_OFFSET, psiElement?.endOffset ?: UNDEFINED_OFFSET
|
||||
).addToClass(body)
|
||||
declarationGenerator: DeclarationGenerator
|
||||
) : DeclarationGeneratorExtension(declarationGenerator), Generator{
|
||||
fun generate(ktClassOrObject: KtClassOrObject, irClass: IrClass) {
|
||||
MyDataClassMethodGenerator(ktClassOrObject, irClass).generate()
|
||||
}
|
||||
|
||||
override fun generateComponentFunction(function: FunctionDescriptor, parameter: ValueParameterDescriptor) {
|
||||
val ktParameter = DescriptorToSourceUtils.descriptorToDeclaration(parameter) ?:
|
||||
throw AssertionError("No definition for data class constructor parameter $parameter")
|
||||
|
||||
val property = getOrFail(BindingContext.VALUE_PARAMETER_AS_PROPERTY, parameter)
|
||||
|
||||
buildMember(function, ktParameter) {
|
||||
+irReturn(irGet(irThis(), property))
|
||||
}
|
||||
}
|
||||
|
||||
override fun generateCopyFunction(function: FunctionDescriptor, constructorParameters: List<KtParameter>) {
|
||||
val dataClassConstructor = classDescriptor.unsubstitutedPrimaryConstructor ?:
|
||||
throw AssertionError("Data class should have a primary constructor: $classDescriptor")
|
||||
|
||||
buildMember(function) {
|
||||
function.valueParameters.forEach { parameter ->
|
||||
val property = getOrFail(BindingContext.VALUE_PARAMETER_AS_PROPERTY, parameter)
|
||||
putDefault(parameter, irGet(irThis(), property))
|
||||
private inner class MyDataClassMethodGenerator(
|
||||
ktClassOrObject: KtClassOrObject,
|
||||
val irClass: IrClass
|
||||
) : DataClassMethodGenerator(ktClassOrObject, declarationGenerator.context.bindingContext) {
|
||||
private inline fun buildMember(
|
||||
function: FunctionDescriptor,
|
||||
psiElement: PsiElement? = null,
|
||||
body: IrMemberFunctionBuilder.(IrFunction) -> Unit
|
||||
) {
|
||||
IrMemberFunctionBuilder(
|
||||
context, irClass, function, IrDeclarationOrigin.GENERATED_DATA_CLASS_MEMBER,
|
||||
psiElement?.startOffset ?: UNDEFINED_OFFSET, psiElement?.endOffset ?: UNDEFINED_OFFSET
|
||||
).addToClass { irFunction ->
|
||||
FunctionGenerator(declarationGenerator).generateSyntheticFunctionParameterDeclarations(irFunction)
|
||||
body(irFunction)
|
||||
}
|
||||
+irReturn(irCall(dataClassConstructor).mapValueParameters { irGet(function.valueParameters[it.index]) })
|
||||
}
|
||||
}
|
||||
|
||||
override fun generateEqualsMethod(function: FunctionDescriptor, properties: List<PropertyDescriptor>) {
|
||||
buildMember(function) {
|
||||
+irIfThenReturnTrue(irEqeqeq(irThis(), irOther()))
|
||||
+irIfThenReturnFalse(irNotIs(irOther(), classDescriptor.defaultType))
|
||||
val otherWithCast = defineTemporary(irAs(irOther(), classDescriptor.defaultType), "other_with_cast")
|
||||
for (property in properties) {
|
||||
+irIfThenReturnFalse(
|
||||
irNotEquals(irGet(irThis(), property),
|
||||
irGet(irGet(otherWithCast), property)))
|
||||
override fun generateComponentFunction(function: FunctionDescriptor, parameter: ValueParameterDescriptor) {
|
||||
val ktParameter = DescriptorToSourceUtils.descriptorToDeclaration(parameter) ?:
|
||||
throw AssertionError("No definition for data class constructor parameter $parameter")
|
||||
|
||||
val property = getOrFail(BindingContext.VALUE_PARAMETER_AS_PROPERTY, parameter)
|
||||
|
||||
buildMember(function, ktParameter) {
|
||||
+irReturn(irGet(irThis(), property))
|
||||
}
|
||||
+irReturnTrue()
|
||||
}
|
||||
}
|
||||
|
||||
private val INT = context.builtIns.int
|
||||
private val INT_TYPE = context.builtIns.intType
|
||||
override fun generateCopyFunction(function: FunctionDescriptor, constructorParameters: List<KtParameter>) {
|
||||
val dataClassConstructor = classDescriptor.unsubstitutedPrimaryConstructor ?:
|
||||
throw AssertionError("Data class should have a primary constructor: $classDescriptor")
|
||||
|
||||
private val IMUL = INT.findFirstFunction("times") { KotlinTypeChecker.DEFAULT.equalTypes(it.valueParameters[0].type, INT_TYPE) }
|
||||
private val IADD = INT.findFirstFunction("plus") { KotlinTypeChecker.DEFAULT.equalTypes(it.valueParameters[0].type, INT_TYPE) }
|
||||
|
||||
private fun getHashCodeFunction(type: KotlinType): CallableDescriptor {
|
||||
val typeConstructorDescriptor = type.constructor.declarationDescriptor
|
||||
when (typeConstructorDescriptor) {
|
||||
is ClassDescriptor ->
|
||||
return typeConstructorDescriptor.findFirstFunction("hashCode") { it.valueParameters.isEmpty() }
|
||||
is TypeParameterDescriptor ->
|
||||
return getHashCodeFunction(context.builtIns.anyType) // TODO
|
||||
else ->
|
||||
throw AssertionError("Unexpected type: $type")
|
||||
}
|
||||
}
|
||||
|
||||
override fun generateHashCodeMethod(function: FunctionDescriptor, properties: List<PropertyDescriptor>) {
|
||||
buildMember(function) {
|
||||
val result = defineTemporaryVar(irInt(0), "result")
|
||||
var first = true
|
||||
for (property in properties) {
|
||||
val hashCodeOfProperty = getHashCodeOfProperty(irThis(), property)
|
||||
val irNewValue =
|
||||
if (first) hashCodeOfProperty
|
||||
else irCallOp(IADD, irCallOp(IMUL, irGet(result), irInt(31)), hashCodeOfProperty)
|
||||
+irSetVar(result, irNewValue)
|
||||
first = false
|
||||
buildMember(function) {
|
||||
function.valueParameters.forEach { parameter ->
|
||||
val property = getOrFail(BindingContext.VALUE_PARAMETER_AS_PROPERTY, parameter)
|
||||
putDefault(parameter, irGet(irThis(), property))
|
||||
}
|
||||
+irReturn(irCall(dataClassConstructor).mapValueParameters { irGet(function.valueParameters[it.index]) })
|
||||
}
|
||||
+irReturn(irGet(result))
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrMemberFunctionBuilder.getHashCodeOfProperty(receiver: IrExpression, property: PropertyDescriptor): IrExpression =
|
||||
when {
|
||||
property.type.containsNull() ->
|
||||
irLet(irGet(receiver, property)) { variable ->
|
||||
irIfNull(context.builtIns.intType, irGet(variable), irInt(0), getHashCodeOf(irGet(variable)))
|
||||
}
|
||||
override fun generateEqualsMethod(function: FunctionDescriptor, properties: List<PropertyDescriptor>) {
|
||||
buildMember(function) {
|
||||
+irIfThenReturnTrue(irEqeqeq(irThis(), irOther()))
|
||||
+irIfThenReturnFalse(irNotIs(irOther(), classDescriptor.defaultType))
|
||||
val otherWithCast = defineTemporary(irAs(irOther(), classDescriptor.defaultType), "other_with_cast")
|
||||
for (property in properties) {
|
||||
+irIfThenReturnFalse(
|
||||
irNotEquals(irGet(irThis(), property),
|
||||
irGet(irGet(otherWithCast), property)))
|
||||
}
|
||||
+irReturnTrue()
|
||||
}
|
||||
}
|
||||
|
||||
private val INT = context.builtIns.int
|
||||
private val INT_TYPE = context.builtIns.intType
|
||||
|
||||
private val IMUL = INT.findFirstFunction("times") { KotlinTypeChecker.DEFAULT.equalTypes(it.valueParameters[0].type, INT_TYPE) }
|
||||
private val IADD = INT.findFirstFunction("plus") { KotlinTypeChecker.DEFAULT.equalTypes(it.valueParameters[0].type, INT_TYPE) }
|
||||
|
||||
private fun getHashCodeFunction(type: KotlinType): CallableDescriptor {
|
||||
val typeConstructorDescriptor = type.constructor.declarationDescriptor
|
||||
when (typeConstructorDescriptor) {
|
||||
is ClassDescriptor ->
|
||||
return typeConstructorDescriptor.findFirstFunction("hashCode") { it.valueParameters.isEmpty() }
|
||||
is TypeParameterDescriptor ->
|
||||
return getHashCodeFunction(context.builtIns.anyType) // TODO
|
||||
else ->
|
||||
getHashCodeOf(irGet(receiver, property))
|
||||
throw AssertionError("Unexpected type: $type")
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrMemberFunctionBuilder.getHashCodeOf(irValue: IrExpression): IrExpression =
|
||||
irCall(getHashCodeFunction(irValue.type)).apply { dispatchReceiver = irValue }
|
||||
|
||||
override fun generateToStringMethod(function: FunctionDescriptor, properties: List<PropertyDescriptor>) {
|
||||
buildMember(function) {
|
||||
val irConcat = irConcat()
|
||||
irConcat.addArgument(irString(classDescriptor.name.asString() + "("))
|
||||
var first = true
|
||||
for (property in properties) {
|
||||
if (!first) irConcat.addArgument(irString(", "))
|
||||
irConcat.addArgument(irString(property.name.asString() + "="))
|
||||
irConcat.addArgument(irGet(irThis(), property))
|
||||
first = false
|
||||
override fun generateHashCodeMethod(function: FunctionDescriptor, properties: List<PropertyDescriptor>) {
|
||||
buildMember(function) {
|
||||
val result = defineTemporaryVar(irInt(0), "result")
|
||||
var first = true
|
||||
for (property in properties) {
|
||||
val hashCodeOfProperty = getHashCodeOfProperty(irThis(), property)
|
||||
val irNewValue =
|
||||
if (first) hashCodeOfProperty
|
||||
else irCallOp(IADD, irCallOp(IMUL, irGet(result), irInt(31)), hashCodeOfProperty)
|
||||
+irSetVar(result, irNewValue)
|
||||
first = false
|
||||
}
|
||||
+irReturn(irGet(result))
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrMemberFunctionBuilder.getHashCodeOfProperty(receiver: IrExpression, property: PropertyDescriptor): IrExpression =
|
||||
when {
|
||||
property.type.containsNull() ->
|
||||
irLet(irGet(receiver, property)) { variable ->
|
||||
irIfNull(context.builtIns.intType, irGet(variable), irInt(0), getHashCodeOf(irGet(variable)))
|
||||
}
|
||||
else ->
|
||||
getHashCodeOf(irGet(receiver, property))
|
||||
}
|
||||
|
||||
private fun IrMemberFunctionBuilder.getHashCodeOf(irValue: IrExpression): IrExpression =
|
||||
irCall(getHashCodeFunction(irValue.type)).apply { dispatchReceiver = irValue }
|
||||
|
||||
override fun generateToStringMethod(function: FunctionDescriptor, properties: List<PropertyDescriptor>) {
|
||||
buildMember(function) {
|
||||
val irConcat = irConcat()
|
||||
irConcat.addArgument(irString(classDescriptor.name.asString() + "("))
|
||||
var first = true
|
||||
for (property in properties) {
|
||||
if (!first) irConcat.addArgument(irString(", "))
|
||||
irConcat.addArgument(irString(property.name.asString() + "="))
|
||||
irConcat.addArgument(irGet(irThis(), property))
|
||||
first = false
|
||||
}
|
||||
irConcat.addArgument(irString(")"))
|
||||
+irReturn(irConcat)
|
||||
}
|
||||
irConcat.addArgument(irString(")"))
|
||||
+irReturn(irConcat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+25
-37
@@ -17,23 +17,27 @@
|
||||
package org.jetbrains.kotlin.psi2ir.generators
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrAnonymousInitializerImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrErrorDeclarationImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrTypeAliasImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrTypeParameterImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.IrBody
|
||||
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.kotlin.psi2ir.isConstructorDelegatingToSuper
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
|
||||
|
||||
class DeclarationGenerator(override val context: GeneratorContext) : Generator {
|
||||
fun generateMemberDeclaration(ktDeclaration: KtDeclaration): IrDeclaration =
|
||||
when (ktDeclaration) {
|
||||
is KtNamedFunction ->
|
||||
generateFunctionDeclaration(ktDeclaration)
|
||||
FunctionGenerator(this).generateFunctionDeclaration(ktDeclaration)
|
||||
is KtProperty ->
|
||||
PropertyGenerator(this).generatePropertyDeclaration(ktDeclaration)
|
||||
is KtClassOrObject ->
|
||||
@@ -52,7 +56,7 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
|
||||
is KtAnonymousInitializer ->
|
||||
generateAnonymousInitializerDeclaration(ktDeclaration, classDescriptor)
|
||||
is KtSecondaryConstructor ->
|
||||
generateSecondaryConstructor(ktDeclaration)
|
||||
FunctionGenerator(this).generateSecondaryConstructor(ktDeclaration)
|
||||
is KtEnumEntry ->
|
||||
generateEnumEntryDeclaration(ktDeclaration)
|
||||
else ->
|
||||
@@ -76,44 +80,28 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
|
||||
return irAnonymousInitializer
|
||||
}
|
||||
|
||||
fun generateFunctionDeclaration(ktFunction: KtNamedFunction): IrFunction {
|
||||
val functionDescriptor = getOrFail(BindingContext.FUNCTION, ktFunction)
|
||||
val irFunction = IrFunctionImpl(ktFunction.startOffset, ktFunction.endOffset, IrDeclarationOrigin.DEFINED, functionDescriptor)
|
||||
val bodyGenerator = createBodyGenerator(functionDescriptor)
|
||||
bodyGenerator.generateDefaultParameters(ktFunction, irFunction)
|
||||
irFunction.body = ktFunction.bodyExpression?.let { bodyGenerator.generateFunctionBody(it) }
|
||||
return irFunction
|
||||
}
|
||||
|
||||
fun generateSecondaryConstructor(ktConstructor: KtSecondaryConstructor): IrFunction {
|
||||
if (ktConstructor.isConstructorDelegatingToSuper(context.bindingContext)) {
|
||||
return generateSecondaryConstructorWithNestedInitializers(ktConstructor)
|
||||
fun generateTypeParameterDeclarations(
|
||||
irTypeParametersOwner: IrTypeParametersContainer,
|
||||
from: List<TypeParameterDescriptor>
|
||||
) {
|
||||
from.mapTo(irTypeParametersOwner.typeParameters) { typeParameterDescriptor ->
|
||||
val ktTypeParameterDeclaration = DescriptorToSourceUtils.getSourceFromDescriptor(typeParameterDescriptor)
|
||||
val startOffset = ktTypeParameterDeclaration?.startOffset ?: UNDEFINED_OFFSET
|
||||
val endOffset = ktTypeParameterDeclaration?.endOffset ?: UNDEFINED_OFFSET
|
||||
IrTypeParameterImpl(startOffset, endOffset, IrDeclarationOrigin.DEFINED, typeParameterDescriptor)
|
||||
}
|
||||
val constructorDescriptor = getOrFail(BindingContext.CONSTRUCTOR, ktConstructor) as ClassConstructorDescriptor
|
||||
val irConstructor = IrConstructorImpl(ktConstructor.startOffset, ktConstructor.endOffset, IrDeclarationOrigin.DEFINED, constructorDescriptor)
|
||||
val bodyGenerator = createBodyGenerator(constructorDescriptor)
|
||||
bodyGenerator.generateDefaultParameters(ktConstructor, irConstructor)
|
||||
irConstructor.body = bodyGenerator.generateSecondaryConstructorBody(ktConstructor)
|
||||
return irConstructor
|
||||
}
|
||||
|
||||
|
||||
private fun generateSecondaryConstructorWithNestedInitializers(ktConstructor: KtSecondaryConstructor): IrFunction {
|
||||
val constructorDescriptor = getOrFail(BindingContext.CONSTRUCTOR, ktConstructor) as ClassConstructorDescriptor
|
||||
val irConstructor = IrConstructorImpl(ktConstructor.startOffset, ktConstructor.endOffset, IrDeclarationOrigin.DEFINED, constructorDescriptor)
|
||||
val bodyGenerator = createBodyGenerator(constructorDescriptor)
|
||||
bodyGenerator.generateDefaultParameters(ktConstructor, irConstructor)
|
||||
irConstructor.body = createBodyGenerator(constructorDescriptor).generateSecondaryConstructorBodyWithNestedInitializers(ktConstructor)
|
||||
return irConstructor
|
||||
}
|
||||
|
||||
fun generateFunctionBody(scopeOwner: CallableDescriptor, ktBody: KtExpression): IrBody =
|
||||
createBodyGenerator(scopeOwner).generateFunctionBody(ktBody)
|
||||
|
||||
fun generateInitializerBody(scopeOwner: CallableDescriptor, ktBody: KtExpression): IrExpressionBody =
|
||||
createBodyGenerator(scopeOwner).generatePropertyInitializerBody(ktBody)
|
||||
createBodyGenerator(scopeOwner).generateExpressionBody(ktBody)
|
||||
}
|
||||
|
||||
private fun createBodyGenerator(descriptor: CallableDescriptor) =
|
||||
BodyGenerator(descriptor, context)
|
||||
abstract class DeclarationGeneratorExtension(val declarationGenerator: DeclarationGenerator) : Generator {
|
||||
override val context: GeneratorContext get() = declarationGenerator.context
|
||||
}
|
||||
|
||||
}
|
||||
fun Generator.createBodyGenerator(scopeOwnerDescriptor: CallableDescriptor) =
|
||||
BodyGenerator(scopeOwnerDescriptor, context)
|
||||
+28
-17
@@ -36,8 +36,9 @@ import org.jetbrains.kotlin.psi2ir.intermediate.*
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
|
||||
class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGeneratorExtension(declarationGenerator) {
|
||||
constructor(context: GeneratorContext) : this(DeclarationGenerator(context))
|
||||
|
||||
class DelegatedPropertyGenerator(override val context: GeneratorContext) : Generator {
|
||||
fun generateDelegatedProperty(
|
||||
ktProperty: KtProperty,
|
||||
ktDelegate: KtPropertyDelegate,
|
||||
@@ -55,30 +56,40 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener
|
||||
|
||||
val delegateReceiverValue = createBackingFieldValueForDelegate(delegateDescriptor, ktDelegate)
|
||||
val getterDescriptor = propertyDescriptor.getter!!
|
||||
irProperty.getter = IrFunctionImpl(
|
||||
ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR,
|
||||
getterDescriptor,
|
||||
generateDelegatedPropertyGetterBody(
|
||||
ktDelegate, getterDescriptor, delegateReceiverValue,
|
||||
createCallableReference(ktDelegate, kPropertyType, propertyDescriptor)
|
||||
)
|
||||
)
|
||||
irProperty.getter = generateDelegatedPropertyAccessorExceptBody(ktProperty, ktDelegate, getterDescriptor).also { irGetter ->
|
||||
irGetter.body = generateDelegatedPropertyGetterBody(
|
||||
ktDelegate, getterDescriptor, delegateReceiverValue,
|
||||
createCallableReference(ktDelegate, kPropertyType, propertyDescriptor)
|
||||
)
|
||||
}
|
||||
|
||||
if (propertyDescriptor.isVar) {
|
||||
val setterDescriptor = propertyDescriptor.setter!!
|
||||
irProperty.setter = IrFunctionImpl(
|
||||
ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR,
|
||||
setterDescriptor,
|
||||
generateDelegatedPropertySetterBody(
|
||||
ktDelegate, setterDescriptor, delegateReceiverValue,
|
||||
createCallableReference(ktDelegate, kPropertyType, propertyDescriptor)
|
||||
)
|
||||
)
|
||||
irProperty.setter = generateDelegatedPropertyAccessorExceptBody(ktProperty, ktDelegate, setterDescriptor).also { irSetter ->
|
||||
irSetter.body = generateDelegatedPropertySetterBody(
|
||||
ktDelegate, setterDescriptor, delegateReceiverValue,
|
||||
createCallableReference(ktDelegate, kPropertyType, propertyDescriptor)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return irProperty
|
||||
}
|
||||
|
||||
private fun generateDelegatedPropertyAccessorExceptBody(
|
||||
ktProperty: KtProperty,
|
||||
ktDelegate: KtPropertyDelegate,
|
||||
accessorDescriptor: PropertyAccessorDescriptor
|
||||
): IrFunction =
|
||||
IrFunctionImpl(
|
||||
ktDelegate.startOffset, ktDelegate.endOffset,
|
||||
IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR,
|
||||
accessorDescriptor
|
||||
).also { irGetter ->
|
||||
FunctionGenerator(declarationGenerator).generateFunctionParameterDeclarations(irGetter, ktProperty, null)
|
||||
}
|
||||
|
||||
|
||||
private fun getKPropertyTypeForDelegatedProperty(propertyDescriptor: PropertyDescriptor): KotlinType {
|
||||
val receivers = listOfNotNull(propertyDescriptor.extensionReceiverParameter, propertyDescriptor.dispatchReceiverParameter)
|
||||
return context.reflectionTypes.getKPropertyType(Annotations.EMPTY, receivers.map{ it.type }, propertyDescriptor.type, propertyDescriptor.isVar)
|
||||
|
||||
+9
-2
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.psi2ir.generators
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrClassImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.addMember
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrSyntheticBodyImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind
|
||||
@@ -39,7 +40,10 @@ class EnumClassMembersGenerator(override val context: GeneratorContext) : Genera
|
||||
|
||||
irClass.addMember(
|
||||
IrFunctionImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrDeclarationOrigin.ENUM_CLASS_SPECIAL_MEMBER,
|
||||
valuesFunction, IrSyntheticBodyImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrSyntheticBodyKind.ENUM_VALUES)))
|
||||
valuesFunction,
|
||||
IrSyntheticBodyImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrSyntheticBodyKind.ENUM_VALUES)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun generateValueOf(irClass: IrClassImpl) {
|
||||
@@ -51,6 +55,9 @@ class EnumClassMembersGenerator(override val context: GeneratorContext) : Genera
|
||||
|
||||
irClass.addMember(
|
||||
IrFunctionImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrDeclarationOrigin.ENUM_CLASS_SPECIAL_MEMBER,
|
||||
valueOfFunction, IrSyntheticBodyImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrSyntheticBodyKind.ENUM_VALUEOF)))
|
||||
valueOfFunction,
|
||||
IrSyntheticBodyImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrSyntheticBodyKind.ENUM_VALUEOF)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+161
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.psi2ir.generators
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.declarations.IrConstructor
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
||||
import org.jetbrains.kotlin.ir.declarations.IrValueParameter
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrConstructorImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.kotlin.psi2ir.endOffsetOrUndefined
|
||||
import org.jetbrains.kotlin.psi2ir.isConstructorDelegatingToSuper
|
||||
import org.jetbrains.kotlin.psi2ir.startOffsetOrUndefined
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils
|
||||
|
||||
class FunctionGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGeneratorExtension(declarationGenerator) {
|
||||
constructor(context: GeneratorContext) : this(DeclarationGenerator(context))
|
||||
|
||||
fun generateFunctionDeclaration(ktFunction: KtNamedFunction): IrFunction {
|
||||
val functionDescriptor = getOrFail(BindingContext.FUNCTION, ktFunction)
|
||||
val irFunction = IrFunctionImpl(ktFunction.startOffset, ktFunction.endOffset, IrDeclarationOrigin.DEFINED, functionDescriptor)
|
||||
generateFunctionParameterDeclarations(irFunction, ktFunction, ktFunction.receiverTypeReference)
|
||||
irFunction.body = ktFunction.bodyExpression?.let { createBodyGenerator(functionDescriptor).generateFunctionBody(it) }
|
||||
return irFunction
|
||||
}
|
||||
|
||||
fun generateLambdaFunctionDeclaration(ktFunction: KtFunctionLiteral): IrFunction {
|
||||
val lambdaDescriptor = getOrFail(BindingContext.FUNCTION, ktFunction)
|
||||
val irLambdaFunction = IrFunctionImpl(ktFunction.startOffset, ktFunction.endOffset, IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA, lambdaDescriptor)
|
||||
generateFunctionParameterDeclarations(irLambdaFunction, ktFunction, null)
|
||||
irLambdaFunction.body = createBodyGenerator(lambdaDescriptor).generateLambdaBody(ktFunction)
|
||||
return irLambdaFunction
|
||||
}
|
||||
|
||||
fun generateFunctionParameterDeclarations(
|
||||
irFunction: IrFunction,
|
||||
ktParameterOwner: KtElement,
|
||||
ktReceiverParameterElement: KtElement?
|
||||
) {
|
||||
declarationGenerator.generateTypeParameterDeclarations(irFunction, irFunction.descriptor.typeParameters)
|
||||
generateValueParameterDeclarations(irFunction, ktParameterOwner, ktReceiverParameterElement)
|
||||
}
|
||||
|
||||
fun generatePrimaryConstructor(
|
||||
primaryConstructorDescriptor: ClassConstructorDescriptor,
|
||||
ktClassOrObject: KtClassOrObject
|
||||
): IrConstructor {
|
||||
val irPrimaryConstructor = IrConstructorImpl(
|
||||
ktClassOrObject.startOffset, ktClassOrObject.endOffset,
|
||||
IrDeclarationOrigin.DEFINED,
|
||||
primaryConstructorDescriptor
|
||||
)
|
||||
|
||||
generateFunctionParameterDeclarations(
|
||||
irPrimaryConstructor,
|
||||
ktClassOrObject.primaryConstructor ?: ktClassOrObject,
|
||||
null
|
||||
)
|
||||
|
||||
irPrimaryConstructor.body = BodyGenerator(primaryConstructorDescriptor, context).generatePrimaryConstructorBody(ktClassOrObject)
|
||||
|
||||
return irPrimaryConstructor
|
||||
}
|
||||
|
||||
fun generateSyntheticFunctionParameterDeclarations(irFunction: IrFunction) {
|
||||
declarationGenerator.generateTypeParameterDeclarations(irFunction, irFunction.descriptor.typeParameters)
|
||||
generateValueParameterDeclarations(irFunction, null, null)
|
||||
}
|
||||
|
||||
private fun generateValueParameterDeclarations(
|
||||
irFunction: IrFunction,
|
||||
ktParameterOwner: KtElement?,
|
||||
ktReceiverParameterElement: KtElement?
|
||||
) {
|
||||
val functionDescriptor = irFunction.descriptor
|
||||
|
||||
irFunction.dispatchReceiverParameter = functionDescriptor.dispatchReceiverParameter?.let {
|
||||
generateReceiverParameterDeclaration(it, ktParameterOwner)
|
||||
}
|
||||
|
||||
irFunction.extensionReceiverParameter = functionDescriptor.extensionReceiverParameter?.let {
|
||||
generateReceiverParameterDeclaration(it, ktReceiverParameterElement ?: ktParameterOwner)
|
||||
}
|
||||
|
||||
val bodyGenerator = createBodyGenerator(functionDescriptor)
|
||||
functionDescriptor.valueParameters.mapTo(irFunction.valueParameters) { valueParameterDescriptor ->
|
||||
val ktParameter = DescriptorToSourceUtils.getSourceFromDescriptor(valueParameterDescriptor) as? KtParameter
|
||||
generateValueParameterDeclaration(valueParameterDescriptor, ktParameter, bodyGenerator)
|
||||
}
|
||||
}
|
||||
|
||||
private fun generateValueParameterDeclaration(
|
||||
valueParameterDescriptor: ValueParameterDescriptor,
|
||||
ktParameter: KtParameter?,
|
||||
bodyGenerator: BodyGenerator
|
||||
): IrValueParameter =
|
||||
IrValueParameterImpl(
|
||||
ktParameter.startOffsetOrUndefined,
|
||||
ktParameter.endOffsetOrUndefined,
|
||||
IrDeclarationOrigin.DEFINED,
|
||||
valueParameterDescriptor,
|
||||
ktParameter?.defaultValue?.let {
|
||||
bodyGenerator.generateExpressionBody(it)
|
||||
}
|
||||
)
|
||||
|
||||
private fun generateReceiverParameterDeclaration(
|
||||
receiverParameterDescriptor: ReceiverParameterDescriptor,
|
||||
ktElement: KtElement?
|
||||
): IrValueParameter =
|
||||
IrValueParameterImpl(
|
||||
ktElement.startOffsetOrUndefined,
|
||||
ktElement.endOffsetOrUndefined,
|
||||
IrDeclarationOrigin.DEFINED,
|
||||
receiverParameterDescriptor
|
||||
)
|
||||
|
||||
fun generateSecondaryConstructor(ktConstructor: KtSecondaryConstructor): IrFunction {
|
||||
val constructorDescriptor = getOrFail(BindingContext.CONSTRUCTOR, ktConstructor) as ClassConstructorDescriptor
|
||||
|
||||
val irConstructor = IrConstructorImpl(ktConstructor.startOffset, ktConstructor.endOffset, IrDeclarationOrigin.DEFINED,
|
||||
constructorDescriptor)
|
||||
|
||||
generateFunctionParameterDeclarations(irConstructor, ktConstructor, null)
|
||||
|
||||
irConstructor.body = createBodyGenerator(constructorDescriptor).run {
|
||||
if (ktConstructor.isConstructorDelegatingToSuper(context.bindingContext))
|
||||
generateSecondaryConstructorBodyWithNestedInitializers(ktConstructor)
|
||||
else
|
||||
generateSecondaryConstructorBody(ktConstructor)
|
||||
}
|
||||
|
||||
return irConstructor
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+6
-14
@@ -17,36 +17,29 @@
|
||||
package org.jetbrains.kotlin.psi2ir.generators
|
||||
|
||||
import org.jetbrains.kotlin.ir.IrStatement
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrCallableReferenceImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
||||
import org.jetbrains.kotlin.psi.KtLambdaExpression
|
||||
import org.jetbrains.kotlin.psi.KtNamedFunction
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
|
||||
class LocalFunctionGenerator(statementGenerator: StatementGenerator) : StatementGeneratorExtension(statementGenerator) {
|
||||
fun generateLambda(ktLambda: KtLambdaExpression): IrStatement {
|
||||
val ktFun = ktLambda.functionLiteral
|
||||
val lambdaExpressionType = getInferredTypeWithImplicitCastsOrFail(ktLambda)
|
||||
val lambdaDescriptor = getOrFail(BindingContext.FUNCTION, ktFun)
|
||||
val irLambdaFunction = FunctionGenerator(context).generateLambdaFunctionDeclaration(ktFun)
|
||||
|
||||
val irBlock = IrBlockImpl(ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType, IrStatementOrigin.LAMBDA)
|
||||
|
||||
val irFun = IrFunctionImpl(ktFun.startOffset, ktFun.endOffset, IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA, lambdaDescriptor)
|
||||
irFun.body = BodyGenerator(lambdaDescriptor, statementGenerator.context).generateLambdaBody(ktFun)
|
||||
irBlock.statements.add(irFun)
|
||||
|
||||
irBlock.statements.add(irLambdaFunction)
|
||||
irBlock.statements.add(
|
||||
IrCallableReferenceImpl(
|
||||
ktLambda.startOffset, ktLambda.endOffset, lambdaExpressionType,
|
||||
lambdaDescriptor, null, IrStatementOrigin.LAMBDA
|
||||
irLambdaFunction.descriptor, null, IrStatementOrigin.LAMBDA
|
||||
)
|
||||
)
|
||||
|
||||
return irBlock
|
||||
}
|
||||
|
||||
@@ -73,6 +66,5 @@ class LocalFunctionGenerator(statementGenerator: StatementGenerator) : Statement
|
||||
}
|
||||
|
||||
private fun generateFunctionDeclaration(ktFun: KtNamedFunction): IrFunction =
|
||||
DeclarationGenerator(context).generateFunctionDeclaration(ktFun)
|
||||
|
||||
FunctionGenerator(context).generateFunctionDeclaration(ktFun)
|
||||
}
|
||||
+20
-14
@@ -16,10 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.psi2ir.generators
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyGetterDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertySetterDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclaration
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
||||
@@ -37,11 +34,11 @@ import org.jetbrains.kotlin.psi.KtProperty
|
||||
import org.jetbrains.kotlin.psi.KtPropertyDelegate
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
import org.jetbrains.kotlin.psi.psiUtil.startOffset
|
||||
import org.jetbrains.kotlin.psi2ir.endOffsetOrUndefined
|
||||
import org.jetbrains.kotlin.psi2ir.startOffsetOrUndefined
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
|
||||
class PropertyGenerator(val declarationGenerator: DeclarationGenerator) : Generator {
|
||||
override val context: GeneratorContext get() = declarationGenerator.context
|
||||
|
||||
class PropertyGenerator(declarationGenerator: DeclarationGenerator) : DeclarationGeneratorExtension(declarationGenerator) {
|
||||
fun generatePropertyDeclaration(ktProperty: KtProperty): IrProperty {
|
||||
val propertyDescriptor = getPropertyDescriptor(ktProperty)
|
||||
val ktDelegate = ktProperty.delegate
|
||||
@@ -65,25 +62,32 @@ class PropertyGenerator(val declarationGenerator: DeclarationGenerator) : Genera
|
||||
|
||||
val getter = propertyDescriptor.getter ?:
|
||||
throw AssertionError("Property declared in primary constructor has no getter: $propertyDescriptor")
|
||||
val irGetter = IrFunctionImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, getter)
|
||||
irProperty.getter = irGetter
|
||||
irGetter.body = generateDefaultGetterBody(ktParameter, getter)
|
||||
irProperty.getter = generateDefaultAccessor(getter, ktParameter, isGetter = true)
|
||||
|
||||
if (propertyDescriptor.isVar) {
|
||||
val setter = propertyDescriptor.setter ?:
|
||||
throw AssertionError("Property declared in primary constructor has no setter: $propertyDescriptor")
|
||||
val irSetter = IrFunctionImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, setter)
|
||||
irSetter.body = generateDefaultSetterBody(ktParameter, setter)
|
||||
irProperty.setter = irSetter
|
||||
irProperty.setter = generateDefaultAccessor(setter, ktParameter, isGetter = false)
|
||||
}
|
||||
|
||||
return irProperty
|
||||
}
|
||||
|
||||
fun generateDefaultAccessor(descriptor: PropertyAccessorDescriptor, ktElement: KtElement, isGetter: Boolean): IrFunction {
|
||||
val irAccessor = IrFunctionImpl(ktElement.startOffsetOrUndefined, ktElement.endOffsetOrUndefined, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, descriptor)
|
||||
val accessorDescriptor = irAccessor.descriptor
|
||||
declarationGenerator.generateTypeParameterDeclarations(irAccessor, accessorDescriptor.typeParameters)
|
||||
FunctionGenerator(declarationGenerator).generateSyntheticFunctionParameterDeclarations(irAccessor)
|
||||
irAccessor.body =
|
||||
if (isGetter) generateDefaultGetterBody(ktElement, descriptor as PropertyGetterDescriptor)
|
||||
else generateDefaultSetterBody(ktElement, descriptor as PropertySetterDescriptor)
|
||||
return irAccessor
|
||||
}
|
||||
|
||||
private fun generateDelegatedProperty(ktProperty: KtProperty, ktDelegate: KtPropertyDelegate, propertyDescriptor: PropertyDescriptor): IrProperty {
|
||||
val ktDelegateExpression = ktDelegate.expression!!
|
||||
val irDelegateInitializer = declarationGenerator.generateInitializerBody(propertyDescriptor, ktDelegateExpression)
|
||||
return DelegatedPropertyGenerator(context).generateDelegatedProperty(ktProperty, ktDelegate, propertyDescriptor, irDelegateInitializer)
|
||||
return DelegatedPropertyGenerator(declarationGenerator).generateDelegatedProperty(ktProperty, ktDelegate, propertyDescriptor, irDelegateInitializer)
|
||||
}
|
||||
|
||||
private fun generateSimpleProperty(ktProperty: KtProperty, propertyDescriptor: PropertyDescriptor): IrProperty {
|
||||
@@ -114,6 +118,7 @@ class PropertyGenerator(val declarationGenerator: DeclarationGenerator) : Genera
|
||||
val irGetter = ktGetter?.let {
|
||||
IrFunctionImpl(it.startOffset, it.endOffset, IrDeclarationOrigin.DEFINED, getter)
|
||||
} ?: IrFunctionImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, getter)
|
||||
FunctionGenerator(declarationGenerator).generateFunctionParameterDeclarations(irGetter, ktProperty, ktProperty.receiverTypeReference)
|
||||
|
||||
irGetter.body = ktGetter?.bodyExpression?.let {
|
||||
declarationGenerator.generateFunctionBody(getter, it )
|
||||
@@ -131,6 +136,7 @@ class PropertyGenerator(val declarationGenerator: DeclarationGenerator) : Genera
|
||||
val irSetter = ktSetter?.let {
|
||||
IrFunctionImpl(it.startOffset, it.endOffset, IrDeclarationOrigin.DEFINED, setter)
|
||||
} ?: IrFunctionImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, setter)
|
||||
FunctionGenerator(declarationGenerator).generateFunctionParameterDeclarations(irSetter, ktProperty, ktProperty.receiverTypeReference)
|
||||
|
||||
irSetter.body = ktSetter?.bodyExpression?.let {
|
||||
declarationGenerator.generateFunctionBody(setter, it )
|
||||
|
||||
@@ -19,15 +19,17 @@ package org.jetbrains.kotlin.ir.builders
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrClassImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.putDefault
|
||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||
|
||||
class IrMemberFunctionBuilder(
|
||||
context: IrGeneratorContext,
|
||||
val irClass: IrClassImpl,
|
||||
val irClass: IrClass,
|
||||
val function: FunctionDescriptor,
|
||||
val origin: IrDeclarationOrigin,
|
||||
startOffset: Int = UNDEFINED_OFFSET,
|
||||
@@ -35,11 +37,12 @@ class IrMemberFunctionBuilder(
|
||||
) : IrBlockBodyBuilder(context, Scope(function), startOffset, endOffset) {
|
||||
lateinit var irFunction: IrFunction
|
||||
|
||||
inline fun addToClass(body: IrMemberFunctionBuilder.(IrFunction) -> Unit) {
|
||||
inline fun addToClass(body: IrMemberFunctionBuilder.(IrFunction) -> Unit): IrFunction {
|
||||
irFunction = IrFunctionImpl(startOffset, endOffset, origin, function)
|
||||
body(irFunction)
|
||||
irFunction.body = doBuild()
|
||||
irClass.addMember(irFunction)
|
||||
irClass.declarations.add(irFunction)
|
||||
return irFunction
|
||||
}
|
||||
|
||||
fun putDefault(parameter: ValueParameterDescriptor, value: IrExpression) {
|
||||
|
||||
@@ -18,13 +18,19 @@ package org.jetbrains.kotlin.ir.declarations
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
|
||||
interface IrClass : IrDeclaration, IrDeclarationContainer {
|
||||
interface IrClass : IrDeclaration, IrDeclarationContainer, IrTypeParametersContainer {
|
||||
override val declarationKind: IrDeclarationKind
|
||||
get() = IrDeclarationKind.CLASS
|
||||
|
||||
override val descriptor: ClassDescriptor
|
||||
}
|
||||
|
||||
val typeParameters: MutableList<IrTypeParameter>
|
||||
fun IrClass.addMember(member: IrDeclaration) {
|
||||
declarations.add(member)
|
||||
}
|
||||
|
||||
fun IrClass.addAll(members: List<IrDeclaration>) {
|
||||
declarations.addAll(members)
|
||||
}
|
||||
|
||||
fun IrClass.getInstanceInitializerMembers() =
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.declarations
|
||||
|
||||
import org.jetbrains.kotlin.ir.util.transformFlat
|
||||
|
||||
interface IrDeclarationContainer {
|
||||
val declarations: MutableList<IrDeclaration>
|
||||
}
|
||||
|
||||
@@ -21,19 +21,32 @@ import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.expressions.IrBody
|
||||
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
|
||||
|
||||
interface IrFunction : IrDeclaration {
|
||||
interface IrFunction : IrDeclaration, IrTypeParametersContainer {
|
||||
override val descriptor: FunctionDescriptor
|
||||
|
||||
val typeParameters: MutableList<IrTypeParameter>
|
||||
|
||||
var dispatchReceiverParameter: IrValueParameter?
|
||||
var extensionReceiverParameter: IrValueParameter?
|
||||
val valueParameters: MutableList<IrValueParameter>
|
||||
|
||||
var body: IrBody?
|
||||
|
||||
override val declarationKind: IrDeclarationKind
|
||||
get() = IrDeclarationKind.FUNCTION
|
||||
|
||||
fun putDefault(parameter: ValueParameterDescriptor, expressionBody: IrExpressionBody)
|
||||
fun getDefault(parameter: ValueParameterDescriptor): IrExpressionBody?
|
||||
}
|
||||
|
||||
|
||||
fun IrFunction.getIrValueParameter(parameter: ValueParameterDescriptor): IrValueParameter =
|
||||
valueParameters.getOrElse(parameter.index) {
|
||||
throw AssertionError("No IrValueParameter for $parameter")
|
||||
}.also { found ->
|
||||
assert(found.descriptor == parameter) {
|
||||
"Parameter indices mismatch at $descriptor: $parameter != ${found.descriptor}"
|
||||
}
|
||||
}
|
||||
|
||||
fun IrFunction.getDefault(parameter: ValueParameterDescriptor): IrExpressionBody? =
|
||||
getIrValueParameter(parameter).defaultValue
|
||||
|
||||
fun IrFunction.putDefault(parameter: ValueParameterDescriptor, expressionBody: IrExpressionBody) {
|
||||
getIrValueParameter(parameter).defaultValue = expressionBody
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.ir.declarations
|
||||
|
||||
interface IrTypeParametersContainer {
|
||||
val typeParameters: MutableList<IrTypeParameter>
|
||||
}
|
||||
@@ -41,14 +41,6 @@ class IrClassImpl(
|
||||
|
||||
override val typeParameters: MutableList<IrTypeParameter> = SmartList()
|
||||
|
||||
fun addMember(member: IrDeclaration) {
|
||||
declarations.add(member)
|
||||
}
|
||||
|
||||
fun addAll(members: List<IrDeclaration>) {
|
||||
declarations.addAll(members)
|
||||
}
|
||||
|
||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||
visitor.visitClass(this, data)
|
||||
|
||||
|
||||
+9
-12
@@ -35,30 +35,27 @@ abstract class IrFunctionBase(
|
||||
) : IrDeclarationBase(startOffset, endOffset, origin), IrFunction {
|
||||
override val typeParameters: MutableList<IrTypeParameter> = SmartList()
|
||||
|
||||
override var dispatchReceiverParameter: IrValueParameter? = null
|
||||
override var extensionReceiverParameter: IrValueParameter? = null
|
||||
override val valueParameters: MutableList<IrValueParameter> = ArrayList()
|
||||
|
||||
final override var body: IrBody? = null
|
||||
|
||||
private fun getIrValueParameter(parameter: ValueParameterDescriptor): IrValueParameter =
|
||||
valueParameters.getOrElse(parameter.index) {
|
||||
throw AssertionError("No IrValueParameter for $parameter")
|
||||
}
|
||||
|
||||
override fun getDefault(parameter: ValueParameterDescriptor): IrExpressionBody? =
|
||||
getIrValueParameter(parameter).defaultValue
|
||||
|
||||
override fun putDefault(parameter: ValueParameterDescriptor, expressionBody: IrExpressionBody) {
|
||||
getIrValueParameter(parameter).defaultValue = expressionBody
|
||||
}
|
||||
|
||||
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
|
||||
typeParameters.forEach { it.accept(visitor, data) }
|
||||
|
||||
dispatchReceiverParameter?.accept(visitor, data)
|
||||
extensionReceiverParameter?.accept(visitor, data)
|
||||
valueParameters.forEach { it.accept(visitor, data) }
|
||||
|
||||
body?.accept(visitor, data)
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
|
||||
typeParameters.transform { it.transform(transformer, data) }
|
||||
|
||||
dispatchReceiverParameter = dispatchReceiverParameter?.transform(transformer, data)
|
||||
extensionReceiverParameter = extensionReceiverParameter?.transform(transformer, data)
|
||||
valueParameters.transform { it.transform(transformer, data) }
|
||||
|
||||
body = body?.transform(transformer, data)
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class IrValueParameterImpl(
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
descriptor: ParameterDescriptor,
|
||||
defaultValue: IrExpressionBody
|
||||
defaultValue: IrExpressionBody?
|
||||
) : this(startOffset, endOffset, origin, descriptor) {
|
||||
this.defaultValue = defaultValue
|
||||
}
|
||||
|
||||
@@ -85,7 +85,9 @@ open class DeepCopyIrTree : IrElementTransformerVoid() {
|
||||
mapDeclarationOrigin(declaration.origin),
|
||||
mapClassDeclaration(declaration.descriptor),
|
||||
declaration.declarations.map { it.transform(this, null) as IrDeclaration }
|
||||
)
|
||||
).apply {
|
||||
transformTypeParameters(declaration, descriptor.declaredTypeParameters)
|
||||
}
|
||||
|
||||
override fun visitTypeAlias(declaration: IrTypeAlias): IrTypeAlias =
|
||||
IrTypeAliasImpl(
|
||||
@@ -100,7 +102,7 @@ open class DeepCopyIrTree : IrElementTransformerVoid() {
|
||||
mapDeclarationOrigin(declaration.origin),
|
||||
mapFunctionDeclaration(declaration.descriptor),
|
||||
declaration.body?.transform(this, null)
|
||||
).transformDefaults(declaration)
|
||||
).transformParameters(declaration)
|
||||
|
||||
override fun visitConstructor(declaration: IrConstructor): IrConstructor =
|
||||
IrConstructorImpl(
|
||||
@@ -108,17 +110,59 @@ open class DeepCopyIrTree : IrElementTransformerVoid() {
|
||||
mapDeclarationOrigin(declaration.origin),
|
||||
mapConstructorDeclaration(declaration.descriptor),
|
||||
declaration.body!!.transform(this, null)
|
||||
).transformDefaults(declaration)
|
||||
).transformParameters(declaration)
|
||||
|
||||
private fun <T : IrFunction> T.transformDefaults(original: T): T {
|
||||
for (originalValueParameter in original.descriptor.valueParameters) {
|
||||
val valueParameter = descriptor.valueParameters[originalValueParameter.index]
|
||||
original.getDefault(originalValueParameter)?.let { irDefaultParameterValue ->
|
||||
putDefault(valueParameter, irDefaultParameterValue.transform(this@DeepCopyIrTree, null))
|
||||
private fun <T : IrTypeParametersContainer> T.transformTypeParameters(original: T, myTypeParameters: List<TypeParameterDescriptor>): T =
|
||||
apply {
|
||||
original.typeParameters.mapTo(typeParameters) { originalTypeParameter ->
|
||||
copyTypeParameter(originalTypeParameter, myTypeParameters[originalTypeParameter.descriptor.index])
|
||||
}
|
||||
}
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
private fun <T : IrFunction> T.transformParameters(original: T): T =
|
||||
apply {
|
||||
transformTypeParameters(original, descriptor.typeParameters)
|
||||
transformValueParameters(original)
|
||||
}
|
||||
|
||||
private fun <T : IrFunction> T.transformValueParameters(original: T) =
|
||||
apply {
|
||||
dispatchReceiverParameter = original.dispatchReceiverParameter?.let {
|
||||
copyValueParameter(it, descriptor.dispatchReceiverParameter ?: throw AssertionError("No dispatch receiver in $descriptor"))
|
||||
}
|
||||
|
||||
extensionReceiverParameter = original.extensionReceiverParameter?.let {
|
||||
copyValueParameter(it, descriptor.extensionReceiverParameter ?: throw AssertionError("No extension receiver in $descriptor"))
|
||||
}
|
||||
|
||||
original.valueParameters.mapIndexedTo(valueParameters) { i, originalValueParameter ->
|
||||
copyValueParameter(originalValueParameter, descriptor.valueParameters[i])
|
||||
}
|
||||
}
|
||||
|
||||
private fun copyTypeParameter(
|
||||
originalTypeParameter: IrTypeParameter,
|
||||
newTypeParameterDescriptor: TypeParameterDescriptor
|
||||
): IrTypeParameterImpl =
|
||||
IrTypeParameterImpl(
|
||||
originalTypeParameter.startOffset, originalTypeParameter.endOffset,
|
||||
mapDeclarationOrigin(originalTypeParameter.origin),
|
||||
newTypeParameterDescriptor
|
||||
)
|
||||
|
||||
private fun copyValueParameter(
|
||||
originalValueParameter: IrValueParameter,
|
||||
newParameterDescriptor: ParameterDescriptor
|
||||
): IrValueParameterImpl =
|
||||
IrValueParameterImpl(
|
||||
originalValueParameter.startOffset, originalValueParameter.endOffset,
|
||||
mapDeclarationOrigin(originalValueParameter.origin),
|
||||
newParameterDescriptor,
|
||||
originalValueParameter.defaultValue?.transform(this@DeepCopyIrTree, null)
|
||||
)
|
||||
|
||||
// TODO visitTypeParameter
|
||||
// TODO visitValueParameter
|
||||
|
||||
override fun visitProperty(declaration: IrProperty): IrProperty =
|
||||
IrPropertyImpl(
|
||||
|
||||
@@ -71,6 +71,8 @@ class DumpIrTreeVisitor(out: Appendable): IrElementVisitor<Unit, String> {
|
||||
override fun visitFunction(declaration: IrFunction, data: String) {
|
||||
declaration.dumpLabeledElementWith(data) {
|
||||
declaration.typeParameters.dumpElements()
|
||||
declaration.dispatchReceiverParameter?.accept(this, "\$this")
|
||||
declaration.extensionReceiverParameter?.accept(this, "\$receiver")
|
||||
declaration.valueParameters.dumpElements()
|
||||
declaration.body?.accept(this, "")
|
||||
}
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.util
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.expressions.*
|
||||
import org.jetbrains.kotlin.ir.util.RenderIrElementVisitor.Companion.ref
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||
import org.jetbrains.kotlin.renderer.ClassifierNamePolicy
|
||||
import org.jetbrains.kotlin.renderer.DescriptorRenderer
|
||||
@@ -209,14 +211,17 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
|
||||
internal fun IrDeclaration.name(): String =
|
||||
descriptor.name.toString()
|
||||
|
||||
internal fun IrDeclaration.renderDeclared(): String =
|
||||
DECLARATION_RENDERER.render(this.descriptor)
|
||||
|
||||
internal fun DeclarationDescriptor.ref(): String =
|
||||
if (this is ReceiverParameterDescriptor)
|
||||
"<receiver: ${containingDeclaration.ref()}>"
|
||||
internal fun DescriptorRenderer.renderDescriptor(descriptor: DeclarationDescriptor): String =
|
||||
if (descriptor is ReceiverParameterDescriptor)
|
||||
"<receiver: ${descriptor.containingDeclaration.ref()}>"
|
||||
else
|
||||
REFERENCE_RENDERER.render(this)
|
||||
render(descriptor)
|
||||
|
||||
internal fun IrDeclaration.renderDeclared(): String =
|
||||
DECLARATION_RENDERER.renderDescriptor(this.descriptor)
|
||||
|
||||
internal fun DeclarationDescriptor.ref(): String =
|
||||
REFERENCE_RENDERER.renderDescriptor(this)
|
||||
|
||||
internal fun KotlinType.render(): String =
|
||||
DECLARATION_RENDERER.renderType(this)
|
||||
|
||||
+11
@@ -1,6 +1,8 @@
|
||||
FILE /argumentReorderingInDelegatingConstructorCall.kt
|
||||
CLASS CLASS Base
|
||||
CONSTRUCTOR public constructor Base(x: kotlin.Int, y: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Base'
|
||||
@@ -9,6 +11,7 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Base>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -18,12 +21,15 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Base>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Base>' type=Base origin=null
|
||||
CLASS CLASS Test1
|
||||
CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter xx: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter yy: kotlin.Int
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=ARGUMENTS_REORDERING_FOR_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int
|
||||
@@ -36,6 +42,8 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
CLASS CLASS Test2
|
||||
CONSTRUCTOR public constructor Test2(xx: kotlin.Int, yy: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter xx: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter yy: kotlin.Int
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=ARGUMENTS_REORDERING_FOR_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int
|
||||
@@ -47,6 +55,9 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
|
||||
y: GET_VAR 'tmp0_y: Int' type=kotlin.Int origin=null
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
CONSTRUCTOR public constructor Test2(xxx: kotlin.Int, yyy: kotlin.Int, a: kotlin.Any)
|
||||
VALUE_PARAMETER value-parameter xxx: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter yyy: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Any
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=ARGUMENTS_REORDERING_FOR_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_yy: kotlin.Int
|
||||
|
||||
+22
-2
@@ -1,8 +1,11 @@
|
||||
FILE /classMembers.kt
|
||||
CLASS CLASS C
|
||||
CONSTRUCTOR public constructor C(x: kotlin.Int, y: kotlin.Int, z: kotlin.Int = ...)
|
||||
z: EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter z: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
@@ -11,6 +14,7 @@ FILE /classMembers.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
@@ -20,11 +24,14 @@ FILE /classMembers.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z>(): Int'
|
||||
GET_FIELD 'z: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-z>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'z: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
@@ -40,31 +47,39 @@ FILE /classMembers.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-property>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-property>(): Int'
|
||||
GET_FIELD 'property: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
PROPERTY public final val propertyWithGet: kotlin.Int
|
||||
FUN public final fun <get-propertyWithGet>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-propertyWithGet>(): Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public final var propertyWithGetAndSet: kotlin.Int
|
||||
FUN public final fun <get-propertyWithGetAndSet>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-propertyWithGetAndSet>(): Int'
|
||||
CALL '<get-z>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN public final fun <set-propertyWithGetAndSet>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL '<set-z>(Int): Unit' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR '<receiver: C>' type=C origin=null
|
||||
<set-?>: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
|
||||
FUN public final fun function(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='1'
|
||||
FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
$receiver: VALUE_PARAMETER <receiver: memberExtensionFunction() on Int: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='2'
|
||||
@@ -74,16 +89,21 @@ FILE /classMembers.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='NestedClass'
|
||||
FUN public final fun function(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: NestedClass>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='3'
|
||||
FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: NestedClass>
|
||||
$receiver: VALUE_PARAMETER <receiver: memberExtensionFunction() on Int: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='4'
|
||||
CLASS INTERFACE NestedInterface
|
||||
FUN public abstract fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: NestedInterface>
|
||||
FUN public open fun bar(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: NestedInterface>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(): Unit'
|
||||
CALL 'foo(): Unit' type=kotlin.Unit origin=null
|
||||
|
||||
+38
-12
@@ -1,6 +1,9 @@
|
||||
FILE /dataClasses.kt
|
||||
CLASS CLASS Test1
|
||||
CONSTRUCTOR public constructor Test1(x: kotlin.Int, y: kotlin.String, z: kotlin.Any)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.String
|
||||
VALUE_PARAMETER value-parameter z: kotlin.Any
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
@@ -9,6 +12,7 @@ FILE /dataClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -18,6 +22,7 @@ FILE /dataClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): String'
|
||||
GET_FIELD 'y: String' type=kotlin.String origin=null
|
||||
@@ -27,35 +32,43 @@ FILE /dataClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter z: Any' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Any
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z>(): Any'
|
||||
GET_FIELD 'z: Any' type=kotlin.Any origin=null
|
||||
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component1(): Int'
|
||||
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component2(): String'
|
||||
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component3(): Any'
|
||||
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1
|
||||
x: EXPRESSION_BODY
|
||||
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
y: EXPRESSION_BODY
|
||||
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
z: EXPRESSION_BODY
|
||||
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
VALUE_PARAMETER value-parameter y: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
VALUE_PARAMETER value-parameter z: kotlin.Any = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1'
|
||||
CALL 'constructor Test1(Int, String, Any)' type=Test1 origin=null
|
||||
@@ -63,6 +76,7 @@ FILE /dataClasses.kt
|
||||
y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=null
|
||||
z: GET_VAR 'value-parameter z: Any = ...' type=kotlin.Any origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='toString(): String'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
@@ -80,6 +94,7 @@ FILE /dataClasses.kt
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
CONST String type=kotlin.String value=')'
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
@@ -106,6 +121,8 @@ FILE /dataClasses.kt
|
||||
RETURN type=kotlin.Nothing from='hashCode(): Int'
|
||||
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
VALUE_PARAMETER value-parameter other: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
@@ -157,6 +174,7 @@ FILE /dataClasses.kt
|
||||
CONST Boolean type=kotlin.Boolean value='true'
|
||||
CLASS CLASS Test2
|
||||
CONSTRUCTOR public constructor Test2(x: kotlin.Any?)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
@@ -165,24 +183,29 @@ FILE /dataClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Any?
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Any?'
|
||||
GET_FIELD 'x: Any?' type=kotlin.Any? origin=null
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Any?
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component1(): Any?'
|
||||
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Any? = ...): Test2
|
||||
x: EXPRESSION_BODY
|
||||
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Any? = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-x>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='copy(Any? = ...): Test2'
|
||||
CALL 'constructor Test2(Any?)' type=Test2 origin=null
|
||||
x: GET_VAR 'value-parameter x: Any? = ...' type=kotlin.Any? origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='toString(): String'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
@@ -192,6 +215,7 @@ FILE /dataClasses.kt
|
||||
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
CONST String type=kotlin.String value=')'
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
@@ -213,6 +237,8 @@ FILE /dataClasses.kt
|
||||
RETURN type=kotlin.Nothing from='hashCode(): Int'
|
||||
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
VALUE_PARAMETER value-parameter other: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
|
||||
+14
-3
@@ -1,6 +1,9 @@
|
||||
FILE /dataClassesGeneric.kt
|
||||
CLASS CLASS Test1
|
||||
TYPE_PARAMETER <T>
|
||||
CONSTRUCTOR public constructor Test1<T>(x: T)
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter x: T
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
@@ -9,24 +12,29 @@ FILE /dataClassesGeneric.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: T' type=T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): T
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): T'
|
||||
GET_FIELD 'x: T' type=T origin=null
|
||||
receiver: GET_VAR '<receiver: Test1>' type=Test1<T> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): T
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component1(): T'
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1<T> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: T = ...): Test1<T>
|
||||
x: EXPRESSION_BODY
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1<T> origin=null
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
VALUE_PARAMETER value-parameter x: T = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1<T> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='copy(T = ...): Test1<T>'
|
||||
CALL 'constructor Test1(T)' type=Test1<T> origin=null
|
||||
x: GET_VAR 'value-parameter x: T = ...' type=T origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='toString(): String'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
@@ -36,6 +44,7 @@ FILE /dataClassesGeneric.kt
|
||||
$this: GET_VAR '<receiver: Test1>' type=Test1<T> origin=null
|
||||
CONST String type=kotlin.String value=')'
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
@@ -58,6 +67,8 @@ FILE /dataClassesGeneric.kt
|
||||
RETURN type=kotlin.Nothing from='hashCode(): Int'
|
||||
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
VALUE_PARAMETER value-parameter other: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
|
||||
@@ -1,57 +1,82 @@
|
||||
FILE /delegatedImplementation.kt
|
||||
CLASS INTERFACE IBase
|
||||
FUN public abstract fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IBase>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
FUN public abstract fun bar(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IBase>
|
||||
FUN public abstract fun kotlin.String.qux(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IBase>
|
||||
$receiver: VALUE_PARAMETER <receiver: qux() on String: Unit>
|
||||
CLASS OBJECT BaseImpl
|
||||
CONSTRUCTOR private constructor BaseImpl()
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='BaseImpl'
|
||||
FUN public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: BaseImpl>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public open override fun bar(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: BaseImpl>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(): Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public open override fun kotlin.String.qux(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: BaseImpl>
|
||||
$receiver: VALUE_PARAMETER <receiver: qux() on String: Unit>
|
||||
BLOCK_BODY
|
||||
CLASS INTERFACE IOther
|
||||
PROPERTY public abstract val x: kotlin.String
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-x>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: IOther>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): String'
|
||||
GET_FIELD 'x: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
|
||||
PROPERTY public abstract var y: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IOther>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IOther>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'y: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
PROPERTY public abstract val kotlin.Byte.z1: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<get-z1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IOther>
|
||||
$receiver: VALUE_PARAMETER <receiver: z1: Int on Byte>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
|
||||
GET_FIELD 'z1: Int on Byte' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
|
||||
PROPERTY public abstract var kotlin.Byte.z2: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<get-z2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IOther>
|
||||
$receiver: VALUE_PARAMETER <receiver: z2: Int on Byte>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
|
||||
GET_FIELD 'z2: Int on Byte' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IOther>
|
||||
$receiver: VALUE_PARAMETER <receiver: z2: Int on Byte>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'z2: Int on Byte' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: IOther>' type=IOther origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther
|
||||
VALUE_PARAMETER value-parameter x0: kotlin.String
|
||||
VALUE_PARAMETER value-parameter y0: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='otherImpl(String, Int): IOther'
|
||||
BLOCK type=otherImpl.<no name provided> origin=OBJECT_LITERAL
|
||||
@@ -65,6 +90,7 @@ FILE /delegatedImplementation.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x0: String' type=kotlin.String origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <get-x>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): String'
|
||||
GET_FIELD 'x: String' type=kotlin.String origin=null
|
||||
@@ -74,26 +100,36 @@ FILE /delegatedImplementation.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y0: Int' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: <no name provided>>' type=otherImpl.<no name provided> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'y: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: <no name provided>>' type=otherImpl.<no name provided> origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
PROPERTY public open override val kotlin.Byte.z1: kotlin.Int
|
||||
FUN public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
$receiver: VALUE_PARAMETER <receiver: z1: Int on Byte>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
PROPERTY public open override var kotlin.Byte.z2: kotlin.Int
|
||||
FUN public open override fun kotlin.Byte.<get-z2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
$receiver: VALUE_PARAMETER <receiver: z2: Int on Byte>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
|
||||
CONST Int type=kotlin.Int value='2'
|
||||
FUN public open override fun kotlin.Byte.<set-z2>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
$receiver: VALUE_PARAMETER <receiver: z2: Int on Byte>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL 'constructor <no name provided>()' type=otherImpl.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS Test1
|
||||
@@ -105,12 +141,16 @@ FILE /delegatedImplementation.kt
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'BaseImpl' type=BaseImpl
|
||||
FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(): Int'
|
||||
CALL 'bar(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
|
||||
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'foo(Int, String): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
|
||||
@@ -118,6 +158,8 @@ FILE /delegatedImplementation.kt
|
||||
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
s: GET_VAR 'value-parameter s: String' type=kotlin.String origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
$receiver: VALUE_PARAMETER <receiver: qux() on String: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'qux() on String: Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
|
||||
@@ -132,12 +174,16 @@ FILE /delegatedImplementation.kt
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'BaseImpl' type=BaseImpl
|
||||
FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(): Int'
|
||||
CALL 'bar(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'foo(Int, String): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
|
||||
@@ -145,6 +191,8 @@ FILE /delegatedImplementation.kt
|
||||
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
s: GET_VAR 'value-parameter s: String' type=kotlin.String origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
$receiver: VALUE_PARAMETER <receiver: qux() on String: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'qux() on String: Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl origin=null
|
||||
@@ -157,6 +205,8 @@ FILE /delegatedImplementation.kt
|
||||
y0: CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY DELEGATED_MEMBER public open override val kotlin.Byte.z1: kotlin.Int
|
||||
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
$receiver: VALUE_PARAMETER <receiver: z1: Int on Byte>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
|
||||
CALL '<get-z1>() on Byte: Int' type=kotlin.Int origin=null
|
||||
@@ -165,6 +215,7 @@ FILE /delegatedImplementation.kt
|
||||
$receiver: GET_VAR '<receiver: z1: Int on Byte>' type=kotlin.Byte origin=null
|
||||
PROPERTY DELEGATED_MEMBER public open override val x: kotlin.String
|
||||
FUN DELEGATED_MEMBER public open override fun <get-x>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): String'
|
||||
CALL '<get-x>(): String' type=kotlin.String origin=null
|
||||
@@ -172,6 +223,8 @@ FILE /delegatedImplementation.kt
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
PROPERTY DELEGATED_MEMBER public open override var kotlin.Byte.z2: kotlin.Int
|
||||
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<get-z2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
$receiver: VALUE_PARAMETER <receiver: z2: Int on Byte>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
|
||||
CALL '<get-z2>() on Byte: Int' type=kotlin.Int origin=null
|
||||
@@ -179,6 +232,9 @@ FILE /delegatedImplementation.kt
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
$receiver: GET_VAR '<receiver: z2: Int on Byte>' type=kotlin.Byte origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
$receiver: VALUE_PARAMETER <receiver: z2: Int on Byte>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL '<set-z2>(Int) on Byte: Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test2$IOther$delegate`: IOther' type=IOther origin=null
|
||||
@@ -187,12 +243,15 @@ FILE /delegatedImplementation.kt
|
||||
<set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
PROPERTY DELEGATED_MEMBER public open override var y: kotlin.Int
|
||||
FUN DELEGATED_MEMBER public open override fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
CALL '<get-y>(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD '`Test2$IOther$delegate`: IOther' type=IOther origin=null
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL '<set-y>(Int): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test2$IOther$delegate`: IOther' type=IOther origin=null
|
||||
|
||||
+6
@@ -1,15 +1,19 @@
|
||||
FILE /delegatedImplementationWithExplicitOverride.kt
|
||||
CLASS INTERFACE IFooBar
|
||||
FUN public abstract fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IFooBar>
|
||||
FUN public abstract fun bar(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IFooBar>
|
||||
CLASS OBJECT FooBarImpl
|
||||
CONSTRUCTOR private constructor FooBarImpl()
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='FooBarImpl'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: FooBarImpl>
|
||||
BLOCK_BODY
|
||||
FUN public open override fun bar(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: FooBarImpl>
|
||||
BLOCK_BODY
|
||||
CLASS CLASS C
|
||||
CONSTRUCTOR public constructor C()
|
||||
@@ -20,9 +24,11 @@ FILE /delegatedImplementationWithExplicitOverride.kt
|
||||
EXPRESSION_BODY
|
||||
GET_OBJECT 'FooBarImpl' type=FooBarImpl
|
||||
FUN DELEGATED_MEMBER public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
CALL 'foo(): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`C$IFooBar$delegate`: FooBarImpl' type=FooBarImpl origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN public open override fun bar(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
|
||||
+4
@@ -1,6 +1,9 @@
|
||||
FILE /delegatingConstructorCallToTypeAliasConstructor.kt
|
||||
CLASS CLASS Cell
|
||||
TYPE_PARAMETER <T>
|
||||
CONSTRUCTOR public constructor Cell<T>(value: T)
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter value: T
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Cell'
|
||||
@@ -9,6 +12,7 @@ FILE /delegatingConstructorCallToTypeAliasConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: T' type=T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): T
|
||||
$this: VALUE_PARAMETER <receiver: Cell>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): T'
|
||||
GET_FIELD 'value: T' type=T origin=null
|
||||
|
||||
+2
@@ -10,9 +10,11 @@ FILE /delegatingConstructorCallsInSecondaryConstructors.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
CONSTRUCTOR public constructor Test(xx: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter xx: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
CONSTRUCTOR public constructor Test(xx: kotlin.Short)
|
||||
VALUE_PARAMETER value-parameter xx: kotlin.Short
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Test()'
|
||||
|
||||
+14
-2
@@ -14,6 +14,7 @@ FILE /enum.kt
|
||||
SYNTHETIC_BODY kind=ENUM_VALUEOF
|
||||
CLASS ENUM_CLASS TestEnum2
|
||||
CONSTRUCTOR private constructor TestEnum2(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2'
|
||||
@@ -22,6 +23,7 @@ FILE /enum.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestEnum2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -52,16 +54,19 @@ FILE /enum.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor TestEnum3()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TEST'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TEST>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='Hello, world!'
|
||||
FUN public abstract fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestEnum3>
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<TestEnum3>
|
||||
SYNTHETIC_BODY kind=ENUM_VALUES
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum3
|
||||
SYNTHETIC_BODY kind=ENUM_VALUEOF
|
||||
CLASS ENUM_CLASS TestEnum4
|
||||
CONSTRUCTOR private constructor TestEnum4(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4'
|
||||
@@ -70,6 +75,7 @@ FILE /enum.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestEnum4>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -83,6 +89,7 @@ FILE /enum.kt
|
||||
x: CONST Int type=kotlin.Int value='1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TEST1'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TEST1>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: GET_ENUM 'TEST1' type=TestEnum4
|
||||
@@ -97,6 +104,7 @@ FILE /enum.kt
|
||||
PROPERTY public final val z: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TEST2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z>(): Int'
|
||||
GET_FIELD 'z: Int' type=kotlin.Int origin=null
|
||||
@@ -108,18 +116,21 @@ FILE /enum.kt
|
||||
value: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: TEST2>' type=TestEnum4.TEST2 origin=null
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TEST2>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: GET_ENUM 'TEST2' type=TestEnum4
|
||||
FUN public abstract fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestEnum4>
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<TestEnum4>
|
||||
SYNTHETIC_BODY kind=ENUM_VALUES
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum4
|
||||
SYNTHETIC_BODY kind=ENUM_VALUEOF
|
||||
CLASS ENUM_CLASS TestEnum5
|
||||
CONSTRUCTOR private constructor TestEnum5(x: kotlin.Int = ...)
|
||||
x: EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum5'
|
||||
@@ -128,6 +139,7 @@ FILE /enum.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestEnum5>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /enumWithSecondaryCtor.kt
|
||||
CLASS ENUM_CLASS Test0
|
||||
CONSTRUCTOR private constructor Test0(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test0'
|
||||
@@ -9,6 +10,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test0>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -25,6 +27,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
SYNTHETIC_BODY kind=ENUM_VALUEOF
|
||||
CLASS ENUM_CLASS Test1
|
||||
CONSTRUCTOR private constructor Test1(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
@@ -33,6 +36,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -52,6 +56,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
SYNTHETIC_BODY kind=ENUM_VALUEOF
|
||||
CLASS ENUM_CLASS Test2
|
||||
CONSTRUCTOR private constructor Test2(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
@@ -60,6 +65,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -72,6 +78,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'constructor Test2()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='ZERO'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: ZERO>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='ZERO'
|
||||
@@ -84,6 +91,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
x: CONST Int type=kotlin.Int value='1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='ONE'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: ONE>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='ONE'
|
||||
@@ -92,6 +100,7 @@ FILE /enumWithSecondaryCtor.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Test2(Int)'
|
||||
x: CONST Int type=kotlin.Int value='0'
|
||||
FUN public abstract fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array<Test2>
|
||||
SYNTHETIC_BODY kind=ENUM_VALUES
|
||||
FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): Test2
|
||||
|
||||
@@ -9,6 +9,7 @@ FILE /initBlock.kt
|
||||
CALL 'println(): Unit' type=kotlin.Unit origin=null
|
||||
CLASS CLASS Test2
|
||||
CONSTRUCTOR public constructor Test2(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
@@ -17,6 +18,7 @@ FILE /initBlock.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -56,6 +58,7 @@ FILE /initBlock.kt
|
||||
message: CONST String type=kotlin.String value='1'
|
||||
CLASS CLASS TestInner
|
||||
CONSTRUCTOR public constructor TestInner()
|
||||
$this: VALUE_PARAMETER <receiver: Test5>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInner'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /initVal.kt
|
||||
CLASS CLASS TestInitValFromParameter
|
||||
CONSTRUCTOR public constructor TestInitValFromParameter(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValFromParameter'
|
||||
@@ -9,6 +10,7 @@ FILE /initVal.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitValFromParameter>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -23,6 +25,7 @@ FILE /initVal.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitValInClass>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -35,6 +38,7 @@ FILE /initVal.kt
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitValInInitBlock>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
|
||||
+19
@@ -1,6 +1,7 @@
|
||||
FILE /initVar.kt
|
||||
CLASS CLASS TestInitVarFromParameter
|
||||
CONSTRUCTOR public constructor TestInitVarFromParameter(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarFromParameter'
|
||||
@@ -9,11 +10,14 @@ FILE /initVar.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarFromParameter>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarFromParameter>' type=TestInitVarFromParameter origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarFromParameter>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarFromParameter>' type=TestInitVarFromParameter origin=null
|
||||
@@ -28,11 +32,14 @@ FILE /initVar.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarInClass>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarInClass>' type=TestInitVarInClass origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarInClass>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarInClass>' type=TestInitVarInClass origin=null
|
||||
@@ -45,11 +52,14 @@ FILE /initVar.kt
|
||||
PROPERTY public final var x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarInInitBlock>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarInInitBlock>' type=TestInitVarInInitBlock origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarInInitBlock>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarInInitBlock>' type=TestInitVarInInitBlock origin=null
|
||||
@@ -69,11 +79,14 @@ FILE /initVar.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarWithCustomSetter>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetter>' type=TestInitVarWithCustomSetter origin=null
|
||||
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarWithCustomSetter>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetter>' type=TestInitVarWithCustomSetter origin=null
|
||||
@@ -82,11 +95,14 @@ FILE /initVar.kt
|
||||
PROPERTY public final var x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarWithCustomSetterWithExplicitCtor>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetterWithExplicitCtor>' type=TestInitVarWithCustomSetterWithExplicitCtor origin=null
|
||||
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarWithCustomSetterWithExplicitCtor>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetterWithExplicitCtor>' type=TestInitVarWithCustomSetterWithExplicitCtor origin=null
|
||||
@@ -104,11 +120,14 @@ FILE /initVar.kt
|
||||
PROPERTY public final var x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarWithCustomSetterInCtor>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetterInCtor>' type=TestInitVarWithCustomSetterInCtor origin=null
|
||||
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: TestInitVarWithCustomSetterInCtor>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<receiver: TestInitVarWithCustomSetterInCtor>' type=TestInitVarWithCustomSetterInCtor origin=null
|
||||
|
||||
@@ -6,11 +6,13 @@ FILE /innerClass.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Outer'
|
||||
CLASS CLASS TestInnerClass
|
||||
CONSTRUCTOR public constructor TestInnerClass()
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInnerClass'
|
||||
CLASS CLASS DerivedInnerClass
|
||||
CONSTRUCTOR public constructor DerivedInnerClass()
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor TestInnerClass()'
|
||||
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
|
||||
|
||||
@@ -6,6 +6,8 @@ FILE /innerClassWithDelegatingConstructor.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Outer'
|
||||
CLASS CLASS Inner
|
||||
CONSTRUCTOR public constructor Inner(x: kotlin.Int)
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Inner'
|
||||
@@ -14,11 +16,13 @@ FILE /innerClassWithDelegatingConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Inner>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Inner>' type=Outer.Inner origin=null
|
||||
CONSTRUCTOR public constructor Inner()
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Inner(Int)'
|
||||
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
|
||||
|
||||
@@ -7,6 +7,7 @@ FILE /localClasses.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='LocalClass'
|
||||
FUN public final fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: LocalClass>
|
||||
BLOCK_BODY
|
||||
CALL 'foo(): Unit' type=kotlin.Unit origin=null
|
||||
$this: CALL 'constructor LocalClass()' type=outer.LocalClass origin=null
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /objectLiteralExpressions.kt
|
||||
CLASS INTERFACE IFoo
|
||||
FUN public abstract fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IFoo>
|
||||
PROPERTY public val test1: kotlin.Any
|
||||
FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Any
|
||||
EXPRESSION_BODY
|
||||
@@ -25,6 +26,7 @@ FILE /objectLiteralExpressions.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='foo'
|
||||
@@ -40,10 +42,12 @@ FILE /objectLiteralExpressions.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Outer'
|
||||
CLASS CLASS Inner
|
||||
CONSTRUCTOR public constructor Inner()
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Inner'
|
||||
FUN public final fun test3(): Outer.Inner
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test3(): Outer.Inner'
|
||||
BLOCK type=Outer.test3.<no name provided> origin=OBJECT_LITERAL
|
||||
@@ -54,11 +58,13 @@ FILE /objectLiteralExpressions.kt
|
||||
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='foo'
|
||||
CALL 'constructor <no name provided>()' type=Outer.test3.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN public fun Outer.test4(): Outer.Inner
|
||||
$receiver: VALUE_PARAMETER <receiver: test4() on Outer: Outer.Inner>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test4() on Outer: Outer.Inner'
|
||||
BLOCK type=test4.<no name provided> origin=OBJECT_LITERAL
|
||||
@@ -69,6 +75,7 @@ FILE /objectLiteralExpressions.kt
|
||||
$this: GET_VAR '<receiver: test4() on Outer: Outer.Inner>' type=Outer origin=null
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: <no name provided>>
|
||||
BLOCK_BODY
|
||||
CALL 'println(Any?): Unit' type=kotlin.Unit origin=null
|
||||
message: CONST String type=kotlin.String value='foo'
|
||||
|
||||
@@ -14,6 +14,7 @@ FILE /objectWithInitializers.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -21,6 +22,7 @@ FILE /objectWithInitializers.kt
|
||||
PROPERTY public final val y: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
|
||||
@@ -5,28 +5,35 @@ FILE /outerClassAccess.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Outer'
|
||||
FUN public final fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
CLASS CLASS Inner
|
||||
CONSTRUCTOR public constructor Inner()
|
||||
$this: VALUE_PARAMETER <receiver: Outer>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Inner'
|
||||
FUN public final fun test(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Inner>
|
||||
BLOCK_BODY
|
||||
CALL 'foo(): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
|
||||
CLASS CLASS Inner2
|
||||
CONSTRUCTOR public constructor Inner2()
|
||||
$this: VALUE_PARAMETER <receiver: Inner>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Inner2'
|
||||
FUN public final fun test2(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Inner2>
|
||||
BLOCK_BODY
|
||||
CALL 'test(): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: Inner>' type=Outer.Inner origin=null
|
||||
CALL 'foo(): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: Outer>' type=Outer origin=null
|
||||
FUN public final fun Outer.test3(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Inner2>
|
||||
$receiver: VALUE_PARAMETER <receiver: test3() on Outer: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'foo(): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: test3() on Outer: Unit>' type=Outer origin=null
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
FILE /primaryConstructor.kt
|
||||
CLASS CLASS Test1
|
||||
CONSTRUCTOR public constructor Test1(x: kotlin.Int, y: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
@@ -9,6 +11,7 @@ FILE /primaryConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -18,12 +21,15 @@ FILE /primaryConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Test1>' type=Test1 origin=null
|
||||
CLASS CLASS Test2
|
||||
CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
@@ -32,6 +38,7 @@ FILE /primaryConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
@@ -41,12 +48,15 @@ FILE /primaryConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
CLASS CLASS Test3
|
||||
CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test3'
|
||||
@@ -55,6 +65,7 @@ FILE /primaryConstructor.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test3>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
@@ -62,6 +73,7 @@ FILE /primaryConstructor.kt
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test3>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
|
||||
+5
@@ -16,6 +16,8 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestExplicitPrimaryConstructor'
|
||||
CLASS CLASS TestWithDelegatingConstructor
|
||||
CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int, y: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestWithDelegatingConstructor'
|
||||
@@ -24,6 +26,7 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestWithDelegatingConstructor>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -33,11 +36,13 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestWithDelegatingConstructor>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): Int'
|
||||
GET_FIELD 'y: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: TestWithDelegatingConstructor>' type=TestWithDelegatingConstructor origin=null
|
||||
CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)'
|
||||
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
FILE /qualifiedSuperCalls.kt
|
||||
CLASS INTERFACE ILeft
|
||||
FUN public open fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: ILeft>
|
||||
BLOCK_BODY
|
||||
PROPERTY public open val bar: kotlin.Int
|
||||
FUN public open fun <get-bar>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: ILeft>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
CLASS INTERFACE IRight
|
||||
FUN public open fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IRight>
|
||||
BLOCK_BODY
|
||||
PROPERTY public open val bar: kotlin.Int
|
||||
FUN public open fun <get-bar>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IRight>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
|
||||
CONST Int type=kotlin.Int value='2'
|
||||
@@ -21,6 +25,7 @@ FILE /qualifiedSuperCalls.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CBoth'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: CBoth>
|
||||
BLOCK_BODY
|
||||
CALL 'foo(): Unit' superQualifier=ILeft type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: CBoth>' type=CBoth origin=null
|
||||
@@ -28,6 +33,7 @@ FILE /qualifiedSuperCalls.kt
|
||||
$this: GET_VAR '<receiver: CBoth>' type=CBoth origin=null
|
||||
PROPERTY public open override val bar: kotlin.Int
|
||||
FUN public open override fun <get-bar>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: CBoth>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
|
||||
CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
|
||||
|
||||
@@ -6,6 +6,7 @@ FILE /sealedClasses.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Expr'
|
||||
CLASS CLASS Const
|
||||
CONSTRUCTOR public constructor Const(number: kotlin.Double)
|
||||
VALUE_PARAMETER value-parameter number: kotlin.Double
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Const'
|
||||
@@ -14,12 +15,15 @@ FILE /sealedClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter number: Double' type=kotlin.Double origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-number>(): kotlin.Double
|
||||
$this: VALUE_PARAMETER <receiver: Const>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-number>(): Double'
|
||||
GET_FIELD 'number: Double' type=kotlin.Double origin=null
|
||||
receiver: GET_VAR '<receiver: Const>' type=Expr.Const origin=null
|
||||
CLASS CLASS Sum
|
||||
CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr)
|
||||
VALUE_PARAMETER value-parameter e1: Expr
|
||||
VALUE_PARAMETER value-parameter e2: Expr
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Sum'
|
||||
@@ -28,6 +32,7 @@ FILE /sealedClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter e1: Expr' type=Expr origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-e1>(): Expr
|
||||
$this: VALUE_PARAMETER <receiver: Sum>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-e1>(): Expr'
|
||||
GET_FIELD 'e1: Expr' type=Expr origin=null
|
||||
@@ -37,6 +42,7 @@ FILE /sealedClasses.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter e2: Expr' type=Expr origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-e2>(): Expr
|
||||
$this: VALUE_PARAMETER <receiver: Sum>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-e2>(): Expr'
|
||||
GET_FIELD 'e2: Expr' type=Expr origin=null
|
||||
|
||||
+4
@@ -10,6 +10,7 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestProperty>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -22,6 +23,7 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: TestInitBlock>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
@@ -36,9 +38,11 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitBlock'
|
||||
CONSTRUCTOR public constructor TestInitBlock(z: kotlin.Any)
|
||||
VALUE_PARAMETER value-parameter z: kotlin.Any
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitBlock'
|
||||
CONSTRUCTOR public constructor TestInitBlock(y: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor TestInitBlock()'
|
||||
|
||||
@@ -5,6 +5,7 @@ FILE /secondaryConstructors.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int)'
|
||||
x: CONST Int type=kotlin.Int value='0'
|
||||
CONSTRUCTOR public constructor C(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
|
||||
@@ -5,12 +5,14 @@ FILE /superCalls.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Base'
|
||||
FUN public open fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Base>
|
||||
BLOCK_BODY
|
||||
PROPERTY public open val bar: kotlin.String = ""
|
||||
FIELD PROPERTY_BACKING_FIELD public open val bar: kotlin.String = ""
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=''
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public open fun <get-bar>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Base>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): String'
|
||||
GET_FIELD 'bar: String' type=kotlin.String origin=null
|
||||
@@ -21,11 +23,13 @@ FILE /superCalls.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Derived'
|
||||
FUN public open override fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Derived>
|
||||
BLOCK_BODY
|
||||
CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: Derived>' type=Derived origin=null
|
||||
PROPERTY public open override val bar: kotlin.String
|
||||
FUN public open override fun <get-bar>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Derived>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): String'
|
||||
CALL '<get-bar>(): String' superQualifier=Base type=kotlin.String origin=GET_PROPERTY
|
||||
|
||||
@@ -9,12 +9,14 @@ FILE /classLevelProperties.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
|
||||
GET_FIELD 'test1: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
PROPERTY public final val test2: kotlin.Int
|
||||
FUN public final fun <get-test2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
@@ -23,11 +25,14 @@ FILE /classLevelProperties.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test3>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test3>(): Int'
|
||||
GET_FIELD 'test3: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test3: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
@@ -37,11 +42,14 @@ FILE /classLevelProperties.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test4>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test4>(): Int'
|
||||
GET_FIELD 'test4: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN public final fun <set-test4>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test4: Int' type=kotlin.Unit origin=EQ
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
@@ -51,11 +59,14 @@ FILE /classLevelProperties.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test5>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test5>(): Int'
|
||||
GET_FIELD 'test5: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN private final fun <set-test5>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test5: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
@@ -65,6 +76,7 @@ FILE /classLevelProperties.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN public final fun <get-test6>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test6>(): Int'
|
||||
GET_FIELD 'test6: Int' type=kotlin.Int origin=null
|
||||
@@ -81,6 +93,7 @@ FILE /classLevelProperties.kt
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test7>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test7>(): Int'
|
||||
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
|
||||
@@ -96,6 +109,7 @@ FILE /classLevelProperties.kt
|
||||
<K>: String
|
||||
<V>: Int
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test8>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test8>(): Int'
|
||||
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int origin=null
|
||||
@@ -105,6 +119,8 @@ FILE /classLevelProperties.kt
|
||||
thisRef: GET_VAR '<receiver: C>' type=C origin=null
|
||||
property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1<C, kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <set-test8>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<set-test8>(Int): Unit'
|
||||
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
|
||||
|
||||
+16
-10
@@ -1,15 +1,21 @@
|
||||
FILE /defaultArguments.kt
|
||||
FUN public fun test1(x: kotlin.Int, y: kotlin.Int = ..., z: kotlin.String = ...): kotlin.Unit
|
||||
y: EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
z: EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value='abc'
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VALUE_PARAMETER value-parameter z: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value='abc'
|
||||
BLOCK_BODY
|
||||
FUN local final fun local(xx: kotlin.Int = ..., yy: kotlin.Int = ..., zz: kotlin.String = ...): kotlin.Unit
|
||||
xx: EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
yy: EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int = ...' type=kotlin.Int origin=null
|
||||
zz: EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter z: String = ...' type=kotlin.String origin=null
|
||||
VALUE_PARAMETER value-parameter xx: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
VALUE_PARAMETER value-parameter yy: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: Int = ...' type=kotlin.Int origin=null
|
||||
VALUE_PARAMETER value-parameter zz: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter z: String = ...' type=kotlin.String origin=null
|
||||
BLOCK_BODY
|
||||
|
||||
@@ -20,6 +20,7 @@ FILE /delegatedProperties.kt
|
||||
property: CALLABLE_REFERENCE 'test1: Int' type=kotlin.reflect.KProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
CLASS CLASS C
|
||||
CONSTRUCTOR public constructor C(map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>)
|
||||
VALUE_PARAMETER value-parameter map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
@@ -28,6 +29,7 @@ FILE /delegatedProperties.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-map>(): kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-map>(): MutableMap<String, Any>'
|
||||
GET_FIELD 'map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=null
|
||||
@@ -44,6 +46,7 @@ FILE /delegatedProperties.kt
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int origin=LAMBDA
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
|
||||
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int origin=null
|
||||
@@ -58,6 +61,7 @@ FILE /delegatedProperties.kt
|
||||
CALL '<get-map>(): MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-test3>(): kotlin.Any
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test3>(): Any'
|
||||
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any origin=null
|
||||
@@ -67,6 +71,8 @@ FILE /delegatedProperties.kt
|
||||
thisRef: GET_VAR '<receiver: C>' type=C origin=null
|
||||
property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <set-test3>(<set-?>: kotlin.Any): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<set-test3>(Any): Unit'
|
||||
CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit origin=null
|
||||
@@ -91,6 +97,7 @@ FILE /delegatedProperties.kt
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public fun <set-test4>(<set-?>: kotlin.Any): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<set-test4>(Any): Unit'
|
||||
CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit origin=null
|
||||
|
||||
@@ -2,30 +2,38 @@ FILE /interfaceProperties.kt
|
||||
CLASS INTERFACE C
|
||||
PROPERTY public abstract val test1: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-test1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
|
||||
GET_FIELD 'test1: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
PROPERTY public open val test2: kotlin.Int
|
||||
FUN public open fun <get-test2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
PROPERTY public abstract var test3: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-test3>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test3>(): Int'
|
||||
GET_FIELD 'test3: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test3: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
PROPERTY public open var test4: kotlin.Int
|
||||
FUN public open fun <get-test4>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test4>(): Int'
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN public open fun <set-test4>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
|
||||
@@ -21,6 +21,7 @@ FILE /packageLevelProperties.kt
|
||||
RETURN type=kotlin.Nothing from='<get-test3>(): Int'
|
||||
GET_FIELD 'test3: Int' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test3: Int' type=kotlin.Unit origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
@@ -33,6 +34,7 @@ FILE /packageLevelProperties.kt
|
||||
RETURN type=kotlin.Nothing from='<get-test4>(): Int'
|
||||
GET_FIELD 'test4: Int' type=kotlin.Int origin=null
|
||||
FUN public fun <set-test4>(value: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test4: Int' type=kotlin.Unit origin=EQ
|
||||
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
|
||||
@@ -45,6 +47,7 @@ FILE /packageLevelProperties.kt
|
||||
RETURN type=kotlin.Nothing from='<get-test5>(): Int'
|
||||
GET_FIELD 'test5: Int' type=kotlin.Int origin=null
|
||||
FUN private fun <set-test5>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test5: Int' type=kotlin.Unit origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
@@ -90,6 +93,7 @@ FILE /packageLevelProperties.kt
|
||||
thisRef: CONST Null type=kotlin.Nothing? value='null'
|
||||
property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public fun <set-test8>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<set-test8>(Int): Unit'
|
||||
CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap<in String, in Int>: Unit' type=kotlin.Unit origin=null
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
interface TestInterface<T> {
|
||||
interface TestNestedInterface<TT>
|
||||
}
|
||||
|
||||
class Test<T0> {
|
||||
class TestNested<T1>
|
||||
inner class TestInner<T2>
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
FILE /class.kt
|
||||
CLASS INTERFACE TestInterface
|
||||
TYPE_PARAMETER <T>
|
||||
CLASS INTERFACE TestNestedInterface
|
||||
TYPE_PARAMETER <TT>
|
||||
CLASS CLASS Test
|
||||
TYPE_PARAMETER <T0>
|
||||
CONSTRUCTOR public constructor Test<T0>()
|
||||
TYPE_PARAMETER <T0>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
CLASS CLASS TestNested
|
||||
TYPE_PARAMETER <T1>
|
||||
CONSTRUCTOR public constructor TestNested<T1>()
|
||||
TYPE_PARAMETER <T1>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestNested'
|
||||
CLASS CLASS TestInner
|
||||
TYPE_PARAMETER <T2>
|
||||
CONSTRUCTOR public constructor TestInner<T2>()
|
||||
TYPE_PARAMETER <T2>
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInner'
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test1<T1, T2>(val x: T1, val y: T2)
|
||||
|
||||
class Test2(x: Int, val y: String) {
|
||||
inner class TestInner<Z>(val z : Z) {
|
||||
constructor(z: Z, i: Int) : this(z)
|
||||
}
|
||||
}
|
||||
|
||||
class Test3(val x: Int, val y: String = "")
|
||||
|
||||
class Test4<T>(val x: Int) {
|
||||
constructor(x: Int, y: Int = 42) : this(x + y)
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
FILE /constructor.kt
|
||||
CLASS CLASS Test1
|
||||
TYPE_PARAMETER <T1>
|
||||
TYPE_PARAMETER <T2>
|
||||
CONSTRUCTOR public constructor Test1<T1, T2>(x: T1, y: T2)
|
||||
TYPE_PARAMETER <T1>
|
||||
TYPE_PARAMETER <T2>
|
||||
VALUE_PARAMETER value-parameter x: T1
|
||||
VALUE_PARAMETER value-parameter y: T2
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
|
||||
PROPERTY public final val x: T1
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: T1
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: T1' type=T1 origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): T1
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): T1'
|
||||
GET_FIELD 'x: T1' type=T1 origin=null
|
||||
receiver: GET_VAR '<receiver: Test1>' type=Test1<T1, T2> origin=null
|
||||
PROPERTY public final val y: T2
|
||||
FIELD PROPERTY_BACKING_FIELD public final val y: T2
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: T2' type=T2 origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): T2
|
||||
$this: VALUE_PARAMETER <receiver: Test1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): T2'
|
||||
GET_FIELD 'y: T2' type=T2 origin=null
|
||||
receiver: GET_VAR '<receiver: Test1>' type=Test1<T1, T2> origin=null
|
||||
CLASS CLASS Test2
|
||||
CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
|
||||
PROPERTY public final val y: kotlin.String
|
||||
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): String'
|
||||
GET_FIELD 'y: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
CLASS CLASS TestInner
|
||||
TYPE_PARAMETER <Z>
|
||||
CONSTRUCTOR public constructor TestInner<Z>(z: Z)
|
||||
TYPE_PARAMETER <Z>
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
VALUE_PARAMETER value-parameter z: Z
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='TestInner'
|
||||
PROPERTY public final val z: Z
|
||||
FIELD PROPERTY_BACKING_FIELD public final val z: Z
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter z: Z' type=Z origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-z>(): Z
|
||||
$this: VALUE_PARAMETER <receiver: TestInner>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-z>(): Z'
|
||||
GET_FIELD 'z: Z' type=Z origin=null
|
||||
receiver: GET_VAR '<receiver: TestInner>' type=Test2.TestInner<Z> origin=null
|
||||
CONSTRUCTOR public constructor TestInner<Z>(z: Z, i: kotlin.Int)
|
||||
TYPE_PARAMETER <Z>
|
||||
$this: VALUE_PARAMETER <receiver: Test2>
|
||||
VALUE_PARAMETER value-parameter z: Z
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor TestInner(Z)'
|
||||
<Z>: Z
|
||||
$this: GET_VAR '<receiver: Test2>' type=Test2 origin=null
|
||||
z: GET_VAR 'value-parameter z: Z' type=Z origin=null
|
||||
CLASS CLASS Test3
|
||||
CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.String = ...)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=''
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test3'
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test3>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Test3>' type=Test3 origin=null
|
||||
PROPERTY public final val y: kotlin.String
|
||||
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test3>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): String'
|
||||
GET_FIELD 'y: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: Test3>' type=Test3 origin=null
|
||||
CLASS CLASS Test4
|
||||
TYPE_PARAMETER <T>
|
||||
CONSTRUCTOR public constructor Test4<T>(x: kotlin.Int)
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test4'
|
||||
PROPERTY public final val x: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test4>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Test4>' type=Test4<T> origin=null
|
||||
CONSTRUCTOR public constructor Test4<T>(x: kotlin.Int, y: kotlin.Int = ...)
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Test4(Int)'
|
||||
<T>: T
|
||||
x: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
|
||||
$this: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'value-parameter y: Int = ...' type=kotlin.Int origin=null
|
||||
@@ -0,0 +1 @@
|
||||
data class Test<T>(val x: T, val y: String = "")
|
||||
@@ -0,0 +1,146 @@
|
||||
FILE /dataClassMembers.kt
|
||||
CLASS CLASS Test
|
||||
TYPE_PARAMETER <T>
|
||||
CONSTRUCTOR public constructor Test<T>(x: T, y: kotlin.String = ...)
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter x: T
|
||||
VALUE_PARAMETER value-parameter y: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=''
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
PROPERTY public final val x: T
|
||||
FIELD PROPERTY_BACKING_FIELD public final val x: T
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: T' type=T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): T
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): T'
|
||||
GET_FIELD 'x: T' type=T origin=null
|
||||
receiver: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
PROPERTY public final val y: kotlin.String
|
||||
FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-y>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-y>(): String'
|
||||
GET_FIELD 'y: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): T
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component1(): T'
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component2(): String'
|
||||
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: T = ..., y: kotlin.String = ...): Test<T>
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
VALUE_PARAMETER value-parameter x: T = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
VALUE_PARAMETER value-parameter y: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='copy(T = ..., String = ...): Test<T>'
|
||||
CALL 'constructor Test(T, String = ...)' type=Test<T> origin=null
|
||||
x: GET_VAR 'value-parameter x: T = ...' type=T origin=null
|
||||
y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='toString(): String'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value='Test('
|
||||
CONST String type=kotlin.String value='x='
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
CONST String type=kotlin.String value=', '
|
||||
CONST String type=kotlin.String value='y='
|
||||
CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
CONST String type=kotlin.String value=')'
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
VAR IR_TEMPORARY_VARIABLE var tmp0_result: kotlin.Int
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp1: T
|
||||
CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
WHEN type=kotlin.Int origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1: T' type=T origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Int type=kotlin.Int value='0'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
|
||||
GET_VAR 'tmp1: T' type=T origin=null
|
||||
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
|
||||
CALL 'plus(Int): Int' type=kotlin.Int origin=null
|
||||
$this: CALL 'times(Int): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value='31'
|
||||
other: CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
RETURN type=kotlin.Nothing from='hashCode(): Int'
|
||||
GET_VAR 'tmp0_result: Int' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
VALUE_PARAMETER value-parameter other: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
|
||||
arg0: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
arg1: GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='true'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=Test<T>
|
||||
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test<T>
|
||||
TYPE_OP type=Test<T> origin=CAST typeOperand=Test<T>
|
||||
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
arg1: CALL '<get-x>(): T' type=T origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test<T>' type=Test<T> origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Test>' type=Test<T> origin=null
|
||||
arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test<T>' type=Test<T> origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='true'
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
val test1 = 42
|
||||
|
||||
var test2 = 42
|
||||
|
||||
class Host {
|
||||
val testMember1 = 42
|
||||
|
||||
var testMember2 = 42
|
||||
}
|
||||
|
||||
class InPrimaryCtor<T>(
|
||||
val testInPrimaryCtor1: T,
|
||||
var testInPrimaryCtor2: Int = 42
|
||||
)
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
FILE /defaultPropertyAccessors.kt
|
||||
PROPERTY public val test1: kotlin.Int = 42
|
||||
FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Int = 42
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
|
||||
GET_FIELD 'test1: Int' type=kotlin.Int origin=null
|
||||
PROPERTY public var test2: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public var test2: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
|
||||
GET_FIELD 'test2: Int' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-test2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test2: Int' type=kotlin.Unit origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
CLASS CLASS Host
|
||||
CONSTRUCTOR public constructor Host()
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Host'
|
||||
PROPERTY public final val testMember1: kotlin.Int = 42
|
||||
FIELD PROPERTY_BACKING_FIELD public final val testMember1: kotlin.Int = 42
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-testMember1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMember1>(): Int'
|
||||
GET_FIELD 'testMember1: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
PROPERTY public final var testMember2: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final var testMember2: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-testMember2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMember2>(): Int'
|
||||
GET_FIELD 'testMember2: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-testMember2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'testMember2: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
CLASS CLASS InPrimaryCtor
|
||||
TYPE_PARAMETER <T>
|
||||
CONSTRUCTOR public constructor InPrimaryCtor<T>(testInPrimaryCtor1: T, testInPrimaryCtor2: kotlin.Int = ...)
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter testInPrimaryCtor1: T
|
||||
VALUE_PARAMETER value-parameter testInPrimaryCtor2: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='InPrimaryCtor'
|
||||
PROPERTY public final val testInPrimaryCtor1: T
|
||||
FIELD PROPERTY_BACKING_FIELD public final val testInPrimaryCtor1: T
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter testInPrimaryCtor1: T' type=T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-testInPrimaryCtor1>(): T
|
||||
$this: VALUE_PARAMETER <receiver: InPrimaryCtor>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testInPrimaryCtor1>(): T'
|
||||
GET_FIELD 'testInPrimaryCtor1: T' type=T origin=null
|
||||
receiver: GET_VAR '<receiver: InPrimaryCtor>' type=InPrimaryCtor<T> origin=null
|
||||
PROPERTY public final var testInPrimaryCtor2: kotlin.Int
|
||||
FIELD PROPERTY_BACKING_FIELD public final var testInPrimaryCtor2: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter testInPrimaryCtor2: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-testInPrimaryCtor2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: InPrimaryCtor>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testInPrimaryCtor2>(): Int'
|
||||
GET_FIELD 'testInPrimaryCtor2: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: InPrimaryCtor>' type=InPrimaryCtor<T> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-testInPrimaryCtor2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: InPrimaryCtor>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'testInPrimaryCtor2: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: InPrimaryCtor>' type=InPrimaryCtor<T> origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
@@ -0,0 +1,7 @@
|
||||
interface IBase<T> {
|
||||
fun foo(x: Int)
|
||||
val bar: Int
|
||||
fun <X> qux(t: T, x: X)
|
||||
}
|
||||
|
||||
class Test<TT>(impl: IBase<TT>) : IBase<TT> by impl
|
||||
@@ -0,0 +1,57 @@
|
||||
FILE /delegatedMembers.kt
|
||||
CLASS INTERFACE IBase
|
||||
TYPE_PARAMETER <T>
|
||||
FUN public abstract fun foo(x: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IBase>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
PROPERTY public abstract val bar: kotlin.Int
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-bar>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IBase>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
|
||||
GET_FIELD 'bar: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: IBase>' type=IBase<T> origin=null
|
||||
FUN public abstract fun <X> qux(t: T, x: X): kotlin.Unit
|
||||
TYPE_PARAMETER <X>
|
||||
$this: VALUE_PARAMETER <receiver: IBase>
|
||||
VALUE_PARAMETER value-parameter t: T
|
||||
VALUE_PARAMETER value-parameter x: X
|
||||
CLASS CLASS Test
|
||||
TYPE_PARAMETER <TT>
|
||||
CONSTRUCTOR public constructor Test<TT>(impl: IBase<TT>)
|
||||
TYPE_PARAMETER <TT>
|
||||
VALUE_PARAMETER value-parameter impl: IBase<TT>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
FIELD DELEGATE val `Test$IBase$delegate`: IBase<TT>
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter impl: IBase<TT>' type=IBase<TT> origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun <X> qux(t: TT, x: X): kotlin.Unit
|
||||
TYPE_PARAMETER <X>
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
VALUE_PARAMETER value-parameter t: TT
|
||||
VALUE_PARAMETER value-parameter x: X
|
||||
BLOCK_BODY
|
||||
CALL 'qux(TT, X): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test$IBase$delegate`: IBase<TT>' type=IBase<TT> origin=null
|
||||
receiver: GET_VAR '<receiver: Test>' type=Test<TT> origin=null
|
||||
t: GET_VAR 'value-parameter t: TT' type=TT origin=null
|
||||
x: TYPE_OP type=X origin=IMPLICIT_CAST typeOperand=X
|
||||
GET_VAR 'value-parameter x: X' type=X origin=null
|
||||
FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALL 'foo(Int): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_FIELD '`Test$IBase$delegate`: IBase<TT>' type=IBase<TT> origin=null
|
||||
receiver: GET_VAR '<receiver: Test>' type=Test<TT> origin=null
|
||||
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
PROPERTY DELEGATED_MEMBER public open override val bar: kotlin.Int
|
||||
FUN DELEGATED_MEMBER public open override fun <get-bar>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
|
||||
CALL '<get-bar>(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_FIELD '`Test$IBase$delegate`: IBase<TT>' type=IBase<TT> origin=null
|
||||
receiver: GET_VAR '<receiver: Test>' type=Test<TT> origin=null
|
||||
@@ -0,0 +1,13 @@
|
||||
fun <T> test1(i: Int, j: T) {}
|
||||
|
||||
fun test2(i: Int = 0, j: String = "") {}
|
||||
|
||||
fun test3(vararg args: String) {}
|
||||
|
||||
fun String.textExt1(i: Int, j: String) {}
|
||||
|
||||
class Host {
|
||||
fun String.testMembetExt1(i: Int, j: String) {}
|
||||
|
||||
fun <T> String.testMembetExt2(i: Int, j: T) {}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
FILE /fun.kt
|
||||
FUN public fun <T> test1(i: kotlin.Int, j: T): kotlin.Unit
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: T
|
||||
BLOCK_BODY
|
||||
FUN public fun test2(i: kotlin.Int = ..., j: kotlin.String = ...): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VALUE_PARAMETER value-parameter j: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=''
|
||||
BLOCK_BODY
|
||||
FUN public fun test3(vararg args: kotlin.String): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter vararg args: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public fun kotlin.String.textExt1(i: kotlin.Int, j: kotlin.String): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: textExt1(Int, String) on String: Unit>
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: kotlin.String
|
||||
BLOCK_BODY
|
||||
CLASS CLASS Host
|
||||
CONSTRUCTOR public constructor Host()
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Host'
|
||||
FUN public final fun kotlin.String.testMembetExt1(i: kotlin.Int, j: kotlin.String): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMembetExt1(Int, String) on String: Unit>
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public final fun <T> kotlin.String.testMembetExt2(i: kotlin.Int, j: T): kotlin.Unit
|
||||
TYPE_PARAMETER <T>
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMembetExt2(Int, T) on String: Unit>
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: T
|
||||
BLOCK_BODY
|
||||
@@ -0,0 +1,4 @@
|
||||
val test1 : (String) -> String = { it }
|
||||
val test2 : Any.(Any) -> Any = { it.hashCode() }
|
||||
val test3 = { i: Int, j: Int -> }
|
||||
val test4 = fun (i: Int, j: Int) {}
|
||||
@@ -0,0 +1,59 @@
|
||||
FILE /lambdas.kt
|
||||
PROPERTY public val test1: (kotlin.String) -> kotlin.String
|
||||
FIELD PROPERTY_BACKING_FIELD public val test1: (kotlin.String) -> kotlin.String
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=(kotlin.String) -> kotlin.String origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(it: kotlin.String): kotlin.String
|
||||
VALUE_PARAMETER value-parameter it: kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(String): String'
|
||||
GET_VAR 'value-parameter it: String' type=kotlin.String origin=null
|
||||
CALLABLE_REFERENCE '<anonymous>(String): String' type=(kotlin.String) -> kotlin.String origin=LAMBDA
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): (kotlin.String) -> kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): (String) -> String'
|
||||
GET_FIELD 'test1: (String) -> String' type=(kotlin.String) -> kotlin.String origin=null
|
||||
PROPERTY public val test2: kotlin.Any.(kotlin.Any) -> kotlin.Any
|
||||
FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.Any.(kotlin.Any) -> kotlin.Any
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=kotlin.Any.(kotlin.Any) -> kotlin.Int origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun kotlin.Any.<anonymous>(it: kotlin.Any): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: <anonymous>(Any) on Any: Int>
|
||||
VALUE_PARAMETER value-parameter it: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(Any) on Any: Int'
|
||||
CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'value-parameter it: Any' type=kotlin.Any origin=null
|
||||
CALLABLE_REFERENCE '<anonymous>(Any) on Any: Int' type=kotlin.Any.(kotlin.Any) -> kotlin.Int origin=LAMBDA
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): kotlin.Any.(kotlin.Any) -> kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Any.(Any) -> Any'
|
||||
GET_FIELD 'test2: Any.(Any) -> Any' type=kotlin.Any.(kotlin.Any) -> kotlin.Any origin=null
|
||||
PROPERTY public val test3: (kotlin.Int, kotlin.Int) -> kotlin.Unit
|
||||
FIELD PROPERTY_BACKING_FIELD public val test3: (kotlin.Int, kotlin.Int) -> kotlin.Unit
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(i: kotlin.Int, j: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(Int, Int): Unit'
|
||||
GET_OBJECT 'Unit' type=kotlin.Unit
|
||||
CALLABLE_REFERENCE '<anonymous>(Int, Int): Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=LAMBDA
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test3>(): (kotlin.Int, kotlin.Int) -> kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test3>(): (Int, Int) -> Unit'
|
||||
GET_FIELD 'test3: (Int, Int) -> Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=null
|
||||
PROPERTY public val test4: (kotlin.Int, kotlin.Int) -> kotlin.Unit
|
||||
FIELD PROPERTY_BACKING_FIELD public val test4: (kotlin.Int, kotlin.Int) -> kotlin.Unit
|
||||
EXPRESSION_BODY
|
||||
BLOCK type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=ANONYMOUS_FUNCTION
|
||||
FUN local final fun <no name provided>(i: kotlin.Int, j: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CALLABLE_REFERENCE '<no name provided>(Int, Int): Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=ANONYMOUS_FUNCTION
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test4>(): (kotlin.Int, kotlin.Int) -> kotlin.Unit
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test4>(): (Int, Int) -> Unit'
|
||||
GET_FIELD 'test4: (Int, Int) -> Unit' type=(kotlin.Int, kotlin.Int) -> kotlin.Unit origin=null
|
||||
@@ -0,0 +1,9 @@
|
||||
fun <TT> outer() {
|
||||
fun <T> test1(i: Int, j: T) {}
|
||||
|
||||
fun test2(i: Int = 0, j: String = "") {}
|
||||
|
||||
fun test3(vararg args: String) {}
|
||||
|
||||
fun String.textExt1(i: Int, j: TT) {}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
FILE /localFun.kt
|
||||
FUN public fun <TT> outer(): kotlin.Unit
|
||||
TYPE_PARAMETER <TT>
|
||||
BLOCK_BODY
|
||||
FUN local final fun <T> test1(i: kotlin.Int, j: T): kotlin.Unit
|
||||
TYPE_PARAMETER <T>
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: T
|
||||
BLOCK_BODY
|
||||
FUN local final fun test2(i: kotlin.Int = ..., j: kotlin.String = ...): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VALUE_PARAMETER value-parameter j: kotlin.String = ...
|
||||
EXPRESSION_BODY
|
||||
CONST String type=kotlin.String value=''
|
||||
BLOCK_BODY
|
||||
FUN local final fun test3(vararg args: kotlin.String): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter vararg args: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN local final fun kotlin.String.textExt1(i: kotlin.Int, j: TT): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: textExt1(Int, TT) on String: Unit>
|
||||
VALUE_PARAMETER value-parameter i: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter j: TT
|
||||
BLOCK_BODY
|
||||
@@ -0,0 +1,25 @@
|
||||
val test1 get() = 42
|
||||
|
||||
var test2 get() = 42; set(value) {}
|
||||
|
||||
val String.testExt1 get() = 42
|
||||
|
||||
var String.testExt2 get() = 42; set(value) {}
|
||||
|
||||
val <T> T.testExt3 get() = 42
|
||||
|
||||
var <T> T.testExt4 get() = 42; set(value) {}
|
||||
|
||||
class Host<T> {
|
||||
val testMem1 get() = 42
|
||||
|
||||
var testMem2 get() = 42; set(value) {}
|
||||
|
||||
val String.testMemExt1 get() = 42
|
||||
|
||||
var String.testMemExt2 get() = 42; set(value) {}
|
||||
|
||||
val <TT> TT.testMemExt3 get() = 42
|
||||
|
||||
var <TT> TT.testMemExt4 get() = 42; set(value) {}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
FILE /propertyAccessors.kt
|
||||
PROPERTY public val test1: kotlin.Int
|
||||
FUN public fun <get-test1>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public var test2: kotlin.Int
|
||||
FUN public fun <get-test2>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public fun <set-test2>(value: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
PROPERTY public val kotlin.String.testExt1: kotlin.Int
|
||||
FUN public fun kotlin.String.<get-testExt1>(): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: testExt1: Int on String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testExt1>() on String: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public var kotlin.String.testExt2: kotlin.Int
|
||||
FUN public fun kotlin.String.<get-testExt2>(): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: testExt2: Int on String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testExt2>() on String: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public fun kotlin.String.<set-testExt2>(value: kotlin.Int): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: testExt2: Int on String>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
PROPERTY public val <T> T.testExt3: kotlin.Int
|
||||
FUN public fun T.<get-testExt3>(): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: testExt3: Int on T>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testExt3>() on T: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public var <T> T.testExt4: kotlin.Int
|
||||
FUN public fun T.<get-testExt4>(): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: testExt4: Int on T>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testExt4>() on T: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public fun T.<set-testExt4>(value: kotlin.Int): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: testExt4: Int on T>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
CLASS CLASS Host
|
||||
TYPE_PARAMETER <T>
|
||||
CONSTRUCTOR public constructor Host<T>()
|
||||
TYPE_PARAMETER <T>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Host'
|
||||
PROPERTY public final val testMem1: kotlin.Int
|
||||
FUN public final fun <get-testMem1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMem1>(): Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public final var testMem2: kotlin.Int
|
||||
FUN public final fun <get-testMem2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMem2>(): Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public final fun <set-testMem2>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
PROPERTY public final val kotlin.String.testMemExt1: kotlin.Int
|
||||
FUN public final fun kotlin.String.<get-testMemExt1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMemExt1: Int on String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMemExt1>() on String: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public final var kotlin.String.testMemExt2: kotlin.Int
|
||||
FUN public final fun kotlin.String.<get-testMemExt2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMemExt2: Int on String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMemExt2>() on String: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public final fun kotlin.String.<set-testMemExt2>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMemExt2: Int on String>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
PROPERTY public final val <TT> TT.testMemExt3: kotlin.Int
|
||||
FUN public final fun TT.<get-testMemExt3>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMemExt3: Int on TT>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMemExt3>() on TT: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
PROPERTY public final var <TT> TT.testMemExt4: kotlin.Int
|
||||
FUN public final fun TT.<get-testMemExt4>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMemExt4: Int on TT>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMemExt4>() on TT: Int'
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
FUN public final fun TT.<set-testMemExt4>(value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: testMemExt4: Int on TT>
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
BLOCK_BODY
|
||||
@@ -1,8 +1,9 @@
|
||||
FILE /primaryCtorDefaultArguments.kt
|
||||
CLASS CLASS Test
|
||||
CONSTRUCTOR public constructor Test(x: kotlin.Int = ...)
|
||||
x: EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Test'
|
||||
@@ -11,6 +12,7 @@ FILE /primaryCtorDefaultArguments.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Test>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
FILE /primaryCtorProperties.kt
|
||||
CLASS CLASS C
|
||||
CONSTRUCTOR public constructor C(test1: kotlin.Int, test2: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter test1: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter test2: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
@@ -9,6 +11,7 @@ FILE /primaryCtorProperties.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter test1: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
|
||||
GET_FIELD 'test1: Int' type=kotlin.Int origin=null
|
||||
@@ -18,11 +21,14 @@ FILE /primaryCtorProperties.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter test2: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
|
||||
GET_FIELD 'test2: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-test2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'test2: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: C>' type=C origin=null
|
||||
|
||||
+8
@@ -1,6 +1,7 @@
|
||||
FILE /differentReceivers.kt
|
||||
CLASS CLASS MyClass
|
||||
CONSTRUCTOR public constructor MyClass(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='MyClass'
|
||||
@@ -9,16 +10,23 @@ FILE /differentReceivers.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: MyClass>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: MyClass>' type=MyClass origin=null
|
||||
FUN public operator fun MyClass.provideDelegate(host: kotlin.Any?, p: kotlin.Any): kotlin.String
|
||||
$receiver: VALUE_PARAMETER <receiver: provideDelegate(Any?, Any) on MyClass: String>
|
||||
VALUE_PARAMETER value-parameter host: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter p: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='provideDelegate(Any?, Any) on MyClass: String'
|
||||
CALL '<get-value>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: provideDelegate(Any?, Any) on MyClass: String>' type=MyClass origin=null
|
||||
FUN public operator fun kotlin.String.getValue(receiver: kotlin.Any?, p: kotlin.Any): kotlin.String
|
||||
$receiver: VALUE_PARAMETER <receiver: getValue(Any?, Any) on String: String>
|
||||
VALUE_PARAMETER value-parameter receiver: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter p: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='getValue(Any?, Any) on String: String'
|
||||
GET_VAR '<receiver: getValue(Any?, Any) on String: String>' type=kotlin.String origin=null
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /local.kt
|
||||
CLASS CLASS Delegate
|
||||
CONSTRUCTOR public constructor Delegate(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Delegate'
|
||||
@@ -9,17 +10,22 @@ FILE /local.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Delegate>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: Delegate>' type=Delegate origin=null
|
||||
FUN public final operator fun getValue(thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Delegate>
|
||||
VALUE_PARAMETER value-parameter thisRef: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter property: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='getValue(Any?, Any?): String'
|
||||
CALL '<get-value>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Delegate>' type=Delegate origin=null
|
||||
CLASS CLASS DelegateProvider
|
||||
CONSTRUCTOR public constructor DelegateProvider(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='DelegateProvider'
|
||||
@@ -28,11 +34,15 @@ FILE /local.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: DelegateProvider>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: DelegateProvider>' type=DelegateProvider origin=null
|
||||
FUN public final operator fun provideDelegate(thisRef: kotlin.Any?, property: kotlin.Any?): Delegate
|
||||
$this: VALUE_PARAMETER <receiver: DelegateProvider>
|
||||
VALUE_PARAMETER value-parameter thisRef: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter property: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='provideDelegate(Any?, Any?): Delegate'
|
||||
CALL 'constructor Delegate(String)' type=Delegate origin=null
|
||||
|
||||
+8
@@ -1,6 +1,7 @@
|
||||
FILE /localDifferentReceivers.kt
|
||||
CLASS CLASS MyClass
|
||||
CONSTRUCTOR public constructor MyClass(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='MyClass'
|
||||
@@ -9,16 +10,23 @@ FILE /localDifferentReceivers.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: MyClass>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: MyClass>' type=MyClass origin=null
|
||||
FUN public operator fun MyClass.provideDelegate(host: kotlin.Any?, p: kotlin.Any): kotlin.String
|
||||
$receiver: VALUE_PARAMETER <receiver: provideDelegate(Any?, Any) on MyClass: String>
|
||||
VALUE_PARAMETER value-parameter host: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter p: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='provideDelegate(Any?, Any) on MyClass: String'
|
||||
CALL '<get-value>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: provideDelegate(Any?, Any) on MyClass: String>' type=MyClass origin=null
|
||||
FUN public operator fun kotlin.String.getValue(receiver: kotlin.Any?, p: kotlin.Any): kotlin.String
|
||||
$receiver: VALUE_PARAMETER <receiver: getValue(Any?, Any) on String: String>
|
||||
VALUE_PARAMETER value-parameter receiver: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter p: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='getValue(Any?, Any) on String: String'
|
||||
GET_VAR '<receiver: getValue(Any?, Any) on String: String>' type=kotlin.String origin=null
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /member.kt
|
||||
CLASS CLASS Delegate
|
||||
CONSTRUCTOR public constructor Delegate(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Delegate'
|
||||
@@ -9,17 +10,22 @@ FILE /member.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Delegate>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: Delegate>' type=Delegate origin=null
|
||||
FUN public final operator fun getValue(thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Delegate>
|
||||
VALUE_PARAMETER value-parameter thisRef: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter property: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='getValue(Any?, Any?): String'
|
||||
CALL '<get-value>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Delegate>' type=Delegate origin=null
|
||||
CLASS CLASS DelegateProvider
|
||||
CONSTRUCTOR public constructor DelegateProvider(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='DelegateProvider'
|
||||
@@ -28,11 +34,15 @@ FILE /member.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: DelegateProvider>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: DelegateProvider>' type=DelegateProvider origin=null
|
||||
FUN public final operator fun provideDelegate(thisRef: kotlin.Any?, property: kotlin.Any?): Delegate
|
||||
$this: VALUE_PARAMETER <receiver: DelegateProvider>
|
||||
VALUE_PARAMETER value-parameter thisRef: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter property: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='provideDelegate(Any?, Any?): Delegate'
|
||||
CALL 'constructor Delegate(String)' type=Delegate origin=null
|
||||
@@ -52,6 +62,7 @@ FILE /member.kt
|
||||
thisRef: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
property: CALLABLE_REFERENCE 'testMember: String' type=kotlin.reflect.KProperty1<Host, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun <get-testMember>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-testMember>(): String'
|
||||
CALL 'getValue(Any?, Any?): String' type=kotlin.String origin=null
|
||||
|
||||
@@ -6,6 +6,7 @@ FILE /memberExtension.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Host'
|
||||
CLASS CLASS StringDelegate
|
||||
CONSTRUCTOR public constructor StringDelegate(s: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='StringDelegate'
|
||||
@@ -14,11 +15,15 @@ FILE /memberExtension.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter s: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-s>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: StringDelegate>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-s>(): String'
|
||||
GET_FIELD 's: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: StringDelegate>' type=Host.StringDelegate origin=null
|
||||
FUN public final operator fun getValue(receiver: kotlin.String, p: kotlin.Any): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: StringDelegate>
|
||||
VALUE_PARAMETER value-parameter receiver: kotlin.String
|
||||
VALUE_PARAMETER value-parameter p: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='getValue(String, Any): String'
|
||||
CALL 'plus(Any?): String' type=kotlin.String origin=PLUS
|
||||
@@ -26,6 +31,10 @@ FILE /memberExtension.kt
|
||||
other: CALL '<get-s>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: StringDelegate>' type=Host.StringDelegate origin=null
|
||||
FUN public final operator fun kotlin.String.provideDelegate(host: kotlin.Any?, p: kotlin.Any): Host.StringDelegate
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: provideDelegate(Any?, Any) on String: Host.StringDelegate>
|
||||
VALUE_PARAMETER value-parameter host: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter p: kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='provideDelegate(Any?, Any) on String: Host.StringDelegate'
|
||||
CALL 'constructor StringDelegate(String)' type=Host.StringDelegate origin=null
|
||||
@@ -39,6 +48,8 @@ FILE /memberExtension.kt
|
||||
host: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
p: CALLABLE_REFERENCE 'plusK: String on String' type=kotlin.reflect.KProperty2<kotlin.String, Host, kotlin.String> origin=PROPERTY_REFERENCE_FOR_DELEGATE
|
||||
FUN DELEGATED_PROPERTY_ACCESSOR public final fun kotlin.String.<get-plusK>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: plusK: String on String>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-plusK>() on String: String'
|
||||
CALL 'getValue(String, Any): String' type=kotlin.String origin=null
|
||||
@@ -53,6 +64,7 @@ FILE /memberExtension.kt
|
||||
$this: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
$receiver: CONST String type=kotlin.String value='O'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-ok>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-ok>(): String'
|
||||
GET_FIELD 'ok: String' type=kotlin.String origin=null
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /topLevel.kt
|
||||
CLASS CLASS Delegate
|
||||
CONSTRUCTOR public constructor Delegate(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Delegate'
|
||||
@@ -9,17 +10,22 @@ FILE /topLevel.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Delegate>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: Delegate>' type=Delegate origin=null
|
||||
FUN public final operator fun getValue(thisRef: kotlin.Any?, property: kotlin.Any?): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: Delegate>
|
||||
VALUE_PARAMETER value-parameter thisRef: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter property: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='getValue(Any?, Any?): String'
|
||||
CALL '<get-value>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<receiver: Delegate>' type=Delegate origin=null
|
||||
CLASS CLASS DelegateProvider
|
||||
CONSTRUCTOR public constructor DelegateProvider(value: kotlin.String)
|
||||
VALUE_PARAMETER value-parameter value: kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='DelegateProvider'
|
||||
@@ -28,11 +34,15 @@ FILE /topLevel.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter value: String' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): kotlin.String
|
||||
$this: VALUE_PARAMETER <receiver: DelegateProvider>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-value>(): String'
|
||||
GET_FIELD 'value: String' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<receiver: DelegateProvider>' type=DelegateProvider origin=null
|
||||
FUN public final operator fun provideDelegate(thisRef: kotlin.Any?, property: kotlin.Any?): Delegate
|
||||
$this: VALUE_PARAMETER <receiver: DelegateProvider>
|
||||
VALUE_PARAMETER value-parameter thisRef: kotlin.Any?
|
||||
VALUE_PARAMETER value-parameter property: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='provideDelegate(Any?, Any?): Delegate'
|
||||
CALL 'constructor Delegate(String)' type=Delegate origin=null
|
||||
|
||||
@@ -5,8 +5,10 @@ FILE /suppressedNonPublicCall.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
FUN internal final fun bar(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
FUN public inline fun C.foo(): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: foo() on C: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'bar(): Unit' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<receiver: foo() on C: Unit>' type=C origin=null
|
||||
|
||||
@@ -12,6 +12,7 @@ FILE /arrayAccess.kt
|
||||
RETURN type=kotlin.Nothing from='foo(): Int'
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN public fun test(a: kotlin.IntArray): kotlin.Int
|
||||
VALUE_PARAMETER value-parameter a: kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test(IntArray): Int'
|
||||
CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
|
||||
|
||||
@@ -13,6 +13,7 @@ FILE /arrayAugmentedAssignment1.kt
|
||||
CONST Int type=kotlin.Int value='42'
|
||||
CLASS CLASS C
|
||||
CONSTRUCTOR public constructor C(x: kotlin.IntArray)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
@@ -21,6 +22,7 @@ FILE /arrayAugmentedAssignment1.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.IntArray
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): IntArray'
|
||||
GET_FIELD 'x: IntArray' type=kotlin.IntArray origin=null
|
||||
@@ -58,6 +60,7 @@ FILE /arrayAugmentedAssignment1.kt
|
||||
index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value='2'
|
||||
FUN public fun testMember(c: C): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter c: C
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
FILE /arrayAugmentedAssignment2.kt
|
||||
CLASS INTERFACE IA
|
||||
FUN public abstract operator fun get(index: kotlin.String): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IA>
|
||||
VALUE_PARAMETER value-parameter index: kotlin.String
|
||||
CLASS INTERFACE IB
|
||||
FUN public abstract operator fun IA.set(index: kotlin.String, value: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: IB>
|
||||
$receiver: VALUE_PARAMETER <receiver: set(String, Int) on IA: Unit>
|
||||
VALUE_PARAMETER value-parameter index: kotlin.String
|
||||
VALUE_PARAMETER value-parameter value: kotlin.Int
|
||||
FUN public fun IB.test(a: IA): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: test(IA) on IB: Unit>
|
||||
VALUE_PARAMETER value-parameter a: IA
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=PLUSEQ
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_array: IA
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
FILE /assignments.kt
|
||||
CLASS CLASS Ref
|
||||
CONSTRUCTOR public constructor Ref(x: kotlin.Int)
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Ref'
|
||||
@@ -9,11 +10,14 @@ FILE /assignments.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: Ref>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x>(): Int'
|
||||
GET_FIELD 'x: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: Ref>' type=Ref origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Ref>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: Ref>' type=Ref origin=null
|
||||
@@ -29,6 +33,7 @@ FILE /assignments.kt
|
||||
$this: GET_VAR 'x: Int' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value='1'
|
||||
FUN public fun test2(r: Ref): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter r: Ref
|
||||
BLOCK_BODY
|
||||
CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'value-parameter r: Ref' type=Ref origin=null
|
||||
|
||||
@@ -8,6 +8,7 @@ FILE /augmentedAssignment1.kt
|
||||
RETURN type=kotlin.Nothing from='<get-p>(): Int'
|
||||
GET_FIELD 'p: Int' type=kotlin.Int origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public fun <set-p>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'p: Int' type=kotlin.Unit origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
|
||||
@@ -5,14 +5,24 @@ FILE /augmentedAssignment2.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='A'
|
||||
FUN public operator fun A.plusAssign(s: kotlin.String): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: plusAssign(String) on A: Unit>
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public operator fun A.minusAssign(s: kotlin.String): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: minusAssign(String) on A: Unit>
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public operator fun A.timesAssign(s: kotlin.String): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: timesAssign(String) on A: Unit>
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public operator fun A.divAssign(s: kotlin.String): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: divAssign(String) on A: Unit>
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN public operator fun A.modAssign(s: kotlin.String): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: modAssign(String) on A: Unit>
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
PROPERTY public val p: A
|
||||
FIELD PROPERTY_BACKING_FIELD public val p: A
|
||||
|
||||
@@ -5,8 +5,11 @@ FILE /augmentedAssignmentWithExpression.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Host'
|
||||
FUN public final operator fun plusAssign(x: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
FUN public final fun test1(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
BLOCK_BODY
|
||||
CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
|
||||
$this: GET_VAR '<receiver: Host>' type=Host origin=null
|
||||
@@ -16,6 +19,7 @@ FILE /augmentedAssignmentWithExpression.kt
|
||||
RETURN type=kotlin.Nothing from='foo(): Host'
|
||||
CALL 'constructor Host()' type=Host origin=null
|
||||
FUN public fun Host.test2(): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: test2() on Host: Unit>
|
||||
BLOCK_BODY
|
||||
CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
|
||||
$this: GET_VAR '<receiver: test2() on Host: Unit>' type=Host origin=null
|
||||
@@ -26,6 +30,7 @@ FILE /augmentedAssignmentWithExpression.kt
|
||||
$this: CALL 'foo(): Host' type=Host origin=null
|
||||
x: CONST Int type=kotlin.Int value='1'
|
||||
FUN public fun test4(a: () -> Host): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter a: () -> Host
|
||||
BLOCK_BODY
|
||||
CALL 'plusAssign(Int): Unit' type=kotlin.Unit origin=PLUSEQ
|
||||
$this: CALL 'invoke(): Host' type=Host origin=INVOKE
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
FILE /bangbang.kt
|
||||
FUN public fun test1(a: kotlin.Any?): kotlin.Any
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1(Any?): Any'
|
||||
BLOCK type=kotlin.Any origin=EXCLEXCL
|
||||
@@ -15,6 +16,7 @@ FILE /bangbang.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
|
||||
FUN public fun test2(a: kotlin.Any?): kotlin.Int
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Any?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(Any?): Int'
|
||||
BLOCK type=kotlin.Int origin=EXCLEXCL
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
FILE /booleanConstsInAndAndOrOr.kt
|
||||
FUN public fun test1(b: kotlin.Boolean): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
WHEN type=kotlin.Boolean origin=ANDAND
|
||||
@@ -11,6 +12,7 @@ FILE /booleanConstsInAndAndOrOr.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST Boolean type=kotlin.Boolean value='false'
|
||||
FUN public fun test2(b: kotlin.Boolean): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
WHEN type=kotlin.Boolean origin=OROR
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FILE /booleanOperators.kt
|
||||
FUN public fun test1(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1(Boolean, Boolean): Boolean'
|
||||
WHEN type=kotlin.Boolean origin=ANDAND
|
||||
@@ -10,6 +12,8 @@ FILE /booleanOperators.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST Boolean type=kotlin.Boolean value='false'
|
||||
FUN public fun test2(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(Boolean, Boolean): Boolean'
|
||||
WHEN type=kotlin.Boolean origin=OROR
|
||||
@@ -20,12 +24,16 @@ FILE /booleanOperators.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
|
||||
FUN public fun test1x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1x(Boolean, Boolean): Boolean'
|
||||
CALL 'and(Boolean): Boolean' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
|
||||
other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
|
||||
FUN public fun test2x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Boolean
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2x(Boolean, Boolean): Boolean'
|
||||
CALL 'or(Boolean): Boolean' type=kotlin.Boolean origin=null
|
||||
|
||||
@@ -5,17 +5,20 @@ FILE /boundCallableReferences.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='A'
|
||||
FUN public final fun foo(): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: A>
|
||||
BLOCK_BODY
|
||||
PROPERTY public final val bar: kotlin.Int = 0
|
||||
FIELD PROPERTY_BACKING_FIELD public final val bar: kotlin.Int = 0
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-bar>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: A>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
|
||||
GET_FIELD 'bar: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: A>' type=A origin=null
|
||||
FUN public fun A.qux(): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: qux() on A: Unit>
|
||||
BLOCK_BODY
|
||||
PROPERTY public val test1: kotlin.reflect.KFunction0<kotlin.Unit>
|
||||
FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.reflect.KFunction0<kotlin.Unit>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
FILE /breakContinueInLoopHeader.kt
|
||||
FUN public fun test1(c: kotlin.Boolean?): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter c: kotlin.Boolean?
|
||||
BLOCK_BODY
|
||||
WHILE label=L origin=WHILE_LOOP
|
||||
condition: CONST Boolean type=kotlin.Boolean value='true'
|
||||
@@ -18,6 +19,7 @@ FILE /breakContinueInLoopHeader.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
FUN public fun test2(c: kotlin.Boolean?): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter c: kotlin.Boolean?
|
||||
BLOCK_BODY
|
||||
WHILE label=L origin=WHILE_LOOP
|
||||
condition: CONST Boolean type=kotlin.Boolean value='true'
|
||||
@@ -36,6 +38,7 @@ FILE /breakContinueInLoopHeader.kt
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
FUN public fun test3(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter ss: kotlin.collections.List<kotlin.String>?
|
||||
BLOCK_BODY
|
||||
WHILE label=L origin=WHILE_LOOP
|
||||
condition: CONST Boolean type=kotlin.Boolean value='true'
|
||||
@@ -63,6 +66,7 @@ FILE /breakContinueInLoopHeader.kt
|
||||
CALL 'next(): String' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
FUN public fun test4(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter ss: kotlin.collections.List<kotlin.String>?
|
||||
BLOCK_BODY
|
||||
WHILE label=L origin=WHILE_LOOP
|
||||
condition: CONST Boolean type=kotlin.Boolean value='true'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FILE /callWithReorderedArguments.kt
|
||||
FUN public fun foo(a: kotlin.Int, b: kotlin.Int): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter a: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter b: kotlin.Int
|
||||
BLOCK_BODY
|
||||
FUN public fun noReorder1(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
FILE /calls.kt
|
||||
FUN public fun foo(x: kotlin.Int, y: kotlin.Int): kotlin.Int
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
VALUE_PARAMETER value-parameter y: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='foo(Int, Int): Int'
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
FUN public fun bar(x: kotlin.Int): kotlin.Int
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(Int): Int'
|
||||
CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
|
||||
x: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
y: CONST Int type=kotlin.Int value='1'
|
||||
FUN public fun qux(x: kotlin.Int): kotlin.Int
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='qux(Int): Int'
|
||||
CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
|
||||
@@ -18,16 +22,21 @@ FILE /calls.kt
|
||||
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
FUN public fun kotlin.Int.ext1(): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: ext1() on Int: Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='ext1() on Int: Int'
|
||||
GET_VAR '<receiver: ext1() on Int: Int>' type=kotlin.Int origin=null
|
||||
FUN public fun kotlin.Int.ext2(x: kotlin.Int): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: ext2(Int) on Int: Int>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='ext2(Int) on Int: Int'
|
||||
CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
|
||||
x: GET_VAR '<receiver: ext2(Int) on Int: Int>' type=kotlin.Int origin=null
|
||||
y: GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
FUN public fun kotlin.Int.ext3(x: kotlin.Int): kotlin.Int
|
||||
$receiver: VALUE_PARAMETER <receiver: ext3(Int) on Int: Int>
|
||||
VALUE_PARAMETER value-parameter x: kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='ext3(Int) on Int: Int'
|
||||
CALL 'foo(Int, Int): Int' type=kotlin.Int origin=null
|
||||
|
||||
@@ -5,14 +5,17 @@ FILE /chainOfSafeCalls.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='C'
|
||||
FUN public final fun foo(): C
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='foo(): C'
|
||||
GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN public final fun bar(): C?
|
||||
$this: VALUE_PARAMETER <receiver: C>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='bar(): C?'
|
||||
GET_VAR '<receiver: C>' type=C origin=null
|
||||
FUN public fun test(nc: C?): C?
|
||||
VALUE_PARAMETER value-parameter nc: C?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test(C?): C?'
|
||||
BLOCK type=C? origin=SAFE_CALL
|
||||
|
||||
@@ -14,6 +14,7 @@ FILE /coercionToUnit.kt
|
||||
RETURN type=kotlin.Nothing from='<get-test1>(): () -> Unit'
|
||||
GET_FIELD 'test1: () -> Unit' type=() -> kotlin.Unit origin=null
|
||||
FUN public fun test2(mc: kotlin.collections.MutableCollection<kotlin.String>): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter mc: kotlin.collections.MutableCollection<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'add(String): Boolean' type=kotlin.Boolean origin=null
|
||||
|
||||
@@ -9,11 +9,14 @@ FILE /complexAugmentedAssignment.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x1>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: X1>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x1>(): Int'
|
||||
GET_FIELD 'x1: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: X1>' type=X1 origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x1>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: X1>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x1: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: X1>' type=X1 origin=null
|
||||
@@ -28,11 +31,14 @@ FILE /complexAugmentedAssignment.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x2>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: X2>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x2>(): Int'
|
||||
GET_FIELD 'x2: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: X2>' type=X1.X2 origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x2>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: X2>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x2: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: X2>' type=X1.X2 origin=null
|
||||
@@ -47,16 +53,20 @@ FILE /complexAugmentedAssignment.kt
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-x3>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: X3>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-x3>(): Int'
|
||||
GET_FIELD 'x3: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: X3>' type=X1.X2.X3 origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-x3>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: X3>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'x3: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: X3>' type=X1.X2.X3 origin=null
|
||||
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
|
||||
FUN public fun test1(a: kotlin.IntArray): kotlin.Unit
|
||||
VALUE_PARAMETER value-parameter a: kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
VAR var i: kotlin.Int
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
@@ -125,8 +135,9 @@ FILE /complexAugmentedAssignment.kt
|
||||
GET_VAR 'tmp5: Int' type=kotlin.Int origin=null
|
||||
CLASS CLASS B
|
||||
CONSTRUCTOR public constructor B(s: kotlin.Int = ...)
|
||||
s: EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VALUE_PARAMETER value-parameter s: kotlin.Int = ...
|
||||
EXPRESSION_BODY
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='B'
|
||||
@@ -135,11 +146,14 @@ FILE /complexAugmentedAssignment.kt
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-s>(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-s>(): Int'
|
||||
GET_FIELD 's: Int' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<receiver: B>' type=B origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <set-s>(<set-?>: kotlin.Int): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
VALUE_PARAMETER value-parameter <set-?>: kotlin.Int
|
||||
BLOCK_BODY
|
||||
SET_FIELD 's: Int' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<receiver: B>' type=B origin=null
|
||||
@@ -150,6 +164,9 @@ FILE /complexAugmentedAssignment.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Host'
|
||||
FUN public final operator fun B.plusAssign(b: B): kotlin.Unit
|
||||
$this: VALUE_PARAMETER <receiver: Host>
|
||||
$receiver: VALUE_PARAMETER <receiver: plusAssign(B) on B: Unit>
|
||||
VALUE_PARAMETER value-parameter b: B
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=PLUSEQ
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_this: B
|
||||
@@ -162,6 +179,8 @@ FILE /complexAugmentedAssignment.kt
|
||||
other: CALL '<get-s>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value-parameter b: B' type=B origin=null
|
||||
FUN public fun Host.test3(v: B): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: test3(B) on Host: Unit>
|
||||
VALUE_PARAMETER value-parameter v: B
|
||||
BLOCK_BODY
|
||||
CALL 'plusAssign(B) on B: Unit' type=kotlin.Unit origin=PLUSEQ
|
||||
$this: GET_VAR '<receiver: test3(B) on Host: Unit>' type=Host origin=null
|
||||
|
||||
@@ -2,7 +2,13 @@ FILE /conventionComparisons.kt
|
||||
CLASS INTERFACE IA
|
||||
CLASS INTERFACE IB
|
||||
FUN public abstract operator fun IA.compareTo(other: IA): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: IB>
|
||||
$receiver: VALUE_PARAMETER <receiver: compareTo(IA) on IA: Int>
|
||||
VALUE_PARAMETER value-parameter other: IA
|
||||
FUN public fun IB.test1(a1: IA, a2: IA): kotlin.Boolean
|
||||
$receiver: VALUE_PARAMETER <receiver: test1(IA, IA) on IB: Boolean>
|
||||
VALUE_PARAMETER value-parameter a1: IA
|
||||
VALUE_PARAMETER value-parameter a2: IA
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1(IA, IA) on IB: Boolean'
|
||||
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
||||
@@ -11,6 +17,9 @@ FILE /conventionComparisons.kt
|
||||
$receiver: GET_VAR 'value-parameter a1: IA' type=IA origin=null
|
||||
other: GET_VAR 'value-parameter a2: IA' type=IA origin=null
|
||||
FUN public fun IB.test2(a1: IA, a2: IA): kotlin.Boolean
|
||||
$receiver: VALUE_PARAMETER <receiver: test2(IA, IA) on IB: Boolean>
|
||||
VALUE_PARAMETER value-parameter a1: IA
|
||||
VALUE_PARAMETER value-parameter a2: IA
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(IA, IA) on IB: Boolean'
|
||||
CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean origin=GTEQ
|
||||
@@ -19,6 +28,9 @@ FILE /conventionComparisons.kt
|
||||
$receiver: GET_VAR 'value-parameter a1: IA' type=IA origin=null
|
||||
other: GET_VAR 'value-parameter a2: IA' type=IA origin=null
|
||||
FUN public fun IB.test3(a1: IA, a2: IA): kotlin.Boolean
|
||||
$receiver: VALUE_PARAMETER <receiver: test3(IA, IA) on IB: Boolean>
|
||||
VALUE_PARAMETER value-parameter a1: IA
|
||||
VALUE_PARAMETER value-parameter a2: IA
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test3(IA, IA) on IB: Boolean'
|
||||
CALL 'LT0(Int): Boolean' type=kotlin.Boolean origin=LT
|
||||
@@ -27,6 +39,9 @@ FILE /conventionComparisons.kt
|
||||
$receiver: GET_VAR 'value-parameter a1: IA' type=IA origin=null
|
||||
other: GET_VAR 'value-parameter a2: IA' type=IA origin=null
|
||||
FUN public fun IB.test4(a1: IA, a2: IA): kotlin.Boolean
|
||||
$receiver: VALUE_PARAMETER <receiver: test4(IA, IA) on IB: Boolean>
|
||||
VALUE_PARAMETER value-parameter a1: IA
|
||||
VALUE_PARAMETER value-parameter a2: IA
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test4(IA, IA) on IB: Boolean'
|
||||
CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean origin=LTEQ
|
||||
|
||||
@@ -10,14 +10,19 @@ FILE /destructuring1.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='B'
|
||||
FUN public final operator fun A.component1(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
$receiver: VALUE_PARAMETER <receiver: component1() on A: Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component1() on A: Int'
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN public final operator fun A.component2(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
$receiver: VALUE_PARAMETER <receiver: component2() on A: Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component2() on A: Int'
|
||||
CONST Int type=kotlin.Int value='2'
|
||||
FUN public fun B.test(): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: test() on B: Unit>
|
||||
BLOCK_BODY
|
||||
COMPOSITE type=kotlin.Unit origin=DESTRUCTURING_DECLARATION
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_container: A
|
||||
|
||||
@@ -10,18 +10,25 @@ FILE /destructuringWithUnderscore.kt
|
||||
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='B'
|
||||
FUN public final operator fun A.component1(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
$receiver: VALUE_PARAMETER <receiver: component1() on A: Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component1() on A: Int'
|
||||
CONST Int type=kotlin.Int value='1'
|
||||
FUN public final operator fun A.component2(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
$receiver: VALUE_PARAMETER <receiver: component2() on A: Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component2() on A: Int'
|
||||
CONST Int type=kotlin.Int value='2'
|
||||
FUN public final operator fun A.component3(): kotlin.Int
|
||||
$this: VALUE_PARAMETER <receiver: B>
|
||||
$receiver: VALUE_PARAMETER <receiver: component3() on A: Int>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='component3() on A: Int'
|
||||
CONST Int type=kotlin.Int value='3'
|
||||
FUN public fun B.test(): kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER <receiver: test() on B: Unit>
|
||||
BLOCK_BODY
|
||||
COMPOSITE type=kotlin.Unit origin=DESTRUCTURING_DECLARATION
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_container: A
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
FILE /dotQualified.kt
|
||||
FUN public fun length(s: kotlin.String): kotlin.Int
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='length(String): Int'
|
||||
CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value-parameter s: String' type=kotlin.String origin=null
|
||||
FUN public fun lengthN(s: kotlin.String?): kotlin.Int?
|
||||
VALUE_PARAMETER value-parameter s: kotlin.String?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='lengthN(String?): Int?'
|
||||
BLOCK type=kotlin.Int? origin=SAFE_CALL
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user