From 26032e4297f6e874b7c64deb8abe13f84177d7aa Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Wed, 12 Jun 2019 14:11:02 +0200 Subject: [PATCH] Split exception table on finally insertion before non-local return in nested try blocks without finally #KT-31653 Fixed --- .../inline/InternalFinallyBlockInliner.java | 30 ++++++++++--- .../kotlin/codegen/inline/MethodInliner.kt | 4 +- .../tryFinally/exceptionTable/kt31653.kt | 42 +++++++++++++++++ .../tryFinally/exceptionTable/kt31653_2.kt | 37 +++++++++++++++ .../tryFinally/exceptionTable/kt31923.kt | 44 ++++++++++++++++++ .../tryFinally/exceptionTable/kt31923_2.kt | 43 ++++++++++++++++++ .../exceptionTable/kt31923_wrong.kt | 45 +++++++++++++++++++ .../nonLocalReturns/tryFinally/kt16417.kt | 3 +- .../BlackBoxInlineCodegenTestGenerated.java | 25 +++++++++++ ...otlinAgainstInlineKotlinTestGenerated.java | 25 +++++++++++ .../IrBlackBoxInlineCodegenTestGenerated.java | 25 +++++++++++ ...otlinAgainstInlineKotlinTestGenerated.java | 25 ++++++----- .../IrNonLocalReturnsTestGenerated.java | 20 +++++++++ .../NonLocalReturnsTestGenerated.java | 20 +++++++++ 14 files changed, 368 insertions(+), 20 deletions(-) create mode 100644 compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt create mode 100644 compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt create mode 100644 compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt create mode 100644 compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt create mode 100644 compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InternalFinallyBlockInliner.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InternalFinallyBlockInliner.java index 5752c217379..c138dcb4495 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InternalFinallyBlockInliner.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InternalFinallyBlockInliner.java @@ -64,7 +64,12 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor { } } - public static void processInlineFunFinallyBlocks(@NotNull MethodNode inlineFun, int lambdaTryCatchBlockNodes, int finallyParamOffset) { + public static void processInlineFunFinallyBlocks( + @NotNull MethodNode inlineFun, + int lambdaTryCatchBlockNodes, + int finallyParamOffset, + boolean properFinallySplit + ) { int index = 0; List inlineFunTryBlockInfo = new ArrayList<>(); for (TryCatchBlockNode block : inlineFun.tryCatchBlocks) { @@ -77,13 +82,14 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor { } if (hasFinallyBlocks(inlineFunTryBlockInfo)) { - new InternalFinallyBlockInliner(inlineFun, inlineFunTryBlockInfo, localVars, finallyParamOffset) + new InternalFinallyBlockInliner(inlineFun, inlineFunTryBlockInfo, localVars, finallyParamOffset, properFinallySplit) .processInlineFunFinallyBlocks(); } } @NotNull private final MethodNode inlineFun; + private final boolean properFinallySplit; //lambdaTryCatchBlockNodes is number of TryCatchBlockNodes that was inlined with lambdas into function @@ -92,10 +98,12 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor { @NotNull MethodNode inlineFun, @NotNull List inlineFunTryBlockInfo, @NotNull List localVariableInfo, - int finallyParamOffset + int finallyParamOffset, + boolean properFinallySplit ) { super(finallyParamOffset); this.inlineFun = inlineFun; + this.properFinallySplit = properFinallySplit; for (TryCatchBlockNodeInfo block : inlineFunTryBlockInfo) { getTryBlocksMetaInfo().addNewInterval(block); } @@ -162,7 +170,7 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor { checkClusterInvariant(clustersFromInnermost); int originalDepthIndex = 0; - + List nestedUnsplitBlocksWithoutFinally = new ArrayList(); while (tryCatchBlockIterator.hasNext()) { TryBlockCluster clusterToFindFinally = tryCatchBlockIterator.next(); List clusterBlocks = clusterToFindFinally.getBlocks(); @@ -170,7 +178,10 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor { FinallyBlockInfo finallyInfo = findFinallyBlockBody(nodeWithDefaultHandlerIfExists, getTryBlocksMetaInfo().getAllIntervals()); - if (finallyInfo == null) continue; + if (finallyInfo == null) { + nestedUnsplitBlocksWithoutFinally.addAll(clusterToFindFinally.getBlocks()); + continue; + } if (nodeWithDefaultHandlerIfExists.getOnlyCopyNotProcess()) { //lambdas finally generated before non-local return instruction, @@ -220,8 +231,13 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor { //Copying finally body before non-local return instruction insertNodeBefore(finallyBlockCopy, inlineFun, instrInsertFinallyBefore); - updateExceptionTable(clusterBlocks, newFinallyStart, newFinallyEnd, - tryCatchBlockInlinedInFinally, labelsInsideFinally, (LabelNode) insertedBlockEnd.info); + nestedUnsplitBlocksWithoutFinally.addAll(clusterBlocks); + + updateExceptionTable( + properFinallySplit ? nestedUnsplitBlocksWithoutFinally : clusterBlocks, newFinallyStart, newFinallyEnd, + tryCatchBlockInlinedInFinally, labelsInsideFinally, (LabelNode) insertedBlockEnd.info + ); + nestedUnsplitBlocksWithoutFinally.clear(); } //skip just inserted finally diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt index eda81d74240..0b2c4b0c85c 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.codegen.optimization.common.* import org.jetbrains.kotlin.codegen.optimization.fixStack.peek import org.jetbrains.kotlin.codegen.optimization.fixStack.top import org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer +import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.ParameterDescriptor import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor @@ -123,7 +124,8 @@ class MethodInliner( if (inliningContext.isRoot) { val remapValue = remapper.remap(parameters.argsSizeOnStack + 1).value InternalFinallyBlockInliner.processInlineFunFinallyBlocks( - resultNode, lambdasFinallyBlocks, (remapValue as StackValue.Local).index + resultNode, lambdasFinallyBlocks, (remapValue as StackValue.Local).index, + languageVersionSettings.supportsFeature(LanguageFeature.ProperFinally) ) } diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt new file mode 100644 index 00000000000..886bc6502e3 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt @@ -0,0 +1,42 @@ +// !LANGUAGE: +ProperFinally +// FILE: 1.kt + +package test + +var result = "" + +inline fun a(f: () -> Any) = + try { + f() + } finally { + throw RuntimeException() + } + +fun b(vararg functions: () -> Any) = a { + for (function in functions) { + try { + return function() + } catch (fail: Throwable) { + } + } +} + +fun main(args: Array) { + b({ result += "OK"; 1 }, { result += "fail"; 2 }) +} + +// FILE: 2.kt +// NO_CHECK_LAMBDA_INLINING +import test.* + + +fun box(): String { + try { + b({ result += "OK"; 1 }, { result += "fail"; 2 }) + return "fail: expected exception" + } catch (e: RuntimeException) { + + } + + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt new file mode 100644 index 00000000000..5cc01c86878 --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt @@ -0,0 +1,37 @@ +// !LANGUAGE: +ProperFinally +// FILE: 1.kt + +package test + +var result = "" + +class A { + var field = 0 + inline fun a(f: () -> Any): Any { + try { + val value = f() + return value + } finally { + field-- + } + } + fun c(vararg functions: () -> Any): Any = a { + for (function in functions) { + try { return function() } catch (fail: Throwable) { } + } + throw RuntimeException() + } +} + +// FILE: 2.kt +// NO_CHECK_LAMBDA_INLINING +import test.* + + +fun box(): String { + val a = A() + a.c({ result += "OK"; 1 }, { result += "fail"; 2 }) + if (a.field != -1) return "fail: -1 != ${a.field}" + + return result +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt new file mode 100644 index 00000000000..181ebd431ef --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt @@ -0,0 +1,44 @@ +// !LANGUAGE: +ProperFinally +// FILE: 1.kt + +package test + +var result = "" + +inline fun inlineFun(block: (String)-> String) { + try { + try { + result += block("lambda") + return + } catch (fail: Throwable) { + result += " catch" + } + } finally { + result += " finally" + throw RuntimeException() + } + +} + +fun test() { + inlineFun { + result += it + return + } +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + try { + test() + return "fail: expected exception" + } catch (e: RuntimeException) { + + } + + return if (result == "lambda finally") "OK" else "fail: $result" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt new file mode 100644 index 00000000000..3e0a0277b7a --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt @@ -0,0 +1,43 @@ +// !LANGUAGE: +ProperFinally +// FILE: 1.kt + +package test + +var result = "" + +inline fun inlineFun(block: (String)-> String) { + try { + try { + result += block("lambda") + } catch (fail: Throwable) { + result += " catch" + } + } finally { + result += " finally" + throw RuntimeException() + } + +} + +fun test() { + inlineFun { + result += it + return + } +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + try { + test() + return "fail: expected exception" + } catch (e: RuntimeException) { + + } + + return if (result == "lambda finally") "OK" else "fail: $result" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt new file mode 100644 index 00000000000..7032bc1d1cd --- /dev/null +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt @@ -0,0 +1,45 @@ +// !LANGUAGE: -ProperFinally +// TARGET_BACKEND: JVM +// FILE: 1.kt + +package test + +var result = "" + +inline fun inlineFun(block: (String)-> String) { + try { + try { + result += block("lambda") + return + } catch (fail: Throwable) { + result += " catch" + } + } finally { + result += " finally" + throw RuntimeException() + } + +} + +fun test() { + inlineFun { + result += it + return + } +} + +// FILE: 2.kt + +import test.* + + +fun box(): String { + try { + test() + return "fail: expected exception" + } catch (e: RuntimeException) { + + } + + return if (result == "lambda finally catch finally") "OK" else "fail: $result" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt index 54005560a35..f0c0cf98472 100644 --- a/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt +++ b/compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt16417.kt @@ -1,5 +1,4 @@ -// IGNORE_BACKEND: JVM_IR -// IGNORE_BACKEND_MULTI_MODULE: JVM_IR +// !LANGUAGE: +ProperFinally // FILE: 1.kt package test diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 9415e7831f9..d7e10a4c268 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -2472,6 +2472,31 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @TestMetadata("kt31653.kt") + public void testKt31653() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); + } + + @TestMetadata("kt31653_2.kt") + public void testKt31653_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); + } + + @TestMetadata("kt31923.kt") + public void testKt31923() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); + } + + @TestMetadata("kt31923_2.kt") + public void testKt31923_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); + } + + @TestMetadata("kt31923_wrong.kt") + public void testKt31923_wrong() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); + } + @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 33985182dac..31492d7ad41 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2472,6 +2472,31 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @TestMetadata("kt31653.kt") + public void testKt31653() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); + } + + @TestMetadata("kt31653_2.kt") + public void testKt31653_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); + } + + @TestMetadata("kt31923.kt") + public void testKt31923() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); + } + + @TestMetadata("kt31923_2.kt") + public void testKt31923_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); + } + + @TestMetadata("kt31923_wrong.kt") + public void testKt31923_wrong() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); + } + @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index a5f339617d3..6879af23d2b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -2472,6 +2472,31 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @TestMetadata("kt31653.kt") + public void testKt31653() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); + } + + @TestMetadata("kt31653_2.kt") + public void testKt31653_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); + } + + @TestMetadata("kt31923.kt") + public void testKt31923() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); + } + + @TestMetadata("kt31923_2.kt") + public void testKt31923_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); + } + + @TestMetadata("kt31923_wrong.kt") + public void testKt31923_wrong() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); + } + @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index d80e2d10d19..1f461f5ecf8 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -2433,16 +2433,6 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_MULTI_MODULE: "); } - @TestMetadata("31929.kt") - public void test31929() throws Exception { - runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/31929.kt"); - } - - @TestMetadata("31929_2.kt") - public void test31929_2() throws Exception { - runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/31929_2.kt"); - } - public void testAllFilesPresentInExceptionTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); } @@ -2482,6 +2472,16 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @TestMetadata("kt31653.kt") + public void testKt31653() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); + } + + @TestMetadata("kt31653_2.kt") + public void testKt31653_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); + } + @TestMetadata("kt31923.kt") public void testKt31923() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); @@ -2492,6 +2492,11 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); } + @TestMetadata("kt31923_wrong.kt") + public void testKt31923_wrong() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_wrong.kt"); + } + @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrNonLocalReturnsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrNonLocalReturnsTestGenerated.java index c47c63ae852..26a07785131 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrNonLocalReturnsTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrNonLocalReturnsTestGenerated.java @@ -410,6 +410,26 @@ public class IrNonLocalReturnsTestGenerated extends AbstractIrNonLocalReturnsTes runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @TestMetadata("kt31653.kt") + public void testKt31653() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); + } + + @TestMetadata("kt31653_2.kt") + public void testKt31653_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); + } + + @TestMetadata("kt31923.kt") + public void testKt31923() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); + } + + @TestMetadata("kt31923_2.kt") + public void testKt31923_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); + } + @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java index 061ea660e89..199a8256c25 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java @@ -410,6 +410,26 @@ public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } + @TestMetadata("kt31653.kt") + public void testKt31653() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653.kt"); + } + + @TestMetadata("kt31653_2.kt") + public void testKt31653_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31653_2.kt"); + } + + @TestMetadata("kt31923.kt") + public void testKt31923() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923.kt"); + } + + @TestMetadata("kt31923_2.kt") + public void testKt31923_2() throws Exception { + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/kt31923_2.kt"); + } + @TestMetadata("nested.kt") public void testNested() throws Exception { runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt");