diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt index 21cc1e70c4d..a009fae36d1 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt @@ -6,7 +6,6 @@ package org.jetbrains.kotlin.codegen.inline import gnu.trove.TIntIntHashMap -import org.jetbrains.kotlin.codegen.ClassBuilder import org.jetbrains.kotlin.codegen.SourceInfo import org.jetbrains.kotlin.codegen.inline.SMAP.Companion.END import org.jetbrains.kotlin.codegen.inline.SMAP.Companion.FILE_SECTION @@ -169,35 +168,25 @@ object IdenticalSourceMapper : SourceMapper { } } -class CallSiteMarker(val lineNumber: Int) +data class CallSiteMarker(val lineNumber: Int) open class DefaultSourceMapper(val sourceInfo: SourceInfo) : SourceMapper { private var maxUsedValue: Int = sourceInfo.linesInFile - private var lastMappedWithChanges: RawFileMapping? = null - private var fileMappings: LinkedHashMap = linkedMapOf() - - protected val origin: RawFileMapping + private var fileMappings: LinkedHashMap, RawFileMapping> = linkedMapOf() var callSiteMarker: CallSiteMarker? = null - set(value) { - lastMappedWithChanges = null - field = value - } override val resultMappings: List get() = fileMappings.values.map { it.toFileMapping() } init { - val name = sourceInfo.source - val path = sourceInfo.pathOrCleanFQN - origin = RawFileMapping(name, path) - origin.initRange(1, sourceInfo.linesInFile) - fileMappings.put(createKey(name, path), origin) + // Explicitly map the file to itself. + getOrRegisterNewSource(sourceInfo.source, sourceInfo.pathOrCleanFQN).mapNewInterval(1, 1, sourceInfo.linesInFile) } constructor(sourceInfo: SourceInfo, fileMappings: List) : this(sourceInfo) { + // The first mapping is already created in the `init` block above. fileMappings.asSequence().drop(1) - //default one mapped through sourceInfo .forEach { fileMapping -> val newFileMapping = getOrRegisterNewSource(fileMapping.name, fileMapping.path) fileMapping.lineMappings.forEach { @@ -207,10 +196,8 @@ open class DefaultSourceMapper(val sourceInfo: SourceInfo) : SourceMapper { } } - private fun createKey(name: String, path: String) = "$name#$path" - private fun getOrRegisterNewSource(name: String, path: String): RawFileMapping { - return fileMappings.getOrPut(createKey(name, path)) { RawFileMapping(name, path) } + return fileMappings.getOrPut(name to path) { RawFileMapping(name, path) } } override fun mapLineNumber(lineNumber: Int): Int { @@ -227,15 +214,9 @@ open class DefaultSourceMapper(val sourceInfo: SourceInfo) : SourceMapper { //no source information, so just skip this linenumber return -1 } - return createMapping(getOrRegisterNewSource(sourceName, sourcePath), source) - } - - private fun createMapping(fileMapping: RawFileMapping, lineNumber: Int): Int { - val mappedLineIndex = fileMapping.mapNewLineNumber(lineNumber, maxUsedValue, lastMappedWithChanges == fileMapping, callSiteMarker) - if (mappedLineIndex > maxUsedValue) { - lastMappedWithChanges = fileMapping - maxUsedValue = mappedLineIndex - } + val fileMapping = getOrRegisterNewSource(sourceName, sourcePath) + val mappedLineIndex = fileMapping.mapNewLineNumber(source, maxUsedValue, callSiteMarker) + maxUsedValue = max(maxUsedValue, mappedLineIndex) return mappedLineIndex } } @@ -270,8 +251,6 @@ data class SMAPAndMethodNode(val node: MethodNode, val classSMAP: SMAP) class RawFileMapping(val name: String, val path: String) { private val rangeMappings = arrayListOf() - private var lastMappedWithNewIndex = -1000 - fun toFileMapping() = FileMapping(name, path).apply { for (range in rangeMappings) { @@ -279,39 +258,21 @@ class RawFileMapping(val name: String, val path: String) { } } - fun initRange(start: Int, end: Int) { - assert(rangeMappings.isEmpty()) { "initRange should only be called for empty mapping" } - rangeMappings.add(RangeMapping(start, start, end - start + 1)) - lastMappedWithNewIndex = end - } - - fun mapNewLineNumber(source: Int, currentIndex: Int, isLastMapped: Boolean, callSiteMarker: CallSiteMarker?): Int { - val dest: Int - val rangeMapping: RangeMapping - if (rangeMappings.isNotEmpty() && isLastMapped && couldFoldInRange(lastMappedWithNewIndex, source)) { - rangeMapping = rangeMappings.last() - rangeMapping.range += source - lastMappedWithNewIndex - dest = rangeMapping.mapSourceToDest(source) + fun mapNewLineNumber(source: Int, currentIndex: Int, callSiteMarker: CallSiteMarker?): Int { + var mapping = rangeMappings.lastOrNull() + if (mapping != null && mapping.callSiteMarker == callSiteMarker && + (source - mapping.source) in 0 until mapping.range + (if (mapping.maxDest == currentIndex) 10 else 0) + ) { + // Save some space in the SMAP by reusing (or extending if it's the last one) the existing range. + mapping.range = max(mapping.range, source - mapping.source + 1) } else { - dest = currentIndex + 1 - rangeMapping = RangeMapping(source, dest, callSiteMarker = callSiteMarker) - rangeMappings.add(rangeMapping) + mapping = mapNewInterval(source, currentIndex + 1, 1, callSiteMarker) } - - lastMappedWithNewIndex = source - return dest + return mapping.mapSourceToDest(source) } - fun mapNewInterval(source: Int, dest: Int, range: Int) { - val rangeMapping = RangeMapping(source, dest, range) - rangeMappings.add(rangeMapping) - } - - private fun couldFoldInRange(first: Int, second: Int): Boolean { - //TODO - val delta = second - first - return delta > 0 && delta <= 10 - } + fun mapNewInterval(source: Int, dest: Int, range: Int, callSiteMarker: CallSiteMarker? = null): RangeMapping = + RangeMapping(source, dest, range, callSiteMarker).also { rangeMappings.add(it) } } open class FileMapping(val name: String, val path: String) { diff --git a/compiler/testData/codegen/boxInline/smap/assertion.kt b/compiler/testData/codegen/boxInline/smap/assertion.kt index 97e92472bf2..d5cf6efbaed 100644 --- a/compiler/testData/codegen/boxInline/smap/assertion.kt +++ b/compiler/testData/codegen/boxInline/smap/assertion.kt @@ -47,7 +47,6 @@ Kotlin test/_1Kt *L 1#1,26:1 -19#1,6:27 *E // FILE: 2.smap diff --git a/compiler/testData/codegen/boxInline/smap/defaultFunction.kt b/compiler/testData/codegen/boxInline/smap/defaultFunction.kt index 302547327c0..d6444c2590f 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultFunction.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultFunction.kt @@ -25,7 +25,6 @@ Kotlin test/_1Kt *L 1#1,9:1 -6#1:10 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt index 682d38d98ec..1635407260a 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt @@ -53,7 +53,6 @@ Kotlin test/_1Kt *L 1#1,39:1 -35#1,2:40 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt index b40ba70e1f5..6a84f7ff630 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt @@ -55,7 +55,6 @@ Kotlin test/_1Kt *L 1#1,39:1 -35#1,2:40 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt index b071ed1c008..667b40bb106 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt @@ -91,7 +91,6 @@ Kotlin test/_1Kt *L 1#1,75:1 -71#1,2:76 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt index 27763e7eb52..af4eda768f5 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt @@ -54,7 +54,6 @@ Kotlin test/_1Kt *L 1#1,40:1 -36#1,2:41 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt index 654ad4c3e50..3fd564d645d 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt @@ -56,7 +56,6 @@ Kotlin test/_1Kt *L 1#1,40:1 -36#1,2:41 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt index b102375487f..88fe3653bd3 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt @@ -54,7 +54,6 @@ Kotlin test/_1Kt *L 1#1,38:1 -34#1,2:39 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt index 2a55a9d6e3c..b15e5c97fbb 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt @@ -29,7 +29,6 @@ Kotlin test/_1Kt *L 1#1,13:1 -8#1:14 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt index b584d1ea356..c8376e8a64b 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt @@ -27,7 +27,6 @@ Kotlin test/_1Kt *L 1#1,11:1 -8#1:12 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt index 5bc2f0980b2..78709e798aa 100644 --- a/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt +++ b/compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt @@ -52,7 +52,6 @@ Kotlin test/_1Kt *L 1#1,38:1 -34#1,2:39 *E SMAP diff --git a/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt b/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt index c061ca1c431..e86b9d6aa02 100644 --- a/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt +++ b/compiler/testData/codegen/boxInline/smap/interleavedFiles.kt @@ -36,12 +36,10 @@ test/_1Kt 4#1:19 7#1:21 8#1:23 -4#1,6:24 -10#1:31 +4#1,7:24 4#2:18 4#2:20 4#2:22 -4#2:30 *E *S KotlinDebug *F @@ -51,10 +49,8 @@ _2Kt 8#1:19 13#1:21 13#1:23 -13#1,6:24 -13#1:31 +13#1,7:24 7#1:18 9#1:20 13#1:22 -13#1:30 *E diff --git a/compiler/testData/codegen/boxInline/smap/rangeFolding.kt b/compiler/testData/codegen/boxInline/smap/rangeFolding.kt new file mode 100644 index 00000000000..393f78582b6 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/rangeFolding.kt @@ -0,0 +1,76 @@ +// FILE: 1.kt +package test + +inline fun f() {} +inline fun g() {} +inline fun h() {} + +inline fun together() { + f() // new range 1.kt:N -> 1.kt:4 + h() // new range 1.kt:N+1 -> 1.kt:6 because of different call site + g() // new range 1.kt:N+2 -> 1.kt:5 for the same reason +} + +// FILE: 2.kt +import test.* + +fun box(): String { + // 1. new range 2.kt:N -> 1.kt:9 + // 2. new range 2.kt:N+1 -> 1.kt:4 + // 3. extend to 2.kt:N+1..N+7 -> 1.kt:4..10 and use N+7 for 1.kt:10 + // 4. use N+2 for 1.kt:5 + // 5. extend to 2.kt:N+1..N+8 -> 1.kt:4..11 and use N+8 for 1.kt:11 + // 6. use N+3 for 1.kt:6 + // 7. extend to 2.kt:N+1..N+9 -> 1.kt:4..12 and use N+9 for 1.kt:12 + // steps 4 and 6 *should not* create new ranges + together() + return "OK" +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/_1Kt +*L +1#1,14:1 +4#1:15 +6#1:16 +5#1:17 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/_1Kt +*L +9#1:15 +10#1:16 +11#1:17 +*E + +// FILE: 2.smap +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +_2Kt ++ 2 1.kt +test/_1Kt +*L +1#1,17:1 +9#2:18 +4#2,9:19 +*E +*S KotlinDebug +*F ++ 1 2.kt +_2Kt +*L +13#1:18 +13#1,9:19 +*E diff --git a/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt b/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt new file mode 100644 index 00000000000..506ce7b72f2 --- /dev/null +++ b/compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt @@ -0,0 +1,100 @@ +// FILE: 1.kt +package test + +object A { inline fun f() {} } +object B { inline fun g() {} } +object C { inline fun h() {} } + +object D { + inline fun together() { + A.f() + C.h() + B.g() + } +} + +// FILE: 2.kt +import test.* + +object X { + // Unlike `rangeFolding.kt`, the calls in `D.together` refer to different + // classes which are reflected in the SMAP, so they cannot be joined into + // a single range even in `X.foo`; neither can lines corresponding to + // `D.together` because they do not form an uninterrupted range. + fun foo() = D.together() +} + +fun box(): String { + X.foo() + return "OK" +} + +// FILE: 1.smap +SMAP +1.kt +Kotlin +*S Kotlin +*F ++ 1 1.kt +test/D ++ 2 1.kt +test/A ++ 3 1.kt +test/C ++ 4 1.kt +test/B +*L +1#1,16:1 +4#2:17 +6#3:18 +5#4:19 +*E +*S KotlinDebug +*F ++ 1 1.kt +test/D +*L +10#1:17 +11#1:18 +12#1:19 +*E + +// FILE: 2.smap +SMAP +2.kt +Kotlin +*S Kotlin +*F ++ 1 2.kt +X ++ 2 1.kt +test/D ++ 3 1.kt +test/A ++ 4 1.kt +test/C ++ 5 1.kt +test/B +*L +1#1,17:1 +10#2:18 +11#2:20 +12#2:22 +13#2:24 +4#3:19 +6#4:21 +5#5:23 +*E +*S KotlinDebug +*F ++ 1 2.kt +X +*L +9#1:18 +9#1:20 +9#1:22 +9#1:24 +9#1:19 +9#1:21 +9#1:23 +*E diff --git a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt index 53ec690a6a9..8d51446ddad 100644 --- a/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt +++ b/compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt @@ -33,14 +33,12 @@ _2Kt zzz/_1Kt *L 1#1,11:1 -7#2:12 -9#2:13 +7#2,3:12 *E *S KotlinDebug *F + 1 2.kt _2Kt *L -6#1:12 -6#1:13 +6#1,3:12 *E \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/smap/smap.kt b/compiler/testData/codegen/boxInline/smap/smap.kt index ff63faf17d6..198c92119ff 100644 --- a/compiler/testData/codegen/boxInline/smap/smap.kt +++ b/compiler/testData/codegen/boxInline/smap/smap.kt @@ -80,40 +80,36 @@ _2Kt builders/_1Kt *L 1#1,25:1 -7#1,3:40 -10#1:45 -11#1,2:49 -13#1:52 -15#1:54 +7#1,3:36 +10#1:41 +11#1,2:45 +13#1:48 +15#1:50 19#2:26 7#2,9:27 -11#2,3:36 -8#2:39 -19#2:43 -7#2:44 -15#2:46 -11#2,2:47 -13#2:51 -8#2:53 +19#2:39 +7#2:40 +15#2:42 +11#2,2:43 +13#2:47 +8#2:49 *E *S KotlinDebug *F + 1 2.kt _2Kt *L -20#1,3:40 -20#1:45 -20#1,2:49 -20#1:52 -20#1:54 +20#1,3:36 +20#1:41 +20#1,2:45 +20#1:48 +20#1:50 9#1:26 9#1,9:27 -9#1,3:36 -9#1:39 -20#1:43 -20#1:44 -20#1:46 -20#1,2:47 -20#1:51 -20#1:53 +20#1:39 +20#1:40 +20#1:42 +20#1,2:43 +20#1:47 +20#1:49 *E \ No newline at end of file diff --git a/compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt b/compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt index 429c2b0484b..7f235e73772 100644 --- a/compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt +++ b/compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt @@ -16,4 +16,4 @@ inline fun baz() { fun nop() {} -// 2 20 21 3 4 25 26 5 27 6 9 10 11 14 15 17 \ No newline at end of file +// 2 20 21 3 4 25 26 5 22 6 9 10 11 14 15 17 \ No newline at end of file diff --git a/compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt b/compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt index b0ecaf77bb8..f69932bd9aa 100644 --- a/compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt +++ b/compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt @@ -18,4 +18,4 @@ fun fail() : String { throw AssertionError("fail") } -// 2 22 3 2 23 5 6 24 5 25 7 10 14 18 \ No newline at end of file +// 2 22 3 2 22 5 6 23 5 24 7 10 14 18 \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index aa656bb067a..cbd81903c1e 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -3305,6 +3305,16 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @TestMetadata("rangeFolding.kt") + public void testRangeFolding() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); + } + + @TestMetadata("rangeFoldingInClass.kt") + public void testRangeFoldingInClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); + } + @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 0654a19a1cc..8358b51bb6c 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3305,6 +3305,16 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @TestMetadata("rangeFolding.kt") + public void testRangeFolding() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); + } + + @TestMetadata("rangeFoldingInClass.kt") + public void testRangeFoldingInClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); + } + @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 4e37267fa17..a46ed13fd92 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -3305,6 +3305,16 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @TestMetadata("rangeFolding.kt") + public void testRangeFolding() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); + } + + @TestMetadata("rangeFoldingInClass.kt") + public void testRangeFoldingInClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); + } + @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index b9d70f04179..c488da8861b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -3305,6 +3305,16 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @TestMetadata("rangeFolding.kt") + public void testRangeFolding() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); + } + + @TestMetadata("rangeFoldingInClass.kt") + public void testRangeFoldingInClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); + } + @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java index f1c2df3b849..9474dc474dd 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenInlineTestGenerated.java @@ -2920,6 +2920,16 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @TestMetadata("rangeFolding.kt") + public void testRangeFolding() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); + } + + @TestMetadata("rangeFoldingInClass.kt") + public void testRangeFoldingInClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); + } + @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java index 838caab5c14..4d43a6c0aa0 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenInlineTestGenerated.java @@ -2920,6 +2920,16 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest { runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } + @TestMetadata("rangeFolding.kt") + public void testRangeFolding() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFolding.kt"); + } + + @TestMetadata("rangeFoldingInClass.kt") + public void testRangeFoldingInClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/smap/rangeFoldingInClass.kt"); + } + @TestMetadata("smap.kt") public void testSmap() throws Exception { runTest("compiler/testData/codegen/boxInline/smap/smap.kt");