diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt index b160e7252c9..1f3a274f37d 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/compiler.kt @@ -8,7 +8,6 @@ package org.jetbrains.kotlin.backend.wasm import org.jetbrains.kotlin.backend.common.linkage.issues.checkNoUnboundSymbols import org.jetbrains.kotlin.backend.common.phaser.PhaseConfig import org.jetbrains.kotlin.backend.common.phaser.PhaserState -import org.jetbrains.kotlin.backend.common.phaser.invokeToplevel import org.jetbrains.kotlin.backend.wasm.ir2wasm.JsModuleAndQualifierReference import org.jetbrains.kotlin.backend.wasm.ir2wasm.WasmCompiledModuleFragment import org.jetbrains.kotlin.backend.wasm.ir2wasm.WasmModuleFragmentGenerator @@ -122,7 +121,7 @@ fun compileWasm( val os = ByteArrayOutputStream() - val sourceMapFileName = "$baseFileName.map".takeIf { generateSourceMaps } + val sourceMapFileName = "$baseFileName.wasm.map".takeIf { generateSourceMaps } val sourceLocationMappings = if (generateSourceMaps) mutableListOf() else null @@ -175,19 +174,19 @@ private fun generateSourceMap( val pathResolver = SourceFilePathResolver.create(sourceMapsInfo.sourceRoots, sourceMapsInfo.sourceMapPrefix, sourceMapsInfo.outputDir) - var prev: SourceLocation? = null + var prev: SourceLocation.Location? = null for (mapping in sourceLocationMappings) { - val location = mapping.sourceLocation as? SourceLocation.Location ?: continue - - if (location == prev) continue - - prev = location - - location.apply { - // TODO resulting path goes too deep since temporary directory we compiled first is deeper than final destination. - val relativePath = pathResolver.getPathRelativeToSourceRoots(File(file)).substring(3) - sourceMapBuilder.addMapping(relativePath, null, { null }, line, column, null, mapping.offset) + when (val location = mapping.sourceLocation.takeIf { it != prev } ?: continue) { + is SourceLocation.NoLocation -> sourceMapBuilder.addEmptyMapping(mapping.offset) + is SourceLocation.Location -> { + location.apply { + // TODO resulting path goes too deep since temporary directory we compiled first is deeper than final destination. + val relativePath = pathResolver.getPathRelativeToSourceRoots(File(file)).replace(Regex("^\\.\\./"), "") + sourceMapBuilder.addMapping(relativePath, null, { null }, line, column, null, mapping.offset) + prev = this + } + } } } @@ -372,6 +371,6 @@ fun writeCompilationResult( File(dir, "$fileNameBase.mjs").writeText(result.jsWrapper) if (result.sourceMap != null) { - File(dir, "$fileNameBase.map").writeText(result.sourceMap) + File(dir, "$fileNameBase.wasm.map").writeText(result.sourceMap) } } diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/BodyGenerator.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/BodyGenerator.kt index f5d2cd29e0e..fa20a49ca08 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/BodyGenerator.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/BodyGenerator.kt @@ -68,7 +68,7 @@ class BodyGenerator( } private fun generateStatement(statement: IrStatement) { - when(statement) { + when (statement) { is IrExpression -> generateAsStatement(statement) is IrVariable -> statement.acceptVoid(this) else -> error("Unsupported node type: ${statement::class.simpleName}") @@ -518,7 +518,7 @@ class BodyGenerator( // Assumes call arguments are already on the stack private fun tryToGenerateIntrinsicCall( call: IrFunctionAccessExpression, - function: IrFunction + function: IrFunction, ): Boolean { if (tryToGenerateWasmOpIntrinsicCall(call, function)) { return true @@ -655,6 +655,14 @@ class BodyGenerator( override fun visitBlockBody(body: IrBlockBody) { body.statements.forEach(::generateStatement) + this.body.buildNop(body.getSourceEndLocation()) + } + + override fun visitInlinedFunctionBlock(inlinedBlock: IrInlinedFunctionBlock) { + body.buildNop(inlinedBlock.inlineCall.getSourceLocation()) + functionContext.stepIntoInlinedFunction(inlinedBlock.inlineCall.symbol.owner) + super.visitInlinedFunctionBlock(inlinedBlock) + functionContext.stepOutLastInlinedFunction() } override fun visitContainerExpression(expression: IrContainerExpression) { @@ -985,5 +993,6 @@ class BodyGenerator( return false } - private fun IrElement.getSourceLocation() = getSourceLocation(functionContext.irFunction.fileOrNull?.fileEntry) + private fun IrElement.getSourceLocation() = getSourceLocation(functionContext.currentFunction.fileOrNull?.fileEntry) + private fun IrElement.getSourceEndLocation() = getSourceLocation(functionContext.currentFunction.fileOrNull?.fileEntry, type = LocationType.END) } diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/WasmFunctionCodegenContext.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/WasmFunctionCodegenContext.kt index e38936b6873..2d62606491f 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/WasmFunctionCodegenContext.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/WasmFunctionCodegenContext.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.backend.wasm.ir2wasm +import org.jetbrains.kotlin.backend.common.ir.Ir import org.jetbrains.kotlin.backend.wasm.WasmBackendContext import org.jetbrains.kotlin.ir.declarations.IrFunction import org.jetbrains.kotlin.ir.declarations.IrValueParameter @@ -13,6 +14,7 @@ import org.jetbrains.kotlin.ir.symbols.IrReturnableBlockSymbol import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol import org.jetbrains.kotlin.ir.symbols.IrValueSymbol import org.jetbrains.kotlin.wasm.ir.* +import java.util.LinkedList enum class LoopLabelType { BREAK, CONTINUE } enum class SyntheticLocalType { IS_INTERFACE_PARAMETER, TABLE_SWITCH_SELECTOR } @@ -33,6 +35,7 @@ class WasmFunctionCodegenContext( private val wasmSyntheticLocals = LinkedHashMap() private val loopLevels = LinkedHashMap, Int>() private val nonLocalReturnLevels = LinkedHashMap() + private val inlinedFunctionStack = LinkedList() fun defineLocal(irValueDeclaration: IrValueSymbol) { assert(irValueDeclaration !in wasmLocals) { "Redefinition of local" } @@ -92,4 +95,15 @@ class WasmFunctionCodegenContext( fun referenceLoopLevel(irLoop: IrLoop, labelType: LoopLabelType): Int { return loopLevels.getValue(Pair(irLoop, labelType)) } + + val currentFunction: IrFunction + get() = inlinedFunctionStack.lastOrNull() ?: irFunction + + fun stepIntoInlinedFunction(inlineFunction: IrFunction) { + inlinedFunctionStack.push(inlineFunction) + } + + fun stepOutLastInlinedFunction() { + inlinedFunctionStack.pop() + } } \ No newline at end of file diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt index 449140369dc..467d0bc5a63 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt @@ -7,18 +7,32 @@ package org.jetbrains.kotlin.backend.wasm.ir2wasm import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.IrFileEntry +import org.jetbrains.kotlin.ir.LineAndColumn import org.jetbrains.kotlin.wasm.ir.WasmExpressionBuilder import org.jetbrains.kotlin.wasm.ir.source.location.SourceLocation -fun IrElement.getSourceLocation(fileEntry: IrFileEntry?): SourceLocation { +enum class LocationType { + START { + override fun getLineAndColumnNumberFor(irElement: IrElement, fileEntry: IrFileEntry) = + fileEntry.getLineAndColumnNumbers(irElement.startOffset) + }, + END { + override fun getLineAndColumnNumberFor(irElement: IrElement, fileEntry: IrFileEntry) = + fileEntry.getLineAndColumnNumbers(irElement.endOffset) + }; + + abstract fun getLineAndColumnNumberFor(irElement: IrElement, fileEntry: IrFileEntry): LineAndColumn +} + +fun IrElement.getSourceLocation(fileEntry: IrFileEntry?, type: LocationType = LocationType.START): SourceLocation { if (fileEntry == null) return SourceLocation.NoLocation("fileEntry is null") val path = fileEntry.name - val (startLine, startColumn) = fileEntry.getLineAndColumnNumbers(startOffset) + val (line, column) = type.getLineAndColumnNumberFor(this, fileEntry) - if (startLine < 0 || startColumn < 0) return SourceLocation.NoLocation("startLine or startColumn < 0") + if (line < 0 || column < 0) return SourceLocation.NoLocation("startLine or startColumn < 0") - return SourceLocation.Location(path, startLine, startColumn) + return SourceLocation.Location(path, line, column) } fun WasmExpressionBuilder.buildUnreachableForVerifier() { diff --git a/compiler/testData/debug/stepping/IfTrueThenFalse.kt b/compiler/testData/debug/stepping/IfTrueThenFalse.kt index 9bf719791c9..2825bb653d9 100644 --- a/compiler/testData/debug/stepping/IfTrueThenFalse.kt +++ b/compiler/testData/debug/stepping/IfTrueThenFalse.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun cond() = false @@ -20,3 +20,9 @@ fun box() { // test.kt:6 box // test.kt:3 cond // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test.kt:3 $cond (13, 18) +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/anonymousFunction.kt b/compiler/testData/debug/stepping/anonymousFunction.kt index e491b7390b2..af446775fc3 100644 --- a/compiler/testData/debug/stepping/anonymousFunction.kt +++ b/compiler/testData/debug/stepping/anonymousFunction.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun eval(f: () -> T) = f() @@ -22,3 +22,23 @@ fun box() { // test.kt:4 eval // test.kt:8 box$lambda // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:7 $box (9, 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) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/anonymousFunctionDirect.kt b/compiler/testData/debug/stepping/anonymousFunctionDirect.kt index 0c96a09ca65..a2907406bb1 100644 --- a/compiler/testData/debug/stepping/anonymousFunctionDirect.kt +++ b/compiler/testData/debug/stepping/anonymousFunctionDirect.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -15,3 +15,22 @@ fun box() { // test.kt:5 box // test.kt:6 box$lambda // test.kt:8 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4, 4) +// 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) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:8 $box diff --git a/compiler/testData/debug/stepping/assertion.kt b/compiler/testData/debug/stepping/assertion.kt index 69836af1fe8..60eac19ea21 100644 --- a/compiler/testData/debug/stepping/assertion.kt +++ b/compiler/testData/debug/stepping/assertion.kt @@ -1,5 +1,5 @@ // IGNORE_INLINER: IR -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt public val MASSERTIONS_ENABLED: Boolean = true @@ -52,3 +52,97 @@ fun box(): String { // test.kt:18 box // test.kt:8 box // test.kt:31 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:26 $box (4, 4) +// test.kt:18 $box +// test.kt:19 $box +// test.kt:27 $box (4, 4) +// test.kt:8 $box +// test.kt:9 $box +// test.kt:31 $box (12, 12, 12, 12, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt b/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt index 29c77920adc..f9b42c70a3a 100644 --- a/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt +++ b/compiler/testData/debug/stepping/beforeGotoToWhileStart.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt var current = true @@ -44,3 +44,14 @@ fun box() { // test.kt:8 alternate // test.kt:17 foo // test.kt:21 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:20 $box +// test.kt:12 $foo (11, 11, 11, 11, 11, 11) +// test.kt:13 $foo (12, 12) +// test.kt:7 $alternate (15, 14, 4, 15, 14, 4) +// test.kt:8 $alternate (11, 4, 11, 4) +// test.kt:14 $foo +// test.kt:17 $foo +// test.kt:21 $box diff --git a/compiler/testData/debug/stepping/callWithCallInArguments.kt b/compiler/testData/debug/stepping/callWithCallInArguments.kt index 5019e9f267d..4a3c2f2ed25 100644 --- a/compiler/testData/debug/stepping/callWithCallInArguments.kt +++ b/compiler/testData/debug/stepping/callWithCallInArguments.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A @@ -46,3 +46,14 @@ fun box() { // test.kt:6 bar // test.kt:4 // test.kt:15 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:9 $box (12, 12) +// test.kt:4 $A. (7, 7, 7, 7) +// test.kt:12 $box (24, 20) +// test.kt:6 $bar (16, 16, 19, 16, 16, 19, 16, 16, 19) +// test.kt:11 $box + +// test.kt:10 $box (4, 4) +// test.kt:15 $box diff --git a/compiler/testData/debug/stepping/callWithReceiver.kt b/compiler/testData/debug/stepping/callWithReceiver.kt index 091e6bda04f..a6fd82a8382 100644 --- a/compiler/testData/debug/stepping/callWithReceiver.kt +++ b/compiler/testData/debug/stepping/callWithReceiver.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -34,3 +34,14 @@ fun box() { // test.kt:12 box // test.kt:5 foo // test.kt:16 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:10 $box (12, 12) +// test.kt:7 $A. +// test.kt:11 $box +// test.kt:12 $box (6, 6) +// test.kt:5 $A.foo (16, 20) +// test.kt:15 $box (6, 6) +// test.kt:6 $box (23, 27) +// test.kt:16 $box diff --git a/compiler/testData/debug/stepping/callableReference.kt b/compiler/testData/debug/stepping/callableReference.kt index 90be4bc3083..29fc43529c5 100644 --- a/compiler/testData/debug/stepping/callableReference.kt +++ b/compiler/testData/debug/stepping/callableReference.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { var x = false @@ -31,3 +31,12 @@ fun f(block: () -> Unit) { // test.kt:7 box$lambda$lambda // test.kt:12 f // test.kt:8 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (12, 4) +// test.kt:5 $box (6, 6, 4) +// test.kt:11 $f +// test.kt:6 $box$lambda.invoke (8, 12, 12, 12, 12, 8, 16) +// test.kt:12 $f +// test.kt:8 $box diff --git a/compiler/testData/debug/stepping/chainCall.kt b/compiler/testData/debug/stepping/chainCall.kt index 3756bf83025..ef716ca4fe1 100644 --- a/compiler/testData/debug/stepping/chainCall.kt +++ b/compiler/testData/debug/stepping/chainCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -38,3 +38,15 @@ fun box() { // test.kt:12 box // test.kt:5 foo // test.kt:16 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:10 $box (12, 12) +// test.kt:7 $A. +// test.kt:11 $box (4, 6) +// test.kt:5 $A.foo (16, 20, 16, 20) +// test.kt:12 $box (9, 9) +// test.kt:15 $box (9, 9) +// test.kt:14 $box +// test.kt:6 $box (23, 27, 23, 27) +// test.kt:16 $box diff --git a/compiler/testData/debug/stepping/class.kt b/compiler/testData/debug/stepping/class.kt index f353e8be6e3..22cbab00ceb 100644 --- a/compiler/testData/debug/stepping/class.kt +++ b/compiler/testData/debug/stepping/class.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -36,3 +36,14 @@ fun box() { // test.kt:15 box // test.kt:9 foo // test.kt:16 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:13 $box (12, 12) +// test.kt:5 $A. +// test.kt:10 $A. +// test.kt:14 $box (4, 6) +// test.kt:15 $box (4, 6) +// test.kt:8 $A.foo +// test.kt:9 $A.foo +// test.kt:16 $box diff --git a/compiler/testData/debug/stepping/classObject.kt b/compiler/testData/debug/stepping/classObject.kt index 97a07673048..28550476162 100644 --- a/compiler/testData/debug/stepping/classObject.kt +++ b/compiler/testData/debug/stepping/classObject.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -49,3 +49,11 @@ fun box() { // test.kt:17 box // test.kt:9 foo // test.kt:18 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:15 $box +// test.kt:16 $box +// test.kt:17 $box (6, 6) +// test.kt:9 $Companion.foo (19, 27, 19, 12) +// test.kt:18 $box diff --git a/compiler/testData/debug/stepping/commentBeforeClass.kt b/compiler/testData/debug/stepping/commentBeforeClass.kt index 12a7eef7c1d..7f12166abc1 100644 --- a/compiler/testData/debug/stepping/commentBeforeClass.kt +++ b/compiler/testData/debug/stepping/commentBeforeClass.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -20,3 +20,9 @@ class A { // test.kt:5 box // test.kt:9 // test.kt:6 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4, 4) +// test.kt:11 $A. +// test.kt:6 $box diff --git a/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt b/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt index 0cc4bf20e9c..e6829e12ad9 100644 --- a/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt +++ b/compiler/testData/debug/stepping/commentBeforeCompanionProperty.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class AWithCompanion { @@ -25,3 +25,8 @@ fun box() { // test.kt:7 // test.kt:5 // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:12 $box +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt b/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt index a97aaf68923..ee07374f72c 100644 --- a/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt +++ b/compiler/testData/debug/stepping/commentBeforeFunctionWithDefault.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt // Comment before @@ -19,3 +19,10 @@ fun box() { // EXPECTATIONS JS_IR // test.kt:10 box // test.kt:11 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:10 $box (4, 4, 4, 4, 4) +// test.kt:5 $foo$default (0, 17, 17, 17, 17, 0) +// test.kt:6 $foo (11, 4) +// test.kt:11 $box diff --git a/compiler/testData/debug/stepping/comments.kt b/compiler/testData/debug/stepping/comments.kt index b8518e44628..14d82f1a761 100644 --- a/compiler/testData/debug/stepping/comments.kt +++ b/compiler/testData/debug/stepping/comments.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt // Single line comment @@ -53,3 +53,12 @@ class A { // test.kt:7 box // test.kt:32 bar // test.kt:8 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (4, 4, 8) +// test.kt:33 $A. (1, 1) +// test.kt:25 $A.foo +// test.kt:7 $box (4, 4, 8) +// test.kt:32 $A.bar +// test.kt:8 $box diff --git a/compiler/testData/debug/stepping/compileTimeConstant.kt b/compiler/testData/debug/stepping/compileTimeConstant.kt index 13807bbf186..e3425661410 100644 --- a/compiler/testData/debug/stepping/compileTimeConstant.kt +++ b/compiler/testData/debug/stepping/compileTimeConstant.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -14,3 +14,9 @@ fun box() { // EXPECTATIONS JS_IR // test.kt:6 box // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test.kt:5 $box +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/conjunction.kt b/compiler/testData/debug/stepping/conjunction.kt index cb15b1e5dda..29386c1253d 100644 --- a/compiler/testData/debug/stepping/conjunction.kt +++ b/compiler/testData/debug/stepping/conjunction.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { val k = if (getA() @@ -43,3 +43,14 @@ fun getD() = true // test.kt:10 box // test.kt:4 box // test.kt:12 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (16, 4) +// test.kt:14 $getA (13, 17) +// test.kt:5 $box +// test.kt:16 $getB (13, 17) +// test.kt:6 $box +// test.kt:18 $getC (13, 18) +// test.kt:10 $box +// test.kt:12 $box diff --git a/compiler/testData/debug/stepping/constantConditions.kt b/compiler/testData/debug/stepping/constantConditions.kt index 7b50c07d76d..1f523ba04e8 100644 --- a/compiler/testData/debug/stepping/constantConditions.kt +++ b/compiler/testData/debug/stepping/constantConditions.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt // KT-22488 @@ -27,3 +27,10 @@ fun test(): Long { // test.kt:6 box // test.kt:12 test // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (4, 4) +// test.kt:11 $test +// test.kt:12 $test (15, 8) +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/constructorCall.kt b/compiler/testData/debug/stepping/constructorCall.kt index ddb9a6e8483..ad93bdad3fc 100644 --- a/compiler/testData/debug/stepping/constructorCall.kt +++ b/compiler/testData/debug/stepping/constructorCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A(val x: Int) @@ -47,3 +47,14 @@ fun box() { // test.kt:4 // test.kt:4 // test.kt:15 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:7 $box (4, 6, 4, 4) +// test.kt:4 $A. (8, 19, 8, 19, 8, 19, 8, 19) +// test.kt:8 $box (4, 4, 4) +// test.kt:9 $box +// test.kt:11 $box (4, 6, 4, 4) +// test.kt:13 $box (4, 4, 4) +// test.kt:14 $box +// test.kt:15 $box diff --git a/compiler/testData/debug/stepping/constructors.kt b/compiler/testData/debug/stepping/constructors.kt index 9591f5a0017..cf31674b011 100644 --- a/compiler/testData/debug/stepping/constructors.kt +++ b/compiler/testData/debug/stepping/constructors.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -192,3 +192,72 @@ class O(i: T) { // test.kt:74 O_init_$Init$ // test.kt:73 // test.kt:18 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4, 4) +// test.kt:20 $B. +// test.kt:6 $box (4, 6, 4, 4) +// test.kt:21 $C. (8, 19) +// test.kt:7 $box (4, 4, 4) +// test.kt:23 $D. (4, 4, 17) +// test.kt:24 $D. +// test.kt:8 $box (4, 6, 4, 4) +// test.kt:26 $E. (4, 4, 23) +// test.kt:27 $E. +// test.kt:9 $box (4, 4, 4) +// test.kt:29 $F. (4, 4) +// test.kt:32 $F. +// test.kt:30 $F. (16, 8) +// test.kt:31 $F. +// test.kt:10 $box (4, 6, 4, 4) +// test.kt:34 $G. (4, 4) +// test.kt:37 $G. +// test.kt:35 $G. (16, 8) +// test.kt:36 $G. +// test.kt:11 $box (4, 4, 4) +// test.kt:40 $J. (16, 8) +// test.kt:42 $J. +// test.kt:12 $box (4, 6, 4, 4) +// test.kt:43 $K. +// test.kt:45 $K. (16, 8) +// test.kt:47 $K. +// test.kt:13 $box (4, 4, 4) +// test.kt:49 $L. (4, 4) +// test.kt:54 $L. (16, 8) +// test.kt:56 $L. +// test.kt:50 $L. (16, 8) +// test.kt:51 $L. +// test.kt:14 $box (4, 4, 4) +// test.kt:58 $M. (24, 19, 19) +// test.kt:62 $M. (4, 4) +// test.kt:64 $M. +// test.kt:63 $M. +// test.kt:59 $M. (16, 8) +// test.kt:60 $M. +// test.kt:15 $box (4, 6, 4, 4) +// test.kt:66 $N. (25, 25) +// test.kt:70 $N. (4, 4) +// test.kt:72 $N. +// test.kt:71 $N. +// test.kt:67 $N. (16, 8) +// test.kt:68 $N. +// test.kt:16 $box (4, 6, 6, 6, 6, 4, 4) +// test.kt:76 $O. (1, 1) +// test.kt:17 $box (4, 6, 10, 10, 10, 10, 4, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:74 $O. (36, 31, 31) +// test.kt:75 $O. +// test.kt:18 $box diff --git a/compiler/testData/debug/stepping/continue.kt b/compiler/testData/debug/stepping/continue.kt index 5d67214b05b..2f929fd04a8 100644 --- a/compiler/testData/debug/stepping/continue.kt +++ b/compiler/testData/debug/stepping/continue.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // WITH_STDLIB // FILE: test.kt @@ -63,3 +63,127 @@ fun box() { // test.kt:15 box // test.kt:8 box // test.kt:17 box + +// EXPECTATIONS WASM +// test.kt:5 $ +// Library.kt:2 $ (79, 79, 79, 79, 80, 80, 80, 80, 79, 79) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4) +// Library.kt:3 $ (0, 0, 0, 0, 6, 6, 6, 6, 11, 11, 11, 11) +// Library.kt:39 $ +// test.kt:1 $box +// test.kt:8 $box (14, 14, 14, 14, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4, 14, 9, 14, 4, 14, 4, 4, 4) +// test.kt:5 $ +// Array.kt:82 $kotlin.Array. (16, 24, 29) +// test.kt:9 $box (12, 18, 18, 18, 18, 12, 12, 18, 18, 18, 18, 12, 25, 31, 31, 31, 31, 25, 12, 18, 18, 18, 18, 12, 25, 31, 31, 31, 31, 25, 12, 18, 18, 18, 18, 12, 25, 31, 31, 31, 31, 25) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8) +// String.kt:98 $kotlin.String.equals (12, 12, 12, 12, 12, 12, 12, 12, 12) +// String.kt:99 $kotlin.String.equals (12, 35, 28, 12, 12, 35, 28, 12, 12, 12, 35, 28, 12, 12, 12) +// test.kt:10 $box (12, 12) +// String.kt:100 $kotlin.String.equals (26, 26, 8, 26, 26, 8, 26, 26, 8, 26, 26, 8, 26, 26, 8, 26, 26, 8) +// String.kt:102 $kotlin.String.equals (30, 8, 30, 8, 30, 8, 30, 8, 30, 8, 30, 8) +// String.kt:103 $kotlin.String.equals (26, 38, 8, 26, 38, 8, 26, 38, 8, 26, 38, 8, 26, 38, 8, 26, 38, 8) +// String.kt:104 $kotlin.String.equals (12, 26, 12, 12, 12, 26, 12, 12, 46, 39, 12, 26, 12, 12, 46, 39, 12, 26, 12, 12, 46, 39, 12, 26, 12, 12, 46, 39, 12, 26, 12, 12) +// String.kt:106 $kotlin.String.equals (28, 8, 28, 8) +// String.kt:107 $kotlin.String.equals (24, 30, 8, 24, 30, 8) +// String.kt:108 $kotlin.String.equals (12, 24, 12, 12, 12, 24, 12, 12) +// String.kt:110 $kotlin.String.equals (29, 8, 29, 8) +// String.kt:63 $kotlin.String.equals (12, 12, 12, 12) +// String.kt:66 $kotlin.String.equals (15, 8, 15, 8, 15, 8, 15, 8) +// String.kt:111 $kotlin.String.equals (31, 25, 8, 31, 25, 8) +// String.kt:112 $kotlin.String.equals (8, 8) +// Standard.kt:152 $kotlin.String.equals (4, 4) +// Standard.kt:154 $kotlin.String.equals (18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 18, 4, 26, 4, 18, 9, 18) +// Standard.kt:155 $kotlin.String.equals (8, 8, 8) +// Standard.kt:124 $kotlin.String.equals (32, 46, 42, 53, 32, 32, 32, 46, 42, 53, 32, 32, 32, 46, 42, 53, 32, 32) +// Standard.kt:126 $kotlin.String.equals (1, 1, 13, 6, 1, 13, 6) +// Standard.kt:125 $kotlin.String.equals (3, 3, 3) +// test.kt:12 $box (12, 18, 18, 18, 18, 12, 12, 18, 18, 18, 18, 12) +// test.kt:13 $box +// test.kt:15 $box (16, 8) +// io.kt:28 $kotlin.io.println (16, 16, 25, 25, 25, 4) +// String.kt:119 $kotlin.String.toString +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter +// io.kt:29 $kotlin.io.println +// test.kt:17 $box diff --git a/compiler/testData/debug/stepping/dataClass.kt b/compiler/testData/debug/stepping/dataClass.kt index e25aa9b6cfb..861710bd054 100644 --- a/compiler/testData/debug/stepping/dataClass.kt +++ b/compiler/testData/debug/stepping/dataClass.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt data class D(val i: Int, val s: String) @@ -117,3 +117,187 @@ fun box() { // test.kt:6 // test.kt:6 // test.kt:26 box + +// EXPECTATIONS WASM +// test.kt:14 $box (12, 14, 18, 18, 18, 18, 12) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5, 5, 5, 5, 5, 5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4, 11, 4, 11, 4, 11, 4, 11, 4, 11, 4, 11, 4) +// test.kt:4 $D. (13, 25, 39, 13, 25, 39, 13, 25, 39) +// test.kt:15 $box (4, 13, 15, 19, 19, 19, 19, 13, 6, 6) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8) +// String.kt:98 $kotlin.String.equals +// String.kt:99 $kotlin.String.equals (12, 35, 28) +// test.kt:16 $box (4, 6, 6) +// Primitives.kt:1366 $kotlin.Int__hashCode-impl +// String.kt:122 $kotlin.String.hashCode (12, 25, 12, 12) +// String.kt:123 $kotlin.String.hashCode +// String.kt:124 $kotlin.String.hashCode (12, 26, 12) +// String.kt:126 $kotlin.String.hashCode (24, 8) +// String.kt:63 $kotlin.String.hashCode +// String.kt:66 $kotlin.String.hashCode (15, 8) +// String.kt:127 $kotlin.String.hashCode (19, 8) +// String.kt:128 $kotlin.String.hashCode (8, 8) +// Standard.kt:152 $kotlin.String.hashCode +// Standard.kt:154 $kotlin.String.hashCode (18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4) +// Standard.kt:155 $kotlin.String.hashCode +// Standard.kt:136 $kotlin.String.hashCode (52, 61, 52, 66, 51, 51, 44) +// Standard.kt:138 $kotlin.String.hashCode (8, 4, 0) +// Standard.kt:137 $kotlin.String.hashCode +// Standard.kt:53 $kotlin.String.hashCode (25, 37) +// String.kt:131 $kotlin.String.hashCode (20, 8) +// String.kt:132 $kotlin.String.hashCode (15, 8) +// test.kt:17 $box (4, 6, 6) +// StringBuilder.kt:17 $kotlin.text.StringBuilder. (39, 34, 34, 42) +// StringBuilder.kt:20 $kotlin.text.StringBuilder. (52, 62, 52, 47, 47, 72) +// Arrays.kt:95 $kotlin.CharArray. (12, 19, 12, 12, 19, 12) +// Arrays.kt:96 $kotlin.CharArray. (8, 32, 18, 8, 8, 32, 18, 8) +// Arrays.kt:139 $kotlin.CharArray. (1, 1) +// StringBuilder.kt:14 $kotlin.text.StringBuilder. +// StringBuilder.kt:33 $kotlin.text.StringBuilder. +// StringBuilder.kt:715 $kotlin.text.StringBuilder. +// StringBuilder.kt:143 $kotlin.text.StringBuilder.append (59, 66, 72, 59, 83, 59, 66, 72, 59, 83, 59, 66, 72, 59, 83, 59, 66, 72, 59, 83) +// Library.kt:19 $kotlin.toString (37, 37, 43, 43, 43, 37, 37, 63, 37, 37, 43, 43, 43, 37, 37, 63, 37, 37, 43, 43, 43, 37, 37, 63, 37, 37, 43, 43, 43, 37, 37, 63) +// String.kt:119 $kotlin.String.toString (49, 49, 49, 49) +// StringBuilder.kt:225 $kotlin.text.StringBuilder.append (23, 23, 8, 23, 23, 8, 23, 23, 8, 23, 23, 8) +// StringBuilder.kt:226 $kotlin.text.StringBuilder.append (8, 28, 37, 8, 8, 28, 37, 8, 8, 28, 37, 8, 8, 28, 37, 8) +// StringBuilder.kt:696 $kotlin.text.StringBuilder.ensureExtraCapacity (8, 31, 41, 31, 8, 8, 31, 41, 31, 8, 8, 31, 41, 31, 8, 8, 31, 41, 31, 8, 8, 31, 41, 31, 8) +// StringBuilder.kt:700 $kotlin.text.StringBuilder.ensureCapacityInternal (12, 26, 12, 12, 26, 12, 12, 26, 12, 12, 26, 12, 12, 26, 12) +// StringBuilder.kt:701 $kotlin.text.StringBuilder.ensureCapacityInternal (12, 26, 32, 12, 12, 26, 32, 12, 12, 26, 32, 12, 12, 26, 32, 12, 12, 26, 32, 12) +// Arrays.kt:135 $kotlin.CharArray. (16, 24, 29, 16, 24, 29, 16, 24, 29, 16, 24, 29, 16, 24, 29, 16, 24, 29, 16, 24, 29, 16, 24, 29, 16, 24, 29) +// StringBuilder.kt:705 $kotlin.text.StringBuilder.ensureCapacityInternal (5, 5, 5, 5, 5) +// StringBuilder.kt:697 $kotlin.text.StringBuilder.ensureExtraCapacity (5, 5, 5, 5, 5) +// StringBuilder.kt:227 $kotlin.text.StringBuilder.append (8, 32, 39, 48, 19, 8, 8, 8, 32, 39, 48, 19, 8, 8, 8, 32, 39, 48, 19, 8, 8, 8, 32, 39, 48, 19, 8, 8) +// StringBuilder.kt:915 $kotlin.text.insertString (21, 28, 35, 42, 45, 51, 8, 58, 21, 28, 35, 42, 45, 51, 8, 58, 21, 28, 35, 42, 45, 51, 8, 58, 21, 28, 35, 42, 45, 51, 8, 58) +// StringBuilderWasm.kt:41 $kotlin.text.insertString (4, 4, 4, 4, 4, 4, 4, 4, 4, 4) +// _WasmArrays.kt:62 $kotlin.text.insertString (53, 60, 66, 53, 60, 66, 53, 60, 66, 53, 60, 66, 53, 60, 66) +// _WasmArrays.kt:79 $kotlin.text.insertString (21, 21, 21, 21, 21) +// _WasmArrays.kt:83 $kotlin.text.insertString (10, 3, 10, 3, 10, 3, 10, 3, 10, 3) +// _WasmArrays.kt:88 $kotlin.text.insertString (35, 48, 66, 74, 87, 4, 35, 48, 66, 74, 87, 4, 35, 48, 66, 74, 87, 4, 35, 48, 66, 74, 87, 4, 35, 48, 66, 74, 87, 4) +// StringBuilderWasm.kt:42 $kotlin.text.insertString (11, 4, 11, 4, 11, 4, 11, 4, 11, 4) +// StringBuilder.kt:228 $kotlin.text.StringBuilder.append (15, 8, 15, 8, 15, 8, 15, 8) +// StringBuilder.kt:178 $kotlin.text.StringBuilder.append (8, 28, 8) +// StringBuilder.kt:702 $kotlin.text.StringBuilder.ensureCapacityInternal (51, 57, 63, 39, 12) +// AbstractList.kt:141 $kotlin.collections.Companion.newCapacity (30, 45, 61, 45, 30) +// AbstractList.kt:142 $kotlin.collections.Companion.newCapacity (16, 30, 16, 44, 16) +// AbstractList.kt:144 $kotlin.collections.Companion.newCapacity (16, 30, 16, 45, 16) +// AbstractList.kt:146 $kotlin.collections.Companion.newCapacity (19, 12) +// StringBuilder.kt:703 $kotlin.text.StringBuilder.ensureCapacityInternal (12, 20, 33, 26, 12) +// _ArraysWasm.kt:1417 $kotlin.collections.copyOf (11, 44, 16, 4) +// _ArraysWasm.kt:1781 $kotlin.collections.copyOfUninitializedElements (11, 39, 42, 11, 4) +// _ArraysWasm.kt:1694 $kotlin.collections.copyOfUninitializedElements (18, 28, 18) +// _ArraysWasm.kt:1695 $kotlin.collections.copyOfUninitializedElements (8, 18, 8) +// _ArraysWasm.kt:1698 $kotlin.collections.copyOfUninitializedElements (17, 27, 17, 4) +// _ArraysWasm.kt:1699 $kotlin.collections.copyOfUninitializedElements (4, 18, 26, 29, 40, 61, 48, 9, 9) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 36, 4) +// _ArraysWasm.kt:1228 $kotlin.collections.copyInto (35, 47, 57, 62, 17) +// AbstractList.kt:119 $kotlin.collections.Companion.checkRangeIndexes (16, 28, 16, 33, 43, 33, 16, 28, 16, 33, 43, 33) +// AbstractList.kt:122 $kotlin.collections.Companion.checkRangeIndexes (16, 28, 16, 16, 28, 16) +// AbstractList.kt:125 $kotlin.collections.Companion.checkRangeIndexes (9, 9) +// _ArraysWasm.kt:1229 $kotlin.collections.copyInto (20, 31, 20, 4) +// _ArraysWasm.kt:1230 $kotlin.collections.copyInto (35, 54, 74, 54, 85, 97, 17) +// _ArraysWasm.kt:1231 $kotlin.collections.copyInto (25, 25) +// _WasmArrays.kt:244 $kotlin.collections.copyInto (42869, 42874, 42883, 42895) +// _WasmArrays.kt:88 $kotlin.collections.copyInto (35, 48, 66, 74, 87, 4) +// _ArraysWasm.kt:1232 $kotlin.collections.copyInto (11, 4) +// _ArraysWasm.kt:1700 $kotlin.collections.copyOfUninitializedElements (11, 4) +// StringBuilder.kt:179 $kotlin.text.StringBuilder.append (8, 29, 36, 45, 19, 8, 8) +// StringBuilderWasm.kt:52 $kotlin.text.insertInt (22, 28) +// Primitives.kt:1359 $kotlin.Int__toString-impl (21, 8, 24) +// Number2String.kt:199 $kotlin.wasm.internal. +// Number2String.kt:200 $kotlin.wasm.internal. +// Number2String.kt:201 $kotlin.wasm.internal. +// Number2String.kt:202 $kotlin.wasm.internal. +// Number2String.kt:203 $kotlin.wasm.internal. +// Number2String.kt:204 $kotlin.wasm.internal. +// Number2String.kt:206 $kotlin.wasm.internal. +// Library.kt:93 $kotlin.wasm.internal. (2841, 2841, 2841, 2841, 3432, 3432, 3432, 3432, 3453, 3432, 11556, 11560, 3484, 3463, 11556, 11560, 3515, 3494, 11556, 11560, 3546, 3525, 11556, 11560, 3581, 3560, 11556, 11560, 3612, 3591, 11556, 11560, 3643, 3622, 11556, 11560, 3674, 3653, 11556, 11560, 3709, 3688, 11556, 11560, 3740, 3719, 11556, 11560, 3771, 3750, 11556, 11560, 3802, 3781, 11556, 11560, 3837, 3816, 11556, 11560, 3868, 3847, 11556, 11560, 3899, 3878, 11556, 11560, 3930, 3909, 11556, 11560, 3965, 3944, 11556, 11560, 3996, 3975, 11556, 11560, 4027, 4006, 11556, 11560, 4058, 4037, 11556, 11560, 4093, 4072, 11556, 11560, 4124, 4103, 11556, 11560, 4155, 4134, 11556, 11560, 4186, 4165, 11556, 11560, 4221, 4200, 11556, 11560, 4252, 4231, 11556, 11560, 4283, 4262, 11556, 11560, 4314, 4293, 11556, 11560, 4349, 4328, 11556, 11560, 4380, 4359, 11556, 11560, 4411, 4390, 11556, 11560, 4442, 4421, 11556, 11560, 4477, 4456, 11556, 11560, 4508, 4487, 11556, 11560, 4539, 4518, 11556, 11560, 4570, 4549, 11556, 11560, 4605, 4584, 11556, 11560, 4636, 4615, 11556, 11560, 4667, 4646, 11556, 11560, 4698, 4677, 11556, 11560, 4733, 4712, 11556, 11560, 4764, 4743, 11556, 11560, 4795, 4774, 11556, 11560, 4826, 4805, 11556, 11560, 4861, 4840, 11556, 11560, 4892, 4871, 11556, 11560, 4923, 4902, 11556, 11560, 4954, 4933, 11556, 11560, 4989, 4968, 11556, 11560, 5020, 4999, 11556, 11560, 5051, 5030, 11556, 11560, 5082, 5061, 11556, 11560, 5117, 5096, 11556, 11560, 5148, 5127, 11556, 11560, 5179, 5158, 11556, 11560, 5210, 5189, 11556, 11560, 5245, 5224, 11556, 11560, 5276, 5255, 11556, 11560, 5307, 5286, 11556, 11560, 5338, 5317, 11556, 11560, 5373, 5352, 11556, 11560, 5404, 5383, 11556, 11560, 5435, 5414, 11556, 11560, 5466, 5445, 11556, 11560, 5501, 5480, 11556, 11560, 5532, 5511, 11556, 11560, 5563, 5542, 11556, 11560, 5594, 5573, 11556, 11560, 5629, 5608, 11556, 11560, 5660, 5639, 11556, 11560, 5691, 5670, 11556, 11560, 5722, 5701, 11556, 11560, 5757, 5736, 11556, 11560, 5788, 5767, 11556, 11560, 5819, 5798, 11556, 11560, 5850, 5829, 11556, 11560, 5885, 5864, 11556, 11560, 5916, 5895, 11556, 11560, 5947, 5926, 11556, 11560, 5978, 5957, 11556, 11560, 6013, 5992, 11556, 11560, 6044, 6023, 11556, 11560, 6075, 6054, 11556, 11560, 6106, 6085, 11556, 11560, 6141, 6120, 11556, 11560, 6172, 6151, 11556, 11560, 6203, 6182, 11556, 11560, 3432, 3432) +// Library.kt:69 $kotlin.wasm.internal. +// Number2String.kt:219 $kotlin.wasm.internal. +// ULong.kt:17 $kotlin.-impl> (125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125) +// Library.kt:54 $kotlin.wasm.internal. (66, 74) +// Number2String.kt:47 $kotlin.wasm.internal.itoa32 (8, 16, 8, 21, 29, 21) +// Number2String.kt:50 $kotlin.wasm.internal.itoa32 (8, 17, 8, 8) +// Number2String.kt:53 $kotlin.wasm.internal.itoa32 (8, 22, 8) +// 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: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) +// Number2String.kt:59 $kotlin.wasm.internal.itoa32 (23, 31, 23, 51) +// Number2String.kt:61 $kotlin.wasm.internal.itoa32 (34, 19, 46, 19) +// Number2String.kt:107 $kotlin.wasm.internal.decimalCount32 (8, 16, 8) +// Number2String.kt:108 $kotlin.wasm.internal.decimalCount32 (12, 20, 12) +// Number2String.kt:109 $kotlin.wasm.internal.decimalCount32 (19, 24, 33, 24, 19, 12) +// Number2String.kt:62 $kotlin.wasm.internal.itoa32 (28, 14) +// Number2String.kt:63 $kotlin.wasm.internal.itoa32 (18, 23, 33, 4) +// Number2String.kt:71 $kotlin.wasm.internal.utoaDecSimple (11, 23, 11, 11, 4) +// Number2String.kt:72 $kotlin.wasm.internal.utoaDecSimple (11, 18, 26, 11, 4) +// Number2String.kt:73 $kotlin.wasm.internal.utoaDecSimple (11, 25, 11, 30, 45, 52, 30, 4) +// Number2String.kt:75 $kotlin.wasm.internal.utoaDecSimple (14, 4) +// Number2String.kt:76 $kotlin.wasm.internal.utoaDecSimple (17, 4) +// Number2String.kt:78 $kotlin.wasm.internal.utoaDecSimple (16, 22, 16, 8) +// Primitives.kt:1066 $kotlin.Int__div-impl (24, 12, 69, 96) +// Number2String.kt:79 $kotlin.wasm.internal.utoaDecSimple (16, 22, 16, 8) +// Number2String.kt:80 $kotlin.wasm.internal.utoaDecSimple (14, 8) +// Number2String.kt:81 $kotlin.wasm.internal.utoaDecSimple +// Primitives.kt:1159 $kotlin.Int__dec-impl (15, 8, 16) +// Number2String.kt:82 $kotlin.wasm.internal.utoaDecSimple (8, 19, 39, 27, 15) +// Number2String.kt:41 $kotlin.wasm.internal.digitToChar (20, 11, 23, 11, 4) +// Number2String.kt:9 $kotlin.wasm.internal.CharCodes_initEntries +// Enum.kt:9 $kotlin.Enum. (4, 4, 4, 4, 4) +// Enum.kt:11 $kotlin.Enum. (4, 4, 4, 4, 4) +// Enum.kt:27 $kotlin.Enum. (1, 1, 1, 1, 1) +// Number2String.kt:7 $kotlin.wasm.internal.CharCodes. (29, 29, 29, 29, 29) +// Number2String.kt:38 $kotlin.wasm.internal.CharCodes. (1, 1, 1, 1, 1) +// Number2String.kt:10 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:11 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:12 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:32 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:42 $kotlin.wasm.internal.digitToChar (25, 32, 12, 39, 4) +// Primitives.kt:1306 $kotlin.Int__toChar-impl (18, 9, 45) +// Number2String.kt:83 $kotlin.wasm.internal.utoaDecSimple (13, 19, 13, 13) +// Number2String.kt:84 $kotlin.wasm.internal.utoaDecSimple +// Number2String.kt:64 $kotlin.wasm.internal.itoa32 (8, 16, 8) +// Number2String.kt:67 $kotlin.wasm.internal.itoa32 (15, 4) +// String.kt:138 $kotlin.wasm.internal.itoa32 (4, 4, 4, 4, 11, 17, 22, 29, 4, 34) +// StringBuilderWasm.kt:53 $kotlin.text.insertInt (17, 29, 4) +// StringBuilderWasm.kt:54 $kotlin.text.insertInt (17, 24, 31, 44, 47, 4, 4) +// StringBuilderWasm.kt:55 $kotlin.text.insertInt (11, 4) +// StringBuilder.kt:180 $kotlin.text.StringBuilder.append (15, 8) +// StringBuilder.kt:499 $kotlin.text.StringBuilder.toString (64, 71, 74, 38, 82) +// StringBuilderWasm.kt:46 $kotlin.text.unsafeStringFromCharArray (29, 15, 4) +// StringBuilderWasm.kt:47 $kotlin.text.unsafeStringFromCharArray (4, 4) +// _WasmArrays.kt:73 $kotlin.text.unsafeStringFromCharArray (3, 9, 31) +// _WasmArrays.kt:88 $kotlin.text.unsafeStringFromCharArray (35, 66, 74, 87, 4) +// StringBuilderWasm.kt:48 $kotlin.text.unsafeStringFromCharArray (16, 4) +// String.kt:138 $kotlin.text.unsafeStringFromCharArray (4, 4, 4, 4, 11, 17, 22, 29, 4, 34) +// test.kt:18 $box (17, 9, 9, 17, 12, 12) +// test.kt:1 $D.component1 +// test.kt:19 $box (4, 6, 6, 6, 6, 6, 6) +// test.kt:20 $box (12, 14, 18, 18, 18, 18, 12) +// test.kt:6 $E. (13, 25, 13, 25, 13, 25) +// test.kt:11 $E. (1, 1, 1) +// test.kt:21 $box (4, 13, 15, 19, 19, 19, 19, 13, 6, 6) +// test.kt:8 $E.equals (39, 44) +// test.kt:22 $box (4, 6, 6) +// test.kt:9 $E.hashCode (30, 32) +// test.kt:23 $box (4, 6, 6) +// test.kt:7 $E.toString (31, 31, 31, 31, 33) +// test.kt:24 $box (19, 9, 9, 19, 13, 13) +// test.kt:1 $E.component1 +// test.kt:25 $box (4, 6, 6) +// test.kt:10 $E.copy (17, 19, 22, 17, 24) +// test.kt:26 $box diff --git a/compiler/testData/debug/stepping/defaultParameter.kt b/compiler/testData/debug/stepping/defaultParameter.kt index 280aaa66e18..e4067b62b92 100644 --- a/compiler/testData/debug/stepping/defaultParameter.kt +++ b/compiler/testData/debug/stepping/defaultParameter.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -32,3 +32,12 @@ fun box() { // test.kt:5 computeParam // test.kt:8 foo // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:12 $box (4, 4, 8, 8, 8, 8) +// test.kt:9 $A. +// test.kt:7 $A.foo$default (4, 25, 25, 25, 25, 4) +// test.kt:5 $A.computeParam (25, 27) +// test.kt:8 $A.foo +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/delegation.kt b/compiler/testData/debug/stepping/delegation.kt index da3bd836caf..b7f0fad4daf 100644 --- a/compiler/testData/debug/stepping/delegation.kt +++ b/compiler/testData/debug/stepping/delegation.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt interface I { @@ -37,3 +37,11 @@ fun box() { // test.kt:11 f // test.kt:1 f // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:17 $box (12, 12) +// test.kt:14 $C. (15, 16) +// test.kt:18 $box (4, 6) +// test.kt:1 $C.f +// test.kt:11 $O.f +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/enum.kt b/compiler/testData/debug/stepping/enum.kt index 148a91af7c3..c1899cad669 100644 --- a/compiler/testData/debug/stepping/enum.kt +++ b/compiler/testData/debug/stepping/enum.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt enum class E() { @@ -54,3 +54,32 @@ fun box() { // test.kt:15 // test.kt:15 // test.kt:25 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4) +// Enum.kt:9 $kotlin.Enum. (4, 4, 4, 4) +// Enum.kt:11 $kotlin.Enum. (4, 4, 4, 4) +// Enum.kt:27 $kotlin.Enum. (1, 1, 1, 1) +// test.kt:12 $E. (15, 15) +// test.kt:13 $E. (1, 1) +// test.kt:23 $box +// test.kt:8 $E.foo (16, 16) +// test.kt:10 $E.foo +// test.kt:16 $E2_initEntries +// test.kt:15 $E2. (14, 14) +// test.kt:20 $E2. (1, 1) +// test.kt:18 $E2_initEntries +// test.kt:25 $box diff --git a/compiler/testData/debug/stepping/for.kt b/compiler/testData/debug/stepping/for.kt index 2575fe9462e..eef426e94a5 100644 --- a/compiler/testData/debug/stepping/for.kt +++ b/compiler/testData/debug/stepping/for.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { for (i in 1..3) { @@ -34,3 +34,9 @@ inline fun foo(n: Int) {} // test.kt:4 box // test.kt:4 box // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (14, 4, 17, 4, 14, 9, 14, 4, 17, 4, 4, 14, 9, 14, 4, 17, 4, 4, 14, 9, 14, 4, 17, 4, 4) +// test.kt:5 $box (8, 8, 8) +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/functionCallWithDefault.kt b/compiler/testData/debug/stepping/functionCallWithDefault.kt index d4eeedf5ae6..bb77e1362e7 100644 --- a/compiler/testData/debug/stepping/functionCallWithDefault.kt +++ b/compiler/testData/debug/stepping/functionCallWithDefault.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -27,3 +27,11 @@ inline fun bar(i: Int = 1) { // test.kt:5 box // test.kt:10 foo // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4, 4, 4) +// test.kt:9 $foo$default (0, 17, 17, 17, 17, 0) +// test.kt:10 $foo +// test.kt:6 $box +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt b/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt index 98d8645ff67..894bcfa4a30 100644 --- a/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt +++ b/compiler/testData/debug/stepping/functionCallWithInlinedLambdaParam.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt @@ -40,3 +40,13 @@ inline fun foo(f: () -> Unit) { // test.kt:16 box // test.kt:11 box // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (4, 4) +// test.kt:16 $box (12, 4, 12, 4) +// test.kt:17 $box (4, 4) +// test.kt:7 $box (20, 12) +// test.kt:10 $box +// test.kt:11 $box (16, 8) +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt b/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt index 7e8d808935f..9802e2c0287 100644 --- a/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt +++ b/compiler/testData/debug/stepping/functionCallWithLambdaParam.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -42,3 +42,13 @@ fun foo(f: () -> Unit) { // test.kt:11 box$lambda // test.kt:16 foo // test.kt:12 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (8, 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:10 $box$lambda.invoke (16, 8, 17) +// test.kt:12 $box diff --git a/compiler/testData/debug/stepping/functionInAnotherFile.kt b/compiler/testData/debug/stepping/functionInAnotherFile.kt index 465ab20b2ea..f7bf05c07b7 100644 --- a/compiler/testData/debug/stepping/functionInAnotherFile.kt +++ b/compiler/testData/debug/stepping/functionInAnotherFile.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: foo.kt import bar fun foo(x: Int): Int { @@ -45,3 +45,14 @@ fun bar(x: Int) = // foo.kt:6 foo // test.kt:22 bar // test.kt:15 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:14 $box (8, 4, 4) +// foo.kt:5 $foo (8, 13, 8, 8, 13, 8) +// foo.kt:8 $foo (15, 11, 4) +// test.kt:18 $bar (8, 12, 8) +// test.kt:19 $bar (12, 8) +// foo.kt:6 $foo (15, 8) +// test.kt:22 $bar +// test.kt:15 $box diff --git a/compiler/testData/debug/stepping/if.kt b/compiler/testData/debug/stepping/if.kt index 2fa63b3cc63..48ff51e1152 100644 --- a/compiler/testData/debug/stepping/if.kt +++ b/compiler/testData/debug/stepping/if.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box(): Int { @@ -29,3 +29,12 @@ inline fun getB(): Int { // test.kt:5 box // test.kt:12 getA // test.kt:9 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (8, 8) +// test.kt:15 $box (11, 4, 11, 4) +// test.kt:7 $box +// test.kt:12 $getA (13, 14) +// test.kt:9 $box (11, 4) +// test.kt:8 $box diff --git a/compiler/testData/debug/stepping/if2.kt b/compiler/testData/debug/stepping/if2.kt index bf606af8fb6..84fa117fad7 100644 --- a/compiler/testData/debug/stepping/if2.kt +++ b/compiler/testData/debug/stepping/if2.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun foo(x: Int) { @@ -45,3 +45,31 @@ fun box() { // test.kt:22 box // test.kt:18 foo // test.kt:23 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:21 $box (8, 4) +// test.kt:5 $foo (8, 12, 8, 8, 12, 8) +// test.kt:6 $foo (9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:9 $foo (8, 12, 8, 8, 12, 8) +// test.kt:13 $foo (8, 12, 8, 8, 12, 8) +// test.kt:14 $foo (9, 9, 9, 9) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:18 $foo (1, 1) +// test.kt:22 $box (8, 4) +// test.kt:10 $foo (9, 9, 9, 9) +// test.kt:16 $foo (9, 9, 9, 9) +// test.kt:23 $box diff --git a/compiler/testData/debug/stepping/ifThen.kt b/compiler/testData/debug/stepping/ifThen.kt index 7852dd4e474..4fd179ca36c 100644 --- a/compiler/testData/debug/stepping/ifThen.kt +++ b/compiler/testData/debug/stepping/ifThen.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo() { @@ -34,3 +34,13 @@ fun box() { // test.kt:5 foo // test.kt:8 foo // test.kt:16 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:13 $box +// test.kt:5 $foo (8, 8) +// test.kt:6 $foo +// test.kt:14 $box (11, 4) +// test.kt:15 $box +// test.kt:8 $foo +// test.kt:16 $box diff --git a/compiler/testData/debug/stepping/ifThenElse.kt b/compiler/testData/debug/stepping/ifThenElse.kt index f17a6d684c6..79012e32d8b 100644 --- a/compiler/testData/debug/stepping/ifThenElse.kt +++ b/compiler/testData/debug/stepping/ifThenElse.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun foo() { @@ -56,3 +56,31 @@ fun box() { // test.kt:11 foo // test.kt:16 foo // test.kt:24 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:21 $box +// test.kt:5 $foo (8, 8) +// test.kt:6 $foo (9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:11 $foo (16, 4, 16, 4) +// test.kt:12 $foo (9, 9, 9, 9) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8) +// test.kt:16 $foo (1, 1) +// test.kt:22 $box (11, 4) +// test.kt:23 $box +// test.kt:8 $foo (9, 9, 9, 9) +// test.kt:14 $foo (9, 9, 9, 9) +// test.kt:24 $box diff --git a/compiler/testData/debug/stepping/ifThenElseFalse.kt b/compiler/testData/debug/stepping/ifThenElseFalse.kt index d0a6bc46ef8..a746b23c5fa 100644 --- a/compiler/testData/debug/stepping/ifThenElseFalse.kt +++ b/compiler/testData/debug/stepping/ifThenElseFalse.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt var value = false @@ -49,3 +49,14 @@ fun box() { // test.kt:6 cond // test.kt:13 foo // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:16 $box +// test.kt:9 $foo (8, 8) +// test.kt:6 $cond (13, 18, 13, 18, 13, 18) +// test.kt:13 $foo (1, 1) +// test.kt:17 $box (12, 4) +// test.kt:18 $box +// test.kt:10 $foo (8, 8) +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/ifWithInlineInCondition.kt b/compiler/testData/debug/stepping/ifWithInlineInCondition.kt index 27f7ac7eba7..ffaa4bfb820 100644 --- a/compiler/testData/debug/stepping/ifWithInlineInCondition.kt +++ b/compiler/testData/debug/stepping/ifWithInlineInCondition.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { if (inlineFun()) { @@ -66,3 +66,19 @@ fun nop() {} // test.kt:20 box // test.kt:31 nop // test.kt:22 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box +// test.kt:25 $box (11, 4, 11, 4, 11, 4, 11, 4) +// test.kt:5 $box +// test.kt:31 $nop (12, 12, 12) +// test.kt:9 $box (20, 8) +// test.kt:29 $box (36, 40) +// test.kt:10 $box +// test.kt:12 $box +// test.kt:16 $box +// test.kt:17 $box +// test.kt:28 $box (37, 38) +// test.kt:20 $box +// test.kt:22 $box diff --git a/compiler/testData/debug/stepping/iincStepping.kt b/compiler/testData/debug/stepping/iincStepping.kt index 4ddb392f46c..da1eeae93b3 100644 --- a/compiler/testData/debug/stepping/iincStepping.kt +++ b/compiler/testData/debug/stepping/iincStepping.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -49,3 +49,23 @@ fun box() { // test.kt:15 box // test.kt:17 box // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (12, 4) +// test.kt:6 $box (4, 6) +// Primitives.kt:2 $box +// Primitives.kt:1150 $box (8, 15, 8, 16) +// test.kt:7 $box (4, 9, 4, 4) +// test.kt:8 $box (4, 4, 4) +// test.kt:9 $box +// test.kt:10 $box (4, 9, 4, 4) +// test.kt:11 $box (4, 4, 4) +// test.kt:12 $box +// test.kt:13 $box (8, 12, 8, 4) +// test.kt:15 $box (8, 12, 8) +// test.kt:14 $box +// test.kt:17 $box (8, 8) +// test.kt:18 $box +// test.kt:16 $box +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/implicitThis.kt b/compiler/testData/debug/stepping/implicitThis.kt index de604f872c7..ddec352002c 100644 --- a/compiler/testData/debug/stepping/implicitThis.kt +++ b/compiler/testData/debug/stepping/implicitThis.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -66,3 +66,16 @@ class A { // test.kt:13 test // test.kt:14 test // test.kt:6 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4, 8) +// test.kt:29 $A. +// test.kt:11 $A.test +// test.kt:18 $Companion.foo (20, 12) +// test.kt:19 $Companion.foo +// test.kt:12 $A.test (8, 8) +// test.kt:23 $Companion. (23, 16) +// test.kt:13 $A.test (15, 8) +// test.kt:14 $A.test +// test.kt:6 $box diff --git a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt index 72d3dcc6fd6..882671408b1 100644 --- a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt +++ b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -43,3 +43,17 @@ fun test(b: B) { // test.kt:11 invoke // test.kt:18 test // test.kt:6 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (9, 11, 11, 9, 4) +// test.kt:8 $A. +// test.kt:10 $B. +// test.kt:12 $B. +// test.kt:15 $test (4, 4) +// Standard.kt:67 $test +// Standard.kt:70 $test (20, 4) +// Standard.kt:3 $test +// test.kt:11 $B.invoke +// test.kt:18 $test +// test.kt:6 $box diff --git a/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt b/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt index d7a71060552..ee9fd288e88 100644 --- a/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt +++ b/compiler/testData/debug/stepping/inTheEndOfLambdaArgumentOfInlineCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt @@ -44,3 +44,14 @@ fun nop() {} // test.kt:18 box // test.kt:21 nop // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test.kt:13 $box +// test.kt:21 $nop (12, 12, 12) +// test.kt:14 $box +// test.kt:7 $box +// test.kt:8 $box +// test.kt:18 $box +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/initBlocks.kt b/compiler/testData/debug/stepping/initBlocks.kt index 3c838aebd62..f52b319e725 100644 --- a/compiler/testData/debug/stepping/initBlocks.kt +++ b/compiler/testData/debug/stepping/initBlocks.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class Foo { @@ -119,3 +119,40 @@ fun box() { // test.kt:43 // test.kt:34 // test.kt:53 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:49 $box (4, 4, 4) +// test.kt:8 $Foo. (8, 12, 8) +// test.kt:46 $x (10, 10, 10, 10, 12, 10, 10, 10, 10, 12) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:10 $Foo. +// test.kt:50 $box (4, 4, 4) +// test.kt:14 $Bar. (16, 8) +// test.kt:18 $Bar. (16, 8) +// test.kt:20 $Bar. +// test.kt:51 $box (4, 4, 4) +// test.kt:24 $Boo. (16, 8) +// test.kt:27 $Boo. +// String.kt:143 $kotlin.stringLiteral (15, 8) +// test.kt:30 $Boo. (16, 8) +// test.kt:32 $Boo. +// test.kt:52 $box (4, 4, 4) +// test.kt:35 $Zoo. (19, 11) +// test.kt:37 $Zoo. (19, 11) +// test.kt:40 $Zoo. (16, 8) +// test.kt:43 $Zoo. (19, 11) +// test.kt:44 $Zoo. +// test.kt:53 $box diff --git a/compiler/testData/debug/stepping/initBlocksCompanion.kt b/compiler/testData/debug/stepping/initBlocksCompanion.kt index 45f41c61ec4..87d199833ad 100644 --- a/compiler/testData/debug/stepping/initBlocksCompanion.kt +++ b/compiler/testData/debug/stepping/initBlocksCompanion.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt class A { @@ -64,3 +64,29 @@ fun box() { // test.kt:5 // test.kt:31 box // test.kt:32 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:9 $Companion. (12, 17, 17, 17, 17, 12) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:12 $Companion. +// test.kt:27 $x (10, 10, 10, 10, 12) +// test.kt:14 $Companion. (23, 15) +// test.kt:17 $Companion. (20, 12) +// test.kt:22 $Companion. (20, 12) +// test.kt:24 $Companion. +// test.kt:30 $box +// test.kt:31 $box +// test.kt:32 $box diff --git a/compiler/testData/debug/stepping/inlineCallableReference.kt b/compiler/testData/debug/stepping/inlineCallableReference.kt index 68bd47bd6f0..575098a09b7 100644 --- a/compiler/testData/debug/stepping/inlineCallableReference.kt +++ b/compiler/testData/debug/stepping/inlineCallableReference.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { var x = false @@ -41,3 +41,15 @@ inline fun f(block: () -> Unit) { // test.kt:9 box // test.kt:11 box // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (12, 4) +// test.kt:5 $box (4, 4) +// test.kt:16 $box (4, 4) +// test.kt:6 $box (12, 8) +// test.kt:9 $box +// test.kt:8 $box +// test.kt:10 $box +// test.kt:11 $box (12, 8) +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/inlineNamedCallableReference.kt b/compiler/testData/debug/stepping/inlineNamedCallableReference.kt index 23df92afaa0..0cb23199d1d 100644 --- a/compiler/testData/debug/stepping/inlineNamedCallableReference.kt +++ b/compiler/testData/debug/stepping/inlineNamedCallableReference.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { var x = false @@ -26,3 +26,11 @@ fun g() {} // test.kt:5 box // test.kt:12 g // test.kt:6 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (12, 4) +// test.kt:5 $box +// test.kt:9 $box (4, 4) +// test.kt:12 $g +// test.kt:6 $box diff --git a/compiler/testData/debug/stepping/inlineSimpleCall.kt b/compiler/testData/debug/stepping/inlineSimpleCall.kt index e0b42ac361f..5161a273f46 100644 --- a/compiler/testData/debug/stepping/inlineSimpleCall.kt +++ b/compiler/testData/debug/stepping/inlineSimpleCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt @@ -53,3 +53,12 @@ fun box() { // EXPECTATIONS JS_IR // test.kt:25 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:10 $box (4, 4) +// test.kt:6 $box (4, 4, 4, 4) +// test.kt:14 $box (4, 4) +// test.kt:18 $box +// test.kt:21 $box +// test.kt:25 $box diff --git a/compiler/testData/debug/stepping/kt15259.kt b/compiler/testData/debug/stepping/kt15259.kt index 1ec0b59c783..9757e5a861c 100644 --- a/compiler/testData/debug/stepping/kt15259.kt +++ b/compiler/testData/debug/stepping/kt15259.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt interface ObjectFace @@ -27,3 +27,11 @@ fun box() { // test.kt:9 makeFace // test.kt:6 // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:12 $box (4, 4) +// test.kt:6 $makeFace (25, 25) +// test.kt:9 $. +// test.kt:9 $makeFace +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/kt29179.kt b/compiler/testData/debug/stepping/kt29179.kt index ae0d4d59e1c..1287fa05ed6 100644 --- a/compiler/testData/debug/stepping/kt29179.kt +++ b/compiler/testData/debug/stepping/kt29179.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -32,3 +32,25 @@ fun box() { // test.kt:15 box // test.kt:11 foo // test.kt:16 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:15 $box (4, 4, 8) +// test.kt:5 $A. +// test.kt:12 $A. +// test.kt:10 $A.foo (13, 13, 13, 13) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:11 $A.foo +// test.kt:16 $box diff --git a/compiler/testData/debug/stepping/kt42208.kt b/compiler/testData/debug/stepping/kt42208.kt index 5f16a26a7e6..55023fb4904 100644 --- a/compiler/testData/debug/stepping/kt42208.kt +++ b/compiler/testData/debug/stepping/kt42208.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // IGNORE_INLINER: IR // FILE: test.kt @@ -23,3 +23,11 @@ inline fun foo() = { // test1.kt:10 box // test1.kt:8 box$lambda // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (4, 4) +// test1.kt:10 $box (19, 19) +// test1.kt:11 $box +// test.kt:8 $box$lambda.invoke +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/kt42208b.kt b/compiler/testData/debug/stepping/kt42208b.kt index 286d1afbb9c..62214cc79f1 100644 --- a/compiler/testData/debug/stepping/kt42208b.kt +++ b/compiler/testData/debug/stepping/kt42208b.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // IGNORE_INLINER: IR // FILE: test.kt @@ -26,3 +26,12 @@ inline fun foo() = { // test.kt:7 box // test1.kt:9 box$lambda // test.kt:8 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test1.kt:11 $box (19, 19) +// test1.kt:12 $box +// test.kt:7 $box +// test.kt:9 $box$lambda.invoke +// test.kt:8 $box diff --git a/compiler/testData/debug/stepping/kt42208c.kt b/compiler/testData/debug/stepping/kt42208c.kt index 55e515bad43..4d649d6b2b0 100644 --- a/compiler/testData/debug/stepping/kt42208c.kt +++ b/compiler/testData/debug/stepping/kt42208c.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // IGNORE_INLINER: IR // FILE: test.kt @@ -40,11 +40,23 @@ fun baz(v:(() -> Unit)) { // test1.kt:12 box // test.kt:6 box // test3.kt:16 baz -// test.kt:8 box$lambda +// test1.kt:10 box$lambda // test3.kt:17 baz // test1.kt:12 box // test.kt:8 box // test3.kt:16 baz -// test.kt:8 box$lambda +// test1.kt:10 box$lambda // test3.kt:17 baz // test.kt:9 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (8, 4) +// test1.kt:12 $box (19, 19, 19, 19) +// test1.kt:13 $box (1, 1) +// test3.kt:16 $baz (4, 4) +// test.kt:10 $box$lambda.invoke +// test3.kt:17 $baz (1, 1) +// test.kt:7 $box +// test.kt:8 $box (8, 4) +// test.kt:9 $box diff --git a/compiler/testData/debug/stepping/lambdaStepInline.kt b/compiler/testData/debug/stepping/lambdaStepInline.kt index cd86081fa66..daf7d436caf 100644 --- a/compiler/testData/debug/stepping/lambdaStepInline.kt +++ b/compiler/testData/debug/stepping/lambdaStepInline.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt inline fun foo(stringMaker: () -> String): String { @@ -27,3 +27,96 @@ fun box(): String { // EXPECTATIONS JS_IR // test.kt:14 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:9 $box (4, 11, 11, 11, 11) +// test.kt:5 $box (11, 11, 4, 11, 11, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:10 $box +// test.kt:11 $box (9, 9, 9, 9) +// test.kt:14 $box (12, 12, 12, 12, 4) +// String.kt:143 $kotlin.stringLiteral (15, 8) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt index bed38a0cfce..32652d33a6e 100644 --- a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt +++ b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt inline fun foo(stringMaker: () -> String = { "OK" }): String { return stringMaker() @@ -32,3 +32,98 @@ fun box(): String { // EXPECTATIONS JS_IR // test.kt:17 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:15 $box +// test.kt:4 $box (11, 11, 4) +// test.kt:3 $box (46, 46, 46, 46) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:16 $box +// test.kt:11 $box (11, 11, 4) +// test.kt:8 $box (5, 5, 5, 5) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:17 $box (12, 12, 12, 12, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/lineNumberAfterInline.kt b/compiler/testData/debug/stepping/lineNumberAfterInline.kt index 1ce6577de2b..08c3b8ca25d 100644 --- a/compiler/testData/debug/stepping/lineNumberAfterInline.kt +++ b/compiler/testData/debug/stepping/lineNumberAfterInline.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun normalFunction() { @@ -47,3 +47,32 @@ fun box() { // test.kt:6 normalFunction // test.kt:20 test2 // test.kt:25 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:23 $box +// test.kt:13 $test1 (4, 4) +// test.kt:9 $test1 (5, 5, 5, 5) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:14 $test1 (5, 5, 5, 5) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8) +// test.kt:15 $test1 +// test.kt:24 $box +// test.kt:18 $test2 +// test.kt:5 $normalFunction (5, 5, 5, 5) +// test.kt:6 $normalFunction +// test.kt:19 $test2 (5, 5, 5, 5) +// test.kt:20 $test2 +// test.kt:25 $box diff --git a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt index fe87187a0bb..65ef9f3d7a6 100644 --- a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt +++ b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -27,3 +27,24 @@ inline fun lookAtMe(f: (String) -> Unit) { // test.kt:12 box // test.kt:7 box // test.kt:9 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test.kt:12 $box (13, 13, 13, 13, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:13 $box +// test.kt:7 $box (17, 17, 17, 17, 8) +// test.kt:9 $box diff --git a/compiler/testData/debug/stepping/localFunction.kt b/compiler/testData/debug/stepping/localFunction.kt index b09605059dd..addaddd0ce8 100644 --- a/compiler/testData/debug/stepping/localFunction.kt +++ b/compiler/testData/debug/stepping/localFunction.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -25,3 +25,27 @@ fun box() { // test.kt:11 box // test.kt:9 box$bar // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (5, 5, 5, 5) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:10 $box (5, 5, 5, 5) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8) +// test.kt:11 $box +// test.kt:8 $box$bar (9, 9, 9, 9) +// test.kt:9 $box$bar +// test.kt:12 $box (5, 5, 5, 5) +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt b/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt index 74ab8bcc598..4130766af56 100644 --- a/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt +++ b/compiler/testData/debug/stepping/localFunctionWIthOnelineExpressionBody.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -23,3 +23,26 @@ fun box() { // test.kt:9 box // test.kt:7 box$bar // test.kt:11 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (5, 5, 5, 5) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:8 $box (5, 5, 5, 5) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8) +// test.kt:9 $box (4, 4) +// test.kt:7 $box$bar (17, 17, 17, 17, 19) +// test.kt:10 $box (5, 5, 5, 5) +// test.kt:11 $box diff --git a/compiler/testData/debug/stepping/localProperty.kt b/compiler/testData/debug/stepping/localProperty.kt index b113b8e97f3..d1a33ce5f86 100644 --- a/compiler/testData/debug/stepping/localProperty.kt +++ b/compiler/testData/debug/stepping/localProperty.kt @@ -1,5 +1,5 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box(): String { @@ -28,3 +28,123 @@ fun box(): String { // test.kt:9 box // test.kt:12 box // test.kt:14 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:9 $box (9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:6 $box +// test.kt:12 $box (13, 13, 13, 13, 4) +// test.kt:14 $box (11, 15, 11, 4) +// String.kt:28 $kotlin.String.plus (20, 26, 8) +// Library.kt:19 $kotlin.toString (37, 37, 43, 43, 43, 37, 37, 63) +// String.kt:119 $kotlin.String.toString +// String.kt:29 $kotlin.String.plus (15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 15, 8) +// String.kt:63 $kotlin.String.plus +// String.kt:66 $kotlin.String.plus (15, 8) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:64 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:45 $kotlin.String.foldChars (27, 32) +// String.kt:46 $kotlin.String.foldChars (37, 23, 8) +// String.kt:48 $kotlin.String.foldChars (32, 8) +// String.kt:49 $kotlin.String.foldChars (41, 8) +// String.kt:50 $kotlin.String.foldChars (15, 15, 15) +// String.kt:51 $kotlin.String.foldChars (41, 59, 41, 59) +// String.kt:52 $kotlin.String.foldChars (39, 62, 12, 39, 62, 12) +// String.kt:53 $kotlin.String.foldChars (12, 33, 12, 12, 12, 33, 12, 12) +// String.kt:54 $kotlin.String.foldChars (12, 12, 12, 12) +// _WasmArrays.kt:71 $kotlin.String.foldChars (4, 1, 4, 1) +// _WasmArrays.kt:88 $kotlin.String.foldChars (35, 48, 66, 87, 4, 35, 48, 66, 87, 4) +// String.kt:55 $kotlin.String.foldChars (32, 50, 12, 32, 50, 12) +// String.kt:57 $kotlin.String.foldChars (8, 8) +// Preconditions.kt:77 $kotlin.String.foldChars (2, 2) +// Preconditions.kt:78 $kotlin.String.foldChars +// Preconditions.kt:80 $kotlin.String.foldChars +// Preconditions.kt:83 $kotlin.String.foldChars +// Preconditions.kt:27 $kotlin.String.foldChars +// Preconditions.kt:29 $kotlin.String.foldChars (3, 2) +// String.kt:58 $kotlin.String.foldChars (8, 17, 8) +// String.kt:59 $kotlin.String.foldChars (8, 22, 8) +// String.kt:60 $kotlin.String.foldChars +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/multiModule.kt b/compiler/testData/debug/stepping/multiModule.kt index cdfa6e05f93..1d836750e81 100644 --- a/compiler/testData/debug/stepping/multiModule.kt +++ b/compiler/testData/debug/stepping/multiModule.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // MODULE: lib // FILE: a.kt @@ -31,3 +31,24 @@ fun box() { // test.kt:16 box // b.kt:9 b // test.kt:17 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:15 $box (4, 4) +// a.kt:5 $a (11, 11, 11, 11, 12) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:16 $box (4, 4) +// b.kt:9 $b (11, 11, 11, 11, 12) +// test.kt:17 $box diff --git a/compiler/testData/debug/stepping/multilineExpression.kt b/compiler/testData/debug/stepping/multilineExpression.kt index 4e061cde88d..cf34ed2ec65 100644 --- a/compiler/testData/debug/stepping/multilineExpression.kt +++ b/compiler/testData/debug/stepping/multilineExpression.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt // KT-17753 @@ -25,3 +25,11 @@ fun test(a: Boolean, b: Boolean, c: Boolean): Boolean { // test.kt:6 box // test.kt:10 test // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box (9, 15, 21, 4, 4) +// test.kt:10 $test (11, 4) +// test.kt:11 $test +// test.kt:12 $test +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/multilineFunctionCall.kt b/compiler/testData/debug/stepping/multilineFunctionCall.kt index f16f3896cfe..534ebb1d7bb 100644 --- a/compiler/testData/debug/stepping/multilineFunctionCall.kt +++ b/compiler/testData/debug/stepping/multilineFunctionCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -20,3 +20,10 @@ fun foo(i: Int) { // test.kt:5 box // test.kt:11 foo // test.kt:8 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test.kt:5 $box +// test.kt:11 $foo +// test.kt:8 $box diff --git a/compiler/testData/debug/stepping/multilineInfixCall.kt b/compiler/testData/debug/stepping/multilineInfixCall.kt index 8584988e9ce..acddf3d670c 100644 --- a/compiler/testData/debug/stepping/multilineInfixCall.kt +++ b/compiler/testData/debug/stepping/multilineInfixCall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -20,3 +20,10 @@ infix fun Int.foo(i: Int) { // test.kt:5 box // test.kt:10 foo // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4) +// test.kt:6 $box +// test.kt:10 $foo +// test.kt:7 $box diff --git a/compiler/testData/debug/stepping/namedCallableReference.kt b/compiler/testData/debug/stepping/namedCallableReference.kt index a2120a58ec4..3c8349a0552 100644 --- a/compiler/testData/debug/stepping/namedCallableReference.kt +++ b/compiler/testData/debug/stepping/namedCallableReference.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { var x = false @@ -31,3 +31,12 @@ fun g() {} // test.kt:12 g // test.kt:10 f // test.kt:6 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (12, 4) +// test.kt:5 $box (6, 6, 4) +// test.kt:9 $f +// test.kt:12 $g +// test.kt:10 $f +// test.kt:6 $box diff --git a/compiler/testData/debug/stepping/nestedInline.kt b/compiler/testData/debug/stepping/nestedInline.kt index 66ec14ce17c..1983d3fe832 100644 --- a/compiler/testData/debug/stepping/nestedInline.kt +++ b/compiler/testData/debug/stepping/nestedInline.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // This is same as kotlin/compiler/testData/codegen/boxInline/smap/smap.kt // FILE: test.kt @@ -72,3 +72,100 @@ inline fun html(init: () -> Unit) { // 1.kt:38 box // test.kt:16 box // test.kt:22 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:20 $box +// test.kt:8 $box (15, 15, 15, 15, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:10 $box (4, 4) +// test.kt:25 $box (98, 23, 46, 39, 91) +// test.kt:2 $box +// test.kt:11 $box +// test.kt:7 $box (20, 12, 27) +// test.kt:12 $box (19, 19, 19, 19, 12) +// test.kt:16 $box (11, 4) +// test.kt:22 $box (11, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt b/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt index 3b5be4af012..b6362660970 100644 --- a/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt +++ b/compiler/testData/debug/stepping/noLinenumberInInvokeOfSuspendLambda.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // WITH_STDLIB // TODO: Enable the test on JS BE, but now it is too flaky there. // TARGET_BACKEND: JVM @@ -55,3 +55,5 @@ fun box() { // Continuation.kt:71 resumeWith // test.kt:13 builder // test.kt:24 box + +// EXPECTATIONS WASM diff --git a/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt b/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt index 3ad83e9b0a4..4f5802095a4 100644 --- a/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt +++ b/compiler/testData/debug/stepping/noParametersArgumentCallInExpression.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -26,3 +26,11 @@ inline fun lookAtMe(f: () -> Int) { // test.kt:12 box // test.kt:13 box // test.kt:9 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:6 $box +// test.kt:12 $box +// test.kt:13 $box (4, 8, 4, 4) +// test.kt:7 $box (8, 8) +// test.kt:9 $box diff --git a/compiler/testData/debug/stepping/nullcheck.kt b/compiler/testData/debug/stepping/nullcheck.kt index e84ae0b8155..d9dc4f2dc6a 100644 --- a/compiler/testData/debug/stepping/nullcheck.kt +++ b/compiler/testData/debug/stepping/nullcheck.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -56,3 +56,29 @@ fun testExpressionBody(nullable: String?) = // test.kt:10 box // test.kt:22 testExpressionBody // test.kt:11 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:7 $box (10, 10, 10, 10, 4, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:14 $test (11, 4, 11, 4) +// test.kt:16 $test (12, 21, 31, 12) +// test.kt:8 $box (9, 4, 4) +// test.kt:9 $box (24, 24, 24, 24, 4, 4) +// String.kt:143 $kotlin.stringLiteral (15, 8) +// test.kt:20 $testExpressionBody (4, 4) +// test.kt:22 $testExpressionBody (12, 21, 31, 12, 32, 32) +// test.kt:10 $box (23, 4, 4) +// test.kt:11 $box diff --git a/compiler/testData/debug/stepping/overridenGetterSetter.kt b/compiler/testData/debug/stepping/overridenGetterSetter.kt index 082220178c4..fef5f128ecd 100644 --- a/compiler/testData/debug/stepping/overridenGetterSetter.kt +++ b/compiler/testData/debug/stepping/overridenGetterSetter.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt interface MyInterfaceWithoutBreakpoints { @@ -83,3 +83,24 @@ fun box() { // test.kt:26 testPropertyInInterfaceImpl // test.kt:27 testPropertyInInterfaceImpl // test.kt:34 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:31 $box (17, 17) +// test.kt:18 $MyInterfaceImplWithBreakpoints. +// test.kt:21 $MyInterfaceImplWithBreakpoints. +// test.kt:28 $MyInterfaceImplWithBreakpoints. +// test.kt:32 $box (4, 11, 11, 11, 11, 11) +// test.kt:9 $MyInterfaceWithoutBreakpoints.testPropertyInInterface +// test.kt:18 $MyInterfaceImplWithBreakpoints. +// test.kt:10 $MyInterfaceWithoutBreakpoints.testPropertyInInterface +// test.kt:21 $MyInterfaceImplWithBreakpoints. +// test.kt:11 $MyInterfaceWithoutBreakpoints.testPropertyInInterface (8, 19, 8) +// test.kt:21 $MyInterfaceImplWithBreakpoints. (13, 29) +// test.kt:12 $MyInterfaceWithoutBreakpoints.testPropertyInInterface +// test.kt:33 $box (4, 11) +// test.kt:24 $MyInterfaceImplWithBreakpoints.testPropertyInInterfaceImpl +// test.kt:25 $MyInterfaceImplWithBreakpoints.testPropertyInInterfaceImpl +// test.kt:26 $MyInterfaceImplWithBreakpoints.testPropertyInInterfaceImpl (8, 19, 8) +// test.kt:27 $MyInterfaceImplWithBreakpoints.testPropertyInInterfaceImpl +// test.kt:34 $box diff --git a/compiler/testData/debug/stepping/primitiveNullChecks.kt b/compiler/testData/debug/stepping/primitiveNullChecks.kt index de0523f8174..fe6e637efed 100644 --- a/compiler/testData/debug/stepping/primitiveNullChecks.kt +++ b/compiler/testData/debug/stepping/primitiveNullChecks.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box(): String { @@ -17,3 +17,93 @@ fun box(): String { // test.kt:6 box // test.kt:6 box // test.kt:7 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:5 $box +// test.kt:6 $box +// test.kt:7 $box (12, 12, 12, 12, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/propertyAccessor.kt b/compiler/testData/debug/stepping/propertyAccessor.kt index 066308f68cb..d483c49af09 100644 --- a/compiler/testData/debug/stepping/propertyAccessor.kt +++ b/compiler/testData/debug/stepping/propertyAccessor.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt class A { @@ -26,3 +26,10 @@ fun box() { // test.kt:12 box // test.kt:7 // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:12 $box (4, 4, 8, 8) +// test.kt:9 $A. +// test.kt:7 $A. (19, 12) +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/psvm.kt b/compiler/testData/debug/stepping/psvm.kt index d74e3f551dd..a7783b5efe0 100644 --- a/compiler/testData/debug/stepping/psvm.kt +++ b/compiler/testData/debug/stepping/psvm.kt @@ -1,4 +1,5 @@ // IGNORE_BACKEND: WASM +// ^^ Because main function will be called firstly with empty arguments that will chrash runtime // FILE: test.kt fun main(args: Array) { @@ -10,13 +11,13 @@ fun box() { } // EXPECTATIONS JVM_IR -// test.kt:9 box -// test.kt:5 main -// test.kt:6 main // test.kt:10 box +// test.kt:6 main +// test.kt:7 main +// test.kt:11 box // EXPECTATIONS JS_IR -// test.kt:9 box -// test.kt:5 main -// test.kt:6 main // test.kt:10 box +// test.kt:6 main +// test.kt:7 main +// test.kt:11 box diff --git a/compiler/testData/debug/stepping/recursion.kt b/compiler/testData/debug/stepping/recursion.kt index 336d538a2f8..91bc9e1beee 100644 --- a/compiler/testData/debug/stepping/recursion.kt +++ b/compiler/testData/debug/stepping/recursion.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { val n = 3 @@ -38,3 +38,12 @@ fun foo(n :Int ) : Int { // test.kt:12 foo // test.kt:12 foo // test.kt:6 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box +// test.kt:5 $box (16, 12, 4) +// test.kt:9 $foo (8, 13, 8, 18, 23, 18, 8, 13, 8, 18, 23, 18, 8, 13, 8) +// test.kt:12 $foo (15, 17, 15, 11, 15, 17, 15, 11, 22, 11, 4, 22, 11, 4) +// test.kt:10 $foo (15, 8) +// test.kt:6 $box diff --git a/compiler/testData/debug/stepping/simpleDefaultArg.kt b/compiler/testData/debug/stepping/simpleDefaultArg.kt index 2249e15cd46..45e25ae031b 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArg.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun ifoo(ok: String = "OK"): String { @@ -19,3 +19,93 @@ fun box(): String { // EXPECTATIONS JS_IR // test.kt:9 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:9 $box (11, 11, 11, 11, 4) +// test.kt:4 $ifoo$default (0, 23, 23, 23, 23, 0) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:5 $ifoo (11, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt index 2b81188804a..9ed93fb5a69 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -28,3 +28,97 @@ fun box(): String { // EXPECTATIONS JS_IR // test.kt:15 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:14 $box +// test.kt:5 $box (30, 30, 30, 30) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:6 $box +// test.kt:15 $box (11, 11, 11, 11, 4) +// test.kt:9 $ifoo2$default (0, 24, 24, 24, 24, 0) +// String.kt:143 $kotlin.stringLiteral (15, 8) +// test.kt:10 $ifoo2 (11, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt index 1367331454f..4a7717c1212 100644 --- a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt inline fun alsoInline() = "OK" @@ -21,3 +21,94 @@ fun box(): String { // EXPECTATIONS JS_IR // test.kt:11 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:11 $box (11, 4) +// test.kt:6 $box +// test.kt:4 $box (27, 27, 27, 27, 29) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:7 $box (11, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/simpleSmap.kt b/compiler/testData/debug/stepping/simpleSmap.kt index 054202e4e38..d114c8520fa 100644 --- a/compiler/testData/debug/stepping/simpleSmap.kt +++ b/compiler/testData/debug/stepping/simpleSmap.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt @@ -24,3 +24,23 @@ fun box() { // EXPECTATIONS JS_IR // test.kt:14 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:11 $box +// test.kt:7 $box +// test.kt:12 $box (9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:14 $box diff --git a/compiler/testData/debug/stepping/smapInlineAsArgument.kt b/compiler/testData/debug/stepping/smapInlineAsArgument.kt index c1bd8c80b9c..b3fb462acf5 100644 --- a/compiler/testData/debug/stepping/smapInlineAsArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsArgument.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box(){ @@ -48,3 +48,29 @@ fun fail() : String { // test.kt:8 box // test.kt:14 checkEquals // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (16, 4) +// test.kt:17 $box (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4) +// test.kt:6 $box +// test.kt:21 $fail (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// test.kt:13 $checkEquals (5, 5, 5, 5, 5, 5, 5, 5) +// test.kt:14 $checkEquals (1, 1) +// test.kt:8 $box (16, 4) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8) +// test.kt:9 $box +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt index 295cbb3d731..f7dbd3d1a90 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt infix fun String.execute(p: String) = this + p @@ -46,3 +46,34 @@ fun fail() : String { // test.kt:10 box // test.kt:4 execute // test.kt:12 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:7 $box (4, 4, 4) +// test.kt:15 $box (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:8 $box +// test.kt:19 $fail (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// test.kt:4 $execute (38, 45, 38, 46, 38, 45, 38, 46) +// String.kt:28 $kotlin.String.plus (20, 26, 8, 20, 26, 8) +// Library.kt:19 $kotlin.toString (37, 37, 43, 43, 43, 37, 37, 63, 37, 37, 43, 43, 43, 37, 37, 63) +// String.kt:119 $kotlin.String.toString (49, 49) +// String.kt:29 $kotlin.String.plus (15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 15, 8, 15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 15, 8) +// String.kt:63 $kotlin.String.plus (12, 12) +// String.kt:66 $kotlin.String.plus (15, 8, 15, 8) +// test.kt:10 $box (4, 4, 4) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:11 $box +// test.kt:12 $box diff --git a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt index d8b60589335..2c403970702 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box(){ @@ -44,3 +44,27 @@ fun fail() : String { // test.kt:8 box // test.kt:21 fail // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 9) +// test.kt:17 $box (12, 12, 12, 12, 4, 12, 12, 12, 12, 4, 12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:6 $box +// test.kt:21 $fail (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8) +// test.kt:8 $box (4, 9, 4) +// test.kt:9 $box +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt index 8c206bc0a59..f1c0e3fdef4 100644 --- a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box(){ @@ -39,3 +39,33 @@ fun fail() : String { // test.kt:17 fail // test.kt:8 box // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (4, 4, 4) +// test.kt:13 $box (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4) +// test.kt:6 $box +// test.kt:17 $fail (12, 12, 12, 12, 4, 12, 12, 12, 12, 4) +// String.kt:28 $kotlin.String.plus (20, 26, 8, 20, 26, 8) +// Library.kt:19 $kotlin.toString (37, 37, 43, 43, 43, 37, 37, 63, 37, 37, 43, 43, 43, 37, 37, 63) +// String.kt:119 $kotlin.String.toString (49, 49) +// String.kt:29 $kotlin.String.plus (15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 15, 8, 15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 15, 8) +// String.kt:63 $kotlin.String.plus (12, 12) +// String.kt:66 $kotlin.String.plus (15, 8, 15, 8) +// test.kt:8 $box (4, 4, 4) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:9 $box +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/stringSwitches.kt b/compiler/testData/debug/stepping/stringSwitches.kt index 96cc4799322..0436408b12a 100644 --- a/compiler/testData/debug/stepping/stringSwitches.kt +++ b/compiler/testData/debug/stepping/stringSwitches.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun stringSwitch(x: String) { @@ -118,3 +118,62 @@ fun box() { // test.kt:25 stringSwitch // test.kt:27 stringSwitch // test.kt:34 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:30 $box (18, 18, 18, 18, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4) +// test.kt:6 $stringSwitch (8, 14, 14, 14, 14, 8, 20, 8, 8, 8) +// String.kt:122 $kotlin.String.hashCode (12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28) +// String.kt:123 $kotlin.String.hashCode (30, 30, 30, 30) +// String.kt:124 $kotlin.String.hashCode (12, 26, 12, 12, 26, 12, 12, 26, 12, 12, 26, 12) +// String.kt:126 $kotlin.String.hashCode (24, 8, 24, 8, 24, 8, 24, 8) +// String.kt:63 $kotlin.String.hashCode (12, 12, 12, 12) +// String.kt:66 $kotlin.String.hashCode (15, 8, 15, 8, 15, 8, 15, 8) +// String.kt:127 $kotlin.String.hashCode (19, 8, 19, 8, 19, 8, 19, 8) +// String.kt:128 $kotlin.String.hashCode (8, 8, 8, 8, 8, 8, 8, 8) +// Standard.kt:152 $kotlin.String.hashCode (4, 4, 4, 4) +// Standard.kt:154 $kotlin.String.hashCode (18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4) +// Standard.kt:155 $kotlin.String.hashCode (8, 8, 8, 8, 8, 8, 8, 8, 8, 8) +// Standard.kt:136 $kotlin.String.hashCode (52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44) +// Standard.kt:138 $kotlin.String.hashCode (8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0) +// Standard.kt:137 $kotlin.String.hashCode (5, 5, 5, 5, 5, 5, 5, 5, 5, 5) +// Standard.kt:53 $kotlin.String.hashCode (25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37) +// String.kt:131 $kotlin.String.hashCode (20, 8, 20, 8, 20, 8, 20, 8) +// String.kt:132 $kotlin.String.hashCode (15, 8, 15, 8, 15, 8, 15, 8) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8) +// String.kt:98 $kotlin.String.equals (12, 12, 12, 12, 12, 12, 12, 12, 12) +// String.kt:99 $kotlin.String.equals (12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28) +// test.kt:1 $stringSwitch (0, 0, 0, 0, 0, 0, 0, 0, 0) +// test.kt:5 $stringSwitch (4, 4, 4, 4) +// test.kt:12 $stringSwitch (19, 4, 19, 4, 19, 4, 19, 4) +// test.kt:13 $stringSwitch (8, 9, 9, 9, 9, 8, 15, 8, 8, 8) +// test.kt:20 $stringSwitch (9, 9, 9, 9) +// test.kt:22 $stringSwitch (8, 9, 9, 9, 9, 8, 15, 8, 8, 8) +// test.kt:19 $stringSwitch (4, 4, 4, 4) +// test.kt:27 $stringSwitch (1, 1, 1, 1) +// test.kt:31 $box (18, 18, 18, 18, 4) +// test.kt:7 $stringSwitch (8, 14, 14, 14, 14, 8, 21) +// test.kt:14 $stringSwitch (8, 9, 9, 9, 9, 8, 16) +// test.kt:23 $stringSwitch (8, 9, 9, 9, 9, 8, 16) +// test.kt:32 $box (18, 18, 18, 18, 4) +// test.kt:8 $stringSwitch (8, 14, 14, 14, 14, 8, 22) +// test.kt:15 $stringSwitch (8, 9, 9, 9, 9, 8, 17) +// test.kt:24 $stringSwitch (8, 9, 9, 9, 9, 8, 17) +// test.kt:33 $box (18, 18, 18, 18, 4) +// test.kt:9 $stringSwitch +// test.kt:16 $stringSwitch +// test.kt:25 $stringSwitch +// test.kt:34 $box diff --git a/compiler/testData/debug/stepping/stringSwitchesSmall.kt b/compiler/testData/debug/stepping/stringSwitchesSmall.kt index 282835deb54..f7066f6ef42 100644 --- a/compiler/testData/debug/stepping/stringSwitchesSmall.kt +++ b/compiler/testData/debug/stepping/stringSwitchesSmall.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun stringSwitch(x: String) { @@ -103,3 +103,58 @@ fun box() { // test.kt:22 stringSwitch // test.kt:24 stringSwitch // test.kt:30 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:27 $box (18, 18, 18, 18, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4) +// test.kt:6 $stringSwitch (8, 14, 14, 14, 14, 8, 20, 8, 8) +// String.kt:122 $kotlin.String.hashCode (12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 12, 25, 12, 12, 35, 28, 12, 25, 12, 12, 35, 28) +// String.kt:123 $kotlin.String.hashCode (30, 30, 30) +// String.kt:124 $kotlin.String.hashCode (12, 26, 12, 12, 26, 12, 12, 26, 12) +// String.kt:126 $kotlin.String.hashCode (24, 8, 24, 8, 24, 8) +// String.kt:63 $kotlin.String.hashCode (12, 12, 12) +// String.kt:66 $kotlin.String.hashCode (15, 8, 15, 8, 15, 8) +// String.kt:127 $kotlin.String.hashCode (19, 8, 19, 8, 19, 8) +// String.kt:128 $kotlin.String.hashCode (8, 8, 8, 8, 8, 8) +// Standard.kt:152 $kotlin.String.hashCode (4, 4, 4) +// Standard.kt:154 $kotlin.String.hashCode (18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 4, 26, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4, 18, 9, 18, 4, 26, 4, 4) +// Standard.kt:155 $kotlin.String.hashCode (8, 8, 8, 8, 8, 8, 8) +// Standard.kt:136 $kotlin.String.hashCode (52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44) +// Standard.kt:138 $kotlin.String.hashCode (8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0, 8, 4, 0) +// Standard.kt:137 $kotlin.String.hashCode (5, 5, 5, 5, 5, 5, 5) +// Standard.kt:53 $kotlin.String.hashCode (25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37, 25, 37) +// String.kt:131 $kotlin.String.hashCode (20, 8, 20, 8, 20, 8) +// String.kt:132 $kotlin.String.hashCode (15, 8, 15, 8, 15, 8) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8) +// String.kt:98 $kotlin.String.equals (12, 12, 12, 12, 12, 12) +// String.kt:99 $kotlin.String.equals (12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28, 12, 35, 28) +// test.kt:1 $stringSwitch (0, 0, 0, 0, 0, 0) +// test.kt:5 $stringSwitch (4, 4, 4) +// test.kt:11 $stringSwitch (19, 4, 19, 4, 19, 4) +// test.kt:12 $stringSwitch (8, 9, 9, 9, 9, 8, 15, 8, 8) +// test.kt:18 $stringSwitch (9, 9, 9) +// test.kt:20 $stringSwitch (8, 9, 9, 9, 9, 8, 15, 8, 8) +// test.kt:17 $stringSwitch (4, 4, 4) +// test.kt:24 $stringSwitch (1, 1, 1) +// test.kt:28 $box (18, 18, 18, 18, 4) +// test.kt:7 $stringSwitch (8, 14, 14, 14, 14, 8, 21) +// test.kt:13 $stringSwitch (8, 9, 9, 9, 9, 8, 16) +// test.kt:21 $stringSwitch (8, 9, 9, 9, 9, 8, 16) +// test.kt:29 $box (18, 18, 18, 18, 4) +// test.kt:8 $stringSwitch +// test.kt:14 $stringSwitch +// test.kt:22 $stringSwitch +// test.kt:30 $box diff --git a/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt b/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt index abfac99b5e9..b08449bf2ad 100644 --- a/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt +++ b/compiler/testData/debug/stepping/suspendFunWithLambdaParameter.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // WITH_STDLIB // FILE: test.kt suspend fun foo(block: Long.() -> String): String { @@ -25,3 +25,5 @@ suspend fun box() { // test.kt:5 foo // test.kt:10 box$lambda // test.kt:12 doResume + +// EXPECTATIONS WASM diff --git a/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt b/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt index 2980869cc8e..b6bed724b33 100644 --- a/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt +++ b/compiler/testData/debug/stepping/suspendFunWithSuspendLambdaParameter.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // WITH_STDLIB // FILE: test.kt @@ -31,3 +31,5 @@ suspend fun box() { // test.kt:6 foo // test.kt:11 doResume // test.kt:13 doResume + +// EXPECTATIONS WASM diff --git a/compiler/testData/debug/stepping/throwException.kt b/compiler/testData/debug/stepping/throwException.kt index 078fba52256..ba4c28c6aa2 100644 --- a/compiler/testData/debug/stepping/throwException.kt +++ b/compiler/testData/debug/stepping/throwException.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { val a = 1 @@ -39,3 +39,122 @@ fun throwIfLess(a: Int, b: Int) { // test.kt:9 box // test.kt:15 throwIfLess // test.kt:16 throwIfLess + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box (12, 4) +// test.kt:5 $box (12, 4) +// test.kt:7 $box (20, 23, 8) +// test.kt:15 $throwIfLess (8, 10, 8, 8, 10, 8) +// test.kt:16 $throwIfLess (14, 14, 8, 14, 14, 8) +// Exceptions.kt:37 $kotlin.IllegalStateException. (34, 34, 4, 4, 41, 34, 34, 4, 4, 41) +// Exceptions.kt:23 $kotlin.RuntimeException. (34, 34, 4, 4, 41, 34, 34, 4, 4, 41) +// Exceptions.kt:16 $kotlin.Exception. (34, 34, 4, 4, 41, 34, 34, 4, 4, 41) +// Throwable.kt:23 $kotlin.Throwable. (32, 38, 27, 27, 43, 32, 38, 27, 27, 43) +// Throwable.kt:18 $kotlin.Throwable. (28, 62, 28, 62) +// Throwable.kt:25 $kotlin.Throwable. (50, 50) +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31, 6, 31, 6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (4, 4, 4) +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4, 15, 32, 4, 15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717) +// Throwable.kt:27 $kotlin.Throwable. (34, 34) +// Throwable.kt:39 $kotlin.Throwable. (69, 69) +// Throwable.kt:49 $kotlin.Throwable. (1, 1) +// Exceptions.kt:20 $kotlin.Exception. (1, 1) +// Exceptions.kt:27 $kotlin.RuntimeException. (1, 1) +// Exceptions.kt:41 $kotlin.IllegalStateException. (1, 1) +// test.kt:6 $box +// test.kt:8 $box (27, 13) +// test.kt:9 $box (20, 23, 8) +// ExceptionHelpers.kt:20 $kotlin.wasm.internal.throwAsJsException (17, 19, 19, 19, 42, 44, 28, 55, 57, 4) +// Throwable.kt:18 $kotlin.Throwable. +// TypeInfo.kt:34 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:35 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:36 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:37 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:33 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:48 $kotlin.wasm.internal.getString (31, 45, 31, 17, 4) +// TypeInfo.kt:49 $kotlin.wasm.internal.getString (27, 41, 27, 13, 4) +// TypeInfo.kt:50 $kotlin.wasm.internal.getString (28, 42, 28, 14, 4) +// TypeInfo.kt:51 $kotlin.wasm.internal.getString (25, 29, 34, 11, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// TypeInfo.kt:38 $kotlin.wasm.internal.getSimpleName +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/topLevel.kt b/compiler/testData/debug/stepping/topLevel.kt index bd62bc50373..2081e204039 100644 --- a/compiler/testData/debug/stepping/topLevel.kt +++ b/compiler/testData/debug/stepping/topLevel.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo() = prop @@ -19,3 +19,9 @@ fun box() { // test.kt:9 box // test.kt:4 foo // test.kt:10 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:9 $box (4, 4) +// test.kt:4 $foo (12, 16) +// test.kt:10 $box diff --git a/compiler/testData/debug/stepping/trait.kt b/compiler/testData/debug/stepping/trait.kt index bfb74be0748..cd0b2561ef3 100644 --- a/compiler/testData/debug/stepping/trait.kt +++ b/compiler/testData/debug/stepping/trait.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt interface A { @@ -57,3 +57,13 @@ fun box() { // test.kt:8 bar // test.kt:5 foo // test.kt:17 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:15 $box (5, 5, 20) +// test.kt:15 $. +// test.kt:8 $A.bar (15, 8, 15, 8) +// test.kt:5 $A.foo (16, 18, 16, 18) +// test.kt:16 $box (4, 4, 8) +// test.kt:12 $B. +// test.kt:17 $box diff --git a/compiler/testData/debug/stepping/tryCatch.kt b/compiler/testData/debug/stepping/tryCatch.kt index 26d98e9e4ea..6686c330687 100644 --- a/compiler/testData/debug/stepping/tryCatch.kt +++ b/compiler/testData/debug/stepping/tryCatch.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun foo(shouldThrow: Boolean) { @@ -41,3 +41,41 @@ fun box() { // test.kt:7 foo // test.kt:11 foo // test.kt:16 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:14 $box (8, 4) +// test.kt:6 $foo (12, 12, 31, 31, 25) +// test.kt:10 $foo (5, 5, 5, 5, 5, 5, 5, 5) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:11 $foo (1, 1) +// test.kt:15 $box (8, 4) +// Exceptions.kt:16 $kotlin.Exception. (34, 34, 4, 4, 41) +// Throwable.kt:23 $kotlin.Throwable. (32, 38, 27, 27, 43) +// Throwable.kt:18 $kotlin.Throwable. (28, 62) +// Throwable.kt:25 $kotlin.Throwable. +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// Throwable.kt:27 $kotlin.Throwable. +// Throwable.kt:39 $kotlin.Throwable. +// Throwable.kt:49 $kotlin.Throwable. +// Exceptions.kt:20 $kotlin.Exception. +// test.kt:5 $foo +// test.kt:7 $foo (27, 13) +// test.kt:8 $foo (9, 9, 9, 9) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:16 $box diff --git a/compiler/testData/debug/stepping/tryCatchExpression.kt b/compiler/testData/debug/stepping/tryCatchExpression.kt index 8e08267b993..ee250b82353 100644 --- a/compiler/testData/debug/stepping/tryCatchExpression.kt +++ b/compiler/testData/debug/stepping/tryCatchExpression.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo() { @@ -154,3 +154,44 @@ fun box() { // test.kt:7 foo // test.kt:8 foo // test.kt:49 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:42 $box +// test.kt:6 $foo (8, 8, 8, 8) +// test.kt:29 $mightThrow (8, 8, 8, 8, 22, 22, 16) +// test.kt:30 $mightThrow (1, 1, 1) +// test.kt:12 $foo (8, 8, 8) +// test.kt:33 $mightThrow2 (8, 8, 8, 22, 22, 16) +// test.kt:34 $mightThrow2 (1, 1) +// test.kt:11 $foo (4, 4) +// test.kt:18 $foo (8, 8) +// test.kt:37 $mightThrow3 (8, 8, 22, 22, 16) +// test.kt:38 $mightThrow3 (11, 4) +// test.kt:17 $foo +// test.kt:22 $foo +// test.kt:43 $box (13, 4) +// test.kt:44 $box +// Exceptions.kt:16 $kotlin.Exception. (34, 34, 4, 4, 41, 34, 34, 4, 4, 41, 34, 34, 4, 4, 41) +// Throwable.kt:23 $kotlin.Throwable. (32, 38, 27, 27, 43, 32, 38, 27, 27, 43, 32, 38, 27, 27, 43) +// Throwable.kt:18 $kotlin.Throwable. (28, 62, 28, 62, 28, 62) +// Throwable.kt:25 $kotlin.Throwable. (50, 50, 50) +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31, 6, 31, 6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (4, 4, 4) +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4, 15, 32, 4, 15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717) +// Throwable.kt:27 $kotlin.Throwable. (34, 34, 34) +// Throwable.kt:39 $kotlin.Throwable. (69, 69, 69) +// Throwable.kt:49 $kotlin.Throwable. (1, 1, 1) +// Exceptions.kt:20 $kotlin.Exception. (1, 1, 1) +// test.kt:19 $foo +// test.kt:20 $foo +// test.kt:45 $box (13, 4) +// test.kt:46 $box +// test.kt:13 $foo +// test.kt:14 $foo +// test.kt:47 $box (13, 4) +// test.kt:48 $box +// test.kt:7 $foo +// test.kt:8 $foo +// test.kt:49 $box diff --git a/compiler/testData/debug/stepping/tryCatchFinally.kt b/compiler/testData/debug/stepping/tryCatchFinally.kt index 8a9ba6d893f..85211b944e7 100644 --- a/compiler/testData/debug/stepping/tryCatchFinally.kt +++ b/compiler/testData/debug/stepping/tryCatchFinally.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun foo() { @@ -129,3 +129,53 @@ fun box() { // test.kt:13 foo // test.kt:20 foo // test.kt:39 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:34 $box +// test.kt:6 $foo (8, 8, 8) +// test.kt:26 $mightThrow (8, 8, 8, 22, 22, 16) +// test.kt:27 $mightThrow (1, 1) +// test.kt:5 $foo (4, 4, 4) +// test.kt:10 $foo (9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4) +// test.kt:14 $foo (8, 8, 8) +// test.kt:30 $mightThrow2 (8, 8, 22, 22, 16, 8, 22, 22, 16) +// test.kt:31 $mightThrow2 +// test.kt:13 $foo (12, 12, 4, 12, 12, 4, 12, 12, 4) +// test.kt:18 $foo (9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9) +// test.kt:20 $foo (1, 1, 1) +// test.kt:35 $box (13, 4) +// test.kt:36 $box +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8) +// Exceptions.kt:16 $kotlin.Exception. (34, 34, 4, 4, 41, 34, 34, 4, 4, 41, 34, 34, 4, 4, 41) +// Throwable.kt:23 $kotlin.Throwable. (32, 38, 27, 27, 43, 32, 38, 27, 27, 43, 32, 38, 27, 27, 43) +// Throwable.kt:18 $kotlin.Throwable. (28, 62, 28, 62, 28, 62) +// Throwable.kt:25 $kotlin.Throwable. (50, 50, 50) +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31, 6, 31, 6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (4, 4, 4) +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4, 15, 32, 4, 15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717) +// Throwable.kt:27 $kotlin.Throwable. (34, 34, 34) +// Throwable.kt:39 $kotlin.Throwable. (69, 69, 69) +// Throwable.kt:49 $kotlin.Throwable. (1, 1, 1) +// Exceptions.kt:20 $kotlin.Exception. (1, 1, 1) +// test.kt:15 $foo (13, 13) +// test.kt:16 $foo (9, 9, 9, 9, 9, 9, 9, 9) +// test.kt:37 $box (13, 4) +// test.kt:38 $box +// test.kt:7 $foo +// test.kt:8 $foo (9, 9, 9, 9) +// test.kt:39 $box diff --git a/compiler/testData/debug/stepping/tryFinally.kt b/compiler/testData/debug/stepping/tryFinally.kt index 8fc3f0af30d..bb842d0d4af 100644 --- a/compiler/testData/debug/stepping/tryFinally.kt +++ b/compiler/testData/debug/stepping/tryFinally.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun foo() { @@ -82,3 +82,125 @@ fun box() { // test.kt:12 foo // test.kt:26 mightThrow2 // test.kt:26 mightThrow2 + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:30 $box +// test.kt:6 $foo (8, 8) +// test.kt:22 $mightThrow (8, 8) +// test.kt:23 $mightThrow (1, 1) +// test.kt:5 $foo (4, 4) +// test.kt:8 $foo (9, 9, 9, 9, 9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4) +// test.kt:12 $foo (8, 8) +// test.kt:26 $mightThrow2 (8, 8, 22, 22, 16) +// test.kt:27 $mightThrow2 +// test.kt:11 $foo (12, 4, 12) +// test.kt:14 $foo (9, 9, 9, 9, 9, 9, 9, 9) +// test.kt:16 $foo +// test.kt:31 $box (13, 4) +// test.kt:32 $box +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// Exceptions.kt:16 $kotlin.Exception. (34, 34, 4, 4, 41) +// Throwable.kt:23 $kotlin.Throwable. (32, 38, 27, 27, 43) +// Throwable.kt:18 $kotlin.Throwable. (28, 62) +// Throwable.kt:25 $kotlin.Throwable. +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31, 6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (4, 4) +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4, 15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717, 1728, 1718, 1717, 1717) +// Throwable.kt:27 $kotlin.Throwable. +// Throwable.kt:39 $kotlin.Throwable. +// Throwable.kt:49 $kotlin.Throwable. +// Exceptions.kt:20 $kotlin.Exception. +// ExceptionHelpers.kt:20 $kotlin.wasm.internal.throwAsJsException (17, 19, 19, 19, 42, 44, 28, 55, 57, 4) +// Throwable.kt:18 $kotlin.Throwable. +// TypeInfo.kt:34 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:35 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:36 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:37 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:33 $kotlin.wasm.internal.getSimpleName +// TypeInfo.kt:48 $kotlin.wasm.internal.getString (31, 45, 31, 17, 4) +// TypeInfo.kt:49 $kotlin.wasm.internal.getString (27, 41, 27, 13, 4) +// TypeInfo.kt:50 $kotlin.wasm.internal.getString (28, 42, 28, 14, 4) +// TypeInfo.kt:51 $kotlin.wasm.internal.getString (25, 29, 34, 11, 4) +// TypeInfo.kt:38 $kotlin.wasm.internal.getSimpleName +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt index cd350114399..79dd7575601 100644 --- a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt +++ b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { @@ -28,3 +28,84 @@ fun box() { // test.kt:10 box // test.kt:11 box // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:8 $box (8, 4) +// test.kt:9 $box (8, 4) +// test.kt:10 $box (9, 8) +// test.kt:11 $box (12, 14, 8) +// Primitives.kt:1359 $kotlin.Int__toString-impl (21, 8, 24) +// Number2String.kt:199 $kotlin.wasm.internal. +// Number2String.kt:200 $kotlin.wasm.internal. +// Number2String.kt:201 $kotlin.wasm.internal. +// Number2String.kt:202 $kotlin.wasm.internal. +// Number2String.kt:203 $kotlin.wasm.internal. +// Number2String.kt:204 $kotlin.wasm.internal. +// Number2String.kt:206 $kotlin.wasm.internal. +// Library.kt:93 $kotlin.wasm.internal. (2841, 2841, 2841, 2841, 3432, 3432, 3432, 3432, 3453, 3432, 11556, 11560, 3484, 3463, 11556, 11560, 3515, 3494, 11556, 11560, 3546, 3525, 11556, 11560, 3581, 3560, 11556, 11560, 3612, 3591, 11556, 11560, 3643, 3622, 11556, 11560, 3674, 3653, 11556, 11560, 3709, 3688, 11556, 11560, 3740, 3719, 11556, 11560, 3771, 3750, 11556, 11560, 3802, 3781, 11556, 11560, 3837, 3816, 11556, 11560, 3868, 3847, 11556, 11560, 3899, 3878, 11556, 11560, 3930, 3909, 11556, 11560, 3965, 3944, 11556, 11560, 3996, 3975, 11556, 11560, 4027, 4006, 11556, 11560, 4058, 4037, 11556, 11560, 4093, 4072, 11556, 11560, 4124, 4103, 11556, 11560, 4155, 4134, 11556, 11560, 4186, 4165, 11556, 11560, 4221, 4200, 11556, 11560, 4252, 4231, 11556, 11560, 4283, 4262, 11556, 11560, 4314, 4293, 11556, 11560, 4349, 4328, 11556, 11560, 4380, 4359, 11556, 11560, 4411, 4390, 11556, 11560, 4442, 4421, 11556, 11560, 4477, 4456, 11556, 11560, 4508, 4487, 11556, 11560, 4539, 4518, 11556, 11560, 4570, 4549, 11556, 11560, 4605, 4584, 11556, 11560, 4636, 4615, 11556, 11560, 4667, 4646, 11556, 11560, 4698, 4677, 11556, 11560, 4733, 4712, 11556, 11560, 4764, 4743, 11556, 11560, 4795, 4774, 11556, 11560, 4826, 4805, 11556, 11560, 4861, 4840, 11556, 11560, 4892, 4871, 11556, 11560, 4923, 4902, 11556, 11560, 4954, 4933, 11556, 11560, 4989, 4968, 11556, 11560, 5020, 4999, 11556, 11560, 5051, 5030, 11556, 11560, 5082, 5061, 11556, 11560, 5117, 5096, 11556, 11560, 5148, 5127, 11556, 11560, 5179, 5158, 11556, 11560, 5210, 5189, 11556, 11560, 5245, 5224, 11556, 11560, 5276, 5255, 11556, 11560, 5307, 5286, 11556, 11560, 5338, 5317, 11556, 11560, 5373, 5352, 11556, 11560, 5404, 5383, 11556, 11560, 5435, 5414, 11556, 11560, 5466, 5445, 11556, 11560, 5501, 5480, 11556, 11560, 5532, 5511, 11556, 11560, 5563, 5542, 11556, 11560, 5594, 5573, 11556, 11560, 5629, 5608, 11556, 11560, 5660, 5639, 11556, 11560, 5691, 5670, 11556, 11560, 5722, 5701, 11556, 11560, 5757, 5736, 11556, 11560, 5788, 5767, 11556, 11560, 5819, 5798, 11556, 11560, 5850, 5829, 11556, 11560, 5885, 5864, 11556, 11560, 5916, 5895, 11556, 11560, 5947, 5926, 11556, 11560, 5978, 5957, 11556, 11560, 6013, 5992, 11556, 11560, 6044, 6023, 11556, 11560, 6075, 6054, 11556, 11560, 6106, 6085, 11556, 11560, 6141, 6120, 11556, 11560, 6172, 6151, 11556, 11560, 6203, 6182, 11556, 11560, 3432, 3432) +// Library.kt:69 $kotlin.wasm.internal. +// Number2String.kt:219 $kotlin.wasm.internal. +// ULong.kt:17 $kotlin.-impl> (125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125) +// Library.kt:54 $kotlin.wasm.internal. (66, 74) +// Number2String.kt:47 $kotlin.wasm.internal.itoa32 (8, 16, 8, 21, 29, 21) +// Number2String.kt:50 $kotlin.wasm.internal.itoa32 (8, 17, 8, 8) +// Number2String.kt:53 $kotlin.wasm.internal.itoa32 (8, 22, 8) +// 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: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) +// Number2String.kt:59 $kotlin.wasm.internal.itoa32 (23, 31, 23, 51) +// Number2String.kt:61 $kotlin.wasm.internal.itoa32 (34, 19, 46, 19) +// Number2String.kt:107 $kotlin.wasm.internal.decimalCount32 (8, 16, 8) +// Number2String.kt:108 $kotlin.wasm.internal.decimalCount32 (12, 20, 12) +// Number2String.kt:109 $kotlin.wasm.internal.decimalCount32 (19, 24, 33, 24, 19, 12) +// Number2String.kt:62 $kotlin.wasm.internal.itoa32 (28, 14) +// Number2String.kt:63 $kotlin.wasm.internal.itoa32 (18, 23, 33, 4) +// Number2String.kt:71 $kotlin.wasm.internal.utoaDecSimple (11, 23, 11, 11, 4) +// Number2String.kt:72 $kotlin.wasm.internal.utoaDecSimple (11, 18, 26, 11, 4) +// Number2String.kt:73 $kotlin.wasm.internal.utoaDecSimple (11, 25, 11, 30, 45, 52, 30, 4) +// Number2String.kt:75 $kotlin.wasm.internal.utoaDecSimple (14, 4) +// Number2String.kt:76 $kotlin.wasm.internal.utoaDecSimple (17, 4) +// Number2String.kt:78 $kotlin.wasm.internal.utoaDecSimple (16, 22, 16, 8, 16, 22, 16, 8) +// Primitives.kt:1066 $kotlin.Int__div-impl (24, 12, 69, 96, 24, 12, 69, 96) +// Number2String.kt:79 $kotlin.wasm.internal.utoaDecSimple (16, 22, 16, 8, 16, 22, 16, 8) +// Number2String.kt:80 $kotlin.wasm.internal.utoaDecSimple (14, 8, 14, 8) +// Number2String.kt:81 $kotlin.wasm.internal.utoaDecSimple (8, 8) +// Primitives.kt:1159 $kotlin.Int__dec-impl (15, 8, 16, 15, 8, 16) +// Number2String.kt:82 $kotlin.wasm.internal.utoaDecSimple (8, 19, 39, 27, 15, 8, 19, 39, 27, 15) +// Number2String.kt:41 $kotlin.wasm.internal.digitToChar (20, 11, 23, 11, 4, 20, 11, 23, 11, 4) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4, 47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4, 20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4, 4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16, 8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set (5, 5, 5, 5, 5) +// String.kt:149 $kotlin.stringLiteral (11, 4, 11, 4, 11, 4, 11, 4, 11, 4) +// Number2String.kt:9 $kotlin.wasm.internal.CharCodes_initEntries +// Enum.kt:9 $kotlin.Enum. (4, 4, 4, 4, 4) +// Enum.kt:11 $kotlin.Enum. (4, 4, 4, 4, 4) +// Enum.kt:27 $kotlin.Enum. (1, 1, 1, 1, 1) +// Number2String.kt:7 $kotlin.wasm.internal.CharCodes. (29, 29, 29, 29, 29) +// Number2String.kt:38 $kotlin.wasm.internal.CharCodes. (1, 1, 1, 1, 1) +// Number2String.kt:10 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:11 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:12 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:32 $kotlin.wasm.internal.CharCodes_initEntries +// Number2String.kt:42 $kotlin.wasm.internal.digitToChar (25, 32, 12, 39, 4, 25, 32, 12, 39, 4) +// Primitives.kt:1306 $kotlin.Int__toChar-impl (18, 9, 45, 18, 9, 45) +// Number2String.kt:83 $kotlin.wasm.internal.utoaDecSimple (13, 19, 13, 13, 13, 19, 13, 13) +// Number2String.kt:84 $kotlin.wasm.internal.utoaDecSimple +// Number2String.kt:64 $kotlin.wasm.internal.itoa32 (8, 16, 8) +// Number2String.kt:67 $kotlin.wasm.internal.itoa32 (15, 4) +// String.kt:138 $kotlin.wasm.internal.itoa32 (4, 4, 4, 4, 11, 17, 22, 29, 4, 34) +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/voidLambdaStepInline.kt b/compiler/testData/debug/stepping/voidLambdaStepInline.kt index 02dd8bbd69a..80ccbd283a0 100644 --- a/compiler/testData/debug/stepping/voidLambdaStepInline.kt +++ b/compiler/testData/debug/stepping/voidLambdaStepInline.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box(): String { @@ -20,3 +20,98 @@ fun box(): String { // EXPECTATIONS JS_IR // test.kt:9 box + +// EXPECTATIONS WASM +// test.kt:1 $box__JsExportAdapter +// test.kt:5 $box +// Standard.kt:41 $box (4, 4) +// Standard.kt:44 $box (11, 11, 4, 11, 11, 4) +// Standard.kt:2 $box (72, 72, 72, 72) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:6 $box +// Standard.kt:3 $box (16, 16, 16, 16) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:9 $box (12, 12, 12, 12, 4) +// ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter +// ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:296 $kotlin.wasm.internal.kotlinToJsStringAdapter (52, 62, 52, 63) +// String.kt:18 $kotlin.String. +// ExternalWrapper.kt:203 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:63 $kotlin.wasm.internal.kotlinToJsStringAdapter +// String.kt:66 $kotlin.wasm.internal.kotlinToJsStringAdapter (15, 8) +// ExternalWrapper.kt:204 $kotlin.wasm.internal.kotlinToJsStringAdapter (23, 32, 4) +// ExternalWrapper.kt:205 $kotlin.wasm.internal.kotlinToJsStringAdapter (26, 4) +// ExternalWrapper.kt:208 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:55 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:56 $kotlin.wasm.internal.kotlinToJsStringAdapter (20, 4) +// MemoryAllocation.kt:69 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (20, 38, 20) +// MemoryAllocation.kt:70 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (8, 30, 68, 8) +// MemoryAllocation.kt:88 $kotlin.wasm.unsafe.ScopedMemoryAllocator. (4, 4) +// MemoryAllocation.kt:24 $kotlin.wasm.unsafe.MemoryAllocator. +// MemoryAllocation.kt:86 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:90 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:96 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:142 $kotlin.wasm.unsafe.ScopedMemoryAllocator. +// MemoryAllocation.kt:71 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (23, 4) +// MemoryAllocation.kt:72 $kotlin.wasm.unsafe.createAllocatorInTheNewScope (11, 4) +// MemoryAllocation.kt:58 $kotlin.wasm.internal.kotlinToJsStringAdapter +// MemoryAllocation.kt:160 $kotlin.wasm.internal.kotlinToJsStringAdapter (828, 739, 758, 784, 771, 803, 758, 739, 749, 749, 749, 820, 8580, 8584, 723, 882, 845, 915, 895, 932, 948, 963, 948, 932, 932, 932, 1251, 1261, 1276, 1291, 1276, 1306, 1220, 1353, 1364, 1379, 1364, 1394, 1332, 1325, 1325) +// _Ranges.kt:1321 $kotlin.ranges.coerceAtMost (15, 22, 15, 54, 4) +// MemoryAllocation.kt:99 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// PreconditionsWasm.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (2303, 2302, 2388, 2387, 2728, 2737, 2728, 2742, 2751, 2742, 2760, 2742) +// PreconditionsWasm.kt:17 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 4, 4) +// PreconditionsWasm.kt:20 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (9, 8, 9, 8, 9, 8) +// MemoryAllocation.kt:100 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:104 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (20, 8) +// MemoryAllocation.kt:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (22, 41, 22, 49, 22, 68, 21, 8) +// Primitives.kt:93 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (50, 58, 50) +// Primitives.kt:1281 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 17, 13, 20) +// MemoryAllocation.kt:106 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// MemoryAllocation.kt:108 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (16, 28, 12, 47, 12) +// MemoryAllocation.kt:112 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (27, 36, 27, 8) +// MemoryAllocation.kt:114 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (29, 48, 29, 8) +// MemoryAllocation.kt:115 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (12, 32, 12) +// MemoryAllocation.kt:125 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (8, 8) +// Preconditions.kt:144 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (456, 475, 494, 475, 456) +// Preconditions.kt:80 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:27 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate +// Preconditions.kt:29 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (3, 2) +// MemoryAllocation.kt:127 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (30, 15, 8) +// UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) +// UInt.kt:17 $kotlin.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> +// UInt.kt:17 $kotlin.-impl> +// Runtime.kt:32 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (18, 4) +// Runtime.kt:33 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (23, 35, 23, 4) +// Runtime.kt:34 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (19, 4) +// Runtime.kt:35 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (11, 22, 11, 11, 11, 11, 22, 11, 11, 11, 11, 22, 11, 11, 11) +// Runtime.kt:36 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (25, 34, 42, 38, 8, 25, 34, 42, 38, 8) +// Runtime.kt:37 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 19, 8, 8, 8, 19, 8, 8) +// Runtime.kt:38 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 8, 8, 8) +// Primitives.kt:1150 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (8, 15, 8, 16, 8, 15, 8, 16) +// Runtime.kt:40 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory +// ExternalWrapper.kt:225 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (6, 31) +// Standard.kt:123 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter +// Standard.kt:126 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (15, 32, 4) +// Standard.kt:158 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (1728, 1718, 1717, 1717) +// MemoryAllocation.kt:60 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 18) +// MemoryAllocation.kt:139 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy (8, 20, 8) +// MemoryAllocation.kt:140 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:141 $kotlin.wasm.unsafe.ScopedMemoryAllocator.destroy +// MemoryAllocation.kt:61 $kotlin.wasm.internal.kotlinToJsStringAdapter (27, 37, 8) +// MemoryAllocation.kt:57 $kotlin.wasm.internal.kotlinToJsStringAdapter diff --git a/compiler/testData/debug/stepping/when.kt b/compiler/testData/debug/stepping/when.kt index 8d460bb68e2..cf62905bb1c 100644 --- a/compiler/testData/debug/stepping/when.kt +++ b/compiler/testData/debug/stepping/when.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Int) { @@ -112,3 +112,15 @@ fun box() { // test.kt:11 foo // test.kt:16 foo // test.kt:20 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:19 $box (8, 4) +// test.kt:6 $foo (8, 23, 19, 8, 8, 8, 8, 8, 8) +// test.kt:7 $foo (23, 19, 23, 19) +// test.kt:12 $foo (8, 8, 8, 8, 23, 19, 8, 8, 8) +// test.kt:14 $foo (16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16) +// test.kt:11 $foo (4, 4, 4, 4, 4, 4, 4) +// test.kt:16 $foo (1, 1, 1, 1, 1, 1, 1) +// test.kt:13 $foo (23, 19, 23, 19) +// test.kt:20 $box diff --git a/compiler/testData/debug/stepping/whenComplicatedSubject.kt b/compiler/testData/debug/stepping/whenComplicatedSubject.kt index 997b044f4ab..770c3e2e507 100644 --- a/compiler/testData/debug/stepping/whenComplicatedSubject.kt +++ b/compiler/testData/debug/stepping/whenComplicatedSubject.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Int) { @@ -53,3 +53,16 @@ fun box() { // test.kt:9 foo // test.kt:14 foo // test.kt:20 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:17 $box (8, 4) +// test.kt:7 $foo (13, 23, 13, 13) +// test.kt:11 $foo (7, 7, 7) +// test.kt:12 $foo (7, 7) +// test.kt:14 $foo (1, 1, 1) +// test.kt:18 $box (8, 4) +// test.kt:8 $foo +// test.kt:19 $box (8, 4) +// test.kt:9 $foo +// test.kt:20 $box diff --git a/compiler/testData/debug/stepping/whenConstant.kt b/compiler/testData/debug/stepping/whenConstant.kt index b90c62a3884..d8dcd8fca75 100644 --- a/compiler/testData/debug/stepping/whenConstant.kt +++ b/compiler/testData/debug/stepping/whenConstant.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -22,3 +22,23 @@ fun box() { // EXPECTATIONS JS_IR // test.kt:5 box // test.kt:13 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box +// test.kt:6 $box +// test.kt:11 $box (13, 13, 13, 13) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:13 $box diff --git a/compiler/testData/debug/stepping/whenExpr.kt b/compiler/testData/debug/stepping/whenExpr.kt index 288de624e68..4af7b3a31da 100644 --- a/compiler/testData/debug/stepping/whenExpr.kt +++ b/compiler/testData/debug/stepping/whenExpr.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -28,3 +28,14 @@ fun box() { // test.kt:5 box // test.kt:6 box // test.kt:17 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (18, 18, 18, 18) +// test.kt:6 $box +// test.kt:7 $box +// Runtime.kt:47 $kotlin.wasm.internal.nullableEquals (25, 8, 25, 8) +// Runtime.kt:49 $kotlin.wasm.internal.nullableEquals (25, 30, 37, 30, 4, 25, 30, 37, 30, 4) +// Primitives.kt:1363 $kotlin.Int__equals-impl (42, 42, 24, 48, 42, 42, 24, 48) +// test.kt:10 $box +// test.kt:17 $box diff --git a/compiler/testData/debug/stepping/whenInConjunction.kt b/compiler/testData/debug/stepping/whenInConjunction.kt index f08e2cb4438..1bb0ae3eae9 100644 --- a/compiler/testData/debug/stepping/whenInConjunction.kt +++ b/compiler/testData/debug/stepping/whenInConjunction.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Number) { @@ -41,3 +41,15 @@ fun box() { // test.kt:13 foo // test.kt:15 foo // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:18 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo (8, 10, 10, 10, 20, 8, 31) +// Primitives.kt:2239 $kotlin.Float__toInt-impl (8, 38, 8, 38) +// test.kt:6 $foo (12, 24) +// test.kt:10 $foo +// test.kt:11 $foo (12, 24) +// test.kt:13 $foo (13, 15, 15, 15, 25, 13) +// test.kt:15 $foo +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/whenInDisjunction.kt b/compiler/testData/debug/stepping/whenInDisjunction.kt index 84a791141ed..c27b61d7041 100644 --- a/compiler/testData/debug/stepping/whenInDisjunction.kt +++ b/compiler/testData/debug/stepping/whenInDisjunction.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Number) { @@ -41,3 +41,15 @@ fun box() { // test.kt:13 foo // test.kt:15 foo // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:18 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo (8, 10, 10, 10, 20, 8, 31) +// Primitives.kt:2239 $kotlin.Float__toInt-impl (8, 38, 8, 38) +// test.kt:6 $foo (12, 24) +// test.kt:10 $foo +// test.kt:11 $foo (12, 24) +// test.kt:13 $foo (13, 15, 15, 15, 25, 13) +// test.kt:15 $foo +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt b/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt index 26c0ed011c8..e93ca948c6b 100644 --- a/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt +++ b/compiler/testData/debug/stepping/whenInGeneralObjectComparison.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Any, other: Any) { @@ -63,3 +63,21 @@ fun box() { // test.kt:20 foo // test.kt:25 foo // test.kt:29 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:28 $box (8, 8, 8, 8, 11, 11, 11, 11, 4) +// test.kt:5 $foo (8, 23, 8) +// test.kt:6 $foo (12, 22, 22, 22, 22) +// Any.kt:34 $kotlin.Any.equals (20, 26, 8, 32, 20, 26, 8, 32) +// test.kt:10 $foo (14, 8, 8) +// test.kt:11 $foo (12, 22, 22, 22, 22) +// test.kt:13 $foo +// Primitives.kt:1363 $kotlin.Int__equals-impl (48, 48) +// test.kt:15 $foo (8, 23, 8) +// test.kt:16 $foo (12, 22, 22, 22, 22) +// test.kt:20 $foo (14, 8, 8) +// test.kt:21 $foo (12, 22, 22, 22, 22) +// test.kt:23 $foo +// test.kt:25 $foo +// test.kt:29 $box diff --git a/compiler/testData/debug/stepping/whenInNegation.kt b/compiler/testData/debug/stepping/whenInNegation.kt index 29099f2cfed..64f3530c9e3 100644 --- a/compiler/testData/debug/stepping/whenInNegation.kt +++ b/compiler/testData/debug/stepping/whenInNegation.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Number) { @@ -27,3 +27,11 @@ fun box() { // test.kt:6 foo // test.kt:10 foo // test.kt:14 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:13 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo (15, 8) +// test.kt:6 $foo (12, 24) +// test.kt:10 $foo +// test.kt:14 $box diff --git a/compiler/testData/debug/stepping/whenInNullComparison.kt b/compiler/testData/debug/stepping/whenInNullComparison.kt index fa4050fc76a..8d268b061c7 100644 --- a/compiler/testData/debug/stepping/whenInNullComparison.kt +++ b/compiler/testData/debug/stepping/whenInNullComparison.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Number) { @@ -37,3 +37,13 @@ fun box() { // test.kt:11 foo // test.kt:15 foo // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:18 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo +// test.kt:6 $foo (12, 24) +// test.kt:10 $foo (14, 8) +// test.kt:11 $foo (12, 24) +// test.kt:15 $foo +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt b/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt index 58fac447a5d..61d24e3fd17 100644 --- a/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt +++ b/compiler/testData/debug/stepping/whenInPrimitiveToObjectComparison.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Any) { @@ -39,3 +39,14 @@ fun box() { // test.kt:10 foo // test.kt:15 foo // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:18 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo (8, 8, 8, 8, 19, 8) +// test.kt:6 $foo (12, 22, 22, 22, 22) +// Primitives.kt:1363 $kotlin.Int__equals-impl (42, 42, 24, 48, 42, 42, 24, 48) +// test.kt:10 $foo (8, 8, 8, 8, 19, 8, 8) +// test.kt:11 $foo (12, 22, 22, 22, 22) +// test.kt:15 $foo +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/whenInZeroComparison.kt b/compiler/testData/debug/stepping/whenInZeroComparison.kt index fd41b05880a..f45d766bdb5 100644 --- a/compiler/testData/debug/stepping/whenInZeroComparison.kt +++ b/compiler/testData/debug/stepping/whenInZeroComparison.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(n: Number) { @@ -27,3 +27,12 @@ fun box() { // test.kt:6 foo // test.kt:10 foo // test.kt:14 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:13 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo (14, 8) +// test.kt:6 $foo (12, 24) +// test.kt:8 $foo +// test.kt:10 $foo +// test.kt:14 $box diff --git a/compiler/testData/debug/stepping/whenIsChecks.kt b/compiler/testData/debug/stepping/whenIsChecks.kt index a2f1ed126de..553102ff89c 100644 --- a/compiler/testData/debug/stepping/whenIsChecks.kt +++ b/compiler/testData/debug/stepping/whenIsChecks.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Any) { @@ -46,3 +46,14 @@ fun box() { // test.kt:18 box // test.kt:13 foo // test.kt:19 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:16 $box (8, 8, 8, 8, 4) +// test.kt:5 $foo (10, 10, 10) +// test.kt:6 $foo (8, 8, 8) +// test.kt:13 $foo (1, 1, 1) +// test.kt:17 $box (8, 8, 8, 8, 4) +// test.kt:8 $foo (8, 8) +// test.kt:18 $box (8, 8, 8, 8, 4) +// test.kt:19 $box diff --git a/compiler/testData/debug/stepping/whenMultiLine.kt b/compiler/testData/debug/stepping/whenMultiLine.kt index 278ec518a8b..6343cf5016d 100644 --- a/compiler/testData/debug/stepping/whenMultiLine.kt +++ b/compiler/testData/debug/stepping/whenMultiLine.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Int): Int { @@ -73,3 +73,16 @@ fun box() { // test.kt:20 foo // test.kt:23 foo // test.kt:30 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:27 $box (8, 4, 4) +// test.kt:6 $foo (8, 8, 8) +// test.kt:15 $foo (8, 8, 8) +// test.kt:16 $foo +// test.kt:23 $foo (11, 4, 11, 4, 11, 4) +// test.kt:28 $box (8, 4, 4) +// test.kt:18 $foo +// test.kt:29 $box (8, 4, 4) +// test.kt:20 $foo +// test.kt:30 $box diff --git a/compiler/testData/debug/stepping/whenMultiLineSubject.kt b/compiler/testData/debug/stepping/whenMultiLineSubject.kt index 40d4018a1a3..e93b27b8be6 100644 --- a/compiler/testData/debug/stepping/whenMultiLineSubject.kt +++ b/compiler/testData/debug/stepping/whenMultiLineSubject.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Int): Int { @@ -73,3 +73,18 @@ fun box() { // test.kt:20 foo // test.kt:23 foo // test.kt:30 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:27 $box (8, 4, 4) +// test.kt:5 $foo (10, 10, 10) +// test.kt:6 $foo (8, 8, 8) +// test.kt:14 $foo (18, 18, 18) +// test.kt:15 $foo (8, 8, 8) +// test.kt:16 $foo +// test.kt:23 $foo (11, 4, 11, 4, 11, 4) +// test.kt:28 $box (8, 4, 4) +// test.kt:18 $foo +// test.kt:29 $box (8, 4, 4) +// test.kt:20 $foo +// test.kt:30 $box diff --git a/compiler/testData/debug/stepping/whenNullalbeSubject.kt b/compiler/testData/debug/stepping/whenNullalbeSubject.kt index 552b20ae8ec..c47af5d391a 100644 --- a/compiler/testData/debug/stepping/whenNullalbeSubject.kt +++ b/compiler/testData/debug/stepping/whenNullalbeSubject.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -28,3 +28,14 @@ fun box() { // test.kt:5 box // test.kt:6 box // test.kt:17 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (18, 18, 18, 18) +// test.kt:6 $box +// test.kt:7 $box +// Runtime.kt:47 $kotlin.wasm.internal.nullableEquals (25, 8, 25, 8) +// Runtime.kt:49 $kotlin.wasm.internal.nullableEquals (25, 30, 37, 30, 4, 25, 30, 37, 30, 4) +// Primitives.kt:1363 $kotlin.Int__equals-impl (42, 42, 24, 48, 42, 42, 24, 48) +// test.kt:10 $box +// test.kt:17 $box diff --git a/compiler/testData/debug/stepping/whenSubject.kt b/compiler/testData/debug/stepping/whenSubject.kt index 0d6378eb3e3..3e660036359 100644 --- a/compiler/testData/debug/stepping/whenSubject.kt +++ b/compiler/testData/debug/stepping/whenSubject.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Int) { @@ -112,3 +112,16 @@ fun box() { // test.kt:11 foo // test.kt:16 foo // test.kt:20 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:19 $box (8, 4) +// test.kt:5 $foo (10, 10, 10, 10, 10, 10, 10) +// test.kt:6 $foo (8, 18, 14, 8, 8, 8, 8, 8, 8) +// test.kt:7 $foo (18, 14, 18, 14) +// test.kt:11 $foo (18, 4, 18, 18, 4, 4, 18, 18, 4, 18, 18, 4, 4, 4) +// test.kt:12 $foo (8, 8, 8, 8, 18, 14, 8, 8, 8) +// test.kt:14 $foo (16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16) +// test.kt:16 $foo (1, 1, 1, 1, 1, 1, 1) +// test.kt:13 $foo (18, 14, 18, 14) +// test.kt:20 $box diff --git a/compiler/testData/debug/stepping/whenSubject2.kt b/compiler/testData/debug/stepping/whenSubject2.kt index 5c33439efdb..6efccc93afb 100644 --- a/compiler/testData/debug/stepping/whenSubject2.kt +++ b/compiler/testData/debug/stepping/whenSubject2.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun foo(x: Int) { @@ -130,3 +130,17 @@ fun box() { // test.kt:13 foo // test.kt:20 foo // test.kt:24 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:23 $box (8, 4) +// test.kt:6 $foo (9, 9, 9, 9, 9, 9, 9) +// test.kt:8 $foo (8, 18, 14, 8, 8, 8, 8, 8, 8) +// test.kt:9 $foo (18, 14, 18, 14) +// test.kt:14 $foo (9, 9, 9, 9, 9, 9, 9) +// test.kt:16 $foo (8, 8, 8, 8, 18, 14, 8, 8, 8) +// test.kt:18 $foo (16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16) +// test.kt:13 $foo (4, 4, 4, 4, 4, 4, 4) +// test.kt:20 $foo (1, 1, 1, 1, 1, 1, 1) +// test.kt:17 $foo (18, 14, 18, 14) +// test.kt:24 $box diff --git a/compiler/testData/debug/stepping/whenWithInlineInCondition.kt b/compiler/testData/debug/stepping/whenWithInlineInCondition.kt index 7d5cc59cf3a..ca145102b37 100644 --- a/compiler/testData/debug/stepping/whenWithInlineInCondition.kt +++ b/compiler/testData/debug/stepping/whenWithInlineInCondition.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM + // FILE: test.kt fun box() { val x = value() @@ -78,3 +78,22 @@ fun nop() {} // test.kt:15 box // test.kt:29 nop // test.kt:18 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:4 $box +// test.kt:20 $value (19, 20) +// test.kt:5 $box +// test.kt:6 $box (8, 8) +// test.kt:21 $box (23, 24, 23, 24, 23, 24) +// test.kt:7 $box (8, 8) +// test.kt:22 $box (23, 24, 23, 24, 23, 24) +// test.kt:8 $box (8, 8, 16) +// test.kt:23 $box (23, 24) +// test.kt:29 $nop (12, 12) +// test.kt:13 $box (10, 17, 10) +// test.kt:14 $box (8, 13, 8, 8) +// test.kt:27 $box (28, 32) +// test.kt:15 $box (8, 11, 8, 20) +// test.kt:26 $box (29, 30) +// test.kt:18 $box diff --git a/compiler/testData/debug/stepping/while.kt b/compiler/testData/debug/stepping/while.kt index 9e16ef1c0e9..e3c4f831d7e 100644 --- a/compiler/testData/debug/stepping/while.kt +++ b/compiler/testData/debug/stepping/while.kt @@ -1,4 +1,4 @@ -// IGNORE_BACKEND: WASM +// IGNORE_BACKEND_K2: WASM // FILE: test.kt fun box() { @@ -37,3 +37,28 @@ fun box() { // test.kt:13 box // test.kt:13 box // test.kt:14 box + +// EXPECTATIONS WASM +// test.kt:1 $box +// test.kt:5 $box (12, 4) +// test.kt:6 $box (13, 11, 13, 17, 11, 11, 11, 13, 11, 13, 17, 11, 11, 11) +// Primitives.kt:1159 $kotlin.Int__dec-impl (15, 8, 16, 15, 8, 16, 15, 8, 16, 15, 8, 16) +// test.kt:7 $box (9, 9, 9, 9) +// String.kt:141 $kotlin.stringLiteral (17, 28, 17, 17, 28, 17, 17, 28, 17) +// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8, 19, 26, 34, 8, 19, 26, 34, 8) +// ThrowHelpers.kt:29 $kotlin.wasm.internal.rangeCheck (6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19, 6, 14, 6, 19, 28, 19) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (1, 1, 1, 1) +// Array.kt:60 $kotlin.Array.get (15, 27, 23, 8, 15, 27, 23, 8, 15, 27, 23, 8) +// String.kt:142 $kotlin.stringLiteral (8, 8, 8) +// String.kt:146 $kotlin.stringLiteral (47, 61, 16, 4) +// String.kt:147 $kotlin.stringLiteral (20, 20, 20, 20, 27, 33, 41, 20, 4) +// String.kt:148 $kotlin.stringLiteral (4, 15, 25, 4) +// Array.kt:74 $kotlin.Array.set (19, 26, 34, 8) +// Array.kt:75 $kotlin.Array.set (8, 20, 27, 16) +// Array.kt:76 $kotlin.Array.set +// String.kt:149 $kotlin.stringLiteral (11, 4) +// test.kt:10 $box (8, 4) +// test.kt:12 $box (9, 9, 9, 9, 9, 9, 9, 9) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8) +// test.kt:13 $box (15, 13, 15, 19, 13, 13, 15, 13, 15, 19, 13, 13) +// test.kt:14 $box diff --git a/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMap3Builder.kt b/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMap3Builder.kt index d370f5c0452..a809e63f724 100644 --- a/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMap3Builder.kt +++ b/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMap3Builder.kt @@ -176,6 +176,13 @@ class SourceMap3Builder( } } + fun addEmptyMapping(outputColumn: Int) { + if (!currentMappingIsEmpty) { + startMapping(outputColumn) + currentMappingIsEmpty = true + } + } + private fun startMapping(column: Int) { val newGroupStarted = previousGeneratedColumn == -1 if (newGroupStarted) { diff --git a/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmExpressionBuilder.kt b/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmExpressionBuilder.kt index 67e3a1ee9cc..08399f430a0 100644 --- a/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmExpressionBuilder.kt +++ b/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmExpressionBuilder.kt @@ -218,6 +218,10 @@ abstract class WasmExpressionBuilder { buildInstr(WasmOp.DROP, location) } + fun buildNop(location: SourceLocation) { + buildInstr(WasmOp.NOP, location) + } + inline fun commentPreviousInstr(text: () -> String) { buildInstr(WasmOp.PSEUDO_COMMENT_PREVIOUS_INSTR, SourceLocation.NoLocation("Pseudo-instruction"), WasmImmediate.ConstString(text())) } diff --git a/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/source/location/SourceLocation.kt b/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/source/location/SourceLocation.kt index fd43bc85b41..9962209533d 100644 --- a/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/source/location/SourceLocation.kt +++ b/wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/source/location/SourceLocation.kt @@ -6,7 +6,7 @@ package org.jetbrains.kotlin.wasm.ir.source.location sealed class SourceLocation { - private object NoLocation : SourceLocation() + object NoLocation : SourceLocation() data class Location(val file: String, val line: Int, val column: Int) : SourceLocation() diff --git a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/handlers/WasmDebugRunner.kt b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/handlers/WasmDebugRunner.kt index 9da9dbf9243..f040b62ad7d 100644 --- a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/handlers/WasmDebugRunner.kt +++ b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/handlers/WasmDebugRunner.kt @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.wasm.test.handlers import org.jetbrains.kotlin.backend.wasm.WasmCompilerResult import org.jetbrains.kotlin.backend.wasm.writeCompilationResult import org.jetbrains.kotlin.js.parser.sourcemaps.* +import org.jetbrains.kotlin.test.DebugMode import org.jetbrains.kotlin.test.TargetBackend import org.jetbrains.kotlin.test.services.TestServices import org.jetbrains.kotlin.test.services.configuration.WasmEnvironmentConfigurator @@ -15,6 +16,7 @@ import org.jetbrains.kotlin.test.services.moduleStructure import org.jetbrains.kotlin.test.utils.SteppingTestLoggedData import org.jetbrains.kotlin.test.utils.checkSteppingTestResult import org.jetbrains.kotlin.test.utils.formatAsSteppingTestExpectation +import org.jetbrains.kotlin.utils.addToStdlib.butIf import org.jetbrains.kotlin.wasm.test.tools.WasmVM import java.io.File @@ -31,18 +33,13 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect val originalFile = testServices.moduleStructure.originalTestDataFiles.first() val mainModule = WasmEnvironmentConfigurator.getMainModule(testServices) val collectedJsArtifacts = collectJsArtifacts(originalFile) + val debugMode = DebugMode.fromSystemProperty("kotlin.wasm.debugMode") val testFileContent = """ let messageId = 0; const locations = []; function addLocation(frame) { - locations.push({ - functionName: frame.functionName, - functionLine: frame.functionLocation?.lineNumber, - functionColumn: frame.functionLocation?.columnNumber, - line: frame.location.lineNumber, - column: frame.location.columnNumber - }) + locations.push({ functionName: frame.functionName, line: frame.location.lineNumber, column: frame.location.columnNumber }) } function sendMessage(message) { send(JSON.stringify(Object.assign(message, { id: messageId++ }))) } function enableDebugger() { sendMessage({ method: 'Debugger.enable' }) } @@ -76,7 +73,9 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect enableDebugger(); setBreakpoint(box); - box(); + try { + box(); + } catch(e) { console.error(e) } disableDebugger(); print(JSON.stringify(locations)) """.trimIndent() @@ -92,6 +91,37 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect val (jsFilePaths) = collectedJsArtifacts.saveJsArtifacts(dir) + if (debugMode >= DebugMode.DEBUG) { + File(dir, "index.html").writeText( + """ + + + + UNKNOWN + + + + """.trimIndent() + ) + // To have access to the content of original files from a browser's DevTools + testServices.moduleStructure.modules.last().files.forEach { + if (it.originalFile === originalFile) File(dir, it.name).writeText(it.originalContent) + } + } + val exception = try { val result = WasmVM.V8.run( entryMjs = "./${collectedJsArtifacts.entryPath}", @@ -99,38 +129,42 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect workingDirectory = dir, toolArgs = listOf("--enable-inspector", "--allow-natives-syntax") ) - val parsedLocations = FrameParser(result).parse().mapNotNull { frame -> - val originalFunctionName = frame.currentFunctionLocation.let { - sourceMap.segmentForGeneratedLocation(it.line, it.column)?.name ?: frame.functionName - } - val pausedLocation = sourceMap.segmentForGeneratedLocation( - frame.pausedLocation.line, - frame.pausedLocation.column, - ) + val debuggerSteps = FrameParser(result).parse().mapNotNull { frame -> + val pausedLocation = sourceMap.segmentForGeneratedLocation(frame.pausedLocation.line, frame.pausedLocation.column) + ?.takeIf { it.sourceLineNumber >= 0 } - val testFileName = pausedLocation?.sourceFileName - - if (testFileName == null || pausedLocation.sourceLineNumber < 0) { - null - } else { - SteppingTestLoggedData( - pausedLocation.sourceLineNumber + 1, - false, - formatAsSteppingTestExpectation( - testFileName, - pausedLocation.sourceLineNumber + 1, - originalFunctionName, - false - ) + pausedLocation?.sourceFileName?.let { sourceFileName -> + ProcessedStep( + sourceFileName, + frame.functionName, + Location(pausedLocation.sourceLineNumber, pausedLocation.sourceColumnNumber) ) } } + val groupedByLinesSteppingTestLoggedData = debuggerSteps + .groupBy { Triple(it.fileName, it.functionName, it.location.line) } + .map { (key, debuggerSteps) -> + val (fileName, functionName, lineNumber) = key + val aggregatedColumns = debuggerSteps + .takeIf { it.size > 1 } + .orEmpty() + .map { it.location.column } + .joinToString(", ") + .let { if (it.isNotEmpty()) " ($it)" else it } + + SteppingTestLoggedData( + lineNumber + 1, + false, + formatAsSteppingTestExpectation(fileName, lineNumber + 1, functionName, false) + aggregatedColumns + ) + } + checkSteppingTestResult( frontendKind = mainModule.frontendKind, mainModule.targetBackend ?: TargetBackend.WASM, originalFile, - parsedLocations + groupedByLinesSteppingTestLoggedData ) null @@ -150,7 +184,8 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect } private class Location(val line: Int, val column: Int) - private class Frame(val functionName: String, val currentFunctionLocation: Location, val pausedLocation: Location) + private class Frame(val functionName: String, val pausedLocation: Location) + private class ProcessedStep(val fileName: String, val functionName: String, val location: Location) private class FrameParser(private val input: String) { fun parse(): List = (parseJson(input) as JsonArray).elements @@ -158,7 +193,6 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect val frameObject = it as JsonObject Frame( frameObject.properties["functionName"].asString(), - Location(frameObject.properties["functionLine"].asInt(), frameObject.properties["functionColumn"].asInt()), Location(frameObject.properties["line"].asInt(), frameObject.properties["column"].asInt()) ) } diff --git a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/tools/WasmVM.kt b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/tools/WasmVM.kt index 88c92083c54..a5d73758b4f 100644 --- a/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/tools/WasmVM.kt +++ b/wasm/wasm.tests/test/org/jetbrains/kotlin/wasm/test/tools/WasmVM.kt @@ -81,7 +81,8 @@ internal sealed class WasmVM(val shortName: String) { internal class ExternalTool(val path: String) { fun run(vararg arguments: String, workingDirectory: File? = null): String { val command = arrayOf(path, *arguments) - val processBuilder = ProcessBuilder(*command).redirectErrorStream(true) + val processBuilder = ProcessBuilder(*command) + .redirectErrorStream(true) if (workingDirectory != null) { processBuilder.directory(workingDirectory)