Fix compilation with ASM 8
General rule to use linkedLabel or linkWithLabel when label from node is reused in other instructions. If label is not linked then it will point to another labelNode when visited #KT-39013 Fixed
This commit is contained in:
+4
-5
@@ -13,12 +13,9 @@ import org.jetbrains.kotlin.backend.jvm.intrinsics.JavaClassProperty
|
||||
import org.jetbrains.kotlin.backend.jvm.lower.MultifileFacadeFileEntry
|
||||
import org.jetbrains.kotlin.backend.jvm.lower.constantValue
|
||||
import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.unboxInlineClass
|
||||
import org.jetbrains.kotlin.codegen.*
|
||||
import org.jetbrains.kotlin.codegen.AsmUtil.*
|
||||
import org.jetbrains.kotlin.codegen.BaseExpressionCodegen
|
||||
import org.jetbrains.kotlin.codegen.CallGenerator
|
||||
import org.jetbrains.kotlin.codegen.StackValue
|
||||
import org.jetbrains.kotlin.codegen.coroutines.SuspensionPointKind
|
||||
import org.jetbrains.kotlin.codegen.extractReificationArgument
|
||||
import org.jetbrains.kotlin.codegen.inline.*
|
||||
import org.jetbrains.kotlin.codegen.inline.ReifiedTypeInliner.Companion.putNeedClassReificationMarker
|
||||
import org.jetbrains.kotlin.codegen.inline.ReifiedTypeInliner.OperationKind.AS
|
||||
@@ -148,6 +145,8 @@ class ExpressionCodegen(
|
||||
|
||||
private fun markNewLabel() = Label().apply { mv.visitLabel(this) }
|
||||
|
||||
private fun markNewLinkedLabel() = linkedLabel().apply { mv.visitLabel(this) }
|
||||
|
||||
private fun getLineNumberForOffset(offset: Int): Int = fileEntry?.getLineNumber(offset)?.plus(1) ?: -1
|
||||
|
||||
private fun IrElement.markLineNumber(startOffset: Boolean) {
|
||||
@@ -1027,7 +1026,7 @@ class ExpressionCodegen(
|
||||
data: BlockInfo,
|
||||
nestedTryWithoutFinally: MutableList<TryInfo> = arrayListOf()
|
||||
) {
|
||||
val gapStart = markNewLabel()
|
||||
val gapStart = markNewLinkedLabel()
|
||||
finallyDepth++
|
||||
if (isFinallyMarkerRequired()) {
|
||||
generateFinallyMarker(mv, finallyDepth, true)
|
||||
|
||||
Reference in New Issue
Block a user