I’m reading kotlin compiler code and found that th...
# kontributors
y
I’m reading kotlin compiler code and found that there are two kinds of intermediate representation, IR and PSI. What is difference between those?
i
IR is mutable, PSI is immutable. PSI is used by frontend and plugin (and every change in PSI will result in changes in source code) and IR is used by IR backends.
y
I see. So the compiler daemon keeps PSI and sync it with the kotlin code, and the compiler will generates IR from PSI then convert it to Bytecode, JS or something on build, right?
👌 1