diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index 1410774faed..3a2c82d993b 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -2345,6 +2345,76 @@ public class FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated e } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated e KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 3436df4088e..9ba9679b9d0 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -2345,6 +2345,76 @@ public class FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated extends } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated extends KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index d59f73476c2..5aae07e8cf2 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2345,6 +2345,76 @@ public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index 7f474212488..3fcdfd865fa 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -2345,6 +2345,76 @@ public class FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 6357308ecd2..93b239859c7 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -2345,6 +2345,76 @@ public class FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated extends Abstr } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated extends Abstr KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index dd79d0770bb..a9e683f9a34 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2345,6 +2345,76 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/ReturnableBlockLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/ReturnableBlockLowering.kt index 4051b25365f..3b005ae480b 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/ReturnableBlockLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/ReturnableBlockLowering.kt @@ -19,6 +19,7 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrDoWhileLoopImpl import org.jetbrains.kotlin.ir.symbols.IrReturnableBlockSymbol import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.transformStatement +import org.jetbrains.kotlin.ir.types.isSubtypeOf import org.jetbrains.kotlin.ir.types.isUnit // TODO migrate other usages and move this file to backend.jvm @@ -90,7 +91,24 @@ class ReturnableBlockTransformer(val context: CommonBackendContext, val containe val scopeSymbol = currentScope?.scope?.scopeOwnerSymbol ?: containerSymbol val builder = context.createIrBuilder(scopeSymbol!!) val variable by lazy { - builder.scope.createTmpVariable(expression.type, "tmp\$ret\$${labelCnt++}", true) + builder.scope.createTmpVariable(expression.type, "tmp\$ret\$${labelCnt++}", true).apply { + // Consider the code: + // + // inline fun myrun(block: () -> T) = block() + // fun foo() = myrun L@{ if (false) return@L } + // + // Note that the block has execution path without explicit `Unit` return. That is why `variable` may be uninitialized + // before its reading. + // We worked it around that way: since explicit value return from `Unit` block is not obligatory, later in this lowering + // we don't create `variable` reading if its type is known to be `Unit`. + // On the other hand, despite the block in fact returns `Unit`, due to erasure of non-reified type parameters when inlining, + // block's type in IR can be any superclass of `Unit`, e.g. `Any?`. Thus, the workaround does not work in that case. + // Therefore, we should explicitly initialize `variable`. + // It is safe even if block actually returns something, because in that case `Unit` initializer will be overwritten. + if (!expression.type.isUnit() && context.irBuiltIns.unitType.isSubtypeOf(expression.type, context.typeSystem)) { + initializer = builder.irUnit() + } + } } val loop by lazy { diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/DeepCopyIrTreeWithDescriptors.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/DeepCopyIrTreeWithDescriptors.kt index af663719d1b..3c0d8682c7c 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/DeepCopyIrTreeWithDescriptors.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/DeepCopyIrTreeWithDescriptors.kt @@ -5,12 +5,16 @@ package org.jetbrains.kotlin.backend.common.lower.inline +import org.jetbrains.kotlin.backend.common.ir.Symbols import org.jetbrains.kotlin.ir.IrElement +import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer import org.jetbrains.kotlin.ir.declarations.copyAttributes +import org.jetbrains.kotlin.ir.expressions.IrCall import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrTypeOperatorCall +import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol @@ -24,7 +28,8 @@ import org.jetbrains.kotlin.utils.memoryOptimizedMap internal class DeepCopyIrTreeWithSymbolsForInliner( val typeArguments: Map?, - val parent: IrDeclarationParent? + val parent: IrDeclarationParent?, + defaultNonReifiedTypeParameterRemappingMode: NonReifiedTypeParameterRemappingMode, ) { fun copy(irElement: IrElement): IrElement { @@ -43,7 +48,8 @@ internal class DeepCopyIrTreeWithSymbolsForInliner( private inner class InlinerTypeRemapper( val symbolRemapper: SymbolRemapper, - val typeArguments: Map? + val typeArguments: Map?, + val defaultNonReifiedTypeParameterRemappingMode: NonReifiedTypeParameterRemappingMode, ) : TypeRemapper { override fun enterScope(irTypeParametersContainer: IrTypeParametersContainer) {} @@ -52,30 +58,36 @@ internal class DeepCopyIrTreeWithSymbolsForInliner( private fun remapTypeArguments( arguments: List, - erasedParameters: MutableSet? + erasedParameters: MutableSet?, + leaveNonReifiedAsIs: Boolean, ) = arguments.memoryOptimizedMap { argument -> (argument as? IrTypeProjection)?.let { proj -> - remapTypeAndOptionallyErase(proj.type, erasedParameters)?.let { newType -> + remapType(proj.type, erasedParameters, leaveNonReifiedAsIs)?.let { newType -> makeTypeProjection(newType, proj.variance) } ?: IrStarProjectionImpl } ?: argument } - override fun remapType(type: IrType) = remapTypeAndOptionallyErase(type, erase = false) + override fun remapType(type: IrType) = remapType(type, defaultNonReifiedTypeParameterRemappingMode) - fun remapTypeAndOptionallyErase(type: IrType, erase: Boolean): IrType { - val erasedParams = if (erase) mutableSetOf() else null - return remapTypeAndOptionallyErase(type, erasedParams) ?: error("Cannot substitute type ${type.render()}") + fun remapType(type: IrType, mode: NonReifiedTypeParameterRemappingMode): IrType { + val erasedParams = if (mode == NonReifiedTypeParameterRemappingMode.ERASE) mutableSetOf() else null + return remapType(type, erasedParams, mode == NonReifiedTypeParameterRemappingMode.LEAVE_AS_IS) + ?: error("Cannot substitute type ${type.render()}") } - private fun remapTypeAndOptionallyErase(type: IrType, erasedParameters: MutableSet?): IrType? { + private fun remapType(type: IrType, erasedParameters: MutableSet?, leaveNonReifiedAsIs: Boolean): IrType? { if (type !is IrSimpleType) return type val classifier = type.classifier val substitutedType = typeArguments?.get(classifier) + if (leaveNonReifiedAsIs && classifier is IrTypeParameterSymbol && !classifier.owner.isReified) { + return type + } + // Erase non-reified type parameter if asked to. if (erasedParameters != null && substitutedType != null && (classifier as? IrTypeParameterSymbol)?.owner?.isReified == false) { @@ -94,7 +106,7 @@ internal class DeepCopyIrTreeWithSymbolsForInliner( val upperBound = superClass ?: superTypes.first() // TODO: Think about how to reduce complexity from k^N to N^k - val erasedUpperBound = remapTypeAndOptionallyErase(upperBound, erasedParameters) + val erasedUpperBound = remapType(upperBound, erasedParameters, leaveNonReifiedAsIs) ?: error("Cannot erase upperbound ${upperBound.render()}") erasedParameters.remove(classifier) @@ -111,7 +123,7 @@ internal class DeepCopyIrTreeWithSymbolsForInliner( return type.buildSimpleType { kotlinType = null this.classifier = symbolRemapper.getReferencedClassifier(classifier) - arguments = remapTypeArguments(type.arguments, erasedParameters) + arguments = remapTypeArguments(type.arguments, erasedParameters, leaveNonReifiedAsIs) annotations = type.annotations.memoryOptimizedMap { it.transform(copier, null) as IrConstructorCall } } } @@ -136,16 +148,50 @@ internal class DeepCopyIrTreeWithSymbolsForInliner( } private val symbolRemapper = SymbolRemapperImpl(NullDescriptorsRemapper) - private val typeRemapper = InlinerTypeRemapper(symbolRemapper, typeArguments) + private val typeRemapper = InlinerTypeRemapper(symbolRemapper, typeArguments, defaultNonReifiedTypeParameterRemappingMode) private val copier = object : DeepCopyIrTreeWithSymbols(symbolRemapper, typeRemapper) { - private fun IrType.remapTypeAndErase() = typeRemapper.remapTypeAndOptionallyErase(this, erase = true) + + private fun IrType.leaveNonReifiedAsIs() = typeRemapper.remapType(this, NonReifiedTypeParameterRemappingMode.LEAVE_AS_IS) + + private fun IrType.substituteAll() = typeRemapper.remapType(this, NonReifiedTypeParameterRemappingMode.SUBSTITUTE) + + private fun IrType.erase() = typeRemapper.remapType(this, NonReifiedTypeParameterRemappingMode.ERASE) + + override fun visitClass(declaration: IrClass): IrClass { + // Substitute type argument to make Class::genericSuperclass work as expected (see kt52417.kt) + // Substitution to the super types does not lead to reification and therefore is safe + return super.visitClass(declaration).apply { + superTypes = declaration.superTypes.memoryOptimizedMap { + it.substituteAll() + } + } + } + + override fun visitCall(expression: IrCall): IrCall { + if (!Symbols.isTypeOfIntrinsic(expression.symbol)) return super.visitCall(expression) + // We should neither erase nor substitute non-reified type parameters in the `typeOf` call so that reflection is able + // to create a proper KTypeParameter for it. See KT-60175, KT-30279. + return IrCallImpl( + expression.startOffset, expression.endOffset, + expression.type, + expression.symbol, + expression.typeArgumentsCount, + expression.valueArgumentsCount, + expression.origin, + expression.superQualifierSymbol + ).apply { + for (i in 0 until typeArgumentsCount) { + putTypeArgument(i, expression.getTypeArgument(i)?.leaveNonReifiedAsIs()) + } + }.copyAttributes(expression) + } override fun visitTypeOperator(expression: IrTypeOperatorCall) = IrTypeOperatorCallImpl( expression.startOffset, expression.endOffset, - expression.type.remapTypeAndErase(), + expression.type.erase(), expression.operator, - expression.typeOperand.remapTypeAndErase(), + expression.typeOperand.erase(), expression.argument.transform() ).copyAttributes(expression) } diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt index 36a0f785208..833db0a3144 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt @@ -52,18 +52,10 @@ interface InlineFunctionResolver { } } -fun IrFunction.isTopLevelInPackage(name: String, packageName: String): Boolean { - if (name != this.name.asString()) return false - - val containingDeclaration = parent as? IrPackageFragment ?: return false - val packageFqName = containingDeclaration.packageFqName.asString() - return packageName == packageFqName -} - fun IrFunction.isBuiltInSuspendCoroutineUninterceptedOrReturn(): Boolean = isTopLevelInPackage( "suspendCoroutineUninterceptedOrReturn", - StandardNames.COROUTINES_INTRINSICS_PACKAGE_FQ_NAME.asString() + StandardNames.COROUTINES_INTRINSICS_PACKAGE_FQ_NAME ) open class InlineFunctionResolverReplacingCoroutineIntrinsics(open val context: CommonBackendContext) : InlineFunctionResolver { @@ -89,9 +81,8 @@ class FunctionInlining( private val insertAdditionalImplicitCasts: Boolean = false, private val alwaysCreateTemporaryVariablesForArguments: Boolean = false, private val regenerateInlinedAnonymousObjects: Boolean = false, - private val inlineArgumentsWithTheirOriginalTypeAndOffset: Boolean = false, + private val inlineArgumentsWithOriginalOffset: Boolean = false, private val allowExternalInlining: Boolean = false, - private val useTypeParameterUpperBound: Boolean = false ) : IrElementTransformerVoidWithContext(), BodyLoweringPass { private var containerScope: ScopeWithIr? = null @@ -172,7 +163,7 @@ class FunctionInlining( (0 until callSite.typeArgumentsCount).associate { typeParameters[it].symbol to callSite.getTypeArgument(it) } - DeepCopyIrTreeWithSymbolsForInliner(typeArguments, parent) + DeepCopyIrTreeWithSymbolsForInliner(typeArguments, parent, NonReifiedTypeParameterRemappingMode.ERASE) } val substituteMap = mutableMapOf() @@ -317,7 +308,7 @@ class FunctionInlining( private fun inlinePropertyReference(expression: IrCall, propertyReference: IrPropertyReference): IrExpression { val getterCall = IrCallImpl.fromSymbolOwner( - expression.startOffset, expression.endOffset, expression.type, propertyReference.getter!!, + expression.startOffset, expression.endOffset, propertyReference.getter!!.owner.returnType, propertyReference.getter!!, origin = INLINED_FUNCTION_REFERENCE ) @@ -327,14 +318,16 @@ class FunctionInlining( } val receiverFromField = propertyReference.dispatchReceiver ?: propertyReference.extensionReceiver - getterCall.dispatchReceiver = getterCall.symbol.owner.dispatchReceiverParameter?.let { - receiverFromField ?: tryToGetArg(0) + getterCall.dispatchReceiver = getterCall.symbol.owner.dispatchReceiverParameter?.let { dispatchReceiverParam -> + val dispatchReceiverArgument = receiverFromField ?: tryToGetArg(0) + dispatchReceiverArgument?.doImplicitCastIfNeededTo(dispatchReceiverParam.type) } - getterCall.extensionReceiver = getterCall.symbol.owner.extensionReceiverParameter?.let { - when (getterCall.symbol.owner.dispatchReceiverParameter) { + getterCall.extensionReceiver = getterCall.symbol.owner.extensionReceiverParameter?.let { extensionReceiverParam -> + val extensionReceiverArgument = when (getterCall.symbol.owner.dispatchReceiverParameter) { null -> receiverFromField ?: tryToGetArg(0) else -> tryToGetArg(if (receiverFromField != null) 0 else 1) } + extensionReceiverArgument?.doImplicitCastIfNeededTo(extensionReceiverParam.type) } return wrapInStubFunction(super.visitExpression(getterCall), expression, propertyReference) @@ -427,8 +420,8 @@ class FunctionInlining( is IrConstructor -> { val classTypeParametersCount = inlinedFunction.parentAsClass.typeParameters.size IrConstructorCallImpl.fromSymbolOwner( - if (inlineArgumentsWithTheirOriginalTypeAndOffset) irFunctionReference.startOffset else irCall.startOffset, - if (inlineArgumentsWithTheirOriginalTypeAndOffset) irFunctionReference.endOffset else irCall.endOffset, + if (inlineArgumentsWithOriginalOffset) irFunctionReference.startOffset else irCall.startOffset, + if (inlineArgumentsWithOriginalOffset) irFunctionReference.endOffset else irCall.endOffset, functionReferenceReturnType, inlinedFunction.symbol, classTypeParametersCount, @@ -437,8 +430,8 @@ class FunctionInlining( } is IrSimpleFunction -> IrCallImpl( - if (inlineArgumentsWithTheirOriginalTypeAndOffset) irFunctionReference.startOffset else irCall.startOffset, - if (inlineArgumentsWithTheirOriginalTypeAndOffset) irFunctionReference.endOffset else irCall.endOffset, + if (inlineArgumentsWithOriginalOffset) irFunctionReference.startOffset else irCall.startOffset, + if (inlineArgumentsWithOriginalOffset) irFunctionReference.endOffset else irCall.endOffset, functionReferenceReturnType, inlinedFunction.symbol, inlinedFunction.typeParameters.size, @@ -689,7 +682,9 @@ class FunctionInlining( startOffset = if (it.isDefaultArg) irExpression.startOffset else UNDEFINED_OFFSET, endOffset = if (it.isDefaultArg) irExpression.startOffset else UNDEFINED_OFFSET, irExpression = irExpression, - irType = if (inlineArgumentsWithTheirOriginalTypeAndOffset) it.parameter.getOriginalType() else irExpression.type, + // If original type of parameter is T, then `it.parameter.type` is T after substitution or erasure, + // depending on whether T reified or not. + irType = it.parameter.type, nameHint = callee.symbol.owner.name.asStringStripSpecialMarkers() + "_" + it.parameter.name.asStringStripSpecialMarkers(), isMutable = false ) @@ -735,50 +730,6 @@ class FunctionInlining( return original.allParameters.singleOrNull { it.name == this.name && it.startOffset == this.startOffset } ?: this } - // In short this is needed for `kt44429` test. We need to get original generic type to trick type system on JVM backend. - // Probably this it is relevant only for numeric types in JVM. - private fun IrValueParameter.getOriginalType(): IrType { - if (this.parent !is IrFunction) return type - val copy = this.parent as IrFunction // contains substituted type parameters with corresponding type arguments - val original = copy.originalFunction // contains original unsubstituted type parameters - - // Note 1: the following method will replace super types fow the owner type parameter. So in every other IrSimpleType that - // refers this type parameter we will see substituted values. This should not be a problem because earlier we replace all type - // parameters with corresponding type arguments. - // Note 2: this substitution can be dropped if we will learn how to copy IR function and leave its type parameters as they are. - // But this sounds a little complicated. - fun IrType.substituteSuperTypes(): IrType { - val typeClassifier = this.classifierOrNull?.owner as? IrTypeParameter ?: return this - typeClassifier.superTypes = original.typeParameters[typeClassifier.index].superTypes.map { - val superTypeClassifier = it.classifierOrNull?.owner as? IrTypeParameter ?: return@map it - copy.typeParameters[superTypeClassifier.index].defaultType.substituteSuperTypes() - } - return this - } - - fun IrValueParameter?.getTypeIfFromTypeParameter(): IrType? { - val typeClassifier = this?.type?.classifierOrNull?.owner as? IrTypeParameter ?: return null - if (typeClassifier.parent != this.parent) return null - - // We take type parameter from copied callee and not from original because we need an actual copy. Without this copy, - // in case of recursive call, we can get a situation there the same type parameter will be mapped on different type arguments. - // (see compiler/testData/codegen/boxInline/complex/use.kt test file) - val newTypeParameter = copy.typeParameters[typeClassifier.index].defaultType.substituteSuperTypes() - return if (useTypeParameterUpperBound) typeClassifier.firstRealUpperBound().mergeNullability(type) else newTypeParameter - } - - return when (this) { - copy.dispatchReceiverParameter -> original.dispatchReceiverParameter?.getTypeIfFromTypeParameter() - ?: copy.dispatchReceiverParameter!!.type - copy.extensionReceiverParameter -> original.extensionReceiverParameter?.getTypeIfFromTypeParameter() - ?: copy.extensionReceiverParameter!!.type - else -> copy.valueParameters.first { it == this }.let { valueParameter -> - original.valueParameters.getOrNull(valueParameter.index)?.getTypeIfFromTypeParameter() - ?: valueParameter.type - } - } - } - private fun IrTypeParameter?.firstRealUpperBound(): IrType { val queue = this?.superTypes?.toMutableList() ?: mutableListOf() @@ -876,7 +827,9 @@ class FunctionInlining( irExpression = IrBlockImpl( if (isDefaultArg) variableInitializer.startOffset else UNDEFINED_OFFSET, if (isDefaultArg) variableInitializer.endOffset else UNDEFINED_OFFSET, - if (inlineArgumentsWithTheirOriginalTypeAndOffset) parameter.getOriginalType() else variableInitializer.type, + // If original type of parameter is T, then `parameter.type` is T after substitution or erasure, + // depending on whether T reified or not. + parameter.type ).apply { statements.add(variableInitializer) }, @@ -921,3 +874,7 @@ class FunctionInlining( val INLINED_FUNCTION_REFERENCE by IrStatementOriginImpl val INLINED_FUNCTION_ARGUMENTS by IrStatementOriginImpl val INLINED_FUNCTION_DEFAULT_ARGUMENTS by IrStatementOriginImpl + +enum class NonReifiedTypeParameterRemappingMode { + LEAVE_AS_IS, SUBSTITUTE, ERASE +} \ No newline at end of file diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsLoweringPhases.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsLoweringPhases.kt index 2d0a4c2da4a..41953eca011 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsLoweringPhases.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsLoweringPhases.kt @@ -213,10 +213,9 @@ private val functionInliningPhase = makeIrModulePhase( it, JsInlineFunctionResolver(it), it.innerClassesSupport, - allowExternalInlining = true, - useTypeParameterUpperBound = true, alwaysCreateTemporaryVariablesForArguments = true, - inlineArgumentsWithTheirOriginalTypeAndOffset = true + inlineArgumentsWithOriginalOffset = true, + allowExternalInlining = true ) }, name = "FunctionInliningPhase", diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLoweringPhases.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLoweringPhases.kt index b5123b4361e..07a2b7bcd4f 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLoweringPhases.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/JvmLoweringPhases.kt @@ -259,6 +259,14 @@ private val returnableBlocksPhase = makeIrFilePhase( prerequisite = setOf(arrayConstructorPhase, assertionPhase, directInvokeLowering) ) +private val singletonReferencesPhase = makeIrFilePhase( + ::SingletonReferencesLowering, + name = "SingletonReferences", + description = "Handle singleton references", + // ReturnableBlock lowering may produce references to the `Unit` object + prerequisite = setOf(returnableBlocksPhase) +) + private val syntheticAccessorPhase = makeIrFilePhase( ::SyntheticAccessorLowering, name = "SyntheticAccessor", @@ -287,7 +295,7 @@ internal val functionInliningPhase = makeIrModulePhase( innerClassesSupport = context.innerClassesSupport, alwaysCreateTemporaryVariablesForArguments = true, regenerateInlinedAnonymousObjects = true, - inlineArgumentsWithTheirOriginalTypeAndOffset = true + inlineArgumentsWithOriginalOffset = true ) }, name = "FunctionInliningPhase", @@ -367,10 +375,10 @@ private val jvmFilePhases = listOf( // makePatchParentsPhase(), enumWhenPhase, - singletonReferencesPhase, assertionPhase, returnableBlocksPhase, + singletonReferencesPhase, sharedVariablesPhase, localDeclarationsPhase, // makePatchParentsPhase(), diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/SingletonReferencesLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/SingletonReferencesLowering.kt index 717350a4a8c..36a9305f7b5 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/SingletonReferencesLowering.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/SingletonReferencesLowering.kt @@ -7,7 +7,6 @@ package org.jetbrains.kotlin.backend.jvm.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass import org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext -import org.jetbrains.kotlin.backend.common.phaser.makeIrFilePhase import org.jetbrains.kotlin.backend.common.pop import org.jetbrains.kotlin.backend.common.push import org.jetbrains.kotlin.backend.jvm.JvmBackendContext @@ -23,13 +22,7 @@ import org.jetbrains.kotlin.ir.types.classOrNull import org.jetbrains.kotlin.ir.util.isAnonymousObject import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid -internal val singletonReferencesPhase = makeIrFilePhase( - ::SingletonReferencesLowering, - name = "SingletonReferences", - description = "Handle singleton references" -) - -private class SingletonReferencesLowering(val context: JvmBackendContext) : FileLoweringPass, IrElementTransformerVoidWithContext() { +internal class SingletonReferencesLowering(val context: JvmBackendContext) : FileLoweringPass, IrElementTransformerVoidWithContext() { private val constructingEnums = arrayListOf() override fun lower(irFile: IrFile) { diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt index 2de55622615..aab068047f1 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt @@ -136,9 +136,10 @@ private val functionInliningPhase = makeCustomPhase( { context, module -> FunctionInlining( context = context, - innerClassesSupport = context.innerClassesSupport, inlineFunctionResolver = WasmInlineFunctionResolver(context), + innerClassesSupport = context.innerClassesSupport, insertAdditionalImplicitCasts = true, + alwaysCreateTemporaryVariablesForArguments = true ).inline(module) module.patchDeclarationParents() }, diff --git a/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt b/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt index 95c32c7843d..327c952899e 100644 --- a/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt +++ b/compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt @@ -1,4 +1,10 @@ // WITH_STDLIB -fun box(): String = - if (listOf("abc", "de", "f").map(String::length) == listOf(3, 2, 1)) "OK" else "Fail" +val String.myLength get() = this.length + +fun box(): String { + if (listOf("abc", "de", "f").map(String::length) != listOf(3, 2, 1)) return "Fail 1" + if (listOf("abc", "de", "f").map(String::myLength) != listOf(3, 2, 1)) return "Fail 2" + return "OK" +} + diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt index 8c66d924526..fbc3aae68a7 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt @@ -1,5 +1,4 @@ // TARGET_BACKEND: JVM -// IGNORE_INLINER: IR // WITH_STDLIB package test diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt index b6923f110ab..651bce1b7fe 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt @@ -1,7 +1,6 @@ // WITH_REFLECT // KJS_WITH_FULL_RUNTIME // IGNORE_BACKEND: WASM -// IGNORE_INLINER: IR package test import kotlin.reflect.* diff --git a/compiler/testData/codegen/box/size/add.kt b/compiler/testData/codegen/box/size/add.kt index 819e65b33e9..760300df054 100644 --- a/compiler/testData/codegen/box/size/add.kt +++ b/compiler/testData/codegen/box/size/add.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: WASM // RUN_THIRD_PARTY_OPTIMIZER -// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_559 +// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_814 // WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_526 // WASM_OPT_EXPECTED_OUTPUT_SIZE: 2_640 diff --git a/compiler/testData/codegen/box/size/helloWorld.kt b/compiler/testData/codegen/box/size/helloWorld.kt index 451f294e257..677e71d160e 100644 --- a/compiler/testData/codegen/box/size/helloWorld.kt +++ b/compiler/testData/codegen/box/size/helloWorld.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: WASM // RUN_THIRD_PARTY_OPTIMIZER -// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 38_992 +// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 41_349 // WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_552 // WASM_OPT_EXPECTED_OUTPUT_SIZE: 9_847 diff --git a/compiler/testData/codegen/box/size/helloWorldDOM.kt b/compiler/testData/codegen/box/size/helloWorldDOM.kt index 24f7797da5e..fa1135cda09 100644 --- a/compiler/testData/codegen/box/size/helloWorldDOM.kt +++ b/compiler/testData/codegen/box/size/helloWorldDOM.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: WASM // RUN_THIRD_PARTY_OPTIMIZER -// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 13_922 +// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 14_178 // WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 5_081 // WASM_OPT_EXPECTED_OUTPUT_SIZE: 4_317 diff --git a/compiler/testData/codegen/box/size/objectsOptimization.kt b/compiler/testData/codegen/box/size/objectsOptimization.kt index 2f6797141f1..ec22036296e 100644 --- a/compiler/testData/codegen/box/size/objectsOptimization.kt +++ b/compiler/testData/codegen/box/size/objectsOptimization.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: WASM // RUN_THIRD_PARTY_OPTIMIZER -// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 17_619 +// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 17_907 // WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_398 // WASM_OPT_EXPECTED_OUTPUT_SIZE: 5_841 diff --git a/compiler/testData/codegen/box/size/ok.kt b/compiler/testData/codegen/box/size/ok.kt index 214d21dd3a6..e8177ae7cc2 100644 --- a/compiler/testData/codegen/box/size/ok.kt +++ b/compiler/testData/codegen/box/size/ok.kt @@ -1,7 +1,7 @@ // TARGET_BACKEND: WASM // RUN_THIRD_PARTY_OPTIMIZER -// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_601 +// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_856 // WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_398 // WASM_OPT_EXPECTED_OUTPUT_SIZE: 3_743 diff --git a/compiler/testData/codegen/box/size/removeUnusedOverride.kt b/compiler/testData/codegen/box/size/removeUnusedOverride.kt index 797e8a81870..ff8cdbabc17 100644 --- a/compiler/testData/codegen/box/size/removeUnusedOverride.kt +++ b/compiler/testData/codegen/box/size/removeUnusedOverride.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: WASM // RUN_THIRD_PARTY_OPTIMIZER -// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 13_109 +// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 13_362 // WASM_OPT_EXPECTED_OUTPUT_SIZE: 3_900 interface I { diff --git a/compiler/testData/codegen/boxInline/complex/kt44429.kt b/compiler/testData/codegen/boxInline/complex/kt44429.kt index a932d5077ab..14309fabaf0 100644 --- a/compiler/testData/codegen/boxInline/complex/kt44429.kt +++ b/compiler/testData/codegen/boxInline/complex/kt44429.kt @@ -1,7 +1,5 @@ // IGNORE_BACKEND: WASM // https://youtrack.jetbrains.com/issue/KT-44571/Segfault-on-unnecessary-int-unboxing -// IGNORE_NATIVE: optimizationMode=DEBUG -// IGNORE_NATIVE: optimizationMode=NO // NO_CHECK_LAMBDA_INLINING // FILE: 1.kt package test diff --git a/compiler/testData/codegen/boxInline/dontReify/arrayRead.kt b/compiler/testData/codegen/boxInline/dontReify/arrayRead.kt new file mode 100644 index 00000000000..2d1dd48a1ed --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/arrayRead.kt @@ -0,0 +1,7 @@ +// FILE: 1.kt + +inline fun f(arr: Array, func: (T) -> Int): Int = func(arr[0]) + +// FILE: 2.kt + +fun box(): String = ('O' + f(arrayOf(""), String::length)).toString() + "K" \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt b/compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt new file mode 100644 index 00000000000..d44243e342c --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt @@ -0,0 +1,13 @@ +// FILE: 1.kt + +inline fun foo(): String { + var arr: Array = Array(1) { Any() } as Array + arr[0] = bar() + return arr[0] as String +} + +fun bar(): T = "OK" as T + +// FILE: 2.kt + +fun box() = foo() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt b/compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt new file mode 100644 index 00000000000..20c551be773 --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt @@ -0,0 +1,11 @@ +// FILE: 1.kt + +inline fun foo(): String { + return bar()!!.toString() +} + +fun bar(): T = "OK" as T + +// FILE: 2.kt + +fun box() = foo() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt b/compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt new file mode 100644 index 00000000000..ad83bd023e5 --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt @@ -0,0 +1,12 @@ +// FILE: 1.kt + +inline fun foo(x: Any?): String { + return with(object { + fun T.bar() = this + }) { (x as T).bar() } as String +} + + +// FILE: 2.kt + +fun box() = foo("OK") \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt b/compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt new file mode 100644 index 00000000000..e4eb6d0033a --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt @@ -0,0 +1,11 @@ +// FILE: 1.kt + +inline fun foo(x: Any?): String { + return { y: T -> "OK" }.invoke(x as T) +} + + + +// FILE: 2.kt + +fun box() = foo("") \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt b/compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt new file mode 100644 index 00000000000..9daeb81c060 --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt @@ -0,0 +1,15 @@ + +// FILE: 1.kt + +import kotlin.reflect.KProperty + +inline fun foo(): String { + val x: T by "" + return x as String +} + +operator fun String.getValue(nothing: Any?, property: KProperty<*>) = "OK" as T + +// FILE: 2.kt + +fun box() = foo() \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt b/compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt new file mode 100644 index 00000000000..ea27560ba1f --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt @@ -0,0 +1,11 @@ +// FILE: 1.kt + +inline fun foo(x: Any?): String { + return object { + val y: T = x as T + }.y as String +} + +// FILE: 2.kt + +fun box() = foo("OK") \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/localVariable.kt b/compiler/testData/codegen/boxInline/dontReify/localVariable.kt new file mode 100644 index 00000000000..4e444ca569f --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/localVariable.kt @@ -0,0 +1,10 @@ +// FILE: 1.kt + +inline fun foo(x: Any?): String { + val y: T = x as T + return y as String +} + +// FILE: 2.kt + +fun box() = foo("OK") \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt b/compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt new file mode 100644 index 00000000000..bc83817e704 --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt @@ -0,0 +1,11 @@ +// FILE: 1.kt + +inline fun foo(x: Any?): String { + return object { + fun bar(): T = x as T + }.bar() as String +} + +// FILE: 2.kt + +fun box() = foo("OK") \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt b/compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt new file mode 100644 index 00000000000..f12f3a01aeb --- /dev/null +++ b/compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt @@ -0,0 +1,11 @@ +// FILE: 1.kt + +inline fun foo(x: Any?): String { + return object { + fun bar(y: T) = y as String + }.bar(x as T) +} + +// FILE: 2.kt + +fun box() = foo("OK") \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt b/compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt new file mode 100644 index 00000000000..e395f374429 --- /dev/null +++ b/compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt @@ -0,0 +1,15 @@ +// FILE: 1.kt + +inline fun myrun(block: () -> T) = block() + +// FILE: 2.kt + +fun box(): String { + var x = "Fail" + myrun L@{ + if (false) return@L Unit + x = "OK" + null + } + return x +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.jvm_abi.txt b/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.jvm_abi.txt index 5b150605c24..a8c80087791 100644 --- a/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.jvm_abi.txt +++ b/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.jvm_abi.txt @@ -12,14 +12,14 @@ MODULE main + 2 1.kt _1Kt *L - 1#1,18:1 - 8#2,2:19 + 1#1,16:1 + 6#2,2:17 *S KotlinDebug *F + 1 2.kt _2Kt *L - 16#1:19,2 + 14#1:17,2 *E } ) K2 @@ -33,15 +33,15 @@ MODULE main + 2 1.kt _1Kt *L - 1#1,18:1 - 8#2:19 - 7#2,3:20 + 1#1,16:1 + 6#2:17 + 5#2,3:18 *S KotlinDebug *F + 1 2.kt _2Kt *L - 16#1:19 - 16#1:20,3 + 14#1:17 + 14#1:18,3 *E } ) diff --git a/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt b/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt index f948ecd1b9d..fbb5f5a6063 100644 --- a/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt +++ b/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt @@ -1,5 +1,3 @@ -// IGNORE_INLINER: IR -// IGNORE_BACKEND: WASM // JVM_ABI_K1_K2_DIFF: KT-62464 // FILE: 1.kt diff --git a/compiler/testData/debug/stepping/assertion.kt b/compiler/testData/debug/stepping/assertion.kt index 60eac19ea21..16386de9a16 100644 --- a/compiler/testData/debug/stepping/assertion.kt +++ b/compiler/testData/debug/stepping/assertion.kt @@ -55,31 +55,34 @@ fun box(): String { // EXPECTATIONS WASM // test.kt:1 $box__JsExportAdapter -// test.kt:26 $box (4, 4) +// test.kt:26 $box (4, 12, 4) +// test.kt:17 $box (58, 58, 58, 58) +// 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:18 $box -// test.kt:19 $box -// test.kt:27 $box (4, 4) +// test.kt:19 $box (13, 12) +// test.kt:27 $box (4, 12, 4) // test.kt:8 $box -// test.kt:9 $box +// test.kt:9 $box (13, 12) // 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:161 $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:150 $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) @@ -98,7 +101,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -118,10 +121,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -134,12 +138,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/callWithReceiver.kt b/compiler/testData/debug/stepping/callWithReceiver.kt index a6fd82a8382..3cc5b7b4ef0 100644 --- a/compiler/testData/debug/stepping/callWithReceiver.kt +++ b/compiler/testData/debug/stepping/callWithReceiver.kt @@ -43,5 +43,6 @@ fun box() { // test.kt:12 $box (6, 6) // test.kt:5 $A.foo (16, 20) // test.kt:15 $box (6, 6) +// test.kt:14 $box // test.kt:6 $box (23, 27) // test.kt:16 $box diff --git a/compiler/testData/debug/stepping/chainCall.kt b/compiler/testData/debug/stepping/chainCall.kt index ef716ca4fe1..3d52ad6ebf9 100644 --- a/compiler/testData/debug/stepping/chainCall.kt +++ b/compiler/testData/debug/stepping/chainCall.kt @@ -47,6 +47,6 @@ fun box() { // 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:14 $box (6, 4) // test.kt:6 $box (23, 27, 23, 27) // test.kt:16 $box diff --git a/compiler/testData/debug/stepping/continue.kt b/compiler/testData/debug/stepping/continue.kt index 2f929fd04a8..280b2be6bd9 100644 --- a/compiler/testData/debug/stepping/continue.kt +++ b/compiler/testData/debug/stepping/continue.kt @@ -81,7 +81,7 @@ fun box() { // 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 $ +// Library.kt:39 $ (62, 82) // 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 $ @@ -103,10 +103,10 @@ fun box() { // 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:124 $kotlin.String.equals (2, 32, 46, 42, 53, 32, 32, 32, 46, 42, 53, 32, 32, 2, 32, 46, 42, 53, 32, 32) // 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:155 $kotlin.String.equals (8, 15, 8, 15, 8, 15) // 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) @@ -116,9 +116,11 @@ fun box() { // String.kt:119 $kotlin.String.toString // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -137,7 +139,7 @@ fun box() { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -157,10 +159,11 @@ fun box() { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -173,12 +176,10 @@ fun box() { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/dataClass.kt b/compiler/testData/debug/stepping/dataClass.kt index 861710bd054..e0466031caa 100644 --- a/compiler/testData/debug/stepping/dataClass.kt +++ b/compiler/testData/debug/stepping/dataClass.kt @@ -148,10 +148,10 @@ fun box() { // 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:136 $kotlin.String.hashCode (18, 52, 61, 52, 66, 51, 51, 44) // 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:155 $kotlin.String.hashCode (8, 15) // Standard.kt:138 $kotlin.String.hashCode (8, 4, 0) // Standard.kt:137 $kotlin.String.hashCode // Standard.kt:53 $kotlin.String.hashCode (25, 37) @@ -180,9 +180,11 @@ fun box() { // 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:62 $kotlin.text.insertString (53, 47, 60, 66, 53, 47, 60, 66, 53, 47, 60, 66, 53, 47, 60, 66, 53, 47, 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:63 $kotlin.text.insertString (2, 2, 2, 2, 2) +// _WasmArrays.kt:64 $kotlin.text.insertString (1, 19, 1, 19, 1, 19, 1, 19, 1, 19) // _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) @@ -207,7 +209,7 @@ fun box() { // _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:244 $kotlin.collections.copyInto (42869, 42874, 42883, 42895, 42904, 42916, 42935) // _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) @@ -222,7 +224,7 @@ fun box() { // 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. +// Library.kt:69 $kotlin.wasm.internal. (69, 77) // 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) @@ -272,6 +274,7 @@ fun box() { // 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:46 $kotlin.wasm.internal.itoa32 // 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) @@ -280,9 +283,11 @@ fun box() { // 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) +// _WasmArrays.kt:73 $kotlin.text.unsafeStringFromCharArray (3, 9, 18, 24, 31) +// _WasmArrays.kt:74 $kotlin.text.unsafeStringFromCharArray +// _WasmArrays.kt:88 $kotlin.text.unsafeStringFromCharArray (35, 48, 66, 74, 87, 4) // StringBuilderWasm.kt:48 $kotlin.text.unsafeStringFromCharArray (16, 4) +// String.kt:57 $kotlin.text.unsafeStringFromCharArray // 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 diff --git a/compiler/testData/debug/stepping/for.kt b/compiler/testData/debug/stepping/for.kt index eef426e94a5..a4804ee323c 100644 --- a/compiler/testData/debug/stepping/for.kt +++ b/compiler/testData/debug/stepping/for.kt @@ -38,5 +38,5 @@ inline fun foo(n: Int) {} // 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:5 $box (8, 12, 8, 12, 8, 12) // test.kt:7 $box diff --git a/compiler/testData/debug/stepping/functionCallWithDefault.kt b/compiler/testData/debug/stepping/functionCallWithDefault.kt index bb77e1362e7..2a0751e8460 100644 --- a/compiler/testData/debug/stepping/functionCallWithDefault.kt +++ b/compiler/testData/debug/stepping/functionCallWithDefault.kt @@ -34,4 +34,5 @@ inline fun bar(i: Int = 1) { // test.kt:9 $foo$default (0, 17, 17, 17, 17, 0) // test.kt:10 $foo // test.kt:6 $box +// test.kt:12 $box (24, 24) // test.kt:7 $box diff --git a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt index 882671408b1..bbe5c0683da 100644 --- a/compiler/testData/debug/stepping/implicitThisOnInvoke.kt +++ b/compiler/testData/debug/stepping/implicitThisOnInvoke.kt @@ -51,9 +51,9 @@ fun test(b: B) { // test.kt:10 $B. // test.kt:12 $B. // test.kt:15 $test (4, 4) +// Standard.kt:3 $test (77, 90) // Standard.kt:67 $test -// Standard.kt:70 $test (20, 4) -// Standard.kt:3 $test +// Standard.kt:70 $test (20, 11, 20, 4) // test.kt:11 $B.invoke // test.kt:18 $test // test.kt:6 $box diff --git a/compiler/testData/debug/stepping/lambdaStepInline.kt b/compiler/testData/debug/stepping/lambdaStepInline.kt index daf7d436caf..28a72fbf3f3 100644 --- a/compiler/testData/debug/stepping/lambdaStepInline.kt +++ b/compiler/testData/debug/stepping/lambdaStepInline.kt @@ -51,9 +51,11 @@ fun box(): String { // String.kt:143 $kotlin.stringLiteral (15, 8) // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -72,7 +74,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -92,10 +94,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -108,12 +111,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt index 32652d33a6e..8c0df8e1a9a 100644 --- a/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt +++ b/compiler/testData/debug/stepping/lambdaStepInlineWithDefaults.kt @@ -58,9 +58,11 @@ fun box(): String { // 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:161 $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:150 $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) @@ -79,7 +81,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -99,10 +101,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -115,12 +118,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt index 65ef9f3d7a6..67bf50e4bac 100644 --- a/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt +++ b/compiler/testData/debug/stepping/linenumberForOneParametersArgumentCall.kt @@ -45,6 +45,6 @@ inline fun lookAtMe(f: (String) -> Unit) { // 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:13 $box (4, 6) // test.kt:7 $box (17, 17, 17, 17, 8) // test.kt:9 $box diff --git a/compiler/testData/debug/stepping/localProperty.kt b/compiler/testData/debug/stepping/localProperty.kt index d1a33ce5f86..de20051bc5b 100644 --- a/compiler/testData/debug/stepping/localProperty.kt +++ b/compiler/testData/debug/stepping/localProperty.kt @@ -51,14 +51,16 @@ fun box(): String { // 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:29 $kotlin.String.plus (15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 56, 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:161 $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:150 $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) @@ -70,14 +72,16 @@ fun box(): String { // 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) +// _WasmArrays.kt:68 $kotlin.String.foldChars (0, 0) +// _WasmArrays.kt:70 $kotlin.String.foldChars (21, 21) +// _WasmArrays.kt:71 $kotlin.String.foldChars (1, 4, 23, 1, 4, 23) +// _WasmArrays.kt:88 $kotlin.String.foldChars (35, 48, 66, 74, 87, 4, 35, 48, 66, 74, 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:83 $kotlin.String.foldChars (4, 10) // Preconditions.kt:27 $kotlin.String.foldChars // Preconditions.kt:29 $kotlin.String.foldChars (3, 2) // String.kt:58 $kotlin.String.foldChars (8, 17, 8) @@ -100,7 +104,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -120,10 +124,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -136,12 +141,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/nestedInline.kt b/compiler/testData/debug/stepping/nestedInline.kt index 1983d3fe832..399cf2812c4 100644 --- a/compiler/testData/debug/stepping/nestedInline.kt +++ b/compiler/testData/debug/stepping/nestedInline.kt @@ -100,9 +100,11 @@ inline fun html(init: () -> Unit) { // test.kt:22 $box (11, 4) // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -121,7 +123,7 @@ inline fun html(init: () -> Unit) { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -141,10 +143,11 @@ inline fun html(init: () -> Unit) { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -157,12 +160,10 @@ inline fun html(init: () -> Unit) { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/primitiveNullChecks.kt b/compiler/testData/debug/stepping/primitiveNullChecks.kt index fe6e637efed..8d751547642 100644 --- a/compiler/testData/debug/stepping/primitiveNullChecks.kt +++ b/compiler/testData/debug/stepping/primitiveNullChecks.kt @@ -38,9 +38,11 @@ fun box(): String { // String.kt:149 $kotlin.stringLiteral (11, 4) // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -59,7 +61,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -79,10 +81,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -95,12 +98,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/simpleDefaultArg.kt b/compiler/testData/debug/stepping/simpleDefaultArg.kt index 45e25ae031b..925fb533b04 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArg.kt @@ -40,9 +40,11 @@ fun box(): String { // test.kt:5 $ifoo (11, 4) // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -61,7 +63,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -81,10 +83,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -97,12 +100,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt index 9ed93fb5a69..712a19af446 100644 --- a/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt +++ b/compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt @@ -46,16 +46,18 @@ fun box(): String { // 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:6 $box (11, 4) // 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:161 $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:150 $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) @@ -74,7 +76,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -94,10 +96,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -110,12 +113,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt index 4a7717c1212..e39716d7491 100644 --- a/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt +++ b/compiler/testData/debug/stepping/simpleInlineDefaultArg.kt @@ -43,9 +43,11 @@ fun box(): String { // test.kt:7 $box (11, 4) // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -64,7 +66,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -84,10 +86,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -100,12 +103,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt index f7dbd3d1a90..e0f60c96926 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInfixArgument.kt @@ -70,7 +70,7 @@ fun fail() : String { // 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:29 $kotlin.String.plus (15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 56, 15, 8, 15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 56, 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) diff --git a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt index 2c403970702..de7d43ba8d4 100644 --- a/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineAsInlineArgument.kt @@ -47,24 +47,24 @@ fun fail() : String { // EXPECTATIONS WASM // test.kt:1 $box -// test.kt:5 $box (4, 9) +// test.kt:5 $box (4, 9, 15, 15, 15, 15, 20, 20, 20, 20) +// 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) +// 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) +// 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) +// ThrowHelpers.kt:30 $kotlin.wasm.internal.rangeCheck (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) +// String.kt:142 $kotlin.stringLiteral (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: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) +// String.kt:143 $kotlin.stringLiteral (15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8) // test.kt:8 $box (4, 9, 4) -// test.kt:9 $box +// test.kt:9 $box (16, 22, 22, 22, 22, 27, 27, 27, 27) // test.kt:10 $box diff --git a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt index f1c0e3fdef4..a378686b318 100644 --- a/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt +++ b/compiler/testData/debug/stepping/smapInlineInIntrinsicArgument.kt @@ -62,7 +62,7 @@ fun fail() : String { // 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:29 $kotlin.String.plus (15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 56, 15, 8, 15, 15, 15, 15, 22, 28, 33, 42, 48, 28, 62, 56, 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) diff --git a/compiler/testData/debug/stepping/stringSwitches.kt b/compiler/testData/debug/stepping/stringSwitches.kt index 0436408b12a..ab353e59d11 100644 --- a/compiler/testData/debug/stepping/stringSwitches.kt +++ b/compiler/testData/debug/stepping/stringSwitches.kt @@ -144,10 +144,10 @@ fun box() { // 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:136 $kotlin.String.hashCode (18, 52, 61, 52, 66, 51, 51, 44, 18, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 18, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 18, 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: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:155 $kotlin.String.hashCode (8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15) // 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) diff --git a/compiler/testData/debug/stepping/stringSwitchesSmall.kt b/compiler/testData/debug/stepping/stringSwitchesSmall.kt index f7066f6ef42..eee66fe0742 100644 --- a/compiler/testData/debug/stepping/stringSwitchesSmall.kt +++ b/compiler/testData/debug/stepping/stringSwitchesSmall.kt @@ -129,10 +129,10 @@ fun box() { // 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:136 $kotlin.String.hashCode (18, 52, 61, 52, 66, 51, 51, 44, 18, 52, 61, 52, 66, 51, 51, 44, 52, 61, 52, 66, 51, 51, 44, 18, 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: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:155 $kotlin.String.hashCode (8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15, 8, 15) // 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) diff --git a/compiler/testData/debug/stepping/throwException.kt b/compiler/testData/debug/stepping/throwException.kt index ba4c28c6aa2..cef30c2e05f 100644 --- a/compiler/testData/debug/stepping/throwException.kt +++ b/compiler/testData/debug/stepping/throwException.kt @@ -53,10 +53,7 @@ fun throwIfLess(a: Int, b: Int) { // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33, 18, 8, 32, 33, 18, 8, 32, 33) // Throwable.kt:27 $kotlin.Throwable. (34, 34) // Throwable.kt:39 $kotlin.Throwable. (69, 69) // Throwable.kt:49 $kotlin.Throwable. (1, 1) @@ -93,9 +90,11 @@ fun throwIfLess(a: Int, b: Int) { // TypeInfo.kt:38 $kotlin.wasm.internal.getSimpleName // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -114,7 +113,7 @@ fun throwIfLess(a: Int, b: Int) { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -134,10 +133,11 @@ fun throwIfLess(a: Int, b: Int) { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -150,6 +150,7 @@ fun throwIfLess(a: Int, b: Int) { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20) // 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) diff --git a/compiler/testData/debug/stepping/tryCatch.kt b/compiler/testData/debug/stepping/tryCatch.kt index 6686c330687..5b6ff8f13a4 100644 --- a/compiler/testData/debug/stepping/tryCatch.kt +++ b/compiler/testData/debug/stepping/tryCatch.kt @@ -66,10 +66,7 @@ fun box() { // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // Throwable.kt:27 $kotlin.Throwable. // Throwable.kt:39 $kotlin.Throwable. // Throwable.kt:49 $kotlin.Throwable. diff --git a/compiler/testData/debug/stepping/tryCatchExpression.kt b/compiler/testData/debug/stepping/tryCatchExpression.kt index ee250b82353..9da9887d645 100644 --- a/compiler/testData/debug/stepping/tryCatchExpression.kt +++ b/compiler/testData/debug/stepping/tryCatchExpression.kt @@ -176,10 +176,7 @@ fun box() { // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33, 18, 8, 32, 33, 18, 8, 32, 33) // Throwable.kt:27 $kotlin.Throwable. (34, 34, 34) // Throwable.kt:39 $kotlin.Throwable. (69, 69, 69) // Throwable.kt:49 $kotlin.Throwable. (1, 1, 1) diff --git a/compiler/testData/debug/stepping/tryCatchFinally.kt b/compiler/testData/debug/stepping/tryCatchFinally.kt index 85211b944e7..6e5c8f6bc88 100644 --- a/compiler/testData/debug/stepping/tryCatchFinally.kt +++ b/compiler/testData/debug/stepping/tryCatchFinally.kt @@ -164,10 +164,7 @@ fun box() { // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33, 18, 8, 32, 33, 18, 8, 32, 33) // Throwable.kt:27 $kotlin.Throwable. (34, 34, 34) // Throwable.kt:39 $kotlin.Throwable. (69, 69, 69) // Throwable.kt:49 $kotlin.Throwable. (1, 1, 1) diff --git a/compiler/testData/debug/stepping/tryFinally.kt b/compiler/testData/debug/stepping/tryFinally.kt index bb842d0d4af..679ea4a45d5 100644 --- a/compiler/testData/debug/stepping/tryFinally.kt +++ b/compiler/testData/debug/stepping/tryFinally.kt @@ -117,10 +117,7 @@ fun box() { // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33, 18, 8, 32, 33) // Throwable.kt:27 $kotlin.Throwable. // Throwable.kt:39 $kotlin.Throwable. // Throwable.kt:49 $kotlin.Throwable. @@ -139,9 +136,11 @@ fun box() { // TypeInfo.kt:38 $kotlin.wasm.internal.getSimpleName // ExternalWrapper.kt:200 $kotlin.wasm.internal.kotlinToJsStringAdapter // ExternalWrapper.kt:201 $kotlin.wasm.internal.kotlinToJsStringAdapter +// Strings.kt:161 $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:150 $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) @@ -160,7 +159,7 @@ fun box() { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -180,10 +179,11 @@ fun box() { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -196,6 +196,7 @@ fun box() { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20, 20, 20, 20, 20, 20, 20, 20) // 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) diff --git a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt index 79dd7575601..29d1b42d3a1 100644 --- a/compiler/testData/debug/stepping/variablesWithoutInitializer.kt +++ b/compiler/testData/debug/stepping/variablesWithoutInitializer.kt @@ -44,7 +44,7 @@ fun box() { // 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. +// Library.kt:69 $kotlin.wasm.internal. (69, 77) // 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) @@ -107,5 +107,6 @@ fun box() { // 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:46 $kotlin.wasm.internal.itoa32 // 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 80ccbd283a0..25c11bb44f7 100644 --- a/compiler/testData/debug/stepping/voidLambdaStepInline.kt +++ b/compiler/testData/debug/stepping/voidLambdaStepInline.kt @@ -25,7 +25,7 @@ fun box(): String { // 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:44 $box (11, 11, 11, 4, 11, 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) @@ -46,9 +46,11 @@ fun box(): String { // 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:161 $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:150 $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) @@ -67,7 +69,7 @@ fun box(): String { // 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:58 $kotlin.wasm.internal.kotlinToJsStringAdapter (8, 14) // 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) @@ -87,10 +89,11 @@ fun box(): String { // 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:83 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (4, 10) // 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:105 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate // UInt.kt:414 $kotlin.wasm.unsafe.ScopedMemoryAllocator.allocate (44, 39, 49) // UInt.kt:17 $kotlin.-impl> // MemoryAccess.kt:16 $kotlin.wasm.unsafe.-impl> @@ -103,12 +106,10 @@ fun box(): String { // 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:43 $kotlin.wasm.internal.unsafeWasmCharArrayToRawMemory (20, 20) // 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) +// ExternalWrapper.kt:226 $kotlin.wasm.internal.jsCheckIsNullOrUndefinedAdapter (18, 8, 32, 33) // 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 diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestRestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestRestGenerated.java index 666e393e23c..d99790ab3dc 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestRestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestRestGenerated.java @@ -2348,6 +2348,76 @@ public class JvmAbiConsistencyTestRestGenerated extends AbstractJvmAbiConsistenc } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5005,6 +5075,12 @@ public class JvmAbiConsistencyTestRestGenerated extends AbstractJvmAbiConsistenc KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java index 46756ed9cef..ef116363f0b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -2321,6 +2321,76 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4918,6 +4988,12 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index c873b667bdd..e38bc7711ca 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2321,6 +2321,76 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4918,6 +4988,12 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index 294bb55cfef..d6858b2f997 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -2345,6 +2345,76 @@ public class IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends Abs } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends Abs KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 8a347710d18..805c4eb40d1 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -2345,6 +2345,76 @@ public class IrBlackBoxInlineCodegenWithIrInlinerTestGenerated extends AbstractI } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class IrBlackBoxInlineCodegenWithIrInlinerTestGenerated extends AbstractI KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index d4c749ceaa0..b386a36b846 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2345,6 +2345,76 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 15c62c7b02c..18461e08bfb 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2345,6 +2345,76 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index a9b3831a381..115d97b0d61 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -2345,6 +2345,76 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -5002,6 +5072,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java index 0898f7ca049..bc2b05971b2 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -2321,6 +2321,76 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4918,6 +4988,12 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java index c744c3c22aa..febc0b996c9 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java @@ -2081,6 +2081,76 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4288,6 +4358,12 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenInlineTestGenerated.java index 8ac73e22cc0..20721910034 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenInlineTestGenerated.java @@ -2081,6 +2081,76 @@ public class FirJsES6CodegenInlineTestGenerated extends AbstractFirJsES6CodegenI } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4288,6 +4358,12 @@ public class FirJsES6CodegenInlineTestGenerated extends AbstractFirJsES6CodegenI KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java index 220247345de..ae4f534dde7 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java @@ -2081,6 +2081,76 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4288,6 +4358,12 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java index 9b51760c22d..22e5a64a275 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java @@ -2081,6 +2081,76 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4288,6 +4358,12 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/js/js.translator/testData/box/builtins/stringTemplateWithValueOf.kt b/js/js.translator/testData/box/builtins/stringTemplateWithValueOf.kt index 6f5f588a881..08e6bbd7018 100644 --- a/js/js.translator/testData/box/builtins/stringTemplateWithValueOf.kt +++ b/js/js.translator/testData/box/builtins/stringTemplateWithValueOf.kt @@ -1,5 +1,8 @@ // WITH_STDLIB +// See KT-65230 +// IGNORE_BACKEND: JS_IR, JS_IR_ES6 + fun toStringTemplateAny(x: Any) = " $x " fun toStringTemplateGeneric(x: T) = " $x " inline fun toStringTemplateInlineGeneric(x: T) = " $x " diff --git a/js/js.translator/testData/box/inline/inlineClassEquals.kt b/js/js.translator/testData/box/inline/inlineClassEquals.kt index 20df430dd1b..eecb78afa8d 100644 --- a/js/js.translator/testData/box/inline/inlineClassEquals.kt +++ b/js/js.translator/testData/box/inline/inlineClassEquals.kt @@ -317,7 +317,7 @@ fun testCompareDifferentInstancesInSmartCast() { fun testCompareDifferentInstncesInInlineTemplate() { inline fun myEq(x: T, y: S) = x == y - // CHECK_NEW_COUNT: function=testCompareDifferentInstncesInInlineTemplate$caseJsEq count=8 + // CHECK_NEW_COUNT: function=testCompareDifferentInstncesInInlineTemplate$caseJsEq count=0 fun caseJsEq() { assertTrue(myEq(ClassInt(1), ClassInt(1))) assertTrue(myEq(ClassString("foo"), ClassString("foo"))) diff --git a/js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt b/js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt index ba80be41629..01abc25d013 100644 --- a/js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt +++ b/js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt @@ -1,6 +1,10 @@ // DONT_TARGET_EXACT_BACKEND: WASM // WASM_MUTE_REASON: UNSUPPORTED_JS_INTEROP // EXPECTED_REACHABLE_NODES: 1412 + +// See KT-65230 +// IGNORE_BACKEND: JS_IR, JS_IR_ES6 + //FILE: nativeClassAsReifiedTypeArgument.kt var global = "" diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt index 19004733462..2c613899945 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt @@ -190,18 +190,23 @@ internal class BuiltinOperatorLowering(val context: Context) : FileLoweringPass, private fun IrBuilderWithScope.genFloatingOrReferenceEquals(symbol: IrFunctionSymbol, lhs: IrExpression, rhs: IrExpression): IrExpression { // TODO: areEqualByValue and ieee754Equals intrinsics are specially treated by code generator // and thus can be declared synthetically in the compiler instead of explicitly in the runtime. - fun callEquals(lhs: IrExpression, rhs: IrExpression) = - if (symbol in ieee754EqualsSymbols) + fun callEquals(lhs: IrExpression, rhs: IrExpression): IrExpression { + if (symbol in ieee754EqualsSymbols) { // Find a type-compatible `konan.internal.ieee754Equals` intrinsic: - irCall(selectIntrinsic(symbols.ieee754Equals, lhs.type, rhs.type, true)!!).apply { + val intrinsic = selectIntrinsic(symbols.ieee754Equals, lhs.type, rhs.type, true) + // Type of operands may be lost due to erasure on inlining phase + if (intrinsic != null) { + return irCall(intrinsic).apply { putValueArgument(0, lhs) putValueArgument(1, rhs) } - else - irCall(symbols.equals).apply { - dispatchReceiver = lhs - putValueArgument(0, rhs) - } + } + } + return irCall(symbols.equals).apply { + dispatchReceiver = lhs + putValueArgument(0, rhs) + } + } val lhsIsNotNullable = !lhs.type.isNullable() val rhsIsNotNullable = !rhs.type.isNullable() diff --git a/libraries/stdlib/wasm/js/internal/ExternalWrapper.kt b/libraries/stdlib/wasm/js/internal/ExternalWrapper.kt index 012f7db11b0..02ae2416139 100644 --- a/libraries/stdlib/wasm/js/internal/ExternalWrapper.kt +++ b/libraries/stdlib/wasm/js/internal/ExternalWrapper.kt @@ -222,7 +222,8 @@ internal fun kotlinToJsStringAdapter(x: String?): JsString? { } internal fun jsCheckIsNullOrUndefinedAdapter(x: ExternalInterfaceType?): ExternalInterfaceType? = - x.takeIf { !isNullish(it) } + // We deliberately avoid usage of `takeIf` here as type erase on the inlining stage leads to infinite recursion + if (isNullish(x)) null else x // js string to kotlin string import // TODO Uint16Array may work with byte endian different with Wasm (i.e. little endian) diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index 63493cf9039..a468e9d8a86 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -45235,6 +45235,79 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -47586,6 +47659,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index c6f98c6ec41..c1b8d500159 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -46379,6 +46379,81 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -48826,6 +48901,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 1f94c830c4d..114e3c21edb 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -43515,6 +43515,77 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -45770,6 +45841,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 6e14b603d87..42c6685a865 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -44648,6 +44648,79 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -46999,6 +47072,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxInlineTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxInlineTestGenerated.java index 45dc276c76c..93cc1eec41f 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxInlineTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmJsCodegenBoxInlineTestGenerated.java @@ -2081,6 +2081,76 @@ public class FirWasmJsCodegenBoxInlineTestGenerated extends AbstractFirWasmJsCod } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4288,6 +4358,12 @@ public class FirWasmJsCodegenBoxInlineTestGenerated extends AbstractFirWasmJsCod KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java index fcc542e7fd6..56c0a84d849 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java @@ -2081,6 +2081,76 @@ public class K1WasmCodegenBoxInlineTestGenerated extends AbstractK1WasmCodegenBo } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/dontReify") + @TestDataPath("$PROJECT_ROOT") + public class DontReify { + @Test + public void testAllFilesPresentInDontReify() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/dontReify"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true); + } + + @Test + @TestMetadata("arrayRead.kt") + public void testArrayRead() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayRead.kt"); + } + + @Test + @TestMetadata("arrayWrite.kt") + public void testArrayWrite() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/arrayWrite.kt"); + } + + @Test + @TestMetadata("dispatchReceiver.kt") + public void testDispatchReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/dispatchReceiver.kt"); + } + + @Test + @TestMetadata("extensionReceiver.kt") + public void testExtensionReceiver() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/extensionReceiver.kt"); + } + + @Test + @TestMetadata("lambdaParameter.kt") + public void testLambdaParameter() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/lambdaParameter.kt"); + } + + @Test + @TestMetadata("localDelegatedProperty.kt") + public void testLocalDelegatedProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localDelegatedProperty.kt"); + } + + @Test + @TestMetadata("localObjectProperty.kt") + public void testLocalObjectProperty() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localObjectProperty.kt"); + } + + @Test + @TestMetadata("localVariable.kt") + public void testLocalVariable() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/localVariable.kt"); + } + + @Test + @TestMetadata("methodReturnType.kt") + public void testMethodReturnType() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/methodReturnType.kt"); + } + + @Test + @TestMetadata("parameterInLocalObject.kt") + public void testParameterInLocalObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/dontReify/parameterInLocalObject.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/enclosingInfo") @TestDataPath("$PROJECT_ROOT") @@ -4288,6 +4358,12 @@ public class K1WasmCodegenBoxInlineTestGenerated extends AbstractK1WasmCodegenBo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true); } + @Test + @TestMetadata("blockReturnsNullableUnit.kt") + public void testBlockReturnsNullableUnit() throws Exception { + runTest("compiler/testData/codegen/boxInline/special/blockReturnsNullableUnit.kt"); + } + @Test @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception {