diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java index 6acb65c83b6..969cdd7d345 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/FunctionCodegen.java @@ -461,10 +461,7 @@ public class FunctionCodegen { boolean staticInCompanionObject ) { OwnerKind contextKind = methodContext.getContextKind(); - if (!state.getClassBuilderMode().generateBodies - || isAbstractMethod(functionDescriptor, contextKind, state.getJvmDefaultMode()) - || shouldSkipMethodBodyInAbiMode(state.getClassBuilderMode(), origin) - ) { + if (!state.getClassBuilderMode().generateBodies || isAbstractMethod(functionDescriptor, contextKind, state.getJvmDefaultMode())) { generateLocalVariableTable( mv, jvmSignature, @@ -497,13 +494,6 @@ public class FunctionCodegen { endVisit(mv, null, origin.getElement()); } - private static boolean shouldSkipMethodBodyInAbiMode(@NotNull ClassBuilderMode classBuilderMode, @NotNull JvmDeclarationOrigin origin) { - if (classBuilderMode != ClassBuilderMode.ABI) return false; - - DeclarationDescriptor descriptor = origin.getDescriptor(); - return descriptor != null && !InlineUtil.isInlineOrContainingInline(descriptor); - } - public static void generateParameterAnnotations( @NotNull FunctionDescriptor functionDescriptor, @NotNull MethodVisitor mv, diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index f1fa40221a2..141bfe1ebbf 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -179,24 +179,6 @@ fun main(args: Array) { } } - testGroup( - "plugins/jvm-abi-gen/test", "plugins/jvm-abi-gen/testData", - testRunnerMethodName = "runTestWithCustomIgnoreDirective", - additionalRunnerArguments = listOf("\"// IGNORE_BACKEND_LEGACY: \"") - ) { - testClass { - model("compare", recursive = false, extension = null, targetBackend = TargetBackend.JVM_IR) - } - - testClass { - model("content", recursive = false, extension = null, targetBackend = TargetBackend.JVM_IR) - } - - testClass { - model("compile", recursive = false, extension = null, targetBackend = TargetBackend.JVM_IR) - } - } - testGroup("plugins/sam-with-receiver/tests-gen", "plugins/sam-with-receiver/testData") { testClass { model("script", extension = "kts") diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiAnalysisHandlerExtension.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiAnalysisHandlerExtension.kt deleted file mode 100644 index 2a8b4956659..00000000000 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiAnalysisHandlerExtension.kt +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi - -import com.intellij.openapi.project.Project -import com.intellij.openapi.util.io.FileUtil -import org.jetbrains.kotlin.analyzer.AnalysisResult -import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys -import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity -import org.jetbrains.kotlin.cli.common.messages.MessageRenderer -import org.jetbrains.kotlin.cli.common.messages.OutputMessageUtil -import org.jetbrains.kotlin.cli.common.messages.PrintingMessageCollector -import org.jetbrains.kotlin.codegen.* -import org.jetbrains.kotlin.codegen.state.GenerationState -import org.jetbrains.kotlin.compilerRunner.OutputItemsCollector -import org.jetbrains.kotlin.config.CommonConfigurationKeys -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.JVMConfigurationKeys -import org.jetbrains.kotlin.config.languageVersionSettings -import org.jetbrains.kotlin.descriptors.ModuleDescriptor -import org.jetbrains.kotlin.diagnostics.Severity -import org.jetbrains.kotlin.incremental.isClassFile -import org.jetbrains.kotlin.jvm.abi.asm.AbiClassBuilder -import org.jetbrains.kotlin.jvm.abi.asm.FilterInnerClassesVisitor -import org.jetbrains.kotlin.jvm.abi.asm.InnerClassesCollectingVisitor -import org.jetbrains.kotlin.load.kotlin.FileBasedKotlinClass -import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader -import org.jetbrains.kotlin.metadata.ProtoBuf -import org.jetbrains.kotlin.metadata.deserialization.Flags -import org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil -import org.jetbrains.kotlin.modules.TargetId -import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.psi.KtFile -import org.jetbrains.kotlin.resolve.BindingTrace -import org.jetbrains.kotlin.resolve.jvm.JvmClassName -import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin -import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension -import org.jetbrains.kotlin.utils.toMetadataVersion -import org.jetbrains.org.objectweb.asm.ClassReader -import org.jetbrains.org.objectweb.asm.ClassVisitor -import org.jetbrains.org.objectweb.asm.ClassWriter -import org.jetbrains.org.objectweb.asm.Opcodes -import java.io.File -import java.util.* - -class JvmAbiAnalysisHandlerExtension( - compilerConfiguration: CompilerConfiguration -) : AnalysisHandlerExtension { - private val compilerConfiguration: CompilerConfiguration = compilerConfiguration.copy().apply { - put(JVMConfigurationKeys.IR, false) - } - - override fun analysisCompleted( - project: Project, - module: ModuleDescriptor, - bindingTrace: BindingTrace, - files: Collection - ): AnalysisResult? { - val bindingContext = bindingTrace.bindingContext - if (bindingContext.diagnostics.any { it.severity == Severity.ERROR }) return null - - val targetId = TargetId( - name = compilerConfiguration[CommonConfigurationKeys.MODULE_NAME] ?: module.name.asString(), - type = "java-production" - ) - - val generationState = GenerationState.Builder( - project, - AbiBinaries, - module, - bindingContext, - compilerConfiguration - ).targetId(targetId).build() - KotlinCodegenFacade.compileCorrectFiles(files, generationState, DefaultCodegenFactory) - - val outputDir = compilerConfiguration.get(JVMConfigurationKeys.OUTPUT_DIRECTORY)!! - val outputs = ArrayList() - - for (outputFile in generationState.factory.asList()) { - val file = File(outputDir, outputFile.relativePath) - outputs.add(AbiOutput(file, outputFile.sourceFiles, outputFile.asByteArray())) - } - - // private/local/synthetic class removal is temporarily turned off, because the implementation - // was not correct: it was not taking into account that private/local classes could be used - // from inline functions - // todo: implement correct removal - //removeUnneededClasses(outputs) - - val messageCollector = compilerConfiguration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY) - ?: PrintingMessageCollector(System.err, MessageRenderer.PLAIN_FULL_PATHS, false) - val reportOutputFiles = generationState.configuration.getBoolean(CommonConfigurationKeys.REPORT_OUTPUT_FILES) - val outputItemsCollector = - OutputItemsCollector { sourceFiles, outputFile -> - messageCollector.report(CompilerMessageSeverity.OUTPUT, OutputMessageUtil.formatOutputMessage(sourceFiles, outputFile)) - }.takeIf { reportOutputFiles } - outputs.forEach { it.flush(outputItemsCollector) } - return null - } - - /** - * Removes private or local classes from outputs - */ - // todo: fix usage (see analysisCompleted) - @Suppress("unused") - private fun removeUnneededClasses(outputs: Iterable) { - // maps internal names of classes: class -> inner classes - val innerClasses = HashMap>() - val internalNameToFile = HashMap() - - for (output in outputs) { - if (!output.file.isClassFile()) continue - - val visitor = InnerClassesCollectingVisitor() - output.accept(visitor) - val outputInternalName = visitor.ownInternalName - internalNameToFile[outputInternalName] = output.file - innerClasses[outputInternalName] = visitor.innerClasses - } - - // internal names of removed files - val classesToRemoveQueue = ArrayDeque() - for (output in outputs) { - if (!output.file.isClassFile()) continue - - val classData = output.classData(compilerConfiguration) ?: continue - val header = classData.classHeader - val isNeededForAbi = when (header.kind) { - KotlinClassHeader.Kind.CLASS -> { - val (_, classProto) = JvmProtoBufUtil.readClassDataFrom(header.data!!, header.strings!!) - val visibility = Flags.VISIBILITY.get(classProto.flags) - visibility != ProtoBuf.Visibility.PRIVATE && visibility != ProtoBuf.Visibility.LOCAL - } - KotlinClassHeader.Kind.SYNTHETIC_CLASS -> false - else -> true - } - - if (!isNeededForAbi) { - val jvmClassName = JvmClassName.byClassId(classData.classId) - classesToRemoveQueue.add(jvmClassName.internalName) - } - } - - // we can remove inner classes of removed classes - val classesToRemove = HashSet() - classesToRemove.addAll(classesToRemoveQueue) - while (classesToRemoveQueue.isNotEmpty()) { - val classToRemove = classesToRemoveQueue.removeFirst() - innerClasses[classToRemove]?.forEach { - if (classesToRemove.add(it)) { - classesToRemoveQueue.add(it) - } - } - } - - val classFilesToRemove = classesToRemove.mapTo(HashSet()) { internalNameToFile[it] } - for (output in outputs) { - if (!output.file.isClassFile()) continue - - if (output.file in classFilesToRemove) { - output.delete() - } else { - output.transform { writer -> - FilterInnerClassesVisitor(classesToRemove, Opcodes.API_VERSION, writer) - } - } - } - } - - private object AbiBinaries : ClassBuilderFactory { - override fun getClassBuilderMode(): ClassBuilderMode = - ClassBuilderMode.ABI - - override fun newClassBuilder(origin: JvmDeclarationOrigin): ClassBuilder = - AbiClassBuilder(ClassWriter(0)) - - override fun asText(builder: ClassBuilder): String = - throw UnsupportedOperationException("AbiBinaries generator asked for text") - - override fun asBytes(builder: ClassBuilder): ByteArray { - val visitor = builder.visitor as ClassWriter - return visitor.toByteArray() - } - - override fun close() {} - } - - private data class ClassData( - val classId: ClassId, - val classVersion: Int, - val classHeader: KotlinClassHeader - ) - - private class AbiOutput( - val file: File, - val sources: List, - // null bytes means that file should not be written - private var bytes: ByteArray? - ) { - fun classData(compilerConfiguration: CompilerConfiguration): ClassData? = - when { - bytes == null -> null - !file.isClassFile() -> null - else -> FileBasedKotlinClass.create( - bytes!!, compilerConfiguration.languageVersionSettings.languageVersion.toMetadataVersion() - ) { classId, classVersion, classHeader, _ -> - ClassData(classId, classVersion, classHeader) - } - } - - fun delete() { - bytes = null - } - - fun transform(fn: (writer: ClassWriter) -> ClassVisitor) { - val bytes = bytes ?: return - val cr = ClassReader(bytes) - val cw = ClassWriter(0) - val visitor = fn(cw) - cr.accept(visitor, 0) - this.bytes = cw.toByteArray() - } - - fun accept(visitor: ClassVisitor) { - val bytes = bytes ?: return - val cr = ClassReader(bytes) - cr.accept(visitor, 0) - } - - fun flush(outputItemsCollector: OutputItemsCollector?) { - val bytes = bytes ?: return - outputItemsCollector?.add(sources, file) - FileUtil.writeToFile(file, bytes) - } - } -} diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiCommandLineProcessor.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiCommandLineProcessor.kt index f7f5aa0e07e..c8f65a5b20f 100644 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiCommandLineProcessor.kt +++ b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiCommandLineProcessor.kt @@ -22,27 +22,18 @@ class JvmAbiCommandLineProcessor : CommandLineProcessor { "Output path for generated files. This can be either a directory or a jar file.", true ) - - val LEGACY_ABI_GEN_OPTION: CliOption = - CliOption( - "useLegacyAbiGen", - "true|false", - "Use the legacy two pass implementation of jvm-abi-gen.", - false - ) } override val pluginId: String get() = COMPILER_PLUGIN_ID override val pluginOptions: Collection - get() = listOf(OUTPUT_PATH_OPTION, LEGACY_ABI_GEN_OPTION) + get() = listOf(OUTPUT_PATH_OPTION) override fun processOption(option: AbstractCliOption, value: String, configuration: CompilerConfiguration) { when (option) { OUTPUT_PATH_OPTION -> configuration.put(JvmAbiConfigurationKeys.OUTPUT_PATH, value) - LEGACY_ABI_GEN_OPTION -> configuration.put(JvmAbiConfigurationKeys.LEGACY_ABI_GEN, value == "true") else -> throw CliOptionProcessingException("Unknown option: ${option.optionName}") } } -} \ No newline at end of file +} diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiComponentRegistrar.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiComponentRegistrar.kt index 5abb948aa91..3a61b6c51f7 100644 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiComponentRegistrar.kt +++ b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiComponentRegistrar.kt @@ -6,47 +6,23 @@ package org.jetbrains.kotlin.jvm.abi import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys -import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity import org.jetbrains.kotlin.cli.common.messages.MessageCollector import org.jetbrains.kotlin.codegen.extensions.ClassBuilderInterceptorExtension import org.jetbrains.kotlin.codegen.extensions.ClassFileFactoryFinalizerExtension import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar -import org.jetbrains.kotlin.config.CommonConfigurationKeys import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.JVMConfigurationKeys -import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension import java.io.File class JvmAbiComponentRegistrar : CompilerPluginRegistrar() { override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) { val outputPath = configuration.getNotNull(JvmAbiConfigurationKeys.OUTPUT_PATH) val messageCollector = configuration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE) - if (configuration.get(JvmAbiConfigurationKeys.LEGACY_ABI_GEN, false)) { - if (configuration.getBoolean(CommonConfigurationKeys.USE_FIR)) { - messageCollector.report(CompilerMessageSeverity.ERROR, "Legacy jvm-abi-gen does not support K2 compiler.") - } else { - messageCollector.report( - CompilerMessageSeverity.STRONG_WARNING, - "Legacy jvm-abi-gen is deprecated and will be removed in a future version. " + - "Please migrate to the new jvm-abi-gen implementation." - ) - } - // Use the two-pass implementation - if (outputPath.endsWith(".jar")) { - messageCollector.report(CompilerMessageSeverity.ERROR, "Legacy jvm-abi-gen does not support jar output.") - } - val extension = JvmAbiAnalysisHandlerExtension(configuration.copy().apply { - put(JVMConfigurationKeys.OUTPUT_DIRECTORY, File(outputPath)) - }) - AnalysisHandlerExtension.registerExtension(extension) - } else { - // Use the single-pass implementation, using the new ABI flag in the metadata. - configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true) - val builderExtension = JvmAbiClassBuilderInterceptor() - val outputExtension = JvmAbiOutputExtension(File(outputPath), builderExtension.abiClassInfo, messageCollector) - ClassBuilderInterceptorExtension.registerExtension( builderExtension) - ClassFileFactoryFinalizerExtension.registerExtension( outputExtension) - } + configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true) + val builderExtension = JvmAbiClassBuilderInterceptor() + val outputExtension = JvmAbiOutputExtension(File(outputPath), builderExtension.abiClassInfo, messageCollector) + ClassBuilderInterceptorExtension.registerExtension(builderExtension) + ClassFileFactoryFinalizerExtension.registerExtension(outputExtension) } override val supportsK2: Boolean diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiConfigurationKeys.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiConfigurationKeys.kt index 011522c765f..d915199da5d 100644 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiConfigurationKeys.kt +++ b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/JvmAbiConfigurationKeys.kt @@ -9,8 +9,5 @@ import org.jetbrains.kotlin.config.CompilerConfigurationKey object JvmAbiConfigurationKeys { val OUTPUT_PATH: CompilerConfigurationKey = - CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.OUTPUT_PATH_OPTION.description) - - val LEGACY_ABI_GEN: CompilerConfigurationKey = - CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.LEGACY_ABI_GEN_OPTION.description) -} \ No newline at end of file + CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.OUTPUT_PATH_OPTION.description) +} diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/AbiClassBuilder.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/AbiClassBuilder.kt deleted file mode 100644 index 92a62691875..00000000000 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/AbiClassBuilder.kt +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi.asm - -import com.intellij.psi.PsiElement -import org.jetbrains.kotlin.codegen.AbstractClassBuilder -import org.jetbrains.kotlin.descriptors.MemberDescriptor -import org.jetbrains.kotlin.descriptors.DescriptorVisibilities -import org.jetbrains.kotlin.resolve.inline.InlineUtil.isInlineOrContainingInline -import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin -import org.jetbrains.org.objectweb.asm.ClassVisitor -import org.jetbrains.org.objectweb.asm.FieldVisitor -import org.jetbrains.org.objectweb.asm.MethodVisitor -import org.jetbrains.org.objectweb.asm.Opcodes - -internal class AbiClassBuilder(private val cv: ClassVisitor) : AbstractClassBuilder() { - override fun getVisitor(): ClassVisitor = cv - - override fun newMethod( - origin: JvmDeclarationOrigin, - access: Int, - name: String, - desc: String, - signature: String?, - exceptions: Array? - ): MethodVisitor { - // if both descriptor's and access's visibilities are private, we can generate an empty method - // 1. we need to check a descriptor, because inline reified functions - // might have a non-private visibility in ABI, but they are private in bytecode - // 2. we need to check an access, because synthetic methods - // for default parameters have private visibility, but public in bytecode - val descriptor = origin.descriptor as? MemberDescriptor - if (isPrivate(access) && descriptor != null && isPrivate(descriptor) || isClinit(name, access)) return EMPTY_METHOD_VISITOR - - val mv = super.newMethod(origin, access, name, desc, signature, exceptions) - // inline function bodies are part of ABI, - // but non-inline functions can be thrown out - if (isInlineOrContainingInline(descriptor)) return mv - - return ReplaceWithEmptyMethodVisitor( - delegate = mv, - access = access, - name = name, - desc = desc, - signature = signature, - exceptions = exceptions - ) - } - - override fun newField( - origin: JvmDeclarationOrigin, - access: Int, - name: String, - desc: String, - signature: String?, - value: Any? - ): FieldVisitor { - if (isPrivate(access) && !isInlineOrContainingInline(origin.descriptor)) return EMPTY_FIELD_VISITOR - - return super.newField(origin, access, name, desc, signature, value) - } - - override fun defineClass( - origin: PsiElement?, - version: Int, - access: Int, - name: String, - signature: String?, - superName: String, - interfaces: Array - ) { - if (isPrivate(access)) return - - super.defineClass(origin, version, access, name, signature, superName, interfaces) - } - - private fun isPrivate(descriptor: MemberDescriptor): Boolean = - descriptor.visibility == DescriptorVisibilities.PRIVATE - - private fun isPrivate(access: Int): Boolean = - (access and Opcodes.ACC_PRIVATE) == Opcodes.ACC_PRIVATE - - private fun isClinit(name: String, access: Int): Boolean = - name == "" && (access and Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC -} diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/FilterInnerClassesVisitor.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/FilterInnerClassesVisitor.kt deleted file mode 100644 index 398d7e31e78..00000000000 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/FilterInnerClassesVisitor.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi.asm - -import org.jetbrains.org.objectweb.asm.ClassVisitor - -internal class FilterInnerClassesVisitor( - private val innerClassesToFilter: Set, - api: Int, - cv: ClassVisitor -) : ClassVisitor(api, cv) { - override fun visitInnerClass(name: String, outerName: String?, innerName: String?, access: Int) { - if (name in innerClassesToFilter) return - - super.visitInnerClass(name, outerName, innerName, access) - } -} \ No newline at end of file diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/InnerClassesCollectingVisitor.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/InnerClassesCollectingVisitor.kt deleted file mode 100644 index 6093850cae7..00000000000 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/InnerClassesCollectingVisitor.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.jetbrains.kotlin.jvm.abi.asm - -import org.jetbrains.org.objectweb.asm.ClassVisitor -import org.jetbrains.org.objectweb.asm.Opcodes - -internal class InnerClassesCollectingVisitor : ClassVisitor(Opcodes.API_VERSION) { - lateinit var ownInternalName: String - private set - - private val myInnerClasses = arrayListOf() - val innerClasses: List - get() = myInnerClasses - - override fun visit( - version: Int, - access: Int, - name: String, - signature: String?, - superName: String?, - interfaces: Array? - ) { - super.visit(version, access, name, signature, superName, interfaces) - ownInternalName = name - } - - override fun visitInnerClass(name: String, outerName: String?, innerName: String?, access: Int) { - super.visitInnerClass(name, outerName, innerName, access) - myInnerClasses.add(name) - } -} diff --git a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/ReplaceWithEmptyMethodVisitor.kt b/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/ReplaceWithEmptyMethodVisitor.kt deleted file mode 100644 index 8ec4ee22ed3..00000000000 --- a/plugins/jvm-abi-gen/src/org/jetbrains/kotlin/jvm/abi/asm/ReplaceWithEmptyMethodVisitor.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi.asm - -import org.jetbrains.kotlin.codegen.TransformationMethodVisitor -import org.jetbrains.org.objectweb.asm.* -import org.jetbrains.org.objectweb.asm.tree.MethodNode - -internal class ReplaceWithEmptyMethodVisitor( - delegate: MethodVisitor, - access: Int, - name: String, - desc: String, - signature: String?, - exceptions: Array? -) : TransformationMethodVisitor(delegate, access, name, desc, signature, exceptions, api = Opcodes.API_VERSION) { - override fun performTransformations(methodNode: MethodNode) { - methodNode.instructions.clear() - methodNode.localVariables.clear() - methodNode.tryCatchBlocks.clear() - } -} \ No newline at end of file diff --git a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyCompareJvmAbiTest.kt b/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyCompareJvmAbiTest.kt deleted file mode 100644 index 47cc4121644..00000000000 --- a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyCompareJvmAbiTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi - -abstract class AbstractLegacyCompareJvmAbiTest : AbstractCompareJvmAbiTest() { - override val useLegacyAbiGen: Boolean - get() = true -} \ No newline at end of file diff --git a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyCompileAgainstJvmAbiTest.kt b/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyCompileAgainstJvmAbiTest.kt deleted file mode 100644 index 6a6a7e10887..00000000000 --- a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyCompileAgainstJvmAbiTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi - -abstract class AbstractLegacyCompileAgainstJvmAbiTest : AbstractCompileAgainstJvmAbiTest() { - override val useLegacyAbiGen: Boolean - get() = true -} \ No newline at end of file diff --git a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyJvmAbiContentTest.kt b/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyJvmAbiContentTest.kt deleted file mode 100644 index 9d591d6b865..00000000000 --- a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/AbstractLegacyJvmAbiContentTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi - -abstract class AbstractLegacyJvmAbiContentTest : AbstractJvmAbiContentTest() { - override val useLegacyAbiGen: Boolean - get() = true -} \ No newline at end of file diff --git a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyCompareJvmAbiTestGenerated.java b/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyCompareJvmAbiTestGenerated.java deleted file mode 100644 index 58252d5ce49..00000000000 --- a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyCompareJvmAbiTestGenerated.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/jvm-abi-gen/testData/compare") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class LegacyCompareJvmAbiTestGenerated extends AbstractLegacyCompareJvmAbiTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_LEGACY: "); - } - - public void testAllFilesPresentInCompare() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/jvm-abi-gen/testData/compare"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, false); - } - - @TestMetadata("anonymousObjects") - public void testAnonymousObjects() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/anonymousObjects/"); - } - - @TestMetadata("classFlags") - public void testClassFlags() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/classFlags/"); - } - - @TestMetadata("classPrivateMemebers") - public void testClassPrivateMemebers() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/classPrivateMemebers/"); - } - - @TestMetadata("clinit") - public void testClinit() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/clinit/"); - } - - @TestMetadata("constant") - public void testConstant() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/constant/"); - } - - @TestMetadata("declarationOrderInline") - public void testDeclarationOrderInline() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInline/"); - } - - @TestMetadata("declarationOrderInlineCall") - public void testDeclarationOrderInlineCall() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/"); - } - - @TestMetadata("declarationOrderPrivateInline") - public void testDeclarationOrderPrivateInline() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/"); - } - - @TestMetadata("functionBody") - public void testFunctionBody() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/functionBody/"); - } - - @TestMetadata("inlineFunInPrivateClass") - public void testInlineFunInPrivateClass() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateClass/"); - } - - @TestMetadata("inlineFunInPrivateNestedClass") - public void testInlineFunInPrivateNestedClass() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateNestedClass/"); - } - - @TestMetadata("inlineFunctionBody") - public void testInlineFunctionBody() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/inlineFunctionBody/"); - } - - @TestMetadata("lambdas") - public void testLambdas() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/lambdas/"); - } - - @TestMetadata("parameterName") - public void testParameterName() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/parameterName/"); - } - - @TestMetadata("privateTypealias") - public void testPrivateTypealias() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/privateTypealias/"); - } - - @TestMetadata("returnType") - public void testReturnType() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/returnType/"); - } - - @TestMetadata("superClass") - public void testSuperClass() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/superClass/"); - } - - @TestMetadata("syntheticAccessors") - public void testSyntheticAccessors() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/syntheticAccessors/"); - } - - @TestMetadata("topLevelPrivateMembers") - public void testTopLevelPrivateMembers() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compare/topLevelPrivateMembers/"); - } -} diff --git a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyCompileAgainstJvmAbiTestGenerated.java b/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyCompileAgainstJvmAbiTestGenerated.java deleted file mode 100644 index 05e90988cba..00000000000 --- a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyCompileAgainstJvmAbiTestGenerated.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/jvm-abi-gen/testData/compile") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class LegacyCompileAgainstJvmAbiTestGenerated extends AbstractLegacyCompileAgainstJvmAbiTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_LEGACY: "); - } - - public void testAllFilesPresentInCompile() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/jvm-abi-gen/testData/compile"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, false); - } - - @TestMetadata("anonymousObject") - public void testAnonymousObject() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/anonymousObject/"); - } - - @TestMetadata("classes") - public void testClasses() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/classes/"); - } - - @TestMetadata("clinit") - public void testClinit() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/clinit/"); - } - - @TestMetadata("inlineAnnotationInstantiation") - public void testInlineAnnotationInstantiation() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineAnnotationInstantiation/"); - } - - @TestMetadata("inlineAnonymousObject") - public void testInlineAnonymousObject() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineAnonymousObject/"); - } - - @TestMetadata("inlineCapture") - public void testInlineCapture() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineCapture/"); - } - - @TestMetadata("inlineClassWithPrivateConstructor") - public void testInlineClassWithPrivateConstructor() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineClassWithPrivateConstructor/"); - } - - @TestMetadata("inlineClassWithPrivateConstructorK2") - public void testInlineClassWithPrivateConstructorK2() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineClassWithPrivateConstructorK2/"); - } - - @TestMetadata("inlineNoRegeneration") - public void testInlineNoRegeneration() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineNoRegeneration/"); - } - - @TestMetadata("inlineReifiedFunction") - public void testInlineReifiedFunction() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineReifiedFunction/"); - } - - @TestMetadata("inlineWhenMappings") - public void testInlineWhenMappings() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/inlineWhenMappings/"); - } - - @TestMetadata("innerObjectRegeneration") - public void testInnerObjectRegeneration() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/"); - } - - @TestMetadata("kt-40133") - public void testKt_40133() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/kt-40133/"); - } - - @TestMetadata("kt-40340") - public void testKt_40340() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/kt-40340/"); - } - - @TestMetadata("privateAnnotationsFromJavaApp") - public void testPrivateAnnotationsFromJavaApp() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/privateAnnotationsFromJavaApp/"); - } - - @TestMetadata("privateAnnotationsFromJavaLib") - public void testPrivateAnnotationsFromJavaLib() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/privateAnnotationsFromJavaLib/"); - } - - @TestMetadata("privateClassesFromJavaApp") - public void testPrivateClassesFromJavaApp() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/privateClassesFromJavaApp/"); - } - - @TestMetadata("privateClassesFromJavaLib") - public void testPrivateClassesFromJavaLib() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/privateClassesFromJavaLib/"); - } - - @TestMetadata("privateOnlyConstructors") - public void testPrivateOnlyConstructors() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/privateOnlyConstructors/"); - } - - @TestMetadata("privateValueClassConstructor") - public void testPrivateValueClassConstructor() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/privateValueClassConstructor/"); - } - - @TestMetadata("topLevel") - public void testTopLevel() throws Exception { - runTest("plugins/jvm-abi-gen/testData/compile/topLevel/"); - } -} diff --git a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyJvmAbiContentTestGenerated.java b/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyJvmAbiContentTestGenerated.java deleted file mode 100644 index 0f7e3974d70..00000000000 --- a/plugins/jvm-abi-gen/test/org/jetbrains/kotlin/jvm/abi/LegacyJvmAbiContentTestGenerated.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.jvm.abi; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("plugins/jvm-abi-gen/testData/content") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class LegacyJvmAbiContentTestGenerated extends AbstractLegacyJvmAbiContentTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_LEGACY: "); - } - - public void testAllFilesPresentInContent() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/jvm-abi-gen/testData/content"), Pattern.compile("^([^\\.]+)$"), null, TargetBackend.JVM_IR, false); - } - - @TestMetadata("annotation") - public void testAnnotation() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/annotation/"); - } - - @TestMetadata("annotationInstantiation") - public void testAnnotationInstantiation() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/annotationInstantiation/"); - } - - @TestMetadata("anonymousAnnotationInstantiation") - public void testAnonymousAnnotationInstantiation() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/anonymousAnnotationInstantiation/"); - } - - @TestMetadata("anonymousWhenMapping") - public void testAnonymousWhenMapping() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/anonymousWhenMapping/"); - } - - @TestMetadata("class") - public void testClass() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/class/"); - } - - @TestMetadata("innerClasses") - public void testInnerClasses() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/innerClasses/"); - } - - @TestMetadata("kt50005") - public void testKt50005() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/kt50005/"); - } - - @TestMetadata("whenMapping") - public void testWhenMapping() throws Exception { - runTest("plugins/jvm-abi-gen/testData/content/whenMapping/"); - } -} diff --git a/plugins/jvm-abi-gen/testData/compare/anonymousObjects/directives.txt b/plugins/jvm-abi-gen/testData/compare/anonymousObjects/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compare/anonymousObjects/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/directives.txt b/plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/directives.txt index ce9e2b7603a..5099b2ad971 100644 --- a/plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/directives.txt +++ b/plugins/jvm-abi-gen/testData/compare/declarationOrderInlineCall/directives.txt @@ -1,2 +1 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR // IGNORE_BACKEND: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/directives.txt b/plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/directives.txt index b0d6c0cb1c6..10fe2bab537 100644 --- a/plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/directives.txt +++ b/plugins/jvm-abi-gen/testData/compare/declarationOrderPrivateInline/directives.txt @@ -1,2 +1 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR // NO_SOURCE_DEBUG_EXTENSION diff --git a/plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateClass/directives.txt b/plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateClass/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateClass/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateNestedClass/directives.txt b/plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateNestedClass/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compare/inlineFunInPrivateNestedClass/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compare/lambdas/directives.txt b/plugins/jvm-abi-gen/testData/compare/lambdas/directives.txt index b0d6c0cb1c6..10fe2bab537 100644 --- a/plugins/jvm-abi-gen/testData/compare/lambdas/directives.txt +++ b/plugins/jvm-abi-gen/testData/compare/lambdas/directives.txt @@ -1,2 +1 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR // NO_SOURCE_DEBUG_EXTENSION diff --git a/plugins/jvm-abi-gen/testData/compile/inlineAnnotationInstantiation/directives.txt b/plugins/jvm-abi-gen/testData/compile/inlineAnnotationInstantiation/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compile/inlineAnnotationInstantiation/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compile/inlineClassWithPrivateConstructorK2/directives.txt b/plugins/jvm-abi-gen/testData/compile/inlineClassWithPrivateConstructorK2/directives.txt index 50ffd8d8730..27256696af8 100644 --- a/plugins/jvm-abi-gen/testData/compile/inlineClassWithPrivateConstructorK2/directives.txt +++ b/plugins/jvm-abi-gen/testData/compile/inlineClassWithPrivateConstructorK2/directives.txt @@ -1,2 +1 @@ // USE_K2 -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compile/inlineWhenMappings/directives.txt b/plugins/jvm-abi-gen/testData/compile/inlineWhenMappings/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compile/inlineWhenMappings/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/directives.txt b/plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compile/innerObjectRegeneration/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compile/kt-40133/directives.txt b/plugins/jvm-abi-gen/testData/compile/kt-40133/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compile/kt-40133/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/compile/kt-40340/directives.txt b/plugins/jvm-abi-gen/testData/compile/kt-40340/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/compile/kt-40340/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/annotationInstantiation/directives.txt b/plugins/jvm-abi-gen/testData/content/annotationInstantiation/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/annotationInstantiation/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/anonymousAnnotationInstantiation/directives.txt b/plugins/jvm-abi-gen/testData/content/anonymousAnnotationInstantiation/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/anonymousAnnotationInstantiation/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/anonymousWhenMapping/directives.txt b/plugins/jvm-abi-gen/testData/content/anonymousWhenMapping/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/anonymousWhenMapping/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/class/directives.txt b/plugins/jvm-abi-gen/testData/content/class/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/class/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/innerClasses/directives.txt b/plugins/jvm-abi-gen/testData/content/innerClasses/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/innerClasses/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/kt50005/directives.txt b/plugins/jvm-abi-gen/testData/content/kt50005/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/kt50005/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR diff --git a/plugins/jvm-abi-gen/testData/content/whenMapping/directives.txt b/plugins/jvm-abi-gen/testData/content/whenMapping/directives.txt deleted file mode 100644 index 13ed9e2bf23..00000000000 --- a/plugins/jvm-abi-gen/testData/content/whenMapping/directives.txt +++ /dev/null @@ -1 +0,0 @@ -// IGNORE_BACKEND_LEGACY: JVM_IR