[JS IR] Improve the precision of execution of stepping tests

This commit is contained in:
Sergej Jaskiewicz
2022-08-02 18:42:12 +02:00
committed by Space
parent e08efa8e3b
commit 2ece4f4dbf
50 changed files with 16 additions and 106 deletions
-1
View File
@@ -18,4 +18,3 @@ fun box() {
// EXPECTATIONS JS_IR
// test.kt:5 box
// test.kt:2 cond
// test.kt:2 cond
-2
View File
@@ -20,5 +20,3 @@ fun box() {
// test.kt:6 box
// test.kt:3 eval_0
// test.kt:7 box$lambda
// test.kt:7 box$lambda
// test.kt:3 eval_0
@@ -18,4 +18,3 @@ fun box() {
// EXPECTATIONS JS_IR
// test.kt:4 box
// test.kt:5 box$lambda
// test.kt:5 box$lambda
@@ -40,9 +40,7 @@ fun box() {
// test.kt:12 foo
// test.kt:6 alternate
// test.kt:7 alternate
// test.kt:7 alternate
// test.kt:12 foo
// test.kt:6 alternate
// test.kt:7 alternate
// test.kt:7 alternate
// test.kt:13 foo
@@ -36,10 +36,7 @@ fun box() {
// test.kt:8 box
// test.kt:9 box
// test.kt:5 bar
// test.kt:10 box
// test.kt:5 bar
// test.kt:9 box
// test.kt:5 bar
// test.kt:5 bar
// test.kt:9 box
// test.kt:5 bar
// test.kt:5 bar
+1 -2
View File
@@ -29,7 +29,6 @@ fun box() {
// EXPECTATIONS JS_IR
// test.kt:9 box
// test.kt:10 box
// test.kt:4 A.foo_26di_k$
// test.kt:11 box
// test.kt:4 A.foo_26di_k$
// test.kt:5 box
+1 -3
View File
@@ -33,9 +33,7 @@ fun box() {
// test.kt:9 box
// test.kt:10 box
// test.kt:4 A.foo_26di_k$
// test.kt:4 A.foo_26di_k$
// test.kt:10 box
// test.kt:4 A.foo_26di_k$
// test.kt:11 box
// test.kt:4 A.foo_26di_k$
// test.kt:5 box
// test.kt:13 box
-1
View File
@@ -46,4 +46,3 @@ fun box() {
// test.kt:16 box
// test.kt:16 box
// test.kt:8 Companion_19.foo_26di_k$
// test.kt:8 Companion_19.foo_26di_k$
+1 -1
View File
@@ -11,4 +11,4 @@ fun box() {
// test.kt:6 box
// EXPECTATIONS JS_IR
// test.kt:4 box
// test.kt:5 box
@@ -27,4 +27,3 @@ fun test(): Long {
// EXPECTATIONS JS_IR
// test.kt:5 box
// test.kt:11 test
// test.kt:11 test
-13
View File
@@ -74,21 +74,16 @@ fun box() {
// test.kt:1 D.equals
// test.kt:1 D.equals
// test.kt:1 D.equals
// test.kt:1 D.equals
// test.kt:15 box
// test.kt:1 D.hashCode
// test.kt:1 D.hashCode
// test.kt:1 D.hashCode
// test.kt:16 box
// test.kt:1 D.toString
// test.kt:1 D.toString
// test.kt:17 box
// test.kt:17 box
// test.kt:1 D.component1_7eebsc_k$
// test.kt:1 D.component1_7eebsc_k$
// test.kt:17 box
// test.kt:1 D.component2_7eebsb_k$
// test.kt:1 D.component2_7eebsb_k$
// test.kt:18 box
// test.kt:1 D.copy$default_cbhffz_k$
// test.kt:1 D.copy$default_cbhffz_k$
@@ -98,8 +93,6 @@ fun box() {
// test.kt:1 D.copy_t8q04r_k$
// test.kt:3 D
// test.kt:3 D
// test.kt:1 D.copy_t8q04r_k$
// test.kt:1 D.copy$default_cbhffz_k$
// test.kt:19 box
// test.kt:5 E
// test.kt:5 E
@@ -108,22 +101,16 @@ fun box() {
// test.kt:5 E
// test.kt:20 box
// test.kt:7 E.equals
// test.kt:7 E.equals
// test.kt:21 box
// test.kt:8 E.hashCode
// test.kt:8 E.hashCode
// test.kt:22 box
// test.kt:6 E.toString
// test.kt:6 E.toString
// test.kt:23 box
// test.kt:23 box
// test.kt:1 E.component1_7eebsc_k$
// test.kt:1 E.component1_7eebsc_k$
// test.kt:23 box
// test.kt:1 E.component2_7eebsb_k$
// test.kt:1 E.component2_7eebsb_k$
// test.kt:24 box
// test.kt:9 E.copy_1tks5_k$
// test.kt:5 E
// test.kt:5 E
// test.kt:9 E.copy_1tks5_k$
-2
View File
@@ -29,6 +29,4 @@ fun box() {
// test.kt:6 A.foo$default_dec9f7_k$
// test.kt:6 A.foo$default_dec9f7_k$
// test.kt:4 A.computeParam_vubdyi_k$
// test.kt:4 A.computeParam_vubdyi_k$
// test.kt:6 A.foo$default_dec9f7_k$
// test.kt:6 A.foo$default_dec9f7_k$
-1
View File
@@ -58,7 +58,6 @@ fun box() {
// test.kt:11 E
// test.kt:22 box
// test.kt:9 E.foo_26di_k$
// test.kt:9 E.foo_26di_k$
// test.kt:15 E2_initEntries
// test.kt:14 E2
// test.kt:17 E2_initEntries
@@ -27,4 +27,3 @@ inline fun bar(i: Int = 1) {
// test.kt:8 foo$default
// test.kt:8 foo$default
// test.kt:8 foo$default
// test.kt:8 foo$default
@@ -42,7 +42,4 @@ fun bar(x: Int) =
// test.kt:18 bar
// foo.kt:4 foo
// foo.kt:5 foo
// foo.kt:5 foo
// test.kt:21 bar
// test.kt:21 bar
// foo.kt:7 foo
-1
View File
@@ -28,7 +28,6 @@ fun box() {
// test.kt:12 box
// test.kt:4 foo
// test.kt:5 foo
// test.kt:5 foo
// test.kt:13 box
// test.kt:14 box
// test.kt:4 foo
-3
View File
@@ -39,12 +39,9 @@ fun box() {
// test.kt:15 box
// test.kt:8 foo
// test.kt:5 cond
// test.kt:5 cond
// test.kt:16 box
// test.kt:17 box
// test.kt:8 foo
// test.kt:5 cond
// test.kt:5 cond
// test.kt:9 foo
// test.kt:5 cond
// test.kt:5 cond
+2 -2
View File
@@ -54,5 +54,5 @@ fun box() {
// test.kt:9 box
// test.kt:10 box
// test.kt:12 box
// test.kt:13 box
// test.kt:15 box
// test.kt:14 box
// test.kt:16 box
-2
View File
@@ -111,7 +111,6 @@ fun box() {
// test.kt:48 box
// test.kt:7 Foo
// test.kt:45 x
// test.kt:45 x
// test.kt:49 box
// test.kt:13 Bar
// test.kt:17 Bar
@@ -119,7 +118,6 @@ fun box() {
// test.kt:23 Boo
// test.kt:26 Boo
// test.kt:45 x
// test.kt:45 x
// test.kt:29 Boo
// test.kt:51 box
// test.kt:34 Zoo
@@ -57,7 +57,6 @@ fun box() {
// test.kt:8 Companion_19
// test.kt:11 Companion_19
// test.kt:26 x
// test.kt:26 x
// test.kt:13 Companion_19
// test.kt:16 Companion_19
// test.kt:21 Companion_19
@@ -37,5 +37,5 @@ inline fun f(block: () -> Unit) {
// EXPECTATIONS JS_IR
// test.kt:3 box
// test.kt:5 box
// test.kt:7 box
// test.kt:8 box
// test.kt:10 box
-1
View File
@@ -26,4 +26,3 @@ fun box() {
// EXPECTATIONS JS_IR
// test.kt:12 box
// test.kt:9 makeFace
// test.kt:9 makeFace
-1
View File
@@ -21,4 +21,3 @@ inline fun foo() = {
// EXPECTATIONS JS_IR
// test.kt:4 box
// test1.kt:6 box$lambda
// test1.kt:6 box$lambda
-1
View File
@@ -28,4 +28,3 @@ inline fun foo() = {
// test.kt:4 box
// test.kt:5 box
// test1.kt:7 box$lambda
// test1.kt:7 box$lambda
-2
View File
@@ -41,10 +41,8 @@ fun baz(v:(() -> Unit)) {
// test.kt:4 box
// test3.kt:14 baz
// test1.kt:8 box$lambda
// test1.kt:8 box$lambda
// test1.kt:11 box
// test.kt:5 box
// test.kt:6 box
// test3.kt:14 baz
// test1.kt:8 box$lambda_0
// test1.kt:8 box$lambda_0
-1
View File
@@ -30,4 +30,3 @@ fun box(): String {
// test.kt:10 box
// test.kt:4 box
// test.kt:13 box
// test.kt:13 box
+1 -2
View File
@@ -21,7 +21,6 @@ fun box(): String {
// test.kt:13 box
// EXPECTATIONS JS_IR
// test.kt:5 box
// test.kt:8 box
// test.kt:11 box
// test.kt:13 box
// test.kt:13 box
-2
View File
@@ -27,7 +27,5 @@ fun box() {
// EXPECTATIONS JS_IR
// test.kt:14 box
// a.kt:4 a
// a.kt:4 a
// test.kt:15 box
// b.kt:8 b
// b.kt:8 b
@@ -25,4 +25,3 @@ fun test(a: Boolean, b: Boolean, c: Boolean): Boolean {
// EXPECTATIONS JS_IR
// test.kt:5 box
// test.kt:9 test
// test.kt:9 test
@@ -36,4 +36,3 @@ fun g() {}
// test.kt:8 f
// test.kt:4 l
// test.kt:4 l
// test.kt:4 l
-1
View File
@@ -67,4 +67,3 @@ inline fun html(init: () -> Unit) {
// EXPECTATIONS JS_IR
// test.kt:19 box
// test.kt:21 box
// test.kt:21 box
-4
View File
@@ -69,13 +69,9 @@ fun testExpressionBody(nullable: String?) =
// EXPECTATIONS JS_IR
// test.kt:6 box
// test.kt:13 test
// test.kt:13 test
// test.kt:7 box
// test.kt:13 test
// test.kt:13 test
// test.kt:8 box
// test.kt:21 testExpressionBody
// test.kt:21 testExpressionBody
// test.kt:9 box
// test.kt:21 testExpressionBody
// test.kt:21 testExpressionBody
@@ -16,4 +16,3 @@ fun box(): String {
// test.kt:5 box
// test.kt:5 box
// test.kt:6 box
// test.kt:6 box
-1
View File
@@ -23,4 +23,3 @@ fun box() {
// test.kt:11 box
// test.kt:11 box
// test.kt:6 A.get_prop_wosl9o_k$
// test.kt:6 A.get_prop_wosl9o_k$
-3
View File
@@ -34,8 +34,5 @@ fun foo(n :Int ) : Int {
// test.kt:11 foo
// test.kt:8 foo
// test.kt:9 foo
// test.kt:9 foo
// test.kt:11 foo
// test.kt:11 foo
// test.kt:11 foo
// test.kt:11 foo
-3
View File
@@ -22,6 +22,3 @@ fun box(): String {
// test.kt:3 ifoo$default
// test.kt:3 ifoo$default
// test.kt:4 ifoo
// test.kt:4 ifoo
// test.kt:3 ifoo$default
// test.kt:8 box
@@ -38,4 +38,3 @@ fun box(): String {
// test.kt:10 box
// EXPECTATIONS JS_IR
// test.kt:10 box
@@ -40,10 +40,8 @@ fun fail() : String {
// EXPECTATIONS JS_IR
// test.kt:4 box
// test.kt:20 fail
// test.kt:20 fail
// test.kt:4 box
// test.kt:7 box
// test.kt:20 fail
// test.kt:20 fail
// test.kt:16 box
// test.kt:7 box
@@ -38,14 +38,10 @@ fun fail() : String {
// EXPECTATIONS JS_IR
// test.kt:6 box
// test.kt:18 fail
// test.kt:18 fail
// test.kt:6 box
// test.kt:3 execute
// test.kt:3 execute
// test.kt:9 box
// test.kt:18 fail
// test.kt:18 fail
// test.kt:14 box
// test.kt:9 box
// test.kt:3 execute
// test.kt:3 execute
@@ -41,11 +41,9 @@ fun fail() : String {
// test.kt:4 box
// test.kt:5 box
// test.kt:20 fail
// test.kt:20 fail
// test.kt:16 box
// test.kt:7 box
// test.kt:20 fail
// test.kt:20 fail
// test.kt:16 box
// test.kt:8 box
// test.kt:16 box
@@ -39,9 +39,7 @@ fun fail() : String {
// EXPECTATIONS JS_IR
// test.kt:4 box
// test.kt:16 fail
// test.kt:16 fail
// test.kt:7 box
// test.kt:16 fail
// test.kt:16 fail
// test.kt:12 box
// test.kt:7 box
@@ -23,6 +23,3 @@ suspend fun box() {
// test.kt:4 foo
// test.kt:4 foo
// test.kt:9 box$lambda
// test.kt:9 box$lambda
// test.kt:4 foo
// test.kt:7 box
-1
View File
@@ -17,4 +17,3 @@ fun box() {
// EXPECTATIONS JS_IR
// test.kt:8 box
// test.kt:3 foo
// test.kt:3 foo
-4
View File
@@ -49,11 +49,7 @@ fun box() {
// test.kt:14 box
// test.kt:7 bar
// test.kt:4 foo
// test.kt:4 foo
// test.kt:7 bar
// test.kt:15 box
// test.kt:15 box
// test.kt:7 bar
// test.kt:4 foo
// test.kt:4 foo
// test.kt:7 bar
@@ -116,7 +116,6 @@ fun box() {
// test.kt:17 foo
// test.kt:36 mightThrow3
// test.kt:37 mightThrow3
// test.kt:37 mightThrow3
// test.kt:16 foo
// test.kt:42 box
// test.kt:43 box
@@ -129,7 +128,6 @@ fun box() {
// test.kt:36 mightThrow3
// test.kt:36 mightThrow3
// test.kt:19 foo
// test.kt:19 foo
// test.kt:44 box
// test.kt:45 box
// test.kt:5 foo
@@ -138,11 +136,9 @@ fun box() {
// test.kt:32 mightThrow2
// test.kt:32 mightThrow2
// test.kt:13 foo
// test.kt:13 foo
// test.kt:46 box
// test.kt:47 box
// test.kt:5 foo
// test.kt:28 mightThrow
// test.kt:28 mightThrow
// test.kt:7 foo
// test.kt:7 foo
@@ -21,4 +21,3 @@ fun box(): String {
// test.kt:4 box
// test.kt:6 box
// test.kt:8 box
// test.kt:8 box
-3
View File
@@ -86,12 +86,9 @@ fun box() {
// test.kt:26 box
// test.kt:15 foo
// test.kt:22 foo
// test.kt:22 foo
// test.kt:27 box
// test.kt:17 foo
// test.kt:22 foo
// test.kt:22 foo
// test.kt:28 box
// test.kt:19 foo
// test.kt:22 foo
// test.kt:22 foo
@@ -61,16 +61,13 @@ fun box() {
// test.kt:13 foo
// test.kt:15 foo
// test.kt:22 foo
// test.kt:22 foo
// test.kt:27 box
// test.kt:4 foo
// test.kt:13 foo
// test.kt:17 foo
// test.kt:22 foo
// test.kt:22 foo
// test.kt:28 box
// test.kt:4 foo
// test.kt:13 foo
// test.kt:19 foo
// test.kt:22 foo
// test.kt:22 foo
@@ -73,7 +73,6 @@ fun nop() {}
// EXPECTATIONS JS_IR
// test.kt:3 box
// test.kt:19 value
// test.kt:19 value
// test.kt:4 box
// test.kt:20 box
// test.kt:5 box
@@ -182,9 +182,15 @@ class JsDebugRunner(testServices: TestServices) : AbstractJsArtifactsCollector(t
val segment = if (columnNumber <= group.segments[0].generatedColumnNumber) {
group.segments[0]
} else {
group.segments.find {
columnNumber > it.generatedColumnNumber
val candidateIndex = group.segments.indexOfFirst {
columnNumber <= it.generatedColumnNumber
}
if (candidateIndex < 0)
null
else if (candidateIndex == 0 || group.segments[candidateIndex].generatedColumnNumber == columnNumber)
group.segments[candidateIndex]
else
group.segments[candidateIndex - 1]
}
return segment?.sourceFileAndLine()
}