Wasm: temporary force keeping Unit_getInstance in DCE

This commit is contained in:
Zalim Bashorov
2023-04-21 18:40:30 +02:00
committed by Space Team
parent 77491ded1b
commit a9683bd4a8
@@ -53,6 +53,8 @@ private fun buildRoots(modules: List<IrModuleFragment>, context: WasmBackendCont
add(context.irBuiltIns.throwableClass.owner)
add(context.mainCallsWrapperFunction)
add(context.fieldInitFunction)
// TODO move Unit related optimization on IR level and make unit usages explicit
add(context.findUnitGetInstanceFunction())
// Remove all functions used to call a kotlin closure from JS side, reachable ones will be added back later.
removeAll(context.closureCallExports.values)