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