diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt index 7a93b00da7b..61ca2085cf7 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt @@ -444,7 +444,7 @@ class K2JsIrCompiler : CLICompiler() { val icData = environmentForJS.configuration.incrementalDataProvider?.getSerializedData(moduleSourceFiles) ?: emptyList() val expectDescriptorToSymbol = mutableMapOf() - val moduleFragment = generateIrForKlibSerialization( + val (moduleFragment, _) = generateIrForKlibSerialization( environmentForJS.project, moduleSourceFiles, environmentForJS.configuration, diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/irForKlib.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/irForKlib.kt index acfd2172be7..c5fadb42e4b 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/irForKlib.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/klib/irForKlib.kt @@ -12,6 +12,7 @@ package org.jetbrains.kotlin.cli.js.klib import com.intellij.openapi.project.Project import org.jetbrains.kotlin.analyzer.AnalysisResult +import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.backend.common.lower.ExpectDeclarationRemover import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideChecker import org.jetbrains.kotlin.backend.common.serialization.DescriptorByIdSignatureFinderImpl @@ -55,7 +56,7 @@ fun generateIrForKlibSerialization( irFactory: IrFactory, verifySignatures: Boolean = true, getDescriptorByLibrary: (KotlinLibrary) -> ModuleDescriptor, -): IrModuleFragment { +): Pair { val errorPolicy = configuration.get(JSConfigurationKeys.ERROR_TOLERANCE_POLICY) ?: ErrorTolerancePolicy.DEFAULT val messageLogger = configuration.get(IrMessageLogger.IR_MESSAGE_LOGGER) ?: IrMessageLogger.None val allowUnboundSymbols = configuration[JSConfigurationKeys.PARTIAL_LINKAGE] ?: false @@ -90,7 +91,7 @@ fun generateIrForKlibSerialization( sortedDependencies.map { irLinker.deserializeOnlyHeaderModule(getDescriptorByLibrary(it), it) } - val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins( + val (moduleFragment, pluginContext) = psi2IrContext.generateModuleFragmentWithPlugins( project, files, irLinker, @@ -111,6 +112,6 @@ fun generateIrForKlibSerialization( moduleFragment.transform(ExpectDeclarationRemover(psi2IrContext.symbolTable, false), null) } - return moduleFragment + return moduleFragment to pluginContext } diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt index aaf7f9bbe58..c81bd1be6b0 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt @@ -371,7 +371,7 @@ object FirKotlinToJvmBytecodeCompiler { generationState.oldBEInitTrace(ktFiles) codegenFactory.generateModuleInFrontendIRMode( generationState, moduleFragment, components.symbolTable, components.irProviders, - extensions, FirJvmBackendExtension(session, components) + extensions, FirJvmBackendExtension(session, components), fir2IrResult.pluginContext ) { performanceManager?.notifyIRLoweringFinished() performanceManager?.notifyIRGenerationStarted() diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipeline.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipeline.kt index 16eebb1aeab..9cc77dd434f 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipeline.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipeline.kt @@ -196,7 +196,7 @@ fun convertAnalyzedFirToIr( IrGenerationExtension.getInstances(it) } ?: emptyList() val linkViaSignatures = input.configuration.getBoolean(JVMConfigurationKeys.LINK_VIA_SIGNATURES) - val (irModuleFragment, components) = + val (irModuleFragment, components, pluginContext) = analysisResults.session.convertToIr( analysisResults.scopeSession, analysisResults.fir, extensions, irGenerationExtensions, linkViaSignatures ) @@ -208,7 +208,8 @@ fun convertAnalyzedFirToIr( irModuleFragment, components.symbolTable, components, - analysisResults.session + analysisResults.session, + pluginContext ) } @@ -247,8 +248,13 @@ fun generateCodeFromIr( generationState.beforeCompile() codegenFactory.generateModuleInFrontendIRMode( - generationState, input.irModuleFragment, input.symbolTable, input.components.irProviders, input.extensions, - FirJvmBackendExtension(input.firSession, input.components) + generationState, + input.irModuleFragment, + input.symbolTable, + input.components.irProviders, + input.extensions, + FirJvmBackendExtension(input.firSession, input.components), + input.pluginContext ) { performanceManager?.notifyIRLoweringFinished() performanceManager?.notifyIRGenerationStarted() diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipelineData.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipelineData.kt index a550a07bcb7..e118299c6ed 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipelineData.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/compilerPipelineData.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.diagnostics.impl.BaseDiagnosticsCollector import org.jetbrains.kotlin.fir.FirModuleData import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.backend.Fir2IrComponents +import org.jetbrains.kotlin.fir.backend.Fir2IrPluginContext import org.jetbrains.kotlin.fir.backend.jvm.JvmFir2IrExtensions import org.jetbrains.kotlin.fir.declarations.FirFile import org.jetbrains.kotlin.fir.resolve.ScopeSession @@ -57,5 +58,6 @@ data class ModuleCompilerIrBackendInput( val irModuleFragment: IrModuleFragment, val symbolTable: SymbolTable, val components: Fir2IrComponents, - val firSession: FirSession -) \ No newline at end of file + val firSession: FirSession, + val pluginContext: Fir2IrPluginContext +) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt index b32c1ae43b0..44b0d353b7a 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrConverter.kt @@ -535,7 +535,7 @@ class Fir2IrConverter( allFirFiles, irModuleFragment, irGenerationExtensions, fir2irVisitor, fir2IrExtensions ) - return Fir2IrResult(irModuleFragment, components) + return Fir2IrResult(irModuleFragment, components, moduleDescriptor) } } } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrResult.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrResult.kt index 97021aea83a..8caa9adbb2e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrResult.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrResult.kt @@ -5,7 +5,17 @@ package org.jetbrains.kotlin.fir.backend +import org.jetbrains.kotlin.fir.descriptors.FirModuleDescriptor import org.jetbrains.kotlin.ir.declarations.IrModuleFragment -import org.jetbrains.kotlin.ir.util.SymbolTable -data class Fir2IrResult(val irModuleFragment: IrModuleFragment, val components: Fir2IrComponents) +class Fir2IrResult( + val irModuleFragment: IrModuleFragment, + val components: Fir2IrComponents, + moduleDescriptor: FirModuleDescriptor +) { + val pluginContext: Fir2IrPluginContext = Fir2IrPluginContext(components, moduleDescriptor) + + operator fun component1(): IrModuleFragment = irModuleFragment + operator fun component2(): Fir2IrComponents = components + operator fun component3(): Fir2IrPluginContext = pluginContext +} diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt index 06c4e891c16..711c998476e 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt @@ -277,7 +277,7 @@ class IncrementalFirJvmCompilerRunner( .filter { it.kind == FirSession.Kind.Source } .flatMap { (it.firProvider as FirProviderImpl).getAllFirFiles() } - val (irModuleFragment, components) = Fir2IrConverter.createModuleFragmentWithoutSignatures( + val (irModuleFragment, components, pluginContext) = Fir2IrConverter.createModuleFragmentWithoutSignatures( cycleResult.session, cycleResult.scopeSession, cycleResult.fir + allCommonFirFiles, cycleResult.session.languageVersionSettings, extensions, FirJvmKotlinMangler(cycleResult.session), JvmIrMangler, IrFactoryImpl, FirJvmVisibilityConverter, @@ -295,7 +295,8 @@ class IncrementalFirJvmCompilerRunner( irModuleFragment, components.symbolTable, components, - cycleResult.session + cycleResult.session, + pluginContext ) val codegenOutput = generateCodeFromIr(irInput, compilerEnvironment, performanceManager) diff --git a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt index 52e28169fb8..3ae2b2393aa 100644 --- a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt +++ b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt @@ -7,6 +7,7 @@ package org.jetbrains.kotlin.backend.jvm import org.jetbrains.kotlin.analyzer.hasJdkCapability import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension +import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.backend.common.extensions.IrPluginContextImpl import org.jetbrains.kotlin.backend.common.phaser.CompilerPhase import org.jetbrains.kotlin.backend.common.phaser.PhaseConfig @@ -90,6 +91,7 @@ open class JvmIrCodegenFactory( val irProviders: List, val extensions: JvmGeneratorExtensions, val backendExtension: JvmBackendExtension, + val pluginContext: IrPluginContext, val notifyCodegenStart: () -> Unit ) : CodegenFactory.BackendInput @@ -163,20 +165,19 @@ open class JvmIrCodegenFactory( SourceDeclarationsPreprocessor(psi2irContext).run(input.files) + // The plugin context contains unbound symbols right after construction and has to be + // instantiated before we resolve unbound symbols and invoke any postprocessing steps. + val pluginContext = IrPluginContextImpl( + psi2irContext.moduleDescriptor, + psi2irContext.bindingContext, + psi2irContext.languageVersionSettings, + symbolTable, + psi2irContext.typeTranslator, + psi2irContext.irBuiltIns, + irLinker, + messageLogger + ) if (pluginExtensions.isNotEmpty() && psi2irContext.configuration.generateBodies) { - // The plugin context contains unbound symbols right after construction and has to be - // instantiated before we resolve unbound symbols and invoke any postprocessing steps. - val pluginContext = IrPluginContextImpl( - psi2irContext.moduleDescriptor, - psi2irContext.bindingContext, - psi2irContext.languageVersionSettings, - symbolTable, - psi2irContext.typeTranslator, - psi2irContext.irBuiltIns, - irLinker, - messageLogger - ) - for (extension in pluginExtensions) { psi2ir.addPostprocessingStep { module -> val old = stubGenerator.unboundSymbolGeneration @@ -243,6 +244,7 @@ open class JvmIrCodegenFactory( irProviders, jvmGeneratorExtensions, JvmBackendExtension.Default, + pluginContext, ) {} } @@ -272,7 +274,7 @@ open class JvmIrCodegenFactory( } override fun invokeLowerings(state: GenerationState, input: CodegenFactory.BackendInput): CodegenFactory.CodegenInput { - val (irModuleFragment, symbolTable, customPhaseConfig, irProviders, extensions, backendExtension, notifyCodegenStart) = + val (irModuleFragment, symbolTable, customPhaseConfig, irProviders, extensions, backendExtension, _, notifyCodegenStart) = input as JvmIrBackendInput val irSerializer = if ( state.configuration.get(JVMConfigurationKeys.SERIALIZE_IR, JvmSerializeIrMode.NONE) != JvmSerializeIrMode.NONE @@ -326,11 +328,21 @@ open class JvmIrCodegenFactory( irProviders: List, extensions: JvmGeneratorExtensions, backendExtension: JvmBackendExtension, + irPluginContext: IrPluginContext, notifyCodegenStart: () -> Unit = {} ) { generateModule( state, - JvmIrBackendInput(irModuleFragment, symbolTable, phaseConfig, irProviders, extensions, backendExtension, notifyCodegenStart) + JvmIrBackendInput( + irModuleFragment, + symbolTable, + phaseConfig, + irProviders, + extensions, + backendExtension, + irPluginContext, + notifyCodegenStart + ) ) } } diff --git a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt index 251397954e8..d6dc579ae83 100644 --- a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt +++ b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt @@ -16,8 +16,8 @@ import org.jetbrains.kotlin.analyzer.AbstractAnalyzerWithCompilerReport import org.jetbrains.kotlin.analyzer.AnalysisResult import org.jetbrains.kotlin.analyzer.CompilationErrorException import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension +import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.backend.common.extensions.IrPluginContextImpl -import org.jetbrains.kotlin.backend.common.lower.ExpectDeclarationRemover import org.jetbrains.kotlin.backend.common.overrides.FakeOverrideChecker import org.jetbrains.kotlin.backend.common.serialization.* import org.jetbrains.kotlin.backend.common.serialization.linkerissues.checkNoUnboundSymbols @@ -347,7 +347,7 @@ fun getIrModuleInfoForSourceFiles( true ) - val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, files, irLinker, messageLogger) + val (moduleFragment, _) = psi2IrContext.generateModuleFragmentWithPlugins(project, files, irLinker, messageLogger) // TODO: not sure whether this check should be enabled by default. Add configuration key for it. val mangleChecker = ManglerChecker(JsManglerIr, Ir2DescriptorManglerAdapter(JsManglerDesc)) @@ -400,23 +400,22 @@ fun GeneratorContext.generateModuleFragmentWithPlugins( messageLogger: IrMessageLogger, expectDescriptorToSymbol: MutableMap? = null, stubGenerator: DeclarationStubGenerator? = null -): IrModuleFragment { +): Pair { val psi2Ir = Psi2IrTranslator(languageVersionSettings, configuration, messageLogger::checkNoUnboundSymbols) val extensions = IrGenerationExtension.getInstances(project) + // plugin context should be instantiated before postprocessing steps + val pluginContext = IrPluginContextImpl( + moduleDescriptor, + bindingContext, + languageVersionSettings, + symbolTable, + typeTranslator, + irBuiltIns, + linker = irLinker, + messageLogger + ) if (extensions.isNotEmpty()) { - // plugin context should be instantiated before postprocessing steps - val pluginContext = IrPluginContextImpl( - moduleDescriptor, - bindingContext, - languageVersionSettings, - symbolTable, - typeTranslator, - irBuiltIns, - linker = irLinker, - messageLogger - ) - for (extension in extensions) { psi2Ir.addPostprocessingStep { module -> val old = stubGenerator?.unboundSymbolGeneration @@ -437,7 +436,7 @@ fun GeneratorContext.generateModuleFragmentWithPlugins( listOf(stubGenerator ?: irLinker), extensions, expectDescriptorToSymbol - ) + ) to pluginContext } private fun createBuiltIns(storageManager: StorageManager) = object : KotlinBuiltIns(storageManager) {} diff --git a/compiler/testData/ir/irText/classes/kt45853.__AX.fir.ir.txt b/compiler/testData/ir/irText/classes/kt45853.__AX.fir.ir.txt new file mode 100644 index 00000000000..48b216bece1 --- /dev/null +++ b/compiler/testData/ir/irText/classes/kt45853.__AX.fir.ir.txt @@ -0,0 +1,33 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:AX modality:ABSTRACT visibility:public superTypes:[.A; .X] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.AX + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.AX [primary] + PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:a visibility:public modality:OPEN [val] + overridden: + public abstract a: .A? [val] + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name: visibility:public modality:OPEN <> ($this:.AX) returnType:@[FlexibleNullability] .AX? + annotations: + Override + correspondingProperty: PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:a visibility:public modality:OPEN [val] + overridden: + public abstract fun (): .A? declared in .A + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.AX + FUN FAKE_OVERRIDE name:getA visibility:public modality:ABSTRACT <> ($this:.AX) returnType:@[FlexibleNullability] .X? [fake_override] + overridden: + public abstract fun getA (): @[FlexibleNullability] .X? declared in .X + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.AX + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.AX, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .A + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .X + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.AX + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.AX) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in .A + public open fun hashCode (): kotlin.Int [fake_override] declared in .X + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.AX + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.AX) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String [fake_override] declared in .A + public open fun toString (): kotlin.String [fake_override] declared in .X + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.AX diff --git a/compiler/testData/ir/irText/classes/kt45853.__AX.ir.txt b/compiler/testData/ir/irText/classes/kt45853.__AX.ir.txt index 6cfba5084e7..55dc6f15bb6 100644 --- a/compiler/testData/ir/irText/classes/kt45853.__AX.ir.txt +++ b/compiler/testData/ir/irText/classes/kt45853.__AX.ir.txt @@ -1,33 +1,33 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:AX modality:ABSTRACT visibility:public superTypes:[; .X] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.AX - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.AX [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:AX modality:ABSTRACT visibility:public superTypes:[.A; .X] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.AX + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.AX [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): [fake_override,operator] declared in .A - public open fun equals (other: kotlin.Any?): [fake_override,operator] declared in .X + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .A + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .X $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): [fake_override] declared in .A - public open fun hashCode (): [fake_override] declared in .X + public open fun hashCode (): kotlin.Int [fake_override] declared in .A + public open fun hashCode (): kotlin.Int [fake_override] declared in .X $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): [fake_override] declared in .A - public open fun toString (): [fake_override] declared in .X + public open fun toString (): kotlin.String [fake_override] declared in .A + public open fun toString (): kotlin.String [fake_override] declared in .X $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:getA visibility:public modality:ABSTRACT <> ($this:.X) returnType:.X? [fake_override] + FUN FAKE_OVERRIDE name:getA visibility:public modality:ABSTRACT <> ($this:.X) returnType:@[FlexibleNullability] .X? [fake_override] overridden: - public abstract fun getA (): .X? declared in .X + public abstract fun getA (): @[FlexibleNullability] .X? declared in .X $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.X - PROPERTY IR_EXTERNAL_DECLARATION_STUB name:a visibility:public modality:OPEN [val] + PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:a visibility:public modality:OPEN [val] overridden: public abstract a: .A? [val] - FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:OPEN <> ($this:.AX) returnType:.AX? + FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:OPEN <> ($this:.AX) returnType:@[EnhancedNullability] .AX? annotations: - - correspondingProperty: PROPERTY IR_EXTERNAL_DECLARATION_STUB name:a visibility:public modality:OPEN [val] + Override + correspondingProperty: PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:a visibility:public modality:OPEN [val] overridden: public abstract fun (): .A? declared in .A $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.AX diff --git a/compiler/testData/ir/irText/classes/kt45853.__X.fir.ir.txt b/compiler/testData/ir/irText/classes/kt45853.__X.fir.ir.txt new file mode 100644 index 00000000000..08aac846074 --- /dev/null +++ b/compiler/testData/ir/irText/classes/kt45853.__X.fir.ir.txt @@ -0,0 +1,17 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB INTERFACE name:X modality:ABSTRACT visibility:public [fun] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.X + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:getA visibility:public modality:ABSTRACT <> ($this:.X) returnType:@[FlexibleNullability] .X? + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.X + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.X, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.X + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.X) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.X + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.X) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.X diff --git a/compiler/testData/ir/irText/classes/kt45853.__X.ir.txt b/compiler/testData/ir/irText/classes/kt45853.__X.ir.txt index 87105027c2d..0bf574adf81 100644 --- a/compiler/testData/ir/irText/classes/kt45853.__X.ir.txt +++ b/compiler/testData/ir/irText/classes/kt45853.__X.ir.txt @@ -1,17 +1,17 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:X modality:ABSTRACT visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.X - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB INTERFACE name:X modality:ABSTRACT visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.X + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:getA visibility:public modality:ABSTRACT <> ($this:.X) returnType:.X? - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.X + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:getA visibility:public modality:ABSTRACT <> ($this:.X) returnType:@[FlexibleNullability] .X? + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.X diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.fir.ir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.fir.ir.txt new file mode 100644 index 00000000000..670992848ee --- /dev/null +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.fir.ir.txt @@ -0,0 +1,18 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J1 modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J1.J1> + TYPE_PARAMETER name:X1 index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Number?] reified:false + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public () returnType:.J1.J1> + TYPE_PARAMETER name:Y1 index:1 variance: superTypes:[@[FlexibleNullability] kotlin.CharSequence?] reified:false + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J1.J1>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J1.J1> + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J1.J1>) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J1.J1> + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J1.J1>) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J1.J1> diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.ir.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.ir.txt index 18844fc80be..6c8b51e25e2 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.ir.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.__J1.ir.txt @@ -1,37 +1,37 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J1 modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X1 index:0 variance: superTypes:[?] reified:false - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public () returnType:.J1.J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:Y1 index:1 variance: superTypes:[?] reified:false - CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J2 modality:OPEN visibility:public [inner] superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J2.J1.J2, X1 of .J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X2 index:0 variance: superTypes:[?] reified:false - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public ($this:.J1.J1>) returnType:.J1.J2.J1.J2, X1 of .J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:Y2 index:1 variance: superTypes:[?] reified:false - $outer: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J1> - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J1 modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X1 index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Number?] reified:false + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public () returnType:.J1.J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:Y1 index:1 variance: superTypes:[@[FlexibleNullability] kotlin.CharSequence?] reified:false + CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J2 modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J2.J1.J2, X1 of .J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X2 index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Number?] reified:false + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public ($this:.J1.J1>) returnType:.J1.J2.J1.J2, X1 of .J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:Y2 index:1 variance: superTypes:[@[FlexibleNullability] kotlin.CharSequence?] reified:false + $outer: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J1> + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType: [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.fir.ir.txt b/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.fir.ir.txt new file mode 100644 index 00000000000..b4df7a16c1a --- /dev/null +++ b/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.fir.ir.txt @@ -0,0 +1,322 @@ +CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public superTypes:[kotlin.Number; kotlin.Comparable; java.io.Serializable] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.Int + CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Companion modality:OPEN visibility:public [companion] superTypes:[] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:kotlin.Int.Companion + PROPERTY name:MIN_VALUE visibility:public modality:FINAL [const,val] + FIELD PROPERTY_BACKING_FIELD name:MIN_VALUE type:kotlin.Int visibility:public [final] + EXPRESSION_BODY + CONST Int type=kotlin.Int value=-2147483648 + PROPERTY name:MAX_VALUE visibility:public modality:FINAL [const,val] + FIELD PROPERTY_BACKING_FIELD name:MAX_VALUE type:kotlin.Int visibility:public [final] + EXPRESSION_BODY + CONST Int type=kotlin.Int value=2147483647 + PROPERTY name:SIZE_BYTES visibility:public modality:FINAL [const,val] + FIELD PROPERTY_BACKING_FIELD name:SIZE_BYTES type:kotlin.Int visibility:public [final] + EXPRESSION_BODY + CONST Int type=kotlin.Int value=4 + PROPERTY name:SIZE_BITS visibility:public modality:FINAL [const,val] + FIELD PROPERTY_BACKING_FIELD name:SIZE_BITS type:kotlin.Int visibility:public [final] + EXPRESSION_BODY + CONST Int type=kotlin.Int value=32 + FUN BUILTIN_CLASS_METHOD name:toChar visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Char + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toChar (): kotlin.Char declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toByte visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Byte + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toByte (): kotlin.Byte declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toShort visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Short + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toShort (): kotlin.Short declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toInt visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Int + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toInt (): kotlin.Int declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toLong visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Long + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toLong (): kotlin.Long declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toFloat visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Float + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toFloat (): kotlin.Float declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toDouble visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Double + annotations: + IntrinsicConstEvaluation + overridden: + public abstract fun toDouble (): kotlin.Double declared in kotlin.Number + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:inc visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:dec visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:compareTo visibility:public modality:OPEN <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Float + FUN BUILTIN_CLASS_METHOD name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Float + FUN BUILTIN_CLASS_METHOD name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Float + FUN BUILTIN_CLASS_METHOD name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Float + FUN BUILTIN_CLASS_METHOD name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Float + FUN BUILTIN_CLASS_METHOD name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Float + FUN BUILTIN_CLASS_METHOD name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Double + FUN BUILTIN_CLASS_METHOD name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Double + FUN BUILTIN_CLASS_METHOD name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Double + FUN BUILTIN_CLASS_METHOD name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Double + FUN BUILTIN_CLASS_METHOD name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Double + FUN BUILTIN_CLASS_METHOD name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Double + FUN BUILTIN_CLASS_METHOD name:unaryPlus visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:unaryMinus visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.ranges.IntRange [operator] + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Byte + FUN BUILTIN_CLASS_METHOD name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.ranges.IntRange [operator] + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Short + FUN BUILTIN_CLASS_METHOD name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.ranges.IntRange [operator] + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.ranges.LongRange [operator] + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Long + FUN BUILTIN_CLASS_METHOD name:and visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:or visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:xor visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:shl visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int [infix] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:bitCount index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:shr visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int [infix] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:bitCount index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:ushr visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int [infix] + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:bitCount index:0 type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:inv visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int + annotations: + IntrinsicConstEvaluation + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:toString visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.String + annotations: + IntrinsicConstEvaluation + overridden: + public open fun toString (): kotlin.String [fake_override] declared in kotlin.Number + public open fun toString (): kotlin.String declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name:$this type:kotlin.Int + FUN BUILTIN_CLASS_METHOD name:equals visibility:public modality:OPEN <> ($this:kotlin.Int, other:kotlin.Any?) returnType:kotlin.Boolean [operator] + annotations: + IntrinsicConstEvaluation + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Number + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name:$this type:kotlin.Int + VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Number + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name:$this type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.ir.txt b/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.ir.txt index e6eab88c946..5e7771fd15d 100644 --- a/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.ir.txt +++ b/compiler/testData/ir/irText/stubs/constFromBuiltins.__kotlin.Int.ir.txt @@ -1,338 +1,338 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public superTypes:[; ; ] +CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public superTypes:[kotlin.Number; kotlin.Comparable; java.io.Serializable] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:and visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Float FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:OPEN <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun compareTo (other: ): kotlin.Int [operator] declared in kotlin.Comparable + public abstract fun compareTo (other: T of kotlin.Comparable): kotlin.Int [operator] declared in kotlin.Comparable $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short FUN IR_EXTERNAL_DECLARATION_STUB name:dec visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Float FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:div visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Int, other:?) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Int, other:kotlin.Any?) returnType:kotlin.Boolean [operator] annotations: - + IntrinsicConstEvaluation overridden: - public open fun equals (other: ?): [fake_override,operator] declared in kotlin.Number - public open fun equals (other: ?): [fake_override,operator] declared in kotlin.Comparable + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Number + public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Comparable $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:) returnType:kotlin.Int [fake_override] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Number public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Comparable - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type: + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any FUN IR_EXTERNAL_DECLARATION_STUB name:inc visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:inv visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Float FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:minus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short FUN IR_EXTERNAL_DECLARATION_STUB name:or visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Float FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.ranges.IntRange [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.ranges.IntRange [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.ranges.LongRange [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.ranges.IntRange [operator] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.ranges.IntRange [operator] annotations: - (1 = '1.7') - + SinceKotlin(version = '1.7') + ExperimentalStdlibApi $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.ranges.IntRange [operator] annotations: - (1 = '1.7') - + SinceKotlin(version = '1.7') + ExperimentalStdlibApi $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.ranges.LongRange [operator] annotations: - (1 = '1.7') - + SinceKotlin(version = '1.7') + ExperimentalStdlibApi $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:rangeUntil visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.ranges.IntRange [operator] annotations: - (1 = '1.7') - + SinceKotlin(version = '1.7') + ExperimentalStdlibApi $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] annotations: - (1 = '1.1') - + SinceKotlin(version = '1.1') + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] annotations: - (1 = '1.1') - + SinceKotlin(version = '1.1') + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] annotations: - (1 = '1.1') - + SinceKotlin(version = '1.1') + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Float FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] annotations: - (1 = '1.1') - + SinceKotlin(version = '1.1') + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] annotations: - (1 = '1.1') - + SinceKotlin(version = '1.1') + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:rem visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] annotations: - (1 = '1.1') - + SinceKotlin(version = '1.1') + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short FUN IR_EXTERNAL_DECLARATION_STUB name:shl visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int [infix] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:bitCount index:0 type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:shr visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int [infix] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:bitCount index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Byte) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Byte + FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Double) returnType:kotlin.Double [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Double + FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Float) returnType:kotlin.Float [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Float FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType: [operator] + FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Long) returnType:kotlin.Long [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:) returnType:kotlin.Int [operator] + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Long + FUN IR_EXTERNAL_DECLARATION_STUB name:times visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Short) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:toByte visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Short + FUN IR_EXTERNAL_DECLARATION_STUB name:toByte visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Byte annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun toByte (): declared in kotlin.Number + public abstract fun toByte (): kotlin.Byte declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:toChar visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + FUN IR_EXTERNAL_DECLARATION_STUB name:toChar visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Char annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun toChar (): declared in kotlin.Number + public abstract fun toChar (): kotlin.Char declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:toDouble visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + FUN IR_EXTERNAL_DECLARATION_STUB name:toDouble visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Double annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun toDouble (): declared in kotlin.Number + public abstract fun toDouble (): kotlin.Double declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:toFloat visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + FUN IR_EXTERNAL_DECLARATION_STUB name:toFloat visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Float annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun toFloat (): declared in kotlin.Number + public abstract fun toFloat (): kotlin.Float declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:toInt visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Int annotations: - + IntrinsicConstEvaluation overridden: public abstract fun toInt (): kotlin.Int declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:toLong visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + FUN IR_EXTERNAL_DECLARATION_STUB name:toLong visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Long annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun toLong (): declared in kotlin.Number + public abstract fun toLong (): kotlin.Long declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:toShort visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + FUN IR_EXTERNAL_DECLARATION_STUB name:toShort visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.Short annotations: - + IntrinsicConstEvaluation overridden: - public abstract fun toShort (): declared in kotlin.Number + public abstract fun toShort (): kotlin.Short declared in kotlin.Number $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int - FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Int) returnType: + FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Int) returnType:kotlin.String annotations: - + IntrinsicConstEvaluation overridden: - public open fun toString (): [fake_override] declared in kotlin.Number - public open fun toString (): [fake_override] declared in kotlin.Comparable + public open fun toString (): kotlin.String [fake_override] declared in kotlin.Number + public open fun toString (): kotlin.String [fake_override] declared in kotlin.Comparable $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:unaryMinus visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:unaryPlus visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int [operator] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:ushr visibility:public modality:FINAL <> ($this:kotlin.Int, bitCount:kotlin.Int) returnType:kotlin.Int [infix] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:bitCount index:0 type:kotlin.Int FUN IR_EXTERNAL_DECLARATION_STUB name:xor visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int [infix] annotations: - + IntrinsicConstEvaluation $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Int - CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[] + CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int.Companion CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:private <> () returnType:kotlin.Int.Companion [primary] PROPERTY IR_EXTERNAL_DECLARATION_STUB name:MAX_VALUE visibility:public modality:FINAL [const,val] @@ -351,7 +351,7 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int.Companion PROPERTY IR_EXTERNAL_DECLARATION_STUB name:SIZE_BITS visibility:public modality:FINAL [const,val] annotations: - (1 = '1.3') + SinceKotlin(version = '1.3') FIELD IR_EXTERNAL_DECLARATION_STUB name:SIZE_BITS type:kotlin.Int visibility:public [final] EXPRESSION_BODY CONST Int type=kotlin.Int value=32 @@ -360,23 +360,23 @@ CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:publ $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int.Companion PROPERTY IR_EXTERNAL_DECLARATION_STUB name:SIZE_BYTES visibility:public modality:FINAL [const,val] annotations: - (1 = '1.3') + SinceKotlin(version = '1.3') FIELD IR_EXTERNAL_DECLARATION_STUB name:SIZE_BYTES type:kotlin.Int visibility:public [final] EXPRESSION_BODY CONST Int type=kotlin.Int value=4 FUN IR_EXTERNAL_DECLARATION_STUB name: visibility:public modality:FINAL <> ($this:kotlin.Int.Companion) returnType:kotlin.Int correspondingProperty: PROPERTY IR_EXTERNAL_DECLARATION_STUB name:SIZE_BYTES visibility:public modality:FINAL [const,val] $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:kotlin.Int.Companion - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/constFromBuiltins.kt b/compiler/testData/ir/irText/stubs/constFromBuiltins.kt index 9f6808fb8db..65992c7f993 100644 --- a/compiler/testData/ir/irText/stubs/constFromBuiltins.kt +++ b/compiler/testData/ir/irText/stubs/constFromBuiltins.kt @@ -1,3 +1,3 @@ -// DUMP_EXTERNAL_CLASS: kotlin.Int +// DUMP_EXTERNAL_CLASS: kotlin/Int -val test = Int.MIN_VALUE \ No newline at end of file +val test = Int.MIN_VALUE diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.fir.ir.txt new file mode 100644 index 00000000000..ef22b1db925 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.fir.ir.txt @@ -0,0 +1,20 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J1 modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J1.J1> + TYPE_PARAMETER name:T1 index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J1.J1> + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public (x1:@[FlexibleNullability] X1 of .J1.?) returnType:.J1.J1> + TYPE_PARAMETER name:X1 index:1 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + VALUE_PARAMETER name:x1 index:0 type:@[FlexibleNullability] X1 of .J1.? + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J1.J1>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J1.J1> + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J1.J1>) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J1.J1> + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J1.J1>) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J1.J1> diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.ir.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.ir.txt index e1bc513af66..4b69a0f241b 100644 --- a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.__J1.ir.txt @@ -1,42 +1,42 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J1 modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:T1 index:0 variance: superTypes:[?] reified:false - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.J1.J1> - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public (x1:X1 of .J1.?) returnType:.J1.J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X1 index:1 variance: superTypes:[?] reified:false - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:x1 index:0 type:X1 of .J1.? - CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J2 modality:OPEN visibility:public [inner] superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J2.J1.J2, T1 of .J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:T2 index:0 variance: superTypes:[?] reified:false - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> ($this:.J1.J1>) returnType:.J1.J2.J1.J2, T1 of .J1> - $outer: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J1> - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public ($this:.J1.J1>, x2:X2 of .J1.J2.?) returnType:.J1.J2.J1.J2, T1 of .J1> - TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X2 index:1 variance: superTypes:[?] reified:false - $outer: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J1.J1> - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:x2 index:0 type:X2 of .J1.J2.? - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J1 modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:T1 index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J1.J1> + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public (x1:@[FlexibleNullability] X1 of .J1.?) returnType:.J1.J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X1 index:1 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:x1 index:0 type:@[FlexibleNullability] X1 of .J1.? + CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J2 modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J2.J1.J2, T1 of .J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:T2 index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> ($this:.J1.J1>) returnType:.J1.J2.J1.J2, T1 of .J1> + $outer: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J1> + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public ($this:.J1.J1>, x2:@[FlexibleNullability] X2 of .J1.J2.?) returnType:.J1.J2.J1.J2, T1 of .J1> + TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:X2 index:1 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $outer: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J1.J1> + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:x2 index:0 type:@[FlexibleNullability] X2 of .J1.J2.? + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType: [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt new file mode 100644 index 00000000000..b26e56a9abb --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt @@ -0,0 +1,50 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB ENUM_CLASS name:JEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<@[FlexibleNullability] .JEnum?>] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.JEnum + ENUM_ENTRY IR_EXTERNAL_JAVA_DECLARATION_STUB name:ONE + ENUM_ENTRY IR_EXTERNAL_JAVA_DECLARATION_STUB name:TWO + ENUM_ENTRY IR_EXTERNAL_JAVA_DECLARATION_STUB name:THREE + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.JEnum> + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.JEnum + VALUE_PARAMETER name:value index:0 type:kotlin.String + FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:.JEnum) returnType:kotlin.Any [fake_override] + overridden: + protected final fun clone (): kotlin.Any declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:.JEnum, other:@[FlexibleNullability] .JEnum?) returnType:kotlin.Int [fake_override,operator] + overridden: + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + VALUE_PARAMETER name:other index:0 type:@[FlexibleNullability] .JEnum? + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:.JEnum, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:.JEnum) returnType:kotlin.Int [fake_override] + overridden: + public final fun hashCode (): kotlin.Int declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.JEnum) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] + annotations: + IntrinsicConstEvaluation + overridden: + public final name: kotlin.String [val] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.JEnum) returnType:kotlin.String [fake_override] + annotations: + IntrinsicConstEvaluation + correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] + overridden: + public final fun (): kotlin.String declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] + overridden: + public final ordinal: kotlin.Int [val] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:.JEnum) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [fake_override,val] + overridden: + public final fun (): kotlin.Int declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum diff --git a/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.ir.txt b/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.ir.txt index 62715c1dfe2..f80d3462a82 100644 --- a/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.ir.txt @@ -1,57 +1,57 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB ENUM_CLASS name:JEnum modality:FINAL visibility:public superTypes:[<.JEnum?>] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.JEnum - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.JEnum [primary] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB ENUM_CLASS name:JEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<@[FlexibleNullability] .JEnum?>] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.JEnum + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.JEnum [primary] ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:ONE ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:TWO ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:THREE - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:<.JEnum?>) returnType: [fake_override] + FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:kotlin.Any [fake_override] overridden: - protected final fun clone (): declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<.JEnum?>, other:.JEnum?) returnType: [fake_override,operator] + protected final fun clone (): kotlin.Any declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>, other:@[FlexibleNullability] .JEnum?) returnType:kotlin.Int [fake_override,operator] overridden: - public final fun compareTo (other: ): [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:.JEnum? - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<.JEnum?>, other:?) returnType: [fake_override,operator] + public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:@[FlexibleNullability] .JEnum? + FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public final fun equals (other: ?): [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<.JEnum?>) returnType: [fake_override] + public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:kotlin.Int [fake_override] overridden: - public final fun hashCode (): declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<.JEnum?>) returnType: [fake_override] + public final fun hashCode (): kotlin.Int declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<.JEnum?>) returnType:<.JEnum?>? [fake_override] + public open fun toString (): kotlin.String declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .JEnum?>? [fake_override] overridden: - public final fun getDeclaringClass (): <?>? declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<.JEnum?>) returnType: [fake_override] + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:kotlin.Unit [fake_override] overridden: - protected/*protected and package*/ final fun finalize (): declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> PROPERTY IR_EXTERNAL_DECLARATION_STUB name:name visibility:public modality:FINAL [fake_override,val] annotations: - + IntrinsicConstEvaluation overridden: - public final name: [val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<.JEnum?>) returnType: [fake_override] + public final name: kotlin.String [val] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:kotlin.String [fake_override] correspondingProperty: PROPERTY IR_EXTERNAL_DECLARATION_STUB name:name visibility:public modality:FINAL [fake_override,val] overridden: - public final fun (): declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> + public final fun (): kotlin.String declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> PROPERTY IR_EXTERNAL_DECLARATION_STUB name:ordinal visibility:public modality:FINAL [fake_override,val] overridden: - public final ordinal: [val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<.JEnum?>) returnType: [fake_override] + public final ordinal: kotlin.Int [val] + FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum<@[FlexibleNullability] .JEnum?>) returnType:kotlin.Int [fake_override] correspondingProperty: PROPERTY IR_EXTERNAL_DECLARATION_STUB name:ordinal visibility:public modality:FINAL [fake_override,val] overridden: - public final fun (): declared in kotlin.Enum - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<.JEnum?> - FUN IR_EXTERNAL_DECLARATION_STUB name:valueOf visibility:public modality:FINAL <> (value:) returnType:.JEnum - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:value index:0 type: - FUN IR_EXTERNAL_DECLARATION_STUB name:values visibility:public modality:FINAL <> () returnType:<.JEnum> + public final fun (): kotlin.Int declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Enum<@[FlexibleNullability] .JEnum?> + FUN IR_EXTERNAL_DECLARATION_STUB name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.JEnum + VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:value index:0 type:kotlin.String + FUN IR_EXTERNAL_DECLARATION_STUB name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.JEnum> diff --git a/compiler/testData/ir/irText/stubs/javaInnerClass.__J.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaInnerClass.__J.fir.ir.txt new file mode 100644 index 00000000000..642126609c7 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaInnerClass.__J.fir.ir.txt @@ -0,0 +1,18 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:bar visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Unit + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J diff --git a/compiler/testData/ir/irText/stubs/javaInnerClass.__J.ir.txt b/compiler/testData/ir/irText/stubs/javaInnerClass.__J.ir.txt index 3ed05f953ca..07d5ccb4a6c 100644 --- a/compiler/testData/ir/irText/stubs/javaInnerClass.__J.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaInnerClass.__J.ir.txt @@ -1,41 +1,41 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.J [primary] - CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:JInner modality:OPEN visibility:public [inner] superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J.JInner - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> ($this:.J) returnType:.J.JInner [primary] - $outer: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:JInner modality:OPEN visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J.JInner + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> ($this:.J) returnType:.J.JInner [primary] + $outer: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:foo visibility:public modality:OPEN <> ($this:.J.JInner) returnType: - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J.JInner - PROPERTY IR_EXTERNAL_DECLARATION_STUB name:z visibility:public modality:FINAL [var] - FIELD IR_EXTERNAL_DECLARATION_STUB name:z type: visibility:public - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType: [fake_override,operator] + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:foo visibility:public modality:OPEN <> ($this:.J.JInner) returnType:kotlin.Unit + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J.JInner + PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:z visibility:public modality:FINAL [var] + FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:z type:kotlin.Int visibility:public + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:bar visibility:public modality:OPEN <> ($this:.J) returnType: - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - PROPERTY IR_EXTERNAL_DECLARATION_STUB name:x visibility:public modality:FINAL [var] - FIELD IR_EXTERNAL_DECLARATION_STUB name:x type: visibility:public + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:bar visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Unit + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + PROPERTY IR_EXTERNAL_JAVA_DECLARATION_STUB name:x visibility:public modality:FINAL [var] + FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:x type:kotlin.Int visibility:public diff --git a/compiler/testData/ir/irText/stubs/javaMethod.__J.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaMethod.__J.fir.ir.txt new file mode 100644 index 00000000000..642126609c7 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaMethod.__J.fir.ir.txt @@ -0,0 +1,18 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:bar visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Unit + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J diff --git a/compiler/testData/ir/irText/stubs/javaMethod.__J.ir.txt b/compiler/testData/ir/irText/stubs/javaMethod.__J.ir.txt index 8c9b4f997cc..22b417a1c67 100644 --- a/compiler/testData/ir/irText/stubs/javaMethod.__J.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaMethod.__J.ir.txt @@ -1,18 +1,18 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.J [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:bar visibility:public modality:OPEN <> ($this:.J) returnType: - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:bar visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Unit + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J diff --git a/compiler/testData/ir/irText/stubs/javaNestedClass.__J.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaNestedClass.__J.fir.ir.txt new file mode 100644 index 00000000000..725c4170711 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaNestedClass.__J.fir.ir.txt @@ -0,0 +1,16 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J diff --git a/compiler/testData/ir/irText/stubs/javaNestedClass.__J.ir.txt b/compiler/testData/ir/irText/stubs/javaNestedClass.__J.ir.txt index 725526e4dc1..75a3bdd4270 100644 --- a/compiler/testData/ir/irText/stubs/javaNestedClass.__J.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaNestedClass.__J.ir.txt @@ -1,35 +1,35 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.J [primary] - CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:JJ modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J.JJ - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.J.JJ [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:JJ modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J.JJ + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J.JJ [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:foo visibility:public modality:OPEN <> ($this:.J.JJ) returnType: - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J.JJ - FUN IR_EXTERNAL_DECLARATION_STUB name:bar visibility:public modality:OPEN <> () returnType: - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType: [fake_override,operator] + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:foo visibility:public modality:OPEN <> ($this:.J.JJ) returnType:kotlin.Unit + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J.JJ + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:bar visibility:public modality:OPEN <> () returnType:kotlin.Unit + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.fir.ir.txt new file mode 100644 index 00000000000..725c4170711 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.fir.ir.txt @@ -0,0 +1,16 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J diff --git a/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.ir.txt b/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.ir.txt index 1636d20faab..8e16edd2a87 100644 --- a/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaStaticMethod.__J.ir.txt @@ -1,17 +1,17 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.J [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:.J [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:bar visibility:public modality:OPEN <> () returnType: + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:bar visibility:public modality:OPEN <> () returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.fir.ir.txt new file mode 100644 index 00000000000..092b7f49ed9 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.fir.ir.txt @@ -0,0 +1,18 @@ +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public/*package*/ superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public/*package*/ <> () returnType:.J [primary] + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:getFoo visibility:public modality:OPEN <> ($this:.J) returnType:@[FlexibleNullability] kotlin.String? + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:.J, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:.J) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.J diff --git a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.ir.txt b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.ir.txt index 05c8b18fe33..14df4f9fb4b 100644 --- a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.__J.ir.txt @@ -1,18 +1,18 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public/*package*/ superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public/*package*/ <> () returnType:.J [primary] - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB CLASS name:J modality:OPEN visibility:public/*package*/ superTypes:[kotlin.Any] + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J + CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public/*package*/ <> () returnType:.J [primary] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any + public open fun hashCode (): kotlin.Int declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:getFoo visibility:public modality:OPEN <> ($this:.J) returnType:? - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.J + FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:getFoo visibility:public modality:OPEN <> ($this:.J) returnType:@[FlexibleNullability] kotlin.String? + $this: VALUE_PARAMETER IR_EXTERNAL_JAVA_DECLARATION_STUB name: type:.J diff --git a/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.fir.ir.txt b/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.fir.ir.txt new file mode 100644 index 00000000000..bfd467410e7 --- /dev/null +++ b/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.fir.ir.txt @@ -0,0 +1,45 @@ +CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer + CONSTRUCTOR visibility:public <> () returnType:.Outer [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' + CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' + FUN name:foo visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Outer.Inner + BLOCK_BODY + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:bar visibility:public modality:FINAL <> ($this:.Outer) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Outer + BLOCK_BODY + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + overridden: + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + overridden: + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + overridden: + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.ir.txt b/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.ir.txt index f88b88eebe6..bfd467410e7 100644 --- a/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.ir.txt +++ b/compiler/testData/ir/irText/stubs/kotlinInnerClass.__Outer.ir.txt @@ -1,37 +1,45 @@ -CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Outer modality:FINAL visibility:public superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.Outer - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:.Outer [primary] - CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[] - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.Outer.Inner - CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> ($this:.Outer) returnType:.Outer.Inner [primary] - $outer: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.Outer - FUN IR_EXTERNAL_DECLARATION_STUB name:foo visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType: - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.Outer.Inner - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:, other:?) returnType: [fake_override,operator] +CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer + CONSTRUCTOR visibility:public <> () returnType:.Outer [primary] + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public superTypes:[kotlin.Any]' + CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] + $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Outer.Inner + CONSTRUCTOR visibility:public <> ($this:.Outer) returnType:.Outer.Inner [primary] + $outer: VALUE_PARAMETER name: type:.Outer + BLOCK_BODY + DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' + INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' + FUN name:foo visibility:public modality:FINAL <> ($this:.Outer.Inner) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Outer.Inner + BLOCK_BODY + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: ?): [operator] declared in kotlin.Any - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN IR_EXTERNAL_DECLARATION_STUB name:bar visibility:public modality:FINAL <> ($this:.Outer) returnType: - $this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name: type:.Outer - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType: [fake_override,operator] + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN name:bar visibility:public modality:FINAL <> ($this:.Outer) returnType:kotlin.Unit + $this: VALUE_PARAMETER name: type:.Outer + BLOCK_BODY + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: - public open fun equals (other: kotlin.Any?): [operator] declared in kotlin.Any - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + VALUE_PARAMETER name:other index:0 type:kotlin.Any? + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] overridden: - public open fun hashCode (): declared in kotlin.Any - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType: [fake_override] + public open fun hashCode (): kotlin.Int declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] overridden: - public open fun toString (): declared in kotlin.Any - $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:kotlin.Any + public open fun toString (): kotlin.String declared in kotlin.Any + $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt index de4a2d382fd..cd127e8349f 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrTextDumpHandler.kt @@ -5,22 +5,13 @@ package org.jetbrains.kotlin.test.backend.handlers -import org.jetbrains.kotlin.backend.common.serialization.DescriptorByIdSignatureFinderImpl -import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureDescriptor -import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.descriptors.findClassAcrossModuleDependencies +import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET -import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrFile -import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl -import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator -import org.jetbrains.kotlin.ir.util.SymbolTable import org.jetbrains.kotlin.ir.util.dump import org.jetbrains.kotlin.ir.util.dumpTreesFromLineNumber import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.psi2ir.generators.DeclarationStubGeneratorImpl import org.jetbrains.kotlin.test.backend.ir.IrBackendInput import org.jetbrains.kotlin.test.directives.CodegenTestDirectives import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_EXTERNAL_CLASS @@ -43,9 +34,15 @@ class IrTextDumpHandler(testServices: TestServices) : AbstractIrHandler(testServ companion object { const val DUMP_EXTENSION = "ir.txt" - fun computeDumpExtension(module: TestModule, defaultExtension: String): String { - return if (module.frontendKind == FrontendKinds.ClassicFrontend || FIR_IDENTICAL in module.directives) - defaultExtension else "fir.$defaultExtension" + fun computeDumpExtension(module: TestModule, defaultExtension: String, ignoreFirIdentical: Boolean = false): String { + return if ( + module.frontendKind == FrontendKinds.ClassicFrontend || + (!ignoreFirIdentical && FIR_IDENTICAL in module.directives) + ) { + defaultExtension + } else { + "fir.$defaultExtension" + } } fun List.groupWithTestFiles(module: TestModule): List> = mapNotNull { irFile -> @@ -61,7 +58,6 @@ class IrTextDumpHandler(testServices: TestServices) : AbstractIrHandler(testServ private val baseDumper = MultiModuleInfoDumper() private val buildersForSeparateFileDumps: MutableMap = mutableMapOf() - @OptIn(ExperimentalStdlibApi::class) override fun processModule(module: TestModule, info: IrBackendInput) { if (DUMP_IR !in module.directives) return val irFiles = info.irModuleFragment.files @@ -79,42 +75,27 @@ class IrTextDumpHandler(testServices: TestServices) : AbstractIrHandler(testServ } private fun compareDumpsOfExternalClasses(module: TestModule, info: IrBackendInput) { - // FIR doesn't support searching descriptors - if (module.frontendKind == FrontendKinds.FIR) return - - val externalClassFqns = module.directives[DUMP_EXTERNAL_CLASS] - if (externalClassFqns.isEmpty()) return - - // TODO: why JS one is used here in original AbstractIrTextTestCase? - val mangler = JsManglerDesc - val signaturer = IdSignatureDescriptor(mangler) - val irModule = info.irModuleFragment - val stubGenerator = DeclarationStubGeneratorImpl( - irModule.descriptor, - SymbolTable(signaturer, IrFactoryImpl), // TODO - irModule.irBuiltins, - DescriptorByIdSignatureFinderImpl(irModule.descriptor, mangler) - ) + val externalClassIds = module.directives[DUMP_EXTERNAL_CLASS] + if (externalClassIds.isEmpty()) return val baseFile = testServices.moduleStructure.originalTestDataFiles.first() - for (externalClassFqn in externalClassFqns) { - val classDump = stubGenerator.generateExternalClass(irModule.descriptor, externalClassFqn).dump() - val expectedFile = baseFile.withSuffixAndExtension(".__$externalClassFqn", module.dumpExtension) + for (externalClassId in externalClassIds) { + val classDump = info.irPluginContext.findExternalClass(externalClassId).dump() + val suffix = ".__${externalClassId.replace("/", ".")}" + val expectedFile = baseFile.withSuffixAndExtension(suffix, module.getDumpExtension(ignoreFirIdentical = true)) assertions.assertEqualsToFile(expectedFile, classDump) } } - private fun DeclarationStubGenerator.generateExternalClass(descriptor: ModuleDescriptor, externalClassFqn: String): IrClass { - val classDescriptor = - descriptor.findClassAcrossModuleDependencies(ClassId.topLevel(FqName(externalClassFqn))) - ?: throw AssertionError("Can't find a class in external dependencies: $externalClassFqn") - - return generateMemberStub(classDescriptor) as IrClass + private fun IrPluginContext.findExternalClass(externalClassId: String): IrClass { + val classId = ClassId.fromString(externalClassId) + return referenceClass(classId)?.owner ?: assertions.fail { "Can't find a class in external dependencies: $externalClassId" } } override fun processAfterAllModules(someAssertionWasFailed: Boolean) { val moduleStructure = testServices.moduleStructure - val defaultExpectedFile = moduleStructure.originalTestDataFiles.first().withExtension(moduleStructure.modules.first().dumpExtension) + val defaultExpectedFile = moduleStructure.originalTestDataFiles.first() + .withExtension(moduleStructure.modules.first().getDumpExtension()) checkOneExpectedFile(defaultExpectedFile, baseDumper.generateResultingDump()) buildersForSeparateFileDumps.entries.forEach { (expectedFile, dump) -> checkOneExpectedFile(expectedFile, dump.toString()) } } @@ -125,6 +106,7 @@ class IrTextDumpHandler(testServices: TestServices) : AbstractIrHandler(testServ } } - private val TestModule.dumpExtension: String - get() = computeDumpExtension(this, DUMP_EXTENSION) + private fun TestModule.getDumpExtension(ignoreFirIdentical: Boolean = false): String { + return computeDumpExtension(this, DUMP_EXTENSION, ignoreFirIdentical) + } } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/ir/IrBackendInput.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/ir/IrBackendInput.kt index ca548f46ea8..79ae4a24cc9 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/ir/IrBackendInput.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/ir/IrBackendInput.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.test.backend.ir import org.jetbrains.kotlin.KtSourceFile +import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext import org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory import org.jetbrains.kotlin.codegen.state.GenerationState import org.jetbrains.kotlin.descriptors.DeclarationDescriptor @@ -24,8 +25,14 @@ sealed class IrBackendInput : ResultingArtifact.BackendInput() { abstract val irModuleFragment: IrModuleFragment + /* + * Here plugin context can be used as a service for inspecting resulting IR module + */ + abstract val irPluginContext: IrPluginContext + data class JsIrBackendInput( override val irModuleFragment: IrModuleFragment, + override val irPluginContext: IrPluginContext, val sourceFiles: List, val icData: List, val expectDescriptorToSymbol: MutableMap, // TODO: abstract from descriptors @@ -41,5 +48,8 @@ sealed class IrBackendInput : ResultingArtifact.BackendInput() { ) : IrBackendInput() { override val irModuleFragment: IrModuleFragment get() = backendInput.irModuleFragment + + override val irPluginContext: IrPluginContext + get() = backendInput.pluginContext } } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontend2IrConverter.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontend2IrConverter.kt index 0f1055727c9..ea2702d36b9 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontend2IrConverter.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/ClassicFrontend2IrConverter.kt @@ -64,10 +64,12 @@ class ClassicFrontend2IrConverter( .diagnosticReporter(DiagnosticReporterFactory.createReporter()) .build() + val convertionResult = + codegenFactory.convertToIr(CodegenFactory.IrConversionInput.fromGenerationStateAndFiles(state, psiFiles.values)) return IrBackendInput.JvmIrBackendInput( state, codegenFactory, - codegenFactory.convertToIr(CodegenFactory.IrConversionInput.fromGenerationStateAndFiles(state, psiFiles.values)), + convertionResult, emptyList() ) } @@ -81,7 +83,7 @@ class ClassicFrontend2IrConverter( val sourceFiles = psiFiles.values.toList() val icData = configuration.incrementalDataProvider?.getSerializedData(sourceFiles) ?: emptyList() val expectDescriptorToSymbol = mutableMapOf() - val moduleFragment = generateIrForKlibSerialization( + val (moduleFragment, pluginContext) = generateIrForKlibSerialization( project, sourceFiles, configuration, @@ -101,6 +103,7 @@ class ClassicFrontend2IrConverter( return IrBackendInput.JsIrBackendInput( moduleFragment, + pluginContext, sourceFiles.map(::KtPsiSourceFile), icData, expectDescriptorToSymbol = expectDescriptorToSymbol, diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrJsResultsConverter.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrJsResultsConverter.kt index 3498a72a49f..cc4d5ddfc8d 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrJsResultsConverter.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrJsResultsConverter.kt @@ -68,7 +68,7 @@ class Fir2IrJsResultsConverter( val fir2IrExtensions = Fir2IrExtensions.Default val firFiles = inputArtifact.allFirFiles.values - val (irModuleFragment, components) = + val (irModuleFragment, components, pluginContext) = inputArtifact.firAnalyzerFacade.convertToJsIr(firFiles, fir2IrExtensions, module, configuration, testServices) val sourceFiles = firFiles.mapNotNull { it.sourceFile } @@ -86,6 +86,7 @@ class Fir2IrJsResultsConverter( return IrBackendInput.JsIrBackendInput( irModuleFragment, + pluginContext, sourceFiles, icData, expectDescriptorToSymbol, diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrResultsConverter.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrResultsConverter.kt index 155b03157d3..adfe8ca9d40 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrResultsConverter.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/Fir2IrResultsConverter.kt @@ -44,7 +44,7 @@ class Fir2IrResultsConverter( val configuration = compilerConfigurationProvider.getCompilerConfiguration(module) val fir2IrExtensions = JvmFir2IrExtensions(configuration, JvmIrDeserializerImpl(), JvmIrMangler) - val (irModuleFragment, components) = inputArtifact.firAnalyzerFacade.convertToIr(fir2IrExtensions) + val (irModuleFragment, components, pluginContext) = inputArtifact.firAnalyzerFacade.convertToIr(fir2IrExtensions) val dummyBindingContext = NoScopeRecordCliBindingTrace().bindingContext val phaseConfig = configuration.get(CLIConfigurationKeys.PHASE_CONFIG) @@ -82,6 +82,7 @@ class Fir2IrResultsConverter( components.irProviders, fir2IrExtensions, FirJvmBackendExtension(inputArtifact.session, components), + pluginContext, notifyCodegenStart = {}, ), sourceFiles diff --git a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt index 29be4cf1766..3568f7425db 100644 --- a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt +++ b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt @@ -123,7 +123,7 @@ object GenerationUtils { generateSignatures = false ) val fir2IrExtensions = JvmFir2IrExtensions(configuration, JvmIrDeserializerImpl(), JvmIrMangler) - val (moduleFragment, components) = firAnalyzerFacade.convertToIr(fir2IrExtensions) + val (moduleFragment, components, pluginContext) = firAnalyzerFacade.convertToIr(fir2IrExtensions) val dummyBindingContext = NoScopeRecordCliBindingTrace().bindingContext val codegenFactory = JvmIrCodegenFactory( @@ -143,7 +143,7 @@ object GenerationUtils { generationState.oldBEInitTrace(files) codegenFactory.generateModuleInFrontendIRMode( generationState, moduleFragment, components.symbolTable, components.irProviders, - fir2IrExtensions, FirJvmBackendExtension(session, components), + fir2IrExtensions, FirJvmBackendExtension(session, components), pluginContext, ) {} generationState.factory.done() diff --git a/compiler/tests/org/jetbrains/kotlin/klib/FilePathsInKlibTest.kt b/compiler/tests/org/jetbrains/kotlin/klib/FilePathsInKlibTest.kt index 6e0fc7797bc..e9fa8725ee5 100644 --- a/compiler/tests/org/jetbrains/kotlin/klib/FilePathsInKlibTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/klib/FilePathsInKlibTest.kt @@ -62,7 +62,7 @@ class FilePathsInKlibTest : CodegenTestCase() { val sourceFiles = (module.mainModule as MainModule.SourceFiles).files val icData = module.compilerConfiguration.incrementalDataProvider?.getSerializedData(sourceFiles) ?: emptyList() val expectDescriptorToSymbol = mutableMapOf() - val moduleFragment = generateIrForKlibSerialization( + val (moduleFragment, _) = generateIrForKlibSerialization( module.project, sourceFiles, module.compilerConfiguration, @@ -220,4 +220,4 @@ class FilePathsInKlibTest : CodegenTestCase() { workingDirFile.deleteRecursively() } } -} \ No newline at end of file +} diff --git a/js/js.tests/test/org/jetbrains/kotlin/incremental/AbstractInvalidationTest.kt b/js/js.tests/test/org/jetbrains/kotlin/incremental/AbstractInvalidationTest.kt index fa1bd8f2c07..21031ad952b 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/incremental/AbstractInvalidationTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/incremental/AbstractInvalidationTest.kt @@ -342,7 +342,7 @@ abstract class AbstractInvalidationTest : KotlinTestWithEnvironment() { val moduleSourceFiles = (sourceModule.mainModule as MainModule.SourceFiles).files val icData = sourceModule.compilerConfiguration.incrementalDataProvider?.getSerializedData(moduleSourceFiles) ?: emptyList() val expectDescriptorToSymbol = mutableMapOf() - val moduleFragment = generateIrForKlibSerialization( + val (moduleFragment, _) = generateIrForKlibSerialization( environment.project, moduleSourceFiles, configuration, diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/AbstractJsKLibABITestCase.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/AbstractJsKLibABITestCase.kt index 2e82855c982..674a618a916 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/AbstractJsKLibABITestCase.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/AbstractJsKLibABITestCase.kt @@ -124,7 +124,7 @@ abstract class AbstractJsKLibABITestCase : KtUsefulTestCase() { val moduleSourceFiles = (sourceModule.mainModule as MainModule.SourceFiles).files val icData = sourceModule.compilerConfiguration.incrementalDataProvider?.getSerializedData(moduleSourceFiles) ?: emptyList() val expectDescriptorToSymbol = mutableMapOf() - val moduleFragment = generateIrForKlibSerialization( + val (moduleFragment, _) = generateIrForKlibSerialization( environment.project, moduleSourceFiles, config,