[JS IR] remove hacks from DCE
This commit is contained in:
@@ -153,15 +153,6 @@ fun usefulDeclarations(roots: Iterable<IrDeclaration>, context: JsIrBackendConte
|
|||||||
(it.classifierOrNull as? IrClassSymbol)?.owner?.enqueue()
|
(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
|
// TODO find out how `doResume` gets removed
|
||||||
if (declaration.symbol == context.ir.symbols.coroutineImpl) {
|
if (declaration.symbol == context.ir.symbols.coroutineImpl) {
|
||||||
declaration.declarations.forEach {
|
declaration.declarations.forEach {
|
||||||
@@ -298,16 +289,6 @@ fun usefulDeclarations(roots: Iterable<IrDeclaration>, 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
|
// TODO find out how `doResume` gets removed
|
||||||
if (klass.symbol == context.ir.symbols.coroutineImpl) {
|
if (klass.symbol == context.ir.symbols.coroutineImpl) {
|
||||||
ArrayList(klass.declarations).forEach {
|
ArrayList(klass.declarations).forEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user