Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
91b36cb
[K1 Tests] Cleanup directives in codegen tests. Part 1/4
demiurg906 Apr 8, 2026
f6e02b8
[K1 Tests] Cleanup directives in codegen tests. Part 2/4
demiurg906 Apr 8, 2026
35ea719
[K1 Tests] Cleanup directives in codegen tests. Part 3/4
demiurg906 Apr 8, 2026
d4bda85
[K1 Tests] Cleanup directives in codegen tests. Part 4/4
demiurg906 Apr 8, 2026
c91b007
[K1 Tests] Delete K1 IR dumps. Part 1/4
demiurg906 Apr 8, 2026
98c5180
[K1 Tests] Delete K1 IR dumps. Part 2/4
demiurg906 Apr 8, 2026
1d73be0
[K1 Tests] Delete K1 IR dumps. Part 3/4
demiurg906 Apr 8, 2026
d93a7d8
[K1 Tests] Delete K1 IR dumps. Part 4/4
demiurg906 Apr 8, 2026
78a9138
[K1 Tests] Delete K1 source ranges dumps. Part 1/4
demiurg906 Apr 8, 2026
db1f7e9
[K1 Tests] Delete K1 source ranges dumps. Part 2/4
demiurg906 Apr 8, 2026
83aa1ff
[K1 Tests] Delete K1 source ranges dumps. Part 3/4
demiurg906 Apr 8, 2026
2241770
[K1 Tests] Delete K1 source ranges dumps. Part 4/4
demiurg906 Apr 8, 2026
6c91d57
[K1 Tests] Change target extension file of IrDiagnosticsHandler ...
demiurg906 Apr 8, 2026
107eeac
[K1 Tests] Remove K1-specific processing from `IrMangledNameAndSignat…
demiurg906 Apr 8, 2026
0605db8
[K1 Tests] Adjust full diagnostic text processing. Part 1/3
demiurg906 Apr 8, 2026
bd6fd2a
[K1 Tests] Adjust full diagnostic text processing. Part 2/3
demiurg906 Apr 8, 2026
d6a267d
[K1 Tests] Adjust full diagnostic text processing. Part 3/3
demiurg906 Apr 8, 2026
4b781f1
[K1 Tests] Delete K1 ASM dumps. Part 1/4
demiurg906 Apr 8, 2026
218d8ee
[K1 Tests] Delete K1 ASM dumps. Part 2/4
demiurg906 Apr 8, 2026
3c2b170
[K1 Tests] Delete K1 ASM dumps. Part 3/4
demiurg906 Apr 8, 2026
6f26659
[K1 Tests] Delete K1 ASM dumps. Part 4/4
demiurg906 Apr 8, 2026
111e145
[K1 Tests] Delete K1 CLI-like diagnostics output. Part 1/3
demiurg906 Apr 8, 2026
a8083d3
[K1 Tests] Delete K1 CLI-like diagnostics output. Part 2/3
demiurg906 Apr 8, 2026
8bc5bf0
[K1 Tests] Delete K1 CLI-like diagnostics output. Part 3/3
demiurg906 Apr 8, 2026
e361ed1
[K1 Tests] Simplify implementation of `AbstractFirIdenticalChecker`
demiurg906 Apr 8, 2026
83a1e69
[K1 Tests] Delete descriptor dumps with new inference enabled
demiurg906 Apr 8, 2026
2619e96
[K1 Tests] Update testdata after previous commits
demiurg906 Apr 8, 2026
a319a95
[K1 Tests] Delete K1 bytecode listing dumps. Part 1/3
demiurg906 Apr 8, 2026
dca0d93
[K1 Tests] Delete K1 bytecode listing dumps. Part 2/3
demiurg906 Apr 8, 2026
d1b8dd0
[K1 Tests] Delete K1 bytecode listing dumps. Part 3/3
demiurg906 Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

package org.jetbrains.kotlin.analysis.low.level.api.fir.compiler.based

import org.jetbrains.kotlin.test.frontend.fir.handlers.AbstractFirIdenticalChecker
import org.jetbrains.kotlin.test.frontend.fir.handlers.AbstractAlternativeKtFileIdenticalChecker
import org.jetbrains.kotlin.test.services.TestServices
import org.jetbrains.kotlin.test.services.assertions
import org.jetbrains.kotlin.test.utils.isLLFirTestData
import org.jetbrains.kotlin.test.utils.originalTestDataFile
import java.io.File

/**
Expand All @@ -18,19 +19,17 @@ import java.io.File
* As the `LL_FIR_DIVERGENCE` directive only exists in `.ll.kt` files, [LLFirIdenticalChecker] ignores this directive when comparing the
* LL FIR file's content to the base file's content.
*/
class LLFirIdenticalChecker(testServices: TestServices) : AbstractFirIdenticalChecker(testServices) {
class LLFirIdenticalChecker(testServices: TestServices) : AbstractAlternativeKtFileIdenticalChecker(testServices) {
override fun checkTestDataFile(testDataFile: File) {
if (!testDataFile.isLLFirTestData) return

val helper = Helper()
val originalFile = helper.getClassicFileToCompare(testDataFile)
val baseFile = helper.getFirFileToCompare(originalFile).takeIf { it.exists() } ?: originalFile
val baseFile = testDataFile.originalTestDataFile

// `readContentIgnoringLlFirDivergenceDirective` trims whitespace after the `LL_FIR_DIVERGENCE` directive to allow blank lines
// after the directive. Hence, the base content's starting whitespace needs to be trimmed as well, otherwise file contents might
// differ in their starting whitespace.
val baseContent = helper.readContent(baseFile, trimLines = true).trimStart()
val llContent = helper.readContent(testDataFile, trimLines = false).removeLlFirDivergenceDirective(trimLines = true)
val baseContent = readContent(baseFile, trimLines = true).trimStart()
val llContent = readContent(testDataFile, trimLines = false).removeLlFirDivergenceDirective(trimLines = true)
if (baseContent == llContent) {
testServices.assertions.fail {
"`${testDataFile.name}` and `${baseFile.name}` are identical. Remove `$testDataFile`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.compiler.based.AbstractLL
import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based.facades.LLFirAnalyzerFacadeFactoryWithPreresolveInReversedOrder
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
import org.jetbrains.kotlin.test.configuration.baseFirDiagnosticTestConfiguration
import org.jetbrains.kotlin.test.frontend.fir.handlers.AbstractFirIdenticalChecker
import org.jetbrains.kotlin.test.frontend.fir.handlers.AbstractAlternativeKtFileIdenticalChecker
import org.jetbrains.kotlin.test.services.MetaTestConfigurator
import org.jetbrains.kotlin.test.services.TestServices
import org.jetbrains.kotlin.test.services.assertions
import org.jetbrains.kotlin.test.utils.firTestDataFile
import org.jetbrains.kotlin.test.utils.llFirTestDataFile
import org.jetbrains.kotlin.test.utils.originalTestDataFile
import org.jetbrains.kotlin.utils.bind
import java.io.File

Expand Down Expand Up @@ -52,17 +53,16 @@ fun reversedDiagnosticsConfigurator(testServices: TestServices): MetaTestConfigu
return CustomOutputDiagnosticsConfigurator(".reversed.", testServices)
}

class ReversedFirIdenticalChecker(testServices: TestServices) : AbstractFirIdenticalChecker(testServices) {
class ReversedFirIdenticalChecker(testServices: TestServices) : AbstractAlternativeKtFileIdenticalChecker(testServices) {
override fun checkTestDataFile(testDataFile: File) {
if (".reversed." !in testDataFile.path) return
val helper = Helper()
val originalFile = helper.getClassicFileToCompare(testDataFile).path.replace(".reversed", "").let(::File)
val originalFile = testDataFile.originalTestDataFile.path.replace(".reversed", "").let(::File)
val baseFile = originalFile.llFirTestDataFile.takeIf(File::exists)
?: originalFile.firTestDataFile.takeIf(File::exists)
?: originalFile

val baseContent = helper.readContent(baseFile, trimLines = false)
val reversedFirContent = helper.readContent(testDataFile, trimLines = false)
val baseContent = readContent(baseFile, trimLines = false)
val reversedFirContent = readContent(testDataFile, trimLines = false)
if (baseContent == reversedFirContent) {
testServices.assertions.fail {
"`${testDataFile.name}` and `${baseFile.name}` are identical. Remove `$testDataFile`."
Expand Down

This file was deleted.

22 changes: 4 additions & 18 deletions compiler/testData/codegen/asmLike/typeAnnotations/implicit.asm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,6 @@ final class foo/Kotlin$foo5$lambda$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/fu
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible
}

Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;
final class foo/Kotlin$foo6$indyLambda$1 : kotlin/jvm/internal/Lambda, kotlin/jvm/functions/Function0 {
@Lfoo/TypeAnn;([name="2"]) : CLASS_EXTENDS 0, 0;
@Lfoo/TypeAnnBinary;([]) : CLASS_EXTENDS 0, 0; // invisible

final foo.Kotlin this$0

void <init>(foo.Kotlin $receiver)

public final java.lang.String invoke()
@Lfoo/TypeAnn;([name="2"]) : METHOD_RETURN, null
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible

public java.lang.Object invoke()
@Lfoo/TypeAnn;([name="2"]) : METHOD_RETURN, null
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible
}

public final class foo/Kotlin : java/lang/Object {
public void <init>()

Expand All @@ -55,6 +37,10 @@ public final class foo/Kotlin : java/lang/Object {
public final void foo5()

public final void foo6()

private final static java.lang.String foo6$lambda$0(foo.Kotlin this$0)
@Lfoo/TypeAnn;([name="2"]) : METHOD_RETURN, null
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible
}

public abstract interface foo/TypeAnn : java/lang/Object, java/lang/annotation/Annotation {
Expand Down
3 changes: 0 additions & 3 deletions compiler/testData/codegen/asmLike/typeAnnotations/implicit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// WITH_STDLIB
// LANGUAGE: +JvmEnhancedBridges

// FIR_DIFFERENCE
// With FIR, the backend generates lambdas via invokedynamic by default.

package foo

@Target(AnnotationTarget.TYPE)
Expand Down
141 changes: 0 additions & 141 deletions compiler/testData/codegen/asmLike/typeAnnotations/property.asm.fir.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public final class foo/Kotlin : java/lang/Object {
public final static void access$setJvmStatic$cp(java.lang.String <set-?>)

public final int getAnnotatedGetter()
@Lfoo/TypeAnn;([name="1"]) : METHOD_RETURN, null
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible

public final java.lang.String getCustomSetter()
@Lorg/jetbrains/annotations/NotNull;([]) // invisible
Expand All @@ -98,6 +96,8 @@ public final class foo/Kotlin : java/lang/Object {
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible

public final int getUnannotatedGetter()
@Lfoo/TypeAnn;([name="1"]) : METHOD_RETURN, null
@Lfoo/TypeAnnBinary;([]) : METHOD_RETURN, null // invisible

public final java.lang.String getValProp()
@Lorg/jetbrains/annotations/NotNull;([]) // invisible
Expand Down
3 changes: 0 additions & 3 deletions compiler/testData/codegen/asmLike/typeAnnotations/property.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// RENDER_ANNOTATIONS
// WITH_STDLIB

// FIR_DIFFERENCE
// ^ KT-67510 K2: difference in generation of JVM type annotations on property getter's type

package foo

@Target(AnnotationTarget.TYPE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// LANGUAGE: +UnnamedLocalVariables
// RETURN_VALUE_CHECKER_MODE: FULL
// IGNORE_BACKEND_K1: ANY
// IGNORE_BACKEND: ANDROID
// WITH_STDLIB

@file:MustUseReturnValues
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// DUMP_IR
// WITH_STDLIB
// ISSUE: KT-62598
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_K1: ANY
// IGNORE_BACKEND: ANDROID

annotation class A(val i: Int)
annotation class B(val i: Int)
Expand All @@ -8,4 +8,4 @@ fun box(): String {
val b = B(1)
if (a == b) return "Fail"
return "OK"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_K1: ANY
// IGNORE_BACKEND: ANDROID
// ISSUE: KT-54931

class Container {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// WITH_STDLIB
// IGNORE_BACKEND_K1: ANY
// IGNORE_BACKEND: ANDROID

annotation class A1
annotation class A2
Expand Down Expand Up @@ -54,4 +54,4 @@ fun box(): String {
}

return "OK"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_K2: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM_JS, WASM_WASI
// IGNORE_BACKEND: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM_JS, WASM_WASI
// IGNORE_IR_DESERIALIZATION_TEST: NATIVE
// FIR status: expect/actual in the same module (ACTUAL_WITHOUT_EXPECT)

Expand Down
Loading