diff --git a/compiler/testData/debug/stepping/IfTrueThenFalse.kt b/compiler/testData/debug/stepping/IfTrueThenFalse.kt index 7e2fd1dac37..9bf719791c9 100644 --- a/compiler/testData/debug/stepping/IfTrueThenFalse.kt +++ b/compiler/testData/debug/stepping/IfTrueThenFalse.kt @@ -9,7 +9,7 @@ fun box() { false } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:3 cond // test.kt:6 box @@ -19,4 +19,4 @@ fun box() { // EXPECTATIONS JS_IR // test.kt:6 box // test.kt:3 cond -// test.kt:10 box \ No newline at end of file +// test.kt:10 box diff --git a/compiler/testData/debug/stepping/anonymousFunction.kt b/compiler/testData/debug/stepping/anonymousFunction.kt index 96b28a985fd..e491b7390b2 100644 --- a/compiler/testData/debug/stepping/anonymousFunction.kt +++ b/compiler/testData/debug/stepping/anonymousFunction.kt @@ -9,7 +9,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:7 box // test.kt:4 eval // test.kt:8 invoke @@ -21,4 +21,4 @@ fun box() { // test.kt:7 box // test.kt:4 eval // test.kt:8 box$lambda -// test.kt:10 box \ No newline at end of file +// test.kt:10 box diff --git a/compiler/testData/debug/stepping/anonymousFunctionDirect.kt b/compiler/testData/debug/stepping/anonymousFunctionDirect.kt index f06479d0b50..0c96a09ca65 100644 --- a/compiler/testData/debug/stepping/anonymousFunctionDirect.kt +++ b/compiler/testData/debug/stepping/anonymousFunctionDirect.kt @@ -9,14 +9,9 @@ fun box() { // EXPECTATIONS JVM_IR // test.kt:6 box -// EXPECTATIONS JVM -// test.kt:5 box -// test.kt:6 invoke -// test.kt:5 box -// EXPECTATIONS JVM JVM_IR // test.kt:8 box // EXPECTATIONS JS_IR // test.kt:5 box // test.kt:6 box$lambda -// test.kt:8 box \ No newline at end of file +// test.kt:8 box diff --git a/compiler/testData/debug/stepping/assertion.kt b/compiler/testData/debug/stepping/assertion.kt index 2888a4353b2..69836af1fe8 100644 --- a/compiler/testData/debug/stepping/assertion.kt +++ b/compiler/testData/debug/stepping/assertion.kt @@ -31,7 +31,7 @@ fun box(): String { return "OK" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:26 box // test.kt:17 box // test.kt:18 box diff --git a/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt b/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt index 76ac2d06115..29c77920adc 100644 --- a/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt +++ b/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt @@ -20,7 +20,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:20 box // test.kt:12 foo // test.kt:13 foo diff --git a/compiler/testData/debug/stepping/callWithCallInArguments.kt b/compiler/testData/debug/stepping/callWithCallInArguments.kt index 5c5a7a41e43..5019e9f267d 100644 --- a/compiler/testData/debug/stepping/callWithCallInArguments.kt +++ b/compiler/testData/debug/stepping/callWithCallInArguments.kt @@ -14,7 +14,7 @@ fun box() { ) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:9 box // test.kt:4 // test.kt:9 box @@ -45,4 +45,4 @@ fun box() { // test.kt:10 box // test.kt:6 bar // test.kt:4 -// test.kt:15 box \ No newline at end of file +// test.kt:15 box diff --git a/compiler/testData/debug/stepping/callWithReceiver.kt b/compiler/testData/debug/stepping/callWithReceiver.kt index c25a212331e..091e6bda04f 100644 --- a/compiler/testData/debug/stepping/callWithReceiver.kt +++ b/compiler/testData/debug/stepping/callWithReceiver.kt @@ -15,7 +15,7 @@ fun box() { .bar() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:10 box // test.kt:4 // test.kt:10 box diff --git a/compiler/testData/debug/stepping/callableReference.kt b/compiler/testData/debug/stepping/callableReference.kt index 5b25bd9a73f..90be4bc3083 100644 --- a/compiler/testData/debug/stepping/callableReference.kt +++ b/compiler/testData/debug/stepping/callableReference.kt @@ -11,7 +11,7 @@ fun f(block: () -> Unit) { block() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:5 box // test.kt:11 f diff --git a/compiler/testData/debug/stepping/chainCall.kt b/compiler/testData/debug/stepping/chainCall.kt index b416744f25a..3756bf83025 100644 --- a/compiler/testData/debug/stepping/chainCall.kt +++ b/compiler/testData/debug/stepping/chainCall.kt @@ -15,7 +15,7 @@ fun box() { .bar() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:10 box // test.kt:4 // test.kt:10 box diff --git a/compiler/testData/debug/stepping/class.kt b/compiler/testData/debug/stepping/class.kt index d58b962bce9..f353e8be6e3 100644 --- a/compiler/testData/debug/stepping/class.kt +++ b/compiler/testData/debug/stepping/class.kt @@ -15,17 +15,11 @@ fun box() { a.foo() } -// TODO: The JVM_IR backend has an extra line number on the return. This causes line -// three to be hit both on entry to the constructor and on exit after storing the -// value of prop. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:13 box // test.kt:4 // test.kt:5 -// EXPECTATIONS JVM_IR // test.kt:4 -// EXPECTATIONS JVM JVM_IR // test.kt:13 box // test.kt:14 box // test.kt:5 getProp @@ -41,4 +35,4 @@ fun box() { // test.kt:4 // test.kt:15 box // test.kt:9 foo -// test.kt:16 box \ No newline at end of file +// test.kt:16 box diff --git a/compiler/testData/debug/stepping/classObject.kt b/compiler/testData/debug/stepping/classObject.kt index e4f0c432e76..97a07673048 100644 --- a/compiler/testData/debug/stepping/classObject.kt +++ b/compiler/testData/debug/stepping/classObject.kt @@ -17,7 +17,7 @@ fun box() { A.foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:15 box // test.kt:6 // test.kt:7 @@ -48,4 +48,4 @@ fun box() { // test.kt:17 box // test.kt:17 box // test.kt:9 foo -// test.kt:18 box \ No newline at end of file +// test.kt:18 box diff --git a/compiler/testData/debug/stepping/commentBeforeClass.kt b/compiler/testData/debug/stepping/commentBeforeClass.kt index 55b0877df31..12a7eef7c1d 100644 --- a/compiler/testData/debug/stepping/commentBeforeClass.kt +++ b/compiler/testData/debug/stepping/commentBeforeClass.kt @@ -10,7 +10,7 @@ class A { } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:9 // test.kt:5 box diff --git a/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt b/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt index f4332fbd7dc..0cc4bf20e9c 100644 --- a/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt +++ b/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt @@ -12,7 +12,7 @@ fun box() { AWithCompanion.compPropVal } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:12 box // test.kt:7 // test.kt:7 getCompPropVal diff --git a/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt b/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt index 039acf5e819..a97aaf68923 100644 --- a/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt +++ b/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt @@ -10,7 +10,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:10 box // test.kt:6 foo // test.kt:10 box diff --git a/compiler/testData/debug/stepping/comments.kt b/compiler/testData/debug/stepping/comments.kt index 44ed08aea65..b8518e44628 100644 --- a/compiler/testData/debug/stepping/comments.kt +++ b/compiler/testData/debug/stepping/comments.kt @@ -32,7 +32,7 @@ class A { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:16 // test.kt:6 box diff --git a/compiler/testData/debug/stepping/compileTimeConstant.kt b/compiler/testData/debug/stepping/compileTimeConstant.kt index abef3d311ff..13807bbf186 100644 --- a/compiler/testData/debug/stepping/compileTimeConstant.kt +++ b/compiler/testData/debug/stepping/compileTimeConstant.kt @@ -6,11 +6,11 @@ fun box() { 42 } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:5 box // test.kt:7 box // EXPECTATIONS JS_IR // test.kt:6 box -// test.kt:7 box \ No newline at end of file +// test.kt:7 box diff --git a/compiler/testData/debug/stepping/conjunction.kt b/compiler/testData/debug/stepping/conjunction.kt index dc68240f5a7..cb15b1e5dda 100644 --- a/compiler/testData/debug/stepping/conjunction.kt +++ b/compiler/testData/debug/stepping/conjunction.kt @@ -19,7 +19,7 @@ fun getC() = false fun getD() = true -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:14 getA // test.kt:4 box diff --git a/compiler/testData/debug/stepping/constantConditions.kt b/compiler/testData/debug/stepping/constantConditions.kt index b738c6821cf..7b50c07d76d 100644 --- a/compiler/testData/debug/stepping/constantConditions.kt +++ b/compiler/testData/debug/stepping/constantConditions.kt @@ -15,11 +15,9 @@ fun test(): Long { return 1 } -// EXPECTATIONS JVM JVM_IR -// test.kt:6 box // EXPECTATIONS JVM_IR +// test.kt:6 box // test.kt:10 test -// EXPECTATIONS JVM JVM_IR // test.kt:11 test // test.kt:12 test // test.kt:6 box @@ -28,4 +26,4 @@ fun test(): Long { // EXPECTATIONS JS_IR // test.kt:6 box // test.kt:12 test -// test.kt:7 box \ No newline at end of file +// test.kt:7 box diff --git a/compiler/testData/debug/stepping/constructorCall.kt b/compiler/testData/debug/stepping/constructorCall.kt index 13d9ed04dc3..ddb9a6e8483 100644 --- a/compiler/testData/debug/stepping/constructorCall.kt +++ b/compiler/testData/debug/stepping/constructorCall.kt @@ -14,7 +14,7 @@ fun box() { 4) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:7 box // test.kt:4 // test.kt:7 box @@ -46,4 +46,4 @@ fun box() { // test.kt:13 box // test.kt:4 // test.kt:4 -// test.kt:15 box \ No newline at end of file +// test.kt:15 box diff --git a/compiler/testData/debug/stepping/constructors.kt b/compiler/testData/debug/stepping/constructors.kt index 711e2649ee2..9591f5a0017 100644 --- a/compiler/testData/debug/stepping/constructors.kt +++ b/compiler/testData/debug/stepping/constructors.kt @@ -75,17 +75,7 @@ class O(i: T) { } } -// JVM_IR consistently steps through constructor start line, constructor body constructor end line. -// JVM does not. The JVM behavior is unfortunate for instance for the L class above. Stepping through -// construction on the JVM will give the sequence 49, 52, 53, 49 which makes it unclear if the assignment -// on line 49 was carried out before or after the assignment in the init block. The JVM_IR sequence is -// 48, 52, 53, 54, 49, 50 which makes the sequence clear. - -// In addition JVM_IR consistently steps on the init line and on the init end brace. The line numbers -// are there in the class file fro JVM, but there is no guarantee that there is an instruction to -// step on and sometimes there is no step on the end brace. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:20 // test.kt:5 box @@ -99,78 +89,50 @@ class O(i: T) { // test.kt:26 // test.kt:8 box // test.kt:9 box -// EXPECTATIONS JVM_IR // test.kt:29 -// EXPECTATIONS JVM JVM_IR // test.kt:30 -// EXPECTATIONS JVM_IR // test.kt:31 -// EXPECTATIONS JVM JVM_IR // test.kt:9 box // test.kt:10 box -// EXPECTATIONS JVM_IR // test.kt:34 -// EXPECTATIONS JVM JVM_IR // test.kt:35 -// EXPECTATIONS JVM_IR // test.kt:36 -// EXPECTATIONS JVM JVM_IR // test.kt:10 box // test.kt:11 box // test.kt:38 // test.kt:39 // test.kt:40 // test.kt:41 -// EXPECTATIONS JVM_IR // test.kt:38 -// EXPECTATIONS JVM JVM_IR // test.kt:11 box // test.kt:12 box // test.kt:43 // test.kt:44 // test.kt:45 // test.kt:46 -// EXPECTATIONS JVM_IR // test.kt:43 -// EXPECTATIONS JVM JVM_IR // test.kt:12 box // test.kt:13 box -// EXPECTATIONS JVM -// test.kt:50 -// EXPECTATIONS JVM_IR // test.kt:49 -// EXPECTATIONS JVM JVM_IR // test.kt:53 // test.kt:54 -// EXPECTATIONS JVM_IR // test.kt:55 -// EXPECTATIONS JVM JVM_IR // test.kt:50 -// EXPECTATIONS JVM_IR // test.kt:51 -// EXPECTATIONS JVM JVM_IR // test.kt:13 box // test.kt:14 box // test.kt:58 // test.kt:62 -// EXPECTATIONS JVM_IR // test.kt:63 -// EXPECTATIONS JVM JVM_IR // test.kt:59 -// EXPECTATIONS JVM_IR // test.kt:60 -// EXPECTATIONS JVM JVM_IR // test.kt:14 box // test.kt:15 box // test.kt:66 // test.kt:70 -// EXPECTATIONS JVM_IR // test.kt:71 -// EXPECTATIONS JVM JVM_IR // test.kt:67 -// EXPECTATIONS JVM_IR // test.kt:68 -// EXPECTATIONS JVM JVM_IR // test.kt:15 box // test.kt:16 box // test.kt:73 @@ -178,11 +140,7 @@ class O(i: T) { // test.kt:17 box // test.kt:74 // test.kt:73 -// EXPECTATIONS JVM -// test.kt:74 -// EXPECTATIONS JVM_IR // test.kt:75 -// EXPECTATIONS JVM JVM_IR // test.kt:17 box // test.kt:18 box diff --git a/compiler/testData/debug/stepping/continue.kt b/compiler/testData/debug/stepping/continue.kt index f1b25a06356..5d67214b05b 100644 --- a/compiler/testData/debug/stepping/continue.kt +++ b/compiler/testData/debug/stepping/continue.kt @@ -16,7 +16,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:8 box // test.kt:9 box // test.kt:10 box diff --git a/compiler/testData/debug/stepping/dataClass.kt b/compiler/testData/debug/stepping/dataClass.kt index 2713d8be505..e25aa9b6cfb 100644 --- a/compiler/testData/debug/stepping/dataClass.kt +++ b/compiler/testData/debug/stepping/dataClass.kt @@ -25,7 +25,7 @@ fun box() { e.copy() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:14 box // test.kt:4 // test.kt:14 box diff --git a/compiler/testData/debug/stepping/defaultParameter.kt b/compiler/testData/debug/stepping/defaultParameter.kt index 117018b3f34..280aaa66e18 100644 --- a/compiler/testData/debug/stepping/defaultParameter.kt +++ b/compiler/testData/debug/stepping/defaultParameter.kt @@ -13,7 +13,7 @@ fun box() { } // FORCE_STEP_INTO -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:12 box // test.kt:4 // test.kt:12 box diff --git a/compiler/testData/debug/stepping/delegation.kt b/compiler/testData/debug/stepping/delegation.kt index 832d45533d8..da3bd836caf 100644 --- a/compiler/testData/debug/stepping/delegation.kt +++ b/compiler/testData/debug/stepping/delegation.kt @@ -18,12 +18,9 @@ fun box() { c.f() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:17 box // test.kt:14 -// EXPECTATIONS JVM -// test.kt:8 -// EXPECTATIONS JVM JVM_IR // test.kt:17 box // test.kt:18 box // test.kt:11 f diff --git a/compiler/testData/debug/stepping/enum.kt b/compiler/testData/debug/stepping/enum.kt index 5170d47230a..148a91af7c3 100644 --- a/compiler/testData/debug/stepping/enum.kt +++ b/compiler/testData/debug/stepping/enum.kt @@ -24,31 +24,16 @@ fun box() { E2.C; } -// JVM_IR maintains line number information in the class initializer for the -// initialization of the enum entries. There is line number information for -// the allocation of the object, for the evaluation of arguments to the -// constructor, and for the call to the constructor. This is consistent -// with the line number information generated for normal object allocation. - -// JVM has no line number information in if there are no arguments -// to the enum constructor. If there are arguments it has line number information -// for the evaluation of the arguments constructor and for the constructor call, -// but not for the allocation of the object. - -// EXPECTATIONS JVM JVM_IR -// test.kt:23 box // EXPECTATIONS JVM_IR +// test.kt:23 box // test.kt:5 // test.kt:6 -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:10 foo // test.kt:23 box // test.kt:24 box // test.kt:16 -// EXPECTATIONS JVM_IR // test.kt:17 -// EXPECTATIONS JVM JVM_IR // test.kt:18 // test.kt:17 // test.kt:25 box diff --git a/compiler/testData/debug/stepping/for.kt b/compiler/testData/debug/stepping/for.kt index e6bb41b9a9f..2575fe9462e 100644 --- a/compiler/testData/debug/stepping/for.kt +++ b/compiler/testData/debug/stepping/for.kt @@ -8,7 +8,7 @@ fun box() { inline fun foo(n: Int) {} -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:5 box // test.kt:9 box diff --git a/compiler/testData/debug/stepping/functionCallWithDefault.kt b/compiler/testData/debug/stepping/functionCallWithDefault.kt index e1e8e6cdf13..d4eeedf5ae6 100644 --- a/compiler/testData/debug/stepping/functionCallWithDefault.kt +++ b/compiler/testData/debug/stepping/functionCallWithDefault.kt @@ -13,7 +13,7 @@ inline fun bar(i: Int = 1) { } // FORCE_STEP_INTO -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:9 foo$default (synthetic) // test.kt:10 foo diff --git a/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt b/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt index 8a02fdf2c46..98d8645ff67 100644 --- a/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt +++ b/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt @@ -17,7 +17,7 @@ inline fun foo(f: () -> Unit) { f() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:16 box // test.kt:17 box diff --git a/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt b/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt index 0edc40502f8..7e8d808935f 100644 --- a/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt +++ b/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt @@ -15,7 +15,7 @@ fun foo(f: () -> Unit) { f() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:15 foo // test.kt:6 invoke @@ -41,4 +41,4 @@ fun foo(f: () -> Unit) { // test.kt:10 box$lambda // test.kt:11 box$lambda // test.kt:16 foo -// test.kt:12 box \ No newline at end of file +// test.kt:12 box diff --git a/compiler/testData/debug/stepping/functionInAnotherFile.kt b/compiler/testData/debug/stepping/functionInAnotherFile.kt index 305eea72be5..465ab20b2ea 100644 --- a/compiler/testData/debug/stepping/functionInAnotherFile.kt +++ b/compiler/testData/debug/stepping/functionInAnotherFile.kt @@ -2,10 +2,10 @@ // FILE: foo.kt import bar fun foo(x: Int): Int { - if (x >= 0) { // 4 - return x // 5 + if (x >= 0) { // 5 + return x // 6 } - return bar(x) // 7 + return bar(x) // 8 } // FILE: test.kt @@ -21,7 +21,7 @@ fun bar(x: Int) = foo(x) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:14 box // foo.kt:5 foo // foo.kt:8 foo @@ -44,4 +44,4 @@ fun bar(x: Int) = // foo.kt:5 foo // foo.kt:6 foo // test.kt:22 bar -// test.kt:15 box \ No newline at end of file +// test.kt:15 box diff --git a/compiler/testData/debug/stepping/if.kt b/compiler/testData/debug/stepping/if.kt index 0a24aebb9ed..8583007d9e2 100644 --- a/compiler/testData/debug/stepping/if.kt +++ b/compiler/testData/debug/stepping/if.kt @@ -15,7 +15,7 @@ inline fun getB(): Int { return 1 } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:15 box // test.kt:7 box diff --git a/compiler/testData/debug/stepping/if2.kt b/compiler/testData/debug/stepping/if2.kt index 95e5469e90c..bf606af8fb6 100644 --- a/compiler/testData/debug/stepping/if2.kt +++ b/compiler/testData/debug/stepping/if2.kt @@ -22,7 +22,7 @@ fun box() { foo(0) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:21 box // test.kt:5 foo // test.kt:6 foo diff --git a/compiler/testData/debug/stepping/ifThen.kt b/compiler/testData/debug/stepping/ifThen.kt index 15d3e7e30ee..7852dd4e474 100644 --- a/compiler/testData/debug/stepping/ifThen.kt +++ b/compiler/testData/debug/stepping/ifThen.kt @@ -15,7 +15,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:13 box // test.kt:5 foo // test.kt:6 foo @@ -33,4 +33,4 @@ fun box() { // test.kt:15 box // test.kt:5 foo // test.kt:8 foo -// test.kt:16 box \ No newline at end of file +// test.kt:16 box diff --git a/compiler/testData/debug/stepping/ifThenElse.kt b/compiler/testData/debug/stepping/ifThenElse.kt index 5d9146856c5..f17a6d684c6 100644 --- a/compiler/testData/debug/stepping/ifThenElse.kt +++ b/compiler/testData/debug/stepping/ifThenElse.kt @@ -23,7 +23,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:21 box // test.kt:5 foo // test.kt:6 foo @@ -55,4 +55,4 @@ fun box() { // test.kt:14 foo // test.kt:11 foo // test.kt:16 foo -// test.kt:24 box \ No newline at end of file +// test.kt:24 box diff --git a/compiler/testData/debug/stepping/ifThenElseFalse.kt b/compiler/testData/debug/stepping/ifThenElseFalse.kt index 23227f0fd2f..d0a6bc46ef8 100644 --- a/compiler/testData/debug/stepping/ifThenElseFalse.kt +++ b/compiler/testData/debug/stepping/ifThenElseFalse.kt @@ -18,7 +18,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:16 box // test.kt:9 foo // test.kt:6 cond @@ -48,4 +48,4 @@ fun box() { // test.kt:10 foo // test.kt:6 cond // test.kt:13 foo -// test.kt:19 box \ No newline at end of file +// test.kt:19 box diff --git a/compiler/testData/debug/stepping/ifWithInlineInCondition.kt b/compiler/testData/debug/stepping/ifWithInlineInCondition.kt index 1810577fac2..27f7ac7eba7 100644 --- a/compiler/testData/debug/stepping/ifWithInlineInCondition.kt +++ b/compiler/testData/debug/stepping/ifWithInlineInCondition.kt @@ -30,7 +30,7 @@ inline fun Boolean.rid(): Boolean = this fun nop() {} -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:25 box // test.kt:4 box diff --git a/compiler/testData/debug/stepping/iincStepping.kt b/compiler/testData/debug/stepping/iincStepping.kt index bf356efe106..4ddb392f46c 100644 --- a/compiler/testData/debug/stepping/iincStepping.kt +++ b/compiler/testData/debug/stepping/iincStepping.kt @@ -1,5 +1,5 @@ // IGNORE_BACKEND: WASM -// IGNORE_BACKEND: JVM + // FILE: test.kt fun box() { var i = 0 @@ -18,16 +18,7 @@ fun box() { 1 } -// The current backend has strange stepping behavior for assignments. -// It generates the line number for the assignment first, and then -// the evaluation of the right hand side with line numbers. -// That leads to the line number with the assignment typically -// not being hit at all as it has no instructions. Also, stepping -// through the evaluation of the right hand side and then hitting -// the line number for the actual assignment makes more sense as -// that is the actual evaluation order. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:7 box @@ -57,4 +48,4 @@ fun box() { // test.kt:13 box // test.kt:15 box // test.kt:17 box -// test.kt:19 box \ No newline at end of file +// test.kt:19 box diff --git a/compiler/testData/debug/stepping/implicitThis.kt b/compiler/testData/debug/stepping/implicitThis.kt index 87a725921f8..de604f872c7 100644 --- a/compiler/testData/debug/stepping/implicitThis.kt +++ b/compiler/testData/debug/stepping/implicitThis.kt @@ -28,14 +28,13 @@ class A { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:21 // test.kt:16 // test.kt:21 // test.kt:21 // test.kt:5 box - // test.kt:8 // test.kt:5 box // test.kt:11 test diff --git a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt index 6ab19977c6b..72d3dcc6fd6 100644 --- a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt +++ b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt @@ -17,14 +17,13 @@ fun test(b: B) { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:8 // test.kt:5 box // test.kt:10 // test.kt:5 box // test.kt:15 test - // test.kt:16 test // test.kt:10 getA // test.kt:16 test diff --git a/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt b/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt index deae9902a4f..d7a71060552 100644 --- a/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt +++ b/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt @@ -20,7 +20,7 @@ inline fun baz() { fun nop() {} -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:13 box // test.kt:21 nop diff --git a/compiler/testData/debug/stepping/initBlocks.kt b/compiler/testData/debug/stepping/initBlocks.kt index dccea6eb190..3c838aebd62 100644 --- a/compiler/testData/debug/stepping/initBlocks.kt +++ b/compiler/testData/debug/stepping/initBlocks.kt @@ -52,10 +52,7 @@ fun box() { Zoo() } -// JVM_IR has an extra step back to the line of the class -// declaration for the return in the constructor. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:49 box // test.kt:4 // test.kt:7 @@ -63,9 +60,7 @@ fun box() { // test.kt:46 x // test.kt:8 // test.kt:9 -// EXPECTATIONS JVM_IR // test.kt:4 -// EXPECTATIONS JVM JVM_IR // test.kt:49 box // test.kt:50 box // test.kt:12 @@ -75,9 +70,7 @@ fun box() { // test.kt:17 // test.kt:18 // test.kt:19 -// EXPECTATIONS JVM_IR // test.kt:12 -// EXPECTATIONS JVM JVM_IR // test.kt:50 box // test.kt:51 box // test.kt:22 @@ -90,9 +83,7 @@ fun box() { // test.kt:29 // test.kt:30 // test.kt:31 -// EXPECTATIONS JVM_IR // test.kt:22 -// EXPECTATIONS JVM JVM_IR // test.kt:51 box // test.kt:52 box // test.kt:34 @@ -102,9 +93,7 @@ fun box() { // test.kt:40 // test.kt:41 // test.kt:43 -// EXPECTATIONS JVM_IR // test.kt:34 -// EXPECTATIONS JVM JVM_IR // test.kt:52 box // test.kt:53 box @@ -129,4 +118,4 @@ fun box() { // test.kt:40 // test.kt:43 // test.kt:34 -// test.kt:53 box \ No newline at end of file +// test.kt:53 box diff --git a/compiler/testData/debug/stepping/initBlocksCompanion.kt b/compiler/testData/debug/stepping/initBlocksCompanion.kt index 2597e49576f..45f41c61ec4 100644 --- a/compiler/testData/debug/stepping/initBlocksCompanion.kt +++ b/compiler/testData/debug/stepping/initBlocksCompanion.kt @@ -31,7 +31,7 @@ fun box() { A.s } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:30 box // test.kt:8 // test.kt:9 @@ -63,4 +63,4 @@ fun box() { // test.kt:22 // test.kt:5 // test.kt:31 box -// test.kt:32 box \ No newline at end of file +// test.kt:32 box diff --git a/compiler/testData/debug/stepping/inlineCallableReference.kt b/compiler/testData/debug/stepping/inlineCallableReference.kt index 6e4f2182e9c..68bd47bd6f0 100644 --- a/compiler/testData/debug/stepping/inlineCallableReference.kt +++ b/compiler/testData/debug/stepping/inlineCallableReference.kt @@ -16,7 +16,7 @@ inline fun f(block: () -> Unit) { block() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:5 box // test.kt:16 box @@ -40,4 +40,4 @@ inline fun f(block: () -> Unit) { // test.kt:6 box // test.kt:9 box // test.kt:11 box -// test.kt:13 box \ No newline at end of file +// test.kt:13 box diff --git a/compiler/testData/debug/stepping/inlineNamedCallableReference.kt b/compiler/testData/debug/stepping/inlineNamedCallableReference.kt index fa50763de6f..23df92afaa0 100644 --- a/compiler/testData/debug/stepping/inlineNamedCallableReference.kt +++ b/compiler/testData/debug/stepping/inlineNamedCallableReference.kt @@ -11,7 +11,7 @@ inline fun f(block: () -> Unit) { fun g() {} -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:5 box // test.kt:9 box @@ -25,4 +25,4 @@ fun g() {} // test.kt:4 box // test.kt:5 box // test.kt:12 g -// test.kt:6 box \ No newline at end of file +// test.kt:6 box diff --git a/compiler/testData/debug/stepping/inlineSimpleCall.kt b/compiler/testData/debug/stepping/inlineSimpleCall.kt index 5a285a439b3..e0b42ac361f 100644 --- a/compiler/testData/debug/stepping/inlineSimpleCall.kt +++ b/compiler/testData/debug/stepping/inlineSimpleCall.kt @@ -24,7 +24,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:10 box // test.kt:6 box // test.kt:11 box diff --git a/compiler/testData/debug/stepping/kt15259.kt b/compiler/testData/debug/stepping/kt15259.kt index 266ec3dc4d0..1ec0b59c783 100644 --- a/compiler/testData/debug/stepping/kt15259.kt +++ b/compiler/testData/debug/stepping/kt15259.kt @@ -1,5 +1,5 @@ // IGNORE_BACKEND: WASM -// IGNORE_BACKEND: JVM_IR + // FILE: test.kt interface ObjectFace @@ -12,13 +12,12 @@ fun box() { makeFace() } -// IR backend has additional steps on the way _out_ of the init block. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:12 box // test.kt:6 makeFace // test.kt:6 // test.kt:8 +// test.kt:6 // test.kt:9 makeFace // test.kt:12 box // test.kt:13 box @@ -27,4 +26,4 @@ fun box() { // test.kt:12 box // test.kt:9 makeFace // test.kt:6 -// test.kt:13 box \ No newline at end of file +// test.kt:13 box diff --git a/compiler/testData/debug/stepping/kt29179.kt b/compiler/testData/debug/stepping/kt29179.kt index c3728975f09..ae0d4d59e1c 100644 --- a/compiler/testData/debug/stepping/kt29179.kt +++ b/compiler/testData/debug/stepping/kt29179.kt @@ -1,12 +1,12 @@ // IGNORE_BACKEND: WASM -// IGNORE_BACKEND: JVM_IR + // FILE: test.kt class A { val a = 1 fun bar() = 2 fun foo() { 3 - //Breakpoint! from the Evaluate Expression test suite. + .toString() } } @@ -15,12 +15,12 @@ fun box() { A().foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:15 box // test.kt:4 // test.kt:5 +// test.kt:4 // test.kt:15 box -// test.kt:8 foo // test.kt:10 foo // test.kt:11 foo // test.kt:16 box @@ -31,4 +31,4 @@ fun box() { // test.kt:4 // test.kt:15 box // test.kt:11 foo -// test.kt:16 box \ No newline at end of file +// test.kt:16 box diff --git a/compiler/testData/debug/stepping/kt42208.kt b/compiler/testData/debug/stepping/kt42208.kt index 306ff9d1d97..5f16a26a7e6 100644 --- a/compiler/testData/debug/stepping/kt42208.kt +++ b/compiler/testData/debug/stepping/kt42208.kt @@ -9,15 +9,14 @@ fun box() { // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa inline fun foo() = { } -// EXPECTATIONS JVM JVM_IR + +// EXPECTATIONS JVM_IR // test.kt:6 box // test1.kt:10 box // test1.kt:11 box -// EXPECTATIONS JVM_IR // test.kt:6 box // test1.kt:11 invoke // test.kt:6 box -// EXPECTATIONS JVM JVM_IR // test.kt:7 box // EXPECTATIONS JS_IR diff --git a/compiler/testData/debug/stepping/kt42208b.kt b/compiler/testData/debug/stepping/kt42208b.kt index 3abce71806f..286d1afbb9c 100644 --- a/compiler/testData/debug/stepping/kt42208b.kt +++ b/compiler/testData/debug/stepping/kt42208b.kt @@ -10,20 +10,15 @@ fun box() { // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa inline fun foo() = { } -// EXPECTATIONS JVM JVM_IR + +// EXPECTATIONS JVM_IR // test.kt:6 box // test1.kt:11 box // test1.kt:12 box -// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:7 box // test1.kt:12 invoke // test.kt:7 box -// EXPECTATIONS JVM_IR -// test.kt:8 box -// EXPECTATIONS JVM -// test.kt:6 box -// test.kt:7 box // test.kt:8 box // EXPECTATIONS JS_IR diff --git a/compiler/testData/debug/stepping/kt42208c.kt b/compiler/testData/debug/stepping/kt42208c.kt index 6ea36888693..55e515bad43 100644 --- a/compiler/testData/debug/stepping/kt42208c.kt +++ b/compiler/testData/debug/stepping/kt42208c.kt @@ -15,26 +15,23 @@ inline fun foo() = { fun baz(v:(() -> Unit)) { v() } -// EXPECTATIONS JVM JVM_IR + +// EXPECTATIONS JVM_IR // test.kt:6 box // test1.kt:12 box // test1.kt:13 box // test.kt:6 box // test3.kt:16 baz -// EXPECTATIONS JVM_IR // test1.kt:13 invoke // test3.kt:16 baz -// EXPECTATIONS JVM JVM_IR // test3.kt:17 baz // test.kt:7 box // test1.kt:12 box // test1.kt:13 box // test.kt:7 box // test.kt:8 box -// EXPECTATIONS JVM_IR // test3.kt:16 baz // test1.kt:13 invoke -// EXPECTATIONS JVM JVM_IR // test3.kt:16 baz // test3.kt:17 baz // test.kt:9 box diff --git a/compiler/testData/debug/stepping/lambdaStepInline.kt b/compiler/testData/debug/stepping/lambdaStepInline.kt index 4dbe05bc818..cd86081fa66 100644 --- a/compiler/testData/debug/stepping/lambdaStepInline.kt +++ b/compiler/testData/debug/stepping/lambdaStepInline.kt @@ -14,7 +14,7 @@ fun box(): String { return "OK" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:9 box // test.kt:5 box // test.kt:9 box diff --git a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt index ece03c6dabd..bed38a0cfce 100644 --- a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt +++ b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt @@ -17,7 +17,7 @@ fun box(): String { return "OK" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:15 box // test.kt:3 box // test.kt:4 box diff --git a/compiler/testData/debug/stepping/lineNumberAfterInline.kt b/compiler/testData/debug/stepping/lineNumberAfterInline.kt index 2d7ba5dbc60..1ce6577de2b 100644 --- a/compiler/testData/debug/stepping/lineNumberAfterInline.kt +++ b/compiler/testData/debug/stepping/lineNumberAfterInline.kt @@ -24,7 +24,7 @@ fun box() { test2() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:23 box // test.kt:13 test1 // test.kt:9 test1 @@ -46,4 +46,4 @@ fun box() { // test.kt:18 test2 // test.kt:6 normalFunction // test.kt:20 test2 -// test.kt:25 box \ No newline at end of file +// test.kt:25 box diff --git a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt index a2f8f4ac5fa..fe87187a0bb 100644 --- a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt +++ b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt @@ -13,7 +13,7 @@ inline fun lookAtMe(f: (String) -> Unit) { f(a) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:12 box // test.kt:13 box diff --git a/compiler/testData/debug/stepping/localFunction.kt b/compiler/testData/debug/stepping/localFunction.kt index c85f649c025..b09605059dd 100644 --- a/compiler/testData/debug/stepping/localFunction.kt +++ b/compiler/testData/debug/stepping/localFunction.kt @@ -12,20 +12,12 @@ fun box() { "OK" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box -// EXPECTATIONS JVM -// test.kt:7 box -// EXPECTATIONS JVM JVM_IR // test.kt:10 box // test.kt:11 box -// EXPECTATIONS JVM -// test.kt:8 invoke -// test.kt:9 invoke -// EXPECTATIONS JVM_IR // test.kt:8 box$bar // test.kt:9 box$bar -// EXPECTATIONS JVM JVM_IR // test.kt:12 box // test.kt:13 box diff --git a/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt b/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt index edc2bad9645..74ab8bcc598 100644 --- a/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt +++ b/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt @@ -10,18 +10,11 @@ fun box() { "OK" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box -// EXPECTATIONS JVM -// test.kt:7 box -// EXPECTATIONS JVM JVM_IR // test.kt:8 box // test.kt:9 box -// EXPECTATIONS JVM -// test.kt:7 invoke -// EXPECTATIONS JVM_IR // test.kt:7 box$bar -// EXPECTATIONS JVM JVM_IR // test.kt:9 box // test.kt:10 box // test.kt:11 box diff --git a/compiler/testData/debug/stepping/localProperty.kt b/compiler/testData/debug/stepping/localProperty.kt index 1d523085521..4d04b824c75 100644 --- a/compiler/testData/debug/stepping/localProperty.kt +++ b/compiler/testData/debug/stepping/localProperty.kt @@ -14,8 +14,7 @@ fun box(): String { return o + k } -// EXPECTATIONS JVM JVM_IR - +// EXPECTATIONS JVM_IR // test.kt:9 box // test.kt:7 box // test.kt:12 box diff --git a/compiler/testData/debug/stepping/multiModule.kt b/compiler/testData/debug/stepping/multiModule.kt index 9a6cefe9796..cdfa6e05f93 100644 --- a/compiler/testData/debug/stepping/multiModule.kt +++ b/compiler/testData/debug/stepping/multiModule.kt @@ -16,7 +16,7 @@ fun box() { b() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:15 box // a.kt:5 a // test.kt:15 box @@ -30,4 +30,4 @@ fun box() { // a.kt:5 a // test.kt:16 box // b.kt:9 b -// test.kt:17 box \ No newline at end of file +// test.kt:17 box diff --git a/compiler/testData/debug/stepping/multilineExpression.kt b/compiler/testData/debug/stepping/multilineExpression.kt index b431d87dc60..4e061cde88d 100644 --- a/compiler/testData/debug/stepping/multilineExpression.kt +++ b/compiler/testData/debug/stepping/multilineExpression.kt @@ -12,12 +12,10 @@ fun test(a: Boolean, b: Boolean, c: Boolean): Boolean { && c } -// EXPECTATIONS JVM JVM_IR -// test.kt:6 box // EXPECTATIONS JVM_IR +// test.kt:6 box // test.kt:10 test // test.kt:11 test -// EXPECTATIONS JVM JVM_IR // test.kt:12 test // test.kt:10 test // test.kt:6 box @@ -26,4 +24,4 @@ fun test(a: Boolean, b: Boolean, c: Boolean): Boolean { // EXPECTATIONS JS_IR // test.kt:6 box // test.kt:10 test -// test.kt:7 box \ No newline at end of file +// test.kt:7 box diff --git a/compiler/testData/debug/stepping/multilineFunctionCall.kt b/compiler/testData/debug/stepping/multilineFunctionCall.kt index 985ad0be1e7..f16f3896cfe 100644 --- a/compiler/testData/debug/stepping/multilineFunctionCall.kt +++ b/compiler/testData/debug/stepping/multilineFunctionCall.kt @@ -10,7 +10,7 @@ fun box() { fun foo(i: Int) { } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:5 box // test.kt:11 foo @@ -19,4 +19,4 @@ fun foo(i: Int) { // EXPECTATIONS JS_IR // test.kt:5 box // test.kt:11 foo -// test.kt:8 box \ No newline at end of file +// test.kt:8 box diff --git a/compiler/testData/debug/stepping/multilineInfixCall.kt b/compiler/testData/debug/stepping/multilineInfixCall.kt index d53129b7c1d..8584988e9ce 100644 --- a/compiler/testData/debug/stepping/multilineInfixCall.kt +++ b/compiler/testData/debug/stepping/multilineInfixCall.kt @@ -9,7 +9,7 @@ fun box() { infix fun Int.foo(i: Int) { } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:5 box @@ -19,4 +19,4 @@ infix fun Int.foo(i: Int) { // EXPECTATIONS JS_IR // test.kt:5 box // test.kt:10 foo -// test.kt:7 box \ No newline at end of file +// test.kt:7 box diff --git a/compiler/testData/debug/stepping/namedCallableReference.kt b/compiler/testData/debug/stepping/namedCallableReference.kt index 6d9307a0be5..a2120a58ec4 100644 --- a/compiler/testData/debug/stepping/namedCallableReference.kt +++ b/compiler/testData/debug/stepping/namedCallableReference.kt @@ -11,19 +11,11 @@ fun f(block: () -> Unit) { fun g() {} -// The synthetic invoke bridge method generated for in the callable reference has line numbers -// in the JVM_IR backend (as all bridges). In the JVM backend, only some bridges have line numbers. -// For some reason, when the bridge does not have line numbers, there is no method entry event -// for the invoke method bridged to. Therefore, the entry line number for invoke only shows -// up for JVM_IR. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:5 box // test.kt:9 f -// EXPECTATIONS JVM_IR // test.kt:5 invoke -// EXPECTATIONS JVM JVM_IR // test.kt:12 g // test.kt:5 invoke // test.kt:9 f diff --git a/compiler/testData/debug/stepping/nestedInline.kt b/compiler/testData/debug/stepping/nestedInline.kt index c5f019703c1..66ec14ce17c 100644 --- a/compiler/testData/debug/stepping/nestedInline.kt +++ b/compiler/testData/debug/stepping/nestedInline.kt @@ -42,7 +42,7 @@ inline fun html(init: () -> Unit) { return init(init) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:20 box // test.kt:8 box // test.kt:10 box diff --git a/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt b/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt index 0a247b61a92..3b5be4af012 100644 --- a/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt +++ b/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt @@ -23,7 +23,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:18 box // test.kt:10 builder // Continuation.kt:66 diff --git a/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt b/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt index 7e99eb626f3..3ad83e9b0a4 100644 --- a/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt +++ b/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt @@ -13,7 +13,7 @@ inline fun lookAtMe(f: () -> Int) { a + f() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:6 box // test.kt:12 box // test.kt:13 box diff --git a/compiler/testData/debug/stepping/nullcheck.kt b/compiler/testData/debug/stepping/nullcheck.kt index 2947e4f129f..e84ae0b8155 100644 --- a/compiler/testData/debug/stepping/nullcheck.kt +++ b/compiler/testData/debug/stepping/nullcheck.kt @@ -21,27 +21,6 @@ fun testExpressionBody(nullable: String?) = // Some comment nullable.length == 2 -// EXPECTATIONS JVM -// test.kt:7 box -// test.kt:16 test -// test.kt:14 test -// test.kt:7 box - -// test.kt:8 box -// test.kt:16 test -// test.kt:14 test -// test.kt:8 box - -// test.kt:9 box -// test.kt:22 testExpressionBody -// test.kt:9 box - -// test.kt:10 box -// test.kt:22 testExpressionBody -// test.kt:10 box - -// test.kt:11 box - // EXPECTATIONS JVM_IR // test.kt:7 box // test.kt:14 test @@ -76,4 +55,4 @@ fun testExpressionBody(nullable: String?) = // test.kt:22 testExpressionBody // test.kt:10 box // test.kt:22 testExpressionBody -// test.kt:11 box \ No newline at end of file +// test.kt:11 box diff --git a/compiler/testData/debug/stepping/overridenGetterSetter.kt b/compiler/testData/debug/stepping/overridenGetterSetter.kt index e1da4dfe004..082220178c4 100644 --- a/compiler/testData/debug/stepping/overridenGetterSetter.kt +++ b/compiler/testData/debug/stepping/overridenGetterSetter.kt @@ -34,14 +34,12 @@ fun box() { } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:31 box // test.kt:16 // test.kt:18 // test.kt:21 -// EXPECTATIONS JVM_IR // test.kt:16 -// EXPECTATIONS JVM JVM_IR // test.kt:31 box // test.kt:32 box // test.kt:16 testPropertyInInterface diff --git a/compiler/testData/debug/stepping/primitiveNullChecks.kt b/compiler/testData/debug/stepping/primitiveNullChecks.kt index 592349ff979..de0523f8174 100644 --- a/compiler/testData/debug/stepping/primitiveNullChecks.kt +++ b/compiler/testData/debug/stepping/primitiveNullChecks.kt @@ -7,7 +7,7 @@ fun box(): String { return "OK"!! } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:7 box diff --git a/compiler/testData/debug/stepping/propertyAccessor.kt b/compiler/testData/debug/stepping/propertyAccessor.kt index 2c21afca212..066308f68cb 100644 --- a/compiler/testData/debug/stepping/propertyAccessor.kt +++ b/compiler/testData/debug/stepping/propertyAccessor.kt @@ -12,7 +12,7 @@ fun box() { A().prop } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:12 box // test.kt:4 // test.kt:12 box @@ -25,4 +25,4 @@ fun box() { // test.kt:4 // test.kt:12 box // test.kt:7 -// test.kt:13 box \ No newline at end of file +// test.kt:13 box diff --git a/compiler/testData/debug/stepping/psvm.kt b/compiler/testData/debug/stepping/psvm.kt index def9e456bf4..d74e3f551dd 100644 --- a/compiler/testData/debug/stepping/psvm.kt +++ b/compiler/testData/debug/stepping/psvm.kt @@ -9,7 +9,7 @@ fun box() { main(arrayOf("OK")) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:9 box // test.kt:5 main // test.kt:6 main @@ -19,4 +19,4 @@ fun box() { // test.kt:9 box // test.kt:5 main // test.kt:6 main -// test.kt:10 box \ No newline at end of file +// test.kt:10 box diff --git a/compiler/testData/debug/stepping/recursion.kt b/compiler/testData/debug/stepping/recursion.kt index 61548d0ecd5..336d538a2f8 100644 --- a/compiler/testData/debug/stepping/recursion.kt +++ b/compiler/testData/debug/stepping/recursion.kt @@ -12,7 +12,7 @@ fun foo(n :Int ) : Int { return foo(n-1) * n } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:5 box // test.kt:9 foo @@ -37,4 +37,4 @@ fun foo(n :Int ) : Int { // test.kt:10 foo // test.kt:12 foo // test.kt:12 foo -// test.kt:6 box \ No newline at end of file +// test.kt:6 box diff --git a/compiler/testData/debug/stepping/simpleDefaultArg.kt b/compiler/testData/debug/stepping/simpleDefaultArg.kt index 8f7e110e0c0..2249e15cd46 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArg.kt @@ -10,7 +10,7 @@ fun box(): String { } // FORCE_STEP_INTO -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:9 box // test.kt:4 ifoo$default (synthetic) // test.kt:5 ifoo @@ -18,4 +18,4 @@ fun box(): String { // test.kt:9 box // EXPECTATIONS JS_IR -// test.kt:9 box \ No newline at end of file +// test.kt:9 box diff --git a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt index 0867db08b99..2b81188804a 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt @@ -16,7 +16,7 @@ fun box(): String { } // FORCE_STEP_INTO -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:14 box // test.kt:5 box // test.kt:6 box diff --git a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt index b823f1dd894..1367331454f 100644 --- a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt @@ -11,30 +11,11 @@ fun box(): String { return ifoo() } -// `alsoInline` is inlined in the `ifoo$default` stub. When exiting the inline -// codegen, the line number is reset. Therefore any code generated with line -// number information will emit a new line number so that stepping continues -// in the caller. -// -// For JVM none of the code after `alsoInline` leads to line number generation. -// This seems problematic as the line number for the inline function is then -// in effect for instructions outside the scope of the `$i$f$alsoInline` -// variable life time. -// -// For JVM_IR a line number is generated for the code following `alsoInline`. -// Therefore, we stop on line 5 before entering `alsoInline` -// and we step back to line 5 after `alsoInline` and before the body of -// `ifoo`. This seems reasonable and also help ensure that line numbers -// for the inline function are only used for instructions covered by -// the `$i$f$alsoInline` variable life time. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:11 box // test.kt:6 box // test.kt:4 box -// EXPECTATIONS JVM_IR // test.kt:6 box -// EXPECTATIONS JVM JVM_IR // test.kt:7 box // test.kt:11 box diff --git a/compiler/testData/debug/stepping/simpleSmap.kt b/compiler/testData/debug/stepping/simpleSmap.kt index 995fa9584cf..054202e4e38 100644 --- a/compiler/testData/debug/stepping/simpleSmap.kt +++ b/compiler/testData/debug/stepping/simpleSmap.kt @@ -13,7 +13,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:11 box // test.kt:7 box // test.kt:12 box diff --git a/compiler/testData/debug/stepping/smapInlineAsArgument.kt b/compiler/testData/debug/stepping/smapInlineAsArgument.kt index dc2bfbc9067..c1bd8c80b9c 100644 --- a/compiler/testData/debug/stepping/smapInlineAsArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsArgument.kt @@ -21,7 +21,7 @@ fun fail() : String { return "fail" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:17 box // test.kt:6 box diff --git a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt index a341067d82f..295cbb3d731 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt @@ -19,7 +19,7 @@ fun fail() : String { return "fail" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:7 box // test.kt:15 box // test.kt:8 box diff --git a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt index 73603465547..d8b60589335 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt @@ -21,7 +21,7 @@ fun fail() : String { return "fail" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:17 box // test.kt:6 box diff --git a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt index 314c2766c63..8c206bc0a59 100644 --- a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt @@ -1,5 +1,5 @@ // IGNORE_BACKEND: WASM -// IGNORE_BACKEND: JVM + // FILE: test.kt fun box(){ test() + @@ -17,12 +17,7 @@ fun fail() : String { return "fail" } -// The JVM backend does not go back to line 4 and 7 for the -// addition. Instead it treats the addition of the evaluated -// arguments as being on line 5 and 8. That seems incorrect -// and the JVM_IR stepping is more correct. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:13 box // test.kt:5 box diff --git a/compiler/testData/debug/stepping/stringSwitches.kt b/compiler/testData/debug/stepping/stringSwitches.kt index e5d4af817e7..96cc4799322 100644 --- a/compiler/testData/debug/stepping/stringSwitches.kt +++ b/compiler/testData/debug/stepping/stringSwitches.kt @@ -33,16 +33,7 @@ fun box() { stringSwitch("nope") } -// JVM_IR uses the line number of the start of the `when` as the line number -// for the lookup/table switch. Therefore when the subject and the when is -// on separate lines the first step is on the subject, then steop to the when, -// then to the right branch. - -// JVM_IR uses optimized lookup/table switches for all these cases. JVM -// does not. So on JVM there are steps on each condition evaluation for -// the first `when`. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:30 box // test.kt:5 stringSwitch // test.kt:6 stringSwitch @@ -51,63 +42,43 @@ fun box() { // test.kt:13 stringSwitch // test.kt:12 stringSwitch // test.kt:20 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:19 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:22 stringSwitch // test.kt:19 stringSwitch // test.kt:27 stringSwitch // test.kt:31 box // test.kt:5 stringSwitch -// EXPECTATIONS JVM -// test.kt:6 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:7 stringSwitch // test.kt:5 stringSwitch // test.kt:12 stringSwitch // test.kt:14 stringSwitch // test.kt:12 stringSwitch // test.kt:20 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:19 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:23 stringSwitch // test.kt:19 stringSwitch // test.kt:27 stringSwitch // test.kt:32 box // test.kt:5 stringSwitch -// EXPECTATIONS JVM -// test.kt:6 stringSwitch -// test.kt:7 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:8 stringSwitch // test.kt:5 stringSwitch // test.kt:12 stringSwitch // test.kt:15 stringSwitch // test.kt:12 stringSwitch // test.kt:20 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:19 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:24 stringSwitch // test.kt:19 stringSwitch // test.kt:27 stringSwitch // test.kt:33 box // test.kt:5 stringSwitch -// EXPECTATIONS JVM -// test.kt:6 stringSwitch -// test.kt:7 stringSwitch -// test.kt:8 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:9 stringSwitch // test.kt:5 stringSwitch // test.kt:12 stringSwitch // test.kt:16 stringSwitch // test.kt:12 stringSwitch // test.kt:20 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:19 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:25 stringSwitch // test.kt:19 stringSwitch // test.kt:27 stringSwitch diff --git a/compiler/testData/debug/stepping/stringSwitchesSmall.kt b/compiler/testData/debug/stepping/stringSwitchesSmall.kt index 5ef52e073a1..282835deb54 100644 --- a/compiler/testData/debug/stepping/stringSwitchesSmall.kt +++ b/compiler/testData/debug/stepping/stringSwitchesSmall.kt @@ -29,16 +29,7 @@ fun box() { stringSwitch("nope") } -// JVM_IR uses the line number of the start of the `when` as the line number -// for the lookup/table switch. Therefore when the subject and the when is -// on separate lines the first step is on the subject, then steop to the when, -// then to the right branch. - -// JVM_IR uses unoptimized lookup/table switches for all these cases. JVM -// does not. So on JVM there are direct jumps to the right branch for the -// last two whens. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:27 box // test.kt:5 stringSwitch // test.kt:6 stringSwitch @@ -47,9 +38,7 @@ fun box() { // test.kt:12 stringSwitch // test.kt:11 stringSwitch // test.kt:18 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:17 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:20 stringSwitch // test.kt:17 stringSwitch // test.kt:24 stringSwitch @@ -59,16 +48,12 @@ fun box() { // test.kt:7 stringSwitch // test.kt:5 stringSwitch // test.kt:11 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:12 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:13 stringSwitch // test.kt:11 stringSwitch // test.kt:18 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:17 stringSwitch // test.kt:20 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:21 stringSwitch // test.kt:17 stringSwitch // test.kt:24 stringSwitch @@ -79,18 +64,14 @@ fun box() { // test.kt:8 stringSwitch // test.kt:5 stringSwitch // test.kt:11 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:12 stringSwitch // test.kt:13 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:14 stringSwitch // test.kt:11 stringSwitch // test.kt:18 stringSwitch -// EXPECTATIONS JVM_IR // test.kt:17 stringSwitch // test.kt:20 stringSwitch // test.kt:21 stringSwitch -// EXPECTATIONS JVM JVM_IR // test.kt:22 stringSwitch // test.kt:17 stringSwitch // test.kt:24 stringSwitch diff --git a/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt b/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt index 2a277f61078..abfac99b5e9 100644 --- a/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt +++ b/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt @@ -11,7 +11,7 @@ suspend fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:9 box // test.kt:5 foo // test.kt:10 invoke diff --git a/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt b/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt index f8d555abdb0..2980869cc8e 100644 --- a/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt +++ b/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt @@ -17,7 +17,7 @@ suspend fun box() { // That means that we never step into the lambda as that is only // called via code in the kotlin package. -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:10 box // test.kt:6 foo // test.kt:10 box diff --git a/compiler/testData/debug/stepping/throwException.kt b/compiler/testData/debug/stepping/throwException.kt index 6b90cc343b6..078fba52256 100644 --- a/compiler/testData/debug/stepping/throwException.kt +++ b/compiler/testData/debug/stepping/throwException.kt @@ -15,7 +15,8 @@ fun throwIfLess(a: Int, b: Int) { if (a // test.kt:15 box @@ -56,4 +56,4 @@ fun box() { // test.kt:16 box // test.kt:8 bar // test.kt:5 foo -// test.kt:17 box \ No newline at end of file +// test.kt:17 box diff --git a/compiler/testData/debug/stepping/tryCatch.kt b/compiler/testData/debug/stepping/tryCatch.kt index f736e457bb3..26d98e9e4ea 100644 --- a/compiler/testData/debug/stepping/tryCatch.kt +++ b/compiler/testData/debug/stepping/tryCatch.kt @@ -15,7 +15,7 @@ fun box() { foo(true) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:14 box // test.kt:5 foo // test.kt:6 foo diff --git a/compiler/testData/debug/stepping/tryCatchExpression.kt b/compiler/testData/debug/stepping/tryCatchExpression.kt index c1d99e107c6..8e08267b993 100644 --- a/compiler/testData/debug/stepping/tryCatchExpression.kt +++ b/compiler/testData/debug/stepping/tryCatchExpression.kt @@ -48,7 +48,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:42 box // test.kt:5 foo // test.kt:6 foo diff --git a/compiler/testData/debug/stepping/tryCatchFinally.kt b/compiler/testData/debug/stepping/tryCatchFinally.kt index d9d50a72901..8a9ba6d893f 100644 --- a/compiler/testData/debug/stepping/tryCatchFinally.kt +++ b/compiler/testData/debug/stepping/tryCatchFinally.kt @@ -38,7 +38,7 @@ fun box() { foo() } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:34 box // test.kt:5 foo // test.kt:6 foo diff --git a/compiler/testData/debug/stepping/tryFinally.kt b/compiler/testData/debug/stepping/tryFinally.kt index 7186d1fa2c4..8fc3f0af30d 100644 --- a/compiler/testData/debug/stepping/tryFinally.kt +++ b/compiler/testData/debug/stepping/tryFinally.kt @@ -35,12 +35,7 @@ fun box() { foo() } -// The JVM backend steps back to line 11 when leaving the -// `mightThrow2` call. The JVM_IR backend does not. The -// JVM_IR behavior is consistent with what happens for the -// try-finally where the value is discarded which seems good. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:30 box // test.kt:5 foo // test.kt:6 foo @@ -52,9 +47,6 @@ fun box() { // test.kt:12 foo // test.kt:26 mightThrow2 // test.kt:27 mightThrow2 -// EXPECTATIONS JVM -// test.kt:12 foo -// EXPECTATIONS JVM JVM_IR // test.kt:14 foo // test.kt:15 foo // test.kt:11 foo @@ -70,10 +62,6 @@ fun box() { // test.kt:11 foo // test.kt:12 foo // test.kt:26 mightThrow2 -// EXPECTATIONS JVM -// test.kt:15 foo -// test.kt:11 foo -// EXPECTATIONS JVM_IR // test.kt:14 foo // EXPECTATIONS JS_IR @@ -93,4 +81,4 @@ fun box() { // test.kt:23 mightThrow // test.kt:12 foo // test.kt:26 mightThrow2 -// test.kt:26 mightThrow2 \ No newline at end of file +// test.kt:26 mightThrow2 diff --git a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt index a4ec03d5a2d..cd350114399 100644 --- a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt +++ b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt @@ -12,12 +12,7 @@ fun box() { } } -// The JVM IR backend does generate line number information for the -// declaration of local variables without initializer. -// Stepping through those is useful for breakpoinnts. -// The JVM backend does generate these line numbers as well. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:7 box @@ -32,4 +27,4 @@ fun box() { // test.kt:9 box // test.kt:10 box // test.kt:11 box -// test.kt:13 box \ No newline at end of file +// test.kt:13 box diff --git a/compiler/testData/debug/stepping/voidLambdaStepInline.kt b/compiler/testData/debug/stepping/voidLambdaStepInline.kt index 7eb9f8e5bbd..02dd8bbd69a 100644 --- a/compiler/testData/debug/stepping/voidLambdaStepInline.kt +++ b/compiler/testData/debug/stepping/voidLambdaStepInline.kt @@ -9,7 +9,7 @@ fun box(): String { return "OK" } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // fake.kt:1 box // test.kt:5 box diff --git a/compiler/testData/debug/stepping/when.kt b/compiler/testData/debug/stepping/when.kt index 9f47fdff4d8..8d460bb68e2 100644 --- a/compiler/testData/debug/stepping/when.kt +++ b/compiler/testData/debug/stepping/when.kt @@ -19,51 +19,24 @@ fun box() { foo(21) } -// JVM_IR backend optimized the when to a switch in the java bytecode. -// Therefore, the stepping for JVM_IR does not step through the evaluation -// of each of the conditions, but goes directly to the right body. The -// JVM_IR stepping behavior here is the same as for `whenSubject.kt`. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:19 box // test.kt:5 foo // test.kt:6 foo // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// EXPECTATIONS JVM JVM_IR // test.kt:7 foo // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// test.kt:7 foo -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:11 foo -// EXPECTATIONS JVM -// test.kt:12 foo -// test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:14 foo // test.kt:11 foo // test.kt:16 foo // test.kt:7 foo // test.kt:11 foo -// EXPECTATIONS JVM -// test.kt:12 foo -// EXPECTATIONS JVM JVM_IR // test.kt:13 foo // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// test.kt:7 foo -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:11 foo -// EXPECTATIONS JVM -// test.kt:12 foo -// test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:14 foo // test.kt:11 foo // test.kt:16 foo @@ -74,41 +47,19 @@ fun box() { // test.kt:11 foo // test.kt:12 foo // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// EXPECTATIONS JVM JVM_IR // test.kt:7 foo // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// test.kt:7 foo -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:11 foo -// EXPECTATIONS JVM -// test.kt:12 foo -// test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:14 foo // test.kt:11 foo // test.kt:16 foo // test.kt:7 foo // test.kt:11 foo -// EXPECTATIONS JVM -// test.kt:12 foo -// EXPECTATIONS JVM JVM_IR // test.kt:13 foo // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// test.kt:7 foo -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:11 foo -// EXPECTATIONS JVM -// test.kt:12 foo -// test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:14 foo // test.kt:11 foo // test.kt:16 foo diff --git a/compiler/testData/debug/stepping/whenComplicatedSubject.kt b/compiler/testData/debug/stepping/whenComplicatedSubject.kt index 253e30eadf8..997b044f4ab 100644 --- a/compiler/testData/debug/stepping/whenComplicatedSubject.kt +++ b/compiler/testData/debug/stepping/whenComplicatedSubject.kt @@ -19,10 +19,7 @@ fun box() { foo(2) } -// The JVM_IR backend optimizes the inner when to a switch and therefore goes directly to the -// right case without stepping through evaluation of each condition. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:17 box // test.kt:6 foo // test.kt:7 foo @@ -31,18 +28,11 @@ fun box() { // test.kt:14 foo // test.kt:18 box // test.kt:6 foo -// EXPECTATIONS JVM -// test.kt:7 foo -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:5 foo // test.kt:14 foo // test.kt:19 box // test.kt:6 foo -// EXPECTATIONS JVM -// test.kt:7 foo -// test.kt:8 foo -// EXPECTATIONS JVM JVM_IR // test.kt:9 foo // test.kt:5 foo // test.kt:11 foo diff --git a/compiler/testData/debug/stepping/whenConstant.kt b/compiler/testData/debug/stepping/whenConstant.kt index 112e53fe489..b90c62a3884 100644 --- a/compiler/testData/debug/stepping/whenConstant.kt +++ b/compiler/testData/debug/stepping/whenConstant.kt @@ -12,14 +12,10 @@ fun box() { } } -// JVM_IR and JVM backends have different heuristics for when to use a switch. - -// EXPECTATIONS JVM JVM_IR -// test.kt:5 box // EXPECTATIONS JVM_IR +// test.kt:5 box // test.kt:6 box // test.kt:8 box -// EXPECTATIONS JVM JVM_IR // test.kt:11 box // test.kt:13 box diff --git a/compiler/testData/debug/stepping/whenExpr.kt b/compiler/testData/debug/stepping/whenExpr.kt index 636cb2df104..288de624e68 100644 --- a/compiler/testData/debug/stepping/whenExpr.kt +++ b/compiler/testData/debug/stepping/whenExpr.kt @@ -16,7 +16,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:7 box diff --git a/compiler/testData/debug/stepping/whenIsChecks.kt b/compiler/testData/debug/stepping/whenIsChecks.kt index 0d1765287f1..a2f1ed126de 100644 --- a/compiler/testData/debug/stepping/whenIsChecks.kt +++ b/compiler/testData/debug/stepping/whenIsChecks.kt @@ -18,7 +18,7 @@ fun box() { foo(1) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:16 box // test.kt:5 foo // test.kt:6 foo diff --git a/compiler/testData/debug/stepping/whenMultiLine.kt b/compiler/testData/debug/stepping/whenMultiLine.kt index 3f420736f0f..278ec518a8b 100644 --- a/compiler/testData/debug/stepping/whenMultiLine.kt +++ b/compiler/testData/debug/stepping/whenMultiLine.kt @@ -29,54 +29,27 @@ fun box() { foo(63) } -// JVM_IR backend optimized the when to a switch in the java bytecode. -// Therefore, the stepping for JVM_IR does not step through the evaluation -// of each of the conditions, but goes directly to the right body. -// JVM_IR stepping behavior here is the same as for `whenMultiLineSubject.kt`. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:27 box // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// EXPECTATIONS JVM JVM_IR // test.kt:7 foo // test.kt:14 foo -// EXPECTATIONS JVM -// test.kt:15 foo -// EXPECTATIONS JVM JVM_IR // test.kt:16 foo // test.kt:14 foo // test.kt:23 foo // test.kt:27 box // test.kt:28 box // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// test.kt:8 foo -// EXPECTATIONS JVM JVM_IR // test.kt:9 foo // test.kt:14 foo -// EXPECTATIONS JVM -// test.kt:15 foo -// test.kt:17 foo -// EXPECTATIONS JVM JVM_IR // test.kt:18 foo // test.kt:14 foo // test.kt:23 foo // test.kt:28 box // test.kt:29 box // test.kt:5 foo -// EXPECTATIONS JVM -// test.kt:6 foo -// test.kt:8 foo -// EXPECTATIONS JVM JVM_IR // test.kt:11 foo // test.kt:14 foo -// EXPECTATIONS JVM -// test.kt:15 foo -// test.kt:17 foo -// EXPECTATIONS JVM JVM_IR // test.kt:20 foo // test.kt:14 foo // test.kt:23 foo diff --git a/compiler/testData/debug/stepping/whenMultiLineSubject.kt b/compiler/testData/debug/stepping/whenMultiLineSubject.kt index c00474253fc..40d4018a1a3 100644 --- a/compiler/testData/debug/stepping/whenMultiLineSubject.kt +++ b/compiler/testData/debug/stepping/whenMultiLineSubject.kt @@ -29,7 +29,7 @@ fun box() { foo(63) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:27 box // test.kt:5 foo // test.kt:7 foo diff --git a/compiler/testData/debug/stepping/whenNullalbeSubject.kt b/compiler/testData/debug/stepping/whenNullalbeSubject.kt index d638d3085a5..552b20ae8ec 100644 --- a/compiler/testData/debug/stepping/whenNullalbeSubject.kt +++ b/compiler/testData/debug/stepping/whenNullalbeSubject.kt @@ -16,7 +16,7 @@ fun box() { } } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:7 box diff --git a/compiler/testData/debug/stepping/whenSubject.kt b/compiler/testData/debug/stepping/whenSubject.kt index cd49bf293db..0d6378eb3e3 100644 --- a/compiler/testData/debug/stepping/whenSubject.kt +++ b/compiler/testData/debug/stepping/whenSubject.kt @@ -19,7 +19,7 @@ fun box() { foo(21) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:19 box // test.kt:5 foo // test.kt:6 foo diff --git a/compiler/testData/debug/stepping/whenSubject2.kt b/compiler/testData/debug/stepping/whenSubject2.kt index d4fae7023f0..5c33439efdb 100644 --- a/compiler/testData/debug/stepping/whenSubject2.kt +++ b/compiler/testData/debug/stepping/whenSubject2.kt @@ -23,49 +23,31 @@ fun box() { foo(21) } -// JVM_IR uses the line number of the when for the table switch and therefore, -// it stops on the subject line first, then on the when line (line 4 and 12), and -// then goes to the right branch. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:23 box // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:8 foo // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:9 foo // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:10 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:18 foo // test.kt:13 foo // test.kt:20 foo // test.kt:9 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:17 foo // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:10 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:18 foo // test.kt:13 foo // test.kt:20 foo @@ -74,42 +56,28 @@ fun box() { // test.kt:20 foo // test.kt:8 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:16 foo // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:9 foo // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:10 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:18 foo // test.kt:13 foo // test.kt:20 foo // test.kt:9 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:17 foo // test.kt:6 foo -// EXPECTATIONS JVM_IR // test.kt:5 foo -// EXPECTATIONS JVM JVM_IR // test.kt:10 foo // test.kt:14 foo -// EXPECTATIONS JVM_IR // test.kt:13 foo -// EXPECTATIONS JVM JVM_IR // test.kt:18 foo // test.kt:13 foo // test.kt:20 foo diff --git a/compiler/testData/debug/stepping/whenWithInlineInCondition.kt b/compiler/testData/debug/stepping/whenWithInlineInCondition.kt index 28cfce48f1f..7d5cc59cf3a 100644 --- a/compiler/testData/debug/stepping/whenWithInlineInCondition.kt +++ b/compiler/testData/debug/stepping/whenWithInlineInCondition.kt @@ -28,23 +28,17 @@ inline fun Int.rid(): Int = this fun nop() {} -// JVM_IR generates an additional line number for the end of the condition, which is necessary for the correct "step over" behavior. - -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:4 box // test.kt:20 value // test.kt:4 box // test.kt:5 box // test.kt:6 box // test.kt:21 box -// EXPECTATIONS JVM_IR // test.kt:6 box -// EXPECTATIONS JVM JVM_IR // test.kt:7 box // test.kt:22 box -// EXPECTATIONS JVM_IR // test.kt:7 box -// EXPECTATIONS JVM JVM_IR // test.kt:8 box // test.kt:23 box // test.kt:8 box @@ -59,9 +53,7 @@ fun nop() {} // test.kt:21 box // test.kt:14 box // test.kt:27 box -// EXPECTATIONS JVM_IR // test.kt:14 box -// EXPECTATIONS JVM JVM_IR // test.kt:15 box // test.kt:22 box // test.kt:15 box diff --git a/compiler/testData/debug/stepping/while.kt b/compiler/testData/debug/stepping/while.kt index 791c373f0f2..9e16ef1c0e9 100644 --- a/compiler/testData/debug/stepping/while.kt +++ b/compiler/testData/debug/stepping/while.kt @@ -13,7 +13,7 @@ fun box() { } while (--x > 0) } -// EXPECTATIONS JVM JVM_IR +// EXPECTATIONS JVM_IR // test.kt:5 box // test.kt:6 box // test.kt:7 box @@ -36,4 +36,4 @@ fun box() { // test.kt:13 box // test.kt:13 box // test.kt:13 box -// test.kt:14 box \ No newline at end of file +// test.kt:14 box diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java deleted file mode 100644 index 8b5fcbdd75e..00000000000 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/SteppingTestGenerated.java +++ /dev/null @@ -1,651 +0,0 @@ -/* - * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.test.runners.codegen; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TargetBackend; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.jupiter.api.Nested; -import org.junit.jupiter.api.Test; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/debug/stepping") -@TestDataPath("$PROJECT_ROOT") -public class SteppingTestGenerated extends AbstractSteppingTest { - @Test - public void testAllFilesPresentInStepping() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); - } - - @Test - @TestMetadata("anonymousFunction.kt") - public void testAnonymousFunction() throws Exception { - runTest("compiler/testData/debug/stepping/anonymousFunction.kt"); - } - - @Test - @TestMetadata("anonymousFunctionDirect.kt") - public void testAnonymousFunctionDirect() throws Exception { - runTest("compiler/testData/debug/stepping/anonymousFunctionDirect.kt"); - } - - @Test - @TestMetadata("assertion.kt") - public void testAssertion() throws Exception { - runTest("compiler/testData/debug/stepping/assertion.kt"); - } - - @Test - @TestMetadata("beforeGotoToWhileStart.kt") - public void testBeforeGotoToWhileStart() throws Exception { - runTest("compiler/testData/debug/stepping/beforeGotoToWhileStart.kt"); - } - - @Test - @TestMetadata("callWithCallInArguments.kt") - public void testCallWithCallInArguments() throws Exception { - runTest("compiler/testData/debug/stepping/callWithCallInArguments.kt"); - } - - @Test - @TestMetadata("callWithReceiver.kt") - public void testCallWithReceiver() throws Exception { - runTest("compiler/testData/debug/stepping/callWithReceiver.kt"); - } - - @Test - @TestMetadata("callableReference.kt") - public void testCallableReference() throws Exception { - runTest("compiler/testData/debug/stepping/callableReference.kt"); - } - - @Test - @TestMetadata("chainCall.kt") - public void testChainCall() throws Exception { - runTest("compiler/testData/debug/stepping/chainCall.kt"); - } - - @Test - @TestMetadata("class.kt") - public void testClass() throws Exception { - runTest("compiler/testData/debug/stepping/class.kt"); - } - - @Test - @TestMetadata("classObject.kt") - public void testClassObject() throws Exception { - runTest("compiler/testData/debug/stepping/classObject.kt"); - } - - @Test - @TestMetadata("commentBeforeClass.kt") - public void testCommentBeforeClass() throws Exception { - runTest("compiler/testData/debug/stepping/commentBeforeClass.kt"); - } - - @Test - @TestMetadata("commentBeforeCompanionProperty.kt") - public void testCommentBeforeCompanionProperty() throws Exception { - runTest("compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt"); - } - - @Test - @TestMetadata("commentBeforeFunctionWithDefault.kt") - public void testCommentBeforeFunctionWithDefault() throws Exception { - runTest("compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt"); - } - - @Test - @TestMetadata("comments.kt") - public void testComments() throws Exception { - runTest("compiler/testData/debug/stepping/comments.kt"); - } - - @Test - @TestMetadata("compileTimeConstant.kt") - public void testCompileTimeConstant() throws Exception { - runTest("compiler/testData/debug/stepping/compileTimeConstant.kt"); - } - - @Test - @TestMetadata("conjunction.kt") - public void testConjunction() throws Exception { - runTest("compiler/testData/debug/stepping/conjunction.kt"); - } - - @Test - @TestMetadata("constantConditions.kt") - public void testConstantConditions() throws Exception { - runTest("compiler/testData/debug/stepping/constantConditions.kt"); - } - - @Test - @TestMetadata("constructorCall.kt") - public void testConstructorCall() throws Exception { - runTest("compiler/testData/debug/stepping/constructorCall.kt"); - } - - @Test - @TestMetadata("constructors.kt") - public void testConstructors() throws Exception { - runTest("compiler/testData/debug/stepping/constructors.kt"); - } - - @Test - @TestMetadata("continue.kt") - public void testContinue() throws Exception { - runTest("compiler/testData/debug/stepping/continue.kt"); - } - - @Test - @TestMetadata("dataClass.kt") - public void testDataClass() throws Exception { - runTest("compiler/testData/debug/stepping/dataClass.kt"); - } - - @Test - @TestMetadata("defaultParameter.kt") - public void testDefaultParameter() throws Exception { - runTest("compiler/testData/debug/stepping/defaultParameter.kt"); - } - - @Test - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/debug/stepping/delegation.kt"); - } - - @Test - @TestMetadata("enum.kt") - public void testEnum() throws Exception { - runTest("compiler/testData/debug/stepping/enum.kt"); - } - - @Test - @TestMetadata("for.kt") - public void testFor() throws Exception { - runTest("compiler/testData/debug/stepping/for.kt"); - } - - @Test - @TestMetadata("functionCallWithDefault.kt") - public void testFunctionCallWithDefault() throws Exception { - runTest("compiler/testData/debug/stepping/functionCallWithDefault.kt"); - } - - @Test - @TestMetadata("functionCallWithInlinedLambdaParam.kt") - public void testFunctionCallWithInlinedLambdaParam() throws Exception { - runTest("compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt"); - } - - @Test - @TestMetadata("functionCallWithLambdaParam.kt") - public void testFunctionCallWithLambdaParam() throws Exception { - runTest("compiler/testData/debug/stepping/functionCallWithLambdaParam.kt"); - } - - @Test - @TestMetadata("functionInAnotherFile.kt") - public void testFunctionInAnotherFile() throws Exception { - runTest("compiler/testData/debug/stepping/functionInAnotherFile.kt"); - } - - @Test - @TestMetadata("if.kt") - public void testIf() throws Exception { - runTest("compiler/testData/debug/stepping/if.kt"); - } - - @Test - @TestMetadata("if2.kt") - public void testIf2() throws Exception { - runTest("compiler/testData/debug/stepping/if2.kt"); - } - - @Test - @TestMetadata("ifThen.kt") - public void testIfThen() throws Exception { - runTest("compiler/testData/debug/stepping/ifThen.kt"); - } - - @Test - @TestMetadata("ifThenElse.kt") - public void testIfThenElse() throws Exception { - runTest("compiler/testData/debug/stepping/ifThenElse.kt"); - } - - @Test - @TestMetadata("ifThenElseFalse.kt") - public void testIfThenElseFalse() throws Exception { - runTest("compiler/testData/debug/stepping/ifThenElseFalse.kt"); - } - - @Test - @TestMetadata("IfTrueThenFalse.kt") - public void testIfTrueThenFalse() throws Exception { - runTest("compiler/testData/debug/stepping/IfTrueThenFalse.kt"); - } - - @Test - @TestMetadata("ifWithInlineInCondition.kt") - public void testIfWithInlineInCondition() throws Exception { - runTest("compiler/testData/debug/stepping/ifWithInlineInCondition.kt"); - } - - @Test - @TestMetadata("iincStepping.kt") - public void testIincStepping() throws Exception { - runTest("compiler/testData/debug/stepping/iincStepping.kt"); - } - - @Test - @TestMetadata("implicitThis.kt") - public void testImplicitThis() throws Exception { - runTest("compiler/testData/debug/stepping/implicitThis.kt"); - } - - @Test - @TestMetadata("implicitThisOnInvoke.kt") - public void testImplicitThisOnInvoke() throws Exception { - runTest("compiler/testData/debug/stepping/implicitThisOnInvoke.kt"); - } - - @Test - @TestMetadata("inTheEndOfLambdaArgumentOfInlineCall.kt") - public void testInTheEndOfLambdaArgumentOfInlineCall() throws Exception { - runTest("compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt"); - } - - @Test - @TestMetadata("initBlocks.kt") - public void testInitBlocks() throws Exception { - runTest("compiler/testData/debug/stepping/initBlocks.kt"); - } - - @Test - @TestMetadata("initBlocksCompanion.kt") - public void testInitBlocksCompanion() throws Exception { - runTest("compiler/testData/debug/stepping/initBlocksCompanion.kt"); - } - - @Test - @TestMetadata("inlineCallableReference.kt") - public void testInlineCallableReference() throws Exception { - runTest("compiler/testData/debug/stepping/inlineCallableReference.kt"); - } - - @Test - @TestMetadata("inlineNamedCallableReference.kt") - public void testInlineNamedCallableReference() throws Exception { - runTest("compiler/testData/debug/stepping/inlineNamedCallableReference.kt"); - } - - @Test - @TestMetadata("inlineSimpleCall.kt") - public void testInlineSimpleCall() throws Exception { - runTest("compiler/testData/debug/stepping/inlineSimpleCall.kt"); - } - - @Test - @TestMetadata("kt15259.kt") - public void testKt15259() throws Exception { - runTest("compiler/testData/debug/stepping/kt15259.kt"); - } - - @Test - @TestMetadata("kt29179.kt") - public void testKt29179() throws Exception { - runTest("compiler/testData/debug/stepping/kt29179.kt"); - } - - @Test - @TestMetadata("kt42208.kt") - public void testKt42208() throws Exception { - runTest("compiler/testData/debug/stepping/kt42208.kt"); - } - - @Test - @TestMetadata("kt42208b.kt") - public void testKt42208b() throws Exception { - runTest("compiler/testData/debug/stepping/kt42208b.kt"); - } - - @Test - @TestMetadata("kt42208c.kt") - public void testKt42208c() throws Exception { - runTest("compiler/testData/debug/stepping/kt42208c.kt"); - } - - @Test - @TestMetadata("lambdaStepInline.kt") - public void testLambdaStepInline() throws Exception { - runTest("compiler/testData/debug/stepping/lambdaStepInline.kt"); - } - - @Test - @TestMetadata("lambdaStepInlineWithDefaults.kt") - public void testLambdaStepInlineWithDefaults() throws Exception { - runTest("compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt"); - } - - @Test - @TestMetadata("lineNumberAfterInline.kt") - public void testLineNumberAfterInline() throws Exception { - runTest("compiler/testData/debug/stepping/lineNumberAfterInline.kt"); - } - - @Test - @TestMetadata("linenumberForOneParametersArgumentCall.kt") - public void testLinenumberForOneParametersArgumentCall() throws Exception { - runTest("compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt"); - } - - @Test - @TestMetadata("localFunction.kt") - public void testLocalFunction() throws Exception { - runTest("compiler/testData/debug/stepping/localFunction.kt"); - } - - @Test - @TestMetadata("localFunctionWIthOnelineExpressionBody.kt") - public void testLocalFunctionWIthOnelineExpressionBody() throws Exception { - runTest("compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt"); - } - - @Test - @TestMetadata("localProperty.kt") - public void testLocalProperty() throws Exception { - runTest("compiler/testData/debug/stepping/localProperty.kt"); - } - - @Test - @TestMetadata("multiModule.kt") - public void testMultiModule() throws Exception { - runTest("compiler/testData/debug/stepping/multiModule.kt"); - } - - @Test - @TestMetadata("multilineExpression.kt") - public void testMultilineExpression() throws Exception { - runTest("compiler/testData/debug/stepping/multilineExpression.kt"); - } - - @Test - @TestMetadata("multilineFunctionCall.kt") - public void testMultilineFunctionCall() throws Exception { - runTest("compiler/testData/debug/stepping/multilineFunctionCall.kt"); - } - - @Test - @TestMetadata("multilineInfixCall.kt") - public void testMultilineInfixCall() throws Exception { - runTest("compiler/testData/debug/stepping/multilineInfixCall.kt"); - } - - @Test - @TestMetadata("namedCallableReference.kt") - public void testNamedCallableReference() throws Exception { - runTest("compiler/testData/debug/stepping/namedCallableReference.kt"); - } - - @Test - @TestMetadata("nestedInline.kt") - public void testNestedInline() throws Exception { - runTest("compiler/testData/debug/stepping/nestedInline.kt"); - } - - @Test - @TestMetadata("noLinenumberInInvokeOfSuspendLambda.kt") - public void testNoLinenumberInInvokeOfSuspendLambda() throws Exception { - runTest("compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt"); - } - - @Test - @TestMetadata("noParametersArgumentCallInExpression.kt") - public void testNoParametersArgumentCallInExpression() throws Exception { - runTest("compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt"); - } - - @Test - @TestMetadata("nullcheck.kt") - public void testNullcheck() throws Exception { - runTest("compiler/testData/debug/stepping/nullcheck.kt"); - } - - @Test - @TestMetadata("overridenGetterSetter.kt") - public void testOverridenGetterSetter() throws Exception { - runTest("compiler/testData/debug/stepping/overridenGetterSetter.kt"); - } - - @Test - @TestMetadata("primitiveNullChecks.kt") - public void testPrimitiveNullChecks() throws Exception { - runTest("compiler/testData/debug/stepping/primitiveNullChecks.kt"); - } - - @Test - @TestMetadata("propertyAccessor.kt") - public void testPropertyAccessor() throws Exception { - runTest("compiler/testData/debug/stepping/propertyAccessor.kt"); - } - - @Test - @TestMetadata("psvm.kt") - public void testPsvm() throws Exception { - runTest("compiler/testData/debug/stepping/psvm.kt"); - } - - @Test - @TestMetadata("recursion.kt") - public void testRecursion() throws Exception { - runTest("compiler/testData/debug/stepping/recursion.kt"); - } - - @Test - @TestMetadata("simpleDefaultArg.kt") - public void testSimpleDefaultArg() throws Exception { - runTest("compiler/testData/debug/stepping/simpleDefaultArg.kt"); - } - - @Test - @TestMetadata("simpleDefaultArgWithInline.kt") - public void testSimpleDefaultArgWithInline() throws Exception { - runTest("compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt"); - } - - @Test - @TestMetadata("simpleInlineDefaultArg.kt") - public void testSimpleInlineDefaultArg() throws Exception { - runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt"); - } - - @Test - @TestMetadata("simpleSmap.kt") - public void testSimpleSmap() throws Exception { - runTest("compiler/testData/debug/stepping/simpleSmap.kt"); - } - - @Test - @TestMetadata("smapInlineAsArgument.kt") - public void testSmapInlineAsArgument() throws Exception { - runTest("compiler/testData/debug/stepping/smapInlineAsArgument.kt"); - } - - @Test - @TestMetadata("smapInlineAsInfixArgument.kt") - public void testSmapInlineAsInfixArgument() throws Exception { - runTest("compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt"); - } - - @Test - @TestMetadata("smapInlineAsInlineArgument.kt") - public void testSmapInlineAsInlineArgument() throws Exception { - runTest("compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt"); - } - - @Test - @TestMetadata("smapInlineInIntrinsicArgument.kt") - public void testSmapInlineInIntrinsicArgument() throws Exception { - runTest("compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt"); - } - - @Test - @TestMetadata("stringSwitches.kt") - public void testStringSwitches() throws Exception { - runTest("compiler/testData/debug/stepping/stringSwitches.kt"); - } - - @Test - @TestMetadata("stringSwitchesSmall.kt") - public void testStringSwitchesSmall() throws Exception { - runTest("compiler/testData/debug/stepping/stringSwitchesSmall.kt"); - } - - @Test - @TestMetadata("suspendFunWithLambdaParameter.kt") - public void testSuspendFunWithLambdaParameter() throws Exception { - runTest("compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt"); - } - - @Test - @TestMetadata("suspendFunWithSuspendLambdaParameter.kt") - public void testSuspendFunWithSuspendLambdaParameter() throws Exception { - runTest("compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt"); - } - - @Test - @TestMetadata("throwException.kt") - public void testThrowException() throws Exception { - runTest("compiler/testData/debug/stepping/throwException.kt"); - } - - @Test - @TestMetadata("topLevel.kt") - public void testTopLevel() throws Exception { - runTest("compiler/testData/debug/stepping/topLevel.kt"); - } - - @Test - @TestMetadata("trait.kt") - public void testTrait() throws Exception { - runTest("compiler/testData/debug/stepping/trait.kt"); - } - - @Test - @TestMetadata("tryCatch.kt") - public void testTryCatch() throws Exception { - runTest("compiler/testData/debug/stepping/tryCatch.kt"); - } - - @Test - @TestMetadata("tryCatchExpression.kt") - public void testTryCatchExpression() throws Exception { - runTest("compiler/testData/debug/stepping/tryCatchExpression.kt"); - } - - @Test - @TestMetadata("tryCatchFinally.kt") - public void testTryCatchFinally() throws Exception { - runTest("compiler/testData/debug/stepping/tryCatchFinally.kt"); - } - - @Test - @TestMetadata("tryFinally.kt") - public void testTryFinally() throws Exception { - runTest("compiler/testData/debug/stepping/tryFinally.kt"); - } - - @Test - @TestMetadata("variablesWithoutInitializer.kt") - public void testVariablesWithoutInitializer() throws Exception { - runTest("compiler/testData/debug/stepping/variablesWithoutInitializer.kt"); - } - - @Test - @TestMetadata("voidLambdaStepInline.kt") - public void testVoidLambdaStepInline() throws Exception { - runTest("compiler/testData/debug/stepping/voidLambdaStepInline.kt"); - } - - @Test - @TestMetadata("when.kt") - public void testWhen() throws Exception { - runTest("compiler/testData/debug/stepping/when.kt"); - } - - @Test - @TestMetadata("whenComplicatedSubject.kt") - public void testWhenComplicatedSubject() throws Exception { - runTest("compiler/testData/debug/stepping/whenComplicatedSubject.kt"); - } - - @Test - @TestMetadata("whenConstant.kt") - public void testWhenConstant() throws Exception { - runTest("compiler/testData/debug/stepping/whenConstant.kt"); - } - - @Test - @TestMetadata("whenExpr.kt") - public void testWhenExpr() throws Exception { - runTest("compiler/testData/debug/stepping/whenExpr.kt"); - } - - @Test - @TestMetadata("whenIsChecks.kt") - public void testWhenIsChecks() throws Exception { - runTest("compiler/testData/debug/stepping/whenIsChecks.kt"); - } - - @Test - @TestMetadata("whenMultiLine.kt") - public void testWhenMultiLine() throws Exception { - runTest("compiler/testData/debug/stepping/whenMultiLine.kt"); - } - - @Test - @TestMetadata("whenMultiLineSubject.kt") - public void testWhenMultiLineSubject() throws Exception { - runTest("compiler/testData/debug/stepping/whenMultiLineSubject.kt"); - } - - @Test - @TestMetadata("whenNullalbeSubject.kt") - public void testWhenNullalbeSubject() throws Exception { - runTest("compiler/testData/debug/stepping/whenNullalbeSubject.kt"); - } - - @Test - @TestMetadata("whenSubject.kt") - public void testWhenSubject() throws Exception { - runTest("compiler/testData/debug/stepping/whenSubject.kt"); - } - - @Test - @TestMetadata("whenSubject2.kt") - public void testWhenSubject2() throws Exception { - runTest("compiler/testData/debug/stepping/whenSubject2.kt"); - } - - @Test - @TestMetadata("whenWithInlineInCondition.kt") - public void testWhenWithInlineInCondition() throws Exception { - runTest("compiler/testData/debug/stepping/whenWithInlineInCondition.kt"); - } - - @Test - @TestMetadata("while.kt") - public void testWhile() throws Exception { - runTest("compiler/testData/debug/stepping/while.kt"); - } -} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt index becc9cc770b..981b301271e 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/DebugRunner.kt @@ -12,7 +12,6 @@ import com.sun.jdi.request.StepRequest import com.sun.tools.jdi.SocketAttachingConnector import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.model.FrontendKind -import org.jetbrains.kotlin.test.model.FrontendKinds import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.TestServices import org.jetbrains.kotlin.test.services.sourceProviders.MainFunctionForBlackBoxTestsSourceProvider.Companion.BOX_MAIN_FILE_NAME @@ -21,14 +20,13 @@ import java.io.File import java.net.URL abstract class DebugRunner(testServices: TestServices) : JvmBoxRunner(testServices) { - companion object { val BOX_MAIN_FILE_CLASS_NAME = BOX_MAIN_FILE_NAME.replace(".kt", "Kt") } - private var wholeFile = File("") - private var backend = TargetBackend.JVM - private var frontend: FrontendKind<*> = FrontendKinds.ClassicFrontend + private lateinit var wholeFile: File + private lateinit var backend: TargetBackend + private lateinit var frontend: FrontendKind<*> abstract fun storeStep(loggedItems: ArrayList, event: Event) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTest.kt index 44b14e6409d..17da9b0bff4 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTest.kt @@ -6,36 +6,30 @@ package org.jetbrains.kotlin.test.runners.codegen import org.jetbrains.kotlin.test.Constructor -import org.jetbrains.kotlin.test.TargetBackend -import org.jetbrains.kotlin.test.backend.classic.ClassicBackendInput -import org.jetbrains.kotlin.test.backend.classic.ClassicJvmBackendFacade -import org.jetbrains.kotlin.test.backend.ir.IrBackendInput -import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade -import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder import org.jetbrains.kotlin.test.FirParser -import org.jetbrains.kotlin.test.directives.configureFirParser +import org.jetbrains.kotlin.test.backend.ir.IrBackendInput +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives -import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2ClassicBackendConverter +import org.jetbrains.kotlin.test.directives.configureFirParser import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2IrConverter import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendOutputArtifact import org.jetbrains.kotlin.test.frontend.fir.Fir2IrJvmResultsConverter import org.jetbrains.kotlin.test.frontend.fir.FirFrontendFacade import org.jetbrains.kotlin.test.frontend.fir.FirOutputArtifact -import org.jetbrains.kotlin.test.model.* +import org.jetbrains.kotlin.test.model.Frontend2BackendConverter +import org.jetbrains.kotlin.test.model.FrontendFacade +import org.jetbrains.kotlin.test.model.FrontendKinds open class AbstractIrSteppingWithBytecodeInlinerTest( private val useIrInliner: Boolean = false -) : AbstractSteppingTestBase(FrontendKinds.ClassicFrontend, TargetBackend.JVM_IR) { +) : AbstractSteppingTestBase(FrontendKinds.ClassicFrontend) { override val frontendFacade: Constructor> get() = ::ClassicFrontendFacade override val frontendToBackendConverter: Constructor> get() = ::ClassicFrontend2IrConverter - override val backendFacade: Constructor> - get() = ::JvmIrBackendFacade - override fun configure(builder: TestConfigurationBuilder) { super.configure(builder) builder.configureDumpHandlersForCodegenTest() @@ -45,31 +39,10 @@ open class AbstractIrSteppingWithBytecodeInlinerTest( } } -open class AbstractIrSteppingWithIrInlinerTest : AbstractIrSteppingWithBytecodeInlinerTest(useIrInliner = true) {} +open class AbstractIrSteppingWithIrInlinerTest : AbstractIrSteppingWithBytecodeInlinerTest(useIrInliner = true) -open class AbstractSteppingTest : AbstractSteppingTestBase( - FrontendKinds.ClassicFrontend, - TargetBackend.JVM -) { - - override val frontendFacade: Constructor> - get() = ::ClassicFrontendFacade - - override val frontendToBackendConverter: Constructor> - get() = ::ClassicFrontend2ClassicBackendConverter - - override val backendFacade: Constructor> - get() = ::ClassicJvmBackendFacade - - override fun configure(builder: TestConfigurationBuilder) { - super.configure(builder) - builder.configureDumpHandlersForCodegenTest() - } -} - -open class AbstractFirSteppingTestBase(val parser: FirParser) : AbstractSteppingTestBase( - FrontendKinds.FIR, - TargetBackend.JVM_IR +open class AbstractFirSteppingTestBase(val parser: FirParser) : AbstractSteppingTestBase( + FrontendKinds.FIR ) { override val frontendFacade: Constructor> get() = ::FirFrontendFacade @@ -77,9 +50,6 @@ open class AbstractFirSteppingTestBase(val parser: FirParser) : AbstractStepping override val frontendToBackendConverter: Constructor> get() = ::Fir2IrJvmResultsConverter - override val backendFacade: Constructor> - get() = ::JvmIrBackendFacade - override fun configure(builder: TestConfigurationBuilder) { super.configure(builder) builder.configureDumpHandlersForCodegenTest() diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTestBase.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTestBase.kt index d36586e6dfb..0375faec059 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTestBase.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/codegen/AbstractSteppingTestBase.kt @@ -9,22 +9,25 @@ import org.jetbrains.kotlin.test.Constructor import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor import org.jetbrains.kotlin.test.backend.BlackBoxInlinerCodegenSuppressor +import org.jetbrains.kotlin.test.backend.ir.IrBackendInput +import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.REQUIRES_SEPARATE_PROCESS import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO -import org.jetbrains.kotlin.test.model.* +import org.jetbrains.kotlin.test.model.Frontend2BackendConverter +import org.jetbrains.kotlin.test.model.FrontendFacade +import org.jetbrains.kotlin.test.model.FrontendKind +import org.jetbrains.kotlin.test.model.ResultingArtifact import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest -abstract class AbstractSteppingTestBase, I : ResultingArtifact.BackendInput>( +abstract class AbstractSteppingTestBase>( val targetFrontend: FrontendKind, - targetBackend: TargetBackend -) : AbstractKotlinCompilerWithTargetBackendTest(targetBackend) { +) : AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) { abstract val frontendFacade: Constructor> - abstract val frontendToBackendConverter: Constructor> - abstract val backendFacade: Constructor> + abstract val frontendToBackendConverter: Constructor> override fun TestConfigurationBuilder.configuration() { - commonConfigurationForTest(targetFrontend, frontendFacade, frontendToBackendConverter, backendFacade) { + commonConfigurationForTest(targetFrontend, frontendFacade, frontendToBackendConverter, ::JvmIrBackendFacade) { commonServicesConfigurationForDebugTest(it) } diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index a81f56b31f8..6cdcd03e2ab 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -84,10 +84,6 @@ fun generateJUnit5CompilerTests(args: Array, mainClassName: String?) { model("codegen/box", excludeDirs = k2BoxTestDir) } - testClass { - model("debug/stepping") - } - testClass { model("debug/stepping") }