[JS IR BE] remove unnecesary code from DCE
This commit is contained in:
@@ -205,9 +205,6 @@ fun usefulDeclarations(roots: Iterable<IrDeclaration>, context: JsIrBackendConte
|
||||
while (queue.isNotEmpty()) {
|
||||
val declaration = queue.pollFirst()
|
||||
|
||||
// TODO remove?
|
||||
stageController.lazyLower(declaration)
|
||||
|
||||
fun IrDeclaration.enqueue(description: String, isContagious: Boolean = true) {
|
||||
enqueue(declaration, description, isContagious)
|
||||
}
|
||||
@@ -217,15 +214,6 @@ fun usefulDeclarations(roots: Iterable<IrDeclaration>, context: JsIrBackendConte
|
||||
(it.classifierOrNull as? IrClassSymbol)?.owner?.enqueue("superTypes")
|
||||
}
|
||||
|
||||
// TODO find out how `doResume` gets removed
|
||||
if (declaration.symbol == context.ir.symbols.coroutineImpl) {
|
||||
declaration.declarations.toList().forEach {
|
||||
if (it is IrSimpleFunction && it.name.asString() == "doResume") {
|
||||
it.enqueue("hack for CoroutineImpl::doResume")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declaration.annotations.forEach {
|
||||
val annotationClass = it.symbol.owner.constructedClass
|
||||
if (annotationClass.isAssociatedObjectAnnotatedAnnotation) {
|
||||
@@ -254,9 +242,6 @@ fun usefulDeclarations(roots: Iterable<IrDeclaration>, context: JsIrBackendConte
|
||||
else -> null
|
||||
}
|
||||
|
||||
// TODO remove?
|
||||
(body as? IrBody)?.let { stageController.lazyLower(it) }
|
||||
|
||||
body?.acceptVoid(object : IrElementVisitorVoid {
|
||||
override fun visitElement(element: IrElement) {
|
||||
element.acceptChildrenVoid(this)
|
||||
|
||||
Reference in New Issue
Block a user