Revert "JVM_IR: use computeIfAbsent in ClassCodegen.getOrCreate()"

This reverts commit 32518eee4b.

Reason: the commit causes lockups in ClassCodegen.
This commit is contained in:
Georgy Bronnikov
2021-08-26 15:26:01 +03:00
committed by TeamCityServer
parent d32b42c538
commit ef72413da9
@@ -511,7 +511,7 @@ class ClassCodegen private constructor(
it.origin == JvmLoweredDeclarationOrigin.CLASS_STATIC_INITIALIZER
},
): ClassCodegen =
context.classCodegens.computeIfAbsent(irClass) { ClassCodegen(irClass, context, parentFunction) }.also {
context.classCodegens.getOrPut(irClass) { ClassCodegen(irClass, context, parentFunction) }.also {
assert(parentFunction == null || it.parentFunction == parentFunction) {
"inconsistent parent function for ${irClass.render()}:\n" +
"New: ${parentFunction!!.render()}\n" +