IR: do not use lazyWrapper for Ir.Symbols

The reason for switching from lazyWrapper to SymbolTable itself is that
(at least in JS_IR) some of those lazily created structures could later
be deserialized, which created conflicts.
This commit is contained in:
Georgy Bronnikov
2019-12-02 16:39:20 +03:00
parent b0b04eb4cd
commit 08aeed3b46
5 changed files with 11 additions and 15 deletions
@@ -161,7 +161,7 @@ class JsIrBackendContext(
fun getOperatorByName(name: Name, type: IrSimpleType) = operatorMap[name]?.get(type.classifier)
override val ir = object : Ir<JsIrBackendContext>(this, irModuleFragment) {
override val symbols = object : Symbols<JsIrBackendContext>(this@JsIrBackendContext, symbolTable.lazyWrapper) {
override val symbols = object : Symbols<JsIrBackendContext>(this@JsIrBackendContext, symbolTable) {
override val ThrowNullPointerException =
symbolTable.referenceSimpleFunction(getFunctions(kotlinPackageFqn.child(Name.identifier("THROW_NPE"))).single())