JVM_IR: synchronization in InlineCodegen
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
package org.jetbrains.kotlin.codegen.inline
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.util.ArrayUtil
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.codegen.*
|
||||
import org.jetbrains.kotlin.codegen.AsmUtil.isPrimitive
|
||||
@@ -599,14 +598,6 @@ abstract class InlineCodegen<out T : BaseExpressionCodegen>(
|
||||
return (directMember as? ImportedFromObjectCallableDescriptor<*>)?.callableFromObject ?: directMember
|
||||
}
|
||||
|
||||
private fun cloneMethodNode(methodNode: MethodNode): MethodNode {
|
||||
methodNode.instructions.resetLabels()
|
||||
return MethodNode(
|
||||
Opcodes.API_VERSION, methodNode.access, methodNode.name, methodNode.desc, methodNode.signature,
|
||||
ArrayUtil.toStringArray(methodNode.exceptions)
|
||||
).also(methodNode::accept)
|
||||
}
|
||||
|
||||
private fun doCreateMethodNodeFromCompiled(
|
||||
callableDescriptor: CallableMemberDescriptor,
|
||||
state: GenerationState,
|
||||
|
||||
@@ -625,3 +625,13 @@ fun MethodNode.preprocessSuspendMarkers(forInline: Boolean, keepFakeContinuation
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun cloneMethodNode(methodNode: MethodNode): MethodNode {
|
||||
synchronized(methodNode) {
|
||||
methodNode.instructions.resetLabels()
|
||||
return MethodNode(
|
||||
Opcodes.API_VERSION, methodNode.access, methodNode.name, methodNode.desc, methodNode.signature,
|
||||
methodNode.exceptions.toTypedArray()
|
||||
).also(methodNode::accept)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user