https://kotlinlang.org logo
#compiler
Title
# compiler
a

Ayla

10/02/2023, 8:39 AM
Hello, will the modification of IR by KCP affect the debugging of the source code? If so, is there any way to support debugging in such case?
y

Youssef Shoaib [MOD]

10/02/2023, 1:03 PM
AFAIK as long as you make sure that the line number information in IR is kept consistent, any modifications you make shouldn't cause issues
thank you color 1
d

damian

10/02/2023, 3:59 PM
That is our experience. We have a compiler plugin that swaps certain calls for different calls -- and without changing the line numbers, everything works as intended. Of course, if you "step into" those calls, they go somewhere other than what you see in the source code, which would be unexpected if someone didn't know about the transformation.
thank you color 1