Moved symbol table emptiness assertion to later places,
so that the assert doesn't trigger in the plugin context
This commit is contained in:
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.ir.declarations.StageController
|
||||
import org.jetbrains.kotlin.ir.declarations.stageController
|
||||
import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator
|
||||
import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator
|
||||
import org.jetbrains.kotlin.ir.util.noUnboundLeft
|
||||
import org.jetbrains.kotlin.library.KotlinLibrary
|
||||
import org.jetbrains.kotlin.library.resolver.KotlinLibraryResolveResult
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -69,6 +70,7 @@ fun compile(
|
||||
val irFiles = allModules.flatMap { it.files }
|
||||
|
||||
deserializer.postProcess()
|
||||
symbolTable.noUnboundLeft("Unbound symbols at the end of linker")
|
||||
|
||||
moduleFragment.files.clear()
|
||||
moduleFragment.files += irFiles
|
||||
|
||||
+2
-1
@@ -573,7 +573,8 @@ abstract class KotlinIrLinker(
|
||||
}
|
||||
}
|
||||
|
||||
symbolTable.noUnboundLeft("unbound after fake overrides:")
|
||||
// TODO: fix IrPluginContext to make it not produce additional external reference
|
||||
// symbolTable.noUnboundLeft("unbound after fake overrides:")
|
||||
}
|
||||
|
||||
// The issue here is that an expect can not trigger its actual deserialization by reachability
|
||||
|
||||
@@ -229,6 +229,7 @@ fun loadIr(
|
||||
}
|
||||
|
||||
val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, mainModule.files, irLinker)
|
||||
symbolTable.noUnboundLeft("Unbound symbols left after linker")
|
||||
|
||||
// TODO: not sure whether this check should be enabled by default. Add configuration key for it.
|
||||
val mangleChecker = ManglerChecker(JsManglerIr, Ir2DescriptorManglerAdapter(JsManglerDesc))
|
||||
|
||||
Reference in New Issue
Block a user