From 133f3d359f68e080995e0146b6c81cb5ac86ee60 Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Fri, 28 Feb 2020 17:13:23 +0300 Subject: [PATCH] [JS IR] remove hacks from DCE --- .../org/jetbrains/kotlin/ir/backend/js/Dce.kt | 19 ------------------- 1 file changed, 19 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 c7c8766e198..c4b6a7be7bf 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 @@ -153,15 +153,6 @@ fun usefulDeclarations(roots: Iterable, context: JsIrBackendConte (it.classifierOrNull as? IrClassSymbol)?.owner?.enqueue() } - // Special hack for `IntrinsicsJs.kt` support - if (declaration.superTypes.any { it.isSuspendFunctionTypeOrSubtype() }) { - declaration.declarations.forEach { - if (it is IrSimpleFunction && it.name.asString().startsWith("invoke")) { - it.enqueue() - } - } - } - // TODO find out how `doResume` gets removed if (declaration.symbol == context.ir.symbols.coroutineImpl) { declaration.declarations.forEach { @@ -298,16 +289,6 @@ fun usefulDeclarations(roots: Iterable, context: JsIrBackendConte } } - // TODO deduplicate - // Special hack for `IntrinsicsJs.kt` support - if (klass.superTypes.any { it.isSuspendFunctionTypeOrSubtype() }) { - ArrayList(klass.declarations).forEach { - if (it is IrSimpleFunction && it.name.asString().startsWith("invoke")) { - it.enqueue() - } - } - } - // TODO find out how `doResume` gets removed if (klass.symbol == context.ir.symbols.coroutineImpl) { ArrayList(klass.declarations).forEach {