[JS IR] Emit original names for local vars to sourcemaps

#KT-35655 Fixed
This commit is contained in:
Sergej Jaskiewicz
2022-11-01 19:19:25 +01:00
committed by Space Team
parent 8efa72ca36
commit 7b7c517dbb
114 changed files with 1970 additions and 376 deletions
+7 -3
View File
@@ -13,9 +13,13 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:6 box:
// test.kt:11 box: o:java.lang.String="O":java.lang.String
// test.kt:13 box: o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// test.kt:13 box: o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:11 box: o="O":kotlin.String
// test.kt:13 box: o="O":kotlin.String, k="K":kotlin.String
+15 -4
View File
@@ -4,16 +4,27 @@ fun box() {
var a = 1
a --
a /= a
throw ArithmeticException() // Division by 0 doesn't throw in JS, so throw explicitly
} catch(e : Throwable) {
e.printStackTrace()
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:3 box:
// test.kt:4 box:
// test.kt:5 box: a:int=1:int
// test.kt:6 box: a:int=0:int
// test.kt:7 box:
// test.kt:8 box: e:java.lang.Throwable=java.lang.ArithmeticException
// test.kt:10 box:
// test.kt:8 box:
// test.kt:9 box: e:java.lang.Throwable=java.lang.ArithmeticException
// test.kt:11 box:
// EXPECTATIONS JS_IR
// test.kt:4 box:
// test.kt:5 box: a=1:number
// test.kt:5 box: a=1:number
// test.kt:6 box: a=0:number
// test.kt:7 box: a=0:number
// test.kt:8 box: a=0:number
// test.kt:8 box: a=0:number
// test.kt:9 box: a=0:number, e=kotlin.ArithmeticException
@@ -16,7 +16,7 @@ fun box() {
Derived(4, 5)
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:15 box:
// test.kt:7 <init>: p:int=3:int
// test.kt:6 <init>:
@@ -25,9 +25,8 @@ fun box() {
// test.kt:8 <init>: p:int=3:int
// EXPECTATIONS JVM_IR
// test.kt:9 <init>: p:int=3:int, a:int=2:int
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:15 box:
// test.kt:16 box:
// test.kt:11 <init>: p1:int=4:int, p2:int=5:int
// test.kt:6 <init>:
@@ -35,4 +34,18 @@ fun box() {
// test.kt:6 <init>:
// test.kt:11 <init>: p1:int=4:int, p2:int=5:int
// test.kt:16 box:
// test.kt:17 box:
// test.kt:17 box:
// EXPECTATIONS JS_IR
// test.kt:15 box:
// test.kt:7 Derived_init_$Init$: p=3:number
// test.kt:6 <init>:
// test.kt:4 <init>: i=1:number
// test.kt:6 <init>:
// test.kt:8 Derived_init_$Init$: p=3:number
// test.kt:16 box:
// test.kt:11 Derived_init_$Init$: p1=4:number, p2=5:number
// test.kt:6 <init>:
// test.kt:4 <init>: i=1:number
// test.kt:6 <init>:
// test.kt:17 box:
@@ -7,8 +7,14 @@ fun box() {
F("foo")
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:4 <init>: a:java.lang.String="foo":java.lang.String
// test.kt:7 box:
// test.kt:8 box:
// test.kt:8 box:
// EXPECTATIONS JS_IR
// test.kt:7 box:
// test.kt:4 <init>: a="foo":kotlin.String
// test.kt:4 <init>: a="foo":kotlin.String
// test.kt:8 box:
+16 -2
View File
@@ -7,7 +7,7 @@ fun box() {
val b = a.copy(b = 3.0)
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// test.kt:3 <init>: a:double=1.0:double, b:double=2.0:double
// test.kt:6 box:
@@ -15,4 +15,18 @@ fun box() {
// test.kt:3 <init>: a:double=1.0:double, b:double=3.0:double
// test.kt:-1 copy: a:double=1.0:double, b:double=3.0:double
// test.kt:7 box: a:someClass=someClass
// test.kt:8 box: a:someClass=someClass, b:someClass=someClass
// test.kt:8 box: a:someClass=someClass, b:someClass=someClass
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:3 <init>: a=1:number, b=2:number
// test.kt:3 <init>: a=1:number, b=2:number
// test.kt:3 <init>: a=1:number, b=2:number
// test.kt:7 box: a=someClass
// test.kt:1 copy$default: b=3:number
// test.kt:1 copy$default: a=1:number, b=3:number
// test.kt:1 copy: a=1:number, b=3:number
// test.kt:3 <init>: a=1:number, b=3:number
// test.kt:3 <init>: a=1:number, b=3:number
// test.kt:3 <init>: a=1:number, b=3:number
// test.kt:8 box: a=someClass, b=someClass
@@ -9,10 +9,14 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:5 box:
// test.kt:7 box: p:kotlin.Pair=kotlin.Pair
// test.kt:9 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:5 box:
// test.kt:7 box: p=kotlin.Pair
// test.kt:7 box: p=kotlin.Pair
// test.kt:7 box: p=kotlin.Pair, o="O":kotlin.String
// test.kt:9 box: p=kotlin.Pair, o="O":kotlin.String, k="K":kotlin.String
@@ -17,20 +17,29 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:15 box:
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
// test.kt:15 box:
// test.kt:16 box: p:MyPair=MyPair
// test.kt:6 component1:
// test.kt:16 box: p:MyPair=MyPair
// test.kt:10 component2:
// EXPECTATIONS JVM
// test.kt:16 box: p:MyPair=MyPair
// test.kt:17 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM_IR
// test.kt:16 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String
// test.kt:17 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM JVM_IR
// test.kt:17 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:15 box:
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:16 box: p=MyPair
// test.kt:16 box: p=MyPair
// test.kt:6 component1:
// test.kt:16 box: p=MyPair, o="O":kotlin.String
// test.kt:10 component2:
// test.kt:17 box: p=MyPair, o="O":kotlin.String, k="K":kotlin.String
@@ -24,23 +24,29 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:15 box:
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
// test.kt:15 box:
// test.kt:23 box: p:MyPair=MyPair
// test.kt:6 component1:
// test.kt:18 box: p:MyPair=MyPair
// test.kt:10 component2:
// EXPECTATIONS JVM
// test.kt:23 box: p:MyPair=MyPair
// test.kt:6 component1:
// test.kt:18 box: p:MyPair=MyPair
// test.kt:10 component2:
// test.kt:20 box: p:MyPair=MyPair
// EXPECTATIONS JVM_IR
// test.kt:20 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String
// EXPECTATIONS JVM JVM_IR
// test.kt:24 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM_IR
// test.kt:23 box: p:MyPair=MyPair
// EXPECTATIONS JS_IR
// test.kt:15 box:
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:23 box: p=MyPair
// test.kt:18 box: p=MyPair
// test.kt:6 component1:
// test.kt:18 box: p:MyPair=MyPair
// test.kt:20 box: p=MyPair, o="O":kotlin.String
// test.kt:10 component2:
// test.kt:20 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String
// test.kt:24 box: p:MyPair=MyPair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// test.kt:24 box: p=MyPair, o="O":kotlin.String, k="K":kotlin.String
@@ -17,17 +17,20 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// test.kt:15 box: p:kotlin.Pair=kotlin.Pair
// test.kt:10 box: p:kotlin.Pair=kotlin.Pair
// EXPECTATIONS JVM
// test.kt:15 box: p:kotlin.Pair=kotlin.Pair
// test.kt:10 box: p:kotlin.Pair=kotlin.Pair
// test.kt:12 box: p:kotlin.Pair=kotlin.Pair
// EXPECTATIONS JVM_IR
// test.kt:12 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String
// EXPECTATIONS JVM JVM_IR
// test.kt:17 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM_IR
// test.kt:15 box: p:kotlin.Pair=kotlin.Pair
// test.kt:10 box: p:kotlin.Pair=kotlin.Pair
// test.kt:12 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String
// test.kt:17 box: p:kotlin.Pair=kotlin.Pair, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:15 box: p=kotlin.Pair
// test.kt:10 box: p=kotlin.Pair
// test.kt:12 box: p=kotlin.Pair, o="O":kotlin.String
// test.kt:17 box: p=kotlin.Pair, o="O":kotlin.String, k="K":kotlin.String
@@ -9,7 +9,14 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:5 box:
// test.kt:7 box: p:kotlin.Triple=kotlin.Triple
// test.kt:9 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:5 box:
// test.kt:7 box: p=kotlin.Triple
// test.kt:7 box: p=kotlin.Triple
// test.kt:7 box: p=kotlin.Triple, o="O":kotlin.String
// test.kt:9 box: p=kotlin.Triple, o="O":kotlin.String, k="K":kotlin.String
@@ -19,22 +19,20 @@ fun box(): String {
return o + k
}
// EXPECTATIONS
// EXPECTATIONS JVM
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// test.kt:17 box: p:kotlin.Triple=kotlin.Triple
// test.kt:12 box: p:kotlin.Triple=kotlin.Triple
// EXPECTATIONS JVM
// test.kt:14 box: p:kotlin.Triple=kotlin.Triple
// EXPECTATIONS JVM_IR
// test.kt:14 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String
// EXPECTATIONS JVM JVM_IR
// test.kt:19 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM_IR
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:17 box: p:kotlin.Triple=kotlin.Triple
// test.kt:12 box: p:kotlin.Triple=kotlin.Triple
// test.kt:14 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String
// test.kt:19 box: p:kotlin.Triple=kotlin.Triple, o:java.lang.String="O":java.lang.String, k:java.lang.String="K":java.lang.String
// test.kt:17 box: p=kotlin.Triple
// test.kt:12 box: p=kotlin.Triple
// test.kt:14 box: p=kotlin.Triple, o="O":kotlin.String
// test.kt:19 box: p=kotlin.Triple, o="O":kotlin.String, k="K":kotlin.String
@@ -8,9 +8,21 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:5 box:
// test.kt:6 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:7 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String, b:java.lang.String="23":java.lang.String
// test.kt:6 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:9 box: map:java.util.Map=java.util.Collections$SingletonMap
// EXPECTATIONS JS_IR
// test.kt:5 box:
// test.kt:5 box:
// test.kt:6 box: map=kotlin.collections.HashMap
// test.kt:6 box: map=kotlin.collections.HashMap
// test.kt:6 box: map=kotlin.collections.HashMap
// test.kt:6 box: map=kotlin.collections.HashMap
// test.kt:6 box: map=kotlin.collections.HashMap, a="1":kotlin.String
// test.kt:7 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
// test.kt:6 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
// test.kt:9 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
@@ -20,29 +20,33 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:6 box:
// test.kt:16 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:11 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:13 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:19 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String, b:java.lang.String="23":java.lang.String
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:21 box: map:java.util.Map=java.util.Collections$SingletonMap
// EXPECTATIONS JVM_IR
// test.kt:6 box:
// test.kt:16 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:11 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:13 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String
// test.kt:19 box: map:java.util.Map=java.util.Collections$SingletonMap, a:java.lang.String="1":java.lang.String, b:java.lang.String="23":java.lang.String
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:21 box: map:java.util.Map=java.util.Collections$SingletonMap
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:6 box:
// test.kt:16 box: map=kotlin.collections.HashMap
// test.kt:16 box: map=kotlin.collections.HashMap
// test.kt:16 box: map=kotlin.collections.HashMap
// test.kt:11 box: map=kotlin.collections.HashMap
// test.kt:13 box: map=kotlin.collections.HashMap, a="1":kotlin.String
// test.kt:19 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
// test.kt:16 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
// test.kt:21 box: map=kotlin.collections.HashMap, a="1":kotlin.String, b="23":kotlin.String
@@ -9,7 +9,6 @@ fun box() {
foo(A("O", 123)) { (x, y) -> x + y }
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:9 box:
// test.kt:4 <init>: x:java.lang.String="O":java.lang.String, y:int=123:int
@@ -28,4 +27,18 @@ fun box() {
// test.kt:9 invoke: x:java.lang.String="O":java.lang.String, y:int=123:int
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 box:
// test.kt:10 box:
// test.kt:10 box:
// EXPECTATIONS JS_IR
// test.kt:9 box:
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:9 box:
// test.kt:6 foo: a=A, block=Function1
// test.kt:9 box$lambda:
// test.kt:1 component1:
// test.kt:9 box$lambda: x="O":kotlin.String
// test.kt:1 component2:
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number
// test.kt:10 box:
@@ -17,8 +17,6 @@ fun box() {
foo(MyPair("X", "Y")) { (x, y) -> x + y }
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:17 box:
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
@@ -45,4 +43,18 @@ fun box() {
// test.kt:17 invoke: x:java.lang.String="O":java.lang.String, y:java.lang.String="K":java.lang.String
// test.kt:14 foo: a:MyPair=MyPair, block:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:17 box:
// test.kt:18 box:
// test.kt:18 box:
// EXPECTATIONS JS_IR
// test.kt:17 box:
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:17 box:
// test.kt:14 foo: a=MyPair, block=Function1
// test.kt:17 box$lambda:
// test.kt:6 component1:
// test.kt:17 box$lambda: x="O":kotlin.String
// test.kt:10 component2:
// test.kt:17 box$lambda: x="O":kotlin.String, y="K":kotlin.String
// test.kt:18 box:
@@ -26,8 +26,6 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:17 box:
// test.kt:4 <init>: x:java.lang.String="X":java.lang.String, y:java.lang.String="Y":java.lang.String
@@ -57,4 +55,18 @@ fun box() {
// test.kt:25 invoke: x:java.lang.String="O":java.lang.String, y:java.lang.String="K":java.lang.String
// test.kt:14 foo: a:MyPair=MyPair, block:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:17 box:
// test.kt:27 box:
// test.kt:27 box:
// EXPECTATIONS JS_IR
// test.kt:17 box:
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:4 <init>: x="X":kotlin.String, y="Y":kotlin.String
// test.kt:17 box:
// test.kt:14 foo: a=MyPair, block=Function1
// test.kt:20 box$lambda:
// test.kt:6 component1:
// test.kt:22 box$lambda: x="O":kotlin.String
// test.kt:10 component2:
// test.kt:25 box$lambda: x="O":kotlin.String, y="K":kotlin.String
// test.kt:27 box:
@@ -20,8 +20,6 @@ fun box() {
return
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:9 box:
// test.kt:4 <init>: x:java.lang.String="O":java.lang.String, y:int=123:int
@@ -45,4 +43,18 @@ fun box() {
// test.kt:17 invoke: x:java.lang.String="O":java.lang.String, y:int=123:int
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 box:
// test.kt:20 box:
// test.kt:20 box:
// EXPECTATIONS JS_IR
// test.kt:9 box:
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:9 box:
// test.kt:6 foo: a=A, block=Function1
// test.kt:12 box$lambda:
// test.kt:1 component1:
// test.kt:14 box$lambda: x="O":kotlin.String
// test.kt:1 component2:
// test.kt:17 box$lambda: x="O":kotlin.String, y=123:number
// test.kt:20 box:
@@ -9,8 +9,6 @@ fun box() {
foo(A("O", 123), A("K", 877)) { (x, y), (z, w) -> (x + z) + (y + w) }
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:9 box:
// test.kt:4 <init>: x:java.lang.String="O":java.lang.String, y:int=123:int
@@ -33,4 +31,26 @@ fun box() {
// test.kt:9 invoke: x:java.lang.String="O":java.lang.String, y:int=123:int, z:java.lang.String="K":java.lang.String, w:int=877:int
// test.kt:6 foo: a:A=A, b:A=A, block:kotlin.jvm.functions.Function2=TestKt$box$1
// test.kt:9 box:
// test.kt:10 box:
// test.kt:10 box:
// EXPECTATIONS JS_IR
// test.kt:9 box:
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:4 <init>: x="O":kotlin.String, y=123:number
// test.kt:9 box:
// test.kt:4 <init>: x="K":kotlin.String, y=877:number
// test.kt:4 <init>: x="K":kotlin.String, y=877:number
// test.kt:4 <init>: x="K":kotlin.String, y=877:number
// test.kt:9 box:
// test.kt:6 foo: a=A, b=A, block=Function2
// test.kt:9 box$lambda:
// test.kt:1 component1:
// test.kt:9 box$lambda: x="O":kotlin.String
// test.kt:1 component2:
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number
// test.kt:1 component1:
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number, z="K":kotlin.String
// test.kt:1 component2:
// test.kt:9 box$lambda: x="O":kotlin.String, y=123:number, z="K":kotlin.String, w=877:number
// test.kt:10 box:
+8 -3
View File
@@ -5,7 +5,7 @@ fun box() {
}("O", "K")
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// EXPECTATIONS JVM_IR
// test.kt:5 box:
// test.kt:4 box: a:java.lang.String="O":java.lang.String, b:java.lang.String="K":java.lang.String
@@ -14,5 +14,10 @@ fun box() {
// test.kt:5 box:
// test.kt:4 invoke: a:java.lang.String="O":java.lang.String, b:java.lang.String="K":java.lang.String
// test.kt:5 box:
// EXPECTATIONS
// test.kt:6 box:
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// EXPECTATIONS JS_IR
// test.kt:3 box:
// test.kt:4 box$lambda: a="O":kotlin.String, b="K":kotlin.String
// test.kt:6 box:
+20 -2
View File
@@ -16,7 +16,7 @@ fun box() {
} while (x < z)
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// test.kt:8 box: x:int=0:int
// test.kt:9 box: x:int=0:int, z:int=2:int
@@ -30,4 +30,22 @@ fun box() {
// test.kt:9 box: x:int=2:int, z:int=2:int
// test.kt:15 box: x:int=2:int, z:int=2:int
// test.kt:16 box: x:int=2:int, z:int=2:int
// test.kt:17 box: x:int=2:int
// test.kt:17 box: x:int=2:int
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:8 box: x=0:number
// test.kt:9 box: x=0:number, z=2:number
// test.kt:9 box: x=0:number, z=2:number
// test.kt:9 box: x=1:number, z=2:number
// test.kt:3 shouldContinue: i=0:number
// test.kt:10 box: x=1:number, z=2:number
// test.kt:16 box: x=1:number, z=2:number
// test.kt:8 box: x=1:number, z=2:number
// test.kt:9 box: x=1:number, z=2:number
// test.kt:9 box: x=1:number, z=2:number
// test.kt:9 box: x=2:number, z=2:number
// test.kt:3 shouldContinue: i=1:number
// test.kt:15 box: x=2:number, z=2:number
// test.kt:16 box: x=2:number, z=2:number, y=12:number
// test.kt:17 box: x=2:number, z=2:number, y=12:number
+1 -1
View File
@@ -10,4 +10,4 @@ fun box() {
// EXPECTATIONS
// test.kt:7 box:
// test.kt:4 foo:
// test.kt:8 box:
// test.kt:8 box:
+11 -2
View File
@@ -16,8 +16,6 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:6 box:
// test.kt:12 box: map:java.util.Map=java.util.Collections$SingletonMap
@@ -33,3 +31,14 @@ fun box() {
// test.kt:15 box: map:java.util.Map=java.util.Collections$SingletonMap, e:java.util.Map$Entry=java.util.AbstractMap$SimpleImmutableEntry
// test.kt:8 box: map:java.util.Map=java.util.Collections$SingletonMap
// test.kt:17 box: map:java.util.Map=java.util.Collections$SingletonMap
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:6 box:
// test.kt:12 box: map=kotlin.collections.HashMap
// test.kt:12 box: map=kotlin.collections.HashMap
// test.kt:12 box: map=kotlin.collections.HashMap
// test.kt:15 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
// test.kt:15 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
// test.kt:12 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
// test.kt:17 box: map=kotlin.collections.HashMap, e=kotlin.collections.AbstractMutableMap.SimpleEntry
+11 -2
View File
@@ -10,7 +10,7 @@ fun box() {
y++
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:2 <init>:
// test.kt:8 box:
@@ -18,4 +18,13 @@ fun box() {
// test.kt:4 box: a:A=A, this_$iv:A=A, $i$f$getS:int=0:int
// test.kt:9 box: a:A=A
// test.kt:10 box: a:A=A, y:int=1:int
// test.kt:11 box: a:A=A, y:int=2:int
// test.kt:11 box: a:A=A, y:int=2:int
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:2 <init>:
// test.kt:4 box: a=A
// test.kt:9 box: a=A
// test.kt:10 box: a=A, y=1:number
// test.kt:10 box: a=A, y=1:number
// test.kt:11 box: a=A, y=2:number
+90
View File
@@ -0,0 +1,90 @@
// TARGET_BACKEND: JS_IR
// FILE: a.kt
@JsExport
fun exclamate(s: String) =
"$s!"
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@JsFun("""
function (a, b) {
return _.exclamate(a) +
_.exclamate(b);
}
""")
external fun exclamateAndConcat(`a!`: String, `b!`: String): String
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@JsPolyfill("""
if (typeof String.prototype.myAwesomePolyfill === "undefined") {
Object.defineProperty(String.prototype, "myAwesomePolyfill", {
value: function () {
return this + "!";
}
});
}
""")
internal inline fun String.myAwesomePolyfill(): Boolean =
asDynamic()
.myAwesomePolyfill()
val walter1VarDecl = "var walter1 = _.exclamate('Walter');"
val jesse1VarDecl = "var jesse1 = _.exclamate(jesse);"
// FILE: test.kt
fun box() {
exclamateAndConcat(
"hello",
"world")
val jesse = "Jesse"
js(
"_.exclamate(jesse);") // Local variable is captured
js(
"_.exclamate('Walter');") // No local variables captured
js(
walter1VarDecl +
"_.exclamate(walter1);")
js(
jesse1VarDecl +
"_.exclamate(jesse1);")
"foo".myAwesomePolyfill()
js("""
function localFun(hello, world) {
return '' + hello + ', ' + world + '!';
}
""")
js("localFun('hello', 'world')")
}
// EXPECTATIONS
// test.kt:41 box:
// test.kt:42 box: a!="hello":kotlin.String
// a.kt:11 box: a!="hello":kotlin.String, b!="world":kotlin.String
// a.kt:6 exclamate: s="hello":kotlin.String
// a.kt:12 box: a!="hello":kotlin.String, b!="world":kotlin.String
// a.kt:6 exclamate: s="world":kotlin.String
// test.kt:43 box: a!="hello":kotlin.String, b!="world":kotlin.String
// test.kt:45 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String
// a.kt:6 exclamate: s="Jesse":kotlin.String
// test.kt:47 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String
// a.kt:6 exclamate: s="Walter":kotlin.String
// test.kt:49 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String
// a.kt:6 exclamate: s="Walter":kotlin.String
// test.kt:49 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String
// a.kt:6 exclamate: s="Walter!":kotlin.String
// test.kt:52 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String
// a.kt:6 exclamate: s="Jesse":kotlin.String
// test.kt:52 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
// a.kt:6 exclamate: s="Jesse!":kotlin.String
// a.kt:29 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
// a.kt:22 value:
// test.kt:63 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
// test.kt:59 localFun: hello="hello":kotlin.String, world="world":kotlin.String
// test.kt:64 box: a!="hello":kotlin.String, b!="world":kotlin.String, jesse="Jesse":kotlin.String, walter1="Walter!":kotlin.String, jesse1="Jesse!":kotlin.String
+6 -5
View File
@@ -1,3 +1,4 @@
// TARGET_BACKEND: JVM
// WITH_STDLIB
// FILE: test.kt
class C {
@@ -9,9 +10,9 @@ fun box() {
C().foo(4)
}
// EXPECTATIONS
// test.kt:9 box:
// test.kt:3 <init>:
// test.kt:9 box:
// test.kt:5 foo: firstParam:int=4:int, secondParam:java.lang.String="":java.lang.String
// EXPECTATIONS JVM JVM_IR
// test.kt:10 box:
// test.kt:4 <init>:
// test.kt:10 box:
// test.kt:6 foo: firstParam:int=4:int, secondParam:java.lang.String="":java.lang.String
// test.kt:11 box:
+10 -5
View File
@@ -27,27 +27,32 @@ fun box() {
// variables local to the function, and hence need no name mangling to
// properly figure in the debugger.
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:13 box:
// test.kt:5 foo:
// EXPECTATIONS JVM
// test.kt:6 foo: x:int=1:int
// test.kt:9 foo: x:int=1:int, $fun$bar$1:TestKt$foo$1=TestKt$foo$1
// EXPECTATIONS JVM_IR
// test.kt:9 foo: x:int=1:int
// EXPECTATIONS JVM
// test.kt:7 invoke:
// test.kt:8 invoke: y:int=1:int
// EXPECTATIONS JVM_IR
// test.kt:7 foo$bar: x:int=1:int
// test.kt:8 foo$bar: x:int=1:int, y:int=1:int
// EXPECTATIONS JVM
// test.kt:10 foo: x:int=1:int, $fun$bar$1:TestKt$foo$1=TestKt$foo$1
// test.kt:14 box:
// EXPECTATIONS JVM_IR
// test.kt:10 foo: x:int=1:int
// test.kt:14 box:
// EXPECTATIONS JS_IR
// test.kt:13 box:
// test.kt:5 foo:
// test.kt:9 foo: x=1:number
// test.kt:7 foo$bar: x=1:number
// test.kt:8 foo$bar: x=1:number, y=1:number
// test.kt:10 foo: x=1:number
// test.kt:14 box:
+2 -3
View File
@@ -18,14 +18,13 @@ fun box() {
// - the _declaration_ of the local function does not figure in the byte code
// of the outer function and hence, has no line number
// EXPECTATIONS
// EXPECTATIONS JVM
// test.kt:10 box:
// test.kt:5 foo:
// test.kt:7 foo: $fun$bar$1:TestKt$foo$1=TestKt$foo$1
// test.kt:11 box:
// EXPECTATIONS JVM_IR
// EXPECTATIONS JVM_IR JS_IR
// test.kt:10 box:
// test.kt:7 foo:
// test.kt:11 box:
// test.kt:11 box:
@@ -11,11 +11,19 @@ fun box() {
x.Bar()
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:10 box:
// test.kt:4 <init>:
// test.kt:10 box:
// test.kt:11 box: x:Foo=Foo
// test.kt:5 <init>:
// test.kt:11 box: x:Foo=Foo
// test.kt:12 box: x:Foo=Foo
// test.kt:12 box: x:Foo=Foo
// EXPECTATIONS JS_IR
// test.kt:10 box:
// test.kt:4 <init>:
// test.kt:11 box: x=Foo
// test.kt:5 <init>:
// test.kt:5 <init>:
// test.kt:12 box: x=Foo
@@ -10,10 +10,16 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
// test.kt:10 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:11 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg=Function1
// test.kt:10 box$lambda: $this$blockFun="OK":kotlin.String
// test.kt:11 box:
@@ -10,10 +10,17 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:4 foo: block:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 invoke: $this$foo:long=1:long
// test.kt:4 foo: block:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:8 box:
// test.kt:11 box:
// test.kt:11 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:4 foo: block=Function1
// test.kt:4 foo: block=Function1
// test.kt:9 box$lambda: $this$foo=kotlin.Long
// test.kt:11 box:
@@ -7,7 +7,12 @@ fun box() {
"OK".test()
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:4 test: $this$test:java.lang.String="OK":java.lang.String
// test.kt:8 box:
// test.kt:8 box:
// EXPECTATIONS JS_IR
// test.kt:7 box:
// test.kt:4 test: <this>="OK":kotlin.String
// test.kt:8 box:
@@ -7,7 +7,12 @@ fun box() {
"OK".foo(42)
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:4 foo: $this$foo:java.lang.String="OK":java.lang.String, a:int=42:int
// test.kt:8 box:
// test.kt:8 box:
// EXPECTATIONS JS_IR
// test.kt:7 box:
// test.kt:4 foo: <this>="OK":kotlin.String, a=42:number
// test.kt:8 box:
@@ -10,10 +10,16 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
// test.kt:10 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:11 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg=Function1
// test.kt:10 box$lambda: $this$blockFun="OK":kotlin.String
// test.kt:11 box:
@@ -10,10 +10,16 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 invoke: $this$label:java.lang.String="OK":java.lang.String
// test.kt:10 invoke: $this$label:java.lang.String="OK":java.lang.String
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:11 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg=Function1
// test.kt:10 box$lambda: $this$label="OK":kotlin.String
// test.kt:11 box:
@@ -10,10 +10,16 @@ fun box() {
})
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:9 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
// test.kt:10 invoke: $this$blockFun:java.lang.String="OK":java.lang.String
// test.kt:5 blockFun: blockArg:kotlin.jvm.functions.Function1=TestKt$box$1
// test.kt:11 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:5 blockFun: blockArg=Function1
// test.kt:10 box$lambda: $this$blockFun="OK":kotlin.String
// test.kt:11 box:
@@ -9,10 +9,16 @@ suspend fun box() {
A().foo()
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:4 <init>:
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:5 foo: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:10 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:9 box: $completion=EmptyContinuation
// test.kt:4 <init>:
// test.kt:9 box: $completion=EmptyContinuation
// test.kt:5 foo: $completion=EmptyContinuation
@@ -14,7 +14,7 @@ suspend fun box() {
A().foo1(42)
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:4 <init>:
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
@@ -29,3 +29,15 @@ suspend fun box() {
// test.kt:10 foo1: $continuation:kotlin.coroutines.Continuation=A$foo1$1, $result:java.lang.Object=null, l:long=42:long
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:15 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:14 box: $completion=EmptyContinuation
// test.kt:4 <init>:
// test.kt:14 box: $completion=EmptyContinuation
// test.kt:14 box: $completion=EmptyContinuation
// test.kt:7 doResume:
// test.kt:5 foo: $completion=$foo1COROUTINE$0
// test.kt:8 doResume:
// test.kt:5 foo: $completion=$foo1COROUTINE$0
// test.kt:9 doResume:
// test.kt:10 doResume: dead=kotlin.Long
@@ -4,5 +4,8 @@
suspend fun box() {}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:4 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:4 box: $completion=EmptyContinuation
@@ -10,10 +10,16 @@ suspend fun box() {
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:4 <init>:
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:6 foo: $this$foo:A=A, $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:9 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:10 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:9 box: $completion=EmptyContinuation
// test.kt:4 <init>:
// test.kt:9 box: $completion=EmptyContinuation
// test.kt:6 foo: <this>=A, $completion=EmptyContinuation
@@ -12,7 +12,7 @@ suspend fun box() {
foo1(42)
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:5 foo1:
// test.kt:6 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
@@ -25,3 +25,13 @@ suspend fun box() {
// test.kt:9 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:13 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:12 box: $completion=EmptyContinuation
// test.kt:12 box: $completion=EmptyContinuation
// test.kt:6 doResume:
// test.kt:4 foo: $completion=$foo1COROUTINE$0
// test.kt:7 doResume:
// test.kt:4 foo: $completion=$foo1COROUTINE$0
// test.kt:8 doResume:
// test.kt:9 doResume: dead=kotlin.Long
@@ -16,7 +16,7 @@ suspend fun box() {
// The lambda object constructor has a local variables table on the IR backend.
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:4 <init>:
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
@@ -31,3 +31,15 @@ suspend fun box() {
// test.kt:11 foo1: $continuation:kotlin.coroutines.Continuation=TestKt$foo1$1, $result:java.lang.Object=null, l:long=42:long
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:15 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:14 box: $completion=EmptyContinuation
// test.kt:4 <init>:
// test.kt:14 box: $completion=EmptyContinuation
// test.kt:14 box: $completion=EmptyContinuation
// test.kt:8 doResume:
// test.kt:6 foo: <this>=A, $completion=$foo1COROUTINE$0
// test.kt:9 doResume:
// test.kt:6 foo: <this>=A, $completion=$foo1COROUTINE$0
// test.kt:10 doResume:
// test.kt:11 doResume: dead=kotlin.Long
@@ -18,7 +18,7 @@ suspend fun box() {
hasLocal()
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:10 box:
// test.kt:12 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// test.kt:8 h: $completion:kotlin.coroutines.Continuation=TestKt$box$1
@@ -31,3 +31,12 @@ suspend fun box() {
// test.kt:4 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$hasLocal:int=0:int
// test.kt:5 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$hasLocal:int=0:int, x$iv:int=41:int
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// EXPECTATIONS JS_IR
// test.kt:12 doResume:
// test.kt:8 h: $completion=$boxCOROUTINE$0
// test.kt:4 doResume:
// test.kt:5 doResume: x=41:number
// test.kt:4 doResume: x=41:number
// test.kt:5 doResume: x=41:number, x=41:number
// test.kt:19 doResume: x=41:number, x=41:number
@@ -20,7 +20,7 @@ suspend fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:10 box:
// test.kt:12 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// test.kt:6 h: $completion:kotlin.coroutines.Continuation=TestKt$box$1
@@ -45,3 +45,32 @@ suspend fun box() {
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, x:int=1:int
// test.kt:18 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, x:int=1:int
// test.kt:21 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// EXPECTATIONS JS_IR
// test.kt:12 doResume:
// test.kt:6 h: $completion=$boxCOROUTINE$0
// test.kt:13 doResume:
// test.kt:13 doResume:
// test.kt:13 doResume:
// test.kt:13 doResume: x=0:number
// test.kt:14 doResume: x=0:number
// test.kt:8 f: x=0:number
// test.kt:13 doResume: x=0:number
// test.kt:13 doResume: x=0:number
// test.kt:13 doResume: x=1:number
// test.kt:14 doResume: x=1:number
// test.kt:8 f: x=1:number
// test.kt:13 doResume: x=1:number
// test.kt:18 doResume: x=1:number
// test.kt:18 doResume: x=1:number
// test.kt:18 doResume: x=1:number
// test.kt:18 doResume: x=1:number, x=0:number
// test.kt:19 doResume: x=1:number, x=0:number
// test.kt:8 f: x=0:number
// test.kt:18 doResume: x=1:number, x=0:number
// test.kt:18 doResume: x=1:number, x=0:number
// test.kt:18 doResume: x=1:number, x=1:number
// test.kt:19 doResume: x=1:number, x=1:number
// test.kt:8 f: x=1:number
// test.kt:18 doResume: x=1:number, x=1:number
// test.kt:21 doResume: x=1:number, x=1:number
+22 -2
View File
@@ -26,14 +26,16 @@ suspend fun box() {
val a = suspendBar()
}
// EXPECTATIONS
// FIXME(JS_IR): KT-54657
// EXPECTATIONS JVM JVM_IR
// test.kt:25 box:
// test.kt:26 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int
// EXPECTATIONS JVM
// test.kt:19 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int
// test.kt:14 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int, $this$extensionFun$iv$iv:AtomicInt=AtomicInt, $i$f$extensionFun:int=0:int
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:14 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int, $this$extensionFun$iv$iv:AtomicInt=AtomicInt, $i$f$extensionFun:int=0:int
// test.kt:15 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int, $this$extensionFun$iv$iv:AtomicInt=AtomicInt, $i$f$extensionFun:int=0:int
// test.kt:6 getValue:
@@ -46,3 +48,21 @@ suspend fun box() {
// test.kt:23 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null, $i$f$suspendBar:int=0:int
// test.kt:26 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// test.kt:27 box: $continuation:kotlin.coroutines.Continuation=TestKt$box$1, $result:java.lang.Object=null
// EXPECTATIONS JS_IR
// test.kt:19 doResume:
// test.kt:10 <init properties test.kt>:
// test.kt:8 atomic: i=0:number
// test.kt:6 <init>: value=0:number
// test.kt:6 <init>: value=0:number
// test.kt:11 <init properties test.kt>:
// test.kt:10 <get-state>$accessor$1gle43a:
// test.kt:10 <get-state>:
// test.kt:14 doResume:
// test.kt:11 <get-a>$accessor$1gle43a:
// test.kt:11 <get-a>:
// test.kt:37 doResume:
// test.kt:37 doResume:
// test.kt:37 doResume:
// test.kt:26 doResume:
// test.kt:27 doResume: a=Unit
+5 -1
View File
@@ -5,6 +5,10 @@ suspend fun box() {
var x = 1
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:5 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:6 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1, x:int=1:int
// EXPECTATIONS JS_IR
// test.kt:5 box: $completion=EmptyContinuation
// test.kt:6 box: $completion=EmptyContinuation, x=1:number
@@ -13,33 +13,41 @@ suspend fun box() = foo(A()) { (x_param, _, y_param) ->
x_param + y_param
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:4 <init>:
// test.kt:12 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:10 foo: a:A=A, block:kotlin.jvm.functions.Function2=TestKt$box$2, $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:5 component1:
// EXPECTATIONS JVM
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit, $dstr$x_param$_u24__u24$y_param:A=A
// EXPECTATIONS JVM_IR
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 component3:
// EXPECTATIONS JVM_IR
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit, x_param:java.lang.String="O":java.lang.String
// test.kt:13 invokeSuspend: $result:java.lang.Object=kotlin.Unit, x_param:java.lang.String="O":java.lang.String, y_param:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM
// test.kt:12 invokeSuspend: $result:java.lang.Object=kotlin.Unit, $dstr$x_param$_u24__u24$y_param:A=A
// test.kt:13 invokeSuspend: $result:java.lang.Object=kotlin.Unit, $dstr$x_param$_u24__u24$y_param:A=A, x_param:java.lang.String="O":java.lang.String, y_param:java.lang.String="K":java.lang.String
// EXPECTATIONS JVM_IR
// test.kt:-1 invoke: p1:A=A, p2:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JVM
// test.kt:-1 invoke:
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:10 foo: a:A=A, block:kotlin.jvm.functions.Function2=TestKt$box$2, $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// test.kt:14 box: $completion:kotlin.coroutines.Continuation=Generated_Box_MainKt$main$1
// EXPECTATIONS JS_IR
// test.kt:12 box: $completion=EmptyContinuation
// test.kt:4 <init>:
// test.kt:12 box: $completion=EmptyContinuation
// test.kt:12 box$slambda:
// test.kt:12 box: $completion=EmptyContinuation
// test.kt:10 foo: a=A, block=Function2, $completion=EmptyContinuation
// test.kt:12 doResume:
// test.kt:5 component1:
// test.kt:12 doResume: x_param="O":kotlin.String
// test.kt:7 component3:
// test.kt:13 doResume: x_param="O":kotlin.String, y_param="K":kotlin.String
+14 -1
View File
@@ -18,7 +18,7 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:8 box: result:java.lang.String="":java.lang.String
// test.kt:9 box: result:java.lang.String="":java.lang.String, x:java.lang.String="A":java.lang.String
@@ -28,3 +28,16 @@ fun box() {
// test.kt:15 box: result:java.lang.String="y":java.lang.String, x:java.lang.String="A":java.lang.String
// test.kt:16 box: result:java.lang.String="y":java.lang.String, x:java.lang.String="A":java.lang.String, z:java.lang.String="z":java.lang.String
// test.kt:19 box: result:java.lang.String="yz":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:7 box:
// test.kt:8 box: result="":kotlin.String
// test.kt:8 box: result="":kotlin.String
// test.kt:8 box: result="":kotlin.String
// test.kt:8 box: result="":kotlin.String
// test.kt:10 box: result="":kotlin.String, x="A":kotlin.String
// test.kt:11 box: result="":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:12 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:15 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:16 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:19 box: result="yz":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
+18 -1
View File
@@ -36,7 +36,7 @@ fun box() {
val localX = x
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:35 box:
// test.kt:20 compute:
// test.kt:21 compute:
@@ -53,3 +53,20 @@ fun box() {
// test.kt:35 box:
// test.kt:36 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
// test.kt:37 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:35 box:
// test.kt:21 compute:
// test.kt:22 compute: y=42:number
// test.kt:22 compute: y=42:number
// test.kt:22 compute: y=42:number
// test.kt:22 compute: y=42:number, i=0:number
// test.kt:8 compute: y=42:number, i=0:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:10 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:24 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:28 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:29 compute: y=42:number, i=0:number, z=32:number, j=0:number, s2="OK":kotlin.String
+16 -1
View File
@@ -23,7 +23,7 @@ fun box(): String {
return "FAIL"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:8 box:
// test.kt:9 box: i:int=0:int
@@ -35,3 +35,18 @@ fun box(): String {
// test.kt:15 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String, z:java.lang.String="z":java.lang.String
// test.kt:17 box: i:int=0:int
// test.kt:21 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:8 box:
// test.kt:8 box:
// test.kt:8 box: i=0:number
// test.kt:10 box: i=0:number
// test.kt:11 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String
// test.kt:13 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException
// test.kt:14 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
// test.kt:15 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
// test.kt:17 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
// test.kt:21 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
+16 -1
View File
@@ -23,7 +23,7 @@ fun box(): String {
return "FAIL"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:8 box:
// test.kt:9 box: i:int=0:int
@@ -35,3 +35,18 @@ fun box(): String {
// test.kt:15 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String, z:java.lang.String="z":java.lang.String
// test.kt:17 box: i:int=0:int
// test.kt:21 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:8 box:
// test.kt:8 box:
// test.kt:8 box: i=0:number
// test.kt:10 box: i=0:number
// test.kt:11 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String
// test.kt:13 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException
// test.kt:14 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
// test.kt:15 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
// test.kt:17 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
// test.kt:21 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String, z="z":kotlin.String
+15 -1
View File
@@ -22,7 +22,7 @@ fun box(): String {
return "FAIL3"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:7 box:
// test.kt:8 box:
// test.kt:9 box: i:int=0:int
@@ -33,3 +33,17 @@ fun box(): String {
// test.kt:14 box: i:int=0:int, e:java.lang.Exception=java.lang.RuntimeException, y:java.lang.String="y":java.lang.String
// test.kt:16 box: i:int=0:int
// test.kt:20 box:
// EXPECTATIONS JS_IR
// test.kt:8 box:
// test.kt:8 box:
// test.kt:8 box:
// test.kt:8 box: i=0:number
// test.kt:10 box: i=0:number
// test.kt:11 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String
// test.kt:13 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException
// test.kt:14 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
// test.kt:16 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
// test.kt:20 box: i=0:number, x="x":kotlin.String, e=kotlin.RuntimeException, y="y":kotlin.String
+11 -1
View File
@@ -16,7 +16,7 @@ fun box(): String {
return "FAIL"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:4 box:
// test.kt:5 box:
// test.kt:6 box: i:int=0:int
@@ -24,3 +24,13 @@ fun box(): String {
// test.kt:8 box: i:int=0:int, x:java.lang.String="x":java.lang.String
// test.kt:10 box: i:int=0:int
// test.kt:14 box:
// EXPECTATIONS JS_IR
// test.kt:5 box:
// test.kt:5 box:
// test.kt:5 box:
// test.kt:5 box: i=0:number
// test.kt:7 box: i=0:number
// test.kt:8 box: i=0:number, x="x":kotlin.String
// test.kt:10 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
// test.kt:14 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
+13 -2
View File
@@ -16,7 +16,7 @@ fun box(): String {
return "FAIL"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:4 box:
// test.kt:5 box:
// test.kt:6 box: i:int=0:int
@@ -27,5 +27,16 @@ fun box(): String {
// test.kt:5 box: i:int=0:int
// EXPECTATIONS JVM_IR
// test.kt:5 box: i:int=0:int
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:14 box:
// EXPECTATIONS JS_IR
// test.kt:5 box:
// test.kt:5 box:
// test.kt:5 box:
// test.kt:5 box: i=0:number
// test.kt:7 box: i=0:number
// test.kt:8 box: i=0:number, x="x":kotlin.String
// test.kt:10 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
// test.kt:5 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
// test.kt:14 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
+11 -1
View File
@@ -18,7 +18,7 @@ fun box(): String {
return "FAIL2"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// test.kt:7 box:
// test.kt:8 box: i:int=0:int
@@ -26,3 +26,13 @@ fun box(): String {
// test.kt:10 box: i:int=0:int, x:java.lang.String="x":java.lang.String
// test.kt:12 box: i:int=0:int
// test.kt:16 box:
// EXPECTATIONS JS_IR
// test.kt:7 box:
// test.kt:7 box:
// test.kt:7 box:
// test.kt:7 box: i=0:number
// test.kt:9 box: i=0:number
// test.kt:10 box: i=0:number, x="x":kotlin.String
// test.kt:12 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
// test.kt:16 box: i=0:number, x="x":kotlin.String, y="y":kotlin.String
+6 -1
View File
@@ -14,8 +14,13 @@ fun box(): String {
return "FAIL"
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 box:
// test.kt:9 box:
// test.kt:10 box: x:java.lang.String="x":java.lang.String
// test.kt:12 box:
// EXPECTATIONS JS_IR
// test.kt:9 box:
// test.kt:10 box: x="x":kotlin.String
// test.kt:12 box: x="x":kotlin.String
+22 -1
View File
@@ -17,7 +17,7 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:6 box:
// test.kt:7 box: result:java.lang.String="":java.lang.String
// test.kt:8 box: result:java.lang.String="":java.lang.String, x:java.lang.String="A":java.lang.String
@@ -35,3 +35,24 @@ fun box() {
// test.kt:15 box: result:java.lang.String="yzy":java.lang.String, x:java.lang.String="B":java.lang.String, z:java.lang.String="z":java.lang.String
// test.kt:7 box: result:java.lang.String="yzyz":java.lang.String
// test.kt:18 box: result:java.lang.String="yzyz":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:6 box:
// test.kt:7 box: result="":kotlin.String
// test.kt:7 box: result="":kotlin.String
// test.kt:7 box: result="":kotlin.String
// test.kt:7 box: result="":kotlin.String
// test.kt:9 box: result="":kotlin.String, x="A":kotlin.String
// test.kt:10 box: result="":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:11 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:14 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:15 box: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:7 box: result="yz":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:7 box: result="yz":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:9 box: result="yz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:10 box: result="yz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:11 box: result="yzy":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:14 box: result="yzy":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:15 box: result="yzy":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:7 box: result="yzyz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
// test.kt:18 box: result="yzyz":kotlin.String, x="B":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
+14 -1
View File
@@ -23,7 +23,7 @@ fun box() {
compute()
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:23 box:
// test.kt:7 compute:
// test.kt:8 compute: result:java.lang.String="":java.lang.String
@@ -36,3 +36,16 @@ fun box() {
// test.kt:12 compute: result:java.lang.String="yz":java.lang.String, x:java.lang.String="A":java.lang.String, y:java.lang.String="y":java.lang.String
// test.kt:23 box:
// test.kt:24 box:
// EXPECTATIONS JS_IR
// test.kt:23 box:
// test.kt:7 compute:
// test.kt:8 compute: result="":kotlin.String
// test.kt:8 compute: result="":kotlin.String
// test.kt:8 compute: result="":kotlin.String
// test.kt:8 compute: result="":kotlin.String
// test.kt:10 compute: result="":kotlin.String, x="A":kotlin.String
// test.kt:11 compute: result="":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:12 compute: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:15 compute: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String
// test.kt:16 compute: result="y":kotlin.String, x="A":kotlin.String, y="y":kotlin.String, z="z":kotlin.String
+18 -1
View File
@@ -29,7 +29,7 @@ fun box() {
compute()
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:29 box:
// test.kt:7 compute:
// test.kt:8 compute: result:java.lang.String="":java.lang.String
@@ -47,3 +47,20 @@ fun box() {
// test.kt:15 compute: result:java.lang.String="bcd":java.lang.String, a:java.lang.String="a":java.lang.String, b:java.lang.String="b":java.lang.String, i:int=0:int, e:java.lang.String="e":java.lang.String
// test.kt:29 box:
// test.kt:30 box:
// EXPECTATIONS JS_IR
// test.kt:29 box:
// test.kt:7 compute:
// test.kt:9 compute: result="":kotlin.String
// test.kt:11 compute: result="":kotlin.String, a="a":kotlin.String
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String
// test.kt:12 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number
// test.kt:13 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number
// test.kt:14 compute: result="":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String
// test.kt:15 compute: result="b":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String
// test.kt:18 compute: result="b":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String
// test.kt:19 compute: result="b":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String, c="c":kotlin.String
// test.kt:22 compute: result="bc":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String, c="c":kotlin.String
// test.kt:23 compute: result="bc":kotlin.String, a="a":kotlin.String, b="b":kotlin.String, i=0:number, e="e":kotlin.String, c="c":kotlin.String, d="d":kotlin.String
+14 -1
View File
@@ -29,7 +29,7 @@ fun box() {
val localX = x
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:28 box:
// test.kt:13 compute:
// test.kt:14 compute:
@@ -41,3 +41,16 @@ fun box() {
// test.kt:28 box:
// test.kt:29 box: result:java.lang.String="b":java.lang.String
// test.kt:30 box: result:java.lang.String="b":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:28 box:
// test.kt:14 compute:
// test.kt:14 compute:
// test.kt:14 compute:
// test.kt:14 compute:
// test.kt:16 compute: a="a":kotlin.String
// test.kt:16 compute: a="a":kotlin.String
// test.kt:16 compute: a="a":kotlin.String
// test.kt:16 compute: a="a":kotlin.String
// test.kt:17 compute: a="a":kotlin.String, b="b":kotlin.String
// test.kt:22 compute: a="a":kotlin.String, b="b":kotlin.String
+18 -1
View File
@@ -43,7 +43,7 @@ fun box() {
val localX = x
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:42 box:
// test.kt:27 compute:
// test.kt:28 compute:
@@ -62,3 +62,20 @@ fun box() {
// test.kt:42 box:
// test.kt:43 box: result:java.lang.String="b":java.lang.String
// test.kt:44 box: result:java.lang.String="b":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:42 box:
// test.kt:28 compute:
// test.kt:28 compute:
// test.kt:28 compute:
// test.kt:28 compute:
// test.kt:17 compute: a="a":kotlin.String
// test.kt:8 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
// test.kt:30 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String
// test.kt:31 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String
// test.kt:11 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String
// test.kt:20 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String, h="h":kotlin.String
// test.kt:36 compute: a="a":kotlin.String, gLocal="gLocal":kotlin.String, hLocal="hLocal":kotlin.String, b="b":kotlin.String, h="h":kotlin.String, g="g":kotlin.String
+19 -1
View File
@@ -33,7 +33,7 @@ fun box() {
val localX = x
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:32 box:
// test.kt:13 compute:
// test.kt:14 compute:
@@ -49,3 +49,21 @@ fun box() {
// test.kt:32 box:
// test.kt:33 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
// test.kt:34 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:32 box:
// test.kt:14 compute:
// test.kt:15 compute: y=42:number
// test.kt:15 compute: y=42:number
// test.kt:15 compute: y=42:number
// test.kt:15 compute: y=42:number, i=0:number
// test.kt:16 compute: y=42:number, i=0:number
// test.kt:18 compute: y=42:number, i=0:number
// test.kt:18 compute: y=42:number, i=0:number
// test.kt:19 compute: y=42:number, i=0:number, e=kotlin.RuntimeException
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number
// test.kt:20 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
// test.kt:22 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
// test.kt:26 compute: y=42:number, i=0:number, e=kotlin.RuntimeException, y=32:number, j=0:number
+19 -1
View File
@@ -35,7 +35,7 @@ fun box() {
val localX = x
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:34 box:
// test.kt:20 compute:
// test.kt:21 compute:
@@ -52,3 +52,21 @@ fun box() {
// test.kt:34 box:
// test.kt:35 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
// test.kt:36 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:34 box:
// test.kt:21 compute:
// test.kt:22 compute: y=42:number
// test.kt:22 compute: y=42:number
// test.kt:22 compute: y=42:number
// test.kt:22 compute: y=42:number, i=0:number
// test.kt:8 compute: y=42:number, i=0:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number
// test.kt:9 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:10 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:12 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:12 compute: y=42:number, i=0:number, z=32:number, j=0:number
// test.kt:24 compute: y=42:number, i=0:number, z=32:number, j=0:number, e=kotlin.RuntimeException
// test.kt:28 compute: y=42:number, i=0:number, z=32:number, j=0:number, e=kotlin.RuntimeException
+21 -1
View File
@@ -38,7 +38,7 @@ fun box() {
val localX = x
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:37 box:
// test.kt:13 compute:
// test.kt:14 compute:
@@ -58,3 +58,23 @@ fun box() {
// test.kt:37 box:
// test.kt:38 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String
// test.kt:39 box: result:java.lang.String="NON_LOCAL_RETURN":java.lang.String, localX:java.lang.String="OK":java.lang.String
// EXPECTATIONS JS_IR
// test.kt:37 box:
// test.kt:15 compute:
// test.kt:16 compute: y=42:number
// test.kt:16 compute: y=42:number
// test.kt:16 compute: y=42:number
// test.kt:16 compute: y=42:number, i=0:number
// test.kt:17 compute: y=42:number, i=0:number
// test.kt:20 compute: y=42:number, i=0:number
// test.kt:21 compute: y=42:number, i=0:number, s="NOPE":kotlin.String
// test.kt:23 compute: y=42:number, i=0:number, s="NOPE":kotlin.String
// test.kt:27 compute: y=42:number, i=0:number, s="NOPE":kotlin.String
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String, j=0:number
// test.kt:29 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="NOPE":kotlin.String, j=0:number
// test.kt:28 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="OK":kotlin.String, j=0:number
// test.kt:31 compute: y=42:number, i=0:number, s="NOPE":kotlin.String, s2="OK":kotlin.String, j=0:number
+70 -13
View File
@@ -23,49 +23,106 @@ fun box() {
}
}
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:12 box:
// test.kt:4 <init>: x:double=1.0:double, y:java.lang.String="":java.lang.String, z:char=0:char
// test.kt:12 box:
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function3=TestKt$box$1
// EXPECTATIONS JVM_IR
// test.kt:13 invoke: w:int=1:int
// test.kt:15 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char
// EXPECTATIONS JVM
// test.kt:15 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:4 <init>: x:double=1.0:double, y:java.lang.String="":java.lang.String, z:char=0:char
// EXPECTATIONS JVM
// test.kt:15 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char
// test.kt:16 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
// EXPECTATIONS JVM_IR
// test.kt:15 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char
// test.kt:16 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:4 <init>: x:double=1.0:double, y:java.lang.String="":java.lang.String, z:char=0:char
// EXPECTATIONS JVM
// test.kt:16 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
// test.kt:18 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
// EXPECTATIONS JVM_IR
// test.kt:16 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char
// test.kt:18 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:8 getArrayOfA:
// EXPECTATIONS JVM
// test.kt:18 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
// test.kt:22 invoke: $dstr$x$_u24__u24$y:A=A, $noName_1:java.lang.String="":java.lang.String, w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
// EXPECTATIONS JVM_IR
// test.kt:18 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
// test.kt:22 invoke: w:int=1:int, x:double=1.0:double, y:char=0:char, a:double=1.0:double, c:char=0:char, _:java.lang.String="":java.lang.String, d:char=0:char
// EXPECTATIONS
// EXPECTATIONS JVM JVM_IR
// test.kt:6 foo: a:A=A, block:kotlin.jvm.functions.Function3=TestKt$box$1
// test.kt:12 box:
// test.kt:24 box:
// EXPECTATIONS JS_IR
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:4 <init>:
// test.kt:4 <init>: x=1:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:8 <init properties test.kt>:
// test.kt:12 box:
// test.kt:4 <init>:
// test.kt:4 <init>: x=1:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:12 box:
// test.kt:6 foo: a=A, block=Function3
// test.kt:13 box$lambda: w=1:number
// test.kt:1 component1:
// test.kt:13 box$lambda: w=1:number, x=1:number
// test.kt:1 component3:
// test.kt:15 box$lambda: w=1:number, x=1:number, y=48:number
// test.kt:4 <init>:
// test.kt:4 <init>: x=1:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:15 box$lambda: w=1:number, x=1:number, y=48:number
// test.kt:1 component1:
// test.kt:15 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number
// test.kt:1 component3:
// test.kt:16 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number
// test.kt:4 <init>:
// test.kt:4 <init>: x=1:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:4 <init>: x=1:number, y="":kotlin.String, z=48:number
// test.kt:16 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number
// test.kt:1 component2:
// test.kt:16 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String
// test.kt:1 component3:
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:8 <get-arrayOfA>:
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number
// test.kt:1 component2:
// test.kt:18 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number, q="":kotlin.String
// test.kt:22 box$lambda: w=1:number, x=1:number, y=48:number, a=1:number, c=48:number, _="":kotlin.String, d=48:number, q="":kotlin.String
// test.kt:24 box: