From adf5ee394ec5c0b5c57c2b1e168762f8ff3982fa Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Mon, 6 Jul 2020 19:18:45 +0300 Subject: [PATCH] [JS IR BE] remove unnecesary code from DCE --- .../src/org/jetbrains/kotlin/ir/backend/js/Dce.kt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/Dce.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/Dce.kt index 2bb84fa62c6..d45fd5eae00 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/Dce.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/Dce.kt @@ -205,9 +205,6 @@ fun usefulDeclarations(roots: Iterable, 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, 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, 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)