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

Ji Sungbin

11/21/2023, 1:54 PM
What is the difference between
IrSimpleFunction
and
IrFunction
? I don’t know, except that
IrSimpleFunction
inherits from
IrFunction
and has more properties. I’m confused about whether to choose
IrSimpleFunction
or
IrFunction
. I referenced Tóth István Zoltán’s answer from 3 months ago (thanks!),
visitSimpleFunction
it restricts the function type you visit to
IrSimpleFunction
, it calls
visitFunction
if not overridden so it is almost the same as
visitFunction
but leaves out non-simple functions such as constructors.
https://kotlinlang.slack.com/archives/C7L3JB43G/p1693196602086569?thread_ts=1693111695.756429&cid=C7L3JB43G
but I still don’t understand what
IrSimpleFunction
considers “simple”.
d

dmitriy.novozhilov

11/21/2023, 2:04 PM
There are two kinds of functions in IR: regular (simple) functions and constructors
👏 1
j

Ji Sungbin

11/21/2023, 2:10 PM
Wow... That's a really short and perfect explanation, thank you!
👌 2
3 Views