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++)
}
irScript.providedProperties = descriptor.scriptProvidedProperties.zip(descriptor.scriptProvidedPropertiesParameters)
.map { (providedProperty, parameter) ->
// TODO: initializer
// TODO: do not keep direct links
val type = providedProperty.type.toIrType()
val valueParameter = context.symbolTable.declareValueParameter(
descriptor.scriptProvidedProperties.zip(descriptor.scriptProvidedPropertiesParameters) { providedProperty, parameter ->
// TODO: initializer
// TODO: do not keep direct links
val type = providedProperty.type.toIrType()
val valueParameter = context.symbolTable.declareValueParameter(
UNDEFINED_OFFSET, UNDEFINED_OFFSET,
IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY, parameter, type
) { symbol ->
context.irFactory.createValueParameter(
UNDEFINED_OFFSET, UNDEFINED_OFFSET,
IrDeclarationOrigin.SCRIPT_PROVIDED_PROPERTY, parameter, type
) { symbol ->
context.irFactory.createValueParameter(
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
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
}.unzip().let { (params, props) ->
irScript.providedProperties = props
irScript.providedPropertiesParameters = params
}
irScript.constructor = with(IrFunctionBuilder().apply {
isPrimary = true
@@ -155,7 +157,7 @@ class ScriptGenerator(declarationGenerator: DeclarationGenerator) : DeclarationG
addIfNotNull(irScript.earlierScriptsParameter)
addAll(irScript.explicitCallParameters)
addAll(irScript.implicitReceiversParameters)
irScript.providedProperties.forEach { add(it.first) }
addAll(irScript.providedPropertiesParameters)
}
irConstructor.parent = irScript
irConstructor.metadata = DescriptorMetadataSource.Function(descriptor.unsubstitutedPrimaryConstructor)
+50 -1
View File
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.ideaExt.idea
plugins {
kotlin("jvm")
id("jps-compatible")
@@ -10,10 +12,57 @@ dependencies {
implementation(project(":compiler:util"))
implementation(project(":compiler:config"))
compileOnly(project("tree-generator")) // Provided, so that IDEA can recognize references to this module in KDoc.
compileOnly(intellijCore())
}
sourceSets {
"main" { projectDefault() }
"main" {
projectDefault()
this.java.srcDir("gen")
}
"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.
*/
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.rootElement
*/
interface IrElement {
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.
*/
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
// DO NOT MODIFY IT MANUALLY.
package org.jetbrains.kotlin.ir
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.statement
*/
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.
*/
// 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
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.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.anonymousInitializer
*/
abstract class IrAnonymousInitializer : IrDeclarationBase() {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassDescriptor // TODO special descriptor for anonymous initializer blocks
abstract override val descriptor: ClassDescriptor
abstract override val symbol: IrAnonymousInitializerSymbol
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.attributeContainer
*/
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
}
@@ -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.
*/
// 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
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.symbols.IrClassSymbol
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.IrElementVisitor
abstract class IrClass :
IrDeclarationBase(), IrPossiblyExternalDeclaration, IrDeclarationWithVisibility,
IrDeclarationContainer, IrTypeParametersContainer, IrAttributeContainer, IrMetadataSourceOwner {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.class
*/
abstract class IrClass : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrDeclarationWithVisibility, IrTypeParametersContainer, IrDeclarationContainer,
IrAttributeContainer, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassDescriptor
abstract override val symbol: IrClassSymbol
abstract val kind: ClassKind
abstract var modality: Modality
abstract val isCompanion: Boolean
abstract val isInner: Boolean
abstract val isData: Boolean
abstract val isValue: Boolean
abstract val isExpect: Boolean
abstract val isFun: Boolean
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.
*/
// 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
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.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constructor
*/
abstract class IrConstructor : IrFunction() {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassConstructorDescriptor
abstract override val symbol: IrConstructorSymbol
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.
*/
// 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
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.ir.IrStatement
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 {
@ObsoleteDescriptorBasedAPI
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.
*/
// 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
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
@@ -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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationContainer
*/
interface IrDeclarationContainer : IrDeclarationParent {
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationParent
*/
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.
*/
// 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
import org.jetbrains.kotlin.name.Name
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationWithName
*/
interface IrDeclarationWithName : IrDeclaration {
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.
*/
// 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
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.declarationWithVisibility
*/
interface IrDeclarationWithVisibility : IrDeclaration {
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.
*/
// 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
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.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.enumEntry
*/
abstract class IrEnumEntry : IrDeclarationBase(), IrDeclarationWithName {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: ClassDescriptor
abstract override val symbol: IrEnumEntrySymbol
abstract var correspondingClass: IrClass?
abstract var initializerExpression: IrExpressionBody?
abstract var correspondingClass: IrClass?
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.errorDeclaration
*/
abstract class IrErrorDeclaration : IrDeclarationBase() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitErrorDeclaration(this, data)
override val symbol: IrSymbol
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.
*/
// 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
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.serialization.deserialization.descriptors.DeserializedContainerSource
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.externalPackageFragment
*/
abstract class IrExternalPackageFragment : IrPackageFragment() {
abstract override val symbol: IrExternalPackageFragmentSymbol
abstract val containerSource: DeserializedContainerSource?
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.
*/
// 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
import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.fakeOverrideFunction
*/
interface IrFakeOverrideFunction : IrDeclaration {
override val symbol: IrSimpleFunctionSymbol
var modality: Modality
fun acquireSymbol(symbol: IrSimpleFunctionSymbol): IrSimpleFunction
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.
*/
// 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
import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.fakeOverrideProperty
*/
interface IrFakeOverrideProperty : IrDeclaration {
override val symbol: IrPropertySymbol
var modality: Modality
var getter: IrSimpleFunction?
var setter: IrSimpleFunction?
fun acquireSymbol(symbol: IrPropertySymbol): IrProperty
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.
*/
// 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
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.IrElementVisitor
abstract class IrField :
IrDeclarationBase(),
IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.field
*/
abstract class IrField : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: PropertyDescriptor
abstract override val symbol: IrFieldSymbol
abstract var type: IrType
abstract val isFinal: Boolean
abstract val isStatic: Boolean
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.
*/
// 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
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.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 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.
*/
// 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
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.IrElementVisitor
abstract class IrFunction :
IrDeclarationBase(),
IrPossiblyExternalDeclaration, IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent, IrReturnTarget,
IrMemberWithContainerSource,
IrMetadataSourceOwner {
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.function
*/
abstract class IrFunction : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent,
IrReturnTarget, IrMemberWithContainerSource, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: FunctionDescriptor
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 var returnType: IrType
abstract var dispatchReceiverParameter: IrValueParameter?
abstract var extensionReceiverParameter: IrValueParameter?
abstract var valueParameters: List<IrValueParameter>
/**
* The first `contextReceiverParametersCount` value parameters are context receivers
*/
abstract var contextReceiverParametersCount: Int
abstract var body: IrBody?
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
typeParameters.forEach { it.accept(visitor, data) }
dispatchReceiverParameter?.accept(visitor, data)
extensionReceiverParameter?.accept(visitor, data)
valueParameters.forEach { it.accept(visitor, data) }
body?.accept(visitor, data)
}
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
typeParameters = typeParameters.transformIfNeeded(transformer, data)
dispatchReceiverParameter = dispatchReceiverParameter?.transform(transformer, data)
extensionReceiverParameter = extensionReceiverParameter?.transform(transformer, data)
valueParameters = valueParameters.transformIfNeeded(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.
*/
// 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
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.IrElementVisitor
abstract class IrLocalDelegatedProperty :
IrDeclarationBase(),
IrDeclarationWithName,
IrSymbolOwner,
IrMetadataSourceOwner {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.localDelegatedProperty
*/
abstract class IrLocalDelegatedProperty : IrDeclarationBase(), IrDeclarationWithName,
IrSymbolOwner, IrMetadataSourceOwner {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: VariableDescriptorWithAccessors
abstract override val symbol: IrLocalDelegatedPropertySymbol
abstract var type: IrType
abstract val isVar: Boolean
abstract var delegate: IrVariable
abstract var getter: IrSimpleFunction
abstract var setter: IrSimpleFunction?
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.
*/
// 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
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 {
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.metadataSourceOwner
*/
interface IrMetadataSourceOwner : IrElement {
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.
*/
// 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
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
import org.jetbrains.kotlin.ir.IrBuiltIns
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
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.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 name: Name
abstract val irBuiltins: IrBuiltIns
abstract val files: MutableList<IrFile>
override val startOffset: Int
@@ -29,8 +40,8 @@ abstract class IrModuleFragment : IrElementBase() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitModuleFragment(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrModuleFragment =
accept(transformer, data) as IrModuleFragment
override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
IrModuleFragment = accept(transformer, data) as IrModuleFragment
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
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.
*/
// 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
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 {
override val symbol: S
val isFakeOverride: Boolean
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.
*/
// 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
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
}
@@ -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.
*/
// 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
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.name.FqName
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.packageFragment
*/
abstract class IrPackageFragment : IrElementBase(), IrDeclarationContainer, IrSymbolOwner {
abstract override val symbol: IrPackageFragmentSymbol
@ObsoleteDescriptorBasedAPI
abstract val packageFragmentDescriptor: PackageFragmentDescriptor
abstract override val symbol: IrPackageFragmentSymbol
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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.possiblyExternalDeclaration
*/
interface IrPossiblyExternalDeclaration : IrDeclarationWithName {
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.
*/
// 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
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.IrElementVisitor
abstract class IrProperty :
IrDeclarationBase(),
IrPossiblyExternalDeclaration,
IrOverridableDeclaration<IrPropertySymbol>,
IrMetadataSourceOwner,
IrAttributeContainer,
IrMemberWithContainerSource {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.property
*/
abstract class IrProperty : IrDeclarationBase(), IrPossiblyExternalDeclaration,
IrOverridableDeclaration<IrPropertySymbol>, IrMetadataSourceOwner, IrAttributeContainer,
IrMemberWithContainerSource {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: PropertyDescriptor
abstract override val symbol: IrPropertySymbol
abstract val isVar: Boolean
abstract val isConst: Boolean
abstract val isLateinit: Boolean
abstract val isDelegated: Boolean
abstract val isExpect: Boolean
abstract override val isFakeOverride: Boolean
abstract var backingField: IrField?
abstract var getter: IrSimpleFunction?
abstract var setter: IrSimpleFunction?
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) {
backingField = backingField?.transform(transformer, data) as? IrField
getter = getter?.run { transform(transformer, data) as IrSimpleFunction }
setter = setter?.run { transform(transformer, data) as IrSimpleFunction }
getter = getter?.transform(transformer, data) as? IrSimpleFunction
setter = setter?.transform(transformer, data) as? IrSimpleFunction
}
}
@@ -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.
*/
// 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
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.returnTarget
*/
interface IrReturnTarget : IrSymbolOwner {
@ObsoleteDescriptorBasedAPI
val descriptor: FunctionDescriptor
override val symbol: IrReturnTargetSymbol
}
}
@@ -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.
*/
// 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
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.IrScriptSymbol
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.visitors.IrElementTransformer
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
abstract class IrScript :
IrDeclarationBase(), IrDeclarationWithName,
IrDeclarationParent, IrStatementContainer, IrMetadataSourceOwner {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.script
*/
abstract class IrScript : IrDeclarationBase(), IrDeclarationWithName, IrDeclarationParent,
IrStatementContainer, IrMetadataSourceOwner {
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 baseClass: IrType
@@ -32,7 +34,9 @@ abstract class IrScript :
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?
@@ -52,16 +56,18 @@ abstract class IrScript :
thisReceiver.accept(visitor, data)
explicitCallParameters.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)
}
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
statements.transformInPlace(transformer, data)
thisReceiver = thisReceiver.transform(transformer, data)
explicitCallParameters = explicitCallParameters.map { it.transform(transformer, data) }
implicitReceiversParameters = implicitReceiversParameters.map { it.transform(transformer, data) }
providedProperties = providedProperties.map { it.first.transform(transformer, data) to it.second }
explicitCallParameters = explicitCallParameters.transformIfNeeded(transformer, data)
implicitReceiversParameters = implicitReceiversParameters.transformIfNeeded(transformer,
data)
providedPropertiesParameters = providedPropertiesParameters.transformIfNeeded(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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
abstract class IrSimpleFunction :
IrFunction(),
IrOverridableDeclaration<IrSimpleFunctionSymbol>,
IrAttributeContainer {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.simpleFunction
*/
abstract class IrSimpleFunction : IrFunction(),
IrOverridableDeclaration<IrSimpleFunctionSymbol>, IrAttributeContainer {
abstract override val symbol: IrSimpleFunctionSymbol
abstract val isTailrec: Boolean
abstract val isSuspend: Boolean
abstract override val isFakeOverride: Boolean
abstract val isOperator: Boolean
abstract val isInfix: Boolean
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.symbols.IrSymbol
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.symbolOwner
*/
interface IrSymbolOwner : IrElement {
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.
*/
// 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
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.IrElementVisitor
abstract class IrTypeAlias :
IrDeclarationBase(),
IrDeclarationWithName,
IrDeclarationWithVisibility,
IrTypeParametersContainer {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.typeAlias
*/
abstract class IrTypeAlias : IrDeclarationBase(), IrDeclarationWithName,
IrDeclarationWithVisibility, IrTypeParametersContainer {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: TypeAliasDescriptor
abstract override val symbol: IrTypeAliasSymbol
abstract val isActual: Boolean
abstract var expandedType: IrType
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.
*/
// 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
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.types.Variance
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.typeParameter
*/
abstract class IrTypeParameter : IrDeclarationBase(), IrDeclarationWithName {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: TypeParameterDescriptor
abstract override val symbol: IrTypeParameterSymbol
abstract val variance: Variance
abstract val index: Int
abstract val isReified: Boolean
abstract var superTypes: List<IrType>
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitTypeParameter(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrTypeParameter =
transformer.visitTypeParameter(this, data) as IrTypeParameter
override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.typeParametersContainer
*/
interface IrTypeParametersContainer : IrDeclaration, IrDeclarationParent {
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.
*/
// 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
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.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
abstract override val descriptor: ValueDescriptor
override val descriptor: ValueDescriptor
abstract override val symbol: IrValueSymbol
abstract var type: IrType
override val symbol: IrValueSymbol
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.
*/
// 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
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.IrElementVisitor
abstract class IrValueParameter : IrValueDeclaration() {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.valueParameter
*/
abstract class IrValueParameter : IrDeclarationBase(), IrValueDeclaration {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: ParameterDescriptor
abstract override val symbol: IrValueParameterSymbol
abstract val index: Int
abstract var varargElementType: IrType?
abstract val isCrossinline: 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 var defaultValue: IrExpressionBody?
@@ -34,8 +41,8 @@ abstract class IrValueParameter : IrValueDeclaration() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitValueParameter(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrValueParameter =
transformer.visitValueParameter(this, data) as IrValueParameter
override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
IrValueParameter = accept(transformer, data) as IrValueParameter
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
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.
*/
// 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
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.IrElementVisitor
abstract class IrVariable : IrValueDeclaration() {
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.variable
*/
abstract class IrVariable : IrDeclarationBase(), IrValueDeclaration {
@ObsoleteDescriptorBasedAPI
abstract override val descriptor: VariableDescriptor
abstract override val symbol: IrVariableSymbol
abstract val isVar: Boolean
abstract val isConst: Boolean
abstract val isLateinit: Boolean
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.
*/
// 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
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() {
override val isTransparentScope: Boolean
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.
*/
// 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
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.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.blockBody
*/
abstract class IrBlockBody : IrBody(), IrStatementContainer {
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase
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 =
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 result: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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) {
condition.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) {
condition = condition.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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.break
*/
abstract class IrBreak : IrBreakContinue() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.breakContinue
*/
abstract class IrBreakContinue : IrExpression() {
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
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 override val symbol: IrSimpleFunctionSymbol
abstract val superQualifierSymbol: IrClassSymbol?
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrSymbol
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 result: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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) {
catchParameter.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) {
catchParameter = catchParameter.transform(transformer, data) as IrVariable
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
import org.jetbrains.kotlin.ir.types.IrType
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 override val symbol: IrClassifierSymbol
abstract var classType: IrType
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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.composite
*/
abstract class IrComposite : IrContainerExpression() {
override val isTransparentScope: Boolean
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.
*/
// 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
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 val kind: IrConstKind<T>
abstract val value: T
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.
*/
// 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
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 val elements: MutableList<IrConstantValue>
@@ -16,10 +23,10 @@ abstract class IrConstantArray : IrConstantValue() {
visitor.visitConstantArray(this, data)
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) {
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.
*/
// 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
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.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constantObject
*/
abstract class IrConstantObject : IrConstantValue() {
abstract val constructor: IrConstructorSymbol
abstract val valueArguments: MutableList<IrConstantValue>
abstract val typeArguments: List<IrType>
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitConstantObject(this, data)
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) {
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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.constantValue
*/
abstract class IrConstantValue : IrExpression() {
abstract fun contentEquals(other: IrConstantValue): Boolean
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.
*/
// 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
import org.jetbrains.kotlin.descriptors.SourceElement
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
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 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.
*/
// 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
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.IrElementVisitor
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.containerExpression
*/
abstract class IrContainerExpression : IrExpression(), IrStatementContainer {
abstract val origin: IrStatementOrigin?
abstract val isTransparentScope: Boolean
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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.continue
*/
abstract class IrContinue : IrBreakContinue() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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.
*/
// 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
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.doWhileLoop
*/
abstract class IrDoWhileLoop : IrLoop() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.dynamicExpression
*/
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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 val operator: IrDynamicOperator
@@ -20,15 +28,11 @@ abstract class IrDynamicOperatorExpression : IrDynamicExpression() {
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
receiver.accept(visitor, data)
for (valueArgument in arguments) {
valueArgument.accept(visitor, data)
}
arguments.forEach { it.accept(visitor, data) }
}
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
receiver = receiver.transform(transformer, data)
for (i in arguments.indices) {
arguments[i] = arguments[i].transform(transformer, data)
}
arguments.transformInPlace(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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.elseBranch
*/
abstract class IrElseBranch : IrBranch() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitElseBranch(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrElseBranch =
transformer.visitElseBranch(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrElseBranch
= 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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 var explicitReceiver: IrExpression?
abstract val arguments: MutableList<IrExpression>
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) {
explicitReceiver = explicitReceiver?.transform(transformer, data)
arguments.forEachIndexed { i, irExpression ->
arguments[i] = irExpression.transform(transformer, data)
}
arguments.transformInPlace(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.
*/
// 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
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 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.
*/
// 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
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.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
abstract var type: IrType
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrExpression =
accept(transformer, data) as IrExpression
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): 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.
*/
// 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
import org.jetbrains.kotlin.ir.declarations.IrFactory
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 val factory: IrFactory
@@ -17,8 +24,8 @@ abstract class IrExpressionBody : IrBody() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitExpressionBody(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrExpressionBody =
accept(transformer, data) as IrExpressionBody
override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
IrExpressionBody = accept(transformer, data) as IrExpressionBody
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
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 override val symbol: IrFieldSymbol
abstract val superQualifierSymbol: IrClassSymbol?
var receiver: IrExpression? = null
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.
*/
// 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
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrEnumEntrySymbol
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getField
*/
abstract class IrGetField : IrFieldAccessExpression() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
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 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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getSingletonValue
*/
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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.getValue
*/
abstract class IrGetValue : IrValueAccessExpression() {
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
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 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.
*/
// 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
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.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 getter: IrSimpleFunctionSymbol
abstract val setter: IrSimpleFunctionSymbol?
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.
*/
// 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
/**
* A non-leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.loop
*/
abstract class IrLoop : IrExpression() {
abstract val origin: IrStatementOrigin?
var body: IrExpression? = null
lateinit var condition: IrExpression
abstract var condition: IrExpression
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.
*/
// 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
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.visitors.IrElementVisitor
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.propertyReference
*/
abstract class IrPropertyReference : IrCallableReference<IrPropertySymbol>() {
abstract val field: IrFieldSymbol?
abstract val getter: IrSimpleFunctionSymbol?
abstract val setter: IrSimpleFunctionSymbol?
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
/**
* Platform-specific low-level reference to function.
*
* On JS platform it represents a plain reference to JavaScript function.
* On JVM platform it represents a MethodHandle constant.
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.rawFunctionReference
*/
abstract class IrRawFunctionReference : IrDeclarationReference() {
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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 var value: IrExpression
abstract val returnTargetSymbol: IrReturnTargetSymbol
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.
*/
// 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
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.IrReturnableBlockSymbol
/**
* A leaf IR tree element.
* @sample org.jetbrains.kotlin.ir.generator.IrTree.returnableBlock
*/
abstract class IrReturnableBlock : IrBlock(), IrSymbolOwner, IrReturnTarget {
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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 override val symbol: IrValueSymbol
abstract var value: IrExpression
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
import org.jetbrains.kotlin.ir.IrElementBase
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 var expression: IrExpression
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
visitor.visitSpreadElement(this, data)
override fun <D> transform(transformer: IrElementTransformer<D>, data: D): IrElement =
accept(transformer, data) as IrSpreadElement
override fun <D> transform(transformer: IrElementTransformer<D>, data: D):
IrSpreadElement = accept(transformer, data) as IrSpreadElement
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
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.
*/
// 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
import org.jetbrains.kotlin.ir.IrElement
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>
}
@@ -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.
*/
// 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
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 val arguments: MutableList<IrExpression>
@@ -19,8 +27,6 @@ abstract class IrStringConcatenation : IrExpression() {
}
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
arguments.forEachIndexed { i, irExpression ->
arguments[i] = irExpression.transform(transformer, data)
}
arguments.transformInPlace(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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 var suspensionPointId: IrExpression
abstract var result: IrExpression
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.
*/
// 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
import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 var suspensionPointIdParameter: IrVariable
abstract var result: IrExpression
abstract var resumeResult: IrExpression
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) {
suspensionPointIdParameter = suspensionPointIdParameter.transform(transformer, data) as IrVariable
suspensionPointIdParameter = suspensionPointIdParameter.transform(transformer, data) as
IrVariable
result = result.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.
*/
// 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
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 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.
*/
// 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
import org.jetbrains.kotlin.ir.util.transformInPlace
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
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 var tryResult: IrExpression
@@ -26,9 +34,7 @@ abstract class IrTry : IrExpression() {
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
tryResult = tryResult.transform(transformer, data)
catches.forEachIndexed { i, irCatch ->
catches[i] = irCatch.transform(transformer, data)
}
catches.transformInPlace(transformer, data)
finallyExpression = finallyExpression?.transform(transformer, data)
}
}

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