[JS_IR] Try to find generated default stub fun before creating a new one

This change is required to support a new approach to lowering
execution. There will be no more guarantee that every module
will execute `JsDefaultArgumentStubGenerator` lowering before
moving on.

#KT-63073
This commit is contained in:
Ivan Kylchik
2023-10-26 12:18:54 +02:00
committed by Space Team
parent 917b9481c1
commit b3e485c649
@@ -64,6 +64,7 @@ class JsDefaultArgumentStubGenerator(context: JsIrBackendContext) :
}
private fun IrFunction.introduceDefaultResolution(): IrFunction {
context.mapping.defaultArgumentsDispatchFunction[this]?.let { return it }
val irBuilder = context.createIrBuilder(symbol, UNDEFINED_OFFSET, UNDEFINED_OFFSET)
val variables = hashMapOf<IrValueParameter, IrValueParameter>()