JVM IR: do not add suffix for accessors to top level functions
This only reproduced when compiling (technically incorrect) code in the standard library, where private functions monitorEnter/monitorExit are accessed from another file, and their names with suffixes are not recognized as intrinsics which should be replaced by monitorenter/monitorexit JVM bytecode instructions.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlin.jvm.internal.unsafe.*
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER")
|
||||
fun box(): String {
|
||||
val lock = Any()
|
||||
monitorEnter(lock)
|
||||
try {
|
||||
return "OK"
|
||||
}
|
||||
finally {
|
||||
monitorExit(lock)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user