Fix for KT-8948: CompilationException: Back-end (JVM) Internal error: Couldn't inline method call 'foo' into
#KT-8948 Fixed
This commit is contained in:
+3
-4
@@ -143,7 +143,7 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor {
|
||||
|
||||
AbstractInsnNode markedReturn = curIns;
|
||||
AbstractInsnNode instrInsertFinallyBefore = markedReturn.getPrevious();
|
||||
AbstractInsnNode nextPrev = instrInsertFinallyBefore.getPrevious().getPrevious();
|
||||
AbstractInsnNode nextPrev = instrInsertFinallyBefore.getPrevious();
|
||||
assert markedReturn.getNext() instanceof LabelNode : "Label should be occurred after non-local return";
|
||||
LabelNode newFinallyEnd = (LabelNode) markedReturn.getNext();
|
||||
Type nonLocalReturnType = InlineCodegenUtil.getReturnType(markedReturn.getOpcode());
|
||||
@@ -166,6 +166,8 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor {
|
||||
List<TryCatchBlockNodeInfo> clusterBlocks = clusterToFindFinally.getBlocks();
|
||||
TryCatchBlockNodeInfo nodeWithDefaultHandlerIfExists = clusterBlocks.get(clusterBlocks.size() - 1);
|
||||
|
||||
FinallyBlockInfo finallyInfo = findFinallyBlockBody(nodeWithDefaultHandlerIfExists, getTryBlocksMetaInfo().getAllIntervals());
|
||||
if (finallyInfo == null) continue;
|
||||
|
||||
if (nodeWithDefaultHandlerIfExists.getOnlyCopyNotProcess()) {
|
||||
//lambdas finally generated before non-local return instruction,
|
||||
@@ -173,9 +175,6 @@ public class InternalFinallyBlockInliner extends CoveringTryCatchNodeProcessor {
|
||||
throw new RuntimeException("Lambda try blocks should be skipped");
|
||||
}
|
||||
|
||||
FinallyBlockInfo finallyInfo = findFinallyBlockBody(nodeWithDefaultHandlerIfExists, getTryBlocksMetaInfo().getAllIntervals());
|
||||
if (finallyInfo == null) continue;
|
||||
|
||||
originalDepthIndex++;
|
||||
|
||||
instructions.resetLabels();
|
||||
|
||||
Reference in New Issue
Block a user