IRFactory
class IRFactory(env: CompilerEnvirons, sourceName: String?, sourceString: String, errorReporter: ErrorReporter = env.errorReporter)
Lowers the AST into the Node IR that the code generator consumes.
The transform methods walk the tree the parser built and rewrite the high-level constructs into the flat, jump-based form the interpreter wants. Loops become labeled targets, switches become a jump table plus labels, comprehensions become nested loops, and destructuring becomes a chain of plain assignments.
KMP: the E4X transforms are not ported, following D-16.
Constructors
Link copied to clipboard
constructor(env: CompilerEnvirons, sourceName: String?, sourceString: String, errorReporter: ErrorReporter = env.errorReporter)