Switch to auto generated IR tree

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
This commit is contained in:
mcpiroman
2021-10-21 19:55:56 +02:00
committed by Alexander Udalov
parent c6608de879
commit 529c03ab08
134 changed files with 4524 additions and 640 deletions
+21
View File
@@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Generate IR tree" type="GradleRunConfiguration" factoryName="Gradle" folderName="Generators">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/compiler/ir/ir.tree" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="generateTree" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
<method v="2" />
</configuration>
</component>
@@ -110,33 +110,35 @@ class ScriptGenerator(declarationGenerator: DeclarationGenerator) : DeclarationG
makeParameter(it.thisAsReceiverParameter, IrDeclarationOrigin.SCRIPT_IMPLICIT_RECEIVER, parametersIndex++) makeParameter(it.thisAsReceiverParameter, IrDeclarationOrigin.SCRIPT_IMPLICIT_RECEIVER, parametersIndex++)
} }
irScript.providedProperties = descriptor.scriptProvidedProperties.zip(descriptor.scriptProvidedPropertiesParameters) descriptor.scriptProvidedProperties.zip(descriptor.scriptProvidedPropertiesParameters) { providedProperty, parameter ->
.map { (providedProperty, parameter) -> // TODO: initializer
// TODO: initializer // TODO: do not keep direct links
// TODO: do not keep direct links val type = providedProperty.type.toIrType()
val type = providedProperty.type.toIrType() val valueParameter = context.symbolTable.declareValueParameter(
val valueParameter = context.symbolTable.declareValueParameter( UNDEFINED_OFFSET, UNDEFINED_OFFSET,
IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY, parameter, type
) { symbol ->
context.irFactory.createValueParameter(
UNDEFINED_OFFSET, UNDEFINED_OFFSET, UNDEFINED_OFFSET, UNDEFINED_OFFSET,
IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY, parameter, type IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY, symbol, descriptor.name,
) { symbol -> parametersIndex, type, null, isCrossinline = false, isNoinline = false, isHidden = false, isAssignable = false
context.irFactory.createValueParameter( ).also { it.parent = irScript }
UNDEFINED_OFFSET, UNDEFINED_OFFSET,
IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY, symbol, descriptor.name,
parametersIndex, type, null, isCrossinline = false, isNoinline = false, isHidden = false, isAssignable = false
).also { it.parent = irScript }
}
parametersIndex++
val irProperty =
PropertyGenerator(declarationGenerator).generateSyntheticProperty(
ktScript,
providedProperty,
valueParameter,
generateSyntheticAccessors = true
)
irProperty.origin = IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY
irScript.statements += irProperty
valueParameter to irProperty.symbol
} }
parametersIndex++
val irProperty =
PropertyGenerator(declarationGenerator).generateSyntheticProperty(
ktScript,
providedProperty,
valueParameter,
generateSyntheticAccessors = true
)
irProperty.origin = IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY
irScript.statements += irProperty
valueParameter to irProperty.symbol
}.unzip().let { (params, props) ->
irScript.providedProperties = props
irScript.providedPropertiesParameters = params
}
irScript.constructor = with(IrFunctionBuilder().apply { irScript.constructor = with(IrFunctionBuilder().apply {
isPrimary = true isPrimary = true
@@ -155,7 +157,7 @@ class ScriptGenerator(declarationGenerator: DeclarationGenerator) : DeclarationG
addIfNotNull(irScript.earlierScriptsParameter) addIfNotNull(irScript.earlierScriptsParameter)
addAll(irScript.explicitCallParameters) addAll(irScript.explicitCallParameters)
addAll(irScript.implicitReceiversParameters) addAll(irScript.implicitReceiversParameters)
irScript.providedProperties.forEach { add(it.first) } addAll(irScript.providedPropertiesParameters)
} }
irConstructor.parent = irScript irConstructor.parent = irScript
irConstructor.metadata = DescriptorMetadataSource.Function(descriptor.unsubstitutedPrimaryConstructor) irConstructor.metadata = DescriptorMetadataSource.Function(descriptor.unsubstitutedPrimaryConstructor)
+50 -1
View File
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.ideaExt.idea
plugins { plugins {
kotlin("jvm") kotlin("jvm")
id("jps-compatible") id("jps-compatible")
@@ -10,10 +12,57 @@ dependencies {
implementation(project(":compiler:util")) implementation(project(":compiler:util"))
implementation(project(":compiler:config")) implementation(project(":compiler:config"))
compileOnly(project("tree-generator")) // Provided, so that IDEA can recognize references to this module in KDoc.
compileOnly(intellijCore()) compileOnly(intellijCore())
} }
sourceSets { sourceSets {
"main" { projectDefault() } "main" {
projectDefault()
this.java.srcDir("gen")
}
"test" {} "test" {}
} }
val generatorClasspath by configurations.creating
dependencies {
generatorClasspath(project("tree-generator"))
}
val generationRoot = projectDir.resolve("gen")
val generateTree by tasks.registering(NoDebugJavaExec::class) {
val generatorRoot = "$projectDir/tree-generator/src/"
val generatorConfigurationFiles = fileTree(generatorRoot) {
include("**/*.kt")
}
inputs.files(generatorConfigurationFiles)
outputs.dirs(generationRoot)
args(generationRoot)
workingDir = rootDir
classpath = generatorClasspath
main = "org.jetbrains.kotlin.ir.generator.MainKt"
systemProperties["line.separator"] = "\n"
}
val compileKotlin by tasks
compileKotlin.dependsOn(generateTree)
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions {
freeCompilerArgs += "-Xinline-classes"
}
}
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
apply(plugin = "idea")
idea {
this.module.generatedSourceDirs.add(generationRoot)
}
}
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir package org.jetbrains.kotlin.ir
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.rootElement
*/
interface IrElement { interface IrElement {
val startOffset: Int val startOffset: Int
@@ -3,6 +3,13 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir package org.jetbrains.kotlin.ir
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.statement
*/
interface IrStatement : IrElement interface IrStatement : IrElement
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor
@@ -12,9 +15,14 @@ import org.jetbrains.kotlin.ir.symbols.IrAnonymousInitializerSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.anonymousInitializer
*/
abstract class IrAnonymousInitializer : IrDeclarationBase() { abstract class IrAnonymousInitializer : IrDeclarationBase() {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassDescriptor // TODO special descriptor for anonymous initializer blocks abstract override val descriptor: ClassDescriptor
abstract override val symbol: IrAnonymousInitializerSymbol abstract override val symbol: IrAnonymousInitializerSymbol
abstract val isStatic: Boolean abstract val isStatic: Boolean
@@ -3,17 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.attributeContainer
*/
interface IrAttributeContainer : IrElement { interface IrAttributeContainer : IrElement {
/**
* An object which can be used as a key in the map in the backend-specific storage. If a brand new IR element is created, this property
* should be equal to that element itself. If an element is copied from some other element, its id should be copied as well.
*
* Note that an [attributeOwnerId] of any element must be an element, whose [attributeOwnerId] is itself. In other words,
* it shouldn't be needed to call this more than once to find the original attribute owner.
*/
var attributeOwnerId: IrAttributeContainer var attributeOwnerId: IrAttributeContainer
} }
@@ -3,9 +3,16 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.ClassKind
import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.descriptors.SourceElement
import org.jetbrains.kotlin.descriptors.ValueClassRepresentation
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.types.IrSimpleType
@@ -15,21 +22,32 @@ import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrClass : /**
IrDeclarationBase(), IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, * A leaf IR tree element.
IrDeclarationContainer, IrTypeParametersContainer, IrAttributeContainer, IrMetadataSourceOwner { * @sample org.jetbrains.kotlin.ir.generator.IrTree.class
*/
abstract class IrClass : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrDeclarationWithVisibility, IrTypeParametersContainer, IrDeclarationContainer,
IrAttributeContainer, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassDescriptor abstract override val descriptor: ClassDescriptor
abstract override val symbol: IrClassSymbol abstract override val symbol: IrClassSymbol
abstract val kind: ClassKind abstract val kind: ClassKind
abstract var modality: Modality abstract var modality: Modality
abstract val isCompanion: Boolean abstract val isCompanion: Boolean
abstract val isInner: Boolean abstract val isInner: Boolean
abstract val isData: Boolean abstract val isData: Boolean
abstract val isValue: Boolean abstract val isValue: Boolean
abstract val isExpect: Boolean abstract val isExpect: Boolean
abstract val isFun: Boolean abstract val isFun: Boolean
abstract val source: SourceElement abstract val source: SourceElement
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor
@@ -10,9 +13,14 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constructor
*/
abstract class IrConstructor : IrFunction() { abstract class IrConstructor : IrFunction() {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassConstructorDescriptor abstract override val descriptor: ClassConstructorDescriptor
abstract override val symbol: IrConstructorSymbol abstract override val symbol: IrConstructorSymbol
abstract val isPrimary: Boolean abstract val isPrimary: Boolean
@@ -3,12 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declaration
*/
interface IrDeclaration : IrStatement, IrSymbolOwner, IrMutableAnnotationContainer { interface IrDeclaration : IrStatement, IrSymbolOwner, IrMutableAnnotationContainer {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
val descriptor: DeclarationDescriptor val descriptor: DeclarationDescriptor
@@ -1,10 +1,17 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationBase
*/
abstract class IrDeclarationBase : IrElementBase(), IrDeclaration abstract class IrDeclarationBase : IrElementBase(), IrDeclaration
@@ -3,8 +3,16 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationContainer
*/
interface IrDeclarationContainer : IrDeclarationParent { interface IrDeclarationContainer : IrDeclarationParent {
val declarations: MutableList<IrDeclaration> val declarations: MutableList<IrDeclaration>
} }
@@ -1,10 +1,17 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationParent
*/
interface IrDeclarationParent : IrElement interface IrDeclarationParent : IrElement
@@ -1,12 +1,19 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationWithName
*/
interface IrDeclarationWithName : IrDeclaration { interface IrDeclarationWithName : IrDeclaration {
var name: Name var name: Name
} }
@@ -1,12 +1,19 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.DescriptorVisibility import org.jetbrains.kotlin.descriptors.DescriptorVisibility
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationWithVisibility
*/
interface IrDeclarationWithVisibility : IrDeclaration { interface IrDeclarationWithVisibility : IrDeclaration {
var visibility: DescriptorVisibility var visibility: DescriptorVisibility
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor
@@ -12,14 +15,20 @@ import org.jetbrains.kotlin.ir.symbols.IrEnumEntrySymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.enumEntry
*/
abstract class IrEnumEntry : IrDeclarationBase(), IrDeclarationWithName { abstract class IrEnumEntry : IrDeclarationBase(), IrDeclarationWithName {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassDescriptor abstract override val descriptor: ClassDescriptor
abstract override val symbol: IrEnumEntrySymbol abstract override val symbol: IrEnumEntrySymbol
abstract var correspondingClass: IrClass?
abstract var initializerExpression: IrExpressionBody? abstract var initializerExpression: IrExpressionBody?
abstract var correspondingClass: IrClass?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitEnumEntry(this, data) visitor.visitEnumEntry(this, data)
@@ -3,15 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.errorDeclaration
*/
abstract class IrErrorDeclaration : IrDeclarationBase() { abstract class IrErrorDeclaration : IrDeclarationBase() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitErrorDeclaration(this, data)
override val symbol: IrSymbol override val symbol: IrSymbol
get() = error("Should never be called") get() = error("Should never be called")
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitErrorDeclaration(this, data)
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.symbols.IrExternalPackageFragmentSymbol import org.jetbrains.kotlin.ir.symbols.IrExternalPackageFragmentSymbol
@@ -11,8 +14,13 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.externalPackageFragment
*/
abstract class IrExternalPackageFragment : IrPackageFragment() { abstract class IrExternalPackageFragment : IrPackageFragment() {
abstract override val symbol: IrExternalPackageFragmentSymbol abstract override val symbol: IrExternalPackageFragmentSymbol
abstract val containerSource: DeserializedContainerSource? abstract val containerSource: DeserializedContainerSource?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,17 +3,24 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.fakeOverrideFunction
*/
interface IrFakeOverrideFunction : IrDeclaration { interface IrFakeOverrideFunction : IrDeclaration {
override val symbol: IrSimpleFunctionSymbol override val symbol: IrSimpleFunctionSymbol
var modality: Modality var modality: Modality
fun acquireSymbol(symbol: IrSimpleFunctionSymbol): IrSimpleFunction
val isBound: Boolean val isBound: Boolean
fun acquireSymbol(symbol: IrSimpleFunctionSymbol): IrSimpleFunction
} }
@@ -3,19 +3,28 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.fakeOverrideProperty
*/
interface IrFakeOverrideProperty : IrDeclaration { interface IrFakeOverrideProperty : IrDeclaration {
override val symbol: IrPropertySymbol override val symbol: IrPropertySymbol
var modality: Modality var modality: Modality
var getter: IrSimpleFunction? var getter: IrSimpleFunction?
var setter: IrSimpleFunction? var setter: IrSimpleFunction?
fun acquireSymbol(symbol: IrPropertySymbol): IrProperty
val isBound: Boolean val isBound: Boolean
fun acquireSymbol(symbol: IrPropertySymbol): IrProperty
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
@@ -14,16 +17,21 @@ import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrField : /**
IrDeclarationBase(), * A leaf IR tree element.
IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner { * @sample org.jetbrains.kotlin.ir.generator.IrTree.field
*/
abstract class IrField : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: PropertyDescriptor abstract override val descriptor: PropertyDescriptor
abstract override val symbol: IrFieldSymbol abstract override val symbol: IrFieldSymbol
abstract var type: IrType abstract var type: IrType
abstract val isFinal: Boolean abstract val isFinal: Boolean
abstract val isStatic: Boolean abstract val isStatic: Boolean
abstract var initializer: IrExpressionBody? abstract var initializer: IrExpressionBody?
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.IrFileEntry import org.jetbrains.kotlin.ir.IrFileEntry
@@ -11,7 +14,12 @@ import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrFile : IrPackageFragment(), IrMutableAnnotationContainer, IrMetadataSourceOwner { /**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.file
*/
abstract class IrFile : IrPackageFragment(), IrMetadataSourceOwner,
IrMutableAnnotationContainer {
abstract override val symbol: IrFileSymbol abstract override val symbol: IrFileSymbol
abstract val module: IrModuleFragment abstract val module: IrModuleFragment
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor
@@ -14,49 +17,47 @@ import org.jetbrains.kotlin.ir.util.transformIfNeeded
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrFunction : /**
IrDeclarationBase(), * A non-leaf IR tree element.
IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent, IrReturnTarget, * @sample org.jetbrains.kotlin.ir.generator.IrTree.function
IrMemberWithContainerSource, */
IrMetadataSourceOwner { abstract class IrFunction : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent,
IrReturnTarget, IrMemberWithContainerSource, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: FunctionDescriptor abstract override val descriptor: FunctionDescriptor
abstract override val symbol: IrFunctionSymbol abstract override val symbol: IrFunctionSymbol
abstract val isInline: Boolean // NB: there's an inline constructor for Array and each primitive array class abstract val isInline: Boolean
abstract val isExpect: Boolean abstract val isExpect: Boolean
abstract var returnType: IrType abstract var returnType: IrType
abstract var dispatchReceiverParameter: IrValueParameter? abstract var dispatchReceiverParameter: IrValueParameter?
abstract var extensionReceiverParameter: IrValueParameter? abstract var extensionReceiverParameter: IrValueParameter?
abstract var valueParameters: List<IrValueParameter> abstract var valueParameters: List<IrValueParameter>
/**
* The first `contextReceiverParametersCount` value parameters are context receivers
*/
abstract var contextReceiverParametersCount: Int abstract var contextReceiverParametersCount: Int
abstract var body: IrBody? abstract var body: IrBody?
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
typeParameters.forEach { it.accept(visitor, data) } typeParameters.forEach { it.accept(visitor, data) }
dispatchReceiverParameter?.accept(visitor, data) dispatchReceiverParameter?.accept(visitor, data)
extensionReceiverParameter?.accept(visitor, data) extensionReceiverParameter?.accept(visitor, data)
valueParameters.forEach { it.accept(visitor, data) } valueParameters.forEach { it.accept(visitor, data) }
body?.accept(visitor, data) body?.accept(visitor, data)
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
typeParameters = typeParameters.transformIfNeeded(transformer, data) typeParameters = typeParameters.transformIfNeeded(transformer, data)
dispatchReceiverParameter = dispatchReceiverParameter?.transform(transformer, data) dispatchReceiverParameter = dispatchReceiverParameter?.transform(transformer, data)
extensionReceiverParameter = extensionReceiverParameter?.transform(transformer, data) extensionReceiverParameter = extensionReceiverParameter?.transform(transformer, data)
valueParameters = valueParameters.transformIfNeeded(transformer, data) valueParameters = valueParameters.transformIfNeeded(transformer, data)
body = body?.transform(transformer, data) body = body?.transform(transformer, data)
} }
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors
@@ -12,21 +15,25 @@ import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrLocalDelegatedProperty : /**
IrDeclarationBase(), * A leaf IR tree element.
IrDeclarationWithName, * @sample org.jetbrains.kotlin.ir.generator.IrTree.localDelegatedProperty
IrSymbolOwner, */
IrMetadataSourceOwner { abstract class IrLocalDelegatedProperty : IrDeclarationBase(), IrDeclarationWithName,
IrSymbolOwner, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: VariableDescriptorWithAccessors abstract override val descriptor: VariableDescriptorWithAccessors
abstract override val symbol: IrLocalDelegatedPropertySymbol abstract override val symbol: IrLocalDelegatedPropertySymbol
abstract var type: IrType abstract var type: IrType
abstract val isVar: Boolean abstract val isVar: Boolean
abstract var delegate: IrVariable abstract var delegate: IrVariable
abstract var getter: IrSimpleFunction abstract var getter: IrSimpleFunction
abstract var setter: IrSimpleFunction? abstract var setter: IrSimpleFunction?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -1,12 +1,19 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.memberWithContainerSource
*/
interface IrMemberWithContainerSource : IrDeclarationWithName { interface IrMemberWithContainerSource : IrDeclarationWithName {
val containerSource: DeserializedContainerSource? val containerSource: DeserializedContainerSource?
} }
@@ -1,12 +1,19 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.metadataSourceOwner
*/
interface IrMetadataSourceOwner : IrElement { interface IrMetadataSourceOwner : IrElement {
var metadata: MetadataSource? var metadata: MetadataSource?
} }
@@ -3,10 +3,14 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.ir.IrBuiltIns import org.jetbrains.kotlin.ir.IrBuiltIns
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
import org.jetbrains.kotlin.ir.util.transformInPlace import org.jetbrains.kotlin.ir.util.transformInPlace
@@ -14,10 +18,17 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
abstract class IrModuleFragment : IrElementBase() { /**
abstract val name: Name * A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.moduleFragment
*/
abstract class IrModuleFragment : IrElementBase(), IrElement {
abstract val descriptor: ModuleDescriptor abstract val descriptor: ModuleDescriptor
abstract val name: Name
abstract val irBuiltins: IrBuiltIns abstract val irBuiltins: IrBuiltIns
abstract val files: MutableList<IrFile> abstract val files: MutableList<IrFile>
override val startOffset: Int override val startOffset: Int
@@ -29,8 +40,8 @@ abstract class IrModuleFragment : IrElementBase() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitModuleFragment(this, data) visitor.visitModuleFragment(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrModuleFragment = override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
accept(transformer, data) as IrModuleFragment IrModuleFragment = accept(transformer, data) as IrModuleFragment
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
files.forEach { it.accept(visitor, data) } files.forEach { it.accept(visitor, data) }
@@ -1,14 +1,23 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.overridableDeclaration
*/
interface IrOverridableDeclaration<S : IrSymbol> : IrOverridableMember { interface IrOverridableDeclaration<S : IrSymbol> : IrOverridableMember {
override val symbol: S override val symbol: S
val isFakeOverride: Boolean val isFakeOverride: Boolean
var overriddenSymbols: List<S> var overriddenSymbols: List<S>
} }
@@ -1,12 +1,20 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.Modality
interface IrOverridableMember : IrDeclarationWithVisibility, IrDeclarationWithName, IrSymbolOwner { /**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.overridableMember
*/
interface IrOverridableMember : IrDeclaration, IrDeclarationWithVisibility,
IrDeclarationWithName, IrSymbolOwner {
val modality: Modality val modality: Modality
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
@@ -11,10 +14,15 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.symbols.IrPackageFragmentSymbol import org.jetbrains.kotlin.ir.symbols.IrPackageFragmentSymbol
import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqName
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.packageFragment
*/
abstract class IrPackageFragment : IrElementBase(), IrDeclarationContainer, IrSymbolOwner { abstract class IrPackageFragment : IrElementBase(), IrDeclarationContainer, IrSymbolOwner {
abstract override val symbol: IrPackageFragmentSymbol
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract val packageFragmentDescriptor: PackageFragmentDescriptor abstract val packageFragmentDescriptor: PackageFragmentDescriptor
abstract override val symbol: IrPackageFragmentSymbol
abstract val fqName: FqName abstract val fqName: FqName
} }
@@ -1,10 +1,18 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.possiblyExternalDeclaration
*/
interface IrPossiblyExternalDeclaration : IrDeclarationWithName { interface IrPossiblyExternalDeclaration : IrDeclarationWithName {
val isExternal: Boolean val isExternal: Boolean
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.PropertyDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor
@@ -11,27 +14,34 @@ import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrProperty : /**
IrDeclarationBase(), * A leaf IR tree element.
IrPossiblyExternalDeclaration, * @sample org.jetbrains.kotlin.ir.generator.IrTree.property
IrOverridableDeclaration<IrPropertySymbol>, */
IrMetadataSourceOwner, abstract class IrProperty : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrAttributeContainer, IrOverridableDeclaration<IrPropertySymbol>, IrMetadataSourceOwner, IrAttributeContainer,
IrMemberWithContainerSource { IrMemberWithContainerSource {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: PropertyDescriptor abstract override val descriptor: PropertyDescriptor
abstract override val symbol: IrPropertySymbol abstract override val symbol: IrPropertySymbol
abstract val isVar: Boolean abstract val isVar: Boolean
abstract val isConst: Boolean abstract val isConst: Boolean
abstract val isLateinit: Boolean abstract val isLateinit: Boolean
abstract val isDelegated: Boolean abstract val isDelegated: Boolean
abstract val isExpect: Boolean abstract val isExpect: Boolean
abstract override val isFakeOverride: Boolean abstract override val isFakeOverride: Boolean
abstract var backingField: IrField? abstract var backingField: IrField?
abstract var getter: IrSimpleFunction? abstract var getter: IrSimpleFunction?
abstract var setter: IrSimpleFunction? abstract var setter: IrSimpleFunction?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -45,7 +55,7 @@ abstract class IrProperty :
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
backingField = backingField?.transform(transformer, data) as? IrField backingField = backingField?.transform(transformer, data) as? IrField
getter = getter?.run { transform(transformer, data) as IrSimpleFunction } getter = getter?.transform(transformer, data) as? IrSimpleFunction
setter = setter?.run { transform(transformer, data) as IrSimpleFunction } setter = setter?.transform(transformer, data) as? IrSimpleFunction
} }
} }
@@ -3,12 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.returnTarget
*/
interface IrReturnTarget : IrSymbolOwner { interface IrReturnTarget : IrSymbolOwner {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
val descriptor: FunctionDescriptor val descriptor: FunctionDescriptor
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.expressions.IrStatementContainer import org.jetbrains.kotlin.ir.expressions.IrStatementContainer
@@ -10,20 +13,19 @@ import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
import org.jetbrains.kotlin.ir.symbols.IrScriptSymbol import org.jetbrains.kotlin.ir.symbols.IrScriptSymbol
import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.util.transformIfNeeded
import org.jetbrains.kotlin.ir.util.transformInPlace import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
//TODO: make IrScript as IrPackageFragment, because script is used as a file, not as a class /**
//NOTE: declarations and statements stored separately * A leaf IR tree element.
abstract class IrScript : * @sample org.jetbrains.kotlin.ir.generator.IrTree.script
IrDeclarationBase(), IrDeclarationWithName, */
IrDeclarationParent, IrStatementContainer, IrMetadataSourceOwner { abstract class IrScript : IrDeclarationBase(), IrDeclarationWithName, IrDeclarationParent,
IrStatementContainer, IrMetadataSourceOwner {
abstract override val symbol: IrScriptSymbol abstract override val symbol: IrScriptSymbol
// NOTE: is the result of the FE conversion, because there script interpreted as a class and has receiver
// TODO: consider removing from here and handle appropriately in the lowering
abstract var thisReceiver: IrValueParameter abstract var thisReceiver: IrValueParameter
abstract var baseClass: IrType abstract var baseClass: IrType
@@ -32,7 +34,9 @@ abstract class IrScript :
abstract var implicitReceiversParameters: List<IrValueParameter> abstract var implicitReceiversParameters: List<IrValueParameter>
abstract var providedProperties: List<Pair<IrValueParameter, IrPropertySymbol>> abstract var providedProperties: List<IrPropertySymbol>
abstract var providedPropertiesParameters: List<IrValueParameter>
abstract var resultProperty: IrPropertySymbol? abstract var resultProperty: IrPropertySymbol?
@@ -52,16 +56,18 @@ abstract class IrScript :
thisReceiver.accept(visitor, data) thisReceiver.accept(visitor, data)
explicitCallParameters.forEach { it.accept(visitor, data) } explicitCallParameters.forEach { it.accept(visitor, data) }
implicitReceiversParameters.forEach { it.accept(visitor, data) } implicitReceiversParameters.forEach { it.accept(visitor, data) }
providedProperties.forEach { it.first.accept(visitor, data) } providedPropertiesParameters.forEach { it.accept(visitor, data) }
earlierScriptsParameter?.accept(visitor, data) earlierScriptsParameter?.accept(visitor, data)
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
statements.transformInPlace(transformer, data) statements.transformInPlace(transformer, data)
thisReceiver = thisReceiver.transform(transformer, data) thisReceiver = thisReceiver.transform(transformer, data)
explicitCallParameters = explicitCallParameters.map { it.transform(transformer, data) } explicitCallParameters = explicitCallParameters.transformIfNeeded(transformer, data)
implicitReceiversParameters = implicitReceiversParameters.map { it.transform(transformer, data) } implicitReceiversParameters = implicitReceiversParameters.transformIfNeeded(transformer,
providedProperties = providedProperties.map { it.first.transform(transformer, data) to it.second } data)
providedPropertiesParameters = providedPropertiesParameters.transformIfNeeded(transformer,
data)
earlierScriptsParameter = earlierScriptsParameter?.transform(transformer, data) earlierScriptsParameter = earlierScriptsParameter?.transform(transformer, data)
} }
} }
@@ -3,23 +3,31 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrSimpleFunction : /**
IrFunction(), * A leaf IR tree element.
IrOverridableDeclaration<IrSimpleFunctionSymbol>, * @sample org.jetbrains.kotlin.ir.generator.IrTree.simpleFunction
IrAttributeContainer { */
abstract class IrSimpleFunction : IrFunction(),
IrOverridableDeclaration<IrSimpleFunctionSymbol>, IrAttributeContainer {
abstract override val symbol: IrSimpleFunctionSymbol abstract override val symbol: IrSimpleFunctionSymbol
abstract val isTailrec: Boolean abstract val isTailrec: Boolean
abstract val isSuspend: Boolean abstract val isSuspend: Boolean
abstract override val isFakeOverride: Boolean abstract override val isFakeOverride: Boolean
abstract val isOperator: Boolean abstract val isOperator: Boolean
abstract val isInfix: Boolean abstract val isInfix: Boolean
abstract var correspondingPropertySymbol: IrPropertySymbol? abstract var correspondingPropertySymbol: IrPropertySymbol?
@@ -1,13 +1,20 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.symbolOwner
*/
interface IrSymbolOwner : IrElement { interface IrSymbolOwner : IrElement {
val symbol: IrSymbol val symbol: IrSymbol
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.TypeAliasDescriptor import org.jetbrains.kotlin.descriptors.TypeAliasDescriptor
@@ -13,17 +16,19 @@ import org.jetbrains.kotlin.ir.util.transformIfNeeded
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrTypeAlias : /**
IrDeclarationBase(), * A leaf IR tree element.
IrDeclarationWithName, * @sample org.jetbrains.kotlin.ir.generator.IrTree.typeAlias
IrDeclarationWithVisibility, */
IrTypeParametersContainer { abstract class IrTypeAlias : IrDeclarationBase(), IrDeclarationWithName,
IrDeclarationWithVisibility, IrTypeParametersContainer {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: TypeAliasDescriptor abstract override val descriptor: TypeAliasDescriptor
abstract override val symbol: IrTypeAliasSymbol abstract override val symbol: IrTypeAliasSymbol
abstract val isActual: Boolean abstract val isActual: Boolean
abstract var expandedType: IrType abstract var expandedType: IrType
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
@@ -13,19 +16,27 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.typeParameter
*/
abstract class IrTypeParameter : IrDeclarationBase(), IrDeclarationWithName { abstract class IrTypeParameter : IrDeclarationBase(), IrDeclarationWithName {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: TypeParameterDescriptor abstract override val descriptor: TypeParameterDescriptor
abstract override val symbol: IrTypeParameterSymbol abstract override val symbol: IrTypeParameterSymbol
abstract val variance: Variance abstract val variance: Variance
abstract val index: Int abstract val index: Int
abstract val isReified: Boolean abstract val isReified: Boolean
abstract var superTypes: List<IrType> abstract var superTypes: List<IrType>
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitTypeParameter(this, data) visitor.visitTypeParameter(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrTypeParameter = override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
transformer.visitTypeParameter(this, data) as IrTypeParameter IrTypeParameter = accept(transformer, data) as IrTypeParameter
} }
@@ -3,8 +3,16 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.typeParametersContainer
*/
interface IrTypeParametersContainer : IrDeclaration, IrDeclarationParent { interface IrTypeParametersContainer : IrDeclaration, IrDeclarationParent {
var typeParameters: List<IrTypeParameter> var typeParameters: List<IrTypeParameter>
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ValueDescriptor import org.jetbrains.kotlin.descriptors.ValueDescriptor
@@ -10,12 +13,17 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrType
abstract class IrValueDeclaration : IrDeclarationBase(), IrDeclarationWithName, IrSymbolOwner { /**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.valueDeclaration
*/
interface IrValueDeclaration : IrDeclarationWithName, IrSymbolOwner {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: ValueDescriptor override val descriptor: ValueDescriptor
abstract override val symbol: IrValueSymbol override val symbol: IrValueSymbol
abstract var type: IrType
abstract val isAssignable: Boolean var type: IrType
val isAssignable: Boolean
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ParameterDescriptor import org.jetbrains.kotlin.descriptors.ParameterDescriptor
@@ -13,20 +16,24 @@ import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrValueParameter : IrValueDeclaration() { /**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.valueParameter
*/
abstract class IrValueParameter : IrDeclarationBase(), IrValueDeclaration {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: ParameterDescriptor abstract override val descriptor: ParameterDescriptor
abstract override val symbol: IrValueParameterSymbol abstract override val symbol: IrValueParameterSymbol
abstract val index: Int abstract val index: Int
abstract var varargElementType: IrType? abstract var varargElementType: IrType?
abstract val isCrossinline: Boolean abstract val isCrossinline: Boolean
abstract val isNoinline: Boolean abstract val isNoinline: Boolean
// if true parameter is not included into IdSignature.
// Skipping hidden params makes IrFunction be look similar to FE.
// NOTE: it is introduced to fix KT-40980 because more clear solution was not possible to implement.
// Once we are able to load any top-level declaration from klib this hack should be deprecated and removed.
abstract val isHidden: Boolean abstract val isHidden: Boolean
abstract var defaultValue: IrExpressionBody? abstract var defaultValue: IrExpressionBody?
@@ -34,8 +41,8 @@ abstract class IrValueParameter : IrValueDeclaration() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitValueParameter(this, data) visitor.visitValueParameter(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrValueParameter = override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
transformer.visitValueParameter(this, data) as IrValueParameter IrValueParameter = accept(transformer, data) as IrValueParameter
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
defaultValue?.accept(visitor, data) defaultValue?.accept(visitor, data)
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.declarations package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.VariableDescriptor import org.jetbrains.kotlin.descriptors.VariableDescriptor
@@ -12,13 +15,20 @@ import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrVariable : IrValueDeclaration() { /**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.variable
*/
abstract class IrVariable : IrDeclarationBase(), IrValueDeclaration {
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
abstract override val descriptor: VariableDescriptor abstract override val descriptor: VariableDescriptor
abstract override val symbol: IrVariableSymbol abstract override val symbol: IrVariableSymbol
abstract val isVar: Boolean abstract val isVar: Boolean
abstract val isConst: Boolean abstract val isConst: Boolean
abstract val isLateinit: Boolean abstract val isLateinit: Boolean
abstract var initializer: IrExpression? abstract var initializer: IrExpression?
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.block
*/
abstract class IrBlock : IrContainerExpression() { abstract class IrBlock : IrContainerExpression() {
override val isTransparentScope: Boolean override val isTransparentScope: Boolean
get() = false get() = false
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.declarations.IrFactory import org.jetbrains.kotlin.ir.declarations.IrFactory
@@ -10,6 +13,10 @@ import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.blockBody
*/
abstract class IrBlockBody : IrBody(), IrStatementContainer { abstract class IrBlockBody : IrBody(), IrStatementContainer {
abstract val factory: IrFactory abstract val factory: IrFactory
@@ -3,12 +3,20 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
abstract class IrBody : IrElementBase() { /**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.body
*/
abstract class IrBody : IrElementBase(), IrElement {
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrBody = override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrBody =
accept(transformer, data) as IrBody accept(transformer, data) as IrBody
} }
@@ -3,27 +3,36 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrBranch : IrElementBase() { /**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.branch
*/
abstract class IrBranch : IrElementBase(), IrElement {
abstract var condition: IrExpression abstract var condition: IrExpression
abstract var result: IrExpression abstract var result: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitBranch(this, data) visitor.visitBranch(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrBranch =
accept(transformer, data) as IrBranch
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
condition.accept(visitor, data) condition.accept(visitor, data)
result.accept(visitor, data) result.accept(visitor, data)
} }
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrBranch =
transformer.visitBranch(this, data)
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
condition = condition.transform(transformer, data) condition = condition.transform(transformer, data)
result = result.transform(transformer, data) result = result.transform(transformer, data)
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.break
*/
abstract class IrBreak : IrBreakContinue() { abstract class IrBreak : IrBreakContinue() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitBreak(this, data) visitor.visitBreak(this, data)
@@ -3,8 +3,16 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.breakContinue
*/
abstract class IrBreakContinue : IrExpression() { abstract class IrBreakContinue : IrExpression() {
abstract var loop: IrLoop abstract var loop: IrLoop
@@ -3,14 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.call
*/
abstract class IrCall : IrFunctionAccessExpression() { abstract class IrCall : IrFunctionAccessExpression() {
abstract override val symbol: IrSimpleFunctionSymbol abstract override val symbol: IrSimpleFunctionSymbol
abstract val superQualifierSymbol: IrClassSymbol? abstract val superQualifierSymbol: IrClassSymbol?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrSymbol
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.callableReference
*/
abstract class IrCallableReference<S : IrSymbol> : IrMemberAccessExpression<S>() { abstract class IrCallableReference<S : IrSymbol> : IrMemberAccessExpression<S>() {
abstract val referencedName: Name abstract val referencedName: Name
} }
@@ -3,28 +3,37 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.declarations.IrVariable import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrCatch : IrElementBase() { /**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.catch
*/
abstract class IrCatch : IrElementBase(), IrElement {
abstract var catchParameter: IrVariable abstract var catchParameter: IrVariable
abstract var result: IrExpression abstract var result: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitCatch(this, data) visitor.visitCatch(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrCatch =
accept(transformer, data) as IrCatch
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
catchParameter.accept(visitor, data) catchParameter.accept(visitor, data)
result.accept(visitor, data) result.accept(visitor, data)
} }
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrCatch =
super.transform(transformer, data) as IrCatch
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
catchParameter = catchParameter.transform(transformer, data) as IrVariable catchParameter = catchParameter.transform(transformer, data) as IrVariable
result = result.transform(transformer, data) result = result.transform(transformer, data)
@@ -3,14 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.classReference
*/
abstract class IrClassReference : IrDeclarationReference() { abstract class IrClassReference : IrDeclarationReference() {
abstract override val symbol: IrClassifierSymbol abstract override val symbol: IrClassifierSymbol
abstract var classType: IrType abstract var classType: IrType
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.composite
*/
abstract class IrComposite : IrContainerExpression() { abstract class IrComposite : IrContainerExpression() {
override val isTransparentScope: Boolean override val isTransparentScope: Boolean
get() = true get() = true
@@ -3,12 +3,20 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.const
*/
abstract class IrConst<T> : IrExpression() { abstract class IrConst<T> : IrExpression() {
abstract val kind: IrConstKind<T> abstract val kind: IrConstKind<T>
abstract val value: T abstract val value: T
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,12 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.util.transformInPlace import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constantArray
*/
abstract class IrConstantArray : IrConstantValue() { abstract class IrConstantArray : IrConstantValue() {
abstract val elements: MutableList<IrConstantValue> abstract val elements: MutableList<IrConstantValue>
@@ -16,10 +23,10 @@ abstract class IrConstantArray : IrConstantValue() {
visitor.visitConstantArray(this, data) visitor.visitConstantArray(this, data)
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
elements.forEach { value -> value.accept(visitor, data) } elements.forEach { it.accept(visitor, data) }
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
elements.transformInPlace { value -> value.transform(transformer, data) } elements.transformInPlace(transformer, data)
} }
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
@@ -11,19 +14,25 @@ import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constantObject
*/
abstract class IrConstantObject : IrConstantValue() { abstract class IrConstantObject : IrConstantValue() {
abstract val constructor: IrConstructorSymbol abstract val constructor: IrConstructorSymbol
abstract val valueArguments: MutableList<IrConstantValue> abstract val valueArguments: MutableList<IrConstantValue>
abstract val typeArguments: List<IrType> abstract val typeArguments: List<IrType>
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitConstantObject(this, data) visitor.visitConstantObject(this, data)
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
valueArguments.forEach { value -> value.accept(visitor, data) } valueArguments.forEach { it.accept(visitor, data) }
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
valueArguments.transformInPlace { it.transform(transformer, data) } valueArguments.transformInPlace(transformer, data)
} }
} }
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constantPrimitive
*/
abstract class IrConstantPrimitive : IrConstantValue() { abstract class IrConstantPrimitive : IrConstantValue() {
abstract var value: IrConst<*> abstract var value: IrConst<*>
@@ -3,9 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constantValue
*/
abstract class IrConstantValue : IrExpression() { abstract class IrConstantValue : IrExpression() {
abstract fun contentEquals(other: IrConstantValue): Boolean abstract fun contentEquals(other: IrConstantValue): Boolean
abstract fun contentHashCode(): Int abstract fun contentHashCode(): Int
} }
@@ -3,12 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.descriptors.SourceElement import org.jetbrains.kotlin.descriptors.SourceElement
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constructorCall
*/
abstract class IrConstructorCall : IrFunctionAccessExpression() { abstract class IrConstructorCall : IrFunctionAccessExpression() {
abstract override val symbol: IrConstructorSymbol abstract override val symbol: IrConstructorSymbol
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
@@ -10,8 +13,13 @@ import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.containerExpression
*/
abstract class IrContainerExpression : IrExpression(), IrStatementContainer { abstract class IrContainerExpression : IrExpression(), IrStatementContainer {
abstract val origin: IrStatementOrigin? abstract val origin: IrStatementOrigin?
abstract val isTransparentScope: Boolean abstract val isTransparentScope: Boolean
override val statements: MutableList<IrStatement> = ArrayList(2) override val statements: MutableList<IrStatement> = ArrayList(2)
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.continue
*/
abstract class IrContinue : IrBreakContinue() { abstract class IrContinue : IrBreakContinue() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitContinue(this, data) visitor.visitContinue(this, data)
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.symbols.IrSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationReference
*/
abstract class IrDeclarationReference : IrExpression() { abstract class IrDeclarationReference : IrExpression() {
abstract val symbol: IrSymbol abstract val symbol: IrSymbol
} }
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.delegatingConstructorCall
*/
abstract class IrDelegatingConstructorCall : IrFunctionAccessExpression() { abstract class IrDelegatingConstructorCall : IrFunctionAccessExpression() {
abstract override val symbol: IrConstructorSymbol abstract override val symbol: IrConstructorSymbol
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.doWhileLoop
*/
abstract class IrDoWhileLoop : IrLoop() { abstract class IrDoWhileLoop : IrLoop() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitDoWhileLoop(this, data) visitor.visitDoWhileLoop(this, data)
@@ -3,6 +3,13 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.dynamicExpression
*/
abstract class IrDynamicExpression : IrExpression() abstract class IrDynamicExpression : IrExpression()
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.dynamicMemberExpression
*/
abstract class IrDynamicMemberExpression : IrDynamicExpression() { abstract class IrDynamicMemberExpression : IrDynamicExpression() {
abstract val memberName: String abstract val memberName: String
@@ -3,11 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.dynamicOperatorExpression
*/
abstract class IrDynamicOperatorExpression : IrDynamicExpression() { abstract class IrDynamicOperatorExpression : IrDynamicExpression() {
abstract val operator: IrDynamicOperator abstract val operator: IrDynamicOperator
@@ -20,15 +28,11 @@ abstract class IrDynamicOperatorExpression : IrDynamicExpression() {
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
receiver.accept(visitor, data) receiver.accept(visitor, data)
for (valueArgument in arguments) { arguments.forEach { it.accept(visitor, data) }
valueArgument.accept(visitor, data)
}
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
receiver = receiver.transform(transformer, data) receiver = receiver.transform(transformer, data)
for (i in arguments.indices) { arguments.transformInPlace(transformer, data)
arguments[i] = arguments[i].transform(transformer, data)
}
} }
} }
@@ -3,15 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.elseBranch
*/
abstract class IrElseBranch : IrBranch() { abstract class IrElseBranch : IrBranch() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitElseBranch(this, data) visitor.visitElseBranch(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrElseBranch = override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrElseBranch
transformer.visitElseBranch(this, data) = accept(transformer, data) as IrElseBranch
} }
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.enumConstructorCall
*/
abstract class IrEnumConstructorCall : IrFunctionAccessExpression() { abstract class IrEnumConstructorCall : IrFunctionAccessExpression() {
abstract override val symbol: IrConstructorSymbol abstract override val symbol: IrConstructorSymbol
@@ -3,13 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.errorCallExpression
*/
abstract class IrErrorCallExpression : IrErrorExpression() { abstract class IrErrorCallExpression : IrErrorExpression() {
abstract var explicitReceiver: IrExpression? abstract var explicitReceiver: IrExpression?
abstract val arguments: MutableList<IrExpression> abstract val arguments: MutableList<IrExpression>
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -22,8 +31,6 @@ abstract class IrErrorCallExpression : IrErrorExpression() {
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
explicitReceiver = explicitReceiver?.transform(transformer, data) explicitReceiver = explicitReceiver?.transform(transformer, data)
arguments.forEachIndexed { i, irExpression -> arguments.transformInPlace(transformer, data)
arguments[i] = irExpression.transform(transformer, data)
}
} }
} }
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.errorExpression
*/
abstract class IrErrorExpression : IrExpression() { abstract class IrErrorExpression : IrExpression() {
abstract val description: String abstract val description: String
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
@@ -11,12 +14,16 @@ import org.jetbrains.kotlin.ir.declarations.IrAttributeContainer
import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
abstract class IrExpression : IrElementBase(), IrStatement, IrVarargElement, IrAttributeContainer { /**
@Suppress("LeakingThis") * A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.expression
*/
abstract class IrExpression : IrElementBase(), IrStatement, IrVarargElement,
IrAttributeContainer {
override var attributeOwnerId: IrAttributeContainer = this override var attributeOwnerId: IrAttributeContainer = this
abstract var type: IrType abstract var type: IrType
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrExpression = override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrExpression
accept(transformer, data) as IrExpression = accept(transformer, data) as IrExpression
} }
@@ -3,12 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.declarations.IrFactory import org.jetbrains.kotlin.ir.declarations.IrFactory
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.expressionBody
*/
abstract class IrExpressionBody : IrBody() { abstract class IrExpressionBody : IrBody() {
abstract val factory: IrFactory abstract val factory: IrFactory
@@ -17,8 +24,8 @@ abstract class IrExpressionBody : IrBody() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitExpressionBody(this, data) visitor.visitExpressionBody(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrExpressionBody = override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
accept(transformer, data) as IrExpressionBody IrExpressionBody = accept(transformer, data) as IrExpressionBody
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
expression.accept(visitor, data) expression.accept(visitor, data)
@@ -3,16 +3,24 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.fieldAccessExpression
*/
abstract class IrFieldAccessExpression : IrDeclarationReference() { abstract class IrFieldAccessExpression : IrDeclarationReference() {
abstract override val symbol: IrFieldSymbol abstract override val symbol: IrFieldSymbol
abstract val superQualifierSymbol: IrClassSymbol? abstract val superQualifierSymbol: IrClassSymbol?
var receiver: IrExpression? = null var receiver: IrExpression? = null
abstract val origin: IrStatementOrigin? abstract val origin: IrStatementOrigin?
} }
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.functionAccessExpression
*/
abstract class IrFunctionAccessExpression : IrMemberAccessExpression<IrFunctionSymbol>() { abstract class IrFunctionAccessExpression : IrMemberAccessExpression<IrFunctionSymbol>() {
abstract var contextReceiversCount: Int abstract var contextReceiversCount: Int
} }
@@ -3,12 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.functionExpression
*/
abstract class IrFunctionExpression : IrExpression() { abstract class IrFunctionExpression : IrExpression() {
abstract val origin: IrStatementOrigin abstract val origin: IrStatementOrigin
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.functionReference
*/
abstract class IrFunctionReference : IrCallableReference<IrFunctionSymbol>() { abstract class IrFunctionReference : IrCallableReference<IrFunctionSymbol>() {
abstract val reflectionTarget: IrFunctionSymbol? abstract val reflectionTarget: IrFunctionSymbol?
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getClass
*/
abstract class IrGetClass : IrExpression() { abstract class IrGetClass : IrExpression() {
abstract var argument: IrExpression abstract var argument: IrExpression
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrEnumEntrySymbol import org.jetbrains.kotlin.ir.symbols.IrEnumEntrySymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getEnumValue
*/
abstract class IrGetEnumValue : IrGetSingletonValue() { abstract class IrGetEnumValue : IrGetSingletonValue() {
abstract override val symbol: IrEnumEntrySymbol abstract override val symbol: IrEnumEntrySymbol
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getField
*/
abstract class IrGetField : IrFieldAccessExpression() { abstract class IrGetField : IrFieldAccessExpression() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitGetField(this, data) visitor.visitGetField(this, data)
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getObjectValue
*/
abstract class IrGetObjectValue : IrGetSingletonValue() { abstract class IrGetObjectValue : IrGetSingletonValue() {
abstract override val symbol: IrClassSymbol abstract override val symbol: IrClassSymbol
@@ -3,6 +3,13 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getSingletonValue
*/
abstract class IrGetSingletonValue : IrDeclarationReference() abstract class IrGetSingletonValue : IrDeclarationReference()
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getValue
*/
abstract class IrGetValue : IrValueAccessExpression() { abstract class IrGetValue : IrValueAccessExpression() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitGetValue(this, data) visitor.visitGetValue(this, data)
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.instanceInitializerCall
*/
abstract class IrInstanceInitializerCall : IrExpression() { abstract class IrInstanceInitializerCall : IrExpression() {
abstract val classSymbol: IrClassSymbol abstract val classSymbol: IrClassSymbol
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrLocalDelegatedPropertySymbol import org.jetbrains.kotlin.ir.symbols.IrLocalDelegatedPropertySymbol
@@ -10,9 +13,16 @@ import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrLocalDelegatedPropertyReference : IrCallableReference<IrLocalDelegatedPropertySymbol>() { /**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.localDelegatedPropertyReference
*/
abstract class IrLocalDelegatedPropertyReference :
IrCallableReference<IrLocalDelegatedPropertySymbol>() {
abstract val delegate: IrVariableSymbol abstract val delegate: IrVariableSymbol
abstract val getter: IrSimpleFunctionSymbol abstract val getter: IrSimpleFunctionSymbol
abstract val setter: IrSimpleFunctionSymbol? abstract val setter: IrSimpleFunctionSymbol?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,12 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.loop
*/
abstract class IrLoop : IrExpression() { abstract class IrLoop : IrExpression() {
abstract val origin: IrStatementOrigin? abstract val origin: IrStatementOrigin?
var body: IrExpression? = null var body: IrExpression? = null
lateinit var condition: IrExpression
abstract var condition: IrExpression
var label: String? = null var label: String? = null
} }
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol
@@ -10,9 +13,15 @@ import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.propertyReference
*/
abstract class IrPropertyReference : IrCallableReference<IrPropertySymbol>() { abstract class IrPropertyReference : IrCallableReference<IrPropertySymbol>() {
abstract val field: IrFieldSymbol? abstract val field: IrFieldSymbol?
abstract val getter: IrSimpleFunctionSymbol? abstract val getter: IrSimpleFunctionSymbol?
abstract val setter: IrSimpleFunctionSymbol? abstract val setter: IrSimpleFunctionSymbol?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,16 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/** /**
* Platform-specific low-level reference to function. * A leaf IR tree element.
* * @sample org.jetbrains.kotlin.ir.generator.IrTree.rawFunctionReference
* On JS platform it represents a plain reference to JavaScript function.
* On JVM platform it represents a MethodHandle constant.
*/ */
abstract class IrRawFunctionReference : IrDeclarationReference() { abstract class IrRawFunctionReference : IrDeclarationReference() {
abstract override val symbol: IrFunctionSymbol abstract override val symbol: IrFunctionSymbol
@@ -3,14 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.return
*/
abstract class IrReturn : IrExpression() { abstract class IrReturn : IrExpression() {
abstract var value: IrExpression abstract var value: IrExpression
abstract val returnTargetSymbol: IrReturnTargetSymbol abstract val returnTargetSymbol: IrReturnTargetSymbol
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,6 +3,9 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.declarations.IrReturnTarget import org.jetbrains.kotlin.ir.declarations.IrReturnTarget
@@ -10,6 +13,10 @@ import org.jetbrains.kotlin.ir.declarations.IrSymbolOwner
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
import org.jetbrains.kotlin.ir.symbols.IrReturnableBlockSymbol import org.jetbrains.kotlin.ir.symbols.IrReturnableBlockSymbol
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.returnableBlock
*/
abstract class IrReturnableBlock : IrBlock(), IrSymbolOwner, IrReturnTarget { abstract class IrReturnableBlock : IrBlock(), IrSymbolOwner, IrReturnTarget {
abstract override val symbol: IrReturnableBlockSymbol abstract override val symbol: IrReturnableBlockSymbol
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.setField
*/
abstract class IrSetField : IrFieldAccessExpression() { abstract class IrSetField : IrFieldAccessExpression() {
abstract var value: IrExpression abstract var value: IrExpression
@@ -3,14 +3,22 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.setValue
*/
abstract class IrSetValue : IrValueAccessExpression() { abstract class IrSetValue : IrValueAccessExpression() {
abstract override val symbol: IrValueSymbol abstract override val symbol: IrValueSymbol
abstract var value: IrExpression abstract var value: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,21 +3,27 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.spreadElement
*/
abstract class IrSpreadElement : IrElementBase(), IrVarargElement { abstract class IrSpreadElement : IrElementBase(), IrVarargElement {
abstract var expression: IrExpression abstract var expression: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitSpreadElement(this, data) visitor.visitSpreadElement(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrElement = override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
accept(transformer, data) as IrSpreadElement IrSpreadElement = accept(transformer, data) as IrSpreadElement
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) { override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
expression.accept(visitor, data) expression.accept(visitor, data)
@@ -3,10 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrStatement import org.jetbrains.kotlin.ir.IrStatement
interface IrStatementContainer { /**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.statementContainer
*/
interface IrStatementContainer : IrElement {
val statements: MutableList<IrStatement> val statements: MutableList<IrStatement>
} }
@@ -3,11 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.stringConcatenation
*/
abstract class IrStringConcatenation : IrExpression() { abstract class IrStringConcatenation : IrExpression() {
abstract val arguments: MutableList<IrExpression> abstract val arguments: MutableList<IrExpression>
@@ -19,8 +27,6 @@ abstract class IrStringConcatenation : IrExpression() {
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
arguments.forEachIndexed { i, irExpression -> arguments.transformInPlace(transformer, data)
arguments[i] = irExpression.transform(transformer, data)
}
} }
} }
@@ -3,13 +3,21 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.suspendableExpression
*/
abstract class IrSuspendableExpression : IrExpression() { abstract class IrSuspendableExpression : IrExpression() {
abstract var suspensionPointId: IrExpression abstract var suspensionPointId: IrExpression
abstract var result: IrExpression abstract var result: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -3,15 +3,24 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.declarations.IrVariable import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.suspensionPoint
*/
abstract class IrSuspensionPoint : IrExpression() { abstract class IrSuspensionPoint : IrExpression() {
abstract var suspensionPointIdParameter: IrVariable abstract var suspensionPointIdParameter: IrVariable
abstract var result: IrExpression abstract var result: IrExpression
abstract var resumeResult: IrExpression abstract var resumeResult: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R = override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
@@ -24,7 +33,8 @@ abstract class IrSuspensionPoint : IrExpression() {
} }
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
suspensionPointIdParameter = suspensionPointIdParameter.transform(transformer, data) as IrVariable suspensionPointIdParameter = suspensionPointIdParameter.transform(transformer, data) as
IrVariable
result = result.transform(transformer, data) result = result.transform(transformer, data)
resumeResult = resumeResult.transform(transformer, data) resumeResult = resumeResult.transform(transformer, data)
} }
@@ -3,10 +3,17 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.syntheticBody
*/
abstract class IrSyntheticBody : IrBody() { abstract class IrSyntheticBody : IrBody() {
abstract val kind: IrSyntheticBodyKind abstract val kind: IrSyntheticBodyKind
@@ -3,11 +3,18 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.throw
*/
abstract class IrThrow : IrExpression() { abstract class IrThrow : IrExpression() {
abstract var value: IrExpression abstract var value: IrExpression
@@ -3,11 +3,19 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir.expressions package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.try
*/
abstract class IrTry : IrExpression() { abstract class IrTry : IrExpression() {
abstract var tryResult: IrExpression abstract var tryResult: IrExpression
@@ -26,9 +34,7 @@ abstract class IrTry : IrExpression() {
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) { override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
tryResult = tryResult.transform(transformer, data) tryResult = tryResult.transform(transformer, data)
catches.forEachIndexed { i, irCatch -> catches.transformInPlace(transformer, data)
catches[i] = irCatch.transform(transformer, data)
}
finallyExpression = finallyExpression?.transform(transformer, data) finallyExpression = finallyExpression?.transform(transformer, data)
} }
} }

Some files were not shown because too many files have changed in this diff Show More