Skip to content

Commit

Permalink
Removing extra atomicfu references from LVT for Kotlin 1.5.20
Browse files Browse the repository at this point in the history
  • Loading branch information
mvicsokolova committed May 28, 2021
1 parent 1c38c1d commit baa8c38
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -715,11 +715,16 @@ class AtomicFUTransformer(
i = i.next
hasErrors = true
}
// make sure all kotlinx/atomicfu references removed
removeAtomicReferencesFromLVT()
// save transformed method if not in analysis phase
if (!hasErrors && !analyzePhase2)
accept(mv)
}

private fun removeAtomicReferencesFromLVT() =
localVariables?.removeIf { getType(it.desc) in AFU_TYPES }

private fun FieldInsnNode.checkCopyToDelegate(): AbstractInsnNode? {
val fieldId = FieldId(owner, name, desc)
if (fieldId in fieldDelegates) {
Expand Down

0 comments on commit baa8c38

Please sign in to comment.