[K/Wasm] Convert non-capturing lambdas into singletons ^KT-64803 Fixed

This commit is contained in:
Artem Kobzar
2024-01-29 12:52:18 +00:00
committed by Space Team
parent e03f8b503f
commit 1fe77705b0
37 changed files with 245 additions and 20 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ fun box() {
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:7 $box (9, 9, 4)
// test.kt:7 $box (9, 4)
// test.kt:4 $eval (27, 30)
// test.kt:8 $box$lambda.invoke (9, 9, 9, 9)
// String.kt:141 $kotlin.stringLiteral (17, 28, 17)
@@ -18,7 +18,7 @@ fun box() {
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:5 $box (4, 4, 4)
// test.kt:5 $box
// test.kt:6 $box$lambda.invoke (9, 9, 9, 9)
// String.kt:141 $kotlin.stringLiteral (17, 28, 17)
// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8)
+1 -1
View File
@@ -234,7 +234,7 @@ fun box() {
// Number2String.kt:55 $kotlin.wasm.internal.itoa32 (8, 26, 8)
// Number2String.kt:57 $kotlin.wasm.internal.itoa32 (15, 31, 15)
// Number2String.kt:58 $kotlin.wasm.internal.itoa32 (11, 19, 11, 24, 32, 24, 4)
// Assertions.kt:14 $kotlin.assert (11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4)
// Assertions.kt:14 $kotlin.assert (11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4)
// Assertions.kt:21 $kotlin.assert (9, 8, 9, 8, 9, 8, 9, 8, 9, 8)
// Assertions.kt:25 $kotlin.assert (1, 1, 1, 1, 1)
// Assertions.kt:15 $kotlin.assert (1, 1, 1, 1, 1)
@@ -45,10 +45,10 @@ fun foo(f: () -> Unit) {
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:5 $box (8, 8, 4)
// test.kt:5 $box (8, 4)
// test.kt:15 $foo (4, 4)
// test.kt:6 $box$lambda.invoke (20, 12, 21)
// test.kt:16 $foo (1, 1)
// test.kt:9 $box (10, 10, 4)
// test.kt:9 $box (10, 4)
// test.kt:10 $box$lambda.invoke (16, 8, 17)
// test.kt:12 $box
+1 -1
View File
@@ -27,7 +27,7 @@ inline fun foo() = {
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:6 $box (4, 4)
// test1.kt:10 $box (19, 19)
// test1.kt:10 $box
// test1.kt:11 $box
// test.kt:8 $box$lambda.invoke
// test.kt:7 $box
+1 -1
View File
@@ -30,7 +30,7 @@ inline fun foo() = {
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:6 $box
// test1.kt:11 $box (19, 19)
// test1.kt:11 $box
// test1.kt:12 $box
// test.kt:7 $box
// test.kt:9 $box$lambda.invoke
+1 -1
View File
@@ -52,7 +52,7 @@ fun baz(v:(() -> Unit)) {
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:6 $box (8, 4)
// test1.kt:12 $box (19, 19, 19, 19)
// test1.kt:12 $box (19, 19)
// test1.kt:13 $box (1, 1)
// test3.kt:16 $baz (4, 4)
// test.kt:10 $box$lambda.invoke
+1 -1
View File
@@ -35,7 +35,7 @@ fun g() {}
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:4 $box (12, 4)
// test.kt:5 $box (6, 6, 4)
// test.kt:5 $box (6, 4)
// test.kt:9 $f
// test.kt:12 $g
// test.kt:10 $f
@@ -54,7 +54,7 @@ fun box() {
// Number2String.kt:55 $kotlin.wasm.internal.itoa32 (8, 26, 8)
// Number2String.kt:57 $kotlin.wasm.internal.itoa32 (15, 31, 15)
// Number2String.kt:58 $kotlin.wasm.internal.itoa32 (11, 19, 11, 24, 32, 24, 4)
// Assertions.kt:14 $kotlin.assert (11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4)
// Assertions.kt:14 $kotlin.assert (11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4)
// Assertions.kt:21 $kotlin.assert (9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8)
// Assertions.kt:25 $kotlin.assert (1, 1, 1, 1, 1, 1)
// Assertions.kt:15 $kotlin.assert (1, 1, 1, 1, 1, 1)