diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt index 467d0bc5a63..741ede02631 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt @@ -8,9 +8,15 @@ package org.jetbrains.kotlin.backend.wasm.ir2wasm import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrFileEntry import org.jetbrains.kotlin.ir.LineAndColumn +import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET +import org.jetbrains.kotlin.ir.util.SYNTHETIC_OFFSET import org.jetbrains.kotlin.wasm.ir.WasmExpressionBuilder import org.jetbrains.kotlin.wasm.ir.source.location.SourceLocation +private val IrElement.hasSyntheticOrUndefinedLocation: Boolean + get() = startOffset in SYNTHETIC_OFFSET..UNDEFINED_OFFSET || + endOffset in SYNTHETIC_OFFSET..UNDEFINED_OFFSET + enum class LocationType { START { override fun getLineAndColumnNumberFor(irElement: IrElement, fileEntry: IrFileEntry) = @@ -26,6 +32,7 @@ enum class LocationType { fun IrElement.getSourceLocation(fileEntry: IrFileEntry?, type: LocationType = LocationType.START): SourceLocation { if (fileEntry == null) return SourceLocation.NoLocation("fileEntry is null") + if (hasSyntheticOrUndefinedLocation) return SourceLocation.NoLocation("Synthetic declaration") val path = fileEntry.name val (line, column) = type.getLineAndColumnNumberFor(this, fileEntry) diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt index 11bd0104096..8280dba0679 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/BodyGenerator.kt @@ -208,7 +208,7 @@ internal class BodyGenerator( } fun generatePrimaryConstructorBody(ktClassOrObject: KtPureClassOrObject, irConstructor: IrConstructor): IrBody { - val irBlockBody = context.irFactory.createBlockBody(ktClassOrObject.pureStartOffset, ktClassOrObject.pureEndOffset) + val irBlockBody = context.irFactory.createBlockBody(irConstructor.startOffset, irConstructor.endOffset) generateSuperConstructorCall(irBlockBody, ktClassOrObject) diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt index a400d74f3e2..93b4f4ddfac 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/FunctionGenerator.kt @@ -244,7 +244,6 @@ internal class FunctionGenerator(declarationGenerator: DeclarationGenerator) : D ktClassOrObject: KtPureClassOrObject ): IrConstructor = declareConstructor( - ktClassOrObject, ktClassOrObject.primaryConstructor ?: ktClassOrObject, ktClassOrObject.contextReceivers.mapNotNull { it.typeReference() }, primaryConstructorDescriptor @@ -262,7 +261,6 @@ internal class FunctionGenerator(declarationGenerator: DeclarationGenerator) : D fun generateSecondaryConstructor(ktConstructor: KtSecondaryConstructor, ktClassOrObject: KtPureClassOrObject): IrConstructor { val constructorDescriptor = getOrFail(BindingContext.CONSTRUCTOR, ktConstructor) as ClassConstructorDescriptor return declareConstructor( - ktConstructor, ktConstructor, ktClassOrObject.contextReceivers.mapNotNull { it.typeReference() }, constructorDescriptor @@ -282,7 +280,6 @@ internal class FunctionGenerator(declarationGenerator: DeclarationGenerator) : D private inline fun declareConstructor( ktConstructorElement: KtPureElement, - ktParametersElement: KtPureElement, ktContextReceiversElements: List, constructorDescriptor: ClassConstructorDescriptor, generateBody: BodyGenerator.(IrConstructor) -> IrBody? @@ -310,7 +307,7 @@ internal class FunctionGenerator(declarationGenerator: DeclarationGenerator) : D contextReceiverParametersCount = ktContextReceiversElements.size } }.buildWithScope { irConstructor -> - generateValueParameterDeclarations(irConstructor, ktParametersElement, null, ktContextReceiversElements) + generateValueParameterDeclarations(irConstructor, ktConstructorElement, null, ktContextReceiversElements) if (context.configuration.generateBodies) { irConstructor.body = createBodyGenerator(irConstructor.symbol).generateBody(irConstructor) } diff --git a/compiler/testData/debug/stepping/IfTrueThenFalse.kt b/compiler/testData/debug/stepping/IfTrueThenFalse.kt index a9d944cfbf4..3a6217c9be0 100644 --- a/compiler/testData/debug/stepping/IfTrueThenFalse.kt +++ b/compiler/testData/debug/stepping/IfTrueThenFalse.kt @@ -25,7 +25,7 @@ fun box() { // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test.kt:3 $cond (13, 18) +// test.kt:9 $box // test.kt:10 $box diff --git a/compiler/testData/debug/stepping/anonymousFunction.kt b/compiler/testData/debug/stepping/anonymousFunction.kt index 423b363641a..1fa785c85fa 100644 --- a/compiler/testData/debug/stepping/anonymousFunction.kt +++ b/compiler/testData/debug/stepping/anonymousFunction.kt @@ -28,7 +28,6 @@ fun box() { // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:7 $box // test.kt:4 $eval (27, 30) // test.kt:8 $box$lambda.invoke (8, 8, 8, 8, 12) diff --git a/compiler/testData/debug/stepping/anonymousFunctionDirect.kt b/compiler/testData/debug/stepping/anonymousFunctionDirect.kt index ac77aa86fb8..67b0bdabbb8 100644 --- a/compiler/testData/debug/stepping/anonymousFunctionDirect.kt +++ b/compiler/testData/debug/stepping/anonymousFunctionDirect.kt @@ -17,7 +17,6 @@ fun box() { // test.kt:8 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box // test.kt:6 $box$lambda.invoke (8, 8, 8, 8, 12) // String.kt:141 $kotlin.stringLiteral (17, 28, 17) diff --git a/compiler/testData/debug/stepping/assertion.kt b/compiler/testData/debug/stepping/assertion.kt index 75cc65ed477..e8ca7cb7e1c 100644 --- a/compiler/testData/debug/stepping/assertion.kt +++ b/compiler/testData/debug/stepping/assertion.kt @@ -54,7 +54,6 @@ fun box(): String { // test.kt:31 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:26 $box (4, 12, 4) // test.kt:17 $box (57, 57, 57, 57) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt b/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt index f9b42c70a3a..43f5e445d55 100644 --- a/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt +++ b/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt @@ -46,7 +46,6 @@ fun box() { // test.kt:21 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:20 $box // test.kt:12 $foo (11, 11, 11, 11, 11, 11) // test.kt:13 $foo (12, 12) diff --git a/compiler/testData/debug/stepping/callWithCallInArguments.kt b/compiler/testData/debug/stepping/callWithCallInArguments.kt index 4a3c2f2ed25..4d2985f4305 100644 --- a/compiler/testData/debug/stepping/callWithCallInArguments.kt +++ b/compiler/testData/debug/stepping/callWithCallInArguments.kt @@ -48,12 +48,11 @@ fun box() { // test.kt:15 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:9 $box (12, 12) // test.kt:4 $A. (7, 7, 7, 7) // test.kt:12 $box (24, 20) // test.kt:6 $bar (16, 16, 19, 16, 16, 19, 16, 16, 19) // test.kt:11 $box - // test.kt:10 $box (4, 4) + // test.kt:15 $box diff --git a/compiler/testData/debug/stepping/callWithReceiver.kt b/compiler/testData/debug/stepping/callWithReceiver.kt index 3cc5b7b4ef0..8739b6c4f38 100644 --- a/compiler/testData/debug/stepping/callWithReceiver.kt +++ b/compiler/testData/debug/stepping/callWithReceiver.kt @@ -36,7 +36,6 @@ fun box() { // test.kt:16 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:10 $box (12, 12) // test.kt:7 $A. // test.kt:11 $box diff --git a/compiler/testData/debug/stepping/callableReference.kt b/compiler/testData/debug/stepping/callableReference.kt index b5d2564dafc..c229bd23aec 100644 --- a/compiler/testData/debug/stepping/callableReference.kt +++ b/compiler/testData/debug/stepping/callableReference.kt @@ -38,7 +38,6 @@ fun f(block: () -> Unit) { // test.kt:8 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (12, 12, 4) // Runtime.kt:70 $kotlin.wasm.internal.getBoxedBoolean (8, 8) // Runtime.kt:73 $kotlin.wasm.internal.getBoxedBoolean (8, 35) diff --git a/compiler/testData/debug/stepping/chainCall.kt b/compiler/testData/debug/stepping/chainCall.kt index 3d52ad6ebf9..c03e201cd86 100644 --- a/compiler/testData/debug/stepping/chainCall.kt +++ b/compiler/testData/debug/stepping/chainCall.kt @@ -40,7 +40,6 @@ fun box() { // test.kt:16 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:10 $box (12, 12) // test.kt:7 $A. // test.kt:11 $box (4, 6) diff --git a/compiler/testData/debug/stepping/class.kt b/compiler/testData/debug/stepping/class.kt index 22cbab00ceb..e0198d9234d 100644 --- a/compiler/testData/debug/stepping/class.kt +++ b/compiler/testData/debug/stepping/class.kt @@ -38,7 +38,6 @@ fun box() { // test.kt:16 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:13 $box (12, 12) // test.kt:5 $A. // test.kt:10 $A. diff --git a/compiler/testData/debug/stepping/classObject.kt b/compiler/testData/debug/stepping/classObject.kt index 28550476162..96ebe310e32 100644 --- a/compiler/testData/debug/stepping/classObject.kt +++ b/compiler/testData/debug/stepping/classObject.kt @@ -51,7 +51,6 @@ fun box() { // test.kt:18 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:15 $box // test.kt:16 $box // test.kt:17 $box (6, 6) diff --git a/compiler/testData/debug/stepping/commentBeforeClass.kt b/compiler/testData/debug/stepping/commentBeforeClass.kt index 7f12166abc1..610bd2c3cc9 100644 --- a/compiler/testData/debug/stepping/commentBeforeClass.kt +++ b/compiler/testData/debug/stepping/commentBeforeClass.kt @@ -22,7 +22,6 @@ class A { // test.kt:6 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 4, 4) // test.kt:11 $A. // test.kt:6 $box diff --git a/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt b/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt index e6829e12ad9..25db10053b1 100644 --- a/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt +++ b/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt @@ -27,6 +27,5 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:12 $box // test.kt:13 $box diff --git a/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt b/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt index ee07374f72c..3f7674c5d50 100644 --- a/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt +++ b/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt @@ -21,7 +21,6 @@ fun box() { // test.kt:11 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:10 $box (4, 4, 4, 4, 4) // test.kt:5 $foo$default (0, 17, 17, 17, 17, 0) // test.kt:6 $foo (11, 4) diff --git a/compiler/testData/debug/stepping/comments.kt b/compiler/testData/debug/stepping/comments.kt index 14d82f1a761..ee76dae4ed2 100644 --- a/compiler/testData/debug/stepping/comments.kt +++ b/compiler/testData/debug/stepping/comments.kt @@ -55,7 +55,6 @@ class A { // test.kt:8 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (4, 4, 8) // test.kt:33 $A. (1, 1) // test.kt:25 $A.foo diff --git a/compiler/testData/debug/stepping/compileTimeConstant.kt b/compiler/testData/debug/stepping/compileTimeConstant.kt index e3425661410..ceed6b2273c 100644 --- a/compiler/testData/debug/stepping/compileTimeConstant.kt +++ b/compiler/testData/debug/stepping/compileTimeConstant.kt @@ -16,7 +16,6 @@ fun box() { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test.kt:5 $box // test.kt:7 $box diff --git a/compiler/testData/debug/stepping/conjunction.kt b/compiler/testData/debug/stepping/conjunction.kt index 29386c1253d..d08c6537d28 100644 --- a/compiler/testData/debug/stepping/conjunction.kt +++ b/compiler/testData/debug/stepping/conjunction.kt @@ -45,7 +45,6 @@ fun getD() = true // test.kt:12 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (16, 4) // test.kt:14 $getA (13, 17) // test.kt:5 $box diff --git a/compiler/testData/debug/stepping/constantConditions.kt b/compiler/testData/debug/stepping/constantConditions.kt index 65c33357446..a3f10807732 100644 --- a/compiler/testData/debug/stepping/constantConditions.kt +++ b/compiler/testData/debug/stepping/constantConditions.kt @@ -30,7 +30,6 @@ fun test(): Long { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (4, 4) // test.kt:11 $test // test.kt:12 $test (15, 8) diff --git a/compiler/testData/debug/stepping/constructorCall.kt b/compiler/testData/debug/stepping/constructorCall.kt index ad93bdad3fc..aad1c97fca3 100644 --- a/compiler/testData/debug/stepping/constructorCall.kt +++ b/compiler/testData/debug/stepping/constructorCall.kt @@ -49,7 +49,6 @@ fun box() { // test.kt:15 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:7 $box (4, 6, 4, 4) // test.kt:4 $A. (8, 19, 8, 19, 8, 19, 8, 19) // test.kt:8 $box (4, 4, 4) diff --git a/compiler/testData/debug/stepping/constructors.kt b/compiler/testData/debug/stepping/constructors.kt index 0fe01b8ecbf..e47c34f0fdf 100644 --- a/compiler/testData/debug/stepping/constructors.kt +++ b/compiler/testData/debug/stepping/constructors.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND_K2: WASM + // FILE: test.kt fun box() { @@ -194,7 +194,6 @@ class O(i: T) { // test.kt:18 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 4, 4) // test.kt:20 $B. // test.kt:6 $box (4, 6, 4, 4) @@ -219,9 +218,8 @@ class O(i: T) { // test.kt:40 $J. (16, 8) // test.kt:42 $J. // test.kt:12 $box (4, 6, 4, 4) -// test.kt:43 $K. +// test.kt:43 $K. (8, 19) // test.kt:45 $K. (16, 8) -// test.kt:47 $K. // test.kt:13 $box (4, 4, 4) // test.kt:49 $L. (4, 4) // test.kt:54 $L. (16, 8) @@ -243,7 +241,7 @@ class O(i: T) { // test.kt:67 $N. (16, 8) // test.kt:68 $N. // test.kt:16 $box (4, 6, 6, 6, 6, 4, 4) -// test.kt:76 $O. (1, 1) +// test.kt:73 $O. (16, 16) // test.kt:17 $box (4, 6, 9, 9, 9, 9, 4, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/continue.kt b/compiler/testData/debug/stepping/continue.kt index 8e03743f014..26ff518d367 100644 --- a/compiler/testData/debug/stepping/continue.kt +++ b/compiler/testData/debug/stepping/continue.kt @@ -81,7 +81,6 @@ fun box() { // Array.kt:76 $kotlin.Array.set (5, 5, 5, 5) // String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4) // Library.kt:39 $ (62, 82) -// test.kt:1 $box // test.kt:8 $box (14, 14, 14, 14, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4) // test.kt:5 $ // Array.kt:82 $kotlin.Array. (16, 24, 29) diff --git a/compiler/testData/debug/stepping/dataClass.kt b/compiler/testData/debug/stepping/dataClass.kt index 11b511d8024..0bb8852da76 100644 --- a/compiler/testData/debug/stepping/dataClass.kt +++ b/compiler/testData/debug/stepping/dataClass.kt @@ -360,11 +360,9 @@ fun box() { // String.kt:57 $kotlin.text.unsafeStringFromCharArray // String.kt:138 $kotlin.text.unsafeStringFromCharArray (4, 4, 4, 4, 11, 17, 22, 29, 4, 34) // test.kt:18 $box (17, 9, 9, 17, 12, 12) -// test.kt:1 $D.component1 // test.kt:19 $box (4, 6, 6, 6, 6, 6, 6) // test.kt:20 $box (12, 14, 17, 17, 17, 17, 12) -// test.kt:6 $E. (13, 25, 13, 25, 13, 25) -// test.kt:11 $E. (1, 1, 1) +// test.kt:6 $E. (13, 25, 39, 13, 25, 39, 13, 25, 39) // test.kt:21 $box (4, 13, 15, 18, 18, 18, 18, 13, 6, 6) // test.kt:8 $E.equals (39, 44) // test.kt:22 $box (4, 6, 6) @@ -372,7 +370,6 @@ fun box() { // test.kt:23 $box (4, 6, 6) // test.kt:7 $E.toString (30, 30, 30, 30, 34) // test.kt:24 $box (19, 9, 9, 19, 13, 13) -// test.kt:1 $E.component1 // test.kt:25 $box (4, 6, 6) // test.kt:10 $E.copy (17, 19, 22, 17, 24) // test.kt:26 $box diff --git a/compiler/testData/debug/stepping/defaultParameter.kt b/compiler/testData/debug/stepping/defaultParameter.kt index e4067b62b92..7a16e55c6d2 100644 --- a/compiler/testData/debug/stepping/defaultParameter.kt +++ b/compiler/testData/debug/stepping/defaultParameter.kt @@ -34,7 +34,6 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:12 $box (4, 4, 8, 8, 8, 8) // test.kt:9 $A. // test.kt:7 $A.foo$default (4, 25, 25, 25, 25, 4) diff --git a/compiler/testData/debug/stepping/delegation.kt b/compiler/testData/debug/stepping/delegation.kt index b7f0fad4daf..566984d2f01 100644 --- a/compiler/testData/debug/stepping/delegation.kt +++ b/compiler/testData/debug/stepping/delegation.kt @@ -42,6 +42,5 @@ fun box() { // test.kt:17 $box (12, 12) // test.kt:14 $C. (15, 16) // test.kt:18 $box (4, 6) -// test.kt:1 $C.f // test.kt:11 $O.f // test.kt:19 $box diff --git a/compiler/testData/debug/stepping/enum.kt b/compiler/testData/debug/stepping/enum.kt index c1899cad669..7e9ec178c4d 100644 --- a/compiler/testData/debug/stepping/enum.kt +++ b/compiler/testData/debug/stepping/enum.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND_K2: WASM + // FILE: test.kt enum class E() { @@ -56,7 +56,6 @@ fun box() { // test.kt:25 box // EXPECTATIONS WASM -// test.kt:1 $box // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) // ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) @@ -74,12 +73,11 @@ fun box() { // Enum.kt:11 $kotlin.Enum. (4, 4, 4, 4) // Enum.kt:27 $kotlin.Enum. (1, 1, 1, 1) // test.kt:12 $E. (15, 15) -// test.kt:13 $E. (1, 1) +// test.kt:4 $E. (14, 14) // test.kt:23 $box // test.kt:8 $E.foo (16, 16) // test.kt:10 $E.foo // test.kt:16 $E2_initEntries -// test.kt:15 $E2. (14, 14) -// test.kt:20 $E2. (1, 1) +// test.kt:15 $E2. (14, 26, 14, 26) // test.kt:18 $E2_initEntries // test.kt:25 $box diff --git a/compiler/testData/debug/stepping/for.kt b/compiler/testData/debug/stepping/for.kt index a4804ee323c..b8d7475c200 100644 --- a/compiler/testData/debug/stepping/for.kt +++ b/compiler/testData/debug/stepping/for.kt @@ -36,7 +36,6 @@ inline fun foo(n: Int) {} // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (14, 4, 17, 4, 14, 9, 14, 4, 17, 4, 4, 14, 9, 14, 4, 17, 4, 4, 14, 9, 14, 4, 17, 4, 4) // test.kt:5 $box (8, 12, 8, 12, 8, 12) // test.kt:7 $box diff --git a/compiler/testData/debug/stepping/functionCallWithDefault.kt b/compiler/testData/debug/stepping/functionCallWithDefault.kt index 2a0751e8460..99eb3c39cb3 100644 --- a/compiler/testData/debug/stepping/functionCallWithDefault.kt +++ b/compiler/testData/debug/stepping/functionCallWithDefault.kt @@ -29,7 +29,6 @@ inline fun bar(i: Int = 1) { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 4, 4, 4) // test.kt:9 $foo$default (0, 17, 17, 17, 17, 0) // test.kt:10 $foo diff --git a/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt b/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt index 894bcfa4a30..e70d62f1ce3 100644 --- a/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt +++ b/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt @@ -42,7 +42,6 @@ inline fun foo(f: () -> Unit) { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (4, 4) // test.kt:16 $box (12, 4, 12, 4) // test.kt:17 $box (4, 4) diff --git a/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt b/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt index ccbdccc9239..e3daf526913 100644 --- a/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt +++ b/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt @@ -60,7 +60,6 @@ fun foo(f: () -> Unit) { // test.kt:12 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box // test.kt:15 $foo (4, 4) // test.kt:6 $box$lambda.invoke (20, 12, 21) diff --git a/compiler/testData/debug/stepping/functionInAnotherFile.kt b/compiler/testData/debug/stepping/functionInAnotherFile.kt index f7bf05c07b7..18317d97466 100644 --- a/compiler/testData/debug/stepping/functionInAnotherFile.kt +++ b/compiler/testData/debug/stepping/functionInAnotherFile.kt @@ -47,7 +47,6 @@ fun bar(x: Int) = // test.kt:15 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:14 $box (8, 4, 4) // foo.kt:5 $foo (8, 13, 8, 8, 13, 8) // foo.kt:8 $foo (15, 11, 4) diff --git a/compiler/testData/debug/stepping/if.kt b/compiler/testData/debug/stepping/if.kt index 6b0533a29f2..896e2d135b9 100644 --- a/compiler/testData/debug/stepping/if.kt +++ b/compiler/testData/debug/stepping/if.kt @@ -34,7 +34,6 @@ inline fun getB(): Int { // test.kt:9 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (8, 8) // test.kt:15 $box (11, 4, 11, 4) // test.kt:7 $box diff --git a/compiler/testData/debug/stepping/if2.kt b/compiler/testData/debug/stepping/if2.kt index f54fec096a7..e748484140b 100644 --- a/compiler/testData/debug/stepping/if2.kt +++ b/compiler/testData/debug/stepping/if2.kt @@ -47,7 +47,6 @@ fun box() { // test.kt:23 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:21 $box (8, 4) // test.kt:5 $foo (8, 12, 8, 8, 12, 8) // test.kt:6 $foo (8, 8, 8, 8) diff --git a/compiler/testData/debug/stepping/ifThen.kt b/compiler/testData/debug/stepping/ifThen.kt index 4fd179ca36c..7c649cb42fc 100644 --- a/compiler/testData/debug/stepping/ifThen.kt +++ b/compiler/testData/debug/stepping/ifThen.kt @@ -36,7 +36,6 @@ fun box() { // test.kt:16 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:13 $box // test.kt:5 $foo (8, 8) // test.kt:6 $foo diff --git a/compiler/testData/debug/stepping/ifThenElse.kt b/compiler/testData/debug/stepping/ifThenElse.kt index 613a176e80e..57743d2117a 100644 --- a/compiler/testData/debug/stepping/ifThenElse.kt +++ b/compiler/testData/debug/stepping/ifThenElse.kt @@ -58,7 +58,6 @@ fun box() { // test.kt:24 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:21 $box // test.kt:5 $foo (8, 8) // test.kt:6 $foo (8, 8, 8, 8) diff --git a/compiler/testData/debug/stepping/ifThenElseFalse.kt b/compiler/testData/debug/stepping/ifThenElseFalse.kt index 929c725a143..e91d3a0bcf1 100644 --- a/compiler/testData/debug/stepping/ifThenElseFalse.kt +++ b/compiler/testData/debug/stepping/ifThenElseFalse.kt @@ -57,10 +57,10 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:16 $box // test.kt:9 $foo (8, 8) // test.kt:6 $cond (13, 18, 13, 18, 13, 18) +// test.kt:12 $foo // test.kt:13 $foo (1, 1) // test.kt:17 $box (12, 4) // test.kt:18 $box diff --git a/compiler/testData/debug/stepping/ifWithInlineInCondition.kt b/compiler/testData/debug/stepping/ifWithInlineInCondition.kt index bb39d714353..27dbee5cc47 100644 --- a/compiler/testData/debug/stepping/ifWithInlineInCondition.kt +++ b/compiler/testData/debug/stepping/ifWithInlineInCondition.kt @@ -72,7 +72,6 @@ fun nop() {} // test.kt:22 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box // test.kt:25 $box (11, 4, 11, 4, 11, 4, 11, 4) // test.kt:5 $box diff --git a/compiler/testData/debug/stepping/iincStepping.kt b/compiler/testData/debug/stepping/iincStepping.kt index da1eeae93b3..230f27a97ea 100644 --- a/compiler/testData/debug/stepping/iincStepping.kt +++ b/compiler/testData/debug/stepping/iincStepping.kt @@ -51,7 +51,6 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (12, 4) // test.kt:6 $box (4, 6) // Primitives.kt:2 $box diff --git a/compiler/testData/debug/stepping/implicitThis.kt b/compiler/testData/debug/stepping/implicitThis.kt index ddec352002c..f960abed9ef 100644 --- a/compiler/testData/debug/stepping/implicitThis.kt +++ b/compiler/testData/debug/stepping/implicitThis.kt @@ -68,7 +68,6 @@ class A { // test.kt:6 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 4, 8) // test.kt:29 $A. // test.kt:11 $A.test diff --git a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt index bbe5c0683da..aac735d8f1f 100644 --- a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt +++ b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND_K2: WASM + // FILE: test.kt fun box() { @@ -45,13 +45,11 @@ fun test(b: B) { // test.kt:6 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (9, 11, 11, 9, 4) // test.kt:8 $A. -// test.kt:10 $B. -// test.kt:12 $B. +// test.kt:10 $B. (8, 17) // test.kt:15 $test (4, 4) -// Standard.kt:3 $test (77, 90) +// Standard.kt:3 $test (51, 64) // Standard.kt:67 $test // Standard.kt:70 $test (20, 11, 20, 4) // test.kt:11 $B.invoke diff --git a/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt b/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt index ee9fd288e88..02d08cb4913 100644 --- a/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt +++ b/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt @@ -46,7 +46,6 @@ fun nop() {} // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test.kt:13 $box // test.kt:21 $nop (12, 12, 12) diff --git a/compiler/testData/debug/stepping/initBlocks.kt b/compiler/testData/debug/stepping/initBlocks.kt index f52b319e725..bdabf9b2dbc 100644 --- a/compiler/testData/debug/stepping/initBlocks.kt +++ b/compiler/testData/debug/stepping/initBlocks.kt @@ -121,7 +121,6 @@ fun box() { // test.kt:53 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:49 $box (4, 4, 4) // test.kt:8 $Foo. (8, 12, 8) // test.kt:46 $x (10, 10, 10, 10, 12, 10, 10, 10, 10, 12) diff --git a/compiler/testData/debug/stepping/initBlocksCompanion.kt b/compiler/testData/debug/stepping/initBlocksCompanion.kt index eeecb5c05ca..0de286f5c01 100644 --- a/compiler/testData/debug/stepping/initBlocksCompanion.kt +++ b/compiler/testData/debug/stepping/initBlocksCompanion.kt @@ -66,7 +66,6 @@ fun box() { // test.kt:32 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:9 $Companion. (12, 16, 16, 16, 16, 12) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/inlineCallableReference.kt b/compiler/testData/debug/stepping/inlineCallableReference.kt index 575098a09b7..c27d5123f26 100644 --- a/compiler/testData/debug/stepping/inlineCallableReference.kt +++ b/compiler/testData/debug/stepping/inlineCallableReference.kt @@ -43,7 +43,6 @@ inline fun f(block: () -> Unit) { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (12, 4) // test.kt:5 $box (4, 4) // test.kt:16 $box (4, 4) diff --git a/compiler/testData/debug/stepping/inlineNamedCallableReference.kt b/compiler/testData/debug/stepping/inlineNamedCallableReference.kt index 0cb23199d1d..10dfcbb4337 100644 --- a/compiler/testData/debug/stepping/inlineNamedCallableReference.kt +++ b/compiler/testData/debug/stepping/inlineNamedCallableReference.kt @@ -28,7 +28,6 @@ fun g() {} // test.kt:6 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (12, 4) // test.kt:5 $box // test.kt:9 $box (4, 4) diff --git a/compiler/testData/debug/stepping/inlineSimpleCall.kt b/compiler/testData/debug/stepping/inlineSimpleCall.kt index 5161a273f46..cfa5134b6a2 100644 --- a/compiler/testData/debug/stepping/inlineSimpleCall.kt +++ b/compiler/testData/debug/stepping/inlineSimpleCall.kt @@ -55,10 +55,13 @@ fun box() { // test.kt:25 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:10 $box (4, 4) // test.kt:6 $box (4, 4, 4, 4) +// test.kt:11 $box // test.kt:14 $box (4, 4) +// test.kt:15 $box // test.kt:18 $box +// test.kt:19 $box // test.kt:21 $box +// test.kt:22 $box // test.kt:25 $box diff --git a/compiler/testData/debug/stepping/kt15259.kt b/compiler/testData/debug/stepping/kt15259.kt index 9757e5a861c..df6fc1ce056 100644 --- a/compiler/testData/debug/stepping/kt15259.kt +++ b/compiler/testData/debug/stepping/kt15259.kt @@ -29,9 +29,9 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:12 $box (4, 4) // test.kt:6 $makeFace (25, 25) +// test.kt:8 $. // test.kt:9 $. // test.kt:9 $makeFace // test.kt:13 $box diff --git a/compiler/testData/debug/stepping/kt29179.kt b/compiler/testData/debug/stepping/kt29179.kt index 1287fa05ed6..c9b81737abd 100644 --- a/compiler/testData/debug/stepping/kt29179.kt +++ b/compiler/testData/debug/stepping/kt29179.kt @@ -34,7 +34,6 @@ fun box() { // test.kt:16 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:15 $box (4, 4, 8) // test.kt:5 $A. // test.kt:12 $A. diff --git a/compiler/testData/debug/stepping/kt42208.kt b/compiler/testData/debug/stepping/kt42208.kt index a0cc1071db4..43ef58effdc 100644 --- a/compiler/testData/debug/stepping/kt42208.kt +++ b/compiler/testData/debug/stepping/kt42208.kt @@ -25,7 +25,6 @@ inline fun foo() = { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (4, 4) // test1.kt:11 $box // test.kt:8 $box$lambda.invoke diff --git a/compiler/testData/debug/stepping/kt42208b.kt b/compiler/testData/debug/stepping/kt42208b.kt index b80f00c8bf8..89012496d75 100644 --- a/compiler/testData/debug/stepping/kt42208b.kt +++ b/compiler/testData/debug/stepping/kt42208b.kt @@ -28,7 +28,6 @@ inline fun foo() = { // test.kt:8 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test1.kt:12 $box // test.kt:7 $box diff --git a/compiler/testData/debug/stepping/kt42208c.kt b/compiler/testData/debug/stepping/kt42208c.kt index c1efa8ee685..4a1e0711a9c 100644 --- a/compiler/testData/debug/stepping/kt42208c.kt +++ b/compiler/testData/debug/stepping/kt42208c.kt @@ -50,7 +50,6 @@ fun baz(v:(() -> Unit)) { // test.kt:9 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (8, 4) // test1.kt:13 $box (1, 1) // test3.kt:16 $baz (4, 4) diff --git a/compiler/testData/debug/stepping/lambdaStepInline.kt b/compiler/testData/debug/stepping/lambdaStepInline.kt index bca306f4afe..9a041951c19 100644 --- a/compiler/testData/debug/stepping/lambdaStepInline.kt +++ b/compiler/testData/debug/stepping/lambdaStepInline.kt @@ -29,7 +29,6 @@ fun box(): String { // test.kt:14 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:9 $box (4, 10, 10, 10, 10, 15) // test.kt:5 $box (11, 11, 4, 11, 11, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt index b9a97fb337f..2677a91dcce 100644 --- a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt +++ b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt @@ -34,7 +34,6 @@ fun box(): String { // test.kt:17 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:15 $box // test.kt:4 $box (11, 11, 4) // test.kt:3 $box (45, 45, 45, 45, 49) diff --git a/compiler/testData/debug/stepping/lineNumberAfterInline.kt b/compiler/testData/debug/stepping/lineNumberAfterInline.kt index 891b60bfc54..97a4a842990 100644 --- a/compiler/testData/debug/stepping/lineNumberAfterInline.kt +++ b/compiler/testData/debug/stepping/lineNumberAfterInline.kt @@ -49,7 +49,6 @@ fun box() { // test.kt:25 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:23 $box // test.kt:13 $test1 (4, 4) // test.kt:9 $test1 (4, 4, 4, 4) diff --git a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt index a11262c761d..a8955ed92dc 100644 --- a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt +++ b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt @@ -29,7 +29,6 @@ inline fun lookAtMe(f: (String) -> Unit) { // test.kt:9 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test.kt:12 $box (12, 12, 12, 12, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/localFunction.kt b/compiler/testData/debug/stepping/localFunction.kt index b5ea5a16baf..09cf32ae1c2 100644 --- a/compiler/testData/debug/stepping/localFunction.kt +++ b/compiler/testData/debug/stepping/localFunction.kt @@ -27,7 +27,6 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (4, 4, 4, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt b/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt index 2551d40a485..3a14573406f 100644 --- a/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt +++ b/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt @@ -25,7 +25,6 @@ fun box() { // test.kt:11 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (4, 4, 4, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/localProperty.kt b/compiler/testData/debug/stepping/localProperty.kt index 41709984eb1..c895b4b368a 100644 --- a/compiler/testData/debug/stepping/localProperty.kt +++ b/compiler/testData/debug/stepping/localProperty.kt @@ -30,7 +30,6 @@ fun box(): String { // test.kt:14 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:9 $box (8, 8, 8, 8) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/multiModule.kt b/compiler/testData/debug/stepping/multiModule.kt index a590ab2e6e0..bd1434f92ee 100644 --- a/compiler/testData/debug/stepping/multiModule.kt +++ b/compiler/testData/debug/stepping/multiModule.kt @@ -33,7 +33,6 @@ fun box() { // test.kt:17 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:15 $box (4, 4) // a.kt:5 $a (10, 10, 10, 10, 13) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/multilineExpression.kt b/compiler/testData/debug/stepping/multilineExpression.kt index cf34ed2ec65..3bcc8cbfcf2 100644 --- a/compiler/testData/debug/stepping/multilineExpression.kt +++ b/compiler/testData/debug/stepping/multilineExpression.kt @@ -27,7 +27,6 @@ fun test(a: Boolean, b: Boolean, c: Boolean): Boolean { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box (9, 15, 21, 4, 4) // test.kt:10 $test (11, 4) // test.kt:11 $test diff --git a/compiler/testData/debug/stepping/multilineFunctionCall.kt b/compiler/testData/debug/stepping/multilineFunctionCall.kt index 534ebb1d7bb..ad7e1263ce5 100644 --- a/compiler/testData/debug/stepping/multilineFunctionCall.kt +++ b/compiler/testData/debug/stepping/multilineFunctionCall.kt @@ -22,7 +22,6 @@ fun foo(i: Int) { // test.kt:8 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test.kt:5 $box // test.kt:11 $foo diff --git a/compiler/testData/debug/stepping/multilineInfixCall.kt b/compiler/testData/debug/stepping/multilineInfixCall.kt index acddf3d670c..95d1c4eb4af 100644 --- a/compiler/testData/debug/stepping/multilineInfixCall.kt +++ b/compiler/testData/debug/stepping/multilineInfixCall.kt @@ -22,7 +22,6 @@ infix fun Int.foo(i: Int) { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 4) // test.kt:6 $box // test.kt:10 $foo diff --git a/compiler/testData/debug/stepping/namedCallableReference.kt b/compiler/testData/debug/stepping/namedCallableReference.kt index f6618027391..71bfc7afed9 100644 --- a/compiler/testData/debug/stepping/namedCallableReference.kt +++ b/compiler/testData/debug/stepping/namedCallableReference.kt @@ -33,7 +33,6 @@ fun g() {} // test.kt:6 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (12, 4) // test.kt:5 $box // test.kt:9 $f diff --git a/compiler/testData/debug/stepping/nestedInline.kt b/compiler/testData/debug/stepping/nestedInline.kt index 2323407016b..877dbd37272 100644 --- a/compiler/testData/debug/stepping/nestedInline.kt +++ b/compiler/testData/debug/stepping/nestedInline.kt @@ -74,7 +74,6 @@ inline fun html(init: () -> Unit) { // test.kt:22 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:20 $box // test.kt:8 $box (14, 14, 14, 14, 4, 18, 10) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt b/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt index dc657c8a5a7..5d03050252b 100644 --- a/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt +++ b/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt @@ -28,7 +28,6 @@ inline fun lookAtMe(f: () -> Int) { // test.kt:9 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:6 $box // test.kt:12 $box // test.kt:13 $box (4, 8, 4, 4) diff --git a/compiler/testData/debug/stepping/nullcheck.kt b/compiler/testData/debug/stepping/nullcheck.kt index 28748d7af3a..23c48e57dbe 100644 --- a/compiler/testData/debug/stepping/nullcheck.kt +++ b/compiler/testData/debug/stepping/nullcheck.kt @@ -58,7 +58,6 @@ fun testExpressionBody(nullable: String?) = // test.kt:11 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:7 $box (9, 9, 9, 9, 4, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/overridenGetterSetter.kt b/compiler/testData/debug/stepping/overridenGetterSetter.kt index fef5f128ecd..66ce0eb3710 100644 --- a/compiler/testData/debug/stepping/overridenGetterSetter.kt +++ b/compiler/testData/debug/stepping/overridenGetterSetter.kt @@ -85,7 +85,6 @@ fun box() { // test.kt:34 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:31 $box (17, 17) // test.kt:18 $MyInterfaceImplWithBreakpoints. // test.kt:21 $MyInterfaceImplWithBreakpoints. diff --git a/compiler/testData/debug/stepping/primitiveNullChecks.kt b/compiler/testData/debug/stepping/primitiveNullChecks.kt index e388f6fed18..559a67f1b2d 100644 --- a/compiler/testData/debug/stepping/primitiveNullChecks.kt +++ b/compiler/testData/debug/stepping/primitiveNullChecks.kt @@ -19,7 +19,6 @@ fun box(): String { // test.kt:7 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:5 $box // test.kt:6 $box // test.kt:7 $box (11, 11, 11, 11, 4) diff --git a/compiler/testData/debug/stepping/propertyAccessor.kt b/compiler/testData/debug/stepping/propertyAccessor.kt index d483c49af09..70a28a817be 100644 --- a/compiler/testData/debug/stepping/propertyAccessor.kt +++ b/compiler/testData/debug/stepping/propertyAccessor.kt @@ -28,7 +28,6 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:12 $box (4, 4, 8, 8) // test.kt:9 $A. // test.kt:7 $A. (19, 12) diff --git a/compiler/testData/debug/stepping/recursion.kt b/compiler/testData/debug/stepping/recursion.kt index 91bc9e1beee..2c7b0a0b9b6 100644 --- a/compiler/testData/debug/stepping/recursion.kt +++ b/compiler/testData/debug/stepping/recursion.kt @@ -40,7 +40,6 @@ fun foo(n :Int ) : Int { // test.kt:6 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box // test.kt:5 $box (16, 12, 4) // test.kt:9 $foo (8, 13, 8, 18, 23, 18, 8, 13, 8, 18, 23, 18, 8, 13, 8) diff --git a/compiler/testData/debug/stepping/simpleDefaultArg.kt b/compiler/testData/debug/stepping/simpleDefaultArg.kt index d2047727c7d..8f2f674ee5f 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArg.kt @@ -21,7 +21,6 @@ fun box(): String { // test.kt:9 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:9 $box (11, 11, 11, 11, 4) // test.kt:4 $ifoo$default (0, 22, 22, 22, 22, 0) // String.kt:141 $kotlin.stringLiteral (17, 28, 17) diff --git a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt index 1d763f0913f..c49f6818dff 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt @@ -30,7 +30,6 @@ fun box(): String { // test.kt:15 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:14 $box // test.kt:5 $box (29, 29, 29, 29) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt index 6981bc36104..67af76d9cec 100644 --- a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt @@ -23,7 +23,6 @@ fun box(): String { // test.kt:11 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:11 $box (11, 4) // test.kt:6 $box // test.kt:4 $box (26, 26, 26, 26, 30) diff --git a/compiler/testData/debug/stepping/simpleSmap.kt b/compiler/testData/debug/stepping/simpleSmap.kt index ab4e3aa0cd6..1a7caf6e978 100644 --- a/compiler/testData/debug/stepping/simpleSmap.kt +++ b/compiler/testData/debug/stepping/simpleSmap.kt @@ -26,7 +26,6 @@ fun box() { // test.kt:14 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:11 $box // test.kt:7 $box // test.kt:12 $box (8, 8, 8, 8) diff --git a/compiler/testData/debug/stepping/smapInlineAsArgument.kt b/compiler/testData/debug/stepping/smapInlineAsArgument.kt index 109f5a41ad6..f1bc66c57a5 100644 --- a/compiler/testData/debug/stepping/smapInlineAsArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsArgument.kt @@ -50,7 +50,6 @@ fun fail() : String { // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (16, 4) // test.kt:17 $box (11, 11, 11, 11, 4, 11, 11, 11, 11, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt index 6688a3725a1..3a60e98e742 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt @@ -48,7 +48,6 @@ fun fail() : String { // test.kt:12 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:7 $box (4, 4, 4) // test.kt:15 $box (11, 11, 11, 11, 4, 11, 11, 11, 11, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt index d90c482e1db..d11b6f48cbe 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt @@ -46,7 +46,6 @@ fun fail() : String { // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 9, 14, 14, 14, 14, 19, 19, 19, 19) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) diff --git a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt index 6c7e8a65ada..14ce4f5d245 100644 --- a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt @@ -41,7 +41,6 @@ fun fail() : String { // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (4, 4, 4) // test.kt:13 $box (11, 11, 11, 11, 4, 11, 11, 11, 11, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) diff --git a/compiler/testData/debug/stepping/stringSwitches.kt b/compiler/testData/debug/stepping/stringSwitches.kt index 5e6a414ce89..cad21562e63 100644 --- a/compiler/testData/debug/stepping/stringSwitches.kt +++ b/compiler/testData/debug/stepping/stringSwitches.kt @@ -120,7 +120,6 @@ fun box() { // test.kt:34 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:30 $box (17, 17, 17, 17, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) @@ -156,7 +155,6 @@ fun box() { // String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8) // String.kt:98 $kotlin.String.equals (12, 12, 12, 12, 12, 12, 12, 12, 12) // String.kt:99 $kotlin.String.equals (12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28) -// test.kt:1 $stringSwitch (0, 0, 0, 0, 0, 0, 0, 0, 0) // test.kt:5 $stringSwitch (4, 4, 4, 4) // test.kt:12 $stringSwitch (19, 4, 19, 4, 19, 4, 19, 4) // test.kt:13 $stringSwitch (8, 15, 8, 8, 8) diff --git a/compiler/testData/debug/stepping/stringSwitchesSmall.kt b/compiler/testData/debug/stepping/stringSwitchesSmall.kt index 64f6b5d010c..5192422575e 100644 --- a/compiler/testData/debug/stepping/stringSwitchesSmall.kt +++ b/compiler/testData/debug/stepping/stringSwitchesSmall.kt @@ -105,7 +105,6 @@ fun box() { // test.kt:30 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:27 $box (17, 17, 17, 17, 4) // String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) // Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) @@ -141,7 +140,6 @@ fun box() { // String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8) // String.kt:98 $kotlin.String.equals (12, 12, 12, 12, 12, 12) // String.kt:99 $kotlin.String.equals (12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28) -// test.kt:1 $stringSwitch (0, 0, 0, 0, 0, 0) // test.kt:5 $stringSwitch (4, 4, 4) // test.kt:11 $stringSwitch (19, 4, 19, 4, 19, 4) // test.kt:12 $stringSwitch (8, 15, 8, 8) diff --git a/compiler/testData/debug/stepping/throwException.kt b/compiler/testData/debug/stepping/throwException.kt index cef30c2e05f..342eb762e02 100644 --- a/compiler/testData/debug/stepping/throwException.kt +++ b/compiler/testData/debug/stepping/throwException.kt @@ -41,7 +41,6 @@ fun throwIfLess(a: Int, b: Int) { // test.kt:16 throwIfLess // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box (12, 4) // test.kt:5 $box (12, 4) // test.kt:7 $box (20, 23, 8) diff --git a/compiler/testData/debug/stepping/topLevel.kt b/compiler/testData/debug/stepping/topLevel.kt index 2081e204039..f0f1e359bbd 100644 --- a/compiler/testData/debug/stepping/topLevel.kt +++ b/compiler/testData/debug/stepping/topLevel.kt @@ -21,7 +21,6 @@ fun box() { // test.kt:10 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:9 $box (4, 4) // test.kt:4 $foo (12, 16) // test.kt:10 $box diff --git a/compiler/testData/debug/stepping/trait.kt b/compiler/testData/debug/stepping/trait.kt index cd0b2561ef3..79eccc0fbfc 100644 --- a/compiler/testData/debug/stepping/trait.kt +++ b/compiler/testData/debug/stepping/trait.kt @@ -59,7 +59,6 @@ fun box() { // test.kt:17 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:15 $box (5, 5, 20) // test.kt:15 $. // test.kt:8 $A.bar (15, 8, 15, 8) diff --git a/compiler/testData/debug/stepping/tryCatch.kt b/compiler/testData/debug/stepping/tryCatch.kt index 0fa3e4e258a..c480983a9a5 100644 --- a/compiler/testData/debug/stepping/tryCatch.kt +++ b/compiler/testData/debug/stepping/tryCatch.kt @@ -43,7 +43,6 @@ fun box() { // test.kt:16 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:14 $box (8, 4) // test.kt:6 $foo (12, 12, 31, 31, 25) // test.kt:10 $foo (4, 4, 4, 4, 4, 4, 4, 4) diff --git a/compiler/testData/debug/stepping/tryCatchExpression.kt b/compiler/testData/debug/stepping/tryCatchExpression.kt index 9da9887d645..b02f54720e9 100644 --- a/compiler/testData/debug/stepping/tryCatchExpression.kt +++ b/compiler/testData/debug/stepping/tryCatchExpression.kt @@ -156,7 +156,6 @@ fun box() { // test.kt:49 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:42 $box // test.kt:6 $foo (8, 8, 8, 8) // test.kt:29 $mightThrow (8, 8, 8, 8, 22, 22, 16) diff --git a/compiler/testData/debug/stepping/tryCatchFinally.kt b/compiler/testData/debug/stepping/tryCatchFinally.kt index b0b538b1a64..2dae849137c 100644 --- a/compiler/testData/debug/stepping/tryCatchFinally.kt +++ b/compiler/testData/debug/stepping/tryCatchFinally.kt @@ -1,4 +1,4 @@ - +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun foo() { @@ -131,7 +131,6 @@ fun box() { // test.kt:39 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:34 $box // test.kt:6 $foo (8, 8, 8) // test.kt:26 $mightThrow (8, 8, 8, 22, 22, 16) diff --git a/compiler/testData/debug/stepping/tryFinally.kt b/compiler/testData/debug/stepping/tryFinally.kt index a5fc61d893e..c6235450de8 100644 --- a/compiler/testData/debug/stepping/tryFinally.kt +++ b/compiler/testData/debug/stepping/tryFinally.kt @@ -84,7 +84,6 @@ fun box() { // test.kt:26 mightThrow2 // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:30 $box // test.kt:6 $foo (8, 8) // test.kt:22 $mightThrow (8, 8) diff --git a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt index c16d6a2da63..799f5f49519 100644 --- a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt +++ b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt @@ -30,7 +30,6 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:8 $box (8, 4) // test.kt:9 $box (8, 4) // test.kt:10 $box (9, 8) diff --git a/compiler/testData/debug/stepping/voidLambdaStepInline.kt b/compiler/testData/debug/stepping/voidLambdaStepInline.kt index 0251c69a405..5a03d5542c5 100644 --- a/compiler/testData/debug/stepping/voidLambdaStepInline.kt +++ b/compiler/testData/debug/stepping/voidLambdaStepInline.kt @@ -22,7 +22,6 @@ fun box(): String { // test.kt:9 box // EXPECTATIONS WASM -// test.kt:1 $box__JsExportAdapter // test.kt:5 $box // Standard.kt:41 $box (4, 4) // Standard.kt:44 $box (11, 11, 11, 4, 11, 11, 11, 4) diff --git a/compiler/testData/debug/stepping/when.kt b/compiler/testData/debug/stepping/when.kt index cf62905bb1c..8c9971b1bef 100644 --- a/compiler/testData/debug/stepping/when.kt +++ b/compiler/testData/debug/stepping/when.kt @@ -114,10 +114,10 @@ fun box() { // test.kt:20 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:19 $box (8, 4) // test.kt:6 $foo (8, 23, 19, 8, 8, 8, 8, 8, 8) // test.kt:7 $foo (23, 19, 23, 19) +// test.kt:8 $foo (16, 16, 16, 16) // test.kt:12 $foo (8, 8, 8, 8, 23, 19, 8, 8, 8) // test.kt:14 $foo (16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16) // test.kt:11 $foo (4, 4, 4, 4, 4, 4, 4) diff --git a/compiler/testData/debug/stepping/whenComplicatedSubject.kt b/compiler/testData/debug/stepping/whenComplicatedSubject.kt index 770c3e2e507..3bbbaa26f10 100644 --- a/compiler/testData/debug/stepping/whenComplicatedSubject.kt +++ b/compiler/testData/debug/stepping/whenComplicatedSubject.kt @@ -55,11 +55,10 @@ fun box() { // test.kt:20 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:17 $box (8, 4) // test.kt:7 $foo (13, 23, 13, 13) -// test.kt:11 $foo (7, 7, 7) -// test.kt:12 $foo (7, 7) +// test.kt:11 $foo (7, 7, 7, 12) +// test.kt:12 $foo (7, 12, 7) // test.kt:14 $foo (1, 1, 1) // test.kt:18 $box (8, 4) // test.kt:8 $foo diff --git a/compiler/testData/debug/stepping/whenConstant.kt b/compiler/testData/debug/stepping/whenConstant.kt index 84e3b29a9fd..3893e3435a1 100644 --- a/compiler/testData/debug/stepping/whenConstant.kt +++ b/compiler/testData/debug/stepping/whenConstant.kt @@ -24,7 +24,6 @@ fun box() { // test.kt:13 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box // test.kt:6 $box // test.kt:11 $box (12, 12, 12, 12) diff --git a/compiler/testData/debug/stepping/whenExpr.kt b/compiler/testData/debug/stepping/whenExpr.kt index 4af7b3a31da..20076749cb6 100644 --- a/compiler/testData/debug/stepping/whenExpr.kt +++ b/compiler/testData/debug/stepping/whenExpr.kt @@ -30,7 +30,6 @@ fun box() { // test.kt:17 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (18, 18, 18, 18) // test.kt:6 $box // test.kt:7 $box @@ -38,4 +37,5 @@ fun box() { // Runtime.kt:49 $kotlin.wasm.internal.nullableEquals (25, 30, 37, 30, 4, 25, 30, 37, 30, 4) // Primitives.kt:1363 $kotlin.Int__equals-impl (42, 42, 24, 48, 42, 42, 24, 48) // test.kt:10 $box +// test.kt:14 $box // test.kt:17 $box diff --git a/compiler/testData/debug/stepping/whenInConjunction.kt b/compiler/testData/debug/stepping/whenInConjunction.kt index 1bb0ae3eae9..3adb4e76424 100644 --- a/compiler/testData/debug/stepping/whenInConjunction.kt +++ b/compiler/testData/debug/stepping/whenInConjunction.kt @@ -43,7 +43,6 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:18 $box (8, 8, 8, 8, 4) // test.kt:5 $foo (8, 10, 10, 10, 20, 8, 31) // Primitives.kt:2239 $kotlin.Float__toInt-impl (8, 38, 8, 38) diff --git a/compiler/testData/debug/stepping/whenInDisjunction.kt b/compiler/testData/debug/stepping/whenInDisjunction.kt index c27b61d7041..4e4685e9d10 100644 --- a/compiler/testData/debug/stepping/whenInDisjunction.kt +++ b/compiler/testData/debug/stepping/whenInDisjunction.kt @@ -43,7 +43,6 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:18 $box (8, 8, 8, 8, 4) // test.kt:5 $foo (8, 10, 10, 10, 20, 8, 31) // Primitives.kt:2239 $kotlin.Float__toInt-impl (8, 38, 8, 38) diff --git a/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt b/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt index e93ca948c6b..dbe1bce377a 100644 --- a/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt +++ b/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt @@ -65,7 +65,6 @@ fun box() { // test.kt:29 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:28 $box (8, 8, 8, 8, 11, 11, 11, 11, 4) // test.kt:5 $foo (8, 23, 8) // test.kt:6 $foo (12, 22, 22, 22, 22) diff --git a/compiler/testData/debug/stepping/whenInNegation.kt b/compiler/testData/debug/stepping/whenInNegation.kt index 64f3530c9e3..e73da99f3fc 100644 --- a/compiler/testData/debug/stepping/whenInNegation.kt +++ b/compiler/testData/debug/stepping/whenInNegation.kt @@ -29,7 +29,6 @@ fun box() { // test.kt:14 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:13 $box (8, 8, 8, 8, 4) // test.kt:5 $foo (15, 8) // test.kt:6 $foo (12, 24) diff --git a/compiler/testData/debug/stepping/whenInNullComparison.kt b/compiler/testData/debug/stepping/whenInNullComparison.kt index 8d268b061c7..6548ecf467c 100644 --- a/compiler/testData/debug/stepping/whenInNullComparison.kt +++ b/compiler/testData/debug/stepping/whenInNullComparison.kt @@ -39,7 +39,6 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:18 $box (8, 8, 8, 8, 4) // test.kt:5 $foo // test.kt:6 $foo (12, 24) diff --git a/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt b/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt index 61d24e3fd17..1a8d0022266 100644 --- a/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt +++ b/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt @@ -41,7 +41,6 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:18 $box (8, 8, 8, 8, 4) // test.kt:5 $foo (8, 8, 8, 8, 19, 8) // test.kt:6 $foo (12, 22, 22, 22, 22) diff --git a/compiler/testData/debug/stepping/whenInZeroComparison.kt b/compiler/testData/debug/stepping/whenInZeroComparison.kt index f45d766bdb5..4ac98027a6d 100644 --- a/compiler/testData/debug/stepping/whenInZeroComparison.kt +++ b/compiler/testData/debug/stepping/whenInZeroComparison.kt @@ -29,7 +29,6 @@ fun box() { // test.kt:14 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:13 $box (8, 8, 8, 8, 4) // test.kt:5 $foo (14, 8) // test.kt:6 $foo (12, 24) diff --git a/compiler/testData/debug/stepping/whenIsChecks.kt b/compiler/testData/debug/stepping/whenIsChecks.kt index 9cfe6857ee9..80f852ba57e 100644 --- a/compiler/testData/debug/stepping/whenIsChecks.kt +++ b/compiler/testData/debug/stepping/whenIsChecks.kt @@ -63,12 +63,14 @@ fun box() { // test.kt:19 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:16 $box (8, 8, 8, 8, 4) // test.kt:5 $foo (10, 10, 10) // test.kt:6 $foo (8, 8, 8) +// test.kt:7 $foo // test.kt:13 $foo (1, 1, 1) // test.kt:17 $box (8, 8, 8, 8, 4) // test.kt:8 $foo (8, 8) +// test.kt:9 $foo // test.kt:18 $box (8, 8, 8, 8, 4) +// test.kt:11 $foo // test.kt:19 $box diff --git a/compiler/testData/debug/stepping/whenMultiLine.kt b/compiler/testData/debug/stepping/whenMultiLine.kt index 6343cf5016d..d076c01481a 100644 --- a/compiler/testData/debug/stepping/whenMultiLine.kt +++ b/compiler/testData/debug/stepping/whenMultiLine.kt @@ -75,14 +75,16 @@ fun box() { // test.kt:30 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:27 $box (8, 4, 4) // test.kt:6 $foo (8, 8, 8) +// test.kt:7 $foo // test.kt:15 $foo (8, 8, 8) // test.kt:16 $foo // test.kt:23 $foo (11, 4, 11, 4, 11, 4) // test.kt:28 $box (8, 4, 4) +// test.kt:9 $foo // test.kt:18 $foo // test.kt:29 $box (8, 4, 4) +// test.kt:11 $foo // test.kt:20 $foo // test.kt:30 $box diff --git a/compiler/testData/debug/stepping/whenMultiLineSubject.kt b/compiler/testData/debug/stepping/whenMultiLineSubject.kt index e93b27b8be6..53df52245b2 100644 --- a/compiler/testData/debug/stepping/whenMultiLineSubject.kt +++ b/compiler/testData/debug/stepping/whenMultiLineSubject.kt @@ -75,16 +75,18 @@ fun box() { // test.kt:30 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:27 $box (8, 4, 4) // test.kt:5 $foo (10, 10, 10) // test.kt:6 $foo (8, 8, 8) +// test.kt:7 $foo // test.kt:14 $foo (18, 18, 18) // test.kt:15 $foo (8, 8, 8) // test.kt:16 $foo // test.kt:23 $foo (11, 4, 11, 4, 11, 4) // test.kt:28 $box (8, 4, 4) +// test.kt:9 $foo // test.kt:18 $foo // test.kt:29 $box (8, 4, 4) +// test.kt:11 $foo // test.kt:20 $foo // test.kt:30 $box diff --git a/compiler/testData/debug/stepping/whenNullalbeSubject.kt b/compiler/testData/debug/stepping/whenNullalbeSubject.kt index c47af5d391a..0bbac28c646 100644 --- a/compiler/testData/debug/stepping/whenNullalbeSubject.kt +++ b/compiler/testData/debug/stepping/whenNullalbeSubject.kt @@ -30,7 +30,6 @@ fun box() { // test.kt:17 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (18, 18, 18, 18) // test.kt:6 $box // test.kt:7 $box @@ -38,4 +37,5 @@ fun box() { // Runtime.kt:49 $kotlin.wasm.internal.nullableEquals (25, 30, 37, 30, 4, 25, 30, 37, 30, 4) // Primitives.kt:1363 $kotlin.Int__equals-impl (42, 42, 24, 48, 42, 42, 24, 48) // test.kt:10 $box +// test.kt:14 $box // test.kt:17 $box diff --git a/compiler/testData/debug/stepping/whenSubject.kt b/compiler/testData/debug/stepping/whenSubject.kt index 3e660036359..249aa38134d 100644 --- a/compiler/testData/debug/stepping/whenSubject.kt +++ b/compiler/testData/debug/stepping/whenSubject.kt @@ -114,11 +114,11 @@ fun box() { // test.kt:20 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:19 $box (8, 4) // test.kt:5 $foo (10, 10, 10, 10, 10, 10, 10) // test.kt:6 $foo (8, 18, 14, 8, 8, 8, 8, 8, 8) // test.kt:7 $foo (18, 14, 18, 14) +// test.kt:8 $foo (16, 16, 16, 16) // test.kt:11 $foo (18, 4, 18, 18, 4, 4, 18, 18, 4, 18, 18, 4, 4, 4) // test.kt:12 $foo (8, 8, 8, 8, 18, 14, 8, 8, 8) // test.kt:14 $foo (16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16) diff --git a/compiler/testData/debug/stepping/whenSubject2.kt b/compiler/testData/debug/stepping/whenSubject2.kt index 6efccc93afb..b0b6b9fa864 100644 --- a/compiler/testData/debug/stepping/whenSubject2.kt +++ b/compiler/testData/debug/stepping/whenSubject2.kt @@ -132,11 +132,11 @@ fun box() { // test.kt:24 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:23 $box (8, 4) // test.kt:6 $foo (9, 9, 9, 9, 9, 9, 9) // test.kt:8 $foo (8, 18, 14, 8, 8, 8, 8, 8, 8) // test.kt:9 $foo (18, 14, 18, 14) +// test.kt:10 $foo (16, 16, 16, 16) // test.kt:14 $foo (9, 9, 9, 9, 9, 9, 9) // test.kt:16 $foo (8, 8, 8, 8, 18, 14, 8, 8, 8) // test.kt:18 $foo (16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16) diff --git a/compiler/testData/debug/stepping/whenWithInlineInCondition.kt b/compiler/testData/debug/stepping/whenWithInlineInCondition.kt index ca145102b37..43642b923b6 100644 --- a/compiler/testData/debug/stepping/whenWithInlineInCondition.kt +++ b/compiler/testData/debug/stepping/whenWithInlineInCondition.kt @@ -80,7 +80,6 @@ fun nop() {} // test.kt:18 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:4 $box // test.kt:20 $value (19, 20) // test.kt:5 $box diff --git a/compiler/testData/debug/stepping/while.kt b/compiler/testData/debug/stepping/while.kt index 3df3c3b3395..1c3ae01aa05 100644 --- a/compiler/testData/debug/stepping/while.kt +++ b/compiler/testData/debug/stepping/while.kt @@ -39,7 +39,6 @@ fun box() { // test.kt:14 box // EXPECTATIONS WASM -// test.kt:1 $box // test.kt:5 $box (12, 4) // test.kt:6 $box (13, 11, 13, 17, 11, 11, 11, 13, 11, 13, 17, 11, 11, 11) // Primitives.kt:1159 $kotlin.Int__dec-impl (15, 8, 16, 15, 8, 16, 15, 8, 16, 15, 8, 16) diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.fir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.fir.kt deleted file mode 100644 index f2e7d1664c0..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -// WITH_STDLIB - -@JvmInline -value class A(val x: Int) { - constructor(x: UInt): this(x.toInt()) -} - -data class B(val x: UInt) { - constructor(x: Int) : this(x.toUInt()) -} diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.kt index 6a04e4e5e45..a136d8e84af 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/inlineClasses/declarationClash.kt @@ -1,10 +1,11 @@ +// FIR_IDENTICAL // WITH_STDLIB @JvmInline -value class A(val x: Int) { +value class A(val x: Int) { constructor(x: UInt): this(x.toInt()) -} +} -data class B(val x: UInt) { +data class B(val x: UInt) { constructor(x: Int) : this(x.toUInt()) -} +} diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.fir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.fir.kt deleted file mode 100644 index ed799703949..00000000000 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.fir.kt +++ /dev/null @@ -1,13 +0,0 @@ -// !LANGUAGE: +ValueClasses -// WITH_STDLIB - -@JvmInline -value class A(val x: Int, val y: Int) { - constructor(other: A): this(other.x, other.y) - constructor(x: UInt, y: UInt): this(x.toInt(), y.toInt()) -} - -data class B(val x: UInt, val y: UInt) { - constructor(other: A) : this(other.x, other.y) - constructor(x: Int, y: Int) : this(x.toUInt(), y.toUInt()) -} diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.kt index 71542e710ed..d22487164d2 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/valueClasses/declarationClash.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +ValueClasses // WITH_STDLIB @@ -7,7 +8,7 @@ value class A(val x: Int, val y: Int) { constructor(x: UInt, y: UInt): this(x.toInt(), y.toInt()) } -data class B(val x: UInt, val y: UInt) { +data class B(val x: UInt, val y: UInt) { constructor(other: A) : this(other.x, other.y) constructor(x: Int, y: Int) : this(x.toUInt(), y.toUInt()) -} +} diff --git a/compiler/testData/ir/sourceRanges/annotations.txt b/compiler/testData/ir/sourceRanges/annotations.txt index 87ced389ce8..3ec09bce535 100644 --- a/compiler/testData/ir/sourceRanges/annotations.txt +++ b/compiler/testData/ir/sourceRanges/annotations.txt @@ -6,9 +6,9 @@ @0:8..33 GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:FUNCTION' type=kotlin.annotation.AnnotationTarget @0:8..33 GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:PROPERTY_GETTER' type=kotlin.annotation.AnnotationTarget @0:8..33 GET_ENUM 'ENUM_ENTRY IR_EXTERNAL_DECLARATION_STUB name:PROPERTY_SETTER' type=kotlin.annotation.AnnotationTarget - @1:20..63 CONSTRUCTOR visibility:public <> (description:kotlin.String) returnType:.MyAnnotation [primary] + @1:38..63 CONSTRUCTOR visibility:public <> (description:kotlin.String) returnType:.MyAnnotation [primary] @1:39..62 VALUE_PARAMETER name:description index:0 type:kotlin.String - @0:0..1:63 BLOCK_BODY + @1:38..63 BLOCK_BODY @0:0..1:63 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @0:0..1:63 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:MyAnnotation modality:OPEN visibility:internal superTypes:[kotlin.Annotation]' @1:39..62 PROPERTY name:description visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/sourceRanges/comments.txt b/compiler/testData/ir/sourceRanges/comments.txt index 54522520b1e..ee7732412e8 100644 --- a/compiler/testData/ir/sourceRanges/comments.txt +++ b/compiler/testData/ir/sourceRanges/comments.txt @@ -5,10 +5,10 @@ @1:0..33:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @1:0..33:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]' @8:4..10:36 CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - @8:60..10:36 CONSTRUCTOR visibility:private <> ($this:.Foo, x:kotlin.Int) returnType:.Foo.Inner [primary] + @8:60..79 CONSTRUCTOR visibility:private <> ($this:.Foo, x:kotlin.Int) returnType:.Foo.Inner [primary] @8:52..79 VALUE_PARAMETER name: type:.Foo @8:72..78 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @8:4..10:36 BLOCK_BODY + @8:60..79 BLOCK_BODY @8:4..10:36 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @8:4..10:36 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' @8:10..10:36 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/sourceRanges/declarations/classes.txt b/compiler/testData/ir/sourceRanges/declarations/classes.txt index 93c0f63ecaf..7e38b118e59 100644 --- a/compiler/testData/ir/sourceRanges/declarations/classes.txt +++ b/compiler/testData/ir/sourceRanges/declarations/classes.txt @@ -14,7 +14,7 @@ @0:0..11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @3:0..4:11 CLASS CLASS name:Test2 modality:FINAL visibility:internal superTypes:[kotlin.Any] @4:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test2 [primary] - @3:0..4:11 BLOCK_BODY + @4:0..11 BLOCK_BODY @3:0..4:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @3:0..4:11 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:internal superTypes:[kotlin.Any]' @4:0..11 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -44,7 +44,7 @@ @13:10..22 VARARG type=kotlin.Array varargElementType=kotlin.String @13:10..22 CONST String type=kotlin.String value="UNUSED_VAR" @14:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test4 [primary] - @13:0..14:11 BLOCK_BODY + @14:0..11 BLOCK_BODY @13:0..14:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @13:0..14:11 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any]' @14:0..11 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -57,7 +57,7 @@ @13:0..14:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test4 @17:0..18:11 CLASS ENUM_CLASS name:Test5 modality:FINAL visibility:public superTypes:[kotlin.Enum<.Test5>] @18:0..11 CONSTRUCTOR visibility:private <> () returnType:.Test5 [primary] - @17:0..18:11 BLOCK_BODY + @18:0..11 BLOCK_BODY @17:0..18:11 ENUM_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' @17:0..18:11 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Test5 modality:FINAL visibility:public superTypes:[kotlin.Enum<.Test5>]' @17:0..18:11 PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [fake_override,val] @@ -95,7 +95,7 @@ @17:0..18:11 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test5 @21:0..22:11 CLASS ANNOTATION_CLASS name:Test6 modality:OPEN visibility:public superTypes:[kotlin.Annotation] @22:0..11 CONSTRUCTOR visibility:public <> () returnType:.Test6 [primary] - @21:0..22:11 BLOCK_BODY + @22:0..11 BLOCK_BODY @21:0..22:11 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @21:0..22:11 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ANNOTATION_CLASS name:Test6 modality:OPEN visibility:public superTypes:[kotlin.Annotation]' @22:0..11 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/sourceRanges/declarations/fakeOverrides2.txt b/compiler/testData/ir/sourceRanges/declarations/fakeOverrides2.txt index e37baf0a105..f80707f39b5 100644 --- a/compiler/testData/ir/sourceRanges/declarations/fakeOverrides2.txt +++ b/compiler/testData/ir/sourceRanges/declarations/fakeOverrides2.txt @@ -2,7 +2,7 @@ @0:0..2:1 CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any] @0:17..18 TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false @0:9..2:1 CONSTRUCTOR visibility:public <> () returnType:.A.A> [primary] - @0:0..2:1 BLOCK_BODY + @0:9..2:1 BLOCK_BODY @0:0..2:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @0:0..2:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' @1:4..27 FUN name:foo visibility:public modality:FINAL <> ($this:.A.A>, x:T of .A) returnType:kotlin.Unit diff --git a/compiler/testData/ir/sourceRanges/declarations/kt29862.txt b/compiler/testData/ir/sourceRanges/declarations/kt29862.txt index 45f334259ef..19edf9f6bec 100644 --- a/compiler/testData/ir/sourceRanges/declarations/kt29862.txt +++ b/compiler/testData/ir/sourceRanges/declarations/kt29862.txt @@ -1,8 +1,8 @@ @0:0..15:0 FILE fqName: fileName:/kt29862.kt @0:0..3:1 CLASS CLASS name:Test1 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - @0:9..3:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [primary] + @0:20..2:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [primary] @1:4..14 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @0:0..3:1 BLOCK_BODY + @0:20..2:1 BLOCK_BODY @0:0..3:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @0:0..3:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' @1:4..14 PROPERTY name:x visibility:public modality:FINAL [val] @@ -24,9 +24,9 @@ @0:0..3:1 VALUE_PARAMETER name: type:kotlin.Any @0:0..3:1 VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 @5:0..14:1 CLASS CLASS name:Test2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any] - @7:0..14:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test2 [primary] + @7:11..9:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test2 [primary] @8:4..14 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @5:0..14:1 BLOCK_BODY + @7:11..9:1 BLOCK_BODY @5:0..14:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @5:0..14:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:ABSTRACT visibility:public superTypes:[kotlin.Any]' @8:4..14 PROPERTY name:x visibility:public modality:FINAL [val] @@ -40,10 +40,10 @@ @8:4..14 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null @8:4..14 GET_VAR ': .Test2 declared in .Test2.' type=.Test2 origin=null @10:4..13:5 CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any] - @11:4..13:5 CONSTRUCTOR visibility:public <> ($this:.Test2, x:kotlin.Int) returnType:.Test2.TestInner [primary] + @11:19..13:5 CONSTRUCTOR visibility:public <> ($this:.Test2, x:kotlin.Int) returnType:.Test2.TestInner [primary] @11:19..13:5 VALUE_PARAMETER name: type:.Test2 @12:8..18 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @10:4..13:5 BLOCK_BODY + @11:19..13:5 BLOCK_BODY @10:4..13:5 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @10:4..13:5 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:TestInner modality:FINAL visibility:public [inner] superTypes:[kotlin.Any]' @12:8..18 PROPERTY name:x visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt b/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt index 7dc3d9b339c..cff9c64c3aa 100644 --- a/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt +++ b/compiler/testData/ir/sourceRanges/declarations/primaryConstructors.txt @@ -1,8 +1,8 @@ @0:0..14:0 FILE fqName: fileName:/primaryConstructors.kt @0:0..23 CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any] - @0:0..23 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [primary] + @0:11..23 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test1 [primary] @0:12..22 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @0:0..23 BLOCK_BODY + @0:11..23 BLOCK_BODY @0:0..23 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @0:0..23 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Any]' @0:12..22 PROPERTY name:x visibility:public modality:FINAL [val] @@ -26,7 +26,7 @@ @2:0..3:32 CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any] @3:9..32 CONSTRUCTOR visibility:internal <> (x:kotlin.Int) returnType:.Test2 [primary] @3:21..31 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @2:0..3:32 BLOCK_BODY + @3:9..32 BLOCK_BODY @2:0..3:32 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @2:0..3:32 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test2 modality:FINAL visibility:public superTypes:[kotlin.Any]' @3:21..31 PROPERTY name:x visibility:public modality:FINAL [val] @@ -50,7 +50,7 @@ @5:0..9:23 CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any] @9:0..23 CONSTRUCTOR visibility:public <> (x:kotlin.Int) returnType:.Test3 [primary] @9:12..22 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @5:0..9:23 BLOCK_BODY + @9:0..23 BLOCK_BODY @5:0..9:23 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @5:0..9:23 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test3 modality:FINAL visibility:public superTypes:[kotlin.Any]' @9:12..22 PROPERTY name:x visibility:public modality:FINAL [val] @@ -78,7 +78,7 @@ @12:10..27 VARARG type=kotlin.Array varargElementType=kotlin.String @12:10..27 CONST String type=kotlin.String value="UNUSED_VARIABLE" @13:12..22 VALUE_PARAMETER name:x index:0 type:kotlin.Int - @11:0..13:23 BLOCK_BODY + @13:0..23 BLOCK_BODY @11:0..13:23 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @11:0..13:23 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test4 modality:FINAL visibility:public superTypes:[kotlin.Any]' @13:12..22 PROPERTY name:x visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt b/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt index da5349865e7..c5e15bb36b3 100644 --- a/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt +++ b/compiler/testData/ir/sourceRanges/declarations/synthesizedDataClassMembers.txt @@ -1,10 +1,10 @@ @0:0..5:0 FILE fqName: fileName:/synthesizedDataClassMembers.kt @0:0..4:1 CLASS CLASS name:C modality:FINAL visibility:public [data] superTypes:[kotlin.Any] - @0:5..4:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:.C [primary] + @0:12..4:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:.C [primary] @1:8..18 VALUE_PARAMETER name:x index:0 type:kotlin.Int @2:8..21 VALUE_PARAMETER name:y index:1 type:kotlin.String @3:8..18 VALUE_PARAMETER name:z index:2 type:kotlin.Any - @0:0..4:1 BLOCK_BODY + @0:12..4:1 BLOCK_BODY @0:0..4:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor () [primary] declared in kotlin.Any' @0:0..4:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public [data] superTypes:[kotlin.Any]' @1:8..18 PROPERTY name:x visibility:public modality:FINAL [val] diff --git a/compiler/testData/ir/sourceRanges/multiLineCall.txt b/compiler/testData/ir/sourceRanges/multiLineCall.txt index 7507e91c4ba..3140df44968 100644 --- a/compiler/testData/ir/sourceRanges/multiLineCall.txt +++ b/compiler/testData/ir/sourceRanges/multiLineCall.txt @@ -43,7 +43,7 @@ @35:4..6 CONST String type=kotlin.String value="" @39:0..41:1 CLASS ENUM_CLASS name:E modality:FINAL visibility:public superTypes:[kotlin.Enum<.E>] @39:5..41:1 CONSTRUCTOR visibility:private <> () returnType:.E [primary] - @39:0..41:1 BLOCK_BODY + @39:5..41:1 BLOCK_BODY @39:0..41:1 ENUM_CONSTRUCTOR_CALL 'public constructor (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum' @39:0..41:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:E modality:FINAL visibility:public superTypes:[kotlin.Enum<.E>]' @40:4..10 ENUM_ENTRY name:SINGLE diff --git a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt index 85d48130b0e..a8007800a50 100644 --- a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt +++ b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/stubs/ClassFileToSourceStubConverter.kt @@ -1045,7 +1045,10 @@ class ClassFileToSourceStubConverter(val kaptContext: KaptContextForStubGenerati val parameterDescriptor = valueParametersFromDescriptor[index - offset] val sourceElement = when { psiElement is KtFunction -> psiElement - descriptor is ConstructorDescriptor && descriptor.isPrimary -> (psiElement as? KtClassOrObject)?.primaryConstructor + descriptor is ConstructorDescriptor && descriptor.isPrimary -> { + (psiElement as? KtClassOrObject)?.primaryConstructor + ?: ((psiElement as? KtParameterList)?.parent as? KtFunction) + } else -> null } getNonErrorMethodParameterType(parameterDescriptor) { diff --git a/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmIrExpressionBuilder.kt b/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmIrExpressionBuilder.kt index 1ebfd785f98..3dfefdfca82 100644 --- a/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmIrExpressionBuilder.kt +++ b/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmIrExpressionBuilder.kt @@ -75,6 +75,7 @@ class WasmIrExpressionBuilder( // droppable instructions + drop/unreachable -> nothing if ((op == WasmOp.DROP || op == WasmOp.UNREACHABLE) && lastOperator.pureStacklessInstruction()) { trimInstructionsUntil(lastInstructionIndex) + (lastInstruction.location as? SourceLocation.Location)?.let(::buildNop) return } diff --git a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractFirWasmTest.kt b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractFirWasmTest.kt index 9b34c6beaba..aedb04f6ce8 100644 --- a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractFirWasmTest.kt +++ b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractFirWasmTest.kt @@ -112,7 +112,7 @@ open class AbstractFirWasmJsTranslatorTest : AbstractFirWasmJsTest( open class AbstractFirWasmJsSteppingTest : AbstractFirWasmJsTest( "compiler/testData/debug/stepping/", - "debug/stepping/" + "debug/stepping/firBox" ) { override val wasmBoxTestRunner: Constructor> get() = ::WasmDebugRunner diff --git a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractK1WasmTest.kt b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractK1WasmTest.kt index 980b8837c35..858675322da 100644 --- a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractK1WasmTest.kt +++ b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/AbstractK1WasmTest.kt @@ -69,7 +69,7 @@ open class AbstractK1WasmJsTranslatorTest : AbstractK1WasmTest( open class AbstractK1WasmSteppingTest : AbstractK1WasmTest( "compiler/testData/debug/stepping/", - "debug/stepping/" + "debug/stepping/k1Box" ) { override val wasmBoxTestRunner: Constructor>