[JS IR] Remove unused CALLABLE_CLOSURE_DECLARATION declaration origin

This commit is contained in:
Sergej Jaskiewicz
2022-08-03 20:21:01 +02:00
committed by Space
parent d57ddc5f83
commit 5f913b5595
2 changed files with 2 additions and 6 deletions
@@ -147,8 +147,6 @@ class JsIrBackendContext(
// TODO: due to name clash those weird suffix is required, remove it once `MemberNameGenerator` is implemented
private val COROUTINE_SUSPEND_OR_RETURN_JS_NAME = "suspendCoroutineUninterceptedOrReturnJS"
private val GET_COROUTINE_CONTEXT_NAME = "getCoroutineContext"
val callableClosureOrigin = object : IrDeclarationOriginImpl("CALLABLE_CLOSURE_DECLARATION") {}
}
private val internalPackage = module.getPackage(JS_PACKAGE_FQNAME)
@@ -27,10 +27,8 @@ import org.jetbrains.kotlin.js.backend.ast.*
@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE")
class IrElementToJsStatementTransformer : BaseIrElementToJsNodeTransformer<JsStatement, JsGenerationContext> {
override fun visitFunction(declaration: IrFunction, data: JsGenerationContext) = JsEmpty.also {
assert(declaration.origin == JsIrBackendContext.callableClosureOrigin) {
"The only possible Function Declaration is one composed in Callable Reference Lowering"
}
override fun visitFunction(declaration: IrFunction, data: JsGenerationContext): JsStatement {
error("All functions must be already lowered")
}
override fun visitBlockBody(body: IrBlockBody, context: JsGenerationContext): JsStatement {