[Wasm] Generate comments for inlined calls

This commit is contained in:
Zalim Bashorov
2023-07-31 20:29:57 +02:00
parent 3450e60a1f
commit 1946476e58
@@ -656,6 +656,12 @@ class BodyGenerator(
}
if (expression is IrReturnableBlock) {
val inlineFunction = expression.symbol.owner.inlineFunction
val correspondingProperty = (inlineFunction as? IrSimpleFunction)?.correspondingPropertySymbol
val owner = correspondingProperty?.owner ?: inlineFunction
val name = owner?.fqNameWhenAvailable?.asString() ?: owner?.name?.asString() ?: "<UNKNOWN>"
body.commentGroupStart { "Inlined call of `$name`" }
functionContext.defineNonLocalReturnLevel(
expression.symbol,
body.buildBlock(context.transformBlockResultType(expression.type))
@@ -679,6 +685,7 @@ class BodyGenerator(
if (expression is IrReturnableBlock) {
body.buildEnd()
body.commentGroupEnd()
}
}