Drop IrPropertyAccessor (and subclasses).

Drop IrLocalPropertyAccessor (and subclasses).
Introduce IrField.
This commit is contained in:
Dmitry Petrov
2016-09-12 12:07:10 +03:00
committed by Dmitry Petrov
parent 121e949a33
commit 5c720845a8
81 changed files with 1124 additions and 831 deletions
@@ -19,11 +19,12 @@ package org.jetbrains.kotlin.backend.common
import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrClass
import org.jetbrains.kotlin.ir.declarations.IrGeneralFunction import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.declarations.IrLocalPropertyAccessor import org.jetbrains.kotlin.ir.declarations.IrLocalDelegatedProperty
import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
import org.jetbrains.kotlin.ir.visitors.acceptVoid
import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.DescriptorUtils
import java.util.* import java.util.*
@@ -103,7 +104,7 @@ abstract class AbstractClosureAnnotator : IrElementVisitorVoid {
closuresStack.peek()?.addNested(closure) closuresStack.peek()?.addNested(closure)
} }
override fun visitGeneralFunction(declaration: IrGeneralFunction) { override fun visitFunction(declaration: IrFunction) {
val functionDescriptor = declaration.descriptor val functionDescriptor = declaration.descriptor
val closureBuilder = ClosureBuilder(functionDescriptor) val closureBuilder = ClosureBuilder(functionDescriptor)
@@ -120,8 +121,9 @@ abstract class AbstractClosureAnnotator : IrElementVisitorVoid {
closuresStack.peek()?.addNested(closure) closuresStack.peek()?.addNested(closure)
} }
override fun visitLocalPropertyAccessor(declaration: IrLocalPropertyAccessor) { override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty) {
// Local property accessors are created for delegated local properties and have no closure. // Getter and setter of local delegated properties are special generated functions and don't have closure.
declaration.delegate.initializer?.acceptVoid(this)
} }
override fun visitThisReference(expression: IrThisReference) { override fun visitThisReference(expression: IrThisReference) {
@@ -92,9 +92,9 @@ class CallGenerator(statementGenerator: StatementGenerator): StatementGeneratorE
extensionReceiverValue?.load(), extensionReceiverValue?.load(),
IrOperator.GET_PROPERTY, IrOperator.GET_PROPERTY,
call.superQualifier) call.superQualifier)
} ?: IrGetBackingFieldImpl(startOffset, endOffset, descriptor, } ?: IrGetFieldImpl(startOffset, endOffset, descriptor,
dispatchReceiverValue?.load(), dispatchReceiverValue?.load(),
IrOperator.GET_PROPERTY, call.superQualifier) IrOperator.GET_PROPERTY, call.superQualifier)
} }
} }
@@ -112,8 +112,8 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
val superClass = superTypeConstructorDescriptor as? ClassDescriptor ?: val superClass = superTypeConstructorDescriptor as? ClassDescriptor ?:
throw AssertionError("Unexpected supertype constructor for delegation: $superTypeConstructorDescriptor") throw AssertionError("Unexpected supertype constructor for delegation: $superTypeConstructorDescriptor")
val delegateDescriptor = IrImplementingDelegateDescriptorImpl(irClass.descriptor, delegateType, superType) val delegateDescriptor = IrImplementingDelegateDescriptorImpl(irClass.descriptor, delegateType, superType)
val irDelegate = IrSimplePropertyImpl(ktDelegateExpression.startOffset, ktDelegateExpression.endOffset, IrDeclarationOrigin.DELEGATE, val irDelegate = IrFieldImpl(ktDelegateExpression.startOffset, ktDelegateExpression.endOffset, IrDeclarationOrigin.DELEGATE,
delegateDescriptor) delegateDescriptor)
val bodyGenerator = BodyGenerator(irClass.descriptor, context) val bodyGenerator = BodyGenerator(irClass.descriptor, context)
irDelegate.initializer = bodyGenerator.generatePropertyInitializerBody(ktDelegateExpression) irDelegate.initializer = bodyGenerator.generatePropertyInitializerBody(ktDelegateExpression)
irClass.addMember(irDelegate) irClass.addMember(irDelegate)
@@ -126,7 +126,8 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
} }
} }
private fun generateDelegatedMember(irClass: IrClassImpl, irDelegate: IrSimplePropertyImpl, delegatedMember: CallableMemberDescriptor, overriddenMember: CallableMemberDescriptor) { private fun generateDelegatedMember(irClass: IrClassImpl, irDelegate: IrFieldImpl,
delegatedMember: CallableMemberDescriptor, overriddenMember: CallableMemberDescriptor) {
when (delegatedMember) { when (delegatedMember) {
is FunctionDescriptor -> is FunctionDescriptor ->
generateDelegatedFunction(irClass, irDelegate, delegatedMember, overriddenMember as FunctionDescriptor) generateDelegatedFunction(irClass, irDelegate, delegatedMember, overriddenMember as FunctionDescriptor)
@@ -136,15 +137,16 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
} }
private fun generateDelegatedProperty(irClass: IrClassImpl, irDelegate: IrSimplePropertyImpl, delegated: PropertyDescriptor, overridden: PropertyDescriptor) { private fun generateDelegatedProperty(irClass: IrClassImpl, irDelegate: IrFieldImpl,
val irProperty = IrSimplePropertyImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated) delegated: PropertyDescriptor, overridden: PropertyDescriptor) {
val irProperty = IrPropertyImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, false, delegated)
val irGetter = IrPropertyGetterImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated.getter!!) val irGetter = IrFunctionImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated.getter!!)
irGetter.body = generateDelegateFunctionBody(irDelegate, delegated.getter!!, overridden.getter!!) irGetter.body = generateDelegateFunctionBody(irDelegate, delegated.getter!!, overridden.getter!!)
irProperty.getter = irGetter irProperty.getter = irGetter
if (delegated.isVar) { if (delegated.isVar) {
val irSetter = IrPropertySetterImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated.setter!!) val irSetter = IrFunctionImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated.setter!!)
irSetter.body = generateDelegateFunctionBody(irDelegate, delegated.setter!!, overridden.setter!!) irSetter.body = generateDelegateFunctionBody(irDelegate, delegated.setter!!, overridden.setter!!)
irProperty.setter = irSetter irProperty.setter = irSetter
} }
@@ -152,13 +154,13 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
irClass.addMember(irProperty) irClass.addMember(irProperty)
} }
private fun generateDelegatedFunction(irClass: IrClassImpl, irDelegate: IrSimplePropertyImpl, delegated: FunctionDescriptor, overridden: FunctionDescriptor) { private fun generateDelegatedFunction(irClass: IrClassImpl, irDelegate: IrFieldImpl, delegated: FunctionDescriptor, overridden: FunctionDescriptor) {
val irFunction = IrFunctionImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated) val irFunction = IrFunctionImpl(irDelegate.startOffset, irDelegate.endOffset, IrDeclarationOrigin.DELEGATED_MEMBER, delegated)
irFunction.body = generateDelegateFunctionBody(irDelegate, delegated, overridden) irFunction.body = generateDelegateFunctionBody(irDelegate, delegated, overridden)
irClass.addMember(irFunction) irClass.addMember(irFunction)
} }
private fun generateDelegateFunctionBody(irDelegate: IrSimplePropertyImpl, delegated: FunctionDescriptor, overridden: FunctionDescriptor): IrBlockBodyImpl { private fun generateDelegateFunctionBody(irDelegate: IrFieldImpl, delegated: FunctionDescriptor, overridden: FunctionDescriptor): IrBlockBodyImpl {
val irBlockBody = IrBlockBodyImpl(irDelegate.startOffset, irDelegate.endOffset) val irBlockBody = IrBlockBodyImpl(irDelegate.startOffset, irDelegate.endOffset)
val returnType = overridden.returnType!! val returnType = overridden.returnType!!
val irCall = IrCallImpl(irDelegate.startOffset, irDelegate.endOffset, returnType, overridden) val irCall = IrCallImpl(irDelegate.startOffset, irDelegate.endOffset, returnType, overridden)
@@ -228,10 +230,12 @@ class ClassGenerator(val declarationGenerator: DeclarationGenerator) : Generator
private fun generatePropertyForPrimaryConstructorParameter(ktParameter: KtParameter): IrDeclaration { private fun generatePropertyForPrimaryConstructorParameter(ktParameter: KtParameter): IrDeclaration {
val valueParameterDescriptor = getOrFail(BindingContext.VALUE_PARAMETER, ktParameter) val valueParameterDescriptor = getOrFail(BindingContext.VALUE_PARAMETER, ktParameter)
val propertyDescriptor = getOrFail(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, ktParameter) val propertyDescriptor = getOrFail(BindingContext.PRIMARY_CONSTRUCTOR_PARAMETER, ktParameter)
val irProperty = IrSimplePropertyImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.DEFINED, propertyDescriptor) val irProperty = IrPropertyImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.DEFINED, false, propertyDescriptor)
val irField = IrFieldImpl(ktParameter.startOffset, ktParameter.endOffset, IrDeclarationOrigin.PROPERTY_BACKING_FIELD, propertyDescriptor)
irProperty.backingField = irField
val irGetParameter = IrGetVariableImpl(ktParameter.startOffset, ktParameter.endOffset, val irGetParameter = IrGetVariableImpl(ktParameter.startOffset, ktParameter.endOffset,
valueParameterDescriptor, IrOperator.INITIALIZE_PROPERTY_FROM_PARAMETER) valueParameterDescriptor, IrOperator.INITIALIZE_PROPERTY_FROM_PARAMETER)
irProperty.initializer = IrExpressionBodyImpl(ktParameter.startOffset, ktParameter.endOffset, irGetParameter) irField.initializer = IrExpressionBodyImpl(ktParameter.startOffset, ktParameter.endOffset, irGetParameter)
return irProperty return irProperty
} }
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.declarations.impl.* import org.jetbrains.kotlin.ir.declarations.impl.*
import org.jetbrains.kotlin.ir.expressions.IrBody import org.jetbrains.kotlin.ir.expressions.IrBody
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
import org.jetbrains.kotlin.ir.expressions.impl.*
import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.endOffset
import org.jetbrains.kotlin.psi.psiUtil.startOffset import org.jetbrains.kotlin.psi.psiUtil.startOffset
@@ -74,7 +75,7 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
return irAnonymousInitializer return irAnonymousInitializer
} }
fun generateFunctionDeclaration(ktFunction: KtNamedFunction): IrGeneralFunction { fun generateFunctionDeclaration(ktFunction: KtNamedFunction): IrFunction {
val functionDescriptor = getOrFail(BindingContext.FUNCTION, ktFunction) val functionDescriptor = getOrFail(BindingContext.FUNCTION, ktFunction)
val irFunction = IrFunctionImpl(ktFunction.startOffset, ktFunction.endOffset, IrDeclarationOrigin.DEFINED, functionDescriptor) val irFunction = IrFunctionImpl(ktFunction.startOffset, ktFunction.endOffset, IrDeclarationOrigin.DEFINED, functionDescriptor)
val bodyGenerator = createBodyGenerator(functionDescriptor) val bodyGenerator = createBodyGenerator(functionDescriptor)
@@ -83,7 +84,7 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
return irFunction return irFunction
} }
fun generateSecondaryConstructor(ktConstructor: KtSecondaryConstructor) : IrGeneralFunction { fun generateSecondaryConstructor(ktConstructor: KtSecondaryConstructor): IrFunction {
if (ktConstructor.isConstructorDelegatingToSuper(context.bindingContext)) { if (ktConstructor.isConstructorDelegatingToSuper(context.bindingContext)) {
return generateSecondaryConstructorWithNestedInitializers(ktConstructor) return generateSecondaryConstructorWithNestedInitializers(ktConstructor)
} }
@@ -96,7 +97,7 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
} }
private fun generateSecondaryConstructorWithNestedInitializers(ktConstructor: KtSecondaryConstructor): IrGeneralFunction { private fun generateSecondaryConstructorWithNestedInitializers(ktConstructor: KtSecondaryConstructor): IrFunction {
val constructorDescriptor = getOrFail(BindingContext.CONSTRUCTOR, ktConstructor) val constructorDescriptor = getOrFail(BindingContext.CONSTRUCTOR, ktConstructor)
val irConstructor = IrConstructorImpl(ktConstructor.startOffset, ktConstructor.endOffset, IrDeclarationOrigin.DEFINED, constructorDescriptor) val irConstructor = IrConstructorImpl(ktConstructor.startOffset, ktConstructor.endOffset, IrDeclarationOrigin.DEFINED, constructorDescriptor)
val bodyGenerator = createBodyGenerator(constructorDescriptor) val bodyGenerator = createBodyGenerator(constructorDescriptor)
@@ -120,30 +121,87 @@ class DeclarationGenerator(override val context: GeneratorContext) : Generator {
return DelegatedPropertyGenerator(context).generateDelegatedProperty(ktProperty, ktDelegate, propertyDescriptor, irDelegateInitializer) return DelegatedPropertyGenerator(context).generateDelegatedProperty(ktProperty, ktDelegate, propertyDescriptor, irDelegateInitializer)
} }
private fun generateSimpleProperty(ktProperty: KtProperty, propertyDescriptor: PropertyDescriptor): IrSimplePropertyImpl { private fun generateSimpleProperty(ktProperty: KtProperty, propertyDescriptor: PropertyDescriptor): IrProperty {
val initializer = ktProperty.initializer?.let { generateInitializerBody(propertyDescriptor, it) } val irProperty = IrPropertyImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFINED, false, propertyDescriptor)
val irProperty = IrSimplePropertyImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFINED,
propertyDescriptor, initializer) val irField = if (propertyDescriptor.hasBackingField()) {
IrFieldImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.PROPERTY_BACKING_FIELD, propertyDescriptor,
ktProperty.initializer?.let { generateInitializerBody(propertyDescriptor, it) })
}
else null
irProperty.backingField = irField
irProperty.getter = ktProperty.getter?.let { ktGetter -> irProperty.getter = ktProperty.getter?.let { ktGetter ->
val accessorDescriptor = getOrFail(BindingContext.PROPERTY_ACCESSOR, ktGetter) val accessorDescriptor = getOrFail(BindingContext.PROPERTY_ACCESSOR, ktGetter)
val getterDescriptor = accessorDescriptor as? PropertyGetterDescriptor ?: TODO("not a getter?") val getterDescriptor = accessorDescriptor as? PropertyGetterDescriptor ?: TODO("not a getter?")
val irGetter = IrPropertyGetterImpl(ktGetter.startOffset, ktGetter.endOffset, IrDeclarationOrigin.DEFINED, getterDescriptor) val irGetter = IrFunctionImpl(ktGetter.startOffset, ktGetter.endOffset, IrDeclarationOrigin.DEFINED, getterDescriptor)
irGetter.body = ktGetter.bodyExpression?.let { generateFunctionBody(getterDescriptor, it ) } irGetter.body = ktGetter.bodyExpression?.let { generateFunctionBody(getterDescriptor, it ) }
irGetter irGetter
} } ?: generateDefaultGetterIfRequired(ktProperty, irField)
irProperty.setter = ktProperty.setter?.let { ktSetter -> irProperty.setter = ktProperty.setter?.let { ktSetter ->
val accessorDescriptor = getOrFail(BindingContext.PROPERTY_ACCESSOR, ktSetter) val accessorDescriptor = getOrFail(BindingContext.PROPERTY_ACCESSOR, ktSetter)
val setterDescriptor = accessorDescriptor as? PropertySetterDescriptor ?: TODO("not a setter?") val setterDescriptor = accessorDescriptor as? PropertySetterDescriptor ?: TODO("not a setter?")
val irSetter = IrPropertySetterImpl(ktSetter.startOffset, ktSetter.endOffset, IrDeclarationOrigin.DEFINED, setterDescriptor) val irSetter = IrFunctionImpl(ktSetter.startOffset, ktSetter.endOffset, IrDeclarationOrigin.DEFINED, setterDescriptor)
irSetter.body = ktSetter.bodyExpression?.let { generateFunctionBody(setterDescriptor, it ) } irSetter.body = ktSetter.bodyExpression?.let { generateFunctionBody(setterDescriptor, it ) }
irSetter irSetter
} } ?: generateDefaultSetterIfRequired(ktProperty, irField)
return irProperty return irProperty
} }
private fun PropertyDescriptor.hasBackingField(): Boolean =
get(BindingContext.BACKING_FIELD_REQUIRED, this) ?: false
private fun generateDefaultGetterIfRequired(ktProperty: KtProperty, irField: IrField?): IrFunction? {
if (irField == null) return null
val property = irField.descriptor
val getter = property.getter ?: return null
val irGetter = IrFunctionImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, getter)
val irBody = IrBlockBodyImpl(ktProperty.startOffset, ktProperty.endOffset)
irGetter.body = irBody
val containingDeclaration = property.containingDeclaration
val receiver =
if (containingDeclaration is ClassDescriptor)
IrThisReferenceImpl(ktProperty.startOffset, ktProperty.endOffset, containingDeclaration.defaultType,
containingDeclaration)
else
null
irBody.addStatement(IrReturnImpl(ktProperty.startOffset, ktProperty.endOffset, context.builtIns.nothingType, getter,
IrGetFieldImpl(ktProperty.startOffset, ktProperty.endOffset, property, receiver)))
return irGetter
}
private fun generateDefaultSetterIfRequired(ktProperty: KtProperty, irField: IrField?): IrFunction? {
if (irField == null) return null
val property = irField.descriptor
if (!property.isVar) return null
val setter = property.setter ?: return null
val irSetter = IrFunctionImpl(ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR, setter)
val irBody = IrBlockBodyImpl(ktProperty.startOffset, ktProperty.endOffset)
irSetter.body = irBody
val containingDeclaration = property.containingDeclaration
val receiver =
if (containingDeclaration is ClassDescriptor)
IrThisReferenceImpl(ktProperty.startOffset, ktProperty.endOffset, containingDeclaration.defaultType,
containingDeclaration)
else
null
val setterParameter = setter.valueParameters.single()
irBody.addStatement(IrSetFieldImpl(ktProperty.startOffset, ktProperty.endOffset, property, receiver,
IrGetVariableImpl(ktProperty.startOffset, ktProperty.endOffset, setterParameter)))
return irSetter
}
private fun getPropertyDescriptor(ktProperty: KtProperty): PropertyDescriptor { private fun getPropertyDescriptor(ktProperty: KtProperty): PropertyDescriptor {
val variableDescriptor = getOrFail(BindingContext.VARIABLE, ktProperty) val variableDescriptor = getOrFail(BindingContext.VARIABLE, ktProperty)
@@ -46,20 +46,20 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener
ktDelegate: KtPropertyDelegate, ktDelegate: KtPropertyDelegate,
propertyDescriptor: PropertyDescriptor, propertyDescriptor: PropertyDescriptor,
irDelegateInitializer: IrExpressionBody irDelegateInitializer: IrExpressionBody
): IrDelegatedProperty { ): IrProperty {
val delegateDescriptor = createPropertyDelegateDescriptor(ktDelegate, propertyDescriptor) val delegateDescriptor = createPropertyDelegateDescriptor(ktDelegate, propertyDescriptor)
val irDelegate = IrSimplePropertyImpl( val irDelegate = IrFieldImpl(
ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATE, ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATE,
delegateDescriptor, irDelegateInitializer) delegateDescriptor, irDelegateInitializer)
val irProperty = IrDelegatedPropertyImpl( val irProperty = IrPropertyImpl(
ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFINED, ktProperty.startOffset, ktProperty.endOffset, IrDeclarationOrigin.DEFINED, true,
propertyDescriptor, irDelegate) propertyDescriptor, irDelegate)
val delegateReceiverValue = createBackingFieldValueForDelegate(delegateDescriptor, ktDelegate) val delegateReceiverValue = createBackingFieldValueForDelegate(delegateDescriptor, ktDelegate)
val getterDescriptor = propertyDescriptor.getter!! val getterDescriptor = propertyDescriptor.getter!!
irProperty.getter = IrPropertyGetterImpl( irProperty.getter = IrFunctionImpl(
ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR, ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR,
getterDescriptor, getterDescriptor,
generateDelegatedPropertyGetterBody( generateDelegatedPropertyGetterBody(
@@ -68,7 +68,7 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener
if (propertyDescriptor.isVar) { if (propertyDescriptor.isVar) {
val setterDescriptor = propertyDescriptor.setter!! val setterDescriptor = propertyDescriptor.setter!!
irProperty.setter = IrPropertySetterImpl( irProperty.setter = IrFunctionImpl(
ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR, ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR,
setterDescriptor, setterDescriptor,
generateDelegatedPropertySetterBody( generateDelegatedPropertySetterBody(
@@ -89,14 +89,14 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener
private fun createCallableReference(ktElement: KtElement, type: KotlinType, referencedDescriptor: CallableDescriptor): IrCallableReference = private fun createCallableReference(ktElement: KtElement, type: KotlinType, referencedDescriptor: CallableDescriptor): IrCallableReference =
IrCallableReferenceImpl(ktElement.startOffset, ktElement.endOffset, type, IrCallableReferenceImpl(ktElement.startOffset, ktElement.endOffset, type,
referencedDescriptor, IrOperator.PROPERTY_REFERENCE_FOR_DELEGATE) referencedDescriptor, IrOperator.PROPERTY_REFERENCE_FOR_DELEGATE)
fun generateLocalDelegatedProperty( fun generateLocalDelegatedProperty(
ktProperty: KtProperty, ktProperty: KtProperty,
ktDelegate: KtPropertyDelegate, ktDelegate: KtPropertyDelegate,
variableDescriptor: VariableDescriptorWithAccessors, variableDescriptor: VariableDescriptorWithAccessors,
irDelegateInitializer: IrExpression irDelegateInitializer: IrExpression
) : IrLocalDelegatedProperty { ): IrLocalDelegatedProperty {
val delegateDescriptor = createLocalPropertyDelegatedDescriptor(ktDelegate, variableDescriptor) val delegateDescriptor = createLocalPropertyDelegatedDescriptor(ktDelegate, variableDescriptor)
val irDelegate = IrVariableImpl( val irDelegate = IrVariableImpl(
@@ -132,8 +132,8 @@ class DelegatedPropertyGenerator(override val context: GeneratorContext) : Gener
VariableLValue(ktDelegate.startOffset, ktDelegate.endOffset, delegateDescriptor) VariableLValue(ktDelegate.startOffset, ktDelegate.endOffset, delegateDescriptor)
private fun createLocalPropertyAccessor(getterDescriptor: VariableAccessorDescriptor, ktDelegate: KtPropertyDelegate, body: IrBody) = private fun createLocalPropertyAccessor(getterDescriptor: VariableAccessorDescriptor, ktDelegate: KtPropertyDelegate, body: IrBody) =
IrLocalPropertyAccessorImpl(ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR, IrFunctionImpl(ktDelegate.startOffset, ktDelegate.endOffset, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR,
getterDescriptor, body) getterDescriptor, body)
private fun createLocalPropertyDelegatedDescriptor( private fun createLocalPropertyDelegatedDescriptor(
ktDelegate: KtPropertyDelegate, ktDelegate: KtPropertyDelegate,
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.psi2ir.generators
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrGeneralFunction import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl import org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrCallableReferenceImpl import org.jetbrains.kotlin.ir.expressions.impl.IrCallableReferenceImpl
@@ -64,7 +64,7 @@ class LocalFunctionGenerator(statementGenerator: StatementGenerator) : Statement
irBlock irBlock
} }
private fun generateFunctionDeclaration(ktFun: KtNamedFunction): IrGeneralFunction { private fun generateFunctionDeclaration(ktFun: KtNamedFunction): IrFunction {
val funDescriptor = getOrFail(BindingContext.FUNCTION, ktFun) val funDescriptor = getOrFail(BindingContext.FUNCTION, ktFun)
val irFun = IrFunctionImpl(ktFun.startOffset, ktFun.endOffset, IrDeclarationOrigin.DEFINED, funDescriptor) val irFun = IrFunctionImpl(ktFun.startOffset, ktFun.endOffset, IrDeclarationOrigin.DEFINED, funDescriptor)
irFun.body = BodyGenerator(funDescriptor, statementGenerator.context).generateFunctionBody(ktFun.bodyExpression!!) irFun.body = BodyGenerator(funDescriptor, statementGenerator.context).generateFunctionBody(ktFun.bodyExpression!!)
@@ -18,8 +18,8 @@ package org.jetbrains.kotlin.psi2ir.intermediate
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.expressions.impl.IrGetBackingFieldImpl import org.jetbrains.kotlin.ir.expressions.impl.IrGetFieldImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrSetBackingFieldImpl import org.jetbrains.kotlin.ir.expressions.impl.IrSetFieldImpl
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
class BackingFieldLValue( class BackingFieldLValue(
@@ -32,10 +32,10 @@ class BackingFieldLValue(
override val type: KotlinType get() = descriptor.type override val type: KotlinType get() = descriptor.type
override fun store(irExpression: IrExpression): IrExpression = override fun store(irExpression: IrExpression): IrExpression =
IrSetBackingFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), irExpression, operator) IrSetFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), irExpression, operator)
override fun load(): IrExpression = override fun load(): IrExpression =
IrGetBackingFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), operator) IrGetFieldImpl(startOffset, endOffset, descriptor, receiver?.load(), operator)
override fun assign(withLValue: (LValue) -> IrExpression): IrExpression = override fun assign(withLValue: (LValue) -> IrExpression): IrExpression =
withLValue(this) withLValue(this)
@@ -44,8 +44,8 @@ class SimplePropertyLValue(
extensionReceiverValue?.load(), extensionReceiverValue?.load(),
irOperator, irOperator,
superQualifier) superQualifier)
} ?: IrGetBackingFieldImpl(startOffset, endOffset, descriptor, } ?: IrGetFieldImpl(startOffset, endOffset, descriptor,
dispatchReceiverValue?.load(), irOperator, superQualifier) dispatchReceiverValue?.load(), irOperator, superQualifier)
} }
override fun store(irExpression: IrExpression) = override fun store(irExpression: IrExpression) =
@@ -57,8 +57,8 @@ class SimplePropertyLValue(
irExpression, irExpression,
irOperator, irOperator,
superQualifier) superQualifier)
} ?: IrSetBackingFieldImpl(startOffset, endOffset, descriptor, } ?: IrSetFieldImpl(startOffset, endOffset, descriptor,
dispatchReceiverValue?.load(), irExpression, irOperator, superQualifier) dispatchReceiverValue?.load(), irExpression, irOperator, superQualifier)
} }
override fun assign(withLValue: (LValue) -> IrExpression) = override fun assign(withLValue: (LValue) -> IrExpression) =
@@ -79,7 +79,7 @@ class InsertImplicitCasts(val builtIns: KotlinBuiltIns): IrElementVisitorVoid {
expression.value.replaceWithCast(expression.descriptor.type) expression.value.replaceWithCast(expression.descriptor.type)
} }
override fun visitSetBackingField(expression: IrSetBackingField) { override fun visitSetBackingField(expression: IrSetField) {
expression.acceptChildrenVoid(this) expression.acceptChildrenVoid(this)
expression.value.replaceWithCast(expression.descriptor.type) expression.value.replaceWithCast(expression.descriptor.type)
@@ -44,6 +44,7 @@ const val TRY_RESULT_SLOT = -13
const val FINALLY_EXPRESSION_SLOT = -14 const val FINALLY_EXPRESSION_SLOT = -14
const val PROPERTY_GETTER_SLOT = -15 const val PROPERTY_GETTER_SLOT = -15
const val PROPERTY_SETTER_SLOT = -16 const val PROPERTY_SETTER_SLOT = -16
const val DELEGATE_SLOT = -17 const val BACKING_FIELD_SLOT = -17
const val ENUM_ENTRY_CLASS_SLOT = -18 const val ENUM_ENTRY_CLASS_SLOT = -18
const val ENUM_ENTRY_INITIALIZER_SLOT = -19 const val ENUM_ENTRY_INITIALIZER_SLOT = -19
const val LOCAL_DELEGATE_SLOT = -20
@@ -32,10 +32,10 @@ fun IrClass.getInstanceInitializerMembers() =
when (it) { when (it) {
is IrAnonymousInitializer -> is IrAnonymousInitializer ->
true true
is IrSimpleProperty -> is IrProperty ->
it.backingField?.initializer != null
is IrField ->
it.initializer != null it.initializer != null
is IrDelegatedProperty ->
true
else -> false else -> false
} }
} }
@@ -33,6 +33,7 @@ enum class IrDeclarationKind {
FUNCTION, FUNCTION,
CONSTRUCTOR, CONSTRUCTOR,
PROPERTY, PROPERTY,
FIELD,
PROPERTY_ACCESSOR, PROPERTY_ACCESSOR,
VARIABLE, VARIABLE,
LOCAL_PROPERTY, LOCAL_PROPERTY,
@@ -44,6 +45,8 @@ enum class IrDeclarationKind {
enum class IrDeclarationOrigin { enum class IrDeclarationOrigin {
DEFINED, DEFINED,
PROPERTY_BACKING_FIELD,
DEFAULT_PROPERTY_ACCESSOR,
DELEGATE, DELEGATE,
DELEGATED_PROPERTY_ACCESSOR, DELEGATED_PROPERTY_ACCESSOR,
DELEGATED_MEMBER, DELEGATED_MEMBER,
@@ -21,15 +21,13 @@ import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
import org.jetbrains.kotlin.ir.expressions.IrBody import org.jetbrains.kotlin.ir.expressions.IrBody
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
interface IrGeneralFunction : IrDeclaration { interface IrFunction : IrDeclaration {
override val descriptor: FunctionDescriptor override val descriptor: FunctionDescriptor
var body: IrBody? var body: IrBody?
override val declarationKind: IrDeclarationKind override val declarationKind: IrDeclarationKind
get() = IrDeclarationKind.FUNCTION get() = IrDeclarationKind.FUNCTION
}
interface IrFunction : IrGeneralFunction {
fun putDefault(parameter: ValueParameterDescriptor, expressionBody: IrExpressionBody) fun putDefault(parameter: ValueParameterDescriptor, expressionBody: IrExpressionBody)
fun getDefault(parameter: ValueParameterDescriptor): IrExpressionBody? fun getDefault(parameter: ValueParameterDescriptor): IrExpressionBody?
} }
@@ -22,17 +22,9 @@ import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors
interface IrLocalDelegatedProperty : IrDeclaration { interface IrLocalDelegatedProperty : IrDeclaration {
override val descriptor: VariableDescriptorWithAccessors override val descriptor: VariableDescriptorWithAccessors
var delegate: IrVariable var delegate: IrVariable
var getter: IrLocalPropertyAccessor var getter: IrFunction
var setter: IrLocalPropertyAccessor? var setter: IrFunction?
override val declarationKind: IrDeclarationKind override val declarationKind: IrDeclarationKind
get() = IrDeclarationKind.LOCAL_PROPERTY get() = IrDeclarationKind.LOCAL_PROPERTY
} }
interface IrLocalPropertyAccessor : IrGeneralFunction {
override val descriptor: VariableAccessorDescriptor
override val declarationKind: IrDeclarationKind
get() = IrDeclarationKind.LOCAL_PROPERTY_ACCESSOR
}
@@ -17,22 +17,24 @@
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.expressions.IrBody import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
interface IrProperty : IrDeclaration { interface IrProperty : IrDeclaration {
override val descriptor: PropertyDescriptor override val descriptor: PropertyDescriptor
var getter: IrPropertyGetter? val isDelegated: Boolean
var setter: IrPropertySetter? var backingField: IrField?
var getter: IrFunction?
var setter: IrFunction?
override val declarationKind: IrDeclarationKind override val declarationKind: IrDeclarationKind
get() = IrDeclarationKind.PROPERTY get() = IrDeclarationKind.PROPERTY
} }
interface IrSimpleProperty : IrProperty { interface IrField : IrDeclaration {
var initializer: IrBody? override val descriptor: PropertyDescriptor
}
interface IrDelegatedProperty : IrProperty { override val declarationKind: IrDeclarationKind
var delegate: IrSimpleProperty get() = IrDeclarationKind.FIELD
}
var initializer: IrExpressionBody?
}
@@ -1,39 +0,0 @@
/*
* Copyright 2010-2016 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
import org.jetbrains.kotlin.descriptors.PropertyAccessorDescriptor
import org.jetbrains.kotlin.descriptors.PropertyGetterDescriptor
import org.jetbrains.kotlin.descriptors.PropertySetterDescriptor
interface IrPropertyAccessor : IrGeneralFunction {
override val descriptor: PropertyAccessorDescriptor
override val declarationKind: IrDeclarationKind
get() = IrDeclarationKind.PROPERTY_ACCESSOR
}
interface IrPropertyGetter : IrPropertyAccessor {
override val descriptor: PropertyGetterDescriptor
}
interface IrPropertySetter : IrPropertyAccessor {
override val descriptor: PropertySetterDescriptor
}
@@ -1,72 +0,0 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrDelegatedProperty
import org.jetbrains.kotlin.ir.declarations.IrSimpleProperty
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrDelegatedPropertyImpl(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: PropertyDescriptor
) : IrPropertyBase(startOffset, endOffset, origin, descriptor), IrDelegatedProperty {
constructor(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: PropertyDescriptor,
delegate: IrSimpleProperty
) : this(startOffset, endOffset, origin, descriptor) {
this.delegate = delegate
}
private var delegateImpl: IrSimpleProperty? = null
override var delegate: IrSimpleProperty
get() = delegateImpl!!
set(value) {
delegateImpl?.detach()
delegateImpl = value
value.setTreeLocation(this, DELEGATE_SLOT)
}
override fun getChild(slot: Int): IrElement? =
when (slot) {
DELEGATE_SLOT -> delegate
else -> super.getChild(slot)
}
override fun replaceChild(slot: Int, newChild: IrElement) {
when (slot) {
DELEGATE_SLOT -> delegate = newChild.assertCast()
else -> super.replaceChild(slot, newChild)
}
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitDelegatedProperty(this, data)
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
delegate.accept(visitor, data)
getter?.accept(visitor, data)
setter?.accept(visitor, data)
}
}
@@ -19,18 +19,24 @@ package org.jetbrains.kotlin.ir.declarations.impl
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrSimpleProperty import org.jetbrains.kotlin.ir.declarations.IrField
import org.jetbrains.kotlin.ir.expressions.IrBody import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrSimplePropertyImpl(
class IrFieldImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
origin: IrDeclarationOrigin, origin: IrDeclarationOrigin,
descriptor: PropertyDescriptor, override val descriptor: PropertyDescriptor
valueInitializer: IrBody? = null ): IrDeclarationBase(startOffset, endOffset, origin), IrField {
) : IrPropertyBase(startOffset, endOffset, origin, descriptor), IrSimpleProperty { constructor(startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, descriptor: PropertyDescriptor,
override var initializer: IrBody? = valueInitializer initializer: IrExpressionBody?
) : this(startOffset, endOffset, origin, descriptor) {
this.initializer = initializer
}
override var initializer: IrExpressionBody? = null
set(value) { set(value) {
field?.detach() field?.detach()
field = value field = value
@@ -40,22 +46,21 @@ class IrSimplePropertyImpl(
override fun getChild(slot: Int): IrElement? = override fun getChild(slot: Int): IrElement? =
when (slot) { when (slot) {
INITIALIZER_SLOT -> initializer INITIALIZER_SLOT -> initializer
else -> super.getChild(slot) else -> null
} }
override fun replaceChild(slot: Int, newChild: IrElement) { override fun replaceChild(slot: Int, newChild: IrElement) {
when (slot) { when (slot) {
INITIALIZER_SLOT -> initializer = newChild.assertCast() INITIALIZER_SLOT -> initializer = newChild.assertCast()
else -> super.replaceChild(slot, newChild) else -> throwNoSuchSlot(slot)
} }
} }
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
visitor.visitSimpleProperty(this, data) return visitor.visitField(this, data)
}
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
initializer?.accept(visitor, data) initializer?.accept(visitor, data)
getter?.accept(visitor, data)
setter?.accept(visitor, data)
} }
} }
@@ -18,8 +18,7 @@ package org.jetbrains.kotlin.ir.declarations.impl
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrGeneralFunction import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase
import org.jetbrains.kotlin.ir.expressions.IrBody import org.jetbrains.kotlin.ir.expressions.IrBody
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
@@ -27,16 +26,7 @@ abstract class IrGeneralFunctionBase(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
origin: IrDeclarationOrigin origin: IrDeclarationOrigin
) : IrDeclarationBase(startOffset, endOffset, origin), IrGeneralFunction { ) : IrDeclarationBase(startOffset, endOffset, origin), IrFunction {
constructor(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
body: IrBody
) : this(startOffset, endOffset, origin) {
this.body = body
}
final override var body: IrBody? = null final override var body: IrBody? = null
set(newValue) { set(newValue) {
field?.detach() field?.detach()
@@ -18,10 +18,7 @@ package org.jetbrains.kotlin.ir.declarations.impl
import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.declarations.IrLocalDelegatedProperty
import org.jetbrains.kotlin.ir.declarations.IrLocalPropertyAccessor
import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase import org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
@@ -47,11 +44,11 @@ class IrLocalDelegatedPropertyImpl(
set(value) { set(value) {
delegateImpl?.detach() delegateImpl?.detach()
delegateImpl = value delegateImpl = value
value.setTreeLocation(this, DELEGATE_SLOT) value.setTreeLocation(this, LOCAL_DELEGATE_SLOT)
} }
private var getterImpl: IrLocalPropertyAccessor? = null private var getterImpl: IrFunction? = null
override var getter: IrLocalPropertyAccessor override var getter: IrFunction
get() = getterImpl!! get() = getterImpl!!
set(value) { set(value) {
getterImpl?.detach() getterImpl?.detach()
@@ -59,7 +56,7 @@ class IrLocalDelegatedPropertyImpl(
value.setTreeLocation(this, PROPERTY_GETTER_SLOT) value.setTreeLocation(this, PROPERTY_GETTER_SLOT)
} }
override var setter: IrLocalPropertyAccessor? = null override var setter: IrFunction? = null
set(value) { set(value) {
field?.detach() field?.detach()
field = value field = value
@@ -68,7 +65,7 @@ class IrLocalDelegatedPropertyImpl(
override fun getChild(slot: Int): IrElement? = override fun getChild(slot: Int): IrElement? =
when (slot) { when (slot) {
DELEGATE_SLOT -> delegate LOCAL_DELEGATE_SLOT -> delegate
PROPERTY_GETTER_SLOT -> getter PROPERTY_GETTER_SLOT -> getter
PROPERTY_SETTER_SLOT -> setter PROPERTY_SETTER_SLOT -> setter
else -> null else -> null
@@ -76,7 +73,7 @@ class IrLocalDelegatedPropertyImpl(
override fun replaceChild(slot: Int, newChild: IrElement) { override fun replaceChild(slot: Int, newChild: IrElement) {
when (slot) { when (slot) {
DELEGATE_SLOT -> delegate = newChild.assertCast() LOCAL_DELEGATE_SLOT -> delegate = newChild.assertCast()
PROPERTY_GETTER_SLOT -> getter = newChild.assertCast() PROPERTY_GETTER_SLOT -> getter = newChild.assertCast()
PROPERTY_SETTER_SLOT -> setter = newChild.assertCast() PROPERTY_SETTER_SLOT -> setter = newChild.assertCast()
else -> throwNoSuchSlot(slot) else -> throwNoSuchSlot(slot)
@@ -1,44 +0,0 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.descriptors.VariableAccessorDescriptor
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrLocalPropertyAccessor
import org.jetbrains.kotlin.ir.expressions.IrBody
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrLocalPropertyAccessorImpl(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
override val descriptor: VariableAccessorDescriptor
) : IrGeneralFunctionBase(startOffset, endOffset, origin), IrLocalPropertyAccessor {
constructor(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: VariableAccessorDescriptor,
body: IrBody
) : this(startOffset, endOffset, origin, descriptor) {
this.body = body
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitLocalPropertyAccessor(this, data)
}
}
@@ -1,26 +0,0 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrPropertyAccessor
abstract class IrPropertyAccessorBase(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin
) : IrGeneralFunctionBase(startOffset, endOffset, origin), IrPropertyAccessor
@@ -1,61 +0,0 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrProperty
import org.jetbrains.kotlin.ir.declarations.IrPropertyGetter
import org.jetbrains.kotlin.ir.declarations.IrPropertySetter
import org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase
abstract class IrPropertyBase(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
override val descriptor: PropertyDescriptor
) : IrDeclarationBase(startOffset, endOffset, origin), IrProperty {
override var getter: IrPropertyGetter? = null
set(newGetter) {
field?.detach()
field = newGetter
newGetter?.setTreeLocation(this, PROPERTY_GETTER_SLOT)
}
override var setter: IrPropertySetter? = null
set(newSetter) {
field?.detach()
field = newSetter
newSetter?.setTreeLocation(this, PROPERTY_SETTER_SLOT)
}
override fun getChild(slot: Int): IrElement? =
when (slot) {
PROPERTY_GETTER_SLOT -> getter
PROPERTY_SETTER_SLOT -> setter
else -> null
}
override fun replaceChild(slot: Int, newChild: IrElement) {
when (slot) {
PROPERTY_GETTER_SLOT -> getter = newChild.assertCast()
PROPERTY_SETTER_SLOT -> setter = newChild.assertCast()
else -> throwNoSuchSlot(slot)
}
}
}
@@ -1,43 +0,0 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.descriptors.PropertyGetterDescriptor
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrPropertyGetter
import org.jetbrains.kotlin.ir.expressions.IrBody
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrPropertyGetterImpl(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
override val descriptor: PropertyGetterDescriptor
) : IrPropertyAccessorBase(startOffset, endOffset, origin), IrPropertyGetter {
constructor(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: PropertyGetterDescriptor,
body: IrBody
) : this(startOffset, endOffset, origin, descriptor) {
this.body = body
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitPropertyGetter(this, data)
}
@@ -0,0 +1,96 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrField
import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.declarations.IrProperty
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrPropertyImpl(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
override val isDelegated: Boolean,
override val descriptor: PropertyDescriptor
) : IrDeclarationBase(startOffset, endOffset, origin), IrProperty {
constructor(
startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, isDelegated: Boolean, descriptor: PropertyDescriptor,
backingField: IrField?
) : this(startOffset, endOffset, origin, isDelegated, descriptor) {
this.backingField = backingField
}
constructor(
startOffset: Int, endOffset: Int, origin: IrDeclarationOrigin, isDelegated: Boolean, descriptor: PropertyDescriptor,
backingField: IrField?, getter: IrFunction?, setter: IrFunction?
) : this(startOffset, endOffset, origin, isDelegated, descriptor, backingField) {
this.getter = getter
this.setter = setter
}
override var backingField: IrField? = null
set(value) {
field?.detach()
field = value
value?.setTreeLocation(this, BACKING_FIELD_SLOT)
}
override var getter: IrFunction? = null
set(value) {
field?.detach()
field = value
value?.setTreeLocation(this, PROPERTY_GETTER_SLOT)
}
override var setter: IrFunction? = null
set(value) {
field?.detach()
field = value
value?.setTreeLocation(this, PROPERTY_SETTER_SLOT)
}
override fun getChild(slot: Int): IrElement? =
when (slot) {
BACKING_FIELD_SLOT -> backingField
PROPERTY_GETTER_SLOT -> getter
PROPERTY_SETTER_SLOT -> setter
else -> null
}
override fun replaceChild(slot: Int, newChild: IrElement) {
when (slot) {
BACKING_FIELD_SLOT -> backingField = newChild.assertCast()
PROPERTY_GETTER_SLOT -> getter = newChild.assertCast()
PROPERTY_SETTER_SLOT -> setter = newChild.assertCast()
else -> throwNoSuchSlot(slot)
}
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitProperty(this, data)
}
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
backingField?.accept(visitor, data)
getter?.accept(visitor, data)
setter?.accept(visitor, data)
}
}
@@ -1,43 +0,0 @@
/*
* Copyright 2010-2016 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.impl
import org.jetbrains.kotlin.descriptors.PropertySetterDescriptor
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrPropertySetter
import org.jetbrains.kotlin.ir.expressions.IrBody
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrPropertySetterImpl(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
override val descriptor: PropertySetterDescriptor
) : IrPropertyAccessorBase(startOffset, endOffset, origin), IrPropertySetter {
constructor(
startOffset: Int,
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: PropertySetterDescriptor,
body: IrBody
) : this(startOffset, endOffset, origin, descriptor) {
this.body = body
}
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitPropertySetter(this, data)
}
@@ -19,15 +19,15 @@ package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
interface IrBackingFieldExpression : IrDeclarationReference { interface IrFieldExpression : IrDeclarationReference {
override val descriptor: PropertyDescriptor override val descriptor: PropertyDescriptor
val superQualifier: ClassDescriptor? val superQualifier: ClassDescriptor?
var receiver: IrExpression? var receiver: IrExpression?
val operator: IrOperator? val operator: IrOperator?
} }
interface IrGetBackingField : IrBackingFieldExpression interface IrGetField : IrFieldExpression
interface IrSetBackingField : IrBackingFieldExpression { interface IrSetField : IrFieldExpression {
var value: IrExpression var value: IrExpression
} }
@@ -19,19 +19,19 @@ package org.jetbrains.kotlin.ir.expressions.impl
import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrBackingFieldExpression import org.jetbrains.kotlin.ir.expressions.IrFieldExpression
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrOperator
import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.KotlinType
abstract class IrBackingFieldExpressionBase( abstract class IrFieldExpressionBase(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
descriptor: PropertyDescriptor, descriptor: PropertyDescriptor,
type: KotlinType, type: KotlinType,
override val operator: IrOperator? = null, override val operator: IrOperator? = null,
override val superQualifier: ClassDescriptor? = null override val superQualifier: ClassDescriptor? = null
) : IrDeclarationReferenceBase<PropertyDescriptor>(startOffset, endOffset, type, descriptor), IrBackingFieldExpression { ) : IrDeclarationReferenceBase<PropertyDescriptor>(startOffset, endOffset, type, descriptor), IrFieldExpression {
override final var receiver: IrExpression? = null override final var receiver: IrExpression? = null
set(value) { set(value) {
field?.detach() field?.detach()
@@ -20,17 +20,17 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrGetBackingField import org.jetbrains.kotlin.ir.expressions.IrGetField
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrOperator
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
class IrGetBackingFieldImpl( class IrGetFieldImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
descriptor: PropertyDescriptor, descriptor: PropertyDescriptor,
operator: IrOperator? = null, operator: IrOperator? = null,
superQualifier: ClassDescriptor? = null superQualifier: ClassDescriptor? = null
) : IrBackingFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type, operator, superQualifier), IrGetBackingField { ) : IrFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type, operator, superQualifier), IrGetField {
constructor( constructor(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
@@ -50,7 +50,7 @@ class IrGetBackingFieldImpl(
} }
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R { override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitGetBackingField(this, data) return visitor.visitGetField(this, data)
} }
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
@@ -21,18 +21,18 @@ import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.ir.*
import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.expressions.IrOperator import org.jetbrains.kotlin.ir.expressions.IrOperator
import org.jetbrains.kotlin.ir.expressions.IrSetBackingField import org.jetbrains.kotlin.ir.expressions.IrSetField
import org.jetbrains.kotlin.ir.expressions.impl.IrBackingFieldExpressionBase import org.jetbrains.kotlin.ir.expressions.impl.IrFieldExpressionBase
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.typeUtil.builtIns import org.jetbrains.kotlin.types.typeUtil.builtIns
class IrSetBackingFieldImpl( class IrSetFieldImpl(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
descriptor: PropertyDescriptor, descriptor: PropertyDescriptor,
operator: IrOperator? = null, operator: IrOperator? = null,
superQualifier: ClassDescriptor? = null superQualifier: ClassDescriptor? = null
) : IrBackingFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type.builtIns.unitType, operator, superQualifier), IrSetBackingField { ) : IrFieldExpressionBase(startOffset, endOffset, descriptor, descriptor.type.builtIns.unitType, operator, superQualifier), IrSetField {
constructor( constructor(
startOffset: Int, startOffset: Int,
endOffset: Int, endOffset: Int,
@@ -69,7 +69,7 @@ class IrSetBackingFieldImpl(
} }
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R { override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
return visitor.visitSetBackingField(this, data) return visitor.visitSetField(this, data)
} }
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
@@ -72,14 +72,6 @@ class DumpIrTreeVisitor(out: Appendable): IrElementVisitor<Unit, String> {
visitFunctionWithParameters(declaration, data) visitFunctionWithParameters(declaration, data)
} }
override fun visitDelegatedProperty(declaration: IrDelegatedProperty, data: String) {
declaration.dumpLabeledElementWith(data) {
declaration.delegate.accept(this, "delegate")
declaration.getter?.accept(this, "")
declaration.setter?.accept(this, "")
}
}
override fun visitErrorCallExpression(expression: IrErrorCallExpression, data: String) { override fun visitErrorCallExpression(expression: IrErrorCallExpression, data: String) {
expression.dumpLabeledElementWith(data) { expression.dumpLabeledElementWith(data) {
expression.explicitReceiver?.accept(this, "receiver") expression.explicitReceiver?.accept(this, "receiver")
@@ -113,13 +105,13 @@ class DumpIrTreeVisitor(out: Appendable): IrElementVisitor<Unit, String> {
} }
} }
override fun visitGetBackingField(expression: IrGetBackingField, data: String) { override fun visitGetField(expression: IrGetField, data: String) {
expression.dumpLabeledElementWith(data) { expression.dumpLabeledElementWith(data) {
expression.receiver?.accept(this, "receiver") expression.receiver?.accept(this, "receiver")
} }
} }
override fun visitSetBackingField(expression: IrSetBackingField, data: String) { override fun visitSetField(expression: IrSetField, data: String) {
expression.dumpLabeledElementWith(data) { expression.dumpLabeledElementWith(data) {
expression.receiver?.accept(this, "receiver") expression.receiver?.accept(this, "receiver")
expression.value.accept(this, "value") expression.value.accept(this, "value")
@@ -51,11 +51,8 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
override fun visitProperty(declaration: IrProperty, data: Nothing?): String = override fun visitProperty(declaration: IrProperty, data: Nothing?): String =
"PROPERTY ${declaration.renderDeclared()}" "PROPERTY ${declaration.renderDeclared()}"
override fun visitPropertyGetter(declaration: IrPropertyGetter, data: Nothing?): String = override fun visitField(declaration: IrField, data: Nothing?): String =
"PROPERTY_GETTER ${declaration.renderDeclared()}" "FIELD ${declaration.renderDeclared()}"
override fun visitPropertySetter(declaration: IrPropertySetter, data: Nothing?): String =
"PROPERTY_SETTER ${declaration.renderDeclared()}"
override fun visitClass(declaration: IrClass, data: Nothing?): String = override fun visitClass(declaration: IrClass, data: Nothing?): String =
"CLASS ${declaration.descriptor.kind} ${declaration.descriptor.ref()}" "CLASS ${declaration.descriptor.kind} ${declaration.descriptor.ref()}"
@@ -75,9 +72,6 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?): String = override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?): String =
"LOCAL_DELEGATED_PROPERTY ${declaration.renderDeclared()}" "LOCAL_DELEGATED_PROPERTY ${declaration.renderDeclared()}"
override fun visitLocalPropertyAccessor(declaration: IrLocalPropertyAccessor, data: Nothing?): String =
"LOCAL_PROPERTY_ACCESSOR ${declaration.descriptor.ref()}" // can't render, see nullability for modality
override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): String = override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): String =
"EXPRESSION_BODY" "EXPRESSION_BODY"
@@ -140,10 +134,10 @@ class RenderIrElementVisitor : IrElementVisitor<String, Nothing?> {
override fun visitSetVariable(expression: IrSetVariable, data: Nothing?): String = override fun visitSetVariable(expression: IrSetVariable, data: Nothing?): String =
"SET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "SET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}"
override fun visitGetBackingField(expression: IrGetBackingField, data: Nothing?): String = override fun visitGetField(expression: IrGetField, data: Nothing?): String =
"GET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "GET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}"
override fun visitSetBackingField(expression: IrSetBackingField, data: Nothing?): String = override fun visitSetField(expression: IrSetField, data: Nothing?): String =
"SET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" "SET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}"
override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?): String = override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?): String =
@@ -28,16 +28,11 @@ interface IrElementVisitor<out R, in D> {
fun visitDeclaration(declaration: IrDeclaration, data: D) = visitElement(declaration, data) fun visitDeclaration(declaration: IrDeclaration, data: D) = visitElement(declaration, data)
fun visitClass(declaration: IrClass, data: D) = visitDeclaration(declaration, data) fun visitClass(declaration: IrClass, data: D) = visitDeclaration(declaration, data)
fun visitTypeAlias(declaration: IrTypeAlias, data: D) = visitDeclaration(declaration, data) fun visitTypeAlias(declaration: IrTypeAlias, data: D) = visitDeclaration(declaration, data)
fun visitGeneralFunction(declaration: IrGeneralFunction, data: D) = visitDeclaration(declaration, data) fun visitFunction(declaration: IrFunction, data: D) = visitDeclaration(declaration, data)
fun visitFunction(declaration: IrFunction, data: D) = visitGeneralFunction(declaration, data) fun visitConstructor(declaration: IrConstructor, data: D) = visitFunction(declaration, data)
fun visitPropertyGetter(declaration: IrPropertyGetter, data: D) = visitGeneralFunction(declaration, data)
fun visitPropertySetter(declaration: IrPropertySetter, data: D) = visitGeneralFunction(declaration, data)
fun visitConstructor(declaration: IrConstructor, data: D) = visitGeneralFunction(declaration, data)
fun visitProperty(declaration: IrProperty, data: D) = visitDeclaration(declaration, data) fun visitProperty(declaration: IrProperty, data: D) = visitDeclaration(declaration, data)
fun visitSimpleProperty(declaration: IrSimpleProperty, data: D) = visitProperty(declaration, data) fun visitField(declaration: IrField, data: D) = visitDeclaration(declaration, data)
fun visitDelegatedProperty(declaration: IrDelegatedProperty, data: D) = visitProperty(declaration, data)
fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: D) = visitDeclaration(declaration, data) fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: D) = visitDeclaration(declaration, data)
fun visitLocalPropertyAccessor(declaration: IrLocalPropertyAccessor, data: D) = visitGeneralFunction(declaration, data)
fun visitVariable(declaration: IrVariable, data: D) = visitDeclaration(declaration, data) fun visitVariable(declaration: IrVariable, data: D) = visitDeclaration(declaration, data)
fun visitEnumEntry(declaration: IrEnumEntry, data: D) = visitDeclaration(declaration, data) fun visitEnumEntry(declaration: IrEnumEntry, data: D) = visitDeclaration(declaration, data)
fun visitAnonymousInitializer(declaration: IrAnonymousInitializer, data: D) = visitDeclaration(declaration, data) fun visitAnonymousInitializer(declaration: IrAnonymousInitializer, data: D) = visitDeclaration(declaration, data)
@@ -65,9 +60,9 @@ interface IrElementVisitor<out R, in D> {
fun visitVariableAccess(expression: IrVariableAccessExpression, data: D) = visitDeclarationReference(expression, data) fun visitVariableAccess(expression: IrVariableAccessExpression, data: D) = visitDeclarationReference(expression, data)
fun visitGetVariable(expression: IrGetVariable, data: D) = visitVariableAccess(expression, data) fun visitGetVariable(expression: IrGetVariable, data: D) = visitVariableAccess(expression, data)
fun visitSetVariable(expression: IrSetVariable, data: D) = visitVariableAccess(expression, data) fun visitSetVariable(expression: IrSetVariable, data: D) = visitVariableAccess(expression, data)
fun visitBackingFieldReference(expression: IrBackingFieldExpression, data: D) = visitDeclarationReference(expression, data) fun visitBackingFieldReference(expression: IrFieldExpression, data: D) = visitDeclarationReference(expression, data)
fun visitGetBackingField(expression: IrGetBackingField, data: D) = visitBackingFieldReference(expression, data) fun visitGetField(expression: IrGetField, data: D) = visitBackingFieldReference(expression, data)
fun visitSetBackingField(expression: IrSetBackingField, data: D) = visitBackingFieldReference(expression, data) fun visitSetField(expression: IrSetField, data: D) = visitBackingFieldReference(expression, data)
fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver, data: D) = visitDeclarationReference(expression, data) fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver, data: D) = visitDeclarationReference(expression, data)
fun visitGeneralCall(expression: IrGeneralCall, data: D) = visitDeclarationReference(expression, data) fun visitGeneralCall(expression: IrGeneralCall, data: D) = visitDeclarationReference(expression, data)
fun visitCall(expression: IrCall, data: D) = visitGeneralCall(expression, data) fun visitCall(expression: IrCall, data: D) = visitGeneralCall(expression, data)
@@ -39,36 +39,21 @@ interface IrElementVisitorVoid : IrElementVisitor<Unit, Nothing?> {
fun visitTypeAlias(declaration: IrTypeAlias) = visitDeclaration(declaration) fun visitTypeAlias(declaration: IrTypeAlias) = visitDeclaration(declaration)
override fun visitTypeAlias(declaration: IrTypeAlias, data: Nothing?) = visitTypeAlias(declaration) override fun visitTypeAlias(declaration: IrTypeAlias, data: Nothing?) = visitTypeAlias(declaration)
fun visitGeneralFunction(declaration: IrGeneralFunction) = visitDeclaration(declaration) fun visitFunction(declaration: IrFunction) = visitDeclaration(declaration)
override fun visitGeneralFunction(declaration: IrGeneralFunction, data: Nothing?) = visitGeneralFunction(declaration)
fun visitFunction(declaration: IrFunction) = visitGeneralFunction(declaration)
override fun visitFunction(declaration: IrFunction, data: Nothing?) = visitFunction(declaration) override fun visitFunction(declaration: IrFunction, data: Nothing?) = visitFunction(declaration)
fun visitPropertyGetter(declaration: IrPropertyGetter) = visitGeneralFunction(declaration) fun visitConstructor(declaration: IrConstructor) = visitFunction(declaration)
override fun visitPropertyGetter(declaration: IrPropertyGetter, data: Nothing?) = visitPropertyGetter(declaration)
fun visitPropertySetter(declaration: IrPropertySetter) = visitGeneralFunction(declaration)
override fun visitPropertySetter(declaration: IrPropertySetter, data: Nothing?) = visitPropertySetter(declaration)
fun visitConstructor(declaration: IrConstructor) = visitGeneralFunction(declaration)
override fun visitConstructor(declaration: IrConstructor, data: Nothing?) = visitConstructor(declaration) override fun visitConstructor(declaration: IrConstructor, data: Nothing?) = visitConstructor(declaration)
fun visitProperty(declaration: IrProperty) = visitDeclaration(declaration) fun visitProperty(declaration: IrProperty) = visitDeclaration(declaration)
override fun visitProperty(declaration: IrProperty, data: Nothing?) = visitProperty(declaration) override fun visitProperty(declaration: IrProperty, data: Nothing?) = visitProperty(declaration)
fun visitSimpleProperty(declaration: IrSimpleProperty) = visitProperty(declaration) fun visitField(declaration: IrField) = visitDeclaration(declaration)
override fun visitSimpleProperty(declaration: IrSimpleProperty, data: Nothing?) = visitSimpleProperty(declaration) override fun visitField(declaration: IrField, data: Nothing?) = visitField(declaration)
fun visitDelegatedProperty(declaration: IrDelegatedProperty) = visitProperty(declaration)
override fun visitDelegatedProperty(declaration: IrDelegatedProperty, data: Nothing?) = visitDelegatedProperty(declaration)
fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty) = visitDeclaration(declaration) fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty) = visitDeclaration(declaration)
override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?) = visitLocalDelegatedProperty(declaration) override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?) = visitLocalDelegatedProperty(declaration)
fun visitLocalPropertyAccessor(declaration: IrLocalPropertyAccessor) = visitGeneralFunction(declaration)
override fun visitLocalPropertyAccessor(declaration: IrLocalPropertyAccessor, data: Nothing?) = visitLocalPropertyAccessor(declaration)
fun visitVariable(declaration: IrVariable) = visitDeclaration(declaration) fun visitVariable(declaration: IrVariable) = visitDeclaration(declaration)
override fun visitVariable(declaration: IrVariable, data: Nothing?) = visitVariable(declaration) override fun visitVariable(declaration: IrVariable, data: Nothing?) = visitVariable(declaration)
@@ -138,14 +123,14 @@ interface IrElementVisitorVoid : IrElementVisitor<Unit, Nothing?> {
fun visitSetVariable(expression: IrSetVariable) = visitVariableAccess(expression) fun visitSetVariable(expression: IrSetVariable) = visitVariableAccess(expression)
override fun visitSetVariable(expression: IrSetVariable, data: Nothing?) = visitSetVariable(expression) override fun visitSetVariable(expression: IrSetVariable, data: Nothing?) = visitSetVariable(expression)
fun visitBackingFieldReference(expression: IrBackingFieldExpression) = visitDeclarationReference(expression) fun visitBackingFieldReference(expression: IrFieldExpression) = visitDeclarationReference(expression)
override fun visitBackingFieldReference(expression: IrBackingFieldExpression, data: Nothing?) = visitBackingFieldReference(expression) override fun visitBackingFieldReference(expression: IrFieldExpression, data: Nothing?) = visitBackingFieldReference(expression)
fun visitGetBackingField(expression: IrGetBackingField) = visitBackingFieldReference(expression) fun visitGetBackingField(expression: IrGetField) = visitBackingFieldReference(expression)
override fun visitGetBackingField(expression: IrGetBackingField, data: Nothing?) = visitGetBackingField(expression) override fun visitGetField(expression: IrGetField, data: Nothing?) = visitGetBackingField(expression)
fun visitSetBackingField(expression: IrSetBackingField) = visitBackingFieldReference(expression) fun visitSetBackingField(expression: IrSetField) = visitBackingFieldReference(expression)
override fun visitSetBackingField(expression: IrSetBackingField, data: Nothing?) = visitSetBackingField(expression) override fun visitSetField(expression: IrSetField, data: Nothing?) = visitSetBackingField(expression)
fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver) = visitDeclarationReference(expression) fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver) = visitDeclarationReference(expression)
override fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver, data: Nothing?) = visitGetExtensionReceiver(expression) override fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver, data: Nothing?) = visitGetExtensionReceiver(expression)
@@ -5,11 +5,13 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Base' INSTANCE_INITIALIZER_CALL classDescriptor='Base'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
EXPRESSION_BODY FIELD public final val y: kotlin.Int
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS CLASS Test1 CLASS CLASS Test1
CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int) CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int)
BLOCK_BODY BLOCK_BODY
+17 -9
View File
@@ -7,11 +7,13 @@ FILE /classMembers.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='C' INSTANCE_INITIALIZER_CALL classDescriptor='C'
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
EXPRESSION_BODY FIELD public final val y: kotlin.Int
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final var z: kotlin.Int PROPERTY public final var z: kotlin.Int
EXPRESSION_BODY FIELD public final var z: kotlin.Int
GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CONSTRUCTOR public constructor C() CONSTRUCTOR public constructor C()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int, Int, Int = ...)' DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int, Int, Int = ...)'
@@ -19,20 +21,26 @@ FILE /classMembers.kt
y: CONST Int type=kotlin.Int value='0' y: CONST Int type=kotlin.Int value='0'
z: CONST Int type=kotlin.Int value='0' z: CONST Int type=kotlin.Int value='0'
PROPERTY public final val property: kotlin.Int = 0 PROPERTY public final val property: kotlin.Int = 0
EXPRESSION_BODY FIELD public final val property: kotlin.Int = 0
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-property>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-property>(): Int'
GET_BACKING_FIELD 'property: Int' type=kotlin.Int operator=null
receiver: THIS of 'C' type=C
PROPERTY public final val propertyWithGet: kotlin.Int PROPERTY public final val propertyWithGet: kotlin.Int
PROPERTY_GETTER public final fun <get-propertyWithGet>(): kotlin.Int FUN public final fun <get-propertyWithGet>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-propertyWithGet>(): Int' RETURN type=kotlin.Nothing from='<get-propertyWithGet>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
PROPERTY public final var propertyWithGetAndSet: kotlin.Int PROPERTY public final var propertyWithGetAndSet: kotlin.Int
PROPERTY_GETTER public final fun <get-propertyWithGetAndSet>(): kotlin.Int FUN public final fun <get-propertyWithGetAndSet>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-propertyWithGetAndSet>(): Int' RETURN type=kotlin.Nothing from='<get-propertyWithGetAndSet>(): Int'
CALL '<get-z>(): Int' type=kotlin.Int operator=GET_PROPERTY CALL '<get-z>(): Int' type=kotlin.Int operator=GET_PROPERTY
$this: THIS of 'C' type=C $this: THIS of 'C' type=C
PROPERTY_SETTER public final fun <set-propertyWithGetAndSet>(value: kotlin.Int): kotlin.Unit FUN public final fun <set-propertyWithGetAndSet>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-z>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-z>(Int): Unit' type=kotlin.Unit operator=EQ
$this: THIS of 'C' type=C $this: THIS of 'C' type=C
+9 -6
View File
@@ -5,14 +5,17 @@ FILE /dataClasses.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test1' INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val y: kotlin.String PROPERTY public final val y: kotlin.String
EXPRESSION_BODY FIELD public final val y: kotlin.String
GET_VAR 'value-parameter y: String' type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: String' type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val z: kotlin.Any PROPERTY public final val z: kotlin.Any
EXPRESSION_BODY FIELD public final val z: kotlin.Any
GET_VAR 'value-parameter z: Any' type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter z: Any' type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN public final operator fun component1(): kotlin.Int FUN public final operator fun component1(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='component1(): Int' RETURN type=kotlin.Nothing from='component1(): Int'
@@ -31,22 +31,39 @@ FILE /delegatedImplementation.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
PROPERTY public open override val x: kotlin.String PROPERTY public open override val x: kotlin.String
EXPRESSION_BODY FIELD public open override val x: kotlin.String
GET_VAR 'value-parameter x0: String' type=kotlin.String operator=null EXPRESSION_BODY
GET_VAR 'value-parameter x0: String' type=kotlin.String operator=null
FUN public open override fun <get-x>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String'
GET_BACKING_FIELD 'x: String' type=kotlin.String operator=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
PROPERTY public open override var y: kotlin.Int PROPERTY public open override var y: kotlin.Int
EXPRESSION_BODY FIELD public open override var y: kotlin.Int
GET_VAR 'value-parameter y0: Int' type=kotlin.Int operator=null EXPRESSION_BODY
GET_VAR 'value-parameter y0: Int' type=kotlin.Int operator=null
FUN public open override fun <get-y>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
FUN public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null
receiver: THIS of '<no name provided>' type=otherImpl.<no name provided>
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
PROPERTY public open override val kotlin.Byte.z1: kotlin.Int PROPERTY public open override val kotlin.Byte.z1: kotlin.Int
PROPERTY_GETTER public open override fun kotlin.Byte.<get-z1>(): kotlin.Int FUN public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int' RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
PROPERTY public open override var kotlin.Byte.z2: kotlin.Int PROPERTY public open override var kotlin.Byte.z2: kotlin.Int
PROPERTY_GETTER public open override fun kotlin.Byte.<get-z2>(): kotlin.Int FUN public open override fun kotlin.Byte.<get-z2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int' RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
PROPERTY_SETTER public open override fun kotlin.Byte.<set-z2>(value: kotlin.Int): kotlin.Unit FUN public open override fun kotlin.Byte.<set-z2>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'constructor <no name provided>()' type=otherImpl.<no name provided> operator=OBJECT_LITERAL CALL 'constructor <no name provided>()' type=otherImpl.<no name provided> operator=OBJECT_LITERAL
CLASS CLASS Test1 CLASS CLASS Test1
@@ -54,7 +71,7 @@ FILE /delegatedImplementation.kt
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test1' INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
PROPERTY val `Test1$IBase$delegate`: BaseImpl FIELD val `Test1$IBase$delegate`: BaseImpl
EXPRESSION_BODY EXPRESSION_BODY
GET_OBJECT 'BaseImpl' type=BaseImpl GET_OBJECT 'BaseImpl' type=BaseImpl
FUN public open override fun bar(): kotlin.Int FUN public open override fun bar(): kotlin.Int
@@ -78,7 +95,7 @@ FILE /delegatedImplementation.kt
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test2' INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
PROPERTY val `Test2$IBase$delegate`: BaseImpl FIELD val `Test2$IBase$delegate`: BaseImpl
EXPRESSION_BODY EXPRESSION_BODY
GET_OBJECT 'BaseImpl' type=BaseImpl GET_OBJECT 'BaseImpl' type=BaseImpl
FUN public open override fun bar(): kotlin.Int FUN public open override fun bar(): kotlin.Int
@@ -97,44 +114,44 @@ FILE /delegatedImplementation.kt
CALL 'qux() on String: Unit' type=kotlin.Unit operator=null CALL 'qux() on String: Unit' type=kotlin.Unit operator=null
$this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null
$receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String $receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String
PROPERTY val `Test2$IOther$delegate`: IOther FIELD val `Test2$IOther$delegate`: IOther
EXPRESSION_BODY EXPRESSION_BODY
CALL 'otherImpl(String, Int): IOther' type=IOther operator=null CALL 'otherImpl(String, Int): IOther' type=IOther operator=null
x0: CONST String type=kotlin.String value='' x0: CONST String type=kotlin.String value=''
y0: CONST Int type=kotlin.Int value='42' y0: CONST Int type=kotlin.Int value='42'
PROPERTY public open override val kotlin.Byte.z1: kotlin.Int PROPERTY public open override val kotlin.Byte.z1: kotlin.Int
PROPERTY_GETTER public open override fun kotlin.Byte.<get-z1>(): kotlin.Int FUN public open override fun kotlin.Byte.<get-z1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int' RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
CALL '<get-z1>() on Byte: Int' type=kotlin.Int operator=null CALL '<get-z1>() on Byte: Int' type=kotlin.Int operator=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null
$receiver: $RECEIVER of 'z1: Int on Byte' type=kotlin.Byte $receiver: $RECEIVER of 'z1: Int on Byte' type=kotlin.Byte
PROPERTY public open override val x: kotlin.String PROPERTY public open override val x: kotlin.String
PROPERTY_GETTER public open override fun <get-x>(): kotlin.String FUN public open override fun <get-x>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String' RETURN type=kotlin.Nothing from='<get-x>(): String'
CALL '<get-x>(): String' type=kotlin.String operator=null CALL '<get-x>(): String' type=kotlin.String operator=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null
PROPERTY public open override var kotlin.Byte.z2: kotlin.Int PROPERTY public open override var kotlin.Byte.z2: kotlin.Int
PROPERTY_GETTER public open override fun kotlin.Byte.<get-z2>(): kotlin.Int FUN public open override fun kotlin.Byte.<get-z2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int' RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
CALL '<get-z2>() on Byte: Int' type=kotlin.Int operator=null CALL '<get-z2>() on Byte: Int' type=kotlin.Int operator=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null
$receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte $receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte
PROPERTY_SETTER public open override fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit FUN public open override fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-z2>(Int) on Byte: Unit' type=kotlin.Unit operator=null CALL '<set-z2>(Int) on Byte: Unit' type=kotlin.Unit operator=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null
$receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte $receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte
<set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null <set-?>: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
PROPERTY public open override var y: kotlin.Int PROPERTY public open override var y: kotlin.Int
PROPERTY_GETTER public open override fun <get-y>(): kotlin.Int FUN public open override fun <get-y>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int' RETURN type=kotlin.Nothing from='<get-y>(): Int'
CALL '<get-y>(): Int' type=kotlin.Int operator=null CALL '<get-y>(): Int' type=kotlin.Int operator=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null
PROPERTY_SETTER public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit FUN public open override fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL '<set-y>(Int): Unit' type=kotlin.Unit operator=null CALL '<set-y>(Int): Unit' type=kotlin.Unit operator=null
$this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null
@@ -16,7 +16,7 @@ FILE /delegatedImplementationWithExplicitOverride.kt
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='C' INSTANCE_INITIALIZER_CALL classDescriptor='C'
PROPERTY val `C$IFooBar$delegate`: FooBarImpl FIELD val `C$IFooBar$delegate`: FooBarImpl
EXPRESSION_BODY EXPRESSION_BODY
GET_OBJECT 'FooBarImpl' type=FooBarImpl GET_OBJECT 'FooBarImpl' type=FooBarImpl
FUN public open override fun foo(): kotlin.Unit FUN public open override fun foo(): kotlin.Unit
+12 -4
View File
@@ -18,8 +18,9 @@ FILE /enum.kt
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2' INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
ENUM_ENTRY enum entry TEST1 ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST1 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST1
x: CONST Int type=kotlin.Int value='1' x: CONST Int type=kotlin.Int value='1'
@@ -60,8 +61,9 @@ FILE /enum.kt
ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super
INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4' INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
ENUM_ENTRY enum entry TEST1 ENUM_ENTRY enum entry TEST1
init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()' TEST1 init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()' TEST1
class: CLASS ENUM_ENTRY TEST1 class: CLASS ENUM_ENTRY TEST1
@@ -83,6 +85,12 @@ FILE /enum.kt
x: CONST Int type=kotlin.Int value='2' x: CONST Int type=kotlin.Int value='2'
INSTANCE_INITIALIZER_CALL classDescriptor='TEST2' INSTANCE_INITIALIZER_CALL classDescriptor='TEST2'
PROPERTY public final val z: kotlin.Int PROPERTY public final val z: kotlin.Int
FIELD public final val z: kotlin.Int
FUN public final fun <get-z>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z>(): Int'
GET_BACKING_FIELD 'z: Int' type=kotlin.Int operator=null
receiver: THIS of 'TEST2' type=TestEnum4.TEST2
ANONYMOUS_INITIALIZER TEST2 ANONYMOUS_INITIALIZER TEST2
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null
+3 -2
View File
@@ -13,8 +13,9 @@ FILE /initBlock.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test2' INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
ANONYMOUS_INITIALIZER Test2 ANONYMOUS_INITIALIZER Test2
BLOCK_BODY BLOCK_BODY
CALL 'println(): Unit' type=kotlin.Unit operator=null CALL 'println(): Unit' type=kotlin.Unit operator=null
+17 -4
View File
@@ -5,22 +5,35 @@ FILE /initVal.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValFromParameter' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValFromParameter'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS CLASS TestInitValInClass CLASS CLASS TestInitValInClass
CONSTRUCTOR public constructor TestInitValInClass() CONSTRUCTOR public constructor TestInitValInClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInClass' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInClass'
PROPERTY public final val x: kotlin.Int = 0 PROPERTY public final val x: kotlin.Int = 0
EXPRESSION_BODY FIELD public final val x: kotlin.Int = 0
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitValInClass' type=TestInitValInClass
CLASS CLASS TestInitValInInitBlock CLASS CLASS TestInitValInInitBlock
CONSTRUCTOR public constructor TestInitValInInitBlock() CONSTRUCTOR public constructor TestInitValInInitBlock()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInInitBlock' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInInitBlock'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD public final val x: kotlin.Int
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock
ANONYMOUS_INITIALIZER TestInitValInInitBlock ANONYMOUS_INITIALIZER TestInitValInInitBlock
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
+50 -9
View File
@@ -5,22 +5,45 @@ FILE /initVar.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarFromParameter' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarFromParameter'
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY FIELD public final var x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS CLASS TestInitVarInClass CLASS CLASS TestInitVarInClass
CONSTRUCTOR public constructor TestInitVarInClass() CONSTRUCTOR public constructor TestInitVarInClass()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInClass' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInClass'
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY FIELD public final var x: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass
FUN public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
CLASS CLASS TestInitVarInInitBlock CLASS CLASS TestInitVarInInitBlock
CONSTRUCTOR public constructor TestInitVarInInitBlock() CONSTRUCTOR public constructor TestInitVarInInitBlock()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInInitBlock' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInInitBlock'
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
FIELD public final var x: kotlin.Int
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
FUN public final fun <set-x>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
ANONYMOUS_INITIALIZER TestInitVarInInitBlock ANONYMOUS_INITIALIZER TestInitVarInInitBlock
BLOCK_BODY BLOCK_BODY
CALL '<set-x>(Int): Unit' type=kotlin.Unit operator=EQ CALL '<set-x>(Int): Unit' type=kotlin.Unit operator=EQ
@@ -32,15 +55,27 @@ FILE /initVar.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetter' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetter'
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY FIELD public final var x: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
PROPERTY_SETTER public final fun <set-x>(value: kotlin.Int): kotlin.Unit CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitVarWithCustomSetter' type=TestInitVarWithCustomSetter
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null
CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
PROPERTY_SETTER public final fun <set-x>(value: kotlin.Int): kotlin.Unit FIELD public final var x: kotlin.Int
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null
@@ -55,7 +90,13 @@ FILE /initVar.kt
INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterWithExplicitCtor' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterWithExplicitCtor'
CLASS CLASS TestInitVarWithCustomSetterInCtor CLASS CLASS TestInitVarWithCustomSetterInCtor
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
PROPERTY_SETTER public final fun <set-x>(value: kotlin.Int): kotlin.Unit FIELD public final var x: kotlin.Int
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor
FUN public final fun <set-x>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null
@@ -2,27 +2,37 @@ FILE /objectLiteralExpressions.kt
CLASS INTERFACE IFoo CLASS INTERFACE IFoo
FUN public abstract fun foo(): kotlin.Unit FUN public abstract fun foo(): kotlin.Unit
PROPERTY public val test1: kotlin.Any PROPERTY public val test1: kotlin.Any
EXPRESSION_BODY FIELD public val test1: kotlin.Any
BLOCK type=test1.<no name provided> operator=OBJECT_LITERAL EXPRESSION_BODY
CLASS CLASS <no name provided> BLOCK type=test1.<no name provided> operator=OBJECT_LITERAL
CONSTRUCTOR public constructor <no name provided>() CLASS CLASS <no name provided>
BLOCK_BODY CONSTRUCTOR public constructor <no name provided>()
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' BLOCK_BODY
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
CALL 'constructor <no name provided>()' type=test1.<no name provided> operator=OBJECT_LITERAL INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
CALL 'constructor <no name provided>()' type=test1.<no name provided> operator=OBJECT_LITERAL
FUN public fun <get-test1>(): kotlin.Any
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Any'
GET_BACKING_FIELD 'test1: Any' type=kotlin.Any operator=null
PROPERTY public val test2: IFoo PROPERTY public val test2: IFoo
EXPRESSION_BODY FIELD public val test2: IFoo
BLOCK type=test2.<no name provided> operator=OBJECT_LITERAL EXPRESSION_BODY
CLASS CLASS <no name provided> BLOCK type=test2.<no name provided> operator=OBJECT_LITERAL
CONSTRUCTOR public constructor <no name provided>() CLASS CLASS <no name provided>
BLOCK_BODY CONSTRUCTOR public constructor <no name provided>()
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' BLOCK_BODY
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
FUN public open override fun foo(): kotlin.Unit INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
BLOCK_BODY FUN public open override fun foo(): kotlin.Unit
CALL 'println(Any?): Unit' type=kotlin.Unit operator=null BLOCK_BODY
message: CONST String type=kotlin.String value='foo' CALL 'println(Any?): Unit' type=kotlin.Unit operator=null
CALL 'constructor <no name provided>()' type=test2.<no name provided> operator=OBJECT_LITERAL message: CONST String type=kotlin.String value='foo'
CALL 'constructor <no name provided>()' type=test2.<no name provided> operator=OBJECT_LITERAL
FUN public fun <get-test2>(): IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): IFoo'
GET_BACKING_FIELD 'test2: IFoo' type=IFoo operator=null
CLASS CLASS Outer CLASS CLASS Outer
CONSTRUCTOR public constructor Outer() CONSTRUCTOR public constructor Outer()
BLOCK_BODY BLOCK_BODY
@@ -10,9 +10,21 @@ FILE /objectWithInitializers.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test' INSTANCE_INITIALIZER_CALL classDescriptor='Test'
PROPERTY public final val x: kotlin.Int = 1 PROPERTY public final val x: kotlin.Int = 1
EXPRESSION_BODY FIELD public final val x: kotlin.Int = 1
CONST Int type=kotlin.Int value='1' EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'Test' type=Test
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
FIELD public final val y: kotlin.Int
FUN public final fun <get-y>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null
receiver: THIS of 'Test' type=Test
ANONYMOUS_INITIALIZER Test ANONYMOUS_INITIALIZER Test
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null
+26 -10
View File
@@ -5,31 +5,47 @@ FILE /primaryConstructor.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test1' INSTANCE_INITIALIZER_CALL classDescriptor='Test1'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
EXPRESSION_BODY FIELD public final val y: kotlin.Int
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS CLASS Test2 CLASS CLASS Test2
CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int) CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test2' INSTANCE_INITIALIZER_CALL classDescriptor='Test2'
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
EXPRESSION_BODY FIELD public final val y: kotlin.Int
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'Test2' type=Test2
CLASS CLASS Test3 CLASS CLASS Test3
CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int) CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Test3' INSTANCE_INITIALIZER_CALL classDescriptor='Test3'
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
EXPRESSION_BODY FIELD public final val y: kotlin.Int
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD public final val x: kotlin.Int
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'Test3' type=Test3
ANONYMOUS_INITIALIZER Test3 ANONYMOUS_INITIALIZER Test3
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
@@ -20,11 +20,13 @@ FILE /primaryConstructorWithSuperConstructorCall.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestWithDelegatingConstructor' INSTANCE_INITIALIZER_CALL classDescriptor='TestWithDelegatingConstructor'
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
EXPRESSION_BODY FIELD public final val x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val y: kotlin.Int PROPERTY public final val y: kotlin.Int
EXPRESSION_BODY FIELD public final val y: kotlin.Int
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int) CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)' DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)'
@@ -3,7 +3,7 @@ FILE /qualifiedSuperCalls.kt
FUN public open fun foo(): kotlin.Unit FUN public open fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public open val bar: kotlin.Int PROPERTY public open val bar: kotlin.Int
PROPERTY_GETTER public open fun <get-bar>(): kotlin.Int FUN public open fun <get-bar>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int' RETURN type=kotlin.Nothing from='<get-bar>(): Int'
CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='1'
@@ -11,7 +11,7 @@ FILE /qualifiedSuperCalls.kt
FUN public open fun foo(): kotlin.Unit FUN public open fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public open val bar: kotlin.Int PROPERTY public open val bar: kotlin.Int
PROPERTY_GETTER public open fun <get-bar>(): kotlin.Int FUN public open fun <get-bar>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int' RETURN type=kotlin.Nothing from='<get-bar>(): Int'
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='2'
@@ -27,7 +27,7 @@ FILE /qualifiedSuperCalls.kt
CALL 'foo(): Unit' superQualifier=IRight type=kotlin.Unit operator=null CALL 'foo(): Unit' superQualifier=IRight type=kotlin.Unit operator=null
$this: THIS of 'CBoth' type=IRight $this: THIS of 'CBoth' type=IRight
PROPERTY public open override val bar: kotlin.Int PROPERTY public open override val bar: kotlin.Int
PROPERTY_GETTER public open override fun <get-bar>(): kotlin.Int FUN public open override fun <get-bar>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int' RETURN type=kotlin.Nothing from='<get-bar>(): Int'
CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS
+9 -6
View File
@@ -10,19 +10,22 @@ FILE /sealedClasses.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()'
INSTANCE_INITIALIZER_CALL classDescriptor='Const' INSTANCE_INITIALIZER_CALL classDescriptor='Const'
PROPERTY public final val number: kotlin.Double PROPERTY public final val number: kotlin.Double
EXPRESSION_BODY FIELD public final val number: kotlin.Double
GET_VAR 'value-parameter number: Double' type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter number: Double' type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS CLASS Sum CLASS CLASS Sum
CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr) CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr)
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()'
INSTANCE_INITIALIZER_CALL classDescriptor='Sum' INSTANCE_INITIALIZER_CALL classDescriptor='Sum'
PROPERTY public final val e1: Expr PROPERTY public final val e1: Expr
EXPRESSION_BODY FIELD public final val e1: Expr
GET_VAR 'value-parameter e1: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter e1: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val e2: Expr PROPERTY public final val e2: Expr
EXPRESSION_BODY FIELD public final val e2: Expr
GET_VAR 'value-parameter e2: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter e2: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS OBJECT NotANumber CLASS OBJECT NotANumber
CONSTRUCTOR private constructor NotANumber() CONSTRUCTOR private constructor NotANumber()
BLOCK_BODY BLOCK_BODY
@@ -6,14 +6,26 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt
INSTANCE_INITIALIZER_CALL classDescriptor='Base' INSTANCE_INITIALIZER_CALL classDescriptor='Base'
CLASS CLASS TestProperty CLASS CLASS TestProperty
PROPERTY public final val x: kotlin.Int = 0 PROPERTY public final val x: kotlin.Int = 0
EXPRESSION_BODY FIELD public final val x: kotlin.Int = 0
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestProperty' type=TestProperty
CONSTRUCTOR public constructor TestProperty() CONSTRUCTOR public constructor TestProperty()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' DELEGATING_CONSTRUCTOR_CALL 'constructor Base()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestProperty' INSTANCE_INITIALIZER_CALL classDescriptor='TestProperty'
CLASS CLASS TestInitBlock CLASS CLASS TestInitBlock
PROPERTY public final val x: kotlin.Int PROPERTY public final val x: kotlin.Int
FIELD public final val x: kotlin.Int
FUN public final fun <get-x>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int'
GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestInitBlock' type=TestInitBlock
ANONYMOUS_INITIALIZER TestInitBlock ANONYMOUS_INITIALIZER TestInitBlock
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null
+9 -3
View File
@@ -7,8 +7,14 @@ FILE /superCalls.kt
FUN public open fun foo(): kotlin.Unit FUN public open fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public open val bar: kotlin.String = "" PROPERTY public open val bar: kotlin.String = ""
EXPRESSION_BODY FIELD public open val bar: kotlin.String = ""
CONST String type=kotlin.String value='' EXPRESSION_BODY
CONST String type=kotlin.String value=''
FUN public open fun <get-bar>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): String'
GET_BACKING_FIELD 'bar: String' type=kotlin.String operator=null
receiver: THIS of 'Base' type=Base
CLASS CLASS Derived CLASS CLASS Derived
CONSTRUCTOR public constructor Derived() CONSTRUCTOR public constructor Derived()
BLOCK_BODY BLOCK_BODY
@@ -19,7 +25,7 @@ FILE /superCalls.kt
CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit operator=null CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit operator=null
$this: THIS of 'Derived' type=Base $this: THIS of 'Derived' type=Base
PROPERTY public open override val bar: kotlin.String PROPERTY public open override val bar: kotlin.String
PROPERTY_GETTER public open override fun <get-bar>(): kotlin.String FUN public open override fun <get-bar>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): String' RETURN type=kotlin.Nothing from='<get-bar>(): String'
CALL '<get-bar>(): String' superQualifier=Base type=kotlin.String operator=GET_PROPERTY CALL '<get-bar>(): String' superQualifier=Base type=kotlin.String operator=GET_PROPERTY
@@ -1,6 +1,6 @@
FILE /delegatedProperties.kt FILE /delegatedProperties.kt
PROPERTY public val test1: kotlin.Int PROPERTY public val test1: kotlin.Int
delegate: PROPERTY val `test1$delegate`: kotlin.Lazy<kotlin.Int> FIELD val `test1$delegate`: kotlin.Lazy<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA
@@ -9,7 +9,7 @@ FILE /delegatedProperties.kt
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA
PROPERTY_GETTER public fun <get-test1>(): kotlin.Int FUN public fun <get-test1>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int' RETURN type=kotlin.Nothing from='<get-test1>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null
@@ -22,10 +22,11 @@ FILE /delegatedProperties.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='C' INSTANCE_INITIALIZER_CALL classDescriptor='C'
PROPERTY public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any> PROPERTY public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY FIELD public final val map: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
GET_VAR 'value-parameter map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter map: MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=INITIALIZE_PROPERTY_FROM_PARAMETER
PROPERTY public final val test2: kotlin.Int PROPERTY public final val test2: kotlin.Int
delegate: PROPERTY val `test2$delegate`: kotlin.Lazy<kotlin.Int> FIELD val `test2$delegate`: kotlin.Lazy<kotlin.Int>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null CALL 'lazy(() -> Int): Lazy<Int>' type=kotlin.Lazy<kotlin.Int> operator=null
initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA
@@ -34,7 +35,7 @@ FILE /delegatedProperties.kt
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA
PROPERTY_GETTER public final fun <get-test2>(): kotlin.Int FUN public final fun <get-test2>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): Int' RETURN type=kotlin.Nothing from='<get-test2>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null
@@ -43,11 +44,11 @@ FILE /delegatedProperties.kt
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test2: Int' type=kotlin.reflect.KProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test2: Int' type=kotlin.reflect.KProperty1<C, kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY public final var test3: kotlin.Any PROPERTY public final var test3: kotlin.Any
delegate: PROPERTY val `test3$delegate`: kotlin.collections.MutableMap<kotlin.String, kotlin.Any> FIELD val `test3$delegate`: kotlin.collections.MutableMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY EXPRESSION_BODY
CALL '<get-map>(): MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=GET_PROPERTY CALL '<get-map>(): MutableMap<String, Any>' type=kotlin.collections.MutableMap<kotlin.String, kotlin.Any> operator=GET_PROPERTY
$this: THIS of 'C' type=C $this: THIS of 'C' type=C
PROPERTY_GETTER public final fun <get-test3>(): kotlin.Any FUN public final fun <get-test3>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Any' RETURN type=kotlin.Nothing from='<get-test3>(): Any'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any operator=null
@@ -55,7 +56,7 @@ FILE /delegatedProperties.kt
receiver: THIS of 'C' type=C receiver: THIS of 'C' type=C
thisRef: THIS of 'C' type=C thisRef: THIS of 'C' type=C
property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY_SETTER public final fun <set-test3>(<set-?>: kotlin.Any): kotlin.Unit FUN public final fun <set-test3>(<set-?>: kotlin.Any): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-test3>(Any): Unit' RETURN type=kotlin.Nothing from='<set-test3>(Any): Unit'
CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit operator=null
@@ -65,17 +66,17 @@ FILE /delegatedProperties.kt
property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1<C, kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter <set-?>: Any' type=kotlin.Any operator=null value: GET_VAR 'value-parameter <set-?>: Any' type=kotlin.Any operator=null
PROPERTY public var test4: kotlin.Any PROPERTY public var test4: kotlin.Any
delegate: PROPERTY val `test4$delegate`: java.util.HashMap<kotlin.String, kotlin.Any> FIELD val `test4$delegate`: java.util.HashMap<kotlin.String, kotlin.Any>
EXPRESSION_BODY EXPRESSION_BODY
CALL 'hashMapOf(vararg Pair<String, Any>): HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null CALL 'hashMapOf(vararg Pair<String, Any>): HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null
PROPERTY_GETTER public fun <get-test4>(): kotlin.Any FUN public fun <get-test4>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): Any' RETURN type=kotlin.Nothing from='<get-test4>(): Any'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Any>: Any' type=kotlin.Any operator=null
$receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null $receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap<String, Any>' type=java.util.HashMap<kotlin.String, kotlin.Any> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0<kotlin.Any> operator=PROPERTY_REFERENCE_FOR_DELEGATE
PROPERTY_SETTER public fun <set-test4>(<set-?>: kotlin.Any): kotlin.Unit FUN public fun <set-test4>(<set-?>: kotlin.Any): kotlin.Unit
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-test4>(Any): Unit' RETURN type=kotlin.Nothing from='<set-test4>(Any): Unit'
CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit operator=null CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap<in String, in Any>: Unit' type=kotlin.Unit operator=null
@@ -4,5 +4,10 @@ FILE /fileWithAnnotations.kt
FUN public fun foo(): kotlin.Unit FUN public fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public val bar: kotlin.Int = 42 PROPERTY public val bar: kotlin.Int = 42
EXPRESSION_BODY FIELD public val bar: kotlin.Int = 42
CONST Int type=kotlin.Int value='42' EXPRESSION_BODY
CONST Int type=kotlin.Int value='42'
FUN public fun <get-bar>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
GET_BACKING_FIELD 'bar: Int' type=kotlin.Int operator=null
@@ -10,7 +10,7 @@ FILE /localDelegatedProperties.kt
RETURN type=kotlin.Nothing from='<anonymous>(): Int' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA
LOCAL_PROPERTY_ACCESSOR <get-x>(): Int FUN local final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on Lazy<Int>: Int' type=kotlin.Int operator=null
@@ -24,14 +24,14 @@ FILE /localDelegatedProperties.kt
LOCAL_DELEGATED_PROPERTY var x: kotlin.Int LOCAL_DELEGATED_PROPERTY var x: kotlin.Int
VAR val `x$delegate`: java.util.HashMap<kotlin.String, kotlin.Int> VAR val `x$delegate`: java.util.HashMap<kotlin.String, kotlin.Int>
CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null CALL 'hashMapOf(vararg Pair<String, Int>): HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null
LOCAL_PROPERTY_ACCESSOR <get-x>(): Int FUN local final fun <get-x>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): Int' RETURN type=kotlin.Nothing from='<get-x>(): Int'
CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int operator=null CALL 'getValue(Any?, KProperty<*>) on MutableMap<in String, in Int>: Int' type=kotlin.Int operator=null
$receiver: GET_VAR '`x$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null $receiver: GET_VAR '`x$delegate`: HashMap<String, Int>' type=java.util.HashMap<kotlin.String, kotlin.Int> operator=null
thisRef: CONST Null type=kotlin.Nothing? value='null' thisRef: CONST Null type=kotlin.Nothing? value='null'
property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0<kotlin.Int> operator=PROPERTY_REFERENCE_FOR_DELEGATE
LOCAL_PROPERTY_ACCESSOR <set-x>(Int): Int FUN local final fun <set-x>(value: kotlin.Int): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<set-x>(Int): Int' RETURN type=kotlin.Nothing from='<set-x>(Int): Int'
TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int
+30 -10
View File
@@ -1,15 +1,35 @@
FILE /unresolvedReference.kt FILE /unresolvedReference.kt
PROPERTY public val test1: [ERROR : Type for unresolved] PROPERTY public val test1: [ERROR : Type for unresolved]
EXPRESSION_BODY FIELD public val test1: [ERROR : Type for unresolved]
ERROR_CALL '' type=[ERROR : ] EXPRESSION_BODY
ERROR_CALL '' type=[ERROR : ]
FUN public fun <get-test1>(): [ERROR : Type for unresolved]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): [ERROR : Type for unresolved]'
GET_BACKING_FIELD 'test1: [ERROR : Type for unresolved]' type=[ERROR : Type for unresolved] operator=null
PROPERTY public val test2: [ERROR : Unresolved] PROPERTY public val test2: [ERROR : Unresolved]
EXPRESSION_BODY FIELD public val test2: [ERROR : Unresolved]
ERROR_CALL '' type=[ERROR : ] EXPRESSION_BODY
ERROR_CALL '' type=[ERROR : ]
FUN public fun <get-test2>(): [ERROR : Unresolved]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): [ERROR : Unresolved]'
GET_BACKING_FIELD 'test2: [ERROR : Unresolved]' type=[ERROR : Unresolved] operator=null
PROPERTY public val test3: [ERROR : Type for 42.unresolved(56)] PROPERTY public val test3: [ERROR : Type for 42.unresolved(56)]
EXPRESSION_BODY FIELD public val test3: [ERROR : Type for 42.unresolved(56)]
ERROR_CALL '' type=[ERROR : ] EXPRESSION_BODY
receiver: CONST Int type=kotlin.Int value='42' ERROR_CALL '' type=[ERROR : ]
CONST Int type=kotlin.Int value='56' receiver: CONST Int type=kotlin.Int value='42'
CONST Int type=kotlin.Int value='56'
FUN public fun <get-test3>(): [ERROR : Type for 42.unresolved(56)]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): [ERROR : Type for 42.unresolved(56)]'
GET_BACKING_FIELD 'test3: [ERROR : Type for 42.unresolved(56)]' type=[ERROR : Type for 42.unresolved(56)] operator=null
PROPERTY public val test4: [ERROR : Type for 42 *] PROPERTY public val test4: [ERROR : Type for 42 *]
EXPRESSION_BODY FIELD public val test4: [ERROR : Type for 42 *]
ERROR_EXPR '' type=[ERROR : ] EXPRESSION_BODY
ERROR_EXPR '' type=[ERROR : ]
FUN public fun <get-test4>(): [ERROR : Type for 42 *]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): [ERROR : Type for 42 *]'
GET_BACKING_FIELD 'test4: [ERROR : Type for 42 *]' type=[ERROR : Type for 42 *] operator=null
+7 -2
View File
@@ -1,7 +1,12 @@
FILE /arrayAccess.kt FILE /arrayAccess.kt
PROPERTY public val p: kotlin.Int = 0 PROPERTY public val p: kotlin.Int = 0
EXPRESSION_BODY FIELD public val p: kotlin.Int = 0
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public fun <get-p>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): Int'
GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null
FUN public fun foo(): kotlin.Int FUN public fun foo(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): Int' RETURN type=kotlin.Nothing from='foo(): Int'
@@ -17,8 +17,9 @@ FILE /arrayAugmentedAssignment1.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='C' INSTANCE_INITIALIZER_CALL classDescriptor='C'
PROPERTY public final val x: kotlin.IntArray PROPERTY public final val x: kotlin.IntArray
EXPRESSION_BODY FIELD public final val x: kotlin.IntArray
GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN public fun testVariable(): kotlin.Unit FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.IntArray VAR var x: kotlin.IntArray
+3 -2
View File
@@ -5,8 +5,9 @@ FILE /assignments.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Ref' INSTANCE_INITIALIZER_CALL classDescriptor='Ref'
PROPERTY public final var x: kotlin.Int PROPERTY public final var x: kotlin.Int
EXPRESSION_BODY FIELD public final var x: kotlin.Int
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN public fun test1(): kotlin.Unit FUN public fun test1(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.Int VAR var x: kotlin.Int
@@ -1,7 +1,16 @@
FILE /augmentedAssignment1.kt FILE /augmentedAssignment1.kt
PROPERTY public var p: kotlin.Int PROPERTY public var p: kotlin.Int
EXPRESSION_BODY FIELD public var p: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public fun <get-p>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): Int'
GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null
FUN public fun <set-p>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'p: Int' type=kotlin.Unit operator=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
FUN public fun testVariable(): kotlin.Unit FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.Int VAR var x: kotlin.Int
@@ -15,8 +15,13 @@ FILE /augmentedAssignment2.kt
FUN public operator fun A.modAssign(s: kotlin.String): kotlin.Unit FUN public operator fun A.modAssign(s: kotlin.String): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public val p: A PROPERTY public val p: A
EXPRESSION_BODY FIELD public val p: A
CALL 'constructor A()' type=A operator=null EXPRESSION_BODY
CALL 'constructor A()' type=A operator=null
FUN public fun <get-p>(): A
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): A'
GET_BACKING_FIELD 'p: A' type=A operator=null
FUN public fun testVariable(): kotlin.Unit FUN public fun testVariable(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR val a: A VAR val a: A
@@ -7,19 +7,40 @@ FILE /boundCallableReferences.kt
FUN public final fun foo(): kotlin.Unit FUN public final fun foo(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public final val bar: kotlin.Int = 0 PROPERTY public final val bar: kotlin.Int = 0
EXPRESSION_BODY FIELD public final val bar: kotlin.Int = 0
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-bar>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-bar>(): Int'
GET_BACKING_FIELD 'bar: Int' type=kotlin.Int operator=null
receiver: THIS of 'A' type=A
FUN public fun A.qux(): kotlin.Unit FUN public fun A.qux(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public val test1: kotlin.reflect.KFunction0<kotlin.Unit> PROPERTY public val test1: kotlin.reflect.KFunction0<kotlin.Unit>
EXPRESSION_BODY FIELD public val test1: kotlin.reflect.KFunction0<kotlin.Unit>
CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null EXPRESSION_BODY
$this: CALL 'constructor A()' type=A operator=null CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
$this: CALL 'constructor A()' type=A operator=null
FUN public fun <get-test1>(): kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): KFunction0<Unit>'
GET_BACKING_FIELD 'test1: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
PROPERTY public val test2: kotlin.reflect.KProperty0<kotlin.Int> PROPERTY public val test2: kotlin.reflect.KProperty0<kotlin.Int>
EXPRESSION_BODY FIELD public val test2: kotlin.reflect.KProperty0<kotlin.Int>
CALLABLE_REFERENCE 'bar: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null EXPRESSION_BODY
$this: CALL 'constructor A()' type=A operator=null CALLABLE_REFERENCE 'bar: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null
$this: CALL 'constructor A()' type=A operator=null
FUN public fun <get-test2>(): kotlin.reflect.KProperty0<kotlin.Int>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): KProperty0<Int>'
GET_BACKING_FIELD 'test2: KProperty0<Int>' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null
PROPERTY public val test3: kotlin.reflect.KFunction0<kotlin.Unit> PROPERTY public val test3: kotlin.reflect.KFunction0<kotlin.Unit>
EXPRESSION_BODY FIELD public val test3: kotlin.reflect.KFunction0<kotlin.Unit>
CALLABLE_REFERENCE 'qux() on A: Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null EXPRESSION_BODY
$receiver: CALL 'constructor A()' type=A operator=null CALLABLE_REFERENCE 'qux() on A: Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
$receiver: CALL 'constructor A()' type=A operator=null
FUN public fun <get-test3>(): kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): KFunction0<Unit>'
GET_BACKING_FIELD 'test3: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
@@ -5,24 +5,57 @@ FILE /complexAugmentedAssignment.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='X1' INSTANCE_INITIALIZER_CALL classDescriptor='X1'
PROPERTY public final var x1: kotlin.Int PROPERTY public final var x1: kotlin.Int
EXPRESSION_BODY FIELD public final var x1: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x1>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x1>(): Int'
GET_BACKING_FIELD 'x1: Int' type=kotlin.Int operator=null
receiver: THIS of 'X1' type=X1
FUN public final fun <set-x1>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'x1: Int' type=kotlin.Unit operator=null
receiver: THIS of 'X1' type=X1
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
CLASS OBJECT X2 CLASS OBJECT X2
CONSTRUCTOR private constructor X2() CONSTRUCTOR private constructor X2()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='X2' INSTANCE_INITIALIZER_CALL classDescriptor='X2'
PROPERTY public final var x2: kotlin.Int PROPERTY public final var x2: kotlin.Int
EXPRESSION_BODY FIELD public final var x2: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x2>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x2>(): Int'
GET_BACKING_FIELD 'x2: Int' type=kotlin.Int operator=null
receiver: THIS of 'X2' type=X1.X2
FUN public final fun <set-x2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'x2: Int' type=kotlin.Unit operator=null
receiver: THIS of 'X2' type=X1.X2
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
CLASS OBJECT X3 CLASS OBJECT X3
CONSTRUCTOR private constructor X3() CONSTRUCTOR private constructor X3()
BLOCK_BODY BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='X3' INSTANCE_INITIALIZER_CALL classDescriptor='X3'
PROPERTY public final var x3: kotlin.Int PROPERTY public final var x3: kotlin.Int
EXPRESSION_BODY FIELD public final var x3: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public final fun <get-x3>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x3>(): Int'
GET_BACKING_FIELD 'x3: Int' type=kotlin.Int operator=null
receiver: THIS of 'X3' type=X1.X2.X3
FUN public final fun <set-x3>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'x3: Int' type=kotlin.Unit operator=null
receiver: THIS of 'X3' type=X1.X2.X3
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
FUN public fun test1(a: kotlin.IntArray): kotlin.Unit FUN public fun test1(a: kotlin.IntArray): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var i: kotlin.Int VAR var i: kotlin.Int
@@ -94,8 +127,9 @@ FILE /complexAugmentedAssignment.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='B' INSTANCE_INITIALIZER_CALL classDescriptor='B'
PROPERTY public final var s: kotlin.Int PROPERTY public final var s: kotlin.Int
EXPRESSION_BODY FIELD public final var s: kotlin.Int
GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS OBJECT Host CLASS OBJECT Host
CONSTRUCTOR private constructor Host() CONSTRUCTOR private constructor Host()
BLOCK_BODY BLOCK_BODY
+7 -2
View File
@@ -1,7 +1,12 @@
FILE /elvis.kt FILE /elvis.kt
PROPERTY public val p: kotlin.Any? = null PROPERTY public val p: kotlin.Any? = null
EXPRESSION_BODY FIELD public val p: kotlin.Any? = null
CONST Null type=kotlin.Nothing? value='null' EXPRESSION_BODY
CONST Null type=kotlin.Nothing? value='null'
FUN public fun <get-p>(): kotlin.Any?
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): Any?'
GET_BACKING_FIELD 'p: Any?' type=kotlin.Any? operator=null
FUN public fun foo(): kotlin.Any? FUN public fun foo(): kotlin.Any?
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): Any?' RETURN type=kotlin.Nothing from='foo(): Any?'
@@ -1,6 +1,6 @@
FILE /extensionPropertyGetterCall.kt FILE /extensionPropertyGetterCall.kt
PROPERTY public val kotlin.String.okext: kotlin.String PROPERTY public val kotlin.String.okext: kotlin.String
PROPERTY_GETTER public fun kotlin.String.<get-okext>(): kotlin.String FUN public fun kotlin.String.<get-okext>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-okext>() on String: String' RETURN type=kotlin.Nothing from='<get-okext>() on String: String'
CONST String type=kotlin.String value='OK' CONST String type=kotlin.String value='OK'
+16 -6
View File
@@ -1,15 +1,25 @@
FILE /field.kt FILE /field.kt
PROPERTY public var testSimple: kotlin.Int PROPERTY public var testSimple: kotlin.Int
EXPRESSION_BODY FIELD public var testSimple: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
PROPERTY_SETTER public fun <set-testSimple>(value: kotlin.Int): kotlin.Unit CONST Int type=kotlin.Int value='0'
FUN public fun <get-testSimple>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testSimple>(): Int'
GET_BACKING_FIELD 'testSimple: Int' type=kotlin.Int operator=null
FUN public fun <set-testSimple>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'testSimple: Int' type=kotlin.Unit operator=EQ SET_BACKING_FIELD 'testSimple: Int' type=kotlin.Unit operator=EQ
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null
PROPERTY public var testAugmented: kotlin.Int PROPERTY public var testAugmented: kotlin.Int
EXPRESSION_BODY FIELD public var testAugmented: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
PROPERTY_SETTER public fun <set-testAugmented>(value: kotlin.Int): kotlin.Unit CONST Int type=kotlin.Int value='0'
FUN public fun <get-testAugmented>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testAugmented>(): Int'
GET_BACKING_FIELD 'testAugmented: Int' type=kotlin.Int operator=null
FUN public fun <set-testAugmented>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
SET_BACKING_FIELD 'testAugmented: Int' type=kotlin.Unit operator=PLUSEQ SET_BACKING_FIELD 'testAugmented: Int' type=kotlin.Unit operator=PLUSEQ
value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ
@@ -10,8 +10,9 @@ FILE /forWithImplicitReceivers.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='IntCell' INSTANCE_INITIALIZER_CALL classDescriptor='IntCell'
PROPERTY public final var value: kotlin.Int PROPERTY public final var value: kotlin.Int
EXPRESSION_BODY FIELD public final var value: kotlin.Int
GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS INTERFACE IReceiver CLASS INTERFACE IReceiver
FUN public open operator fun FiveTimes.iterator(): IntCell FUN public open operator fun FiveTimes.iterator(): IntCell
BLOCK_BODY BLOCK_BODY
@@ -1,14 +1,28 @@
FILE /incrementDecrement.kt FILE /incrementDecrement.kt
PROPERTY public var p: kotlin.Int PROPERTY public var p: kotlin.Int
EXPRESSION_BODY FIELD public var p: kotlin.Int
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public fun <get-p>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>(): Int'
GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null
FUN public fun <set-p>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'p: Int' type=kotlin.Unit operator=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
PROPERTY public val arr: kotlin.IntArray PROPERTY public val arr: kotlin.IntArray
EXPRESSION_BODY FIELD public val arr: kotlin.IntArray
CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null EXPRESSION_BODY
elements: VARARG type=IntArray varargElementType=Int CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null
CONST Int type=kotlin.Int value='1' elements: VARARG type=IntArray varargElementType=Int
CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='1'
CONST Int type=kotlin.Int value='3' CONST Int type=kotlin.Int value='2'
CONST Int type=kotlin.Int value='3'
FUN public fun <get-arr>(): kotlin.IntArray
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-arr>(): IntArray'
GET_BACKING_FIELD 'arr: IntArray' type=kotlin.IntArray operator=null
FUN public fun testVarPrefix(): kotlin.Unit FUN public fun testVarPrefix(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
VAR var x: kotlin.Int VAR var x: kotlin.Int
@@ -6,7 +6,7 @@ FILE /jvmStaticFieldReference.kt
GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY
p0: CONST String type=kotlin.String value='testFun' p0: CONST String type=kotlin.String value='testFun'
PROPERTY public var testProp: kotlin.Any PROPERTY public var testProp: kotlin.Any
PROPERTY_GETTER public fun <get-testProp>(): kotlin.Any FUN public fun <get-testProp>(): kotlin.Any
BLOCK_BODY BLOCK_BODY
CALL 'println(String!): Unit' type=kotlin.Unit operator=null CALL 'println(String!): Unit' type=kotlin.Unit operator=null
$this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream
@@ -14,7 +14,7 @@ FILE /jvmStaticFieldReference.kt
p0: CONST String type=kotlin.String value='testProp/get' p0: CONST String type=kotlin.String value='testProp/get'
RETURN type=kotlin.Nothing from='<get-testProp>(): Any' RETURN type=kotlin.Nothing from='<get-testProp>(): Any'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
PROPERTY_SETTER public fun <set-testProp>(value: kotlin.Any): kotlin.Unit FUN public fun <set-testProp>(value: kotlin.Any): kotlin.Unit
BLOCK_BODY BLOCK_BODY
CALL 'println(String!): Unit' type=kotlin.Unit operator=null CALL 'println(String!): Unit' type=kotlin.Unit operator=null
$this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream
@@ -26,14 +26,20 @@ FILE /jvmStaticFieldReference.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='TestClass' INSTANCE_INITIALIZER_CALL classDescriptor='TestClass'
PROPERTY public final val test: kotlin.Int PROPERTY public final val test: kotlin.Int
EXPRESSION_BODY FIELD public final val test: kotlin.Int
WHEN type=kotlin.Int operator=WHEN EXPRESSION_BODY
else: BLOCK type=kotlin.Int operator=null WHEN type=kotlin.Int operator=WHEN
CALL 'println(String!): Unit' type=kotlin.Unit operator=null else: BLOCK type=kotlin.Int operator=null
$this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream CALL 'println(String!): Unit' type=kotlin.Unit operator=null
GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream
p0: CONST String type=kotlin.String value='TestClass/test' GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY
CONST Int type=kotlin.Int value='42' p0: CONST String type=kotlin.String value='TestClass/test'
CONST Int type=kotlin.Int value='42'
FUN public final fun <get-test>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test>(): Int'
GET_BACKING_FIELD 'test: Int' type=kotlin.Int operator=null
receiver: THIS of 'TestClass' type=TestClass
ANONYMOUS_INITIALIZER TestClass ANONYMOUS_INITIALIZER TestClass
BLOCK_BODY BLOCK_BODY
CALL 'println(String!): Unit' type=kotlin.Unit operator=null CALL 'println(String!): Unit' type=kotlin.Unit operator=null
+119 -34
View File
@@ -1,52 +1,137 @@
FILE /literals.kt FILE /literals.kt
PROPERTY public val test1: kotlin.Int = 1 PROPERTY public val test1: kotlin.Int = 1
EXPRESSION_BODY FIELD public val test1: kotlin.Int = 1
CONST Int type=kotlin.Int value='1' EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
FUN public fun <get-test1>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null
PROPERTY public val test2: kotlin.Int = -1 PROPERTY public val test2: kotlin.Int = -1
EXPRESSION_BODY FIELD public val test2: kotlin.Int = -1
CONST Int type=kotlin.Int value='-1' EXPRESSION_BODY
CONST Int type=kotlin.Int value='-1'
FUN public fun <get-test2>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
GET_BACKING_FIELD 'test2: Int' type=kotlin.Int operator=null
PROPERTY public val test3: kotlin.Boolean = true PROPERTY public val test3: kotlin.Boolean = true
EXPRESSION_BODY FIELD public val test3: kotlin.Boolean = true
CONST Boolean type=kotlin.Boolean value='true' EXPRESSION_BODY
CONST Boolean type=kotlin.Boolean value='true'
FUN public fun <get-test3>(): kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Boolean'
GET_BACKING_FIELD 'test3: Boolean' type=kotlin.Boolean operator=null
PROPERTY public val test4: kotlin.Boolean = false PROPERTY public val test4: kotlin.Boolean = false
EXPRESSION_BODY FIELD public val test4: kotlin.Boolean = false
CONST Boolean type=kotlin.Boolean value='false' EXPRESSION_BODY
CONST Boolean type=kotlin.Boolean value='false'
FUN public fun <get-test4>(): kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): Boolean'
GET_BACKING_FIELD 'test4: Boolean' type=kotlin.Boolean operator=null
PROPERTY public val test5: kotlin.String = "abc" PROPERTY public val test5: kotlin.String = "abc"
EXPRESSION_BODY FIELD public val test5: kotlin.String = "abc"
CONST String type=kotlin.String value='abc' EXPRESSION_BODY
CONST String type=kotlin.String value='abc'
FUN public fun <get-test5>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test5>(): String'
GET_BACKING_FIELD 'test5: String' type=kotlin.String operator=null
PROPERTY public val test6: kotlin.Nothing? = null PROPERTY public val test6: kotlin.Nothing? = null
EXPRESSION_BODY FIELD public val test6: kotlin.Nothing? = null
CONST Null type=kotlin.Nothing? value='null' EXPRESSION_BODY
CONST Null type=kotlin.Nothing? value='null'
FUN public fun <get-test6>(): kotlin.Nothing?
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test6>(): Nothing?'
GET_BACKING_FIELD 'test6: Nothing?' type=kotlin.Nothing? operator=null
PROPERTY public val test7: kotlin.Long = 1.toLong() PROPERTY public val test7: kotlin.Long = 1.toLong()
EXPRESSION_BODY FIELD public val test7: kotlin.Long = 1.toLong()
CONST Long type=kotlin.Long value='1' EXPRESSION_BODY
CONST Long type=kotlin.Long value='1'
FUN public fun <get-test7>(): kotlin.Long
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test7>(): Long'
GET_BACKING_FIELD 'test7: Long' type=kotlin.Long operator=null
PROPERTY public val test8: kotlin.Long = -1.toLong() PROPERTY public val test8: kotlin.Long = -1.toLong()
EXPRESSION_BODY FIELD public val test8: kotlin.Long = -1.toLong()
CONST Long type=kotlin.Long value='-1' EXPRESSION_BODY
CONST Long type=kotlin.Long value='-1'
FUN public fun <get-test8>(): kotlin.Long
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test8>(): Long'
GET_BACKING_FIELD 'test8: Long' type=kotlin.Long operator=null
PROPERTY public val test9: kotlin.Double = 1.0.toDouble() PROPERTY public val test9: kotlin.Double = 1.0.toDouble()
EXPRESSION_BODY FIELD public val test9: kotlin.Double = 1.0.toDouble()
CONST Double type=kotlin.Double value='1.0' EXPRESSION_BODY
CONST Double type=kotlin.Double value='1.0'
FUN public fun <get-test9>(): kotlin.Double
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test9>(): Double'
GET_BACKING_FIELD 'test9: Double' type=kotlin.Double operator=null
PROPERTY public val test10: kotlin.Double = -1.0.toDouble() PROPERTY public val test10: kotlin.Double = -1.0.toDouble()
EXPRESSION_BODY FIELD public val test10: kotlin.Double = -1.0.toDouble()
CONST Double type=kotlin.Double value='-1.0' EXPRESSION_BODY
CONST Double type=kotlin.Double value='-1.0'
FUN public fun <get-test10>(): kotlin.Double
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test10>(): Double'
GET_BACKING_FIELD 'test10: Double' type=kotlin.Double operator=null
PROPERTY public val test11: kotlin.Float = 1.0.toFloat() PROPERTY public val test11: kotlin.Float = 1.0.toFloat()
EXPRESSION_BODY FIELD public val test11: kotlin.Float = 1.0.toFloat()
CONST Float type=kotlin.Float value='1.0' EXPRESSION_BODY
CONST Float type=kotlin.Float value='1.0'
FUN public fun <get-test11>(): kotlin.Float
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test11>(): Float'
GET_BACKING_FIELD 'test11: Float' type=kotlin.Float operator=null
PROPERTY public val test12: kotlin.Float = -1.0.toFloat() PROPERTY public val test12: kotlin.Float = -1.0.toFloat()
EXPRESSION_BODY FIELD public val test12: kotlin.Float = -1.0.toFloat()
CONST Float type=kotlin.Float value='-1.0' EXPRESSION_BODY
CONST Float type=kotlin.Float value='-1.0'
FUN public fun <get-test12>(): kotlin.Float
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test12>(): Float'
GET_BACKING_FIELD 'test12: Float' type=kotlin.Float operator=null
PROPERTY public val test13: kotlin.Char = \u0061 ('a') PROPERTY public val test13: kotlin.Char = \u0061 ('a')
EXPRESSION_BODY FIELD public val test13: kotlin.Char = \u0061 ('a')
CONST Char type=kotlin.Char value='a' EXPRESSION_BODY
CONST Char type=kotlin.Char value='a'
FUN public fun <get-test13>(): kotlin.Char
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test13>(): Char'
GET_BACKING_FIELD 'test13: Char' type=kotlin.Char operator=null
PROPERTY public val testB: kotlin.Byte = 1.toByte() PROPERTY public val testB: kotlin.Byte = 1.toByte()
EXPRESSION_BODY FIELD public val testB: kotlin.Byte = 1.toByte()
CONST Byte type=kotlin.Byte value='1' EXPRESSION_BODY
CONST Byte type=kotlin.Byte value='1'
FUN public fun <get-testB>(): kotlin.Byte
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testB>(): Byte'
GET_BACKING_FIELD 'testB: Byte' type=kotlin.Byte operator=null
PROPERTY public val testS: kotlin.Short = 1.toShort() PROPERTY public val testS: kotlin.Short = 1.toShort()
EXPRESSION_BODY FIELD public val testS: kotlin.Short = 1.toShort()
CONST Short type=kotlin.Short value='1' EXPRESSION_BODY
CONST Short type=kotlin.Short value='1'
FUN public fun <get-testS>(): kotlin.Short
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testS>(): Short'
GET_BACKING_FIELD 'testS: Short' type=kotlin.Short operator=null
PROPERTY public val testI: kotlin.Int = 1 PROPERTY public val testI: kotlin.Int = 1
EXPRESSION_BODY FIELD public val testI: kotlin.Int = 1
CONST Int type=kotlin.Int value='1' EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
FUN public fun <get-testI>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testI>(): Int'
GET_BACKING_FIELD 'testI: Int' type=kotlin.Int operator=null
PROPERTY public val testL: kotlin.Long = 1.toLong() PROPERTY public val testL: kotlin.Long = 1.toLong()
EXPRESSION_BODY FIELD public val testL: kotlin.Long = 1.toLong()
CONST Long type=kotlin.Long value='1' EXPRESSION_BODY
CONST Long type=kotlin.Long value='1'
FUN public fun <get-testL>(): kotlin.Long
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testL>(): Long'
GET_BACKING_FIELD 'testL: Long' type=kotlin.Long operator=null
+16 -6
View File
@@ -1,12 +1,22 @@
FILE /references.kt FILE /references.kt
PROPERTY public val ok: kotlin.String = "OK" PROPERTY public val ok: kotlin.String = "OK"
EXPRESSION_BODY FIELD public val ok: kotlin.String = "OK"
CONST String type=kotlin.String value='OK' EXPRESSION_BODY
CONST String type=kotlin.String value='OK'
FUN public fun <get-ok>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-ok>(): String'
GET_BACKING_FIELD 'ok: String' type=kotlin.String operator=null
PROPERTY public val ok2: kotlin.String = "OK" PROPERTY public val ok2: kotlin.String = "OK"
EXPRESSION_BODY FIELD public val ok2: kotlin.String = "OK"
CALL '<get-ok>(): String' type=kotlin.String operator=GET_PROPERTY EXPRESSION_BODY
CALL '<get-ok>(): String' type=kotlin.String operator=GET_PROPERTY
FUN public fun <get-ok2>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-ok2>(): String'
GET_BACKING_FIELD 'ok2: String' type=kotlin.String operator=null
PROPERTY public val ok3: kotlin.String PROPERTY public val ok3: kotlin.String
PROPERTY_GETTER public fun <get-ok3>(): kotlin.String FUN public fun <get-ok3>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-ok3>(): String' RETURN type=kotlin.Nothing from='<get-ok3>(): String'
CONST String type=kotlin.String value='OK' CONST String type=kotlin.String value='OK'
@@ -29,7 +39,7 @@ FILE /references.kt
RETURN type=kotlin.Nothing from='test4(): String' RETURN type=kotlin.Nothing from='test4(): String'
CALL '<get-ok3>(): String' type=kotlin.String operator=GET_PROPERTY CALL '<get-ok3>(): String' type=kotlin.String operator=GET_PROPERTY
PROPERTY public val kotlin.String.okext: kotlin.String PROPERTY public val kotlin.String.okext: kotlin.String
PROPERTY_GETTER public fun kotlin.String.<get-okext>(): kotlin.String FUN public fun kotlin.String.<get-okext>(): kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-okext>() on String: String' RETURN type=kotlin.Nothing from='<get-okext>() on String: String'
CONST String type=kotlin.String value='OK' CONST String type=kotlin.String value='OK'
@@ -9,28 +9,68 @@ FILE /reflectionLiterals.kt
FUN public fun bar(): kotlin.Unit FUN public fun bar(): kotlin.Unit
BLOCK_BODY BLOCK_BODY
PROPERTY public val qux: kotlin.Int = 42 PROPERTY public val qux: kotlin.Int = 42
EXPRESSION_BODY FIELD public val qux: kotlin.Int = 42
CONST Int type=kotlin.Int value='42' EXPRESSION_BODY
CONST Int type=kotlin.Int value='42'
FUN public fun <get-qux>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-qux>(): Int'
GET_BACKING_FIELD 'qux: Int' type=kotlin.Int operator=null
PROPERTY public val test1: kotlin.reflect.KClass<A> PROPERTY public val test1: kotlin.reflect.KClass<A>
EXPRESSION_BODY FIELD public val test1: kotlin.reflect.KClass<A>
CLASS_REFERENCE 'A' type=kotlin.reflect.KClass<A> EXPRESSION_BODY
CLASS_REFERENCE 'A' type=kotlin.reflect.KClass<A>
FUN public fun <get-test1>(): kotlin.reflect.KClass<A>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): KClass<A>'
GET_BACKING_FIELD 'test1: KClass<A>' type=kotlin.reflect.KClass<A> operator=null
PROPERTY public val test2: kotlin.reflect.KClass<kotlin.Int> PROPERTY public val test2: kotlin.reflect.KClass<kotlin.Int>
EXPRESSION_BODY FIELD public val test2: kotlin.reflect.KClass<kotlin.Int>
GET_CLASS type=kotlin.reflect.KClass<kotlin.Int> EXPRESSION_BODY
CALL '<get-qux>(): Int' type=kotlin.Int operator=GET_PROPERTY GET_CLASS type=kotlin.reflect.KClass<kotlin.Int>
CALL '<get-qux>(): Int' type=kotlin.Int operator=GET_PROPERTY
FUN public fun <get-test2>(): kotlin.reflect.KClass<kotlin.Int>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): KClass<Int>'
GET_BACKING_FIELD 'test2: KClass<Int>' type=kotlin.reflect.KClass<kotlin.Int> operator=null
PROPERTY public val test3: kotlin.reflect.KFunction1<A, kotlin.Unit> PROPERTY public val test3: kotlin.reflect.KFunction1<A, kotlin.Unit>
EXPRESSION_BODY FIELD public val test3: kotlin.reflect.KFunction1<A, kotlin.Unit>
CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction1<A, kotlin.Unit> operator=null EXPRESSION_BODY
CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction1<A, kotlin.Unit> operator=null
FUN public fun <get-test3>(): kotlin.reflect.KFunction1<A, kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): KFunction1<A, Unit>'
GET_BACKING_FIELD 'test3: KFunction1<A, Unit>' type=kotlin.reflect.KFunction1<A, kotlin.Unit> operator=null
PROPERTY public val test4: kotlin.reflect.KFunction0<A> PROPERTY public val test4: kotlin.reflect.KFunction0<A>
EXPRESSION_BODY FIELD public val test4: kotlin.reflect.KFunction0<A>
CALLABLE_REFERENCE 'constructor A()' type=kotlin.reflect.KFunction0<A> operator=null EXPRESSION_BODY
CALLABLE_REFERENCE 'constructor A()' type=kotlin.reflect.KFunction0<A> operator=null
FUN public fun <get-test4>(): kotlin.reflect.KFunction0<A>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): KFunction0<A>'
GET_BACKING_FIELD 'test4: KFunction0<A>' type=kotlin.reflect.KFunction0<A> operator=null
PROPERTY public val test5: kotlin.reflect.KFunction0<kotlin.Unit> PROPERTY public val test5: kotlin.reflect.KFunction0<kotlin.Unit>
EXPRESSION_BODY FIELD public val test5: kotlin.reflect.KFunction0<kotlin.Unit>
CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null EXPRESSION_BODY
$this: CALL 'constructor A()' type=A operator=null CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
$this: CALL 'constructor A()' type=A operator=null
FUN public fun <get-test5>(): kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test5>(): KFunction0<Unit>'
GET_BACKING_FIELD 'test5: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
PROPERTY public val test6: kotlin.reflect.KFunction0<kotlin.Unit> PROPERTY public val test6: kotlin.reflect.KFunction0<kotlin.Unit>
EXPRESSION_BODY FIELD public val test6: kotlin.reflect.KFunction0<kotlin.Unit>
CALLABLE_REFERENCE 'bar(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null EXPRESSION_BODY
CALLABLE_REFERENCE 'bar(): Unit' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
FUN public fun <get-test6>(): kotlin.reflect.KFunction0<kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test6>(): KFunction0<Unit>'
GET_BACKING_FIELD 'test6: KFunction0<Unit>' type=kotlin.reflect.KFunction0<kotlin.Unit> operator=null
PROPERTY public val test7: kotlin.reflect.KProperty0<kotlin.Int> PROPERTY public val test7: kotlin.reflect.KProperty0<kotlin.Int>
EXPRESSION_BODY FIELD public val test7: kotlin.reflect.KProperty0<kotlin.Int>
CALLABLE_REFERENCE 'qux: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null EXPRESSION_BODY
CALLABLE_REFERENCE 'qux: Int' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null
FUN public fun <get-test7>(): kotlin.reflect.KProperty0<kotlin.Int>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test7>(): KProperty0<Int>'
GET_BACKING_FIELD 'test7: KProperty0<Int>' type=kotlin.reflect.KProperty0<kotlin.Int> operator=null
@@ -5,11 +5,11 @@ FILE /safeCallWithIncrementDecrement.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='C' INSTANCE_INITIALIZER_CALL classDescriptor='C'
PROPERTY public var test.C?.p: kotlin.Int PROPERTY public var test.C?.p: kotlin.Int
PROPERTY_GETTER public fun test.C?.<get-p>(): kotlin.Int FUN public fun test.C?.<get-p>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-p>() on C?: Int' RETURN type=kotlin.Nothing from='<get-p>() on C?: Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
PROPERTY_SETTER public fun test.C?.<set-p>(value: kotlin.Int): kotlin.Unit FUN public fun test.C?.<set-p>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
FUN public operator fun kotlin.Int?.inc(): kotlin.Int? FUN public operator fun kotlin.Int?.inc(): kotlin.Int?
BLOCK_BODY BLOCK_BODY
+3 -2
View File
@@ -5,8 +5,9 @@ FILE /safeCalls.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Ref' INSTANCE_INITIALIZER_CALL classDescriptor='Ref'
PROPERTY public final var value: kotlin.Int PROPERTY public final var value: kotlin.Int
EXPRESSION_BODY FIELD public final var value: kotlin.Int
GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER EXPRESSION_BODY
GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER
CLASS INTERFACE IHost CLASS INTERFACE IHost
FUN public open fun kotlin.String.extLength(): kotlin.Int FUN public open fun kotlin.String.extLength(): kotlin.Int
BLOCK_BODY BLOCK_BODY
-2
View File
@@ -8,5 +8,3 @@ var testVarWithAccessors: Int
// 1 FUN public fun testFun // 1 FUN public fun testFun
// 1 PROPERTY public val testSimpleVal // 1 PROPERTY public val testSimpleVal
// 2 PROPERTY_GETTER
// 1 PROPERTY_SETTER
+21 -7
View File
@@ -4,20 +4,34 @@ FILE /smoke.kt
RETURN type=kotlin.Nothing from='testFun(): String' RETURN type=kotlin.Nothing from='testFun(): String'
CONST String type=kotlin.String value='OK' CONST String type=kotlin.String value='OK'
PROPERTY public val testSimpleVal: kotlin.Int = 1 PROPERTY public val testSimpleVal: kotlin.Int = 1
EXPRESSION_BODY FIELD public val testSimpleVal: kotlin.Int = 1
CONST Int type=kotlin.Int value='1' EXPRESSION_BODY
CONST Int type=kotlin.Int value='1'
FUN public fun <get-testSimpleVal>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testSimpleVal>(): Int'
GET_BACKING_FIELD 'testSimpleVal: Int' type=kotlin.Int operator=null
PROPERTY public val testValWithGetter: kotlin.Int PROPERTY public val testValWithGetter: kotlin.Int
PROPERTY_GETTER public fun <get-testValWithGetter>(): kotlin.Int FUN public fun <get-testValWithGetter>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testValWithGetter>(): Int' RETURN type=kotlin.Nothing from='<get-testValWithGetter>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
PROPERTY public var testSimpleVar: kotlin.Int PROPERTY public var testSimpleVar: kotlin.Int
EXPRESSION_BODY FIELD public var testSimpleVar: kotlin.Int
CONST Int type=kotlin.Int value='2' EXPRESSION_BODY
CONST Int type=kotlin.Int value='2'
FUN public fun <get-testSimpleVar>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testSimpleVar>(): Int'
GET_BACKING_FIELD 'testSimpleVar: Int' type=kotlin.Int operator=null
FUN public fun <set-testSimpleVar>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_BACKING_FIELD 'testSimpleVar: Int' type=kotlin.Unit operator=null
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int operator=null
PROPERTY public var testVarWithAccessors: kotlin.Int PROPERTY public var testVarWithAccessors: kotlin.Int
PROPERTY_GETTER public fun <get-testVarWithAccessors>(): kotlin.Int FUN public fun <get-testVarWithAccessors>(): kotlin.Int
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-testVarWithAccessors>(): Int' RETURN type=kotlin.Nothing from='<get-testVarWithAccessors>(): Int'
CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='42'
PROPERTY_SETTER public fun <set-testVarWithAccessors>(v: kotlin.Int): kotlin.Unit FUN public fun <set-testVarWithAccessors>(v: kotlin.Int): kotlin.Unit
BLOCK_BODY BLOCK_BODY
+50 -18
View File
@@ -4,30 +4,62 @@ FILE /stringTemplates.kt
RETURN type=kotlin.Nothing from='foo(): String' RETURN type=kotlin.Nothing from='foo(): String'
CONST String type=kotlin.String value='' CONST String type=kotlin.String value=''
PROPERTY public val test1: kotlin.String = "" PROPERTY public val test1: kotlin.String = ""
EXPRESSION_BODY FIELD public val test1: kotlin.String = ""
CONST String type=kotlin.String value='' EXPRESSION_BODY
CONST String type=kotlin.String value=''
FUN public fun <get-test1>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): String'
GET_BACKING_FIELD 'test1: String' type=kotlin.String operator=null
PROPERTY public val test2: kotlin.String = "abc" PROPERTY public val test2: kotlin.String = "abc"
EXPRESSION_BODY FIELD public val test2: kotlin.String = "abc"
CONST String type=kotlin.String value='abc' EXPRESSION_BODY
CONST String type=kotlin.String value='abc'
FUN public fun <get-test2>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): String'
GET_BACKING_FIELD 'test2: String' type=kotlin.String operator=null
PROPERTY public val test3: kotlin.String = "" PROPERTY public val test3: kotlin.String = ""
EXPRESSION_BODY FIELD public val test3: kotlin.String = ""
CONST String type=kotlin.String value='' EXPRESSION_BODY
CONST String type=kotlin.String value=''
FUN public fun <get-test3>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): String'
GET_BACKING_FIELD 'test3: String' type=kotlin.String operator=null
PROPERTY public val test4: kotlin.String = "abc" PROPERTY public val test4: kotlin.String = "abc"
EXPRESSION_BODY FIELD public val test4: kotlin.String = "abc"
CONST String type=kotlin.String value='abc' EXPRESSION_BODY
CONST String type=kotlin.String value='abc'
FUN public fun <get-test4>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): String'
GET_BACKING_FIELD 'test4: String' type=kotlin.String operator=null
PROPERTY public val test5: kotlin.String = " PROPERTY public val test5: kotlin.String = "
abc abc
" "
EXPRESSION_BODY FIELD public val test5: kotlin.String = "
STRING_CONCATENATION type=kotlin.String abc
CONST String type=kotlin.String value=' "
EXPRESSION_BODY
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value='
' '
CONST String type=kotlin.String value='abc' CONST String type=kotlin.String value='abc'
CONST String type=kotlin.String value=' CONST String type=kotlin.String value='
' '
FUN public fun <get-test5>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test5>(): String'
GET_BACKING_FIELD 'test5: String' type=kotlin.String operator=null
PROPERTY public val test6: kotlin.String PROPERTY public val test6: kotlin.String
EXPRESSION_BODY FIELD public val test6: kotlin.String
STRING_CONCATENATION type=kotlin.String EXPRESSION_BODY
CALL '<get-test1>(): String' type=kotlin.String operator=GET_PROPERTY STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value=' ' CALL '<get-test1>(): String' type=kotlin.String operator=GET_PROPERTY
CALL 'foo(): String' type=kotlin.String operator=null CONST String type=kotlin.String value=' '
CALL 'foo(): String' type=kotlin.String operator=null
FUN public fun <get-test6>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test6>(): String'
GET_BACKING_FIELD 'test6: String' type=kotlin.String operator=null
+7 -2
View File
@@ -16,8 +16,13 @@ FILE /values.kt
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='A' INSTANCE_INITIALIZER_CALL classDescriptor='A'
PROPERTY public val a: kotlin.Int = 0 PROPERTY public val a: kotlin.Int = 0
EXPRESSION_BODY FIELD public val a: kotlin.Int = 0
CONST Int type=kotlin.Int value='0' EXPRESSION_BODY
CONST Int type=kotlin.Int value='0'
FUN public fun <get-a>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-a>(): Int'
GET_BACKING_FIELD 'a: Int' type=kotlin.Int operator=null
CLASS CLASS Z CLASS CLASS Z
CONSTRUCTOR public constructor Z() CONSTRUCTOR public constructor Z()
BLOCK_BODY BLOCK_BODY
+32 -17
View File
@@ -1,21 +1,36 @@
FILE /vararg.kt FILE /vararg.kt
PROPERTY public val test1: kotlin.Array<kotlin.String> PROPERTY public val test1: kotlin.Array<kotlin.String>
EXPRESSION_BODY FIELD public val test1: kotlin.Array<kotlin.String>
CALL 'arrayOf(vararg String): Array<String>' type=kotlin.Array<kotlin.String> operator=null EXPRESSION_BODY
CALL 'arrayOf(vararg String): Array<String>' type=kotlin.Array<kotlin.String> operator=null
FUN public fun <get-test1>(): kotlin.Array<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Array<String>'
GET_BACKING_FIELD 'test1: Array<String>' type=kotlin.Array<kotlin.String> operator=null
PROPERTY public val test2: kotlin.Array<kotlin.String> PROPERTY public val test2: kotlin.Array<kotlin.String>
EXPRESSION_BODY FIELD public val test2: kotlin.Array<kotlin.String>
CALL 'arrayOf(vararg String): Array<String>' type=kotlin.Array<kotlin.String> operator=null EXPRESSION_BODY
elements: VARARG type=Array<out String> varargElementType=String CALL 'arrayOf(vararg String): Array<String>' type=kotlin.Array<kotlin.String> operator=null
CONST String type=kotlin.String value='1' elements: VARARG type=Array<out String> varargElementType=String
CONST String type=kotlin.String value='2' CONST String type=kotlin.String value='1'
CONST String type=kotlin.String value='3' CONST String type=kotlin.String value='2'
CONST String type=kotlin.String value='3'
FUN public fun <get-test2>(): kotlin.Array<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): Array<String>'
GET_BACKING_FIELD 'test2: Array<String>' type=kotlin.Array<kotlin.String> operator=null
PROPERTY public val test3: kotlin.Array<kotlin.String> PROPERTY public val test3: kotlin.Array<kotlin.String>
EXPRESSION_BODY FIELD public val test3: kotlin.Array<kotlin.String>
CALL 'arrayOf(vararg String): Array<String>' type=kotlin.Array<kotlin.String> operator=null EXPRESSION_BODY
elements: VARARG type=Array<out String> varargElementType=String CALL 'arrayOf(vararg String): Array<String>' type=kotlin.Array<kotlin.String> operator=null
CONST String type=kotlin.String value='0' elements: VARARG type=Array<out String> varargElementType=String
SPREAD_ELEMENT CONST String type=kotlin.String value='0'
CALL '<get-test2>(): Array<String>' type=kotlin.Array<kotlin.String> operator=GET_PROPERTY SPREAD_ELEMENT
SPREAD_ELEMENT CALL '<get-test2>(): Array<String>' type=kotlin.Array<kotlin.String> operator=GET_PROPERTY
CALL '<get-test1>(): Array<String>' type=kotlin.Array<kotlin.String> operator=GET_PROPERTY SPREAD_ELEMENT
CONST String type=kotlin.String value='4' CALL '<get-test1>(): Array<String>' type=kotlin.Array<kotlin.String> operator=GET_PROPERTY
CONST String type=kotlin.String value='4'
FUN public fun <get-test3>(): kotlin.Array<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Array<String>'
GET_BACKING_FIELD 'test3: Array<String>' type=kotlin.Array<kotlin.String> operator=null
+11 -6
View File
@@ -1,8 +1,13 @@
FILE /anonymousFunction.kt FILE /anonymousFunction.kt
PROPERTY public val anonymous: () -> kotlin.Unit PROPERTY public val anonymous: () -> kotlin.Unit
EXPRESSION_BODY FIELD public val anonymous: () -> kotlin.Unit
BLOCK type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION EXPRESSION_BODY
FUN local final fun <no name provided>(): kotlin.Unit BLOCK type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION
BLOCK_BODY FUN local final fun <no name provided>(): kotlin.Unit
CALL 'println(): Unit' type=kotlin.Unit operator=null BLOCK_BODY
CALLABLE_REFERENCE '<no name provided>(): Unit' type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION CALL 'println(): Unit' type=kotlin.Unit operator=null
CALLABLE_REFERENCE '<no name provided>(): Unit' type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION
FUN public fun <get-anonymous>(): () -> kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-anonymous>(): () -> Unit'
GET_BACKING_FIELD 'anonymous: () -> Unit' type=() -> kotlin.Unit operator=null
+23 -13
View File
@@ -1,16 +1,26 @@
FILE /justLambda.kt FILE /justLambda.kt
PROPERTY public val test1: () -> kotlin.Int PROPERTY public val test1: () -> kotlin.Int
EXPRESSION_BODY FIELD public val test1: () -> kotlin.Int
BLOCK type=() -> kotlin.Int operator=LAMBDA EXPRESSION_BODY
FUN local final fun <anonymous>(): kotlin.Int BLOCK type=() -> kotlin.Int operator=LAMBDA
BLOCK_BODY FUN local final fun <anonymous>(): kotlin.Int
RETURN type=kotlin.Nothing from='<anonymous>(): Int' BLOCK_BODY
CONST Int type=kotlin.Int value='42' RETURN type=kotlin.Nothing from='<anonymous>(): Int'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE '<anonymous>(): Int' type=() -> kotlin.Int operator=LAMBDA
FUN public fun <get-test1>(): () -> kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): () -> Int'
GET_BACKING_FIELD 'test1: () -> Int' type=() -> kotlin.Int operator=null
PROPERTY public val test2: () -> kotlin.Unit PROPERTY public val test2: () -> kotlin.Unit
EXPRESSION_BODY FIELD public val test2: () -> kotlin.Unit
BLOCK type=() -> kotlin.Unit operator=LAMBDA EXPRESSION_BODY
FUN local final fun <anonymous>(): kotlin.Unit BLOCK type=() -> kotlin.Unit operator=LAMBDA
BLOCK_BODY FUN local final fun <anonymous>(): kotlin.Unit
RETURN type=kotlin.Nothing from='<anonymous>(): Unit' BLOCK_BODY
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit operator=LAMBDA RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
CALLABLE_REFERENCE '<anonymous>(): Unit' type=() -> kotlin.Unit operator=LAMBDA
FUN public fun <get-test2>(): () -> kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): () -> Unit'
GET_BACKING_FIELD 'test2: () -> Unit' type=() -> kotlin.Unit operator=null
@@ -11,7 +11,7 @@ FILE /multipleImplicitReceivers.kt
INSTANCE_INITIALIZER_CALL classDescriptor='B' INSTANCE_INITIALIZER_CALL classDescriptor='B'
CLASS INTERFACE IFoo CLASS INTERFACE IFoo
PROPERTY public open val A.foo: B PROPERTY public open val A.foo: B
PROPERTY_GETTER public open fun A.<get-foo>(): B FUN public open fun A.<get-foo>(): B
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-foo>() on A: B' RETURN type=kotlin.Nothing from='<get-foo>() on A: B'
GET_OBJECT 'B' type=B GET_OBJECT 'B' type=B